An interaction protocol for automatic sub-agent decomposition in a multi-agent scenario
By constructing modules such as a tag structure set and a sequence behavior deduction module, a logically constrained interaction protocol is generated, which solves the problem that traditional interaction protocols cannot identify state evolution and feedback changes, and achieves efficient task execution and semantic structure stability in multi-agent scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN JINIU SOFTWARE TECH CO LTD
- Filing Date
- 2026-04-22
- Publication Date
- 2026-05-26
AI Technical Summary
In traditional multi-agent scenarios, the interaction protocol for automatic sub-agent decomposition is established by static configuration. The interaction logic is fixed and cannot identify the dynamic changes in state evolution and feedback conditions during task execution. This leads to a deviation between the protocol content and the actual task progress, making it difficult to cope with the problems of variable task paths and overlapping control behaviors in complex systems.
By constructing a tag structure set, a sequence behavior deduction module, an action statement definition module, a protocol content arrangement module, and an instruction resource archiving module, an interactive protocol with logical constraints is generated. This enables the field decomposition and structural mapping of status identifiers, ensuring the accurate definition of the semantic expression of task control instructions and the status mapping structure, and optimizing the order adjustment of action elements and feedback fields.
It enhances the protocol adaptability and semantic structure stability during multi-task advancement, ensures that the protocol content has efficient execution and functional consistency, and improves the system's linkage capability.
Smart Images

