An intelligent decision-making method of a large model agent based on a knowledge graph

By constructing a relational subgraph in the knowledge graph and introducing a semantic manifold projection transition mechanism and the MCTS algorithm, the inconsistency problem of path generation in the knowledge graph is solved, and a highly stable and reliable intelligent decision-making method is realized.

CN122334499APending Publication Date: 2026-07-03KEXUN JIALIAN INFORMATION TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KEXUN JIALIAN INFORMATION TECH CO LTD
Filing Date
2026-04-13
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately locate associated subgraphs in knowledge graphs, lack semantic continuity in the path generation process, exhibit poor stability in decision search, and produce decision paths that are inconsistent with the knowledge graph structure, thus affecting the reliability and interpretability of decision results.

Method used

By constructing a knowledge graph, generating a set of graph nodes and a set of relationships, extracting associated subgraphs and generating an initial path sequence, introducing a semantic manifold projection transition mechanism using an improved LLaMA3 model, constructing a decision search tree and generating a trajectory state set using the MCTS algorithm, combining the Riemann optimization algorithm for trajectory alignment and consistency measurement, generating the optimal trajectory and reconstructing the path.

Benefits of technology

It improves the continuity and structural consistency of path semantic expression, thereby enhancing the stability of decision search and the reliability of the final decision result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122334499A_ABST
    Figure CN122334499A_ABST
Patent Text Reader

Abstract

This invention discloses a knowledge graph-based large-scale model agent intelligent decision-making method, comprising the following steps: S1, acquiring business data and target tasks, generating a graph node set and a graph relation set; S2, extracting associated subgraphs; S3, inputting the initial path sequence into an improved LLaMA3 model, generating semantic manifold trajectories by introducing a semantic manifold projection transition mechanism; S4, constructing a decision search tree, generating a trajectory state set using the MCTS algorithm; S5, generating a trajectory mapping set using the Riemann optimization algorithm; S6, determining the optimal trajectory; S7, performing path restoration processing on the optimal trajectory to generate a target path sequence, and generating a decision result based on the target path sequence. This invention combines semantic manifold trajectory modeling with trajectory consistency measurement to achieve high-precision path reasoning and stable decision output in complex graph structures, improving the accuracy and interpretability of intelligent decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent decision-making technology, and in particular to an intelligent decision-making method based on a large model agent using knowledge graphs. Background Technology

[0002] With the rapid development of knowledge graph and large-scale model technologies, the demand for intelligent decision-making in complex business scenarios is constantly increasing. Constructing structured knowledge representations based on multi-source data and combining them with reasoning mechanisms to achieve automated decision-making has gradually become an important research direction in the field of data processing. In existing technologies, business data is typically organized by constructing knowledge graphs, and then decision results are generated by combining rule-based reasoning or simple path search methods. Some solutions introduce large-scale models to perform semantic understanding of paths. However, in practical applications, the following problems are commonly encountered: Knowledge graphs contain numerous nodes and complex relational structures. Existing subgraph extraction methods often rely on keyword matching or fixed rule filtering, making it difficult to accurately locate highly relevant subgraphs in large-scale graph structures. This results in redundant nodes and irrelevant relationships in subsequent path construction. Path generation is typically based on simple traversal or heuristic search, lacking the ability to model the semantic continuity of paths. The semantic associations between nodes and relationships in a path are discretely distributed, affecting the accuracy of path representation. Large models often use global attention computation in path modeling, lacking constraints on local structural semantics and easily influenced by irrelevant nodes, leading to biases in the generated semantic representation. In the decision search stage, traditional tree search methods lack a mechanism to measure the semantic consistency of paths, making it difficult to uniformly evaluate different path states, resulting in poor stability of search results. In the path reconstruction process, existing methods struggle to accurately map high-dimensional semantic representations back to the original graph structure, leading to inconsistencies between the generated decision paths and the knowledge graph structure, thus affecting the reliability and interpretability of the final decision results.

[0003] Therefore, how to provide a knowledge graph-based large-scale model agent intelligent decision-making method is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] One objective of this invention is to propose a knowledge graph-based large-scale model agent intelligent decision-making method. This invention constructs a knowledge graph and generates a set of graph nodes and graph relationships. Based on the target task, it extracts related subgraphs and generates an initial path sequence. The initial path sequence is input into an improved LLaMA3 model, and a semantic manifold projection transition mechanism is introduced to generate semantic manifold trajectories. A decision search tree is constructed based on the semantic manifold trajectories, and the MCTS algorithm is used to generate a trajectory state set. The Riemann optimization algorithm is used to perform trajectory alignment in the semantic manifold space, constructing a trajectory consistency metric and generating a trajectory mapping set. The decision search tree is consistently updated to determine the optimal trajectory, and path reconstruction is performed to generate the target path sequence. This method possesses advantages such as strong continuity of path semantic expression, high stability of decision search, high trajectory alignment accuracy, and high reliability of decision results.

[0005] According to an embodiment of the present invention, a knowledge graph-based large-model agent intelligent decision-making method includes the following steps: S1. Obtain business data and target tasks, perform entity recognition, relation extraction and attribute parsing on the business data, construct a knowledge graph, and generate a graph node set and a graph relation set; S2. Based on the target task, extract the associated subgraphs from the graph node set and the graph relationship set, and generate an initial path sequence based on the node connection relationships in the associated subgraphs; S3. Input the initial path sequence into the improved LLaMA3 model, and perform path semantic modeling on the initial path sequence by introducing a semantic manifold projection transition mechanism to generate a semantic manifold trajectory; S4. Construct a decision search tree based on the semantic manifold trajectory, and use the MCTS algorithm to perform selection, expansion and state evolution processing on the trajectory states in the decision search tree to generate a trajectory state set; S5. Perform trajectory embedding processing on the trajectory state set, and use the Riemann optimization algorithm to perform trajectory alignment in the semantic manifold space corresponding to the semantic manifold trajectory, construct a trajectory consistency metric, and generate a trajectory mapping set; S6. Based on the trajectory mapping set and the trajectory consistency measure, perform a consistent update process on the decision search tree to determine the optimal trajectory; S7. Perform path restoration processing on the optimal trajectory to generate a target path sequence, and generate a decision result based on the target path sequence.

[0006] Optionally, S1 specifically includes: Acquire business data and target tasks, and classify and organize the business data according to its source to form text data, tabular data, and log data; The text data is processed by word segmentation, part-of-speech tagging, and named entity extraction to obtain entity name, entity category, and entity attribute fields; the table data is processed by field parsing, primary key matching, and record merging to obtain entity attribute records; the log data is processed by event item extraction, event object extraction, and event time extraction to obtain candidate relationship records. Perform deduplication and normalization processing on entity names, entity categories, entity attribute fields, entity attribute records, and relation candidate records to generate entity sets and relation candidate sets; Graph nodes are created based on the entity name, entity category, and entity attribute fields in the entity set, and graph relationships are created based on the associated objects, association types, and association directions in the relation candidate set. Perform consistency checks on graph nodes and graph relationships, delete conflicting nodes and relationships, and generate a set of graph nodes and a set of graph relationships.

[0007] Optionally, the step of extracting associated subgraphs from the graph node set and the graph relation set based on the target task specifically includes: Perform task parsing on the target task to obtain task theme terms, task object terms, and task relationship terms; Based on task theme words, task object words, and task relationship words, node matching is performed on the graph node set to obtain the target node set; Based on the target node set, perform relation matching on the graph relation set to obtain the target relation set; Perform neighborhood expansion based on the target node set and the target relation set to obtain the expanded node set and the expanded relation set. Perform connectivity filtering on the extended node set and extended relation set, and delete isolated nodes and isolated relations; Subgraph construction is performed on the filtered set of extended nodes and extended relationships to generate an associated subgraph.

