Multi-agent cooperation-oriented task planning and knowledge sharing method and system
Patent Information
- Application Number
- CN202611099153.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-07-23
AI Technical Summary
但其知识共享主要围绕邻居网络和交通信号控制策略展开,未针对共享知识中的因果节点、因果边及动作类型建立置信度融合机制,也未将共享知识摘要与子任务依赖关系结合生成任务规划序列,因此难以适用于具有多类型子任务依赖、跨智能体经验复用和因果知识更新需求的协作任务规划场景
[0010]The beneficial effects of this invention are as follows, compared with the prior art: This invention resolves local experience trajectories into observed states, executed actions, and immediate reward values, and combines these with task objectives, task constraints, and subtask dependencies to form a correspondence between task semantics and historical execution experience; it constructs a local causal knowledge graph using state transition sample sets, occurrence frequencies, initial values of causal strength, and initial values of confidence, enabling agents to transform scattered experiences into quantifiable and traceable causal knowledge; it filters task-related causal edges based on task objectives and subtask dependencies and generates shared knowledge summaries, reducing communication redundancy and noise interference caused by sharing irrelevant experiences; it improves the consistency and credibility of cross-agent knowledge by performing confidence-weighted fusion on causal edges pointing to the same causal node and with the same action type; and it selects subtask execution paths using comprehensive utility values and calculates expected cumulative reward values for key subtasks by traversing candidate actions, enabling collaborative task planning to simultaneously consider causal reliability, task dependency order, and execution benefits, thereby improving the accuracy, stability, and knowledge reuse efficiency of task planning in multi-agent collaborative scenarios.
Smart Images