Figure CN122086362A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software engineering design technology, and in particular to an interaction protocol for automatically decomposing sub-agents in a multi-agent scenario. Background Technology
[0002] The field of software engineering design technology involves the systematic design and implementation of the structure, development process, operation mechanism, and interaction methods of software systems. Its core aspects include software system architecture design, program structure optimization, component collaboration mechanisms, interface protocol settings, debugging and testing process design, functional module integration methods, and software lifecycle management. This field emphasizes the logical division of software functions, orderly collaboration between components, goal-oriented behavioral modeling, and protocol formulation, particularly focusing on the standardization and execution methods of communication protocols, data exchange rules, and response mechanisms required for multi-component collaborative operation in complex systems. Specifically, the interaction protocol for automatic sub-agent decomposition in traditional multi-agent scenarios refers to the process of generating and executing interaction protocols when the main agent receives a task and needs to decompose and assign it to sub-agents for execution in a system containing multiple intelligent agents. In the traditional approach, the breakdown of this task relies heavily on a manually preset rule system. In the early stages of design, the number of sub-Agents, functional boundaries, and responsibility allocation strategies are set manually. Then, static configuration files or scripting languages are used to clarify the interaction statement structure, triggering conditions, and response process between the main agent and each sub-Agent, thereby completing the communication content settings and protocol constraints required for task allocation and coordination.
[0003] Existing technologies establish interactive statement structures through static configuration, resulting in fixed interactive logic and a single state response path. This makes it impossible to recognize the diversity of state evolution and dynamic changes in feedback conditions during task execution, leading to discrepancies between the protocol content and the actual task progress. The interactive content lacks structural hierarchy and evolutionary mechanism support, making it difficult to cope with the operational requirements of complex systems with changing task paths and overlapping control behaviors. Frequent occurrences of state disconnection, control conflicts, and feedback mismatches during the task process result in a lack of clear logical chain guarantees in the collaborative process, limiting the system's linkage capabilities. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide an interaction protocol for automatically decomposing sub-agents in a multi-agent scenario. One aspect of this protocol is an interaction protocol for automatically decomposing sub-agents in a multi-agent scenario, comprising: The tag structure construction module extracts the status identifier entries registered in the main Agent configuration list, constructs a status attribute table based on the stage number, operation type tag, and feedback result tag, and constructs the field structure corresponding to each status identifier to generate a tag structure set; The sequence behavior deduction module reads the tag structure set, constructs a state transition sequence according to the time order in the main Agent task execution process, determines whether the attribute change path between consecutive state identifiers constitutes the task advancement process, and generates a path mapping list. The action statement definition module calls the path mapping list to perform semantic description of each type of control behavior, analyzes the structural differences between operation instructions and status identifiers in the control semantics, and generates a set of interactive action statements. The protocol content orchestration module reads the set of interactive action statements, adjusts the order of action symbols, target identifiers and feedback requirements in the operation field, filters out statement combination structures that do not conform to the preset main Agent call standard, and generates a set of protocol content fragments. The instruction resource archiving module reads the protocol content fragment set, establishes a correspondence record table between semantic structure and function type name, and generates a protocol semantic resource catalog.
[0005] As a further embodiment of the present invention, the tag structure set includes a stage number field, an operation type tag, a feedback result tag, an execution sequence mapping tag, and a field classification tag; the path mapping list includes attribute change paths, state connection logic, and time sequence links; the interactive action statement set includes control behavior categories, operation instruction semantics, state mapping structures, and semantic difference types; the protocol content fragment set includes an action symbol field, a target identifier field, a feedback requirement field, and a statement combination structure; and the protocol semantic resource directory includes semantic structure units, function type names, and a mapping record table.
[0006] As a further aspect of the present invention, the main agent invocation standard refers to the standardized invocation rules that the main agent should conform to when executing tasks regarding the structure, parameters, and feedback requirements of action statements.
[0007] As a further aspect of the present invention, the task advancement process refers to the execution path formed by the continuous attribute changes of the status identifier over time.
[0008] As a further aspect of the present invention, the tag structure construction module includes: The status field extraction submodule extracts three types of field content—stage number, operation type label, and feedback result label—based on the status identifier entries registered in the main Agent configuration list. It then categorizes these fields according to their type to generate three sets of status fields. The state structure generation submodule calls the three types of state field sets, uses the stage number field as an index, and combines the operation type label and feedback result label according to the field position to generate a state attribute field structure set; The tag structure mapping submodule uses the state attribute field structure set and the execution sequence and preset field classification mapping rules to tag the fields, mark the tag content of the state identifier, and obtain the tag structure set.
[0009] As a further aspect of the present invention, the sequence behavior derivation module includes: The time series construction submodule obtains the field classification tags in the tag structure set, arranges the status identifier entries according to the time order in the main Agent task execution process, establishes a status identifier set based on the sequential arrangement, and generates a task status time series sequence. The state change discrimination submodule calls the field classification markers of adjacent state identifiers in the task state time sequence, compares the field contents of consecutive states item by item, and judges whether there is a break in the attribute change path based on the differences in field categories and the continuity of stage numbers, and obtains the state change consistency discrimination value. The path mapping generation submodule extracts state pairs that constitute a logically coherent progression relationship in the task state time sequence based on the state change consistency discrimination value, and performs structural mapping on the field change paths between corresponding state identifiers to obtain a path mapping list.
[0010] As a further aspect of the present invention, the action statement definition module includes: The semantic behavior extraction submodule calls the state mapping path in the path mapping list, classifies and identifies the control behavior types in the path, associates each type of control behavior with the corresponding state change, and generates a control semantic mapping structure set. The structural difference analysis submodule compares the field structure type, number of fields and arrangement position of the field structure based on the operation instruction field and state mapping field content of the centralized control behavior of the control semantic mapping structure, identifies the inconsistency in the structural layout of the two types of field sets, and obtains the semantic structure difference factor. The statement set generation submodule performs field completion and position adjustment processing on the preset control behavior semantic template based on the semantic structure difference factor, constructs a unified action description statement that meets the structure matching requirements, and reconstructs the statements of all control behaviors to obtain an interactive action statement set.
[0011] As a further aspect of the present invention, the protocol content arrangement module includes: The operation field adjustment submodule obtains the operation content fields in the set of interactive action statements, rearranges the action symbols, target identifiers and feedback requirements in the fields according to the field order, and generates a rearranged operation field sequence by combining the rearrangement logic based on the importance scoring criteria of the action symbols, target identifiers and feedback requirements fields according to preset rules. The standard filtering submodule is invoked to compare the action structure of the statement combinations in the rearranged operation field sequence with the field structure specifications set in the main agent calling standard, and filter out field combinations that do not conform to the preset semantic matching rules one by one to obtain the standard conforming statement index set. The protocol fragment generation submodule calls the statement combination identified by the standard conforming statement index set, extracts the corresponding content fragment from the interactive action statement set, and rearranges and combines the statement fragments according to the calling order number to obtain the protocol content fragment set.
[0012] As a further aspect of the present invention, the instruction resource archiving module includes: The semantic structure extraction submodule obtains all statement structures in the protocol content fragment set, extracts action symbols, target identifiers, and feedback requirements from the statements, and performs structural induction on the combination relationships to generate a list of semantic field combinations. The function type mapping submodule retrieves the main agent function type name that matches the structure pattern according to the field configuration of the semantic structure in the semantic field combination list, establishes the corresponding record relationship between the field structure and the function name, and obtains the semantic function correspondence table. The resource catalog generation submodule calls the data items recorded in the semantic function corresponding table, categorizes the semantic structure by function type, catalogs it, forms a multi-level semantic resource classification format, and obtains the protocol semantic resource catalog.
[0013] As a further aspect of the present invention, the structural induction of the combination relationship refers to obtaining a general structural pattern based on the combination method of elements in the statement.
[0014] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: By decomposing and mapping the state identifiers in the main agent's task flow, constructing a state transition sequence based on time sequence, and determining the coherence of attribute change paths, a logically constrained behavior chain can be formed. Through classification and labeling, the semantic expression of task control instructions and the precise definition of state mapping structures can be achieved. Furthermore, the order of action elements and feedback fields can be optimized and the structure filtered to ensure that the instruction statements have unified logic and response adaptability, and that the protocol content has efficient execution and consistent support for functional correspondence. At the same time, the protocol adaptability and semantic structure stability in the process of multi-task advancement are enhanced. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0016] Figure 1 This is a system flowchart of the present invention; Figure 2 This is a schematic diagram of the framework of the present invention; Figure 3 This is a flowchart of the tag structure construction module in this invention; Figure 4 This is a flowchart of the sequence behavior derivation module in this invention; Figure 5 This is a flowchart of the action statement definition module in this invention; Figure 6 This is a flowchart of the protocol content arrangement module in this invention; Figure 7 This is a flowchart of the instruction resource archiving module in this invention. Detailed Implementation
[0017] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0018] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0019] This invention provides an interaction protocol for automatically decomposing sub-agents in a multi-agent scenario, such as... Figure 1-2 The diagram shown illustrates the interaction protocol for automatic sub-agent decomposition in a multi-agent scenario, including: The tag structure construction module extracts the status identifier entries registered in the main Agent configuration list, constructs a status attribute table according to the three fields of stage number, operation type tag, and feedback result tag in the task flow, constructs the field structure corresponding to each status identifier in the status attribute table, and outputs a tag structure set by executing sequence mapping tag and field classification tag; The sequence behavior deduction module reads the field classification tags in the tag structure set, arranges them in the time order of the main Agent task execution process to construct a state transition sequence, determines whether the attribute change paths between consecutive state identifiers constitute a logically coherent task advancement process, and outputs a path mapping list. The action statement definition module calls a path mapping list, provides a unified semantic description for each type of control behavior, analyzes the structural differences between operation instructions and state mapping in control semantics, and outputs a set of interactive action statements. The protocol content orchestration module reads the operation content field from the set of interactive action statements, adjusts the order of action symbols, target identifiers, and feedback requirements included in the operation field, filters statement combination structures that do not conform to the preset main Agent call standard, and outputs a set of protocol content fragments. The instruction resource archiving module reads all semantic structure information from the protocol content fragment set, establishes a one-to-one correspondence record table between semantic structure and function type name, and outputs the protocol semantic resource catalog.
[0020] The tag structure set includes a stage number field, operation type tag, feedback result tag, execution sequence mapping tag, and field classification tag. The path mapping list includes attribute change paths, state connection logic, and time sequence links. The interactive action statement set includes control behavior categories, operation instruction semantics, state mapping structure, and semantic difference types. The protocol content fragment set includes action symbol fields, target identifier fields, feedback requirement fields, and statement combination structures. The protocol semantic resource directory includes semantic structure units, function type names, and mapping record tables.
[0021] Specifically, such as Figure 2 , 3 As shown, the tag structure building module includes: The status field extraction submodule extracts three types of field content—stage number, operation type label, and feedback result label—based on the status identifier entries registered in the main Agent configuration list. It then categorizes these fields according to their type to generate three sets of status fields. A dedicated read channel is established with the main Agent configuration manifest database, initiating a line-by-line scanning process for the raw configuration data. Using a pre-defined character stream parser, delimiters (such as semicolons or newlines) are identified in the configuration manifest, segmenting the continuous unstructured text stream into independent configuration entry units. For each configuration entry, advanced pattern matching based on regular expressions is performed: first, the keyword "Stage_ID" is located using anchor points, and the following hexadecimal or decimal value is read to establish it as the stage number; second, the identifier "Op_Type" is searched, and its associated string description, such as "Auth_Check" or "Data_Sync," is extracted to establish it as the operation type label; third, the "Feedback_Res" field is located, and the following status code, such as "200_OK" or "404_Error," is captured to establish it as the feedback result label. After extracting the above field content, three independent dynamic array spaces are allocated in memory, and the data is classified and stored according to the data type of the field (numeric, string, and enumeration). The extracted data is then written into the stage number set, operation type set, and feedback result set in sequence, thereby generating three sets of status fields in memory.
[0022] The state structure generation submodule calls three types of state field sets, using the stage number field as an index, and combines the operation type label and feedback result label according to the field position to generate a state attribute field structure set; First, the set of stage numbers is traversed, and a hash bucket address is assigned to each unique stage number as the primary index key. Based on the synchronous mapping of array indices, the operation type label and feedback result label at the same index position are read in parallel from the operation type set and the feedback result set. A composite data structure is constructed within each hash bucket, containing two pointers: a "preceding operation field" and a "following feedback field," pointing to the memory addresses of the read operation type label and feedback result label, respectively. Through pointer linking, the operation type and feedback result are physically combined according to field position and mounted under the corresponding stage number index, completing the transformation from discrete data to a structured object and generating a set of state attribute field structures.
[0023] The tag structure mapping submodule uses the execution sequence and preset field classification mapping rules to tag the fields according to the state attribute field structure set, annotates the tag content of the state identifier, and obtains the tag structure set. The process iterates through each struct object in the state attribute field structure set, reading the operation type text and feedback result code. A binary search algorithm is used to retrieve a standardized tag code that perfectly matches the current text content from the mapping table; for example, "Auth_Check" is mapped to "L_AUTH_01", and "200_OK" is mapped to "RES_POS". Once a match is found, an in-place replacement operation is performed, overwriting the original text content with the standardized tag code. Next, according to the "stage-action-feedback" hierarchy defined in the execution sequence logic library, metadata tags are added to each replaced struct, clarifying its logical attributes throughout the task's lifecycle. Finally, all processed structs are serialized into a unified JSON or XML format object to obtain the tag structure set.
[0024] Specifically, such as Figure 2 , 4 As shown, the sequence behavior derivation module includes: The time series construction submodule obtains the field classification tags in the tag structure set, arranges the status identifier entries according to the time order in the main Agent task execution flow, establishes a status identifier set based on the sequential arrangement, and generates a task status time series sequence. First, each object in the tag structure set is scanned, and the timestamp information carried in the object header is parsed. A red-black tree-based sorting container is initialized, and all state identifier entries are inserted into the container sequentially according to their timestamp values. During insertion, if two entries are found to have identical timestamp values, the logical sequence number field in the entry is further read, and a secondary sort is performed based on the sequence number to ensure the uniqueness of the logical order under physical time conflicts. After sorting, an inorder traversal is performed on the red-black tree, and all node data is output in chronological order, writing them sequentially into a doubly linked list. This linked list accurately reflects the time flow and state transitions in the main Agent task execution process, thus establishing a sequentially arranged set of state identifiers and generating a task state time sequence.
[0025] The state change discrimination submodule calls the field classification markers of adjacent state identifiers in the task state time sequence, compares the field contents of consecutive states item by item, and judges whether there is a break in the attribute change path based on the differences in field categories and the continuity of stage numbers, and obtains the state change consistency discrimination value. A sliding window analysis mechanism is initiated, with a window span of two nodes, scanning step-by-step along the task state time sequence. Within each scan step, the two adjacent state identifiers, i.e., the current state node and the next state node, are retrieved to obtain their field classification labels. The field contents between consecutive states are compared item by item, and numerical calculation logic is introduced to quantify the differences: First, the operation category feature values of the current state and the next state are obtained, the difference between them is calculated, and the absolute value is taken to obtain the operation category difference quantity; simultaneously, the stage sequence number values of the current state and the next state are obtained, the difference between them is calculated, and the absolute value is taken to obtain the stage continuity span quantity. Then, preset operation weight coefficients and stage weight coefficients are retrieved respectively, and the operation category difference quantity is multiplied by the operation weight coefficients to obtain the weighted operation difference value; the stage continuity span quantity is multiplied by the stage weight coefficients to obtain the weighted stage span value. Finally, the weighted operation difference value and the weighted stage span value are summed, and this summation result is used as the state change consistency judgment value. For example, in the system, the operation category feature value is obtained by the task type encoding module based on the preset behavior type table: such as "initialization" operation is 8, and "data synchronization" operation is 5. Then, when the current state is "initialization" and the next state is "data synchronization", the corresponding operation category feature value difference is 3; when the current state stage number is 100 and the next state stage number is 102, the stage continuity span is 2; the set operation weight coefficient is 0.6, and the stage weight coefficient is 0.4; substituting the values into the calculation logic: 3 multiplied by 0.6 equals 1.8, 2 multiplied by 0.4 equals 0.8, and finally 1.8 and 0.8 are added together to calculate the state change consistency discrimination value of 2.6.
[0026] The path mapping generation submodule extracts state pairs that constitute a logically coherent progression relationship in the task state time sequence based on the state change consistency judgment value, and performs structural mapping on the field change paths between corresponding state identifiers to obtain a path mapping list. Set a breakage threshold, for example, 5.0. Iterate through all the consistency discrimination values of state changes calculated in the above steps, and compare each discrimination value with the breakage threshold. If the discrimination value is less than or equal to the threshold, it is determined that there is a close logical continuity between the current adjacent state pairs, indicating that the attribute change path has not been broken; if the discrimination value is greater than the threshold, it is determined that the path is broken. For the state pairs determined to be continuous, extract their start state identifier and end state identifier, parse the specific changes in the field content between them, such as changing from "connecting" to "connected", and define this change as a valid field change path. Map and encapsulate all the extracted paths according to the topological structure of "source state - target state - changed content" to obtain a path mapping list.
[0027] Specifically, such as Figure 2 , 5 As shown, the action statement definition module includes: The semantic behavior extraction submodule calls the state mapping path in the path mapping list, classifies and identifies the control behavior types in the path, associates each type of control behavior with the corresponding state change, and generates a control semantic mapping structure set. The system invokes the path mapping list and, for each state mapping path recorded in the list, launches the natural language processing engine. It performs word segmentation on the path description text and uses part-of-speech tagging to identify verbs such as "configure," "send," and "verify," which serve as core vocabulary for control actions. A semantic classifier is constructed to categorize the identified control actions into preset behavior categories, such as "configuration," "transmission," or "verification." Subsequently, it scans the state change results in the path, establishing an association index between each type of control action and its directly caused state change, uniformly extracting the instruction semantic structure of "behavior subject - action type - affected object," and generating a control semantic mapping structure set.
[0028] The structural difference analysis submodule compares the field structure type, number of fields, and arrangement position of the operation instruction fields and state mapping fields of the centralized control behavior based on the control semantic mapping structure. It identifies the inconsistency in the structural layout of the two types of field sets and obtains the semantic structure difference factor. The system reads the control behavior operation instruction field of each record in the control semantic mapping structure set, and simultaneously reads the corresponding state mapping field content. A quantitative analysis is performed on the inconsistency in the structural layout of these two types of field sets to obtain the semantic structure difference factor. First, the total number of fields in the operation instruction field set and the total number of fields in the state mapping field set are counted, and the absolute value of the difference between these two totals is calculated to obtain the quantity deviation value. Next, the data types of corresponding fields in the two sets are compared one by one, such as integer, floating-point, and character, and the number of field pairs with inconsistent data types is counted to obtain the type mismatch value. Subsequently, the absolute value of the difference in the index position of the same semantic field in the two sets is calculated, and the absolute values of the index differences of all fields are accumulated to obtain the total position offset. Finally, the preset quantity weight factor, type weight factor, and position weight factor are obtained respectively, and multiplied by the quantity deviation value, type mismatch value, and total position offset value, respectively. The three product results are added together to obtain the final semantic structure difference factor. See Table 1. As shown in Table 1, based on the aforementioned textual logic: first, the quantity deviation value is calculated to be 2, which is the absolute value of 6 minus 4. Multiplying the quantity deviation value 2 by the quantity weighting factor 1.5 yields 3.0; multiplying the type mismatch value 2 by the type weighting factor 2.0 yields 4.0; multiplying the total positional offset value 5 by the position weighting factor 0.5 yields 2.5. Finally, adding these three intermediate results (3.0, 4.0, and 2.5) together, the semantic structure difference factor is calculated to be 9.5.
[0029] Table 1. Implementation Data of Semantic Structure Difference Analysis Parameter name Parameter values Data source / explanation Total number of operation instruction fields 6 System count acquisition Total number of status mapping fields 4 System count acquisition Type mismatch value 2 Item-by-item comparison statistics Total position offset 5 Index Difference Accumulation Quantity weighting factor 1.5 Preset experience value Type weight factor 2.0 Preset experience value Location weight factor 0.5 Preset experience value The statement set generation submodule performs field completion and position adjustment processing on the preset control behavior semantic template based on the semantic structure difference factor, constructs a unified action description statement that meets the structure matching requirements, and reconstructs the statements of all control behaviors to obtain the interactive action statement set. Based on the calculated semantic structure difference factor, the statement reconstruction strategy is dynamically adjusted. When the difference factor exceeds a preset reconstruction threshold, such as 8.0, a full reconstruction is required. A pre-defined control behavior semantic template library is invoked, and data is automatically completed from the global context variable pool based on missing fields identified in the difference analysis. For fields with positional offsets, the fields are rearranged according to the standard word order defined in the template. Using string concatenation technology, the adjusted fields are combined according to the subject-verb-object grammar rules to form a coherent natural language action description statement, such as "The main control unit has successfully adjusted the baud rate parameter of the target device to 9600". This reconstruction process is executed for all control behaviors to obtain a set of interactive action statements.
[0030] Specifically, such as Figure 2 ,6 As shown, the protocol content orchestration module includes: The operation field adjustment submodule obtains the operation content fields from the set of interactive action statements, rearranges the action symbols, target identifiers, and feedback requirements within the fields according to the field order, and generates a rearranged operation field sequence by combining the rearrangement logic based on the importance scoring criteria of the action symbols, target identifiers, and feedback requirements fields according to preset rules. A deep traversal mechanism is established for the set of interactive action statements. Each text object in the statement set is parsed, and named entity recognition technology is used to separate key elements in the operation content fields, labeling them as action symbols, target identifiers, or feedback requests. To ensure efficient protocol execution, a field priority reordering logic is introduced: First, a preset field type priority scoring table is read, which specifies the weight score for each type of field; for example, action symbols are worth 100 points, target identifiers are worth 80 points, and feedback requests are worth 50 points. The priority score for each field is calculated, and the fields are physically swapped and rearranged in the memory buffer according to their scores from highest to lowest. If two fields have the same score, their original relative order remains unchanged. After this reordering process, the generated reordered operation field sequence ensures that critical control instructions are always located at the header of the data packet, meeting the efficient parsing requirements of the main agent.
[0031] The standard filtering submodule is invoked to compare the action structure of the statement combinations in the rearranged operation field sequence with the field structure specifications set in the main agent's calling standard, and filter out field combinations that do not conform to the preset semantic matching rules one by one, thus obtaining a standard-compliant statement index set; Establish a real-time comparison channel with the main agent's standard database. Obtain each statement combination in the rearrangement operation field sequence and convert it into a standardized ASCII code stream. Call the field structure specifications set in the main agent's standard for each statement combination, including length limits, checksum rules, and forbidden word lists, and perform strict pattern matching verification against the current statement combination. During this process, execute specific filtering logic: for any statement combination, if its length exceeds the specification limit, or it contains characters from the forbidden word list, or the checksum calculation result is incorrect, the statement combination is determined to not conform to the preset semantic matching rules, and is directly marked as "invalid" and removed from the sequence. Conversely, if the statement combination passes all verification rules, it is marked as "valid," and its index position in the original sequence is recorded, generating a standard-compliant statement index set.
[0032] The protocol fragment generation submodule calls the combination of statements identified by the standard conforming statement index set, extracts the corresponding content fragments from the interactive action statement set, and rearranges and combines the statement fragments according to the call order number to obtain the protocol content fragment set; Based on the valid index numbers recorded in the standard conforming statement index set, the corresponding content fragments are accurately extracted from the set of interactive action statements. The original call sequence numbers corresponding to these fragments are read, reflecting the time logic of task execution. A merge sort algorithm is used to rearrange the extracted statement fragments according to the ascending order of the call sequence numbers. During the rearrangement process, standard protocol separators, such as carriage returns or line feeds, or specific hexadecimal separators, are inserted between adjacent statement fragments to concatenate the discrete fragments into a continuous protocol stream text, ultimately obtaining the protocol content fragment set.
[0033] Specifically, such as Figure 2 , 7 As shown, the instruction resource archiving module includes: The semantic structure extraction submodule obtains the structure of all statements in the protocol content fragment set, extracts the action symbols, target identifiers, and feedback requirements from the statements, and performs structural induction on the combination relationships to generate a list of semantic field combinations. Perform deep syntactic dependency analysis on the protocol content fragment set. Load the dependency parsing model and scan every character unit in the protocol fragment. Identify and extract action symbols representing specific operations, such as "WRITE" or "READ", specific target identifiers representing the operation object, such as "REG_01" or "SENSOR_A", and feedback requirements representing the expected response, such as "ACK" or "NACK". Analyze the dominance and subordination relationships of these elements in the sentence, constructing them into a tree-like topology structure where "action nodes point to target nodes, and target nodes point to feedback nodes". Traverse all fragments, summarize and deduplicate this topology, generating a list of semantic field combinations containing all unique structural patterns.
[0034] The function type mapping submodule retrieves the main agent function type name that matches the structure pattern based on the field configuration of the semantic structure in the semantic field combination list, establishes the corresponding record relationship between the field structure and the function name, and obtains the semantic function correspondence table. The field configuration format of this structure is parsed, such as "write command - address field - verification field", and used as the search key. A full database search is performed in the main Agent function type name database, and the cosine similarity between the field configuration format and the function description text is calculated. Here, a matching degree calculation logic is introduced: the field configuration format is converted into feature vector A, and the function type name description is converted into feature vector B. The cosine value of the angle between vector A and vector B is calculated. If the cosine value is greater than a preset matching threshold, such as 0.9, the two are considered to be successfully matched, and a one-to-one correspondence between the field structure and the function name, such as "parameter configuration function," is established. All established correspondences are written into a hash mapping table to obtain a semantic function correspondence table.
[0035] The resource catalog generation submodule calls the data items recorded in the semantic function corresponding table, classifies the semantic structure according to function type, and catalogs them to form a multi-level semantic resource classification format, thereby obtaining the protocol semantic resource catalog. First, all recorded function type names are scanned, deduplicated, and categorized to establish first-level directory nodes, such as "Configuration Commands," "Query Commands," and "Control Commands." Then, the specific semantic structure descriptions corresponding to each function type are treated as second-level child nodes and attached to the corresponding first-level directory nodes. A unique resource locator is assigned to each node, and the entire tree structure is serialized into a standard hierarchical document format, such as JSONSchema or XMLDTD. Finally, this document is output to obtain the protocol semantic resource directory, enabling systematic archiving and management of command resources.
[0036] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the technical solution.
Claims
1. An interactive protocol for automatic disassembly of sub-agents by an agent in a multi-agent scenario, characterized in that, The application relates to a main Agent task protocol construction method, which comprises the following steps: A label structure construction module extracts state identification items registered in a main Agent configuration list, constructs a state attribute table according to stage numbers, operation type labels and feedback result labels, constructs a field structure corresponding to each state identification, and generates a label structure set; A sequence behavior derivation module reads the label structure set, constructs a state migration sequence according to a time sequence in a main Agent task execution process, judges whether an attribute change path between continuous state identifications constitutes a task promotion process, and generates a path mapping list; An action statement definition module calls the path mapping list, semantically describes each type of control behavior, analyzes structural differences between operation instructions and state identifications in control semantics, and generates an interactive action statement set; A protocol content arrangement module reads the interactive action statement set, sequentially adjusts action symbols, target identifications and feedback requirements in operation fields, screens statement combination structures that do not conform to preset main Agent calling standards, and generates a protocol content fragment set; An instruction resource archiving module reads the protocol content fragment set, establishes a corresponding record table between semantic structures and function type names, and generates a protocol semantic resource directory.
2. The interactive protocol for agent to automatically disassemble sub-agent in multi-agent scenario according to claim 1, characterized in that: The label structure set comprises stage number fields, operation type labels, feedback result labels, execution sequence mapping marks and field classification marks; the path mapping list comprises attribute change paths, state connection logics and time sequence links; the interactive action statement set comprises control behavior categories, operation instruction semantics, state mapping structures and semantic difference types; the protocol content fragment set comprises action symbol fields, target identification fields, feedback requirement fields and statement combination structures; and the protocol semantic resource directory comprises semantic structure units, function type names and mapping record tables.
3. The interactive protocol for agent to automatically disassemble sub-agent in multi-agent scenario according to claim 1, characterized in that: The main Agent calling standard refers to standardized calling rules that should be met by the structure, parameters and feedback requirements of action statements when the main Agent executes a task.
4. The interactive protocol for agent to automatically disassemble sub-agent in multi-agent scenario according to claim 1, characterized in that: The task promotion process refers to an execution path formed by continuous attribute changes of state identifications with time.
5. The interactive protocol for agent automatic disassembly of subagents in a multi-agent scenario according to claim 1, wherein, The label structure construction module comprises: A state field extraction submodule extracts stage number fields, operation type labels and feedback result labels based on state identification items registered in a main Agent configuration list, classifies the three types of field contents according to field types, and generates three types of state field sets; A state structure generation submodule calls the three types of state field sets, takes stage number fields as indexes, combines operation type labels and feedback result labels according to field positions, and generates a state attribute field structure set; A label structure mapping submodule labels fields according to execution sequences and preset field classification mapping rules based on the state attribute field structure set, labels label contents of state identifications, and obtains a label structure set.
6. The interactive protocol for agent auto-decomposition of subagents in a multi-agent scenario according to claim 1, wherein, The sequence behavior derivation module comprises: A time sequence construction submodule obtains field classification marks in the label structure set, arranges state identification items according to a time sequence in a main Agent task execution process, establishes a state identification set based on the sequential arrangement, and generates a task state time sequence; The state change discrimination sub-module calls the field classification marks of adjacent state identifiers in the task state time sequence, compares the field contents between the continuous states item by item, judges whether the attribute change path is broken according to the field category difference and the stage number continuity, and obtains a state change consistency discrimination value; The path mapping generation sub-module extracts the state pairs constituting the logical coherent advancing relationship in the task state time sequence according to the state change consistency discrimination value, and performs structural mapping on the field change path between the corresponding state identifiers, to obtain a path mapping list.
7. The interactive protocol for agent auto-decomposition of subagents in a multi-agent scenario according to claim 1, wherein, The action statement definition module includes: The semantic behavior extraction sub-module calls the state mapping path in the path mapping list, classifies and identifies the control behavior types in the path, associates each type of control behavior with the corresponding state change, and generates a control semantic mapping structure set; The structure difference analysis sub-module compares the field structure type, field number and field arrangement position according to the operation instruction field and state mapping field content of the control behavior in the control semantic mapping structure set, identifies the inconsistency of the two field sets in the structure layout, and obtains a semantic structure difference factor; The statement set generation sub-module performs field completion and position adjustment processing on the preset control behavior semantic template according to the semantic structure difference factor, constructs a unified action description statement that meets the structure matching requirements, and reconstructs the statements for all control behaviors to obtain an interactive action statement set.
8. The interactive protocol for agent auto-decomposition of subagents in a multi-agent scenario according to claim 1, wherein, The protocol content arrangement module includes: The operation field adjustment sub-module obtains the operation content field in the interactive action statement set, rearranges the action symbols, target identifiers and feedback requirements in the field according to the field order, combines the importance scoring standard rearrangement logic of the action symbols, target identifiers and feedback requirement fields according to the preset rules, and generates a rearranged operation field sequence; The calling standard screening sub-module compares the action structure of the statement combination in the rearranged operation field sequence with the field structure specification set in the main Agent calling standard, screens out the field combinations that do not meet the preset semantic matching rules one by one, and obtains a standard conforming statement index set; The protocol fragment generation sub-module calls the statement combination identified by the standard conforming statement index set, extracts the corresponding content fragment from the interactive action statement set, and rearranges and combines the statement fragments according to the calling order number to obtain a protocol content fragment set.
9. The interactive protocol for agent auto-decomposition of subagents in a multi-agent scenario according to claim 1, wherein, The instruction resource archiving module includes: The semantic structure extraction sub-module obtains all the statement structures in the protocol content fragment set, extracts the action symbols, target identifiers and feedback requirement elements in the statements, and structures the combination relationship to generate a semantic field combination list; The function type mapping sub-module retrieves the main Agent function type name matched with the structure mode according to the field configuration form of the semantic structure in the semantic field combination list, establishes the corresponding record relationship between the field structure and the function name, and obtains a semantic function correspondence table; The instruction resource archiving module includes: The semantic structure extraction sub-module obtains all the statement structures in the protocol content fragment set, extracts the action symbols, target identifiers and feedback requirement elements in the statements, and structures the combination relationship to generate a semantic field combination list; The function type mapping sub-module retrieves the main Agent function type name matched with the structure mode according to the field configuration form of the semantic structure in the semantic field combination list, establishes the corresponding record relationship between the field structure and the function name, and obtains a semantic function correspondence table; The resource directory generating submodule calls the data items recorded in the semantic function corresponding table, classifies the semantic structure according to the function types, forms a multi-level semantic resource classification format, and obtains a protocol semantic resource directory.
10. The interactive protocol for agent to automatically disassemble sub-agent in multi-agent scenario according to claim 9, characterized in that: The structure induction on the combination relationship is to obtain a general structure mode according to the combination mode of the elements in the sentence.