[0008] Optionally, generating the initial path sequence based on the node connection relationships in the associated subgraph specifically involves: Perform start and end node identification on the node connection relationships in the associated subgraph to obtain the set of start nodes and the set of end nodes; Based on the set of starting nodes, the set of ending nodes, and the node connection relationships, a path traversal is performed to obtain a set of candidate paths. The node arrangement and relational connection order in the candidate path set are sorted to obtain the path node chain; Perform duplicate node elimination and duplicate path elimination on the path node chain to obtain a set of deduplicated paths; Perform path length sorting and relational order sorting on the deduplication path set to generate an initial path sequence.

[0009] Optionally, the improved LLaMA3 model specifically includes a path encoding module, a self-attention module, a feedforward transformation module, and a trajectory output module; The path encoding module reads the node identifier, node category, relationship type, and connection order from the initial path sequence, converts the node identifier into a node tag vector, the node category into a category tag vector, the relationship type into a relationship tag vector, and the connection order into a sequence tag vector, and combines the node tag vector, category tag vector, relationship tag vector, and sequence tag vector according to the arrangement order in the initial path sequence to generate a path tag sequence; The self-attention module forms a query sequence, a key sequence, and a value sequence based on the path label sequence, and introduces a semantic manifold projection transition mechanism into the query sequence. In this mechanism, local neighborhoods are divided according to the semantic distance between adjacent query vectors in the query sequence. A local semantic subspace is constructed based on the set of query vectors in the local neighborhood. The main direction of the local semantic subspace is determined based on the arrangement direction of the query vectors and the semantic distance sorting direction in the local neighborhood. Each query vector in the query sequence is mapped to the corresponding local semantic subspace, and the mapped query vector is continuously shifted along the main direction of the local semantic subspace to generate a transition query sequence. The semantic vectors in the value sequence are sorted, summed, and their positions are written back according to the corresponding association values ​​between the transition query sequence and the key sequence to generate an attention output sequence. The feedforward transformation module inputs each output vector in the attention output sequence into a linear mapping layer, expands the output vector to a high-dimensional semantic space, inputs the vector components in the high-dimensional semantic space into a nonlinear activation layer to form an activation vector, and inputs the activation vector into a linear shrinking layer to generate a path semantic sequence corresponding to the path label sequence order. The trajectory output module sequentially concatenates adjacent semantic vectors in the path semantic sequence according to the node arrangement order and relation connection order in the initial path sequence to form a trajectory point sequence, and generates a semantic manifold trajectory according to the connection order between adjacent trajectory points in the trajectory point sequence.

[0010] Optionally, the construction of the decision search tree based on the semantic manifold trajectory specifically involves: Arrange the trajectory points in the semantic manifold trajectory according to the connection order to obtain the trajectory point sequence; Extract the first trajectory point from the trajectory point sequence and set the trajectory state corresponding to the first trajectory point as the root node; According to the adjacent connection relationship in the trajectory point sequence, the trajectory state corresponding to each trajectory point is sequentially connected to the decision search tree to form a branch node; Based on the connection endpoints in the trajectory point sequence, the trajectory state corresponding to the terminal trajectory point is set as a leaf node; The node hierarchy is established according to the connection order between the root node, branch nodes, and leaf nodes; the node hierarchy includes parent node relationships and child node relationships. The node hierarchy in the decision search tree is sequentially labeled to generate the decision search tree; the decision search tree includes root node, branch node, leaf node and node hierarchy relationship.

[0011] Optionally, the step of using the MCTS algorithm to perform selection, expansion, and state evolution processing on the trajectory states in the decision search tree to generate a trajectory state set specifically involves: Starting from the root node of the decision search tree, read the branch nodes layer by layer along the node hierarchy, and determine the candidate trajectory status according to the connection path from the root node to the leaf node. Select the trajectory states with unexpanded child nodes from the candidate trajectory states as the trajectory states to be expanded; Based on the set of child nodes corresponding to the trajectory state to be expanded, add the unconnected nodes in the set of child nodes to the decision search tree to generate the expanded trajectory state; Starting from the extended trajectory state, continue reading subsequent nodes according to the node connection order in the decision search tree until a leaf node is read, thus generating a state evolution path; The trajectory states in the state evolution path are arranged according to the reading order to form an evolution state sequence; The trajectory states in the candidate trajectory states, extended trajectory states, and evolutionary state sequences are aggregated to generate a trajectory state set.

[0012] Optionally, S5 specifically includes: Each trajectory state in the trajectory state set is read sequentially according to the node hierarchy and connection order of the trajectory state in the decision search tree to obtain the state arrangement sequence; Based on the connection order between adjacent trajectory states in the state arrangement sequence, the trajectory points corresponding to each trajectory state are mapped to the semantic manifold space corresponding to the semantic manifold trajectory, thus obtaining the set of state manifold points. Pair adjacent state manifold points in the set of state manifold points according to the connection order to generate a set of state point pairs; The set of state point pairs is input into the Riemann optimization algorithm. The positions of the state manifold points in the semantic manifold space are adjusted according to the manifold distance and connection direction of each pair of state points in the set, so as to obtain the aligned state point set. A trajectory consistency metric is constructed based on the manifold distance, connection direction difference, and arrangement order difference between adjacent aligned state points in the aligned state point set. Write the aligned state point set back to the trajectory state according to the order of the state arrangement sequence to generate the trajectory mapping set.

[0013] Optionally, S6 specifically includes: Obtain the alignment state point corresponding to each trajectory state in the trajectory mapping set, and arrange them according to the node hierarchy and connection order of the trajectory states in the decision search tree to obtain the mapping state sequence; Obtain the manifold distance, connection direction difference, and permutation order difference corresponding to the adjacent trajectory states in the trajectory consistency metric, and write them into the corresponding nodes in the decision search tree according to the permutation order in the mapping state sequence; Starting from the leaf nodes of the decision search tree, backtrack along the node hierarchy to the root node and extract the trajectory consistency metric value corresponding to each node. The trajectory consistency metric value corresponding to each node is accumulated in the backtracking order from leaf node to root node to generate a node consistency value sequence. Write each consistent value in the sequence of consistent values ​​into the corresponding node in the decision search tree, and update the node order according to the parent node relationship and child node relationship; The updated decision search tree is traversed layer by layer from the root node along the branch nodes. The consistency values ​​of nodes in the same layer are compared to determine the connection path with the largest consistency value and generate the optimal trajectory.

[0014] Optionally, S7 specifically includes: Arrange the trajectory states in the optimal trajectory according to the connection order in the optimal trajectory to obtain the restored state sequence; Each trajectory state in the restored state sequence is matched with the corresponding trajectory state in the trajectory mapping set, and the corresponding alignment state point is extracted. Based on the arrangement and connection order of the aligned state points in the semantic manifold trajectory, determine the sequence of trajectory points corresponding to the aligned state points; The trajectory point sequence is reverse-matched with the path node chain in the initial path sequence to determine the node identifier and relationship type corresponding to the trajectory point sequence. The target path sequence is generated by reorganizing the nodes according to their identifiers and relationship types in the initial path sequence and the order of connection. The decision path is determined by matching the node identifiers, node categories, and relationship types in the target path sequence with the target node set and target relationship set in the association subgraph. The decision result is generated based on the arrangement of nodes and the connection results in the decision path.

