Task planning methods, devices, equipment, media, and products based on large-scale model MCP
By employing the task planning method of large model MCP, and utilizing rule constraints and genetic algorithms to determine the tool call sequence, the problem of multi-tool coordination in tool scheduling of large language models in complex professional fields is solved, thereby improving the quality and consistency of task planning.
Patent Information
- Application Number
- CN202611329865.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-17
AI Technical Summary
Large language models lack precise computational capabilities in task planning within complex professional fields, making it difficult to follow professional standards and access external resources directly. This results in simple tool scheduling strategies that are ill-suited to the needs of multi-tool collaboration.
By using a task planning method based on the large model MCP, user planning instructions are obtained, task feature vectors and original task data are determined, tool capability vectors with embedded rule constraints are embedded, the target tool call sequence is determined using a genetic algorithm, and standardization and parameter completion are performed to generate task planning results.
It enables collaborative scheduling of multiple tools, improves the quality of task planning results and the consistency of output, and ensures that the results conform to professional standards and the order of tool calls.
Smart Images

Figure CN123114591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of task planning, and in particular to a task planning method, apparatus, equipment, medium and product based on large model MCP. Background Technology
[0002] In recent years, large language models (LLMs) have demonstrated powerful reasoning and knowledge integration capabilities in natural language understanding and generation, providing new technical approaches for intelligent task planning.
[0003] While large language models possess powerful language understanding and generation capabilities, their application in some complex professional fields (such as military operational planning and emergency rescue planning) faces the following challenges: First, pure large language models lack precise computational capabilities and cannot complete complex mathematical calculations and optimization tasks (such as fire allocation optimization and flight path planning in military operational planning); second, they must adhere to strict professional regulations and principles, while general-purpose language models cannot guarantee that their output strictly conforms to professional standards; third, some complex task planning requires the use of various professional tools (such as intelligence analysis tools, fire planning tools, situation assessment tools, and efficiency assessment tools in military operational planning) and databases (such as geographic information systems, weapon and equipment databases, and weather forecasting systems in military operational planning), and large language models themselves cannot directly access these external resources.
[0004] To address these issues, MCP (Model Context Protocol) provides a standardized framework for interaction between large language models and external tools. However, MCP is primarily designed for general-purpose scenarios. In specialized, rule-bound, and complex professional fields requiring multi-tool collaboration, its tool scheduling strategy is simple and relies mainly on the autonomous decision-making of the large model, making it difficult to handle the complex multi-tool collaboration needs in task planning. Summary of the Invention
[0005] The purpose of this application is to provide a task planning method, apparatus, equipment, medium, and product based on large model MCP, which can realize the collaborative scheduling of multiple tools and improve the quality of output results.
[0006] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a task planning method based on a large model MCP, including: Obtain user planning instructions; Based on the user's planning instructions, determine the task feature vector and the original task data; Based on the task feature vector and the tool capability vectors corresponding to multiple preset tools, determine the target tool and the target tool invocation sequence; The original task data is standardized to obtain a standard input matrix; Based on the standard input matrix, the target tools are invoked sequentially according to the target tool invocation sequence to generate task planning results.
[0007] Furthermore, rule constraints are embedded in the metadata definitions of multiple preset tools. These rule constraints are determined based on the business rules corresponding to the preset tools and are used to indicate the collaborative relationship between the multiple preset tools.
[0008] Furthermore, based on the task feature vector and the tool capability vectors corresponding to multiple preset tools, the target tool and the target tool invocation sequence are determined, including: Based on the matching degree between the task feature vector and the tool capability vectors corresponding to multiple preset tools, multiple candidate tools are determined from the multiple preset tools; Fitness is constructed based on the matching degree between the tool call sequence and the task feature vector. The tool call sequence composed of candidate tools is used as an individual. Based on the genetic algorithm, the target tool call sequence and the target tool are determined. In each iteration, after generating a new population, the individuals in the new population are verified to meet the rule constraints.
[0009] Furthermore, after obtaining the standard input matrix, parameter integrity verification is performed on the standard input matrix; if the standard input matrix does not meet the parameter integrity requirements, parameter completion is performed on the standard input matrix.
[0010] Furthermore, based on the standard input matrix, the target tools are invoked sequentially according to the target tool invocation sequence to generate task planning results, including: Determine the output format of the task planning results based on the downstream task type; The task planning results are evaluated for quality. If the task planning structure does not meet the quality requirements, the task planning results are regenerated based on the target tools.
[0011] Furthermore, the original task data is standardized to obtain a standard input matrix, including: Determine the target transformation process based on the data type of the original task data; The original task data is processed based on the target transformation process to obtain the standard input matrix.
[0012] Secondly, this application provides a task planning device based on large model MCP, including: The acquisition module is used to acquire user planning instructions; The determination module is used to determine the task feature vector and raw task data based on the user's planning instructions; and to determine the target tool and the target tool call sequence based on the task feature vector and the tool capability vectors corresponding to multiple preset tools. The processing module is used to standardize the raw task data to obtain a standard input matrix; The calling module is used to call the target tools sequentially according to the target tool call sequence based on the standard input matrix, and generate task planning results.
[0013] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the task planning method based on large model MCP as described above.
[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the task planning method based on large model MCP described above.
[0015] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the task planning method based on large model MCP described above.
[0016] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a task planning method based on a large model MCP. The method involves determining the task feature vector and original task data according to user planning instructions; determining the target tool and its invocation sequence based on the task feature vector and the tool capability vectors corresponding to multiple preset tools; standardizing the original task data to obtain a standard input matrix; and sequentially invoking the target tools according to the target tool invocation sequence based on the standard input matrix to generate task planning results. The standard input matrix can be used to eliminate data heterogeneity differences, ensure global semantic consistency, and improve the output quality of the target tool for task planning. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1An application environment diagram for the task planning method based on large model MCP provided in the embodiments of this application; Figure 2 A flowchart illustrating the task planning method based on large model MCP provided in this application embodiment; Figure 3 A schematic diagram of the functional modules of the task planning device based on large model MCP provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] The task planning method based on large model MCP provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send user planning instructions to server 104. After receiving the user planning instructions, server 104 determines the target tool and call sequence based on the user planning instructions and calls them to obtain the task planning result. Server 104 can feed back the obtained task planning result to terminal 102. Furthermore, in some embodiments, the task planning method based on the large model MCP can also be implemented independently by server 104 or terminal 102. For example, terminal 102 can directly process the user planning instructions, or server 104 can obtain the user planning instructions from the data storage system and process them.
[0022] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.
[0023] In one exemplary embodiment, such as Figure 2 As shown, a task planning method based on a large model MCP is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the following steps are taken: S201 to S205.
[0024] S201, Obtain user planning instructions.
[0025] For example, users can input expected planning instructions through interactive components on the terminal. For instance, a user planning instruction could include "The enemy tank battalion is advancing towards our position."
[0026] S202. Determine the task feature vector and original task data according to the user's planning instructions.
[0027] For example, entities in user planning instructions can be extracted and categorized using a large language model (e.g., "enemy" represents the enemy faction; "tank battalion" represents the force type as armored units and the organizational level as battalion; "our position" represents the target area as our defensive position; "advance" represents the action type as tactical maneuver), and then standardized mapping is performed using natural language to eliminate expression differences (e.g., "advance" is mapped to "tactical maneuver," "tank battalion" is mapped to standardized organizational codes, and "our position" is associated with the geographical identifier of the corresponding defense zone). Then, the professional parameters corresponding to the user planning instructions are transformed into high-dimensional feature vectors (e.g., "enemy tank battalion advances towards our position" can be transformed into a numerical matrix containing parameters such as coordinates, speed, threat level, and force size).
[0028] For example, when a user enters a planning instruction, they can also specify the task type t. type Planning stage phase Task priority t priority Task complexity t complexity (This can be obtained based on the number of subtasks and dependencies), combined with the meta-feature t of the high-dimensional feature vector transformed by professional parameters. data This constitutes the task feature vector T=[t type,t phase ,t priority ,t complexity ,t data ] T .
[0029] It can be understood that the task type t in the task feature vector T type Planning stage phase Task priority t priority Task complexity t complexity All are numerical codes.
[0030] It should be noted that t data Only the meta-features of the data (such as quantifiable attributes like dimension, type, source, and granularity) are included, and the complete content of the data is not contained. Therefore, it is necessary to obtain the corresponding raw task data from existing databases and information systems based on the meta-features corresponding to the user's planning instructions.
[0031] S203. Based on the task feature vector and the tool capability vectors corresponding to multiple preset tools, determine the target tool and the target tool call sequence.
[0032] For example, the preset tools may include intelligence analysis tools, firepower planning tools, situation assessment tools, efficiency assessment tools, etc.; the tool capability vector corresponding to the preset tools can be determined in advance based on the various capabilities of the tools.
[0033] For example, the tool capability vector C corresponding to the preset tool. tool =[cap compute ,cap domain ,cap data cost time cost resource ] Among them, cap compute Computational capacity indicates the upper limit of the tool's computing power or processing scale; cap domain Domain capability refers to the scope of professional fields covered by the tool (such as firepower, intelligence, logistics, etc.); cap data Data processing capability refers to the data types, precision, or throughput that the tool can handle; cost time Cost represents the time required for the tool to complete one call; resource Resource cost represents the cost of computing resources, memory, bandwidth, etc., consumed by the tool.
[0034] In some possible embodiments, rule constraints are embedded in the metadata definitions of multiple preset tools. The rule constraints are determined according to the business rules corresponding to the preset tools and are used to indicate the collaborative relationship between the multiple preset tools.
[0035] For example, based on a large language model, various business rules or operational orders that need to be embedded in the tool can be transformed from natural language or unstructured descriptions into structured and formal rules that can be recognized and processed by computers, and then transformed into explicit rule representations (such as first-order predicate logic, production rules, constraint expressions, rule DSL, knowledge graph triples + constraints, etc.) to obtain rule constraints.
[0036] For example, first-order predicate logic can be used to formally express the rules. Let P be the set of preconditions, E be the set of execution rules, and Q be the set of postconditions. The validity judgment of the tool call can be: In the formula, Valid(Tool) represents the tool call validity determination predicate of the preset tool Tool; P represents the set of precondition predicates, p represents any precondition predicate in set P; E represents the set of execution rule predicates, e represents any execution rule predicate in set E; Q represents the set of postcondition predicates, q represents any postcondition predicate in set Q; This indicates taking the logical conjunction of all predicates in set P; This indicates taking the logical conjunction of all predicates in set E; This indicates taking the logical conjunction of all predicates in set Q; This indicates a logical AND operation. This indicates logical implication, meaning that if the precondition and the execution rule are both true, the postcondition must also be true.
[0037] Specific rules can be exemplified as follows: 1. Precondition rules: The rule as a whole states that target intelligence must be available and commander's approval obtained before reconnaissance of a target can be conducted. reconnaissance (Target) indicates that the preconditions for conducting reconnaissance operations against the target have been met (or "reconnaissance prerequisites are met"); Intelligence (Target) indicates that intelligence information about the target has been obtained; Approval (Commander) indicates that the approval of the commander has been obtained.
[0038] 2. Execution rules: This rule generally states that when allocating firepower, weapon firepower must be greater than the target's hardness and within range. fire_allocation(Weapon,Target) indicates that the weapon's firepower allocation rule is valid against the target; FirePower(Weapon) represents the weapon's firepower intensity (a quantifiable value); Hardness(Target) represents the target's protection hardness / damage resistance level (a quantifiable value); Range(Weapon,Target) represents the distance between the target and the weapon; MaxRange(Weapon) represents the weapon's maximum effective range.
[0039] 3. Postcondition rules: The rule generally states that after an attack, the target damage reaches a threshold and collateral damage is within an acceptable range; Post strike (Result) indicates that the effect of striking the target meets the postcondition; Damage(Target) indicates the damage assessment value of the target; Threshold indicates the minimum damage threshold required by the target for the mission; Collateral(Result) indicates the collateral damage assessment value (additional damage caused to non-target objects and the environment); Acceptable indicates the acceptable upper limit of collateral damage.
[0040] For example, the formalized rule constraints can be tested for logical correctness, consistency, and conformity with business objectives.
[0041] Example 1, logical satisfiability check, checks if there is a feasible solution in the rule set: FirePower(Weapon) should be numeric, InRange(Weapon,Target) should be Boolean; if the check fails, return to the rule compilation stage to correct the terminology and parameter types.
[0042] Example 2, Consistency and Conflict Validation: Checking for mutually exclusive conclusions, priority overriding errors, or circular dependencies among rules: The same weapon is required to have a Range > 50km and a Range < 10km simultaneously; Failure handling: Marked as an unsatisfiable rule, triggering conflict resolution.
[0043] Example 3, Business objective compliance verification, checks whether the rule output meets the mission objectives and constraint boundaries: Rule A allows attack, Rule B prohibits attack under the same conditions; Handling strategy: adjudicate according to the priority of "law / doctrine > combat mission > tactical preference"; If it fails, proceed to rule arbitration and version revision.
[0044] It is understandable that after the rule constraints pass all validations, the validated formal rules can be formally integrated and bound to the corresponding tool metadata definition, becoming part of the tool's executable logic.
[0045] In this way, the rule constraints can be systematically embedded into the preset tools, ensuring from a technical perspective that the tool calls and output results meet the specifications.
[0046] Specifically, based on the task feature vector and the tool capability vectors corresponding to multiple preset tools, the target tool and the target tool invocation sequence are determined, including: Based on the matching degree between the task feature vector and the tool capability vectors corresponding to multiple preset tools, multiple candidate tools are determined from the multiple preset tools; Fitness is constructed based on the matching degree between the tool call sequence and the task feature vector. The tool call sequence composed of candidate tools is used as an individual. Based on the genetic algorithm, the target tool call sequence and the target tool are determined. In each iteration, after generating a new population, the individuals in the new population are verified to meet the rule constraints.
[0047] For example, the matching degree between the task feature vector and the tool capability vector corresponding to the preset tool can be determined by the following formula: in, Represents the relationship between the task feature vector T and the i-th preset tool. The degree of matching between them; This represents the task feature vector T and the tool capability vector corresponding to the i-th preset tool. The capability similarity can be a weighted cosine similarity in terms of computing power, domain coverage, and data processing capabilities, with a value range of [0,1]. The calculation method can be as follows: First, map the task requirement vector RT=[req] from T. compute ,req domain ,req data Extract the corresponding capability subvector [cap] from the tool capability vector corresponding to the i-th preset tool. compute ,cap domain , cap data After normalizing both, the weighted cosine similarity formula is used for calculation; in the task requirement vector RT, req compute The intensity of the current task's demand for tool computing power / processing scale (which can be determined based on t) complexity and t phase Based on a pre-defined mapping table, the required computational power of the tool is quantified as req. compute ); reqdomain The scope of expertise to which the current mission belongs (such as firepower, intelligence, logistics, etc.) can be directly determined by t. type Based on a preset mapping table, for example, t type For firepower strikes, mapped to req domain (For firepower area); req data The data type, precision, or data volume (t) required by the current task for the tool to handle. data Meta-features (dimension, type, source, granularity, etc.) can be directly derived from t. data The mapping is based on a preset mapping table to obtain req. data ).
[0048] RuleCompliance(T,Tool i The expression () represents the proportion of the i-th preset tool that satisfies the rule constraints embedded in its metadata under the current task context, with a value range of [0,1]. The calculation method is as follows: Let Ri be the set of rule constraints embedded by the i-th tool. Determine whether each rule is valid under the current task. The ratio of the number of satisfied rules to the total number of applicable rules is RuleCompliance(T,Tool) i ); HistoryPerformance(T,Tool i The value of `HistoryPerformance(T,Tool)` represents the weighted average of the quality scores of the i-th preset tool in historical tasks similar to the current task, with a value range of [0,1]. The calculation method is as follows: The historical task records of the tool are obtained from the historical call log. The similarity between the current task and historical tasks (i.e., the similarity between the current task feature vector and the historical task feature vector) is used as the weight to calculate the weighted average of the quality scores corresponding to the historical tasks, resulting in `HistoryPerformance(T,Tool)`. i (); The default value of 0.5 is used when there is no history record.
[0049] α, β, γ are weighting coefficients that satisfy α + β + γ = 1.
[0050] It is understandable that α corresponds to the core competency matching item, which has the highest weight and ensures that "whether the task can be completed" takes priority; β corresponds to secondary indicators such as efficiency or resources, which reflect "whether it is completed well"; γ corresponds to auxiliary or preference indicators, which are used to differentiate in the case of a tie.
[0051] For example, after obtaining the matching degree between the task feature vector and the tool capability vectors corresponding to all preset tools, tools with a matching degree greater than the preset matching degree threshold can be identified as candidate tools.
[0052] For example, a set of tool call sequences can be initialized as an initial population, with each tool call sequence being an individual; Calculate the fitness value for each individual; let the tool call sequence be S=[Tool1,Tool2,...,Tool...]. m If the task feature vector is T, then the fitness (S,T) = Score_match(S,T) - Penalty(S,T), which means satisfying various constraints as much as possible while ensuring the task performance.
[0053] The task matching score Score_match(S,T) comprehensively evaluates the competence of the tool call sequence S for task T from three perspectives: capability coverage, domain matching, and data adaptation. The calculation method is: Score_match(S,T)=ω1·Cover(S,T)+ω2·DomainMatch(S,T)+ω3·DataAdapt(S,T). Where ω1, ω2, and ω3 are weighting coefficients, satisfying ω1 + ω2 + ω3 = 1; Cover(S,T) represents the capability coverage, taking the capability similarity (T,C) between each tool in sequence S and task T. tooli The arithmetic mean of (S,T) is Cover(S,T) = (1 / |S|)ΣSimilarity(T,C). tooli ); DomainMatch(S,T) represents the domain matching degree. Let D_T be the domain set required for the task feature vector T (given by t). type (Confirmed), the set of domains D_S covered by the tool call sequence S is the cap corresponding to each tool. domain If the union of the two sets is |D_S∩D_T| / |D_T|, then DomainMatch(S,T)=|D_S∩D_T| / |D_T|. DataAdapt(S,T) represents the data adaptation degree, assuming the task's data requirement is req. data (by t) data (Confirmed), the total data processing capacity of the tool call sequence S is the sum of the data processing caps of all candidate tools. data,S =Σcap data,i Then DataAdapt(S,T)=min(1, cap data,S / req data ).
[0054] The stronger the ability, the more relevant the field, and the more matched the data processing, the higher the Score_match(S,T) will be.
[0055] For example, ω1, ω2, and ω3 can be dynamically pre-configured according to the task type. For instance, in an emergency strike mission (time-sensitive), the most critical factor is whether the capability coverage can "complete the mission," followed by domain matching, while data adaptation requirements are relatively lenient. Therefore, ω1=0.6, ω2=0.3, and ω3=0.1 can be used. In a routine intelligence analysis mission (accuracy-sensitive), data adaptation capability (i.e., the types and precision of data that the tool can handle) is more important. Therefore, ω1=0.3, ω2=0.3, and ω3=0.4 can be used.
[0056] The constraint violation penalty Penalty(S,T) is the sum of penalties calculated after checking each tool call sequence S for violations of constraints such as time, resources, and execution order. It is calculated as: Penalty(S,T) = Σpen(c j ,S,T); Among them, c j Denotes the j-th constraint, including c time c resource c order ; pen(c time ,S,T)=w time ·max(0,(Σcost time,i -t limit ) / t limit ), pen(c time S,T) represents the time constraint penalty, and cost is... time,i Let t be the processing time of the i-th preset tool. limit The time limit represents the maximum allowed total time for the task, denoted by t. priority and t phase Common constraints; t limit Specifically, it can be determined using the following formula: t limit = BaseTime(t phase ) / PriorityFactor(t priority ) Where BaseTime(t) phase ) represents the baseline time consumed during the planning phase (e.g., situation assessment baseline = 300s), PriorityFactor(t) priority ) represents the priority acceleration factor (e.g., priority P1=5, priority P2=2, priority P3=1). The higher the priority, the larger the factor. pen(c resource ,S,T)=w resource ·max(0,(Σcost resource,i -r limit ) / r limit), pen(c resource S,T) represents the resource constraint penalty, and cost is... resource,i r represents the processing resource consumption of the i-th preset tool. limit Due to resource constraints; r limit Specifically, it can be determined using the following formula: r limit = R_system × ResourceRatio(t priority ) Where R_system represents the total system resources, ResourceRatio(t) priority The resource quota coefficient corresponds to the priority level. The higher the priority, the more resources can be accessed.
[0057] pen(c order S,T) represents the execution order constraint penalty, where tool in sequence S is penalized. a Prior to tool b The call but the rule constraints require tool b Prior to tool a When, take pen(c) order ,S,T)=w order Otherwise, take pen(c) order ,S,T)=0; w time w resource w order Each constraint has a penalty weight, with core constraints having a larger weight, and these can be dynamically pre-configured based on the task type.
[0058] For example, taking the task as "emergency fire strike mission" (tpriority=P1, tphase=fire execution phase) as an example, the timeliness of this task is the core constraint, followed by resource consumption, and the execution order is relatively lenient. Therefore, the three penalty weights are: w time = 0.6, w resource = 0.3, w order = 0.1 The final time constraint penalty, resource constraint penalty, and execution order constraint penalty are summed and summarized as Penalty(S,T).
[0059] After each iteration, individuals with high fitness are selected, and new individuals are generated through crossover and mutation to expand the search range and improve the quality of solutions. The population is updated accordingly, and the iteration continues until the termination condition is met (such as the upper limit of the number of iterations or convergence of the optimal value). At the same time, after generating a new population in each iteration, the individuals in the new population are verified to meet the rule constraints, and invalid solutions that do not meet the rule constraints are eliminated.
[0060] Finally, the individual with the highest fitness is returned as the optimal tool scheduling scheme, i.e., the target tool invocation sequence.
[0061] S204. Standardize the original task data to obtain the standard input matrix.
[0062] Specifically, the original task data is standardized to obtain a standard input matrix, including: Determine the target transformation process based on the data type of the original task data; The original task data is processed based on the target transformation process to obtain the standard input matrix.
[0063] For example, classifying the original task data can yield different types of data. Different transformation methods can be applied to different types of data, and the transformed data can be matched to the corresponding template format for output to obtain the standard input matrix.
[0064] For example, the data types of the raw task data can include natural language data (i.e., the acquired user planning instructions), structured data, geospatial data, time-series data, and multimedia data; the target transformation process corresponds one-to-one with the data types, as shown in the following example: 1. Semantic extraction from natural language descriptions: Unstructured textual information (such as combat orders and intent descriptions) can be received first. Using natural language processing technology, the large model will semantically decompose the text, identify key entities (such as unit numbers), actions (such as maneuvering and attacking), and constraints, transforming it from "sensory text" into "rational instructions".
[0065] 2. Structured Data Parsing and Mapping: For well-organized data already existing in JSON or XML format (such as asset lists and equipment parameters reported by friendly forces), it can be directly read using a predefined protocol parser. The parser first identifies the data source and protocol version, then extracts key information according to preset field templates and maps it uniformly to internal system data objects. During this process, the system automatically completes standardization processing such as field alias conversion, unit conversion, time format unification, status code translation, and coordinate transformation. If there are missing fields, they can be filled in by default according to rules; if there are outliers or logical conflicts, consistency checks can be triggered and alarm information can be output. For multi-source reported data of the same object, it can be merged according to credibility and time freshness, generating a unique and reliable result before being stored in the database for direct use by the subsequent rule engine and scheduling module. Through this mechanism, high-fidelity and semantically consistent data docking between external databases and preset tools can be achieved. This step ensures that data communication between external databases and preset tools can achieve "zero-loss" docking.
[0066] 3. Environmental Modeling of Geospatial Data: Automatically integrate Geographic Information System (GIS) data, including topography, elevation, road networks, and obstacles. This data is transformed into the spatial coordinate system required for computation by pre-defined tools. For example, mountains on a map are transformed into "impassable areas" constraints in agent path planning.
[0067] 4. Dynamic step-by-step processing of time-series data: Event evolution is a process that progresses over time, and this can process sequence data containing timestamps (such as the scheduled initiation time and expected arrival time). Through time-series analysis, a logical "timeline" is provided for the simulation engine, ensuring that all preset tools are synchronized during collaborative simulations and meet the predetermined time window requirements.
[0068] 5. Feature Fusion of Multimedia Data: For data transmitted from sensors such as images, videos, or audio, core features are extracted using computer vision or speech recognition algorithms. For example, the location of cover can be identified from reconnaissance photos and converted into a situational feature vector, which is then added to the current battlefield situation map. The situational feature vector can be composed of quantitative indicators such as target location, quantity density, motion parameters, recognition confidence, degree of obstruction and exposure, damage status, sound source event characteristics, and information timeliness.
[0069] In some possible embodiments, after obtaining the standard input matrix, parameter integrity verification is performed on the standard input matrix; if the standard input matrix does not meet the parameter integrity requirements, parameter completion is performed on the standard input matrix.
[0070] For example, when some parameter fields in the standard input matrix are empty, relevant information can be extracted from other descriptions of similar tasks, the global situation library, and historical interactions based on the context of the large language model of the current user's planning instructions to fill in the empty fields; when it is not possible to infer from the context, general standard values in the knowledge base can also be called to fill in the regular and general parameters by default.
[0071] It should be noted that if empty fields still cannot be filled, you can interact with the user to ask questions.
[0072] In this way, the data integrity of the standard input matrix can be guaranteed.
[0073] S205. Based on the standard input matrix, the target tools are called sequentially according to the target tool call sequence to generate task planning results.
[0074] It is understandable that the standard input matrix includes all the original task data of the current task, and the data corresponding to the parameters required by the target tool can be extracted from the standard input matrix and input into the target tool.
[0075] For example, intelligence analysis tools require target area and time window parameters, while fire planning tools only require target coordinates, hardness level, available weapon list, range constraints, and other parameters. The corresponding parameter values can be extracted from the standard input matrix and input into the tool to obtain the mission planning results.
[0076] In some possible embodiments, based on the standard input matrix, the target tool is invoked sequentially according to the target tool invocation sequence to generate task planning results, including: Determine the output format of the task planning results based on the downstream task type; The task planning results are evaluated for quality. If the task planning structure does not meet the quality requirements, the task planning results are regenerated based on the target tools.
[0077] For example, downstream task types may include manual review, toolchain invocation, database storage, status display, etc.
[0078] For example, the output mode corresponding to manual review is a visual report, which may include charts and text descriptions; the output mode corresponding to toolchain invocation is structured data, which can be JSON / XML; the output mode corresponding to database storage is normalized records, which can be standard schemas; and the output mode corresponding to situation display is map annotation, which can be KML / GeoJSON.
[0079] For example, when the downstream task type is manual review, the chart type can be further refined according to the user level: the user level can include strategic level, campaign level, and tactical level, and the corresponding output formats are "summary view, key indicators and trends", "comprehensive view, main data and charts", and "detailed view, complete data and details", respectively.
[0080] For example, the quality of task planning results can be evaluated using the following formula: In the formula, Quality(Output) represents the overall quality score of the output result; a higher value indicates better output quality. Completeness represents completeness, measuring whether the output covers all elements required by the task, such as whether the operational plan includes necessary fields such as objectives, timing, troop strength, and support. The calculation method is as follows: Let the task type be t. type The corresponding set of necessary content elements is F_req={f1,f2,...,f n}(f nLet F_out represent the set of elements already included in the output result Output. Then, Completeness = |F_out∩F_req| / |F_req|. Accuracy represents the accuracy, used to measure whether the output content is consistent with the battlefield situation, knowledge base, and constraints, and whether there are any errors or contradictions. The calculation method is: Accuracy = η1·SituationMatch + η2·KnowledgeMatch + η3·ConstraintMatch, where SituationMatch is the consistency rate between the output field and the battlefield situation data, KnowledgeMatch is the matching rate between the output content and the facts in the knowledge base, and ConstraintMatch is the consistency rate between the output field and the battlefield situation data. To output the satisfaction rate of the embedded rule constraints, η1+η2+η3=1; Readability represents readability, measuring whether the output is clear, whether the structure is reasonable, and whether it is easy for commanders to understand and use. The calculation method is: Readability=ξ1·StructureScore+ξ2·ClarityScore. StructureScore is scored based on the completeness of the output hierarchical structure and the standardization of field organization. ClarityScore is scored based on terminology consistency, conciseness of expression, and the proportion of ambiguous sentences. ξ1+ξ2=1; α1, α2, and α3 are the weight coefficients of the three dimensions, satisfying α1+α2+α3=1. The emphasis can be adjusted according to the task type (e.g., in urgent wartime scenarios, α2 accuracy has a greater weight).
[0081] For example, the rule verification process for each tool call can be recorded, along with detailed execution logs, making the entire planning process fully traceable. This allows users to clearly understand the basis and process of each decision, enhancing the system's transparency and credibility.
[0082] For example, during task execution, the execution status, output quality, and resource usage of each tool can be continuously monitored; when an anomaly occurs or the target deviates, a dynamic scheduling and adjustment mechanism is triggered to reconstruct the subsequent toolchain online (e.g., replacing failed tools or supplementing tools when quality is insufficient), ensuring task continuity and result availability.
[0083] This application determines the task feature vector and original task data based on user planning instructions; determines the target tool and target tool call sequence based on the task feature vector and the tool capability vectors corresponding to multiple preset tools, and can determine the target tool and target tool call sequence based on the matching degree between the capabilities of the preset tools and the user's expected task; standardizes the original task data to obtain a standard input matrix; and calls the target tools sequentially according to the target tool call sequence based on the standard input matrix to generate task planning results. The standard input matrix can be used to eliminate data heterogeneity differences, ensure global semantic consistency, and improve the output quality of the target tool for task planning.
[0084] Based on the same inventive concept, this application also provides a task planning device based on large model MCP for implementing the above-mentioned task planning method based on large model MCP. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the task planning device based on large model MCP provided below can be found in the limitations of the task planning method based on large model MCP above, and will not be repeated here.
[0085] In one exemplary embodiment, such as Figure 3 As shown, a task planning device based on large model MCP is provided, comprising: Module 301 is used to acquire user planning instructions; The determination module 302 is used to determine the task feature vector and the original task data according to the user's planning instructions; and to determine the target tool and the target tool call sequence according to the task feature vector and the tool capability vectors corresponding to multiple preset tools. Processing module 303 is used to standardize the raw task data to obtain a standard input matrix; Module 304 is used to call the target tools sequentially according to the target tool call sequence based on the standard input matrix, and generate task planning results.
[0086] The specific implementation methods and beneficial effects of this device embodiment can be found in the foregoing method embodiments, and will not be repeated here.
[0087] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 4As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements the aforementioned task planning method based on the large model MCP.
[0088] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0089] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0090] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0091] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0092] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0093] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0094] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0095] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0096] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A task planning method based on large model MCP, characterized in that, The task planning method based on large model MCP includes: Obtain user planning instructions; Based on the user's planning instructions, determine the task feature vector and the original task data; Based on the task feature vector and the tool capability vectors corresponding to multiple preset tools, the target tool and the target tool invocation sequence are determined; The original task data is standardized to obtain a standard input matrix; Based on the standard input matrix, the target tools are invoked sequentially according to the target tool invocation sequence to generate task planning results.
2. The task planning method based on large model MCP according to claim 1, characterized in that, The metadata definitions of the multiple preset tools contain embedded rule constraints, which are determined according to the business rules corresponding to the preset tools. These rule constraints are used to indicate the collaborative relationship between the multiple preset tools.
3. The task planning method based on large model MCP according to claim 2, characterized in that, The step of determining the target tool and the target tool invocation sequence based on the task feature vector and the tool capability vectors corresponding to multiple preset tools includes: Based on the matching degree between the task feature vector and the tool capability vectors corresponding to multiple preset tools, multiple candidate tools are determined from the multiple preset tools; Fitness is constructed based on the matching degree between the tool call sequence and the task feature vector. The tool call sequence composed of candidate tools is used as an individual. Based on the genetic algorithm, the target tool call sequence and the target tool are determined. In each iteration, after generating a new population, the individuals in the new population are verified to meet the rule constraints.
4. The task planning method based on large model MCP according to claim 1, characterized in that, After obtaining the standard input matrix, the parameter integrity of the standard input matrix is verified. When the standard input matrix does not meet the parameter integrity requirements, parameter completion is performed on the standard input matrix.
5. The task planning method based on large model MCP according to claim 1, characterized in that, The step of generating task planning results by sequentially invoking target tools according to the target tool invocation sequence based on the standard input matrix includes: Determine the output format of the task planning results based on the downstream task type; The task planning results are evaluated for quality. If the task planning structure does not meet the quality requirements, the task planning results are regenerated based on the target tools.
6. The task planning method based on large model MCP according to claim 1, characterized in that, The standardization process for the original task data to obtain a standard input matrix includes: The target transformation process is determined based on the data type of the original task data; The original task data is processed based on the target transformation process to obtain the standard input matrix.
7. A task planning device based on large model MCP, characterized in that, The task planning device based on large model MCP includes: The acquisition module is used to acquire user planning instructions; The determination module is used to determine the task feature vector and the original task data according to the user's planning instructions; and to determine the target tool and the target tool call sequence according to the task feature vector and the tool capability vectors corresponding to multiple preset tools. The processing module is used to standardize the original task data to obtain a standard input matrix; The calling module is used to call the target tools sequentially according to the target tool calling sequence based on the standard input matrix, and generate task planning results.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the task planning method based on large model MCP as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the task planning method based on large model MCP as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the task planning method based on large model MCP as described in any one of claims 1-6.