Figure CN122616742B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multi-agent collaboration and task planning technology, specifically relating to a method and system for task planning and knowledge sharing for multi-agent collaboration. Background Technology
[0002] With the development of multi-agent systems, reinforcement learning, task decomposition, and swarm collaborative control technologies, multi-agent collaboration has been widely applied in scenarios such as unmanned swarm patrols, intelligent traffic scheduling, robot collaborative operations, and distributed resource allocation. Existing multi-agent task planning methods typically focus on generating task allocation schemes based on task constraints, agent capabilities, or environmental states, or learning joint policies through reinforcement learning models to improve swarm collaboration efficiency. However, in complex collaborative tasks, each agent often only has local observation capabilities, and its historical experience trajectories, action-reward relationships, and state change patterns are difficult for other agents to effectively utilize. This leads to a strong dependence on local experience in the task planning process, a lack of causal screening of knowledge sharing content, and problems such as redundant transmission, low-reliability fusion, or insufficient relevance to the current task in collaborative knowledge, thereby affecting the stability and interpretability of the task planning sequence.
[0003] CN119536258B discloses a multi-agent collaborative task planning method for clusters, comprising: constructing a cruise simulation interaction scenario; determining the data input to a reinforcement learning network model; the reinforcement learning network model outputting the time sequence of multiple sub-tasks, the agent type and number of agents corresponding to each sub-task; converting the output data of the reinforcement learning network model into cruise constraints; performing branch and bound search for the optimal combination scheme based on the cruise constraints; planning the start and end times of each agent's actions; and completing the agent sub-task planning. This method decouples the task allocation and combination problem from the task execution optimization problem, and can quickly generate agent task execution schemes that include agent task allocation and execution time. However, its focus is on task formation, sub-task timing, and branch and bound search. It does not establish a causal memory structure for the observed states, executed actions, and immediate reward values in the historical collaborative tasks of each agent, nor does it filter and share task-related causal edges, making it difficult to reliably correct the current collaborative task planning using state transition patterns from historical experience.
[0004] CN116935667A discloses a multi-agent reinforcement learning traffic signal control method based on neighbor knowledge sharing, relating to the field of intelligent transportation technology. The method includes: modeling the adaptive traffic signal control problem as a neighborhood-aware Markov decision process; modeling each intersection as an agent; improving the observation and reward of each agent based on the importance of local traffic information of the intersection and its neighbors; establishing a knowledge-sharing paradigm among neighbors based on knowledge distillation; utilizing deep mutual learning to share knowledge among agents and their neighbor networks to learn a joint traffic signal control strategy; and performing traffic signal control based on the joint traffic signal control strategy. This method considers cooperation between intersections and their connected neighbors and improves the algorithm's data efficiency through neighborhood knowledge sharing. However, its knowledge sharing mainly revolves around the neighbor network and traffic signal control strategy, without establishing a confidence fusion mechanism for causal nodes, causal edges, and action types in the shared knowledge, nor combining the shared knowledge summary with sub-task dependencies to generate a task planning sequence. Therefore, it is difficult to apply to collaborative task planning scenarios with multiple types of sub-task dependencies, cross-agent experience reuse, and causal knowledge update requirements. Summary of the Invention
[0005] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section, as well as in the abstract and title of the present application, to avoid obscuring the purpose of this section, the abstract and title of the invention. Such simplifications or omissions shall not be used to limit the scope of the present invention.
[0006] In view of the aforementioned existing problems, the present invention is proposed.
[0007] Therefore, the technical problem solved by this invention is: how to transform the local experience trajectories formed by the historical collaborative tasks of each agent into causal knowledge that can be filtered, shared, and integrated in multi-agent collaborative tasks, and to revise the current task planning sequence based on the updated causal knowledge, thereby improving the reliability, adaptability, and interpretability of collaborative task planning.
[0008] To address the aforementioned technical problems, the present invention provides the following technical solution: Methods for task planning and knowledge sharing in multi-agent collaboration include: Acquire local experience trajectory and task description data, extract task objectives, task constraints and subtask dependencies from the task description data, and parse the local experience trajectory into the observation status, execution actions and immediate reward values at each time step; A state transition sample set is constructed based on the observed state, the executed action, and the immediate reward value. The frequency of occurrence of each state transition pair is counted, the initial values of causal strength and confidence are calculated, and a local causal knowledge graph is constructed. Based on the task objectives and subtask dependencies, task-related causal edges are filtered from the local causal knowledge graph to form a shared knowledge summary. Receive the shared knowledge summary of the collaborative agents, and weight and fuse the initial confidence values of multiple causal edges that point to the same causal node and have the same action type to obtain the fused confidence value and update the corresponding causal edge in the local causal knowledge graph; An initial task planning sequence is generated based on the updated local causal knowledge graph and subtask dependencies. Key subtasks on the dependency path are selected from the initial task planning sequence. Each candidate action in the set of optional actions is traversed and the expected cumulative reward value is calculated. The planning sequence corresponding to the maximum expected cumulative reward value is taken as the current collaborative task planning scheme.
[0009] As a preferred embodiment of the present invention, wherein: On the other hand, the present invention also provides a task planning and knowledge sharing system for multi-agent collaboration, comprising: The data parsing module is used to acquire local experience trajectory and task description data, extract task objectives, task constraints and subtask dependencies from the task description data, and parse the local experience trajectory into the observation status, execution actions and immediate reward values at each time step. The knowledge construction module is used to build a state transition sample set based on the observed state, the executed action and the immediate reward value, count the occurrence frequency of each state transition pair, calculate the initial value of causal strength and the initial value of confidence, and build a local causal knowledge graph. The summary generation module, based on the task objectives and subtask dependencies, filters task-related causal edges from the local causal knowledge graph to form a shared knowledge summary; The knowledge fusion module is used to receive the shared knowledge summary of the collaborative agents, and to weight and fuse the initial confidence values of multiple causal edges that point to the same causal node and have the same action type, to obtain the fused confidence value and update the corresponding causal edge in the local causal knowledge graph. The task planning module is used to generate an initial task planning sequence based on the updated local causal knowledge graph and subtask dependencies. It selects key subtasks on the dependency path from the initial task planning sequence, traverses each candidate action in the set of optional actions and calculates the expected cumulative reward value, and uses the planning sequence corresponding to the maximum expected cumulative reward value as the current collaborative task planning scheme.
[0010] The beneficial effects of this invention are as follows, compared with the prior art: This invention resolves local experience trajectories into observed states, executed actions, and immediate reward values, and combines these with task objectives, task constraints, and subtask dependencies to form a correspondence between task semantics and historical execution experience; it constructs a local causal knowledge graph using state transition sample sets, occurrence frequencies, initial values of causal strength, and initial values of confidence, enabling agents to transform scattered experiences into quantifiable and traceable causal knowledge; it filters task-related causal edges based on task objectives and subtask dependencies and generates shared knowledge summaries, reducing communication redundancy and noise interference caused by sharing irrelevant experiences; it improves the consistency and credibility of cross-agent knowledge by performing confidence-weighted fusion on causal edges pointing to the same causal node and with the same action type; and it selects subtask execution paths using comprehensive utility values and calculates expected cumulative reward values for key subtasks by traversing candidate actions, enabling collaborative task planning to simultaneously consider causal reliability, task dependency order, and execution benefits, thereby improving the accuracy, stability, and knowledge reuse efficiency of task planning in multi-agent collaborative scenarios. Attached Figure Description
[0011] Figure 1 This is a flowchart of the task planning and knowledge sharing method for multi-agent collaboration in this invention.
[0012] Figure 2 This is a structural diagram of the task planning and knowledge sharing system for multi-agent collaboration in this invention. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.
[0014] like Figure 1 As shown, the task planning and knowledge sharing method for multi-agent collaboration of the present invention includes: A method for task planning and knowledge sharing oriented towards multi-agent collaboration includes: S1: Obtain local experience trajectory and task description data, extract task objectives, task constraints and subtask dependencies from the task description data, and parse the local experience trajectory into the observation status, execution actions and immediate reward values at each time step.
[0015] S1.1: Each agent reads the historical collaborative task execution log recorded in the local storage medium through a unified standardized interface for perception data. It extracts the original perception data, original control commands, and task completion feedback signals of each agent at each historical time step from the historical collaborative task execution log, and arranges the original perception data, original control commands, and task completion feedback signals in chronological order to generate a local experience trajectory.
[0016] It should be noted that the historical collaborative task execution logs are stored in the local storage medium in a first-in-first-out queue manner. The local storage medium is the non-volatile memory of each intelligent agent. The raw perception data includes environmental image data, distance measurement data and position coordinate data collected by each intelligent agent through its own onboard sensors. The raw control commands include speed commands, steering commands and grasping commands issued by each intelligent agent to its own actuators. The task completion feedback signals include the completion flag bit and task time record received by each intelligent agent after completing the task objective.
[0017] Preferably, when the storage capacity of the historical collaborative task execution log exceeds the preset storage threshold of the local storage medium, each agent deletes the historical collaborative task execution log that exceeds the preset storage threshold in order of timestamp from earliest to latest.
[0018] The preset storage threshold is set as follows: each agent reads the rated total capacity of the local storage medium during initialization, multiplies the rated total capacity by 0.8, and uses the resulting value as the preset storage threshold. This threshold remains unchanged during task execution. The preset storage threshold is used to ensure that at least the minimum amount of historical logs required for the current task cycle is retained, while reserving no less than 20% of the storage space for the operating system and other processes.
[0019] S1.2: Read the task description file of the current collaborative task and extract the task objective keywords, task constraint keywords, and subtask division keywords from the task description file.
[0020] In this embodiment, a task objective is generated based on task objective keywords, and a set of target action types is generated based on the action type tags corresponding to the task objective keywords in a preset task objective thesaurus; task constraints are generated based on the constraint values, constraint units, and constraint directions in the statements containing task constraint keywords; subtask dependencies are generated based on subtask partitioning keywords and the chapter structure in the task specification file; the task specification file is a structured text file or a semi-structured text file.
[0021] The word segmentation process for the task specification file is as follows: the task specification file is divided into sentence sequences according to punctuation marks; for each sentence in the sentence sequence, coarse segmentation is performed according to spaces and punctuation marks to obtain an initial word sequence; each word in the initial word sequence is matched with a preset standard dictionary using the longest match function, and the successfully matched word is taken as a valid word, while the unmatched word is split into single-character word elements; all valid word elements and single-character word elements are arranged in their original order to generate the word segmentation result.
[0022] The method for extracting task target keywords from the task specification file is as follows: the task specification file is segmented into words, and the segmentation results are matched with a preset task target vocabulary. The words that match successfully are taken as task target keywords. Specifically, the method for matching the segmentation results with the preset task target vocabulary is as follows: each word element in the segmentation results is matched exactly with each target keyword in the preset task target vocabulary. If a word element is the same as a target keyword, then that word element is marked as a successfully matched task target keyword.
[0023] During the extraction of task target keywords, each agent simultaneously records the chapter number to which each task target keyword appears in the task specification document. The target keyword-chapter lookup table is composed of all task target keywords and their corresponding chapter numbers and is stored in the local memory for S3.2 to call. When the same task target keyword appears in multiple chapters, all chapter numbers corresponding to that keyword are recorded in the target keyword-chapter lookup table.
[0024] The method for extracting task constraint keywords from the task specification document is as follows: The word segmentation results are matched against a pre-defined task constraint vocabulary. Successfully matched words are used as task constraint keywords. Specifically, the matching process involves performing a complete string match between each word segmentation term and each constraint keyword in the pre-defined vocabulary. If a word segment matches a constraint keyword, that word segment is marked as a successfully matched task constraint keyword. Then, statements containing task constraint keywords are read, and a search window is created with the keyword's position as the center and 10 words before and after it. This process utilizes pre-defined vocabulary... The defined regular expression pattern library matches numeric and unit patterns within the search window. This library includes numeric patterns matching integers, decimals, and fractions, as well as unit patterns matching common units such as meters per second, kilometers per hour, meters, seconds, and percentages. The matched numeric values and units are used as constraint values and constraint units, respectively. The constraint direction is determined based on comparison words (including greater than, less than, no more than, at least, highest, and lowest) located near the task constraint keywords in the statement. If no numeric pattern is matched within the search window, the corresponding task constraint keyword is used as a qualitative constraint identifier, and no constraint value, constraint unit, or constraint direction is generated.
[0025] The pre-defined task target lexicon is constructed as follows: Standard task instruction samples in the multi-agent collaborative task domain are collected, with no fewer than 100 samples covering at least 5 typical collaborative task types. All noun phrases and verb phrases describing the final task objective are manually annotated from the standard task instruction samples. These annotated noun phrases and verb phrases are then deduplicated and used as target keywords. Each target keyword is assigned a corresponding action type tag, which includes at least one of movement, allocation, communication, and grasping actions. The pre-defined task target lexicon is composed of all target keywords and their corresponding action type tags. Simultaneously, based on the target keywords and action types in this lexicon… The correspondence between tags is used to generate an inverse index table, which serves as the tag-target mapping table in S3.2. Each action type tag in the inverse index table corresponds to one or more target keywords. During the initialization phase, each agent stores the inverse index table as a read-only file in its local memory. This is used in S3.2 to convert action type tags into task target semantic identifiers. When the collaborative task type changes, each agent expands and updates the preset task target lexicon by supplementing and collecting standard task specification samples corresponding to the new task type and re-executing the above annotation, deduplication, and action type tag configuration steps. The inverse index table is updated synchronously, and the updated lexicon and inverse index table are written to each agent's local memory by overwriting files.
[0026] The pre-defined task constraint lexicon is constructed as follows: standard task specification samples in the multi-agent collaborative task domain are collected, and all phrases describing task constraints are manually annotated from the standard task specification samples. These phrases include speed constraint phrases, resource constraint phrases, time constraint phrases, and space constraint phrases. All annotated phrases are deduplicated and used as constraint keywords. The pre-defined task constraint lexicon is composed of all constraint keywords. The pre-defined task constraint lexicon is updated in the same way as the pre-defined task target lexicon.
[0027] The preset subtask lexicon is constructed as follows: standard task instruction samples in the multi-agent collaborative task domain are collected, and all phrases describing the names of each subtask after task decomposition are manually annotated from the standard task instruction samples. All annotated phrases are deduplicated and used as subtask keywords. The preset subtask lexicon is composed of all subtask keywords. The preset subtask lexicon is updated in the same way as the preset task target lexicon.
[0028] It should be noted that the three preset dictionaries mentioned above are uniformly constructed offline by each agent before the collaborative task starts and stored in the local storage of each agent as read-only files. Each agent directly reads and uses them in subsequent collaborative tasks. Each preset dictionary is stored in plain text format encoded in UTF-8, with one keyword stored per line. Each agent parses the dictionary line by line when reading it. When multiple agents participate in the same collaborative task, each agent uses the preset dictionary with the same version number. Before the task starts, each agent reports its current local dictionary version number to the master agent, and the master agent collects all versions. The version number follows the majority version, and agents with inconsistent versions are notified to download the latest dictionary file from the master agent or a designated node. If synchronization cannot be completed due to communication failure, all agents will revert to their respective latest available versions to execute the current task. The master agent is the unique coordinating node determined by negotiation among all agents when the collaborative task is started. The determination method is to select the agent with the smallest identifier after sorting the agent identifiers in lexicographical order as the master agent, or to be specified by the user through configuration commands before executing the task, so as to ensure that the keyword matching results of all agents are consistent.
[0029] The method for generating subtask dependencies based on subtask delineation keywords and the chapter structure in the task specification file is as follows: Each chapter in the task specification file whose title contains subtask delineation keywords is treated as a subtask node. The reference and ordinal relationships between chapters are extracted and converted into directed edges between subtask nodes. The method for extracting reference relationships between chapters involves segmenting the main text of each chapter in the task specification file into words. A predefined library of regular expression patterns for reference relationships is used to match these relationships within the segmentation results. This library includes patterns for matching "complete + chapter number", "execute + chapter", etc. The code uses regular expression patterns such as "after section number," "see + chapter number," and "depends on + chapter number" for citations. When a citation pointing to another chapter number is matched in the text of a chapter, a citation relationship is determined between the chapter and the cited chapter. The directed edges pointing from the sub-task nodes of the citing chapter to the sub-task nodes of the cited chapter are recorded as candidate directed edges. The ordinal relationships between chapters are extracted by reading the chapter numbers of each chapter title, sorting the chapters by numerical or alphabetical order, and recording the directed edges pointing from the sub-task nodes of the earlier-sorted chapters to the sub-task nodes of the later-sorted chapters as candidate directed edges. The union of the candidate directed edges corresponding to citation relationships and the candidate directed edges corresponding to ordinal relationships is taken as the directed edges between the sub-task nodes.
[0030] The system reads the predefined start and end state names in the structured field form of the chapter where each subtask node is located. The start and end state names correspond one-to-one with the values of each dimension field of the observation state defined in S1.3. Each agent reads the locally stored state name-observation state encoding mapping table and converts the start and end state names into the corresponding observation state vectors, which are then used as the start and end execution node identifiers. The subtask dependencies are formed by the subtask nodes, directed edges, start and end execution node identifiers.
[0031] It should be noted that, since the observation state defined in S1.3 includes the environmental perception state (i.e., the image feature vector output by the convolutional neural network model), the value of this dimension depends on the actual collected environmental image samples and the parameters of the trained convolutional neural network model. It cannot be directly written into the configuration file by manually presetting values before the task is executed. Therefore, in the state name-observation state encoding mapping table, for the agent's position state, resource occupancy state, and previous subtask completion state, the dimensions whose values are determined in advance by those skilled in the art according to the task scenario can be stored in advance in the form of key-value pairs. For the environmental perception state dimension, the mapping table does not store numerical vectors, but rather the storage path of the reference environmental image samples that have been collected and labeled for the state name in advance. When each agent converts the start state name or end state name into the corresponding observation state vector, it reads the reference environmental image sample corresponding to the state name, inputs it into the convolutional neural network model in S1.3 to obtain the corresponding image feature vector, and concatenates the image feature vector with the pre-stored position state, resource occupancy state, and previous subtask completion state values in the mapping table in the order of the observation state dimensions defined in S1.3 to generate a complete observation state vector. For example, in a simplified scenario that only involves location coordinates and does not involve environmental image acquisition, the starting point A can be mapped to (0,0,0) and the target point B can be mapped to (10,0,0); in a scenario involving environmental perception, the image feature vector is generated in real time from the reference image in the above manner and then stitched together.
[0032] After generating the observation state vector, the image feature vector is discretized to obtain the corresponding discretized identifier. This discretized identifier is then combined with the discretized identifiers of the pre-stored position state, resource occupancy state, and previous subtask completion state in the mapping table according to the observation state dimension order defined in S1.3 to generate a discrete observation state code. This discrete observation state code is used as the start execution node identifier or the end execution node identifier. The generation method of the start execution node identifier and the end execution node identifier is the same as the identifier method of the causal node in S2.5, so as to ensure that the matching of candidate nodes and start and end execution node identifiers in S3.3 has a consistent comparison benchmark.
[0033] S1.3: Encode the raw sensing data of each historical time step in the local experience trajectory according to the preset observation state coding rules to generate the observation state.
[0034] In this embodiment, the observation state includes agent position state, resource occupancy state, environmental perception state, and prior subtask completion state. Agent position state refers to the two-dimensional or three-dimensional coordinates of each agent in the current collaborative task scenario; resource occupancy state refers to the proportion of computing and communication resources currently occupied by each agent; environmental perception state refers to the distribution data of surrounding obstacles collected by each agent through sensors; and prior subtask completion state refers to a flag indicating whether the preceding subtasks required in the subtask dependency relationship have been completed before the current subtask is executed.
[0035] The preset observation state encoding rule is as follows: input the environmental image data in the original sensing data into the preset convolutional neural network model, and the convolutional neural network model outputs the image feature vector; concatenate the distance measurement data and the position coordinate data into a numerical feature vector; concatenate the image feature vector and the numerical feature vector to generate the observation state.
[0036] Before being used for state transition frequency statistics and causal node partitioning in S2, the observed states need to undergo discretization. The discretization process involves inputting the image feature vectors from the observed states into a pre-defined feature clustering model. This model is a clustering model trained using the K-means clustering algorithm on a set of image feature vectors corresponding to environmental image samples of the same type as the current collaborative task scenario. The feature clustering model contains a pre-defined number of cluster centers. The Euclidean distance between the image feature vectors and each cluster center is calculated, and the cluster number corresponding to the cluster center with the smallest distance is used as the discretization identifier of the image feature vector. The agent's position state and resource occupancy state are then discretized according to a pre-defined granularity (position state...). The discretization granularity of the state is the preset spatial grid side length, and the discretization granularity of the resource occupancy state is the preset occupancy ratio interval width. The state is divided into corresponding discrete intervals, and the number of each discrete interval is used as the discretization identifier of the corresponding dimension. The flag bit of the completion status of the preceding subtask is directly used as the discretization identifier of the dimension. The discretization identifiers of the above dimensions are combined in a preset order to generate a discrete observation state code. The discrete observation state code is used as the unique identifier of the causal node in S2. If and only if the discrete observation state codes corresponding to two observation states are completely identical, the two observation states are determined to be the same observation states. All other identical observation states, identical preceding states, and identical succeeding states in this application are determined based on this.
[0037] In an optional embodiment, the number of cluster centers, the discretization granularity of location state, and the discretization granularity of resource occupancy state of the feature clustering model are uniformly determined by each agent through a negotiation mechanism before the collaborative task is started, and stored in the local configuration file of each agent together with the unified node identifier encoding specification in S4.6. Each agent performs the above discretization processing on its own collected observation state locally. Since each agent uses the same feature clustering model and discretization granularity, the same discrete observation state encoding can be generated for the same real state, thereby ensuring that the matching, grouping and fusion of causal edges between different agents in S3 to S4 have a consistent comparison benchmark.
[0038] The convolutional neural network (CNN) model is a pre-trained image classification model. The training samples used in the pre-training are environmental image samples of the same type as the current collaborative task scenario. The CNN model is constructed as follows: An environmental image sample set of the same type as the current collaborative task scenario is obtained, where each environmental image sample is labeled with a scene category label; an initial CNN structure is constructed, which adopts a conventional image classification network architecture, including an input layer, convolutional layer, pooling layer, fully connected layer, and output layer connected in sequence. The specific parameters of each layer are configured by those skilled in the art according to the size and complexity of the environmental images in the current collaborative task scenario in a conventional manner; the environmental image samples from the environmental image sample set are input into the initial CNN structure, and the output category probability is calculated through forward propagation. The network parameters of the initial CNN structure are updated through backpropagation, and iterative training is performed until the loss function value is less than a preset loss threshold; the network parameters obtained after training are solidified to generate a pre-trained image classification model; when extracting image feature vectors, the output layer of the image classification model is removed, and the vector output by the fully connected layer is used as the image feature vector.
[0039] In an optional embodiment, taking an indoor multi-agent collaborative material handling task as a typical scenario, a specific implementation of the convolutional neural network model is given: In this scenario, the environmental images captured by the visual sensors on each agent have a resolution of 224×224 pixels and are RGB three-channel color images. The convolutional neural network model adopts the ResNet-50 architecture, and its specific structure is as follows: Input layer: Accepts RGB image input of 224×224×3, and normalizes each pixel value (divided by 255 and then subtracted from the mean [0.485, 0.456, 0.406], divided by the standard deviation [0.229, 0.224, 0.225]). First stage: 7×7 convolution kernel, stride of 2, padding of 3, output channel number 64, followed by batch normalization and ReLU activation, and then 3×3 max pooling with stride of 2; In this application, the residual processing unit adopts a three-layer structure consisting of 1×1 convolution for dimensionality reduction, 3×3 convolution for spatial feature extraction, and 1×1 convolution for dimensionality increase. Based on this: The second stage consists of three residual processing units. Each residual processing unit is a 1×1 convolution (64 output channels), a 3×3 convolution (64 output channels, stride of 1, padding of 1), and a 1×1 convolution (256 output channels). Each convolution is followed by batch normalization and ReLU activation (except for the output of the last 1×1 convolution). The residual connections are identity mappings. The third stage contains four residual processing units. The first unit has a stride of 2 for the 3×3 convolution, and the stride of the others is 1. The number of channels is 128, 128 and 512 respectively. The rest of the structure is the same as the second stage. The fourth stage consists of 6 residual processing units. The first unit has a 3×3 convolution stride of 2, and the others have a stride of 1. The number of channels is 256, 256, and 1024 respectively. The fifth stage contains three residual processing units. The first unit has a 3×3 convolution with a stride of 2, while the others have a stride of 1. The number of channels is 512, 512, and 2048 respectively. Global average pooling layer: The feature map (7×7×2048) output from the fifth stage is averaged along the spatial dimension to obtain a 2048-dimensional feature vector; Fully connected layer (used during training): The output dimension is the number of scene categories (the number of categories in this scene is 10, corresponding to 10 typical obstacle or target object types). After training, this layer is removed, and the 2048-dimensional vector output by the global average pooling layer is used as the image feature vector.
[0040] The training parameters are configured as follows: Optimizer: Adam, initial learning rate 0.001, β1=0.9, β2=0.999, weight decay coefficient 0.0001; batch size: 32; maximum number of iterations: 100; early stopping strategy: training is terminated early when the validation set loss no longer decreases within 10 consecutive iterations; loss function: cross-entropy loss function; loss threshold: 0.01 (corresponding to a convergence criterion of validation set classification accuracy not lower than 99%).
[0041] When extracting image feature vectors, the last fully connected layer of the trained network is removed. The input image is forward propagated to the global average pooling layer, and the output 2048-dimensional vector is used as the image feature vector of the image, which is then concatenated with the numerical feature vector to generate the observation state.
[0042] The parameter configuration provided in this optional embodiment is applicable to typical collaborative tasks in indoor scenes with an image size of 224×224 and a number of categories of 10. When the scene size, image resolution, or number of categories changes, those skilled in the art can make adaptive adjustments to the number of output channels and the dimensions of fully connected layers according to the same principle, but none of them depart from the protection scope of this invention.
[0043] In an optional embodiment, the loss function is the cross-entropy loss function, and the preset loss threshold is determined according to the classification accuracy requirement of the validation set, with a value range of 0.01 to 0.05; 0.05 and 0.01 are the lower and upper limits of the empirical loss threshold corresponding to the classification accuracy of the validation set, within which the model has the perceptual accuracy required for collaborative tasks; in specific implementation, if the collaborative task has high requirements for perceptual accuracy, a smaller threshold is taken, and if the training speed requirement is high, a larger threshold is taken, which can be selected by those skilled in the art within the range as needed.
[0044] S1.4: Encode the original control instructions for each historical time step in the local experience trajectory according to the preset action coding rules to generate the execution action.
[0045] In this embodiment, the actions performed include movement actions, allocation actions, communication actions, and grasping actions. Movement actions are instructions for each agent to move from its current position to a target position; allocation actions are instructions for each agent to allocate its currently held task resources to other collaborating agents; communication actions are instructions for each agent to send or broadcast information to a designated collaborating agent; and grasping actions are instructions for each agent to grasp or release a target object using a grasping actuator.
[0046] It should be noted that the correspondence between the executed actions and the speed, steering, and grasping instructions in the original control commands is as follows: the movement action is generated by combining and encoding the speed and steering instructions; the grasping action is generated by encoding the grasping instruction; and the allocation action and communication action are generated by encoding the supplementary control instructions generated by each agent based on the intermediate decision results generated during the task execution process.
[0047] The preset action encoding rule is as follows: based on the action type to which the action belongs, a uniform four-dimensional action vector is generated using the corresponding encoding method, with unused dimensions filled with preset placeholder values of 0. When the action is a movement action, the speed command and steering command are discretized into speed level value and steering angle value, respectively. These are filled into the first and second dimensions of the action vector, and the third and fourth dimensions are filled with placeholder values. The speed level value is a level identifier selected from a preset speed level set, and the steering angle value is an angle value selected from a preset angle set. When the action to be performed is a grasping action, the grasping instruction is discretized into grasping state values, which are filled into the third dimension of the action vector, and the remaining dimensions are filled with placeholder values; the grasping state value is a binary identifier that indicates whether the grasping executor is in a closed or open state. When the action to be performed is an allocation action, the resource allocation ratio value carried in the supplementary control instruction generated by each agent based on the intermediate decision results generated during the task execution is discretized into a resource allocation level value. The resource receiver agent identifier carried in the supplementary control instruction is encoded into a receiver number value. The two are filled into the first and second dimensions of the action vector, respectively, and the remaining dimensions are filled with placeholder values. The resource allocation level value is a level identifier selected from the preset resource allocation level set. When the action is a communication action, the communication content type carried in the supplementary control instruction is discretized into a communication type value, and the communication target range carried in the supplementary control instruction is discretized into a communication range value. The two are filled into the first and second dimensions of the action vector, respectively, and the remaining dimensions are filled with placeholder values. The communication type value is a type identifier selected from the preset communication type set (including request type, notification type, and confirmation type), and the communication range value is a binary identifier representing unicast or broadcast.
[0048] S1.5: Calculate the task completion feedback signal for each historical time step in the local experience trajectory according to the preset reward calculation function, and generate an instant reward value.
[0049] In this embodiment of the application, the preset reward calculation function is as follows: when the completion flag in the task completion feedback signal is true, the instant reward value is set to the first positive value; when the completion flag is false, the time consumption penalty value is calculated according to the task consumption time record, and the instant reward value is set to the opposite of the time consumption penalty value.
[0050] The time penalty value is calculated as follows: the task time record is compared with the preset standard time threshold. When the task time record is less than or equal to the standard time threshold, the time penalty value is zero; when the task time record is greater than the standard time threshold, the time penalty value is the difference between the task time record and the standard time threshold multiplied by the preset penalty coefficient.
[0051] The standard time consumption threshold is preset by each agent based on the complexity of the current collaborative task and the statistical distribution of historical time consumption data, or configured uniformly by the master agent when the task starts. The preset penalty coefficient is any value between 0.1 and 1.0. The lower limit of 0.1 is suitable for relaxed collaborative tasks with high tolerance for time consumption. At this time, the timeout penalty is small, which is conducive to agents prioritizing the quality of actions. The upper limit of 1.0 is suitable for time-sensitive, real-time collaborative tasks. At this time, the timeout penalty increases proportionally to the timeout duration, which is conducive to agents prioritizing the compression of task execution time. The standard time consumption threshold is uniformly set by each agent through a negotiation mechanism. The setting method is as follows: each agent calculates its own average task consumption in historical collaborative tasks, and the arithmetic mean of the average task consumption of all agents is multiplied by 1.2 to obtain the standard time consumption threshold. The 1.2 multiplier is used to reserve a 20% execution margin on the basis of the average level to accommodate occasional delays.
[0052] S1.6: The observation state, action, and immediate reward value of the same historical time step are associated and stored as a state-action-reward triple. The state-action-reward triples of all historical time steps in the local experience trajectory are arranged in chronological order to generate the state-action-reward time sequence corresponding to the local experience trajectory.
[0053] It should be noted that the time correspondence between the observed state, the executed action, and the immediate reward value is as follows: the observed state, the executed action, and the immediate reward value at the same historical time step have the same timestamp identifier; each agent stores the state-action-reward time sequence in the form of an array in its local cache, and each row of the array corresponds to a state-action-reward triplet for a historical time step.
[0054] S2: Construct a state transition sample set based on the observed state, executed actions, and immediate reward values, count the frequency of occurrence of each state transition pair, calculate the initial values of causal strength and confidence, and construct a local causal knowledge graph.
[0055] S2.1: Each agent reads the state-action-reward time sequence, extracts the observed state, executed action, and immediate reward value for each historical time step from the state-action-reward time sequence, and generates a state transition sample set.
[0056] In this embodiment, the observed state of the current historical time step is taken as the preceding state, the execution action corresponding to the preceding state is taken as the transition action, and the observed state of the next historical time step is taken as the successor state. The preceding state, the transition action, and the successor state are combined into a state transition pair, and the instant reward value is associated with the corresponding state transition pair for storage. All adjacent historical time steps in the state-action-reward time sequence are traversed to generate a set of state transition pairs as a state transition sample set.
[0057] If the observed state of the last historical time step in the state-action-reward time sequence does not have a corresponding observed state for the next historical time step, each agent will exclude the observed state of the last historical time step from the state transition sample set. During the process of generating the state transition sample set, each agent will assign a unique sample index number to each state transition pair. The sample index number is used to trace the source of each state transition pair in subsequent steps.
[0058] S2.2: Count the occurrence frequency of each state transition pair in the state transition sample set, use the occurrence frequency as the original frequency value of each state transition pair, and calculate the occurrence probability value of each state transition pair in the state transition sample set based on the original frequency value of each state transition pair.
[0059] In this embodiment of the application, the probability value of occurrence is calculated as follows: the original frequency value of any state transition pair is divided by the sum of the original frequency values of all state transition pairs in the state transition sample set, and the resulting quotient is used as the probability value of occurrence of the state transition pair.
[0060] When the sum of the original frequency values of all state transition pairs in the state transition sample set is zero, each agent sets the occurrence probability value of each state transition pair to zero. Each agent stores each state transition pair and its corresponding original frequency value and occurrence probability value in a hash table structure. The key of the hash table is the unique identifier of the state transition pair, and the value of the hash table is a key-value pair structure containing the original frequency value and occurrence probability value. In this application, the global occurrence probability is used as the frequency weight to characterize the relative prevalence of the state transition pair in the entire state transition sample set.
[0061] S2.3: Calculate the initial value of the causal strength of each state transition pair based on the occurrence probability value and the original frequency value of each state transition pair.
[0062] In this embodiment, the initial value of causal strength is calculated as follows: for any state transition pair in the state transition sample set... Where s is the preceding state and a is the transition action. As the successor state, each agent selects from the state transition sample set the state whose preceding state is s and whose transition is a, and whose successor state is s. For all state transition pairs, extract the immediate reward value associated with each selected state transition pair, calculate the arithmetic mean of the extracted immediate reward values, and use this arithmetic mean as the average immediate reward value for that state transition pair. Multiply the average immediate reward value by the sum of the probability of occurrence of that state transition pair and a preset smoothing constant, and use the resulting product as the initial value of the causal strength of that state transition pair. The specific formula is as follows: ; in, Let the preceding state be s, the transition state be a, and the succeeding state be... The arithmetic mean of the instantaneous reward values of all state transition pairs. Let ε be the probability value of the occurrence of this state transition pair, and let ε be a preset smoothing constant.
[0063] The preset smoothing constant can be any value between 0.001 and 0.01. In a preferred embodiment, the preset smoothing constant is set to 0.005. The preset smoothing constant is used to avoid the causal strength from directly returning to zero when the probability value is zero, thereby preserving the potential influence of rare transfer pairs. When the average instant reward value is negative, the initial value of the causal strength is negative; when the average instant reward value is positive, the initial value of the causal strength is positive.
[0064] It should be noted that the absolute value of the initial causal strength comprehensively represents the frequency of occurrence of the state transition pair and its corresponding average reward level. The state transition pair with a higher probability of occurrence and a larger average reward has a higher causal strength, which is consistent with the objective law in historical experience that high-frequency, high-reward paths should have higher causal weights. The sign of the initial causal strength is determined by the sign of the average immediate reward value, which represents whether the causal influence is positively promoting or negatively inhibiting.
[0065] In an optional embodiment, after calculating the initial causal strength value of each state transition pair, each agent performs a normalization process: obtaining the maximum absolute value of the initial causal strength values of all state transition pairs in the state transition sample set, dividing the initial causal strength value of each state transition pair by the maximum value, and using the resulting quotient as the normalized initial causal strength value, which ranges from -1 to 1; the initial causal strength values in other parts of this application, when used for threshold determination in S3.5 and comprehensive utility value calculation in S5.1, all refer to the normalized initial causal strength values.
[0066] S2.4: Calculate the initial confidence value of each state transition pair based on the original frequency value of each state transition pair.
[0067] In this embodiment of the application, the initial confidence value is calculated as follows: obtain the maximum value of the original frequency values of all state transition pairs in the state transition sample set, divide the original frequency value of any state transition pair by the maximum value, and use the resulting quotient as the initial confidence value of the state transition pair.
[0068] When the maximum value of the original frequency values of all state transition pairs in the state transition sample set is zero, each agent sets the initial confidence value of each state transition pair to zero. The initial confidence value can be any value between 0 and 1, and the initial confidence value represents the degree of credibility of the state transition pair in the local experience trajectory.
[0069] S2.5: Each agent uses the discrete observation state code corresponding to each observation state as the unique identifier of the causal node, the observation state itself (including image feature vector and numerical feature vector) as the node attribute information of the corresponding causal node, the direction from the previous state to the successor state in each state transition pair as the direction of the causal edge, the initial value of the causal strength of the state transition pair as the causal strength attribute value of the corresponding causal edge, the initial value of the confidence of the state transition pair as the confidence attribute value of the corresponding causal edge, and the transition action of the state transition pair as the action type label of the corresponding causal edge. The local causal knowledge graph is composed of all causal nodes, all causal edges, the causal strength attribute value of each causal edge, the confidence attribute value of each causal edge, and the action type label of each causal edge.
[0070] In this embodiment, the local causal knowledge graph is a directed weighted graph structure, where each node uniquely corresponds to an observed state. When multiple state transition pairs have the same preceding state, the same transition action, and the same successor state, each agent merges the multiple state transition pairs into the same causal edge. The causal strength attribute of the merged causal edge is the arithmetic mean of the initial causal strength values of the multiple state transition pairs, the confidence attribute of the merged causal edge is the arithmetic mean of the initial confidence values of the multiple state transition pairs, and the action type label of the merged causal edge is the same transition action as the multiple state transition pairs.
[0071] In an optional embodiment, each agent also stores the standard deviation of the causal strength attribute value for each causal edge in the local causal knowledge graph. The standard deviation is used to evaluate the stability of each causal edge in subsequent steps.
[0072] S2.6: Store the local causal knowledge graph in a local graph database, where the local graph database supports causal edge retrieval operations with causal nodes as query conditions.
[0073] Preferably, the local graph database is an embedded storage structure that supports causal edge retrieval based on causal nodes as query conditions. It can be implemented using an embedded graph database or a key-value pair storage method. Each agent performs write and read operations on the local causal knowledge graph by calling the application programming interface of the embedded graph database. When each agent transmits the local causal knowledge graph to S3, it also transmits the generation timestamp of each causal edge. The generation timestamp is used to identify the creation time of each causal edge in the local causal knowledge graph.
[0074] S3: Based on the task objectives and subtask dependencies, task-related causal edges are filtered from the local causal knowledge graph to form a shared knowledge summary.
[0075] S3.1: Extract all causal nodes and all causal edges from the local causal knowledge graph, and use all causal nodes as candidate nodes and all causal edges as candidate causal edges.
[0076] In this embodiment, each agent calls the application programming interface of the embedded graph database to traverse the graph database index of the local causal knowledge graph and obtain the node identifier list of all causal nodes and the edge identifier list of all causal edges. Each agent also reads the image feature vector and numerical feature vector in the observation state carried by each causal node as the node attribute information of each causal node.
[0077] S3.2: Perform a first-level screening of all candidate nodes based on the task objective to obtain nodes relevant to the task objective.
[0078] The first-level screening process is as follows: Each agent reads the action type labels carried by all causal edges associated with each candidate node in the local causal knowledge graph, and reads the label-target mapping table pre-stored in the configuration file; the action type labels are converted into corresponding task target semantic identifiers through the label-target mapping table; the converted task target semantic identifiers are matched one by one with the task target keywords in the task target; if the converted task target semantic identifier of the action type label of a candidate node with at least one associated causal edge matches the task target keyword, then the candidate node is marked as a task target related node; otherwise, the candidate node is not marked.
[0079] To avoid overly coarse filtering granularity caused by semantic matching based solely on action type tags, the first-level filtering is supplemented with the following sequentially executed filters: Direct association determination: For any candidate node, determine whether its discrete observation state code is the same as the start execution node identifier or end execution node identifier of a certain subtask node; if they are the same, then the chapter number to which the subtask node belongs is recorded in the associated chapter number set of the candidate node; if the candidate node is the same as the start execution node identifier or end execution node identifier of multiple subtask nodes at the same time, then the chapter numbers to which the multiple subtask nodes belong are recorded in the set respectively. Backtracking Expansion Judgment: If the discrete observation state code of the candidate node is different from the start execution node identifier and the end execution node identifier of any subtask node, then each agent searches along the positive and negative directions of the causal edges in the updated local causal knowledge graph, with a preset maximum backtracking hop count, to find the causal node that first satisfies the matching condition in sub-step one along that direction, and merges the associated chapter number set of the causal node into the associated chapter number set of the candidate node; if no causal node that satisfies the matching condition is found in either direction within the maximum backtracking hop count, then the associated chapter number set of the candidate node is set to an empty set; Chapter consistency verification: After completing the direct association determination or backtracking expansion determination, determine whether the candidate node meets the conditions to be marked as a node related to the task target. The specific determination method is as follows: Judgment condition 1: Whether the set of associated chapter numbers of the candidate node is a non-empty set; Judgment condition two: In the set of related chapter numbers, is there at least one chapter number that is the same as the chapter number corresponding to at least one task target keyword in the target keyword-chapter lookup table, or is the absolute value of the difference between the two numbers not exceeding a preset threshold? When judgment condition one and judgment condition two are satisfied at the same time, the candidate node is marked as a task target related node. When the set of associated chapter numbers of the candidate node is empty, skip the chapter consistency verification and directly determine whether to mark the candidate node as a task target-related node based on the initial result of the action type semantic matching.
[0080] It should be noted that the preset maximum backtracking jump and the preset threshold are both arbitrary integers between 1 and 3, determined by those skilled in the art based on the granularity of the task specification chapters and the connectivity density of the causal knowledge graph; the label-target mapping table is the reverse index table generated in S1.2 based on the preset task target lexicon. Each action type label in the reverse index table corresponds to one or more target keywords. Each agent stores the reverse index table in the local memory as a read-only file during the initialization phase.
[0081] S3.3: Perform a second-level screening of all candidate nodes based on the subtask dependencies to obtain a set of subtask-dependent nodes.
[0082] In this embodiment, the second-level filtering is as follows: read the start execution node identifier and end execution node identifier of each subtask node from the subtask dependency relationship; mark the candidate nodes that match the start execution node identifier or end execution node identifier as subtask dependency directly related nodes; starting from the subtask dependency directly related nodes, traverse all reachable nodes along the directed edge direction in the subtask dependency relationship; mark all reachable nodes obtained by traversal as subtask dependency extended related nodes; and take the union of the subtask dependency directly related nodes and the subtask dependency extended related nodes as the subtask dependency related node set.
[0083] The subtask dependency relationship is a directed acyclic graph structure. Each subtask node in the subtask dependency relationship contains a start execution node identifier and an end execution node identifier.
[0084] The method for traversing all reachable nodes along the directed edges in the subtask dependency relationship is as follows: starting from the directly related nodes of the subtask dependency, perform a depth-first traversal according to the direction of the directed edges, and mark all candidate nodes visited during the traversal as extended related nodes of the subtask dependency.
[0085] In an optional embodiment, when there are multiple subtask nodes with an in-degree of zero in the subtask dependency relationship, each agent starts from the starting execution node identifier corresponding to each subtask node with an in-degree of zero and performs a depth-first traversal in sequence.
[0086] S3.4: Take the union of the sets of nodes related to the task objective and the sets of nodes related to the subtask dependencies to generate a set of nodes related to the task. Extract candidate causal edges from all candidate causal edges in the local causal knowledge graph whose two endpoints both belong to the set of nodes related to the task. Use the extracted candidate causal edges as candidate causal edges related to the task.
[0087] It should be noted that the two endpoints are the starting causal node and the ending causal node of the candidate causal edge, respectively. Both the starting causal node and the ending causal node must belong to the task-related node set. When extracting task-related candidate causal edges, each agent also reads the causal strength attribute value, confidence attribute value and action type label carried by each task-related candidate causal edge. The causal strength attribute value is the initial causal strength value set in S2.5, and the confidence attribute value is the initial confidence value set in S2.5.
[0088] S3.5: Read the preset first and second sharing thresholds and filter the causal edges to be shared.
[0089] In this embodiment of the application, the screening method for selecting causal edges to be shared is as follows: Firstly, determine whether the initial value of the causal strength of each task-related candidate causal edge is greater than a first sharing threshold, and secondly, determine whether the initial value of the confidence of each task-related candidate causal edge is greater than a second sharing threshold. If the initial value of the causal strength is greater than the first sharing threshold and the initial value of the confidence is greater than the second sharing threshold, then this task-related candidate causal edge is selected as a causal edge to be shared. If the initial value of the causal strength of a task-related candidate causal edge is less than or equal to the first sharing threshold, or the initial value of the confidence is less than or equal to the second sharing threshold, then each agent marks this task-related candidate causal edge as a non-shared causal edge, wherein the non-shared causal edge is retained in the local causal knowledge graph but does not enter the shared knowledge summary.
[0090] The first sharing threshold is set based on the normalized initial value of causal strength in S2.3 to ensure a consistent comparison benchmark for different collaborative tasks and reward levels. The first sharing threshold can be any value between 0.3 and 0.7, and the second sharing threshold can be any value between 0.4 and 0.8. A lower limit of 0.3 for the first sharing threshold corresponds to a lenient screening strategy that excludes only obviously negative causal edges, suitable for scenarios where local historical data of the agent is sparse and it is necessary to retain as much shared information as possible. An upper limit of 0.7 for the first sharing threshold corresponds to a strict screening strategy that shares only strongly positive causal edges, suitable for scenarios where communication bandwidth is limited and it is necessary to compress the size of the shared summary. The scenario is as follows: The lower limit of the second shared threshold of 0.4 corresponds to a relaxed confidence threshold that excludes only extremely low-frequency causal edges, which is suitable for scenarios with few rounds of collaborative task execution and insufficient historical data. The upper limit of the second shared threshold of 0.8 corresponds to a strict confidence threshold that shares only high-frequency stable causal edges, which is suitable for scenarios with sufficient rounds of collaborative task execution and high-quality historical data. The first and second shared thresholds are generated by the master intelligent agent according to the preset system configuration parameters and broadcast to each subordinate intelligent agent. After receiving the threshold, each subordinate intelligent agent uses the threshold as the standard for local screening. If the broadcast threshold is not received due to communication failure, the subordinate intelligent agent uses the threshold setting value of the previous collaborative task cycle as the alternative.
[0091] S3.6: Extract the initial values of causal strength, initial values of confidence, action type labels, and node identifiers of the starting and ending causal nodes of each causal edge to be shared. Package the extracted information according to each causal edge to be shared to generate a shared knowledge entry corresponding to each causal edge to be shared. Use the set of shared knowledge entries corresponding to all causal edges to be shared as a shared knowledge summary.
[0092] In this embodiment, each shared knowledge entry is in a structured data format, which includes the following fields: a predecessor node identifier field, a successor node identifier field, a causal strength initial value field, a confidence initial value field, and an action type label field. The predecessor node identifier field stores the node identifier of the starting causal node, and the successor node identifier field stores the node identifier of the ending causal node. When generating a shared knowledge summary, the original edge identifiers of each causal edge to be shared in the local causal knowledge graph are also stored in the corresponding shared knowledge entry. The original edge identifiers are used to locate and update the corresponding causal edge in the local causal knowledge graph in S4.
[0093] S3.7: Store the shared knowledge summary in the local transmission buffer, associate and bind the shared knowledge summary with the agent identifier of each agent, broadcast it to other cooperating agents through the inter-agent communication network, and transmit the shared knowledge summary to S4.
[0094] S4: Receive the shared knowledge summary of the collaborative agents, and weight and fuse the initial confidence values of multiple causal edges pointing to the same causal node and with the same action type to obtain the fused confidence value and update the corresponding causal edge in the local causal knowledge graph.
[0095] S4.1: Listen to and receive shared knowledge summaries broadcast by other cooperating agents through the inter-agent communication network, associate and store each received shared knowledge summary with the agent identifier of the agent that sent the shared knowledge summary, and generate a set of received summaries.
[0096] In this embodiment, the inter-agent communication network is a multi-hop communication network built on a wireless ad hoc network protocol. Each agent has a unique agent identifier in the multi-hop communication network. When receiving a shared knowledge digest, the timestamp of the receiving time is also recorded, and the timestamp is associated with and stored with the corresponding shared knowledge digest.
[0097] In an optional embodiment, each agent sets a receiving timeout timer. The timeout duration is determined based on the upper bound of the communication delay preset by the collaborative task (for example, twice the maximum round-trip delay between all agents, but not less than 1 second). When the receiving timeout timer expires, the receiving of shared knowledge digests is stopped, and all received shared knowledge digests are used as the receiving digest set.
[0098] S4.2: Each agent parses each shared knowledge entry contained in each shared knowledge summary in the received summary set, extracts the preceding node identifier field, the succeeding node identifier field, the causal strength initial value field, the confidence initial value field, the action type label field, and the original edge identifier field from each shared knowledge entry, and stores the extracted field contents in a structured manner according to the shared knowledge entry.
[0099] In the embodiments of this application, when each intelligent agent parses each shared knowledge entry, it also extracts the intelligent agent identifier of the intelligent agent that sent the shared knowledge summary, and stores the intelligent agent identifier together with the extracted field content.
[0100] The completeness of each parsed shared knowledge entry is checked. The check method is to check whether each shared knowledge entry contains the complete preceding node identifier field, succeeding node identifier field, causal strength initial value field, confidence initial value field, action type label field, and original edge identifier field. Shared knowledge entries that are missing any of the required fields are marked as invalid entries and removed from the received digest set.
[0101] S4.3: Read the local predecessor node identifier, local successor node identifier, and local action type label of all causal edges in the local causal knowledge graph stored locally to obtain the knowledge entries to be merged and shared.
[0102] In this embodiment of the application, the method for obtaining the shared knowledge entries to be merged is as follows: matching the predecessor node identifier field of each shared knowledge entry with the local predecessor node identifier, matching the successor node identifier field with the local successor node identifier, matching the action type label field with the local action type label, and determining the shared knowledge entries that match all three fields as the shared knowledge entries to be merged.
[0103] The conditions for a successful match of all three fields are: the predecessor node identifier field is the same as the local predecessor node identifier, the successor node identifier field is the same as the local successor node identifier, and the action type label field is the same as the local action type label.
[0104] For causal edges that exist in the local causal knowledge graph but do not have corresponding shared knowledge entries in the received summary set, each agent does not perform any fusion operation on the causal edge and retains the original initial confidence value of the causal edge.
[0105] S4.4: Group the shared knowledge items to be merged according to the rule that they point to the same causal node and have the same action type. All shared knowledge items with the same successor node identifier field and the same action type label field are divided into the same fusion group to generate a set of fusion groups, where each fusion group corresponds to a target causal node and an action type.
[0106] In this embodiment of the application, the method for generating fusion groups is as follows: each agent traverses the shared knowledge entries to be fused, extracts the successor node identifier field value and action type label field value of each shared knowledge entry, and uses the combination of the two as the grouping key; all shared knowledge entries with the same grouping key are grouped into the same fusion group; when the shared knowledge entries to be fused have been traversed, the fusion groups corresponding to all grouping keys constitute a fusion group set.
[0107] It should be noted that when each agent divides the fusion group, the causal node pointed to by the successor node identifier field is the same causal node; the grouping key of a shared knowledge entry is uniquely determined, so each shared knowledge entry to be fused must belong to only one fusion group, and there is no situation where a shared knowledge entry is divided into multiple fusion groups or is repeatedly fused; when the successor node identifier field or action type label field of the shared knowledge entry to be fused is missing, the shared knowledge entry has been marked as an invalid entry and removed in the S4.2 integrity verification stage, and will not participate in the grouping operation.
[0108] S4.5: Based on the generated fusion group set, perform weighted fusion operation on each fusion group to obtain the fusion confidence value.
[0109] In this embodiment, the initial confidence value field of each shared knowledge entry in the fusion group and the agent identifier of the agent that sent the shared knowledge entry are read. Based on the agent identifier, a preset agent trust weight table is queried to obtain the trust weight value corresponding to each shared knowledge entry. The initial confidence value field of each shared knowledge entry is multiplied by the corresponding trust weight value and summed. Then, the sum is divided by the sum of the trust weight values of all shared knowledge entries in the fusion group, and the resulting quotient is used as the fusion confidence value corresponding to the fusion group.
[0110] It should be noted that each agent reads the agent trust weight table from the locally pre-stored configuration file. This table stores the mapping relationship between the agent identifier and the trust weight value. When the trust weight values of each agent are the same, the weighted fusion degenerates into an arithmetic mean of the initial confidence values of each shared knowledge item.
[0111] S4.6: Associate the fusion confidence value with the original edge identifier field of the shared knowledge item in each fusion group, find the corresponding causal edge in the local causal knowledge graph stored locally based on the original edge identifier field, and update the confidence attribute value of the found corresponding causal edge to the fusion confidence value.
[0112] In this embodiment, when performing a search operation, each agent performs a three-field joint match between the predecessor node identifier field, successor node identifier field, and action type label field of each shared knowledge entry and the local predecessor node identifier, local successor node identifier, and local action type label of each causal edge in the local causal knowledge graph. The local causal edge that matches all three fields is taken as the corresponding causal edge to be updated. The original edge identifier field is used to assist in rapid positioning in this embodiment. When the receiving agent and the sending agent adopt a unified node identifier encoding standard, the receiving agent directly uses the original edge identifier field to perform an index search in the local causal knowledge graph. When there is a difference in the node identifier encoding between the receiving agent and the sending agent, the result of the three-field joint matching is used as the final positioning basis, and the result of the three-field joint matching takes precedence over the index result of the original edge identifier field.
[0113] It should be noted that the node identifier encoding standard is uniformly set by each agent through a negotiation mechanism before the collaborative task starts. During the initialization phase, each agent stores the unified node identifier encoding standard in its local configuration file. In subsequent collaborative tasks, each agent generates node identifiers according to the unified node identifier encoding standard, thereby ensuring that the causal node identifiers in the sender's original edge identifier field are consistent and comparable with the node identifiers in the receiver's local causal knowledge graph. When updating the corresponding causal edge in the local causal knowledge graph, each agent also retains the initial value of the causal strength of the causal edge unchanged. The updated fusion confidence value and the timestamp of this update are written into the confidence attribute value field and update record field of the corresponding causal edge in the local causal knowledge graph. Each agent also stores the initial value of the original confidence of each shared knowledge entry in the fusion group as a historical record in the historical confidence list of the corresponding causal edge for subsequent traceable queries.
[0114] S4.7: Traverse all fusion groups, update the fusion confidence values of each fusion group to the corresponding causal edges of the local causal knowledge graph, generate the updated local causal knowledge graph, and store the updated local causal knowledge graph in the local graph database for subsequent steps.
[0115] S5: Generate an initial task planning sequence based on the updated local causal knowledge graph and subtask dependencies. Select key subtasks on the dependency path from the initial task planning sequence. Traverse each candidate action in the set of optional actions and calculate the expected cumulative reward value. Use the planning sequence corresponding to the maximum expected cumulative reward value as the current collaborative task planning scheme.
[0116] S5.1: Extract the initial causal strength value, fusion confidence value, and action type label of all causal edges from the updated local causal knowledge graph, and use the product of the initial causal strength value and the fusion confidence value of the same causal edge as the comprehensive utility value of that causal edge.
[0117] It should be noted that the confidence attribute value carried by each causal edge in the updated local causal knowledge graph is the fused confidence value after weighted fusion, and the initial value of causal strength remains unchanged in S4.6.
[0118] When calculating the overall utility value, the product of the initial causal strength value and the fusion confidence value is used as the overall utility value. If the initial causal strength value is negative, the overall utility value is negative, indicating that the state transition corresponding to the causal edge has an inhibitory effect on the overall planning objective. If the fusion confidence value is zero, the overall utility value is zero, indicating that the causal edge does not have any utility impact on path selection due to lack of confidence. Regardless of whether its causal strength is positive or negative, it is regarded as a neutral edge to avoid erroneously introducing positive or negative effects under uncertain conditions.
[0119] S5.2: Determine the topology execution order of each subtask node based on the subtask dependency relationship, and generate the subtask topology sequence.
[0120] In this embodiment, the topological execution order of each subtask node is determined based on the subtask nodes and directed edges in the subtask dependency relationship. A subtask node without a predecessor subtask node is selected from the subtask dependency relationship as the starting subtask node. Starting from the starting subtask node, all subtask nodes in the subtask dependency relationship are traversed layer by layer according to the direction of the directed edges to generate a subtask topological sequence.
[0121] It should be noted that the subtask dependency relationship is the directed acyclic graph structure constructed in S1.2, and the subtask node without a predecessor subtask node is the subtask node with an in-degree of zero.
[0122] When there are multiple subtask nodes with an in-degree of zero in the subtask dependency relationship, the multiple subtask nodes with an in-degree of zero are sorted according to the order in which they appear in the task specification file. The sorted nodes are then used as the starting subtask nodes in turn, and all subtask nodes are traversed in turn.
[0123] When generating the subtask topology sequence, each agent also checks for directed cycles in the subtask dependencies. The check is performed by traversing all subtask nodes in the subtask dependencies using a depth-first search. During the traversal, the set of nodes on the current recursive path is maintained. If a successor node of a subtask node is detected to already exist in the set of nodes on the current recursive path, a directed cycle is determined to exist, and the set of subtask nodes constituting the directed cycle is recorded. When a directed cycle is detected, each agent first reports the directed cycle anomaly to the master agent, which then checks and eliminates the directed cycle according to the following rules: The controlling agent extracts all subtask nodes that constitute the directed cycle and the directed edges between them, and obtains the generation source identifier of each directed edge. The generation source identifier includes the source of the reference relationship and the source of the ordinal relationship. The source of the reference relationship is generated by the reference expressions between chapters in the task specification file; the source of the ordinal relationship is generated by the ordinal relationship of the chapter numbers. If the directed edges forming a directed cycle contain at least one directed edge whose generation source is identified as a reference relationship source, the master control agent will first delete the directed edge whose generation timestamp is the latest among them. The latest generation timestamp indicates that the reference relationship was added in the later modification of the task specification file and has the highest probability of conflicting with other reference relationships. If there are no directed edges in the directed edges that form a directed cycle that are derived from reference relationships, i.e. all of them are generated from ordinal relationships, then the controlling agent retains the sub-task node with the earliest first appearance order according to the order of first appearance of each sub-task node in the task specification file, and deletes the directed edges that point from the sub-task node with the latest first appearance order to the sub-task node with the earliest first appearance order in the directed cycle. In other words, the edge pointing from the last appearing node to the first appearing node is deleted in the directed cycle, thereby breaking the cycle. The master agent will broadcast the directed edge information to be deleted according to the above rules to all subordinate agents. Each agent will uniformly perform the deletion operation in its own memory copy according to the broadcast information. When deleting a directed edge, each agent will record the identifier of the deleted directed edge and its two end sub-task nodes, as well as the deletion rule number, in the local exception log for subsequent manual review.
[0124] The above-mentioned operation of deleting directed edges only applies to the memory copy used to generate the current task planning sequence and does not permanently modify the original content of the task specification file. Under normal circumstances, the subtask dependencies are generated by parsing the structured task specification file and should be a directed acyclic graph structure. The appearance of directed cycles is a case of error in the task specification file. The above processing method is a fault tolerance mechanism to ensure that the system can still generate usable task planning sequences under abnormal conditions.
[0125] It should be noted that the operation of deleting directed edges only applies to the memory copy used to generate the current task planning sequence and does not permanently modify the original content of the task specification file. Under normal circumstances, the subtask dependencies are generated by parsing the structured task specification file and should be a directed acyclic graph structure. The appearance of directed cycles is a case of error in the task specification file. The above processing method is a fault tolerance mechanism to ensure that the system can still generate a usable task planning sequence under abnormal conditions.
[0126] S5.3: Generate an initial task planning sequence based on the mapping relationship between each subtask node in the subtask topology sequence and each causal node in the updated local causal knowledge graph.
[0127] In this embodiment, the method for generating the initial task planning sequence is as follows: find the starting causal node and the ending causal node corresponding to each subtask node from the updated local causal knowledge graph, take all causal paths between the starting causal node and the ending causal node as candidate causal paths, calculate the sum of the comprehensive utility values of all causal edges on each candidate causal path, take the candidate causal path with the largest sum of comprehensive utility values as the subtask execution path corresponding to each subtask node, and arrange all subtask execution paths in the order of the subtask topology sequence to generate the initial task planning sequence.
[0128] All causal paths between the starting causal node and the ending causal node are all directed paths that start from the starting causal node and follow the direction of the causal edges in the updated local causal knowledge graph to the ending causal node.
[0129] It should be noted that since the updated local causal knowledge graph is constructed based on state transition samples generated during the execution of actual collaborative tasks, directed cycles may exist in the graph structure (e.g., state transitions corresponding to round trips or retries during agent execution). When enumerating all causal paths between the starting and ending causal nodes, each agent only enumerates simple paths that do not repeatedly pass through the same causal node, ignoring paths containing duplicate nodes. When the number of simple paths exceeds the preset path limit, each agent sorts the candidate paths from highest to lowest based on the sum of the comprehensive utility values of the first preset number of hops (e.g., the first three causal edges). Only the first preset number of candidate paths are retained for subsequent calculations, and the remaining candidate paths are not enumerated. This ensures that the path search process is completed within a finite number of steps and has a definite optimal solution.
[0130] When there is no connected path between the starting causal node and the ending causal node, each agent first selects the causal node with the largest sum of comprehensive utility values from all causal nodes reachable along the causal edge direction starting from the starting causal node as the alternative ending node; if there are no other causal nodes reachable from the starting causal node, then the starting causal node itself is used as the ending node, forming a single-node path containing only the starting causal node as the candidate causal path.
[0131] When the sum of the combined utility values of multiple candidate causal paths is the same, each agent selects the candidate causal path with the fewest causal edges as the subtask execution path.
[0132] S5.4: Select key subtasks on the dependency path from the initial task planning sequence and generate a list of key subtasks.
[0133] In this embodiment, each agent reads the sequence of causal nodes on each sub-task execution path in the initial task planning sequence, extracts the sub-task execution paths containing causal nodes whose in-degree is greater than a preset in-degree threshold or whose out-degree is greater than a preset out-degree threshold from the causal node sequence, and marks the extracted sub-task execution paths as dependency paths; selects the sub-tasks corresponding to the causal nodes located in the middle of the dependency paths as key sub-tasks, and forms a key sub-task list from all the key sub-tasks selected on the dependency paths.
[0134] When the number of causal nodes on the dependency path is even, each agent selects the subtask corresponding to the causal node one position earlier than the middle position of the dependency path and the subtask corresponding to the causal node one position later than the middle position as the key subtask; when there are duplicate subtasks in the list of key subtasks, the duplicate subtasks are deduplicated and the unique subtask identifier is retained.
[0135] It should be noted that the in-degree is the number of causal edges pointing to the causal node in the updated local causal knowledge graph, and the out-degree is the number of causal edges originating from the causal node and pointing to other causal nodes in the updated local causal knowledge graph. Both the preset in-degree and out-degree thresholds are set to 2. This value is based on the following: a causal node with an in-degree or out-degree greater than 2 means that the node simultaneously receives state convergence from two or more causal edges or sends state forks to two or more causal edges. This indicates that the node has a significant convergence or forking effect in the collaborative task dependency path, and its influence on the subsequent task planning sequence is the widest. Therefore, it is determined to have this value. The key sub-tasks are defined as follows: a value of 1 will cover all non-terminal nodes, resulting in too many key sub-tasks and insignificant optimization significance; a value of 3 may lead to an empty list of key sub-tasks in scenarios with sparse node degree distribution, making it impossible to effectively implement the candidate action evaluation in S5.6; based on the above analysis, both the preset in-degree threshold and the preset out-degree threshold are set to 2; if there are no causal nodes with an in-degree or out-degree greater than 2 in the actual task graph, resulting in an empty list of key sub-tasks, then each agent will skip the optimization steps from S5.5 to S5.7 and directly output the initial task planning sequence generated in S5.3 as the current collaborative task planning scheme.
[0136] S5.5: Generate a corresponding list of candidate actions based on the list of key subtasks.
[0137] In this embodiment of the application, for each key subtask in the key subtask list, the action type label of the causal node corresponding to the key subtask in the subtask execution path corresponding to the key subtask is read, the set of optional actions corresponding to the action type label is queried from the preset correspondence table between action type labels and optional action sets, all candidate actions are extracted from the set of optional actions, and a list of candidate actions corresponding to each key subtask is generated.
[0138] A table showing the correspondence between preset action type labels and selectable action sets is stored in the local memory of each agent. This table is generated based on the legal action vector combinations defined by the preset action coding rules in S1.4, which correspond to each action type: the movement action type label corresponds to the action vector set consisting of a legal combination of speed level value and turning angle value; the grasping action type label corresponds to the action vector set consisting of grasping state value; the allocation action type label corresponds to the action vector set consisting of a legal combination of resource allocation level value and receiver number value; and the communication action type label corresponds to the action vector set consisting of a legal combination of communication type value and communication range value. The candidate action is at least one of the execution actions defined in S1.4.
[0139] When generating the candidate action list, the task constraints are read: for movement action types, candidate actions are filtered based on speed limit constraints and turning range constraints; for grabbing and allocation action types, candidate actions are filtered based on resource limit constraints; for communication action types, candidate actions are filtered based on the restrictions related to communication resource usage in the resource limit constraints; candidate actions that do not meet the applicable constraint dimensions for the corresponding action type are removed from the available action set; when the candidate action list is empty, the sum of the absolute values of the deviations of each candidate action in the available action set on each constraint dimension is calculated, and the candidate action with the smallest total deviation is selected as the unique candidate action.
[0140] S5.6: Traverse the candidate actions of each key subtask and calculate the expected cumulative reward value corresponding to the candidate action.
[0141] In this embodiment, the expected cumulative reward value is calculated as follows: Each candidate action from the candidate action list corresponding to each key subtask is substituted into the execution path of that key subtask; the action type label of the causal edge where the causal node of the key subtask is located is updated to the action type identifier of the candidate action; the sum of the new comprehensive utility values of the execution path of the key subtask is recalculated based on the comprehensive utility values of each causal edge in the execution path after updating the action type labels; and the average of the sum of the new comprehensive utility values of all execution paths of the key subtask is used as the path influence factor of the candidate action. The formula for calculating the expected cumulative reward value is as follows: ; Where E(a) is the expected cumulative reward value corresponding to candidate action a, and F(a) is the path influence factor of candidate action a. This is the sum of the comprehensive utility values of the execution paths of the preceding subtasks of this critical subtask; when this critical subtask is the first subtask in the subtask topology sequence, there are no preceding subtask execution paths, and the sum of the comprehensive utility values is... When set to 0, E(a) = F(a), meaning the expected cumulative reward value equals the path influence factor itself, representing the overall utility contribution determined solely by the current key subtask action selection; when this key subtask is not the first subtask, The cumulative utility value is the expected cumulative reward value, which is a comprehensive reflection of the impact of candidate actions on the overall planning by adding the cumulative utility of the preceding path to the impact factor of the current action.
[0142] The method for recalculating the new total comprehensive utility value of the subtask execution path corresponding to the key subtask is as follows: reread the initial causal strength value and fusion confidence value of the causal edge where the causal node corresponding to the key subtask is located after updating the action type label from the updated local causal knowledge graph, calculate the product of the two as the updated comprehensive utility value; add the updated comprehensive utility value to the comprehensive utility value of other causal edges in the subtask execution path that have not updated action type labels to obtain the new total comprehensive utility value.
[0143] The preceding subtask execution path is the union of the execution paths of all subtasks preceding the critical subtask in the subtask topology sequence, and the sum of the comprehensive utility values of the preceding subtask execution paths. The sum of the comprehensive utility values of all causal edges is used to unify the set. When the action type identifier of a candidate action is the same as the action type label before the update, the path influence factor corresponding to the candidate action is equal to the sum of the original comprehensive utility values of the execution path of the subtask corresponding to the key subtask, thereby ensuring that the same action does not cause changes in the planning sequence.
[0144] S5.7: Select the candidate action with the highest expected cumulative reward value to generate the current collaborative task planning scheme.
[0145] In this embodiment, each agent sorts the expected cumulative reward values of each candidate action corresponding to each key subtask in descending order, selects the action type identifier corresponding to the candidate action with the largest expected cumulative reward value as the optimal action of the key subtask, arranges the optimal actions of each key subtask in the order of each key subtask in the key subtask list, and generates an optimal action sequence; updates the action type labels on the subtask execution paths corresponding to each key subtask in the initial task planning sequence to the corresponding optimal actions in the optimal action sequence, generates an updated task planning sequence, and uses the updated task planning sequence as the current collaborative task planning scheme.
[0146] When multiple candidate actions for the same key subtask have the same expected cumulative reward value, the candidate action with the largest sum of the original comprehensive utility values of the subtask execution path corresponding to the key subtask is selected as the optimal action.
[0147] The current collaborative task planning scheme includes all subtask execution paths arranged in a subtask topology sequence. The observation state corresponding to each step in each subtask execution path is identified by the causal node in the updated local causal knowledge graph. The execution action corresponding to each step is the action type label carried by the causal edge in the subtask execution path or the updated optimal action.
[0148] It should be noted that the action type labels on the execution paths of non-critical subtasks in the current collaborative task planning scheme remain unchanged; each agent stores the current collaborative task planning scheme in its local planning cache and sends the current collaborative task planning scheme to the execution mechanism controller of each agent, which then executes the current collaborative task according to the observation state and execution action in the current collaborative task planning scheme.
[0149] In summary, this invention establishes a correspondence between task semantics and historical execution experience by parsing local experience trajectories into observed states, executed actions, and immediate reward values, and combining this with task objectives, task constraints, and subtask dependencies. It constructs a local causal knowledge graph using state transition sample sets, occurrence frequencies, initial values of causal strength, and initial values of confidence, enabling agents to transform scattered experiences into quantifiable and traceable causal knowledge. By filtering task-related causal edges based on task objectives and subtask dependencies and generating shared knowledge summaries, it reduces communication redundancy and noise interference caused by sharing irrelevant experiences. By performing confidence-weighted fusion on causal edges pointing to the same causal node and with the same action type, it improves the consistency and credibility of cross-agent knowledge. Finally, by selecting subtask execution paths based on comprehensive utility values and calculating expected cumulative reward values for key subtasks through candidate actions, collaborative task planning can simultaneously consider causal reliability, task dependency order, and execution benefits, thereby improving the accuracy, stability, and knowledge reuse efficiency of task planning in multi-agent collaborative scenarios.
[0150] like Figure 2 As shown, the present invention also provides a task planning and knowledge sharing system for multi-agent collaboration, comprising: The data parsing module is used to acquire local experience trajectory and task description data, extract task objectives, task constraints and subtask dependencies from the task description data, and parse the local experience trajectory into the observation status, execution actions and immediate reward values at each time step. The knowledge construction module is used to build a state transition sample set based on the observed state, the executed action and the immediate reward value, count the occurrence frequency of each state transition pair, calculate the initial value of causal strength and the initial value of confidence, and build a local causal knowledge graph. The summary generation module, based on the task objectives and subtask dependencies, filters task-related causal edges from the local causal knowledge graph to form a shared knowledge summary; The knowledge fusion module is used to receive the shared knowledge summary of the collaborative agents, and to weight and fuse the initial confidence values of multiple causal edges that point to the same causal node and have the same action type, to obtain the fused confidence value and update the corresponding causal edge in the local causal knowledge graph. The task planning module is used to generate an initial task planning sequence based on the updated local causal knowledge graph and subtask dependencies. It selects key subtasks on the dependency path from the initial task planning sequence, traverses each candidate action in the set of optional actions and calculates the expected cumulative reward value, and uses the planning sequence corresponding to the maximum expected cumulative reward value as the current collaborative task planning scheme.
[0151] The task planning and knowledge sharing system for multi-agent collaboration provided in the embodiments of the present invention can execute the task planning and knowledge sharing method for multi-agent collaboration provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
Claims
1. A task planning and knowledge sharing method for multi-agent collaboration, characterized in that, include: Acquire local experience trajectory and task description data, extract task objectives, task constraints and subtask dependencies from the task description data, and parse the local experience trajectory into observation status, execution actions and instant reward values at each time step; A state transition sample set is constructed based on the observed state, the executed action, and the immediate reward value. The frequency of occurrence of each state transition pair is counted, the initial value of causal strength and the initial value of confidence are calculated, and a local causal knowledge graph is constructed. Based on the task objective and the subtask dependencies, task-related causal edges are filtered from the local causal knowledge graph to form a shared knowledge summary. Receive the shared knowledge summary of the collaborative agent, and weight and fuse the initial confidence values of multiple causal edges pointing to the same causal node and with the same action type to obtain a fused confidence value and update the corresponding causal edge of the local causal knowledge graph; An initial task planning sequence is generated based on the updated local causal knowledge graph and the subtask dependencies. Key subtasks on the dependency path are selected from the initial task planning sequence. Each candidate action in the set of optional actions is traversed and the expected cumulative reward value is calculated. The planning sequence corresponding to the maximum expected cumulative reward value is taken as the current collaborative task planning scheme. The method for obtaining the fusion confidence value includes: Read the local predecessor node identifier, local successor node identifier, and local action type label of all causal edges in the local causal knowledge graph stored locally to obtain the knowledge entries to be merged and shared. The shared knowledge items to be merged are grouped according to the rule that they point to the same causal node and have the same action type. All shared knowledge items with the same successor node identifier field and the same action type label field are divided into the same fusion group to generate a fusion group set. Based on the generated fusion group set, a weighted fusion operation is performed on each fusion group to obtain the fusion confidence value.
2. The task planning and knowledge sharing method for multi-agent collaboration according to claim 1, characterized in that, The method for generating the initial task planning sequence includes: Find the starting causal node and ending causal node corresponding to each subtask node from the updated local causal knowledge graph, take all causal paths between the starting causal node and the ending causal node as candidate causal paths, and calculate the sum of the comprehensive utility values of all causal edges on each candidate causal path. The candidate causal path with the largest sum of comprehensive utility value is taken as the subtask execution path corresponding to each subtask node, and all subtask execution paths are arranged in the order of the subtask topology sequence to generate the initial task planning sequence.
3. The task planning and knowledge sharing method for multi-agent collaboration according to claim 2, characterized in that, Extract the initial causal strength value, fusion confidence value, and action type label of all causal edges from the updated local causal knowledge graph, and use the product of the initial causal strength value and the fusion confidence value of the same causal edge as the comprehensive utility value of that causal edge.
4. The task planning and knowledge sharing method for multi-agent collaboration according to claim 1, characterized in that, The construction of the local causal knowledge graph includes: Each agent uses the discrete observation state code corresponding to each observation state as the unique identifier of the causal node, the observation state itself as the node attribute information of the corresponding causal node, the direction from the previous state to the successor state in each state transition pair as the direction of the causal edge, the initial value of the causal strength of the state transition pair as the causal strength attribute value of the corresponding causal edge, the initial value of the confidence of the state transition pair as the confidence attribute value of the corresponding causal edge, and the transition action of the state transition pair as the action type label of the corresponding causal edge. The local causal knowledge graph is composed of all the causal nodes, all the causal edges, the causal strength attribute value of each causal edge, the confidence attribute value of each causal edge, and the action type label of each causal edge.
5. The task planning and knowledge sharing method for multi-agent collaboration according to claim 1, characterized in that, The formation of the shared knowledge summary includes Extract all causal nodes and all causal edges from the local causal knowledge graph, and use all the causal nodes as candidate nodes and all the causal edges as candidate causal edges. Based on the task objective, all candidate nodes are subjected to a first-level screening to obtain task objective-related nodes; Based on the subtask dependency relationship, a second-level screening is performed on all the candidate nodes to obtain a set of subtask dependency-related nodes. The task-related node set is generated by taking the union of the task target-related node set and the subtask-dependent node set. Then, candidate causal edges with two endpoints belonging to the task-related node set are extracted from all the candidate causal edges in the local causal knowledge graph. The extracted candidate causal edges are used as task-related candidate causal edges. Read the preset first and second sharing thresholds to filter causal edges to be shared; Extract the initial value of causal strength, the initial value of confidence, the action type label, and the node identifiers of the starting and ending causal nodes of each causal edge to be shared. Package the extracted information into units of each causal edge to be shared to generate a shared knowledge entry corresponding to each causal edge to be shared. The set of shared knowledge entries corresponding to all causal edges to be shared is used as a shared knowledge summary.
6. The task planning and knowledge sharing method for multi-agent collaboration according to claim 5, characterized in that, The first level of filtering includes: Each agent reads the action type labels carried by all causal edges associated with each candidate node in the local causal knowledge graph, and reads the label-target mapping table pre-stored in the configuration file; converts the action type labels into corresponding task target semantic identifiers through the label-target mapping table; performs a string-by-string complete match between the converted task target semantic identifiers and the task target keywords in the task target; if a candidate node has at least one associated causal edge whose converted task target semantic identifier matches the task target keyword, then the candidate node is marked as a task target-related node; otherwise, the candidate node is not marked.
7. The task planning and knowledge sharing method for multi-agent collaboration according to claim 5, characterized in that, The second level of screening includes: Read the start execution node identifier and end execution node identifier of each subtask node from the subtask dependency relationship. Mark the candidate nodes that match the start execution node identifier or the end execution node identifier as subtask dependency directly related nodes. Starting from the subtask dependency directly related nodes, traverse all reachable nodes along the directed edge direction in the subtask dependency relationship. Mark all reachable nodes obtained by traversal as subtask dependency extended related nodes. Take the union of the subtask dependency directly related nodes and the subtask dependency extended related nodes as the subtask dependency related node set.
8. The task planning and knowledge sharing method for multi-agent collaboration according to claim 5, characterized in that, The method for filtering the causal edges to be shared includes: Each agent determines whether the initial value of the causal strength of each task-related candidate causal edge is greater than the first shared threshold, and whether the initial value of the confidence of each task-related candidate causal edge is greater than the second shared threshold. When the initial value of the causal strength is greater than the first shared threshold and the initial value of the confidence is greater than the second shared threshold, the task-related candidate causal edge is selected as a causal edge to be shared. When the initial value of the causal strength of the task-related candidate causal edge is less than or equal to the first shared threshold, or the initial value of the confidence is less than or equal to the second shared threshold, each agent marks the task-related candidate causal edge as a non-shared causal edge.
9. A task planning and knowledge sharing system for multi-agent collaboration, used to implement the task planning and knowledge sharing method for multi-agent collaboration as described in any one of claims 1 to 8, characterized in that, include: The data parsing module is used to acquire local experience trajectory and task description data, extract task objectives, task constraints and subtask dependencies from the task description data, and parse the local experience trajectory into observation status, execution actions and instant reward values at each time step. The knowledge construction module is used to construct a state transition sample set based on the observed state, the executed action, and the immediate reward value, count the occurrence frequency of each state transition pair, calculate the initial value of causal strength and the initial value of confidence, and construct a local causal knowledge graph. The summary generation module, based on the task objective and the subtask dependencies, filters task-related causal edges from the local causal knowledge graph to form a shared knowledge summary; The knowledge fusion module is used to receive the shared knowledge summary of the collaborative intelligent agent, and to weight and fuse the initial confidence values of multiple causal edges that point to the same causal node and have the same action type to obtain a fused confidence value and update the corresponding causal edge of the local causal knowledge graph. The task planning module is used to generate an initial task planning sequence based on the updated local causal knowledge graph and the subtask dependencies, select key subtasks on the dependency path from the initial task planning sequence, traverse each candidate action in the set of optional actions and calculate the expected cumulative reward value, and take the planning sequence corresponding to the maximum expected cumulative reward value as the current collaborative task planning scheme.
Citation Information
Patent Citations
A cluster-oriented multi-agent collaborative task planning method
CN119536258B
Intelligent agent autonomous cooperation method and system based on group hierarchical cooperation
CN121560520A
Multi-agent layered collaborative optimization method based on knowledge graph and graph neural network
CN121901024A