[0015] The beneficial effects of this invention are: Based on the target task, the associated subgraphs are extracted from the graph node set and graph relation set and an initial path sequence is generated. To address the problem of redundant nodes caused by dependency rule matching in subgraph extraction in existing methods, a combination of node matching, relation matching, neighborhood expansion and connectivity filtering is adopted to achieve structural convergence of associated subgraphs and improve the accuracy and effectiveness of path construction. The initial path sequence is input into the improved LLaMA3 model and a semantic manifold projection transition mechanism is introduced to generate semantic manifold trajectories. To address the issues of discrete path semantic expression and global attention interference, continuous semantic trajectories are constructed through local semantic subspace mapping and transition query sequences, thereby improving the continuity and structural consistency of path semantic expression. A decision search tree is constructed based on semantic manifold trajectories, and the trajectory state set is generated using the MCTS algorithm. The Riemann optimization algorithm is then used to align trajectories in the semantic manifold space and construct a trajectory consistency metric. This addresses the lack of a unified evaluation standard in the decision search process, achieving a consistent expression of trajectory states in spatial structure and connectivity, and improving the stability of the search process. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a knowledge graph-based large-model agent intelligent decision-making method proposed in this invention; Figure 2 This is a schematic diagram of the improved LLaMA3 model proposed in this invention; Figure 3 This is a data flow diagram for a knowledge graph-based large-scale model agent intelligent decision-making method proposed in this invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0018] refer to Figures 1-3 A knowledge graph-based large-scale model agent intelligent decision-making method includes the following steps: S1. Obtain business data and target tasks, perform entity recognition, relation extraction and attribute parsing on the business data, construct a knowledge graph, and generate a graph node set and a graph relation set; S2. Based on the target task, extract the associated subgraphs from the graph node set and graph relation set, and generate an initial path sequence based on the node connection relationships in the associated subgraphs; S3. Input the initial path sequence into the improved LLaMA3 model, and perform path semantic modeling on the initial path sequence by introducing a semantic manifold projection transition mechanism to generate a semantic manifold trajectory. S4. Construct a decision search tree based on semantic manifold trajectories, and use the MCTS algorithm to perform selection, expansion and state evolution processing on the trajectory states in the decision search tree to generate a trajectory state set; S5. Perform trajectory embedding processing on the trajectory state set, and use the Riemann optimization algorithm to perform trajectory alignment in the semantic manifold space corresponding to the semantic manifold trajectory, construct a trajectory consistency metric, and generate a trajectory mapping set; S6. Based on the trajectory mapping set and trajectory consistency measure, perform consistent update processing on the decision search tree to determine the optimal trajectory; S7. Perform path restoration processing on the optimal trajectory to generate the target path sequence, and generate decision results based on the target path sequence.

[0019] In this embodiment, S1 specifically refers to: Acquire business data and target tasks. Business data includes text data, tabular data, and log data. Target tasks include task keywords, task object keywords, and task relationship keywords. Classify and organize business data according to their source. Group data with the same source, record format, and time range into the same data group to form text datasets, tabular datasets, and log datasets. Each text record in the text dataset is segmented into words, and continuous text is split into a sequence of terms. The word sequence is labeled with part-of-speech tags, marking nouns, verbs, time words, and attribute words. Terms representing object names are extracted from the word sequence as entity names, terms representing object categories are extracted as entity categories, and terms representing object features are extracted as entity attribute fields, forming text entity records. The table dataset is parsed by field names, field contents, and record numbers. Field names are matched with field contents. Multiple records with the same record number or the same primary key field are matched by primary key. The matched records are merged into the same record according to field name to form entity attribute records. Entity attribute records include entity name, entity category, and attribute values ​​corresponding to entity attribute fields. For each log record in the log dataset, event items are extracted. Action description, time description, and object description are extracted from the log content. The action description is used as the event item, the object description is split into event object and associated object, and the time description is organized into a unified time format to form a relation candidate record. The relation candidate record includes event item, event object, associated object, and event time. The entity names in text entity records, entity attribute records and relation candidate records are deduplicated. Names with different characters but the same meaning, abbreviations and full names that correspond to each other, and different codes but the same object are merged into a unified name. Entity categories and entity attribute fields are standardized. Synonymous categories are merged into a unified category name and attribute fields with the same meaning are merged into a unified field name, forming entity sets and relation candidate sets. Create a graph node for each entity name in the entity set, write the entity category corresponding to the entity name into the category position of the graph node, and write the entity attribute field and attribute value corresponding to the entity name into the attribute position of the graph node. The node connection endpoints are determined according to the event objects and associated objects in the relation candidate set. The action descriptions corresponding to the event items are classified into the association type, and the chronological relationship corresponding to the event time is classified into the association direction. Graph relationships are established between the graph nodes corresponding to the event objects and the graph nodes corresponding to the associated objects. Consistency checks are performed on graph nodes. Graph nodes with the same entity name, conflicting entity categories, and inconsistent attribute fields are marked as conflicting nodes. Consistency checks are performed on graph relationships. Graph relationships with the same connection endpoints, opposite association types, and contradictory association directions are marked as conflicting relationships. Conflicting nodes and conflicting relationships are deleted from the knowledge graph. The verified graph nodes and graph relationships are retained to generate a graph node set and a graph relationship set. The task topic terms, task object terms, and task relationship terms in the target task are matched with the entity names, entity categories, and association types in the knowledge graph node set to form a term correspondence table between the target task and the knowledge graph.

[0020] In this embodiment, based on the target task, a related subgraph is extracted from the graph node set and the graph relation set, specifically as follows: Obtain the task theme words, task object words, and task relationship words in the target task. Map the task theme words to entity categories in the graph node set, map the task object words to entity names in the graph node set, and map the task relationship words to association types in the graph relationship set to form a target task term group. According to the entity category, entity name and association type in the target task term group, the graph node set and graph relation set are compared item by item. Graph nodes with the same entity category are marked as topic candidate nodes, graph nodes with the same entity name are marked as object candidate nodes, and graph relations with the same association type are marked as relation candidate edges. Perform node matching on candidate topic nodes and candidate object nodes. Retain graph nodes that satisfy both entity category correspondence and entity name correspondence in the target node set, and remove graph nodes that do not satisfy the correspondence from the target node set. Perform relation matching on candidate edges, retain graph relations whose connecting endpoints are both in the target node set in the target relation set, and remove graph relations whose connecting endpoints are incomplete or whose association direction is inconsistent with the task relation words from the target relation set; Expand the graph from each graph node in the target node set to the adjacent graph nodes layer by layer. Include the graph nodes that are directly connected to the graph nodes in the target node set into the extended node set, and include the graph relationships that connect the adjacent graph nodes in the extended node set into the extended relationship set. For each graph node in the extended node set, check the connection relationships. Graph nodes that do not form a connection relationship with other graph nodes in the target node set or the extended node set are marked as isolated nodes. For each graph relationship in the extended relationship set, check the connection endpoints. Graph relationships whose connection endpoints do not fall into the extended node set are marked as isolated relationships. Remove isolated nodes from the extended node set and isolated relationships from the extended relationship set, while retaining the extended node set and extended relationship set after deletion; Create subgraph node items according to the node identifiers in the preserved extended node set, create subgraph relationship items according to the connection endpoints, association types and association directions in the preserved extended relationship set, and combine the subgraph node items and subgraph relationship items to generate an associated subgraph. The node identifier, entity category, attribute field, connection endpoint, association type, and association direction in the association subgraph are registered in sequence to form an association subgraph record.

[0021] In this embodiment, an initial path sequence is generated based on the node connection relationships in the association subgraph, specifically as follows: Obtain the node identifier, connection endpoint, association type, and association direction in the associated subgraph. Add the node identifiers whose connection endpoints are located at the start of the connection to the start node set, and add the node identifiers whose connection endpoints are located at the end of the connection to the end node set. Using each node identifier in the starting node set as the path starting point, search for the next node identifier connected to the path starting point along the connection endpoints in the association subgraph, and record the association type and association direction between the path starting point and the next node identifier to form a path segment. Continue searching for connected node identifiers based on the terminating node in the path segment. Record the association type and association direction between the terminating node and the found connected node identifiers after the path segment to form a continuous path record until the end node in the continuous path record falls into the terminating node set, thus obtaining a candidate path set. For each consecutive path record in the candidate path set, arrange the node identifiers according to the order of node appearance, arrange the association type and association direction according to the connection order between node identifiers, and write the node identifiers and association types in the same consecutive path record in sequence to form a path node chain; The node identifiers in the path node chain are compared item by item. Duplicate node identifiers in the same path node chain are deleted, and the connection relationship before and after the deletion of duplicate nodes is preserved. The order of nodes, the order of association types, and the order of association directions among the path node chains are compared item by item. Path node chains with the same node order, the same association type, and the same association direction are merged into one path node chain to obtain a set of deduplicated paths. For each path node chain in the deduplication path set, count the number of node identifiers and write the number of node identifiers to the path length position of the corresponding path node chain. For each path node chain in the deduplication path set, arrange the association type and association direction according to the order of the appearance of the node identifiers, and register the path length, node identifier arrangement result, association type arrangement result, and association direction arrangement result in sequence to generate the initial path sequence; Number each path in the initial path sequence sequentially, and write the starting node, ending node, path length, node identifier arrangement result, association type arrangement result, and association direction arrangement result of each path into the path record table.

[0022] In this embodiment, the improved LLaMA3 model specifically includes a path encoding module, a self-attention module, a feedforward transformation module, and a trajectory output module; Each path in the initial path sequence is split into path items according to node identifier, node category, relationship type and connection order. Node identifiers in the same path are paired with corresponding node categories, and the relationship types between adjacent nodes are paired with connection order to form a path item list. Map each node identifier in the path item list to a node label vector, each node category to a category label vector, each relation type to a relation label vector, and each connection order to a sequence label vector. The node label vector, category label vector, relation label vector, and sequence label vector are represented by vectors of the same length. According to the arrangement order in the initial path sequence, the node label vectors and category label vectors at the same position are arranged accordingly, and the relationship label vectors and order label vectors between the adjacent node label vectors are inserted to form a path label sequence arranged in the order of node first, relationship second, and order last. The path tag sequence is input into the self-attention module, and each vector in the path tag sequence is linearly mapped through different parameter matrices to form a query sequence, a key sequence, and a value sequence. The number of vectors in the query sequence, key sequence, and value sequence is the same as the number of vectors in the path tag sequence. A semantic manifold projection transition mechanism is introduced into the query sequence. Specifically, for each query vector in the query sequence, the differences between the vector components are compared with the previous query vector and the next query vector. Neighboring query vectors with smaller component differences are grouped into the same local neighborhood. The component differences include the sum of the absolute values ​​of the differences in the values ​​of each dimension. The query vectors in the same local neighborhood are arranged in order to form a query vector set. The values ​​of each dimension of the query vector set are summarized one by one to obtain the local semantic distribution. The original direction is retained for the dimensions with large numerical changes in the local semantic distribution, and the dimensions with small numerical changes are compressed to the same plane of change to form a local semantic subspace. The query vector arrangement direction is determined according to the order of the query vectors in the local neighborhood, and the semantic distance sorting direction is determined according to the difference between the components of the query vectors and their adjacent query vectors in the local neighborhood. The query vector arrangement direction and the semantic distance sorting direction are used together as the main direction of the local semantic subspace. Project each query vector in the query sequence onto the corresponding local semantic subspace, retain the components of the query vector in the main direction of the local semantic subspace, and compress the components of the query vector outside the main direction of the local semantic subspace according to the local semantic distribution to obtain the mapped query vector. The mapped query vector is continuously shifted along the main direction of the local semantic subspace. The starting point of the shift is the current position of the mapped query vector, and the ending point of the shift is the corresponding position of the next query vector in the local neighborhood in the main direction. During the shift, the connection order is kept unchanged, forming a jump query sequence. Each query vector in the transition query sequence is matched one by one with each key vector in the key sequence. The degree of change of the vector components in the same direction is compared to obtain the corresponding association value. The larger the corresponding association value, the stronger the semantic association between the transition query vector and the key vector. The semantic vectors in the value sequence are reordered according to the size of the corresponding association values. The semantic vectors with larger corresponding association values ​​are placed at the front. The reordered semantic vectors are summed item by item according to the size of their corresponding association values. The sum is written back to the same position as the original path label sequence to generate the attention output sequence. Each output vector in the attention output sequence is input into the feedforward transformation module. First, the vector dimension is increased through a linear mapping layer, so that each output vector is expanded to a high-dimensional semantic space. Then, each component in the high-dimensional semantic space is input into a nonlinear activation layer. Components with values ​​less than zero are compressed, while components with values ​​greater than zero retain their growth trend, thus forming an activation vector. The activation vector is input into the linear shrinking layer, and the components in the high-dimensional semantic space are remapped to the same number of components as the path label sequence vector, resulting in a path semantic sequence. Each semantic vector in the path semantic sequence corresponds one-to-one with the corresponding position in the path label sequence. The path semantic sequence is input into the trajectory output module. According to the node arrangement order in the initial path sequence, the semantic vectors of the corresponding node positions are arranged sequentially. Then, according to the relation connection order, the semantic vectors of the corresponding relation positions are inserted between the semantic vectors of adjacent nodes to form a sequentially connected semantic vector arrangement result. The adjacent semantic vectors in the sequentially connected semantic vectors are connected end to end, and the end component of the previous semantic vector is connected to the beginning component of the next semantic vector to form a trajectory point sequence. Each trajectory point in the trajectory point sequence corresponds to a semantic vector in the path semantic sequence. According to the connection order between adjacent trajectory points in the trajectory point sequence, the previous trajectory point is connected to the next trajectory point in sequence, and the order of node arrangement and relationship connection is preserved to generate a semantic manifold trajectory. Each trajectory point in the semantic manifold trajectory is registered to correspond with the node identifier, node category, relationship type, and connection order in the initial path sequence, forming a trajectory correspondence record.

[0023] In this embodiment, both the improved LLaMA3 model and the LLaMA3 model adopt a vectorized representation based on path label sequences. During sequence modeling, path semantic expression is completed through association calculations between query sequences, key sequences, and value sequences. Both include path encoding, self-attention calculation, feedforward transformation, and output expression processes. The improved LLaMA3 model introduces a semantic manifold projection transition mechanism in its self-attention module, replacing the original association calculation method based on global vector inner product with a segmented modeling method based on local semantic subspaces. Local neighborhoods are divided in the query sequence according to the semantic distance between adjacent query vectors. The set of query vectors in the local neighborhood is mapped to a local semantic subspace, and the main direction of the local semantic subspace is determined based on the query vector arrangement direction and the semantic distance sorting direction. This ensures that each query vector no longer directly participates in global association calculations but completes semantic expression within the local semantic subspace. The improved LLaMA3 model maps query vectors to local semantic subspaces and performs continuous displacements along the main direction, forming a transition query sequence. This allows the semantic relationships between adjacent nodes in the path to form a continuous spatial trajectory, avoiding the discrete semantic expression between nodes in traditional attention structures. The proposed improvements to the LLaMA3 model include: First, during semantic aggregation, the model sorts and sums semantic vectors in the value sequence based on the corresponding association values ​​between the transition query sequence and the key sequence, accumulating semantic contributions according to local semantic consistency and increasing the weight of key nodes and relationships in the path. Second, the model constrains the distribution range of query vectors through local semantic subspaces, transforming the path semantic expression from a globally unconstrained space to a locally continuous semantic space, reducing interference from irrelevant nodes. Third, the model enhances the structural expressive power of path semantics by forming semantic manifold trajectories, ensuring consistent connection order of node identifiers, node categories, and relationship types in the continuous space. Fourth, when processing multi-path inputs, the model uses local neighborhood partitioning and semantic subspace mapping to create a distinguishable distribution of semantic differences between different paths, improving path semantic discriminability. Fifth, the model provides continuous and structurally consistent semantic manifold trajectories before constructing the decision search tree, providing a stable input basis for subsequent trajectory state expansion and consistency measurement, thereby improving the accuracy of trajectory alignment results and the reliability of optimal trajectory determination.

[0024] In this embodiment, a decision search tree is constructed based on the semantic manifold trajectory, specifically as follows: Obtain all trajectory points and the connection order between trajectory points in the semantic manifold trajectory, and arrange each trajectory point according to the connection order to form a trajectory point sequence; The first trajectory point in the trajectory point sequence is assigned as the initial trajectory state, and the initial trajectory state is placed at the top level of the decision search tree as the root node. Each trajectory point in the trajectory point sequence that is after the initial trajectory state is mapped to a subsequent trajectory state. According to the connection relationship between the previous and subsequent trajectory states in the trajectory point sequence, a node connection is established between the previous trajectory state and the next trajectory state. The trajectory states that are after the root node and before the final trajectory state are sequentially connected to the decision search tree to form branch nodes. The last trajectory point in the trajectory point sequence is assigned to the end trajectory state, and the end trajectory state is placed at the position connected to the previous branch node as a leaf node. According to the connection order in the trajectory point sequence, establish a parent node relationship between the root node and the adjacent branch node, establish a child node relationship between each branch node and the next level trajectory state, and establish a hierarchical relationship between adjacent branch nodes in sequence according to the connection direction, thus forming a node hierarchy relationship; Each connection path from the root node to the leaf node is registered in the order of the trajectory point sequence. The position of each node in the connection path is marked sequentially. The node in the first position is marked as the first-level node, the node in the second position is marked as the second-level node, and so on, to obtain the node hierarchy arrangement result. Write the node hierarchy arrangement results to the corresponding positions of each node, and write the root node, branch nodes, leaf nodes, parent node relationships and child node relationships into the same tree structure record to generate a decision search tree; For each node in the decision search tree, register the corresponding trajectory status, node level, previous node position, and next node position. For each connection relationship in the decision search tree, register the connection start point, connection end point, and connection order to form a decision search tree record table. The node arrangement results in the decision search tree record table are matched one by one with the trajectory point arrangement results in the semantic manifold trajectory. The node connection relationships that are consistent with the trajectory point arrangement results are retained, and the node connection relationships that are inconsistent with the trajectory point arrangement results are deleted, so as to obtain a decision search tree that is consistent with the semantic manifold trajectory.

[0025] In this embodiment, the MCTS algorithm is used to perform selection, expansion, and state evolution processing on the trajectory states in the decision search tree to generate a trajectory state set, specifically: Obtain the root node, branch nodes, leaf nodes, parent node relationships, child node relationships, and node hierarchy relationships in the decision search tree, and use the trajectory state corresponding to the root node as the starting trajectory state; Starting from the initial trajectory state, the branch nodes connected to the initial trajectory state are searched layer by layer according to the node hierarchy relationship along the parent node relationship and child node relationship. The trajectory states on each connection path between the root node and the leaf node are listed in sequence to form a candidate trajectory state sequence. For each trajectory state in the candidate trajectory state sequence, check the number of child nodes. Retain trajectory states that have child nodes and whose child nodes include positions not connected to the decision search tree as trajectory states to be expanded, and remove trajectory states that do not contain unconnected nodes from the trajectory states to be expanded. Obtain the set of child nodes corresponding to the state of the trajectory to be expanded, compare each node in the set of child nodes with the existing nodes in the decision search tree, and determine the nodes that do not appear in the connection path of the decision search tree as unconnected nodes; According to the order of the child node set, connect the unconnected nodes one by one to the trajectory state to be expanded, and write the parent node relationship and child node relationship between the unconnected nodes and the trajectory state to be expanded into the decision search tree to form the expanded node connection path, and map the expanded nodes to the expanded trajectory state. Starting from the extended trajectory state, find the next node connected to the extended trajectory state according to the node connection order, and then connect the trajectory state corresponding to the next node to the extended trajectory state in sequence until the end node in the connection path falls into the leaf node position, thus forming a state evolution path. The trajectory states in the state evolution path are arranged in order of connection, with the trajectory state located at the previous connection position placed at the front and the trajectory state located at the next connection position placed at the back, forming an evolution state sequence. The trajectory states in the candidate trajectory state sequence, the extended trajectory state, and the trajectory states in the evolutionary state sequence are aggregated into the same state set. Identical trajectory states in the state set are merged. The merged trajectory states are rearranged according to the connection order from the root node to the leaf node to generate a trajectory state set. Register each trajectory state in the trajectory state set with its corresponding node in the decision search tree, and write the node level, connection position and extension position corresponding to the trajectory state into the trajectory state record table. The trajectory state arrangement results in the trajectory state record table are matched with the node connection paths in the decision search tree item by item. The trajectory states whose trajectory state arrangement results are consistent with the node connection paths are retained, and the trajectory states whose trajectory state arrangement results are inconsistent with the node connection paths are deleted, so as to obtain the trajectory state set that is consistent with the decision search tree.

[0026] In this embodiment, S5 specifically refers to: Obtain all trajectory states in the trajectory state set, the node hierarchy and connection order in the decision search tree, and arrange each trajectory state in order of node hierarchy from low to high, and nodes at the same level in order of connection, to form a state arrangement sequence. Each trajectory state in the state arrangement sequence is mapped to a trajectory point in the semantic manifold trajectory one by one. The connection position of the trajectory state in the decision search tree is mapped to the connection position of the trajectory point in the semantic manifold trajectory one by one. Each trajectory state is mapped to a trajectory point in the semantic manifold trajectory. The corresponding trajectory points are placed into the semantic manifold space corresponding to the semantic manifold trajectory. The original arrangement position and connection direction of each trajectory point are preserved in the semantic manifold space to form a set of state manifold points. The previous state manifold point and the next state manifold point in the set of state manifold points are paired according to the connection order. Two state manifold points located at adjacent connection positions are formed into a state point pair. All state point pairs are arranged in sequence to form a set of state point pairs. The set of state point pairs is input into the Riemann optimization algorithm. The positions of the two state manifold points in each state point pair are adjusted in the semantic manifold space. The position adjustment process includes comparing the spatial interval between the two state manifold points, comparing the connection direction between the two state manifold points, and moving the state manifold points along the shortest connection direction in the semantic manifold space. The two state manifold points in the state point pair are gradually brought closer together until the connection direction is consistent and the spatial interval is kept continuous, forming an aligned state point set. In the set of aligned state points, the manifold distance is calculated for each group of adjacent aligned state points. The manifold distance is the path length of the adjacent aligned state points in the semantic manifold space. The connection direction difference is calculated for each group of adjacent aligned state points. The connection direction difference is the offset between the direction from the previous aligned state point to the next aligned state point and the corresponding connection direction in the state arrangement sequence. The arrangement order difference is calculated for each group of adjacent aligned state points. The arrangement order difference is the difference between the position difference of the aligned state points in the state arrangement sequence and the position difference in the semantic manifold trajectory. Write the manifold distance, connection direction difference, and arrangement order difference into the same measurement record according to the correspondence of the same state point pairs. Arrange all measurement records in the order of arrangement in the state point pair set to form a trajectory consistency measurement. Each aligned state point in the aligned state point set is written back to the corresponding trajectory state according to its position in the state arrangement sequence. The position, connection direction, and arrangement order of the aligned state points corresponding to the same trajectory state are also registered in the corresponding trajectory state to form a trajectory mapping set. Each trajectory state in the trajectory mapping set is mapped to a corresponding node in the decision search tree. The position of the aligned state point, the connection direction, and the order of arrangement of the trajectory state are written to the corresponding node position. The node correspondence that is consistent with the state arrangement sequence is retained, and the node correspondence that is inconsistent with the state arrangement sequence is deleted.

[0027] In this embodiment, S6 specifically refers to: Obtain all trajectory states in the trajectory mapping set and the alignment state point corresponding to each trajectory state. Arrange the trajectory states in sequence according to the node hierarchy and connection order in the decision search tree. Place the trajectory states located at the previous connection position at the front and the trajectory states located at the next connection position at the back to form a mapping state sequence. Each trajectory state in the mapping state sequence is mapped to the corresponding node in the decision search tree. The position of the aligned state point in the semantic manifold space is written to the corresponding node. The connection direction of the aligned state point is written to the connection direction position of the corresponding node. The arrangement position of the aligned state point is written to the arrangement position of the corresponding node. The manifold distance, connection direction difference, and arrangement order difference corresponding to the adjacent trajectory states in the trajectory consistency metric are extracted one by one and written into the adjacent nodes in the decision search tree according to the order in the mapping state sequence. The manifold distance, connection direction difference, and arrangement order difference corresponding to the same pair of adjacent trajectory states are assigned to the same node correspondence record. Starting from the leaf node in the decision search tree, search upwards along the node hierarchy to find the parent node directly connected to the leaf node. Summarize the manifold distance, connection direction difference, and arrangement order difference in the node correspondence records between the leaf node and the parent node into the trajectory consistency metric value corresponding to the leaf node. Continue searching upwards along the node hierarchy to find the parent node of the previous level. Merge the trajectory consistency metric value corresponding to the next level node with the manifold distance, connection direction difference, and arrangement order difference in the current node's corresponding relationship record. Record the merged value at the current node position. Complete this step by step according to the connection order from leaf node to root node to form a node consistency value sequence. The consensus value of each node in the node consensus value sequence is composed of the manifold distance, connection direction difference, and arrangement order difference of the corresponding node. The closer the manifold distance value is to zero, the closer the positions of adjacent trajectory states are in the semantic manifold space. The closer the connection direction difference value is to zero, the more consistent the connection directions between adjacent trajectory states are. The closer the arrangement order difference value is to zero, the more consistent the arrangement position of adjacent trajectory states in the decision search tree is with their arrangement position in the semantic manifold trajectory. Write each node consensus value in the node consensus value sequence into the corresponding node in the decision search tree, write the manifold distance into the distance item corresponding to the node position, write the connection direction difference into the direction item corresponding to the node position, and write the permutation order difference into the order item corresponding to the node position. The node arrangement order in the decision search tree is checked based on the parent node relationship and child node relationship. The node position corresponding to the parent node is kept before the child node. The node with the smallest manifold distance, the smallest difference in connection direction and the smallest difference in arrangement order among the node consistency values ​​is arranged in front of the node in the same layer. The node that does not meet the above conditions is arranged behind the node in the same layer. The node arrangement order in the decision search tree is updated. Starting from the root node, search layer by layer along the branch nodes. Compare the consistent values ​​of the nodes in the same layer one by one. Keep the node with the smallest manifold distance, the smallest difference in connection direction, and the smallest difference in arrangement order in the priority connection position, and keep the remaining nodes in other connection positions. According to the updated node arrangement order, starting from the root node, connect the branch nodes that satisfy the conditions of minimum manifold distance, minimum difference in connection direction, and minimum difference in arrangement order, until connecting to the leaf node, forming the optimal connection path corresponding to the node consistency value, and the connection path is corresponding to the optimal trajectory. The optimal trajectory record is formed by registering the trajectory state arrangement, node hierarchy, connection direction, and node consistency value in the optimal trajectory.

[0028] In this embodiment, S7 specifically refers to: Obtain all trajectory states and the connection order between trajectory states in the optimal trajectory. Arrange the trajectory states located at the previous connection position at the front and the trajectory states located at the next connection position at the back to form the restored state sequence. Each trajectory state in the restored state sequence is compared with the trajectory states in the trajectory mapping set one by one. The trajectory states with consistent node hierarchy, consistent connection direction, and consistent arrangement position are determined as the corresponding trajectory states. Alignment state points are extracted from the corresponding trajectory states. The alignment state points are listed in the order of arrangement in the restored state sequence. By comparing the arrangement of trajectory points in the semantic manifold trajectory, the corresponding position of each alignment state point in the semantic manifold trajectory is determined. The alignment state points connected at the corresponding positions are connected in sequence to form a trajectory point sequence. Each trajectory point in the trajectory point sequence is compared with the path node chain in the initial path sequence item by item. The arrangement position of the trajectory point in the semantic manifold trajectory corresponds to the arrangement position of the node in the path node chain. The connection order between trajectory points corresponds to the relationship connection order in the path node chain. The node identifier and relationship type corresponding to the trajectory point sequence are determined. The determined node identifiers are arranged sequentially according to their positions in the trajectory point sequence. The corresponding relationship types between adjacent node identifiers are then inserted between adjacent node identifiers in the order of connection, forming a continuous arrangement with node identifiers first and relationship types last. Write the node identifiers, relationship types, and connection order from the consecutive arrangement results into the same path record, and register all path records in the order of arrangement in the restored state sequence to generate the target path sequence. Each node identifier in the target path sequence is matched with the target node set in the association subgraph. Nodes with the same identifier and the same node category are retained as valid nodes. Each relation type in the target path sequence is matched with the target relation set in the association subgraph. Relationships with the same relation type and the same connection direction are retained as valid relations. The effective nodes are connected sequentially according to the order in the target path sequence, and the effective relationships are written between adjacent effective nodes according to the connection order in the target path sequence to form a decision path; The node arrangement results, relationship connection results, and connection directions in the decision path are arranged in sequence. The node arrangement results are mapped to decision objects, the relationship connection results are mapped to decision relationships, and the connection directions are mapped to decision order to generate decision results. The node identifier, node category, relationship type, connection direction, and path arrangement position in the decision results are recorded one by one to form a decision result record.

[0029] Example 1: To verify the feasibility of this invention in practice, it was applied to a supply chain anomaly handling scenario for a large chain retail enterprise. The enterprise processes approximately 120,000 orders daily, covering 8 regional warehouses, 46 forward warehouses, and 320 stores. Business data includes order records, inventory change records, logistics logs, procurement arrival records, and store replenishment requests. The target task is set as "generating collaborative decision-making results for replenishment and allocation of frequently out-of-stock items." In this scenario, the existing system mainly relies on manual review of inventory reports and a fixed rule engine for judgment. Common problems include slow anomaly identification, unstable cross-warehouse allocation paths, and inconsistent handling strategies for the same product in different regions, resulting in long store stockout recovery times, high allocation costs, and difficulty in tracing the decision-making basis.

[0030] After inputting business data and target tasks into the method of this invention, entity names, entity categories, and entity attribute fields are first extracted from order records, inventory logs, logistics events, and procurement records to form graph nodes such as products, warehouses, stores, transportation nodes, and procurement batches. Graph relationships such as inventory occupancy, in-transit transportation, historical replenishment, regional substitution, and supply relationships are also established, resulting in a graph node set and a graph relationship set. A subgraph of associations is extracted around the "out-of-stock product—replenishment source—transportation route—delivery time" framework, and an initial path sequence is generated based on the node connections in the subgraph. An improved LLaMA3 model is used to perform path semantic modeling on the initial path sequence, outputting a semantic manifold trajectory. A decision search tree is then constructed, and the MCTS algorithm is combined to form a trajectory state set. Addressing the deviations in timeliness, inventory safety, and transportation links among different replenishment paths, a Riemann optimization algorithm is used to align the trajectories, generating a trajectory mapping set and a trajectory consistency metric. Finally, the optimal trajectory is determined and restored to the target path sequence, outputting the decision results consisting of replenishment warehouse selection, allocation path, and replenishment batch size.

[0031] The actual deployment period was 28 days. 520 high-frequency out-of-stock tasks were selected as test samples, including 180 in North China, 160 in East China, and 180 in South China. Comparison object one was the enterprise's original rule engine solution, and comparison object two was the "knowledge graph + general LLaMA3 semantic retrieval" solution, without using the semantic manifold projection transition mechanism, MCTS algorithm, and Riemann optimization algorithm. Statistical metrics included average task decision time, path reconstruction accuracy, anomaly cause location accuracy, out-of-stock recovery time, cross-warehouse transfer success rate, and manual review percentage, as shown in Table 1.

[0032] Table 1. Comparison of Core Effectiveness of Supply Chain Anomaly Handling

[0033] As shown in Table 1, the method of this invention significantly outperforms the two comparative schemes in terms of overall performance across 520 test tasks. The average decision-making time decreased to 4.8 seconds, indicating smooth data transfer between the graph node set, graph relation set, associated subgraph, and semantic manifold trajectory, enabling rapid generation of the target path sequence. The path reconstruction accuracy reached 95.8%, a 24.4 percentage point improvement over the original rule engine scheme, demonstrating a stable correspondence between the optimal trajectory and the initial path sequence, and effective path reconstruction processing. The accuracy of anomaly cause localization and the success rate of cross-warehouse transfers improved simultaneously, indicating that the semantic manifold projection transition mechanism enhanced the continuity of path semantic expression, and the Riemann optimization algorithm was effective in constructing the trajectory consistency metric. The proportion of manual review decreased to 9.8%, indicating that the decision results can directly support business applications, reducing manual intervention.

[0034] Further, four typical product tasks were selected for item-by-item verification: ambient temperature fast-moving consumer goods, cold chain dairy products, holiday promotional items, and regional substitutes. The task complexity, number of candidate paths, trajectory consistency measurement results, final decision accuracy, and store recovery effect were recorded, resulting in Table 2.

[0035] Table 2 Typical Commodity Task Item Verification Table

[0036] As shown in Table 2, different product task types exhibit variations in node size and the number of candidate paths, yet the method of this invention maintains high stability. The holiday promotional item replenishment task, with 158 nodes in its associated subgraph and 27 candidate paths, represents the most complex task category, yet the target path sequence accuracy still reaches 93.9%, indicating that the decision search tree can effectively filter through complex graph structures. The cold chain dairy replenishment task is significantly affected by transportation timeliness and temperature control constraints, with an average trajectory consistency metric of 0.88 and a store stockout recovery time controlled within 4.8 hours, demonstrating good alignment between the trajectory alignment results and the actual business process. The accuracy rates for ambient temperature fast-moving consumer goods and regional substitute tasks both exceed 95%, indicating that the method of this invention has strong adaptability to high-frequency, standardized, and substitutable scenarios.

[0037] This invention addresses the challenges of forming stable decision-making paths from complex business data, the discrete semantic representation of paths, and inconsistent search results. The graph node set and graph relation set provide a unified data organization foundation for the target task. The extraction of associated subgraphs reduces interference from irrelevant nodes. The improved LLaMA3 model generates semantic manifold trajectories that enhance path semantic continuity. The MCTS algorithm strengthens multi-path search capabilities, and the Riemann optimization algorithm improves the reliability of trajectory alignment and consistent updates. After 28 days of continuous operation, the system showed no significant decision-making jitter. Business departments reported more focused replenishment suggestions, clearer allocation paths, and easier tracking of disposal results, demonstrating the invention's good engineering usability and promotional value.

[0038] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A knowledge graph-based large-scale model agent intelligent decision-making method, characterized in that, Includes the following steps: S1. Obtain business data and target tasks, perform entity recognition, relation extraction and attribute parsing on the business data, construct a knowledge graph, and generate a graph node set and a graph relation set; S2. Based on the target task, extract the associated subgraphs from the graph node set and the graph relationship set, and generate an initial path sequence based on the node connection relationships in the associated subgraphs; S3. Input the initial path sequence into the improved LLaMA3 model, and perform path semantic modeling on the initial path sequence by introducing a semantic manifold projection transition mechanism to generate a semantic manifold trajectory; S4. Construct a decision search tree based on the semantic manifold trajectory, and use the MCTS algorithm to perform selection, expansion and state evolution processing on the trajectory states in the decision search tree to generate a trajectory state set; S5. Perform trajectory embedding processing on the trajectory state set, and use the Riemann optimization algorithm to perform trajectory alignment in the semantic manifold space corresponding to the semantic manifold trajectory, construct a trajectory consistency metric, and generate a trajectory mapping set; S6. Based on the trajectory mapping set and the trajectory consistency measure, perform a consistent update process on the decision search tree to determine the optimal trajectory; S7. Perform path restoration processing on the optimal trajectory to generate a target path sequence, and generate a decision result based on the target path sequence.

2. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, Specifically, S1 is: Acquire business data and target tasks, and classify and organize the business data according to its source to form text data, tabular data, and log data; The text data is processed by word segmentation, part-of-speech tagging, and named entity extraction to obtain entity name, entity category, and entity attribute fields; the table data is processed by field parsing, primary key matching, and record merging to obtain entity attribute records; the log data is processed by event item extraction, event object extraction, and event time extraction to obtain candidate relationship records. Perform deduplication and normalization processing on entity names, entity categories, entity attribute fields, entity attribute records, and relation candidate records to generate entity sets and relation candidate sets; Graph nodes are created based on the entity name, entity category, and entity attribute fields in the entity set, and graph relationships are created based on the associated objects, association types, and association directions in the relation candidate set. Perform consistency checks on graph nodes and graph relationships, delete conflicting nodes and relationships, and generate a set of graph nodes and a set of graph relationships.

3. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, The step of extracting associated subgraphs from the graph node set and the graph relation set based on the target task specifically involves: Perform task parsing on the target task to obtain task theme terms, task object terms, and task relationship terms; Based on task theme words, task object words, and task relationship words, node matching is performed on the graph node set to obtain the target node set; Based on the target node set, perform relation matching on the graph relation set to obtain the target relation set; Perform neighborhood expansion based on the target node set and the target relation set to obtain the expanded node set and the expanded relation set. Perform connectivity filtering on the extended node set and extended relation set, and delete isolated nodes and isolated relations; Subgraph construction is performed on the filtered set of extended nodes and extended relationships to generate an associated subgraph.

4. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, The generation of the initial path sequence based on the node connection relationships in the associated subgraph is specifically as follows: Perform start and end node identification on the node connection relationships in the associated subgraph to obtain the set of start nodes and the set of end nodes; Based on the set of starting nodes, the set of ending nodes, and the node connection relationships, a path traversal is performed to obtain a set of candidate paths. The node arrangement and relational connection order in the candidate path set are sorted to obtain the path node chain; Perform duplicate node elimination and duplicate path elimination on the path node chain to obtain a set of deduplicated paths; Perform path length sorting and relational order sorting on the deduplication path set to generate an initial path sequence.

5. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, The improved LLaMA3 model specifically includes a path encoding module, a self-attention module, a feedforward transformation module, and a trajectory output module; The path encoding module reads the node identifier, node category, relationship type, and connection order from the initial path sequence, converts the node identifier into a node tag vector, the node category into a category tag vector, the relationship type into a relationship tag vector, and the connection order into a sequence tag vector, and combines the node tag vector, category tag vector, relationship tag vector, and sequence tag vector according to the arrangement order in the initial path sequence to generate a path tag sequence; The self-attention module forms a query sequence, a key sequence, and a value sequence based on the path label sequence, and introduces a semantic manifold projection transition mechanism into the query sequence. In this mechanism, local neighborhoods are divided according to the semantic distance between adjacent query vectors in the query sequence. A local semantic subspace is constructed based on the set of query vectors in the local neighborhood. The main direction of the local semantic subspace is determined based on the arrangement direction of the query vectors and the semantic distance sorting direction in the local neighborhood. Each query vector in the query sequence is mapped to the corresponding local semantic subspace, and the mapped query vector is continuously shifted along the main direction of the local semantic subspace to generate a transition query sequence. The semantic vectors in the value sequence are sorted, summed, and their positions are written back according to the corresponding association values ​​between the transition query sequence and the key sequence to generate an attention output sequence. The feedforward transformation module inputs each output vector in the attention output sequence into a linear mapping layer, expands the output vector to a high-dimensional semantic space, inputs the vector components in the high-dimensional semantic space into a nonlinear activation layer to form an activation vector, and inputs the activation vector into a linear shrinking layer to generate a path semantic sequence corresponding to the path label sequence order. The trajectory output module sequentially concatenates adjacent semantic vectors in the path semantic sequence according to the node arrangement order and relation connection order in the initial path sequence to form a trajectory point sequence, and generates a semantic manifold trajectory according to the connection order between adjacent trajectory points in the trajectory point sequence.

6. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, The construction of the decision search tree based on semantic manifold trajectories is specifically as follows: Arrange the trajectory points in the semantic manifold trajectory according to the connection order to obtain the trajectory point sequence; Extract the first trajectory point from the trajectory point sequence and set the trajectory state corresponding to the first trajectory point as the root node; According to the adjacent connection relationship in the trajectory point sequence, the trajectory state corresponding to each trajectory point is sequentially connected to the decision search tree to form a branch node; Based on the connection endpoints in the trajectory point sequence, the trajectory state corresponding to the terminal trajectory point is set as a leaf node; The node hierarchy is established according to the connection order between the root node, branch nodes, and leaf nodes; the node hierarchy includes parent node relationships and child node relationships. The node levels in the decision search tree are sequentially labeled to generate the decision search tree; The decision search tree includes a root node, branch nodes, leaf nodes, and node hierarchy.

7. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, The MCTS algorithm is used to perform selection, expansion, and state evolution processing on the trajectory states in the decision search tree to generate a trajectory state set, specifically as follows: Starting from the root node of the decision search tree, read the branch nodes layer by layer along the node hierarchy, and determine the candidate trajectory status according to the connection path from the root node to the leaf node. Select the trajectory states with unexpanded child nodes from the candidate trajectory states as the trajectory states to be expanded; Based on the set of child nodes corresponding to the trajectory state to be expanded, add the unconnected nodes in the set of child nodes to the decision search tree to generate the expanded trajectory state; Starting from the extended trajectory state, continue reading subsequent nodes according to the node connection order in the decision search tree until a leaf node is read, thus generating a state evolution path; The trajectory states in the state evolution path are arranged according to the reading order to form an evolution state sequence; The trajectory states in the candidate trajectory states, extended trajectory states, and evolutionary state sequences are aggregated to generate a trajectory state set.

8. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, Specifically, S5 is: Each trajectory state in the trajectory state set is read sequentially according to the node hierarchy and connection order of the trajectory state in the decision search tree to obtain the state arrangement sequence; Based on the connection order between adjacent trajectory states in the state arrangement sequence, the trajectory points corresponding to each trajectory state are mapped to the semantic manifold space corresponding to the semantic manifold trajectory, thus obtaining the set of state manifold points. Pair adjacent state manifold points in the set of state manifold points according to the connection order to generate a set of state point pairs; The set of state point pairs is input into the Riemann optimization algorithm. The positions of the state manifold points in the semantic manifold space are adjusted according to the manifold distance and connection direction of each pair of state points in the set, so as to obtain the aligned state point set. A trajectory consistency metric is constructed based on the manifold distance, connection direction difference, and arrangement order difference between adjacent aligned state points in the aligned state point set. Write the aligned state point set back to the trajectory state according to the order of the state arrangement sequence to generate the trajectory mapping set.

9. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, Specifically, S6 is: Obtain the alignment state point corresponding to each trajectory state in the trajectory mapping set, and arrange them according to the node hierarchy and connection order of the trajectory states in the decision search tree to obtain the mapping state sequence; Obtain the manifold distance, connection direction difference, and permutation order difference corresponding to the adjacent trajectory states in the trajectory consistency metric, and write them into the corresponding nodes in the decision search tree according to the permutation order in the mapping state sequence; Starting from the leaf nodes of the decision search tree, backtrack along the node hierarchy to the root node and extract the trajectory consistency metric value corresponding to each node. The trajectory consistency metric value corresponding to each node is accumulated in the backtracking order from leaf node to root node to generate a node consistency value sequence. Write each consistent value in the sequence of consistent values ​​into the corresponding node in the decision search tree, and update the node order according to the parent node relationship and child node relationship; The updated decision search tree is traversed layer by layer from the root node along the branch nodes. The consistency values ​​of nodes in the same layer are compared to determine the connection path with the largest consistency value and generate the optimal trajectory.

10. The knowledge graph-based large-scale model agent intelligent decision-making method according to claim 1, characterized in that, Specifically, S7 is: Arrange the trajectory states in the optimal trajectory according to the connection order in the optimal trajectory to obtain the restored state sequence; Each trajectory state in the restored state sequence is matched with the corresponding trajectory state in the trajectory mapping set, and the corresponding alignment state point is extracted. Based on the arrangement and connection order of the aligned state points in the semantic manifold trajectory, determine the sequence of trajectory points corresponding to the aligned state points; The trajectory point sequence is reverse-matched with the path node chain in the initial path sequence to determine the node identifier and relationship type corresponding to the trajectory point sequence. The target path sequence is generated by reorganizing the nodes according to their identifiers and relationship types in the initial path sequence and the order of connection. The decision path is determined by matching the node identifiers, node categories, and relationship types in the target path sequence with the target node set and target relationship set in the association subgraph. The decision result is generated based on the arrangement of nodes and the connection results in the decision path.