Semantic and structural based multi-layer fan-out detection method

By constructing an ontology-based rule base for hierarchical fan-out pattern detection and query behavior feature extraction, the problems of disordered explosion and high redundancy of query results in existing technologies are solved, and efficient knowledge graph query is achieved.

CN122491484APending Publication Date: 2026-07-31BEIJING ZHONGSHURUIZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZHONGSHURUIZHI TECH CO LTD
Filing Date
2026-04-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing semantic query schemes for knowledge bases lack hierarchical analysis of node aggregation patterns and ontology inheritance structures, resulting in disordered explosion of query results and high redundant execution load, making it difficult to support efficient semantic queries for large-scale knowledge graphs.

Method used

By constructing an ontology-based rule base, hierarchical fan-out pattern detection is performed on natural language questions input by users to generate a set of candidate fan-out clusters. Query behavior feature words are then extracted to generate a query execution plan and optimize the query path.

Benefits of technology

It reduces the data diffusion rate in large-scale ontology networks, reduces computational resource consumption, and improves the matching performance between query execution plans and user intent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491484A_ABST
    Figure CN122491484A_ABST
Patent Text Reader

Abstract

This application provides a multi-layer fan-out detection method based on semantics and structure, comprising: Step 1, performing query expansion processing on the original natural language question input by the user to generate multiple current expanded query nodes, thereby forming a current expanded query node set, and constructing an ontology basic rule base based on a preset ontology definition file; Step 2, performing hierarchical fan-out pattern detection processing on the current expanded query node set based on the ontology basic rule base to generate a candidate fan-out cluster set; Step 3, extracting class node information, relation link information, and field annotation information from the preset ontology definition file based on the candidate fan-out cluster set to generate a target fan-out cluster set; Step 4, extracting query behavior feature words from the original natural language question to jointly generate a query execution plan for executing the query with the target fan-out cluster set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of knowledge graph query and natural language processing technology, and more specifically, to a multi-layer fan-out detection method based on semantics and structure. Background Technology

[0002] With the deepening application of artificial intelligence and large language model technology, natural language question answering systems in vertical fields are gradually becoming more widespread, and the demand for efficient semantic queries on knowledge bases with complex ontology architectures continues to grow. Knowledge base queries need to balance the accuracy of semantic intent mapping with the computational overhead of the execution plan in order to transform natural language questions into efficient graph traversal paths.

[0003] Existing semantic query solutions for knowledge bases typically employ flat keyword matching and single-layer, preset hop count expansion for extended traversal. This solution first extracts the core entity tags from the natural language problem and directly retrieves the relevant nodes in the knowledge graph database. Subsequently, using the retrieved nodes as the starting point, it performs an exhaustive diffusion retrieval with a fixed number of hops along the connected relational edges. Finally, it aggregates and packages all instance nodes covered by the diffusion retrieval to form the query results and provides them to the user.

[0004] However, this existing semantic query scheme has obvious technical flaws. Because it directly employs isomorphic, indiscriminate exhaustive diffusion, it lacks hierarchical analysis of node aggregation patterns and ontology inheritance structures, making it prone to triggering disordered explosions of query results when processing complex semantic relationships. Furthermore, this scheme does not structurally isolate and filter candidate node relationships and user semantic intent features, resulting in a high level of redundant execution load in the final query execution path, making it difficult to support efficient semantic queries for large-scale knowledge graphs. Summary of the Invention

[0005] This application provides a multi-layer fan-out detection method based on semantics and structure to at least alleviate the above-mentioned technical problems.

[0006] A multi-layer fan-out detection method based on semantics and structure includes: Step 1: Perform query expansion processing on the original natural language question input by the user to generate multiple current expanded query nodes, which in turn constitute a set of current expanded query nodes. Based on a preset ontology definition file, construct an ontology basic rule base. The preset ontology definition file is the ontology specification file of the domain to which the original natural language question belongs. Step 2: Perform hierarchical fan-out pattern detection processing on the current extended query node set based on the ontology basic rule base to generate a candidate fan-out cluster set; Step 3: Based on the candidate fan-out cluster set, extract the class node information, relationship link information, and field annotation information corresponding to the candidate fan-out clusters from the preset ontology definition file to generate the target fan-out cluster set; Step 4: Extract query behavior feature words from the original natural language question to form a joint target fan-out cluster set, and generate a query execution plan for semantic querying in the knowledge base corresponding to the preset ontology based on the original natural language question.

[0007] Optionally, based on a preset ontology definition file, an ontology-based rule base for supporting node branch identification is constructed, including: Parse the preset ontology definition file to extract the object attribute set, class hierarchy information and attribute feature tags of the ontology class from the preset ontology definition file; The object attribute set, the class hierarchy information, and the attribute feature tags are subjected to structured aggregation processing to construct an ontology basic rule base for supporting node branch identification.

[0008] Optionally, the current extended query node includes class nodes composed of a source class, subclasses, and a parent class, as well as object attributes between class nodes. The source class represents the class node that serves as the starting point for traversal during the query extension process. The subclasses represent class nodes that inherit from other classes in the class hierarchy described by the class hierarchy information. The parent class represents class nodes that are inherited by other classes in the class hierarchy described by the class hierarchy information. The subclass hierarchy depth represents the number of inheritance levels of the subclass relative to the parent class in the class hierarchy described by the class hierarchy information. The object attributes represent the semantic association relationships between different class nodes.

[0009] Optionally, step 2 includes: The object attribute set is parsed from the ontology base rule base and, based on it, the first convergence topology structure, in which multiple different source classes point to the same target class through different object attributes, is identified from the current extended query node set to determine the first level fan-out node; The class hierarchy information is parsed from the ontology base rule base and, based on it, a second convergence topology structure is identified from the current extended query node set, in which multiple subclasses converge to the same parent class through inheritance relationships to determine the second-level fan-out nodes; Determine the remaining extended query nodes in the current extended query node set that are not covered by the first-level fan-out nodes and the second-level fan-out nodes, in order to determine the third-level fan-out nodes; The first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes are aggregated and encapsulated according to the fan-out convergence target node to obtain multiple candidate fan-out clusters, which in turn constitute the candidate fan-out cluster set.

[0010] Optionally, the first-level fan-out nodes are determined as follows: The target class in the first aggregation topology is determined and marked as a first-level fan-out node. The target class is a class node that is related to the original natural language question query target and is pointed to by multiple source classes through different object attributes. The second-level fan-out node is determined as follows: The parent class that meets the subclass hierarchy depth requirement in the second convergence topology is determined by a preset subclass hierarchy depth threshold and is then marked as the parent class in the second convergence topology. The third-level fan-out node is determined as follows: Calculate the semantic embedding vector similarity among the remaining extended query nodes; When the semantic embedding vector similarity between any two remaining extended query nodes exceeds a preset similarity threshold, the remaining extended query nodes that meet the condition are marked as third-level fan-out nodes.

[0011] Optionally, when the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes are aggregated and encapsulated according to the fan-out convergence target node to obtain multiple candidate fan-out clusters and thus constitute the candidate fan-out cluster set, the relationship between the generation of a candidate fan-out cluster and the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes is as follows: Based on the fan-out convergence target node, the first-level fan-out node, the second-level fan-out node, and the third-level fan-out node are grouped to obtain a total of several groups of fan-out nodes corresponding to the same fan-out convergence target node. The first-level fan-out node, the second-level fan-out node, and the third-level fan-out node located in the same group are encapsulated to generate a candidate fan-out cluster. The fan-out convergence target node refers to a class node in the current extended query node set that is jointly pointed to by multiple other current extended query nodes through object attributes or inheritance relationships, and may generate a large number of instances, leading to an explosion of query results.

[0012] Optionally, step 3 includes: Traverse each candidate fan-out cluster in the candidate fan-out cluster set, and extract the class node information, relationship link information and field annotation information corresponding to the candidate fan-out cluster from the preset ontology definition file to form the corresponding fan-out context information; The fan-out context information is concatenated with the original natural language question one by one to generate structured intent verification prompts; The intent verification prompt is input into a large language model for semantic reasoning calculation to generate intent matching confidence. The intent matching confidence is used to characterize the convergence mode of multiple other current extended query nodes represented by the corresponding candidate fan-out cluster pointing to the same current extended query node and the semantic consistency with the original natural language question. Based on the intent matching confidence, a target fan-out cluster set is generated.

[0013] Optionally, based on the intent matching confidence, a target fan-out cluster set is generated, including: When the same fan-out convergence target node is detected as a fan-out node by multiple levels, a preset level priority rule is used to resolve the conflict caused by the same fan-out convergence target node being detected as a fan-out node by multiple levels. At the same time, based on the intent matching confidence, each of the candidate fan-out clusters in the candidate fan-out cluster set is filtered to retain the candidate fan-out clusters whose intent matching confidence exceeds a preset confidence threshold and are characterized as conforming to the user's expected semantics. Then, the remaining candidate fan-out clusters in the candidate fan-out cluster set constitute the target fan-out cluster set.

[0014] Optionally, query behavior feature words are extracted from the original natural language question, specifically: The original natural language question is matched with the feature words in the preset keyword dictionary to extract the query behavior feature words in the original natural language question. The preset keyword dictionary includes several feature words, each of which corresponds to a keyword in the original natural language question that expresses the intent of the query behavior.

[0015] Optionally, the joint target fan-out cluster set generates a query execution plan for semantic queries based on the original natural language question in a knowledge base corresponding to a predefined ontology, including: Based on the query behavior feature words, intent logic classification processing is performed to generate corresponding target user intent categories. Target user intent categories include: aggregation intent, selective result intent, and fuzzy intent. The target fan-out cluster set and the target user intent category are fused together to generate query plan optimization decision information; The query plan builder adjusts the traversal order of the original query execution path based on the query plan optimization decision information to obtain an optimized query execution path. The original query execution path is obtained by traversing the current extended query node set according to object attributes and inheritance relationships. An aggregation operator is generated based on the target user intent category and the target fan-out cluster set. The aggregation operator is then inserted before the execution position corresponding to the fan-out convergence target node to generate a query execution plan for semantic querying in the knowledge base corresponding to the preset ontology based on the original natural language question. The execution position represents the node processing position before reaching the fan-out convergence target node during the query traversal of object attributes and inheritance relationships based on the current extended query node set.

[0016] Technical advantages of the technical solution provided in this application This application presents a semantically and structurally based multi-layer fan-out detection method. Addressing the shortcomings of existing query schemes, such as the lack of hierarchical analysis of node aggregation patterns and the high redundancy load in query execution plans, this method extracts a pre-defined ontology definition file to construct an ontology rule base. It then applies hierarchical fan-out pattern detection processing to the current extended query node set to generate a candidate fan-out cluster set. This solves the problem of query result explosion caused by traditional flat, exhaustive expansion patterns. Compared to the traditional single mechanism that relies on a fixed number of hops for indiscriminate extension, this application uses the ontology rule base to provide normative guidance, separating multi-level candidate fan-out structures from the complex extended nodes. This provides a targeted basis for subsequent query pruning, resulting in a lower data diffusion rate during traversal in large-scale ontology networks.

[0017] Furthermore, this application generates a target fan-out cluster set by extracting information such as class nodes from the candidate fan-out cluster set, and extracts query behavior feature words from the original natural language question to generate a query execution plan by jointly using the target fan-out cluster set. This solves the problem of excessive computational load caused by the lack of structured filtering of intent features in traditional methods. Compared with existing direct connection retrieval merging strategies, this application coordinates the intent attributes of query behavior feature words with target fan-out clusters in the ontology network that are prone to result aggregation, avoiding the reading of a large number of invalid instances. This results in lower computational resource consumption when issuing semantic queries to the knowledge base, and better matching performance between the query execution plan and the user's actual question intent. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a multi-layer fan-out detection method based on semantics and structure, according to an embodiment of this application.

[0019] Figure 2 This is a schematic diagram of a multi-layer fan-out detection device based on semantics and structure, according to an embodiment of this application.

[0020] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0021] like Figure 1The illustration shows a multi-layer fan-out detection method based on semantics and structure according to an embodiment of this application. The method includes: Step 1: Performing query expansion processing on the user-input natural language question to generate multiple current expanded query nodes, thus forming a current expanded query node set; constructing an ontology basic rule base based on a preset ontology definition file, wherein the preset ontology definition file is an ontology specification file for the domain to which the original natural language question belongs; Step 2: Performing layered fan-out pattern detection processing on the current expanded query node set based on the ontology basic rule base to generate a candidate fan-out cluster set; Step 3: Extracting class node information, relationship link information, and field annotation information corresponding to the candidate fan-out clusters from the preset ontology definition file based on the candidate fan-out cluster set to generate a target fan-out cluster set; Step 4: Extracting query behavior feature words from the original natural language question to jointly generate a query execution plan for semantic querying in the knowledge base corresponding to the preset ontology based on the original natural language question.

[0022] Optionally, based on a preset ontology definition file, an ontology base rule library for supporting node branch identification is constructed, including: parsing the preset ontology definition file to extract the object attribute set, class hierarchy information, and attribute feature tags of the ontology class from the preset ontology definition file; and performing structured aggregation processing on the object attribute set, the class hierarchy information, and the attribute feature tags to construct the ontology base rule library for supporting node branch identification.

[0023] Preferably, in the specific technical implementation of constructing an ontology-based rule base for supporting node branch identification based on a preset ontology definition file, in order to overcome the limitations of traditional knowledge graph retrieval's reliance on hard-coded trial and error, this application introduces a dynamic parsing and feature extraction mechanism for objective norms of the business domain. First, the configured preset ontology definition file is obtained. This preset ontology definition file is typically written using standard ontology description specifications and internally includes compliant interaction and association specifications and derivation inheritance logic between various ontology classes (i.e., the aforementioned source class, target class, parent class, child class, etc.) corresponding to the domain of the original natural language problem. The preset ontology definition file undergoes file format parsing and syntax tree conversion processing to transform the unstructured text specification content into a computer-readable syntax sequence, thereby providing a basic data sequence carrier for subsequently extracting underlying specification parameters such as object attribute sets, class hierarchy information, and attribute feature tags of ontology classes.

[0024] Preferably, after completing the file format parsing and syntax tree conversion of the preset ontology definition file, the processing action of extracting the object attribute set of the ontology class is performed based on the generated computer-readable syntax sequence. Specifically, the directed association edges used to define business interactions between different ontology classes are scanned and extracted from the computer-readable syntax sequence, and these directed association edges are extracted and assembled to extract the object attribute set of the ontology class from the preset ontology definition file. In the context of aviation query applications, for example, the association edge named "Riding" connecting the "Passenger" class node (as the source class) and the "Flight" class node (as the target class) is extracted from the computer-readable syntax sequence, as well as the association edge named "Serving" connecting the "Crew Member" class node (as another source class) and the "Flight" class node, and these association edges reflecting interactive relationships are identified as object attributes. The extracted object attribute set objectively records the physical connectivity paths that class nodes can legally extend in the horizontal direction, providing a feature extraction basis for subsequent identification of the first convergence topology.

[0025] Preferably, in addition to extracting the set of object attributes reflecting horizontal interaction relationships, this application further performs information stripping processing on the vertical derivation dimension of business concepts. The computer-readable syntax sequence is further scanned for ontology class subordination identifiers to identify parent-child derivation declarations and basic feature inheritance declarations between different ontology classes. By extracting these parent-child derivation declarations and basic feature inheritance declarations reflecting inheritance relationships, class hierarchy information is extracted from the preset ontology definition file. For example, in the ontology specification for an aviation scenario, by scanning and identifying that the "Business Traveler" class node (i.e., a subclass) and the "Leisure Traveler" class node (i.e., a subclass) are both logically subordinate to the "Traveler" class node as the parent class, this kind of subordination and derivation declaration based on inheritance relationships is incorporated into the class hierarchy information. This extracted class hierarchy information, in its technical essence, outlines the vertical subclass hierarchy depth of the graph business concepts, providing a vertical structural basis for determining whether graph queries targeting the parent class will cascade downwards along the inheritance relationship and form a second convergence topology.

[0026] Preferably, after extracting the object attribute set and the class hierarchy information, an extraction action targeting the associated constraint characteristics of object attributes is performed. Various constraint declaration modifiers modifying the object attribute set in the computer-readable syntax sequence are read and matched to extract attribute feature tags from the preset ontology definition file. These extracted attribute feature tags include, but are not limited to, function-type feature labels indicating the uniqueness of instances corresponding to object attributes, and inverse attribute feature labels indicating the reversibility of object attribute directions. These extracted attribute feature tags enrich the physical state definition of corresponding object attributes in the object attribute set from a constraint dimension, enabling subsequent hierarchical fan-out pattern detection processing to predict in advance whether a certain association path composed of object attributes exhibits a unidirectional convergence state or has a high probability of divergence leading to an explosion of query results for a large number of instances.

[0027] Preferably, after obtaining the object attribute set, class hierarchy information, and attribute feature tags extracted from the preset ontology definition file, since these discrete feature parameters cannot directly guide the risk verification of the current extended query node set, a further combined reconstruction action targeting these discrete feature parameters is implemented. The extracted object attribute set, class hierarchy information, and attribute feature tags are used as the data input stream to be fused. In a preset graph space memory mapping area, a structured aggregation processing technique is performed on the object attribute set, class hierarchy information, and attribute feature tags. Specifically, in the structured aggregation processing, the class hierarchy information serves as the vertical supporting backbone. The object attribute set is mounted to the corresponding level of the vertical supporting backbone according to the corresponding class nodes. The attribute feature tags are then used to assign constraint boundary states to the mounted object attributes, thereby instantiating the dispersed object attribute set, class hierarchy information, and attribute feature tags into a multi-dimensional cross-category canonical mapping network in memory.

[0028] Preferably, through the structured aggregation process described above, the various business specification declarations that were originally scattered in the preset ontology definition file are transformed into a specification mapping network with direct topology addressing capabilities, thereby successfully constructing an ontology-based rule base for supporting node branch identification. This constructed ontology-based rule base acts as an objective physical constraint specification in the entire detection method. Compared to the high-cost blind graph traversal and probing directly in the knowledge base corresponding to the preset ontology, this application can place the generated current extended query node set into the ontology-based rule base for low-cost matching and deduction before generating the final query execution plan. By pre-calling the ontology-based rule base to compare the expansion direction of object attributes and inheritance relationships in the current extended query node set, it can provide discrimination guidance for node branch identification with high accuracy and low computational overhead, thus laying a solid rule data foundation for accurately executing hierarchical fan-out pattern detection processing.

[0029] Optionally, the current extended query node includes class nodes composed of a source class, subclasses, and a parent class, as well as object attributes between class nodes. The source class represents the class node that serves as the starting point for traversal during the query extension process. The subclasses represent class nodes that inherit from other classes in the class hierarchy described by the class hierarchy information. The parent class represents class nodes that are inherited by other classes in the class hierarchy described by the class hierarchy information. The subclass hierarchy depth represents the number of inheritance levels of the subclass relative to the parent class in the class hierarchy described by the class hierarchy information. The object attributes represent the semantic association relationships between different class nodes.

[0030] Preferably, the specific technical implementation of the current extended query node, which includes class nodes composed of source class, subclass, and parent class, as well as object attributes between class nodes, is described in detail in conjunction with the actual aviation query application scenario. When the system receives a raw natural language question such as "Which airports have aviation-related personnel visited?", conventional knowledge base retrieval methods often directly extract entity tags and perform indiscriminate diffusion in the graph. To overcome this deficiency, this application maps the raw natural language question to a preset ontology definition file, parses it, and constructs it into a set of current extended query nodes with structured semantic features. The current extended query nodes in this set are not isolated scattered data, but are strictly deconstructed into a set of class nodes composed of source class, subclass, and parent class. At the same time, these class nodes are connected in a directed manner with the help of object attributes, thereby constructing a basic ontology topology skeleton for supporting subsequent hierarchical fan-out pattern detection processing. Through this typed and hierarchical decomposition of class nodes and object attributes, a structured data carrier is provided for objectively analyzing fan-out patterns such as the first convergence topology and the second convergence topology from the semantic root.

[0031] Preferably, the mechanism of using the source class as the starting point for traversal during query expansion is essentially an anchoring process for the query subject concept in the original natural language problem. Specifically, this application performs semantic component parsing on the original natural language problem to extract the query subject concept, and uses a pre-defined ontology definition file to align this query subject concept to specific class nodes. The aligned class nodes are then marked as source classes to serve as the starting point for traversal during query expansion. For example, in the aviation scenario described above, the query subject concept of "aviation-related personnel" in the original natural language problem is mapped and instantiated by the system into two independent source classes: a "passenger" class node and a "crew member" class node. Setting these marked source classes as the starting point for traversal means that all subsequent object attribute extensions and class hierarchy information exploration are carried out using these source classes as the initial anchor points. This technique of fixing the starting point of traversal and defining the source direction can effectively constrain the disordered divergence of the initial query path compared to the blind retrieval mechanism of random walk across the whole graph. It ensures that the query expansion based on the current set of expanded query nodes strictly advances outward along the semantic main line that is highly related to the original natural language problem.

[0032] Preferably, the setting of the subclass representing class nodes inherited from other classes in the class hierarchy described by the class hierarchy information, and the parent class representing class nodes inherited by other classes in the class hierarchy described by the class hierarchy information, is mainly to solve the problem of implicit expansion of query results caused by implicit attribute inheritance in the preset ontology definition file. After identifying the source class, this application extracts the class hierarchy relationship of the class nodes involved in the current extended query node set based on the class hierarchy information parsed from the preset ontology definition file. For example, in the preset ontology definition file, "traveler" is set as the parent class inherited by other classes, and "business traveler" and "leisure traveler" are derived from this parent class as subclasses that inherit the basic characteristics of the parent class in the class hierarchy relationship. By clearly defining the identity of subclasses and parent classes in the current extended query node set, this application can identify that even if the original natural language question only mentions the parent class concept, the query behavior will be implicitly passed to the various subclasses at the bottom level along the class hierarchy information when actually traversing the knowledge base corresponding to the preset ontology. This explicit extraction and definition of class hierarchy provides the underlying topological basis for subsequent identification of multiple subclasses that converge upwards to the same parent class through inheritance (i.e., the second convergence topology).

[0033] Preferably, in the technical processing where the subclass hierarchy depth represents the number of inheritance levels of a subclass relative to its parent class in the class hierarchy relationship described by the class hierarchy structure information, this application introduces the subclass hierarchy depth as a depth space metric parameter to quantify the diffusion range of the inheritance relationship. When constructing the inheritance relationship tree between class nodes based on the class hierarchy structure information, this application uses the class node marked as the parent class as the zero-level baseline, and calculates the shortest path hop count from the derived child nodes (i.e., subclasses) to the baseline parent class level by level down along the class hierarchy relationship, recording this shortest path hop count as the corresponding subclass hierarchy depth. For example, the "Business Traveler" subclass directly inherits from the baseline "Traveler" parent class, and this application calculates its inheritance level relative to the parent class, i.e., the subclass hierarchy depth, to be one; if the "Business Traveler" subclass has a further subdivided "International Business Traveler" subclass, then the latter's subclass hierarchy depth is calculated to be two. By objectively calculating and binding the depth of the subclass hierarchy, this application can provide a numerical depth discretion standard when performing layered fan-out pattern detection processing based on the ontology base rule library. This prevents the query engine from falling into an endless exhaustive trap of low-level subclasses due to overly fragmented classifications in the preset ontology definition file, thereby controlling the drill-down depth of the query execution path within a reasonable range that can be tolerated by computing resources.

[0034] Preferably, the core of realizing the semantic association between different types of nodes represented by the object attributes lies in endowing the originally isolated array of class nodes with directed connectivity that embodies specific business interaction logic. This application extracts directed relation edges for connecting different types of nodes from a preset ontology definition file, and identifies these directed relation edges with business action attribute characteristics as object attributes. Taking the aviation query scenario as an example, this application extracts that the source class "passenger" and the same target class "flight" are connected by the object attribute named "ride", while the source class "crew member" and the same target class "flight" are connected by the object attribute named "serve". These extracted object attributes not only indicate the physical reachability direction of query expansion, but more importantly, they carry distinctly different interactive semantic features. By recording and structurally expressing the intertwined object attributes between different types of nodes, this application can keenly capture the phenomenon of multiple different source classes pointing to the same target class through different object attributes, which constitutes the direct physical link basis for subsequent identification and determination of the first-level fan-out nodes.

[0035] In summary, this application, through the structured decomposition and attribute feature binding of source class, subclass, parent class, and object attributes, generates a current extended query node set that is no longer a flat, undifferentiated list of entity labels, but rather transformed into relational topology graph data with multi-dimensional semantic depth. In this relational topology graph data, the source class determines the initial horizontal orientation of the query extension, the parent and subclass hierarchical depth values ​​depict the vertical concept inheritance depth, and object attributes characterize the horizontal interaction and association paths of class nodes. These multi-dimensional class nodes and object attributes, after being fully aggregated, are passed as input to the hierarchical fan-out pattern detection processing stage. Unlike traditional query schemes that rely solely on post-hoc statistical analysis of result set size to determine query explosion through passive feedback strategies, the current extended query node data structure constructed in this application, rich in object attributes and class hierarchy information, enables the system to accurately identify fan-out convergence risks, such as the first and second convergence topologies, that may lead to disordered expansion of query results, based solely on topological reasoning of these structured components before issuing the actual query execution plan for semantic query to the knowledge base corresponding to the preset ontology. This lays the underlying data organization foundation for generating a pruned and optimized query execution plan.

[0036] Optionally, step 2 includes: parsing the object attribute set from the ontology base rule base and identifying a first convergence topology structure from the current extended query node set based on it, where multiple different source classes point to the same target class through different object attributes, to determine a first-level fan-out node; parsing the class hierarchy information from the ontology base rule base and identifying a second convergence topology structure from the current extended query node set based on it, where multiple subclasses converge to the same parent class through inheritance relationships, to determine a second-level fan-out node; determining the remaining extended query nodes in the current extended query node set that are not covered by the first-level and second-level fan-out nodes, to determine a third-level fan-out node; and performing aggregation and encapsulation processing on the first-level, second-level, and third-level fan-out nodes according to the fan-out convergence target node to obtain multiple candidate fan-out clusters, thereby constituting the candidate fan-out cluster set.

[0037] Preferably, in the specific technical implementation of the hierarchical fan-out pattern detection processing based on the ontology's basic rule base for the current extended query node set, to overcome the defect of disordered expansion of query results caused by the lack of structural hierarchical analysis in traditional retrieval, this application introduces a progressive hierarchical analysis logic. Specifically, based on the ontology's basic rule base constructed in the preceding processing stage, the complex conceptual relationships intertwined in the current extended query node set are peeled off layer by layer. This hierarchical fan-out pattern detection processing is not a simple listing and sorting of each current extended query node in the current extended query node set, but rather it is placed in the aforementioned constructed multi-dimensional relational topology graph data for directed analysis, so as to identify the high-density clustering of nodes caused by different factors in turn, thereby providing a targeted positioning basis for accurately blocking the spread of invalid graph diffusion queries in the knowledge base corresponding to the preset ontology.

[0038] Preferably, in the technical processing stage of determining the first-level fan-out nodes, complex object interactions in the application scenario are often the primary factor leading to lateral query divergence. Specifically, the object attribute set is parsed from the ontology's basic rule base and used as the first-level probing specification. Based on the parsed object attribute set, a topological connectivity scan is performed on the directed association paths in the current extended query node set to identify a network structure where multiple different source classes point to the same target class through different object attributes, and this network structure is defined as the first convergence topology. In the context of aviation query applications, for example, during path scanning and comparison, it is found that a "passenger" node, as the source class, points to a "flight" node, as the same target class, through the object attribute named "riding," while a "crew member" node, another source class, also points to the same "flight" node through the object attribute named "serving." By identifying the many-to-one convergence phenomenon of multiple source classes and the same target class caused by heterogeneous interaction relationships, anchoring the same target class in the first convergence topology and marking it to determine the first level fan-out node, the potential diffusion risk caused by the horizontal sharing of object attributes across different business concepts is effectively captured.

[0039] Preferably, after completing the screening based on horizontal interaction relationships, to address the implicit query expansion problem caused by vertical concept derivation, a technical process for determining the second-level fan-out nodes is implemented. Specifically, the class hierarchy information is parsed from the ontology's basic rule base. Using this class hierarchy information as a vertical probe scale, the inheritance relationships of the current extended query node set are analyzed in the vertical dimension. Through this analysis, a vertical network distribution is identified where multiple subclasses converge to the same parent class through inheritance relationships, and this vertical network distribution is confirmed as the second convergence topology. For example, in the ontology classification of an aviation scenario, both "Business Traveler" and "Leisure Traveler" inherit from the parent class "Traveler" in the class hierarchy information. When the graph traversal action in the knowledge base corresponding to the preset ontology touches this parent class, the query scale will expand radially and implicitly down to multiple subclasses along the inheritance relationship. By identifying such vertically derived second convergence topology and marking the parent class in the second convergence topology to determine the second-level fan-out node, it is possible to prevent subsequent query actions from incurring excessive computational overhead in the fine-grained, low-level derived subclasses.

[0040] Preferably, in addition to the convergence caused by the explicit horizontal associations and vertical inheritance mentioned above, implicit potential related nodes are also investigated to complete the processing action of determining the third-level fan-out nodes. In specific implementation, the current set of extended query nodes is traversed and screened to remove known explicit high-risk nodes that have been covered by the first-level and second-level fan-out nodes, thereby identifying and extracting the remaining extended query nodes. Although these remaining extended query nodes do not exhibit direct topological convergence characteristics in the explicit topological structure, they may have a high degree of close association in their implicit business semantic expression. By calculating the semantic embedding vector similarity between the remaining extended query nodes, when the semantic embedding vector similarity between any two remaining extended query nodes exceeds a preset similarity threshold, the closely related node group within the similar semantic space is identified, that is, the remaining extended query nodes that meet the similarity condition are marked to determine the third-level fan-out nodes. This fallback detection method based on semantic embedding vector similarity for the remaining extended query nodes makes up for the shortcomings of detection relying solely on explicit rules and improves the coverage of deep unknown fan-out patterns.

[0041] Preferably, after sequentially determining the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes at three different depths, an aggregation and encapsulation process is performed on these fan-out nodes according to the fan-out convergence target node, thereby converting scattered risk characteristics into structured containers to be verified. In this technical step, the fan-out convergence target node plays the role of the aggregation gravity center. Specifically, the fan-out convergence target node is extracted from the current extended query node set and is jointly pointed to by multiple other current extended query nodes through the object attributes or inheritance relationships. Based on the fan-out convergence target node, the determined first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes are grouped. By performing this grouping process, a total of several groups of fan-out nodes corresponding to the same fan-out convergence target node are obtained. For example, whether it is a group of class nodes that are horizontally linked to "flight" through different object attributes, or a group of class nodes that are vertically linked along the inheritance relationship, as long as the force center of their diffusion or convergence falls on the fan-out convergence target node "flight", they will be classified into the same group, thereby restoring the local complete graph network ecology that caused the node explosion phenomenon.

[0042] Preferably, based on the grouping results obtained above, data-level encapsulation and generation processing is further performed on the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes located in the same group to generate an independent candidate fan-out cluster. As the same encapsulation and generation operation is sequentially performed on all the separated groups corresponding to the same fan-out convergence target node, multiple candidate fan-out clusters are finally obtained, thus forming a candidate fan-out cluster set. This candidate fan-out cluster set is no longer a single-level, single-dimensional discrete risk node record, but a fusion result that highly aggregates horizontal interaction relationships, vertical inheritance dimensions, and implicit deep semantic association features. Through this layer-by-layer identification and multi-dimensional encapsulation technique based on the fan-out convergence target node, this application organizes the complex and intertwined graph diffusion points into structured cluster units with clear boundaries and independent relationships. This provides a low-noise, high-fidelity technical verification basis for high-precision verification of the convergence method of candidate fan-out clusters and the semantic consistency of the original natural language problem in subsequent steps.

[0043] Optionally, determining the first-level fan-out node specifically involves: determining the target class in the first convergence topology and marking it as a first-level fan-out node, wherein the target class is a class node related to the original natural language query target, which is pointed to by multiple source classes through different object attributes; determining the second-level fan-out node specifically involves: determining the parent class in the second convergence topology whose subclass hierarchy depth meets the requirements through a preset subclass hierarchy depth threshold, and marking the parent class as a second-level fan-out node; determining the third-level fan-out node specifically involves: calculating the semantic embedding vector similarity between the remaining extended query nodes; when the semantic embedding vector similarity between any two remaining extended query nodes exceeds a preset similarity threshold, marking the remaining extended query nodes that meet the conditions as third-level fan-out nodes.

[0044] Preferably, in the specific technical implementation of determining the first-level fan-out nodes, an objective, structured identification is performed on the convergence phenomenon caused by cross-domain concept interactions. After obtaining the first convergence topology determined by the preceding processing, the node pointing relationships within the first convergence topology are sorted out. Specifically, aggregation analysis is performed on the multiple source classes that serve as starting points in the first convergence topology and the pointing endpoints of different object attributes used for connection, in order to extract the nodes that are commonly pointed to from the first convergence topology, and to identify the nodes that are commonly pointed to as the target class in the first convergence topology. In the context of aviation query applications, when the source class representing "passengers" and the source class representing "crew members" converge to the "flight" class node on the topology path through the two different object attributes "riding" and "serving," respectively, the "flight" class node is extracted as the target class. Through this technical processing of extracting a single center of force from multiple sources and multiple paths, a structural basis is provided for anchoring high-risk lateral diffusion sources.

[0045] Preferably, after extracting the target class from the first convergence topology, the semantic correlation between the target class and the original natural language question is further verified. Specifically, the process involves extracting the node semantic features of the target class and the textual semantic features of the original natural language question. By calculating the mapping relationship between the node semantic features and the textual semantic features, the target class is confirmed as a class node related to the query target of the original natural language question. After confirming the above correlation, the target class is marked as a first-level fan-out node. In actual graph traversal, this phenomenon, where source classes from different business dimensions share pointers to the target class through different object attributes, is prone to causing a multiplier-like increase in the number of associated instances when expanding outwards. Explicitly marking the target class as a first-level fan-out node objectively isolates the explosive diffusion starting point hidden in the complex object attribute interaction network in a structured manner, thereby indicating the first-dimensional targeted optimization position for subsequent graph query pruning operations.

[0046] Preferably, to address the query drill-down divergence problem caused by vertical concept derivation in the ontology classification system, a technique for determining second-level fan-out nodes is implemented. After obtaining the second convergence topology structure containing multiple subclasses converging to the same parent class through inheritance relationships, a preset subclass hierarchy depth threshold is introduced as a depth space metric. Specifically, the inheritance level of each subclass relative to the same parent class is extracted from the second convergence topology structure to obtain the corresponding subclass hierarchy depth. To avoid indiscriminate calculation of all subtle derivation branches in the knowledge base corresponding to the preset ontology, the extracted subclass hierarchy depth is compared with the preset subclass hierarchy depth threshold (e.g., a numerical value of two). Through this numerical comparison, vertical network branches with subclass hierarchy depths exceeding or equal to the preset subclass hierarchy depth threshold are selected from the second convergence topology structure, thereby determining the parent class whose subclass hierarchy depth meets the requirement.

[0047] Preferably, after determining the parent class whose subclass hierarchy depth meets the requirement, the parent class whose subclass hierarchy depth meets the requirement is used as the parent class in the second convergence topology and marked, that is, the parent class that meets the depth determination condition is marked as the second-level fan-out node. Taking the aviation ontology architecture as an example, if "passenger" is the parent class, and "business passenger" is derived from it as the subclass, and "business passenger" is further derived from "international business passenger" as the lower-level subclass, when the calculated subclass hierarchy depth of the inheritance link reaches or exceeds the given preset subclass hierarchy depth threshold, it is determined that the traversal action for the parent class "passenger" will trigger a deeper implicit query exploration. Marking the parent class as the second-level fan-out node, in essence, constructs a vertical identification mechanism based on derivation depth, so that deep-level, fine-grained inheritance branches can be identified and controlled in advance before they are exhaustively instantiated by the graph engine.

[0048] Preferably, after marking fan-out nodes based on explicit horizontal object attributes and vertical inheritance relationships, a further technical process for determining third-level fan-out nodes is performed to capture potential implicit semantic bursts in the ontology network. The remaining extended query nodes extracted in the preceding processing are obtained. These remaining extended query nodes are not covered by the first two detection mechanisms (i.e., the first-level and second-level fan-out nodes) due to a lack of directly shared physical topology features. Specifically, the contextual text description features and ontology graph connection features corresponding to each remaining extended query node are extracted and feature space mapping is performed to convert these discrete contextual text description features and ontology graph connection features into continuous semantic embedding vectors. The multi-dimensional elements in this semantic embedding vector represent the implicit feature distribution of nodes in the application scenario in terms of business attributes, upstream and downstream related networks, and concept affiliation. Subsequently, a distance metric operation is performed between the semantic embedding vectors of any two remaining extended query nodes in the vector space to calculate the semantic embedding vector similarity between the remaining extended query nodes.

[0049] Preferably, after calculating the semantic embedding vector similarity between any two remaining extended query nodes, the calculated semantic embedding vector similarity is input into the threshold comparison logic. A preset similarity threshold (e.g., 85%) is obtained, and the semantic embedding vector similarity is compared with the preset similarity threshold. When the semantic embedding vector similarity between any two remaining extended query nodes exceeds the preset similarity threshold, it is determined that these nodes have a high clustering tendency in the implicit business concept space. For example, in the process of expanding an aviation query, several remaining extended query nodes that literally represent different route variations, although they do not have direct physical connectivity in the explicit topology, have extremely high semantic embedding vector similarities with each other. These remaining extended query nodes that meet the similarity determination condition are considered as meeting the condition, and these meeting the condition are marked as the third-level fan-out nodes. This low-level feature detection method, which is based on the comparison between feature space mapping and the preset similarity threshold, mines the tight cohesion between scattered nodes from the continuous semantic dimension, fills the gaps in the structure detection that rely solely on hard-coded relationship edges, and achieves high-precision interception of potential scattered node cluster explosion risks.

[0050] Optionally, when the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes are aggregated and encapsulated according to the fan-out convergence target node to obtain multiple candidate fan-out clusters and thus constitute the candidate fan-out cluster set, the relationship between the generation of a candidate fan-out cluster and the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes is as follows: based on the fan-out convergence target node, the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes are grouped to obtain several groups of fan-out nodes corresponding to the same fan-out convergence target node. The first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes located in the same group are encapsulated to generate a candidate fan-out cluster. The fan-out convergence target node refers to a class node in the current extended query node set that is jointly pointed to by multiple other current extended query nodes through object attributes or inheritance relationships, and may generate a large number of instances leading to an explosion of query results.

[0051] Preferably, after determining the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes, in order to transform the discretely distributed first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes in the topology graph into structured units that can be evaluated as a whole by the system, this application introduces a technical mechanism for aggregating and encapsulating the first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes according to the fan-out convergence target node. Before performing the action of aggregating and encapsulating the first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes according to the fan-out convergence target node, it is first necessary to identify the structural center that triggers node convergence from the current extended query node set, that is, to determine the fan-out convergence target node. The fan-out convergence target node refers to a class node in the current extended query node set that is jointly pointed to by multiple other current extended query nodes through object attributes or inheritance relationships, and may generate a large number of instances leading to an explosion of query results. The fan-out convergence target node in the topology network is a force convergence point that receives multiple directed path inputs based on the object attributes or inheritance relationships. It is the underlying physical source of excessive query computation load in the knowledge base corresponding to the preset ontology.

[0052] Preferably, the specific process for determining the fan-out convergence target node is as follows: based on the object attributes or inheritance relationships, the pointing and receiving states of each current extended query node in the current extended query node set are traversed and statistically analyzed. Through this traversal and statistical action, current extended query nodes that are jointly pointed to by multiple other current extended query nodes through the object attributes or inheritance relationships are extracted. Subsequently, the number of underlying instances associated with these extracted jointly pointed-to current extended query nodes in the knowledge base corresponding to the preset ontology is estimated to obtain the estimated number of underlying instances. Then, based on the estimated number of underlying instances, class nodes that may generate a large number of instances leading to an explosion of query results are filtered out and confirmed as the fan-out convergence target nodes. In the aforementioned aviation query application scenario, when the class nodes representing "passengers" and "crew members" all point to the "flight" class node through different object attributes, and the "flight" class node has a large number of specific flight detail instances attached to it in the knowledge base, the "flight" class node is identified and defined as the fan-out convergence target node because it meets the topological feature that it is pointed to by multiple other currently extended query nodes through the object attributes and may generate a large number of instances leading to an explosion of query results.

[0053] Preferably, after determining each of the fan-out convergence target nodes, a processing action is performed to group the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes based on the fan-out convergence target node. Specifically, for each fan-out convergence target node, this application scans the connection paths between the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes determined in the preceding processing and the fan-out convergence target node, based on the object attributes or inheritance relationships. Based on the scanned connection paths, it is determined whether the target pointed to by the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes falls into the corresponding fan-out convergence target node. Through this target-based determination, the technical action of grouping the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes based on the fan-out convergence target node is completed, and the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes pointing to the same fan-out convergence target node are assigned to the same group.

[0054] Preferably, through the above-described grouping process based on the fan-out convergence target node, a total of several groups of fan-out nodes corresponding to the same fan-out convergence target node are obtained. These several groups of fan-out nodes corresponding to the same fan-out convergence target node physically restore the complete structure that caused the local query explosion. For example, in the aviation scenario, whether it is the first-level fan-out node that spans different business concepts and points to the "flight" class node, which is the fan-out convergence target node, due to the shared object attributes, or the second-level fan-out node that is derived downwards through inheritance and converges to the "flight" class node, which is the fan-out convergence target node, or the related third-level fan-out node measured by semantic embedding vector similarity, as long as they all point to the same fan-out convergence target node (such as the "flight" class node), these first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes distributed at different levels will be uniformly gathered to form the above-described group of fan-out nodes corresponding to the same fan-out convergence target node, thereby effectively eliminating the fragmentation defect caused by independent detection at a single level.

[0055] Preferably, after obtaining the several groups of fan-out nodes corresponding to the same fan-out convergence target node, the first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes within the same group are further encapsulated and generated using data dimensions. This encapsulation and generation process is not a simple list concatenation, but rather extracts the first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes involved in the same group, the associated object attributes or inheritance relationships, and the corresponding fan-out convergence target node, and then structurally packages and integrates these extracted nodes with attribute objects. By performing this structural packaging and integration technical processing action, a candidate fan-out cluster is generated by encapsulating the first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes within the same group. The generated candidate fan-out cluster completely represents the overall divergence risk profile of a convergence from the first-level fan-out nodes, second-level fan-out nodes, and third-level fan-out nodes to a single fan-out convergence target node in terms of data form.

[0056] Preferably, as the fan-out nodes corresponding to the same fan-out convergence target node obtained from all groups are traversed sequentially, and the above-mentioned data dimension encapsulation and generation process is repeatedly executed, multiple candidate fan-out clusters with independent structural features are finally obtained, and then the multiple generated candidate fan-out clusters constitute the candidate fan-out cluster set. At this point, the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes, which were originally scattered in the current extended query node set, have been successfully transformed into the candidate fan-out cluster set with the fan-out convergence target node as the aggregation core. This technical solution, which aggregates and encapsulates the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes according to the fan-out convergence target node to obtain multiple candidate fan-out clusters and thus form the candidate fan-out cluster set, not only integrates discrete abnormal nodes at each level into structured cluster units, making the risk of combined node explosions, which was originally difficult to track in the query system, more concrete, but more importantly, it provides standardized and logically independent underlying structured material support for the large language model in subsequent steps to verify the user's true query intent with high fidelity based on sufficient structured graph context information.

[0057] Optionally, step 3 includes: traversing each candidate fan-out cluster in the candidate fan-out cluster set, extracting class node information, relation link information, and field annotation information corresponding to the candidate fan-out cluster from the preset ontology definition file to form corresponding fan-out context information; concatenating the fan-out context information with the original natural language question one by one to generate structured intent verification prompts; inputting the intent verification prompts into a large language model for semantic reasoning calculation to generate intent matching confidence, wherein the intent matching confidence is used to characterize the convergence mode of multiple other current extended query nodes represented by the corresponding candidate fan-out cluster pointing to the same current extended query node and the semantic consistency with the original natural language question; and generating a target fan-out cluster set based on the intent matching confidence.

[0058] Preferably, after obtaining the candidate fan-out cluster set generated in the preceding processing stage, to address the semantic misjudgment problem that may arise from relying solely on underlying structure detection, semantic intent verification processing is implemented for each candidate fan-out cluster. Specifically, the candidate fan-out cluster set is scanned sequentially to traverse each candidate fan-out cluster within the set. Since each candidate fan-out cluster only represents the high-density convergence risk topology of graph nodes at the data architecture level and lacks detailed business features to support complex natural language semantic understanding, this application uses the currently traversed candidate fan-out cluster as an index benchmark to initiate a content backtracking retrieval to the preset ontology definition file. Through this content backtracking retrieval action, class node information, relationship link information, and field annotation information corresponding to the underlying physical structure of the candidate fan-out cluster are accurately extracted from the preset ontology definition file, thereby providing basic materials for subsequent large language model semantic reasoning calculations.

[0059] Preferably, when performing the above-described processing action of extracting class node information, relationship link information, and field annotation information corresponding to the candidate fan-out clusters from the preset ontology definition file, the class node information represents the name characteristics of each conceptual entity participating in the topology convergence; the relationship link information describes the directed business action characteristics of the associated interactions between these conceptual entities; and the field annotation information supplements the business auxiliary explanations of the aforementioned conceptual entities and directed business action characteristics in the preset ontology definition file. Subsequently, the extracted class node information, relationship link information, and field annotation information are subjected to textual aggregation processing to form corresponding fan-out context information. This formed fan-out context information, in its technical essence, transforms the originally abstract graph topology convergence phenomenon into fan-out context information in the form of business state description text that can be directly read and parsed by machine natural language processing mechanisms.

[0060] Preferably, after forming the corresponding fan-out context information, the objective fan-out context information needs to be aligned and fused with the user's subjective input of the original natural language question. The system receives the original natural language question and concatenates the fan-out context information with it one by one. In this concatenation process, it's not a simple character-by-character connection between two independent texts. Instead, according to a pre-configured prompt word constraint template, the original natural language question is used as the intent query command area text, and the fan-out context information is used as the background knowledge input area text, resulting in an ordered spatial fusion. Through this ordered fusion process based on the pre-configured prompt word constraint template, a structured intent verification prompt word is generated. This generated intent verification prompt word not only includes the user's initial original natural language question but also embeds the fan-out context information, which represents the convergence state of potential explosion nodes, detected by the system in the underlying knowledge base, forming an intent verification prompt word in the form of an input sequence with complete context parameters.

[0061] Preferably, after generating the structured intent verification prompt, a pre-deployed large language model is invoked to perform deep semantic parsing and feature alignment tasks. Specifically, the intent verification prompt is input into the large language model for semantic reasoning calculation. During this semantic reasoning calculation, the large language model, based on its internal feature cross-referencing mechanism, performs multi-dimensional feature mapping comparison between the intent query instruction text and the background knowledge input text in the intent verification prompt. Taking an aviation query scenario as an example, the large language model calculates the semantic logical association probability between the original natural language question expression "aviation-related personnel" and the physical phenomenon of "passengers" and "crew members" objectively presented in the fan-out context information converging towards "flight." Through this deep feature cross-referencing and semantic logical association probability calculation, a quantitative evaluation is performed on whether the detected underlying graph convergence path (i.e., the candidate fan-out cluster) reasonably responds to the question's main theme in the original natural language question.

[0062] Preferably, as the large language model completes the semantic reasoning calculation for the intent verification prompt, the semantic reasoning calculation result of the large language model is extracted to generate an intent matching confidence score. This generated intent matching confidence score is typically represented as a continuous numerical parameter after normalization. The intent matching confidence score characterizes the semantic consistency between the convergence method (where multiple other current extended query nodes represented by the corresponding candidate fan-out cluster point to the same current extended query node) and the original natural language problem. For example, if the calculated intent matching confidence score is high, it indicates that extending the graph query by treating "passengers" and "crew members" together as "aviation-related personnel" is a reasonable convergence method that meets user business expectations. Conversely, if the intent matching confidence score is low, it indicates that the current candidate fan-out cluster deviates from the actual needs and is an abnormal convergence method caused by ontology architecture design defects or semantic ambiguity.

[0063] Preferably, after calculating and generating the corresponding intent matching confidence score for each candidate fan-out cluster in the candidate fan-out cluster set, this application enters the closed-loop verification decision-making stage based on the intent matching confidence score. Based on the obtained intent matching confidence scores, each candidate fan-out cluster in the candidate fan-out cluster set is filtered. Through this filtering process, this application can identify and isolate candidate fan-out clusters whose semantic consistency judgment results deviate from expectations based on the intent matching confidence score, and then the remaining candidate fan-out clusters in the candidate fan-out cluster set constitute the target fan-out cluster set. This generated target fan-out cluster set objectively eliminates candidate fan-out clusters whose intent matching confidence score indicates conformity to the user's expected semantics, accurately retaining high-risk candidate fan-out clusters that require subsequent mandatory control and path pruning. Through the above technical steps, this application effectively overcomes the shortcomings of traditional query schemes that rely solely on physical graph scale features for rigid truncation, achieving high-precision interception of candidate fan-out clusters from topology-scale interception to business semantic level interception.

[0064] Preferably, in the specific technical implementation of inputting the structured intent verification prompts into the large language model for semantic reasoning computation, in order to fundamentally deconstruct the implicit mapping relationship between natural language requirements and the underlying topological graph, the large language model designed in this application is internally decomposed into multiple progressive technical processing structural layers. First, the previously generated structured intent verification prompts are obtained and imported into the first structural layer within the large language model, namely the lexical sequence conversion layer. In this lexical sequence conversion layer, word segmentation and high-dimensional space vectorization mapping are performed on the intent query command area text and the background knowledge input area text contained within the structured intent verification prompts to generate an initial lexical feature matrix. At the objective data level, this generated initial lexical feature matrix represents the transformation of discrete character text in the intent query command area text and the background knowledge input area text into a continuous numerical sequence containing corresponding contextual position information and basic semantic features. Thus, this initial lexical feature matrix provides the underlying numerical input carrier for subsequent deep cross-comparison.

[0065] Preferably, after generating the initial lexical feature matrix, the initial lexical feature matrix is ​​passed as a processing object to the second structural layer inside the large language model, namely the multidimensional feature cross layer. In this multidimensional feature cross layer, data is calculated based on the initial lexical feature matrix, and attention feature cross-fusion processing is performed on the vector features corresponding to the intent query command area text and the vector features corresponding to the background knowledge input area text in the initial lexical feature matrix. Specifically, by obtaining the preset attention weight allocation logic inside the multidimensional feature cross layer, the spatial association weight parameter between the elements representing user action requests in the intent query command area text and the elements representing graph topology convergence phenomena in the background knowledge input area text is calculated. Then, based on the spatial association weight parameter, feature weighted mapping calculation is performed on the initial lexical feature matrix to generate multidimensional cross features. The generated multidimensional cross features objectively integrate the correlation coupling degree between subjective query intent and objective underlying graph topology, overcoming the semantic separation defect caused by the independent operation of intent and graph structure in traditional retrieval schemes.

[0066] Preferably, after obtaining the multidimensional cross-features, to further evaluate whether the multidimensional cross-features conform to common-sense business logic expectations, the multidimensional cross-features are input into the third structural layer within the large language model, namely the intent logic alignment layer. In this intent logic alignment layer, a pre-constructed and fixed benchmark intent feature space is extracted, and the multidimensional cross-features are projected onto this benchmark intent feature space for spatial distance measurement processing. In the context of aviation queries, the spatial distance between the multidimensional cross-features (containing the query intent of "aviation-related personnel" and the background knowledge of "passengers" and "crew members" converging towards "flight") and the conventional business aggregation query benchmark features in the benchmark intent feature space is measured. By performing this spatial distance measurement processing, an intent deviation measurement parameter is generated. This generated intent deviation measurement parameter, in the form of an objective physical distance value, quantifies the degree of deviation of the current graph expansion example from the user's true question intent.

[0067] Preferably, after the large language model completes the spatial distance measurement processing for the multi-dimensional cross-dimensional features and generates the intent deviation measurement parameters, the technical execution process enters the final confidence generation stage. The intent deviation measurement parameters are transmitted to the final structural layer within the large language model, namely the confidence normalization output layer. In this confidence normalization output layer, nonlinear compression and scaling operations are performed on the intent deviation measurement parameters, which are not yet subject to fixed boundary constraints. Through these nonlinear compression and scaling operations, the intent deviation measurement parameters are mapped to a standard numerical range of 0 to 1 to generate the final intent matching confidence. This generated intent matching confidence, as a continuous quantized output parameter, directly and objectively characterizes the convergence pattern of multiple other current extended query nodes represented by the corresponding candidate fan-out cluster pointing to the same current extended query node, and its semantic consistency with the original natural language problem. This provides a quantified technical execution basis for subsequent threshold-based discriminative filtering processing.

[0068] Preferably, after calculating and generating the corresponding intent matching confidence score for each candidate fan-out cluster in the candidate fan-out cluster set, the verification decision-making process based on the intent matching confidence score is initiated. A preset confidence threshold (e.g., 0.85) is obtained to measure the semantic reasonableness boundary, and the intent matching confidence score corresponding to each candidate fan-out cluster is compared numerically with this preset confidence threshold. This numerical comparison transforms the intent matching confidence score, which is a continuous probability attribute, into a discrete decision signal output. Based on the output of this numerical comparison, each candidate fan-out cluster in the candidate fan-out cluster set is subjected to a differentiation and filtering process. Through this differentiation and filtering process, candidate fan-out clusters whose intent matching confidence score exceeds the preset confidence threshold are identified, and these candidate fan-out clusters are determined to be candidate fan-out clusters that conform to the user's expected semantics.

[0069] Preferably, after identifying candidate fan-out clusters whose characteristics match the user's expected semantics, the filtering process continues to perform a screening and stripping operation on the candidate fan-out cluster set. Specifically, the candidate fan-out clusters whose characteristics match the user's expected semantics are retained from the candidate fan-out cluster set to avoid erroneously blocking reasonable business traversal and recall paths. Simultaneously, the remaining candidate fan-out clusters in the candidate fan-out cluster set that do not meet the retention condition are extracted; that is, those candidate fan-out clusters whose corresponding intent matching confidence is lower than or equal to the preset confidence threshold and whose semantic consistency judgment results deviate from expectations are identified and isolated. Furthermore, these extracted candidate fan-out clusters that deviate from expectations are aggregated, integrated, and encapsulated, forming a target fan-out cluster set. This target fan-out cluster set accurately identifies high-risk candidate fan-out clusters that require subsequent mandatory control and path pruning, achieving a shift from blind physical topology interception to highly accurate interception at the business semantic level.

[0070] Preferably, to enable the aforementioned large language model to possess accurate semantic reasoning computation capabilities, model parameter training processing is implemented before it is put into the actual verification and decision-making technology stage based on intent matching confidence. First, historical query logs storing past user real query interaction records are acquired to extract historical natural language questions. Simultaneously, historical graph query records traversed against the knowledge base corresponding to a preset ontology are acquired to extract historical fan-out context information corresponding to the historical natural language question. Next, reasonableness verification and annotation processing is performed on the historical natural language question and the historical fan-out context information to generate corresponding true intent matching tags. These generated true intent matching tags objectively reflect whether the historical graph node aggregation topology truly matches the graph retrieval expectations of the questioning subject. Subsequently, the historical natural language question, the historical fan-out context information, and the corresponding true intent matching tags are associated and packaged to generate a business intent training sample set to support the underlying network weight optimization.

[0071] Preferably, after generating the business intent training sample set, the system enters the forward input preparation stage for the underlying network structure. Feature extraction is performed from the business intent training sample set to obtain the historical natural language question and historical fan-out context information contained within a single training sample. Based on the pre-configured prompt word constraint template constructed earlier, ordered fusion processing is performed on the historical natural language question (which serves as the intent query command area text) and the historical fan-out context information (which serves as the background knowledge input area text). This ordered fusion processing generates structured training prompt words for input to the underlying network structure. These generated structured training prompt words maintain a high degree of consistency with the structured intent verification prompt words in the actual inference stage in terms of data structure, providing a standardized data sequence carrier for subsequent triggering of deep multi-dimensional feature forward propagation calculations.

[0072] Preferably, after generating the structured training prompts, a forward feature propagation process is triggered for the large language model in the parameter-to-train state. The structured training prompts are imported into the first structural layer of the large language model, namely the lexical sequence transformation layer. In this lexical sequence transformation layer, word segmentation and high-dimensional space vectorization mapping are performed on the intent query command area text and the background knowledge input area text contained within the structured training prompts to generate an initial training lexical feature matrix. Subsequently, this initial training lexical feature matrix is ​​passed as a processing object to the second structural layer of the large language model, namely the multi-dimensional feature cross layer, to obtain the current attention weight parameters to be optimized within the multi-dimensional feature cross layer. Based on the obtained attention weight parameters to be optimized, attention feature cross-fusion processing (i.e., feature weighted mapping calculation) is performed on the vector features corresponding to the intent query command area text and the vector features corresponding to the background knowledge input area text in the initial training lexical feature matrix to generate multi-dimensional cross features in the training state. The generated multidimensional cross-features in the training state, under the current parameter state to be optimized, initially simulate the correlation and coupling degree between historical subjective query actions and historical objective graph node topology.

[0073] Preferably, after obtaining the training-state multidimensional cross-features, the intent feature projection action is further performed to pass them to deeper network layers. The training-state multidimensional cross-features are transmitted to the third structural layer within the large language model, namely the intent logic alignment layer, to extract the pre-constructed and fixed baseline intent feature space. The training-state multidimensional cross-features are projected into this baseline intent feature space to perform spatial distance measurement processing, generating a training-state intent bias measurement parameter. In the context of aviation, this parameter measures the spatial distance between the feature mapping between historical instructions for "aviation-related personnel" and the convergence nodes of the historical flight map in the immature model state, and the baseline features of conventional business aggregation queries in the baseline intent feature space. Next, the training-state intent bias measurement parameter is transmitted to the final structural layer within the large language model, namely the confidence normalization output layer, where nonlinear compression and scaling operations are performed on the training-state intent bias measurement parameter, which is not yet constrained by fixed boundaries, to generate a predicted intent matching confidence score. The generated predictive intent matching confidence score represents the numerical prediction output of the semantic consistency of the model currently in the training state with the sample data to be processed.

[0074] Preferably, after generating the predicted intent matching confidence score, the system proceeds to the error loss calculation stage to evaluate the accuracy of the current feature mapping of the model. The true intent matching label corresponding to the previously extracted single training sample is obtained, and the value of the predicted intent matching confidence score is aligned and mapped with the value of the true intent matching label. Subsequently, a preset model loss measurement logic is invoked to perform error quantization calculation on the aligned and mapped values ​​of the predicted intent matching confidence score and the true intent matching label. This error quantization calculation generates a prediction error loss value. This generated prediction error loss value, in the form of an objective continuous gradient value, accurately measures the physical distance between the current underlying model's forward prediction result and the expected answer in the actual business context, providing a clear feedback numerical target for subsequent correction of the underlying network parameters.

[0075] Preferably, after generating the prediction error loss value, an internal network parameter back-update mechanism designed to eliminate the numerical feature bias is triggered. Based on the prediction error loss value, a backpropagation derivative operation of the loss function is performed to calculate the network weight gradient data for each structural layer within the large language model (i.e., for the lexical sequence transformation layer, the multi-dimensional feature cross layer, the intent logic alignment layer, and the confidence normalization output layer). A preset gradient learning rate configuration step size is obtained, and numerical correction calculations are performed on the network weights (e.g., the aforementioned attention weight parameters to be optimized) within each of the above structural layers, in conjunction with the network weight gradient data. Through multiple rounds of extraction and forward / backward iterative calculations on the full sample data in the business intent training sample set, until the generated prediction error loss value is monitored and evaluated to decrease below a preset convergence threshold parameter, a parameter freeze and save operation is performed, thereby outputting the trained large language model. The final output of the trained large language model possesses stable business intent discrimination and node topology feature mapping capabilities, providing solid intelligent underlying support for performing high-precision discrimination and filtering processing on candidate fan-out cluster sets in actual online practice.

[0076] Optionally, generating a target fan-out cluster set based on the intent matching confidence score includes: in response to the same fan-out convergence target node being detected as a fan-out node by multiple levels, using a preset level priority rule to resolve the conflict caused by the same fan-out convergence target node being detected as a fan-out node by multiple levels, and simultaneously filtering each of the candidate fan-out clusters in the candidate fan-out cluster set based on the intent matching confidence score, so as to retain the candidate fan-out clusters in the candidate fan-out cluster set whose intent matching confidence score exceeds a preset confidence threshold and is characterized as conforming to the user's expected semantics, and then the remaining candidate fan-out clusters in the candidate fan-out cluster set constitute the target fan-out cluster set.

[0077] Preferably, after obtaining the intent matching confidence score output from the preceding steps, a technical process is performed to generate a target fan-out cluster set based on the intent matching confidence score. Since the aforementioned hierarchical fan-out pattern detection process is executed independently across different dimensions, spatially overlapping detection results are inevitable in the candidate fan-out cluster set. Specifically, cross-comparison processing is performed on the fan-out convergence target nodes associated with each candidate fan-out cluster in the candidate fan-out cluster set to identify overlapping states where the same fan-out convergence target node is detected as a fan-out node at multiple levels. This overlapping state means that in the graph traversal network of the knowledge base corresponding to the preset ontology, the same fan-out convergence target node possesses both the characteristic jointly pointed to by the object attributes (i.e., determined as a first-level fan-out node) and the characteristic jointly converged through inheritance relationships (i.e., determined as a second-level fan-out node). Identifying the overlapping state resulting from the same fan-out convergence target node being detected as a fan-out node at multiple levels provides a processing object basis for subsequent conflict resolution processing.

[0078] Preferably, in response to the same fan-out convergence target node being detected as a fan-out node by multiple levels, a technical logic for resolving conflicts using preset hierarchical priority rules is triggered. The preset hierarchical priority rules are obtained and used as the judgment benchmark for subsequent conflict resolution processing. These preset hierarchical priority rules pre-configure the priority order of fan-out nodes at different levels when characterizing network diffusion risk. For example, the first-level fan-out node based on horizontal connectivity features is given a higher priority than the second-level fan-out node based on vertical inheritance features. Introducing these preset hierarchical priority rules provides a standardized priority comparison basis for the states of multi-dimensionally overlapping fan-out nodes, thus avoiding mutual interference in processing logic when generating query execution plans from the joint target fan-out cluster set.

[0079] Preferably, a preset hierarchical priority rule is used to resolve conflicts arising from the same fan-out convergence target node being detected as a fan-out node by multiple levels. Specifically, multiple candidate fan-out clusters generated for the same fan-out convergence target node, corresponding to different hierarchical attributes (such as the first-level fan-out node and the second-level fan-out node), are compared with the preset hierarchical priority rule. During the comparison, the candidate fan-out cluster corresponding to the fan-out node with the highest priority is retained, and the remaining candidate fan-out clusters corresponding to fan-out nodes with lower priority are removed from the candidate fan-out cluster set. This conflict resolution process removes redundant candidate fan-out clusters pointing to the same fan-out convergence target node in the data dimension, ensuring that the candidate fan-out cluster set passed to subsequent analysis stages has a high degree of uniqueness in its structural representation.

[0080] Preferably, while performing the above-mentioned conflict resolution process where the same fan-out convergence target node is detected as a fan-out node by multiple levels, this application further filters each of the candidate fan-out clusters in the candidate fan-out cluster set based on the intent matching confidence score. A preset confidence threshold is obtained, which is a numerical boundary parameter (e.g., 0.8) used to measure whether the convergence method of the candidate fan-out cluster conforms to the semantic consistency of the original natural language question with the user's expectations. The intent matching confidence score corresponding to each candidate fan-out cluster is compared numerically with the preset confidence threshold. This numerical comparison transforms the continuous intent matching confidence score parameter into discrete judgment results, providing a quantitative technical execution criterion for distinguishing between candidate fan-out clusters that conform to the user's expected semantics and high-risk candidate fan-out clusters that deviate from the user's expected semantics.

[0081] Preferably, based on the comparison between the intent matching confidence score and the preset confidence threshold values ​​corresponding to each of the aforementioned candidate fan-out clusters, candidate fan-out clusters whose intent matching confidence scores exceed the preset confidence threshold and are characterized as conforming to the user's expected semantics are retained from the candidate fan-out cluster set. In the context of aviation queries, if the intent matching confidence score calculated for the candidate fan-out clusters corresponding to the "flight" type node, which serves as the fan-out convergence target node, is extremely high, it indicates that the intended query is to obtain a large-scale flight detail instance containing various types of personnel. These candidate fan-out clusters with intent matching confidence scores exceeding the preset confidence threshold represent normal data retrieval needs, and this application retains them instead of treating them as high-risk features that need to be suppressed, to avoid blocking reasonable traversal paths based on the knowledge base corresponding to the preset ontology.

[0082] Preferably, after selecting and retaining the candidate fan-out clusters that conform to the user's expected semantics from the candidate fan-out cluster set, the candidate fan-out clusters that do not meet the retention condition are extracted. These extracted candidate fan-out clusters have an intent matching confidence level lower than or equal to the preset confidence threshold, indicating that their convergence pattern deviates significantly from the core semantics of the original natural language problem, belonging to a high-risk invalid diffusion graph topology. The remaining candidate fan-out clusters in the candidate fan-out cluster set then constitute the target fan-out cluster set. This target fan-out cluster set, in its technical essence, collects the exact sources of graph diffusion risk that deviate from the semantic intent, providing clear target points for optimization for inserting aggregation operators in the final stage to generate a query execution plan for semantic queries.

[0083] Optionally, query behavior feature words are extracted from the original natural language question. Specifically, the original natural language question is matched with feature words in a preset keyword dictionary to extract query behavior feature words from the original natural language question. The preset keyword dictionary includes several feature words, each of which corresponds to a keyword in the original natural language question that expresses the intent of the query behavior.

[0084] Preferably, after obtaining the original natural language question received in the preceding steps, in order to specifically guide the specific execution mode of semantic query in the knowledge base corresponding to the preset ontology, this application implements the technical processing of extracting query behavior feature words from the original natural language question. Traditional knowledge graph retrieval schemes often only focus on the extraction and expansion of business entity tags, while ignoring the action expectation of expressing the query behavior intention attached to the user's question. As a result, regardless of whether the user wants to obtain a detailed list or a statistical count, this application adopts the same undifferentiated node traversal data retrieval strategy, which can easily lead to unnecessary consumption of underlying graph computing resources. To overcome this technical defect, this application introduces a preset keyword dictionary. The preset keyword dictionary serves as a priori knowledge base for executing business intent parsing, providing a structured discrimination benchmark for subsequently converting natural language expressions into machine-executable query execution plans.

[0085] Preferably, the aforementioned preset keyword dictionary is not a random accumulation of words, but is configured to contain several feature words, each corresponding to a keyword expressing the intent of the query behavior in the original natural language question. Specifically, this application pre-collects and categorizes fixed collocations or single characters commonly used to indicate operational requests in natural language question-and-answer scenarios, and configures them as mapping benchmarks for each of the aforementioned feature words. In the context of aviation query applications, words such as "which," "who," and "specifically include," which focus on obtaining a detailed list of entities at the underlying level of the graph, and words such as "how much," "total," and "average," which focus on obtaining calculated summaries, are all categorized and defined as the corresponding feature words. Through this technical approach of structurally deconstructing and mapping unstructured user questioning habits, the preset keyword dictionary possesses the feature support capability to distinguish different keywords expressing different query intents at the underlying level.

[0086] Preferably, after introducing the preset keyword dictionary, the action of matching the original natural language question with the feature words in the preset keyword dictionary is performed. Before performing the specific matching process, the original natural language question needs to undergo pre-processing for text-level noise reduction and sequence extraction. Specifically, the received original natural language question is segmented and part-of-speech tagging is performed to divide the continuous original natural language question into a text sequence containing multiple discrete lexical units. Subsequently, stop words that lack actual query action indication meaning in the text sequence are removed, as well as business entity words that have been mapped to the current extended query node in the previous processing steps (such as "passenger" and "flight" in the aviation scenario), thereby retaining the remaining lexical units in the text sequence that express the tone of the question, and these retained lexical units constitute the sequence of words to be matched. The formed sequence of words to be matched removes business entity noise and retains the underlying grammatical text carrier that reflects the user's actual graph operation expectations with high fidelity.

[0087] Preferably, after generating the aforementioned sequence of words to be matched, the formal implementation involves matching the original natural language question (specifically represented as the denoised sequence of words to be matched) with the feature words in the preset keyword dictionary. In the specific execution logic of the matching process, this application utilizes a sliding window mechanism to traverse each lexical unit in the sequence of words to be matched, and performs character structure comparison and verification between the currently traversed lexical unit and each feature word recorded in the preset keyword dictionary. Through this traversal and character structure comparison and verification, it objectively determines whether there are local text fragments in the sequence of words to be matched that match the pre-configured feature words, thereby providing a clear feature-based basis for subsequently identifying keywords that express the query intent in the original natural language question.

[0088] Preferably, based on the output of the matching process described above, query behavior feature words are extracted from the original natural language question. Specifically, when it is determined that there is a local text fragment in the sequence of words to be matched that matches the feature words in the preset keyword dictionary, this application triggers a feature extraction process to extract the matching local text fragment from the sequence of words to be matched and confirm the extracted local text fragment as the query behavior feature word. For example, when facing the original natural language question "Which airports have aviation-related personnel visited?", this application, after generating the sequence of words to be matched and the matching process described above, locks and extracts the local text fragment "which" as the corresponding query behavior feature word. The extracted query behavior feature word essentially acts as an action conversion bridge connecting unstructured user language and the subsequently generated query execution plan.

[0089] Preferably, by using the aforementioned technical step of matching the original natural language question with the feature words in the preset keyword dictionary to extract the query behavior feature words, this application achieves explicit quantitative capture of keywords expressing query behavior intent in the original natural language question. Compared to the coarse retrieval caused by unclear intent in traditional solutions, the query behavior feature words extracted in this application can indicate the underlying action expectation of the current query task with higher accuracy—that is, verifying whether the current query task needs to perform horizontal traversal expansion of discrete nodes or vertical aggregation calculation of the number of nodes. This objective extraction of the query behavior feature words provides essential feature input parameters for subsequently jointly compiling a query execution plan with high intent targeting by combining the generated target fan-out cluster set, effectively suppressing the ineffective waste of graph query computing power and network transmission bandwidth from the entry stage of query execution plan generation.

[0090] Optionally, by jointly generating a target fan-out cluster set, a query execution plan is generated for semantic querying in a knowledge base corresponding to a preset ontology based on the original natural language question. This includes: performing intent logic classification processing based on the query behavior feature words to generate corresponding target user intent categories, including: aggregation intent, selective result intent, and intent fuzziness; fusing the target fan-out cluster set with the target user intent categories to generate query plan optimization decision information; having the query plan builder adjust the traversal order of the original query execution path based on the query plan optimization decision information to obtain an optimized query execution path, wherein the original query execution path is obtained by traversing the current extended query node set according to object attributes and inheritance relationships; generating an aggregation operator based on the target user intent category and the target fan-out cluster set, and inserting the aggregation operator before the execution position corresponding to the fan-out convergence target node to generate a query execution plan for semantic querying in a knowledge base corresponding to a preset ontology based on the original natural language question, wherein the execution position represents the node processing position before reaching the fan-out convergence target node during the query traversal process based on the current extended query node set and object attributes and inheritance relationships.

[0091] Preferably, before generating a query execution plan for semantic queries in the knowledge base corresponding to a preset ontology based on the original natural language question, a traversal baseline architecture as the basis for adjustment needs to be constructed. Specifically, the current extended query node set obtained from the preprocessing is acquired, and traversal path planning is performed on this set according to the pre-parsed object attributes and inheritance relationships. Through this traversal path planning, a directed sequential access sequence spreading from the source class as the traversal starting point to the deeper layers of the graph is objectively identified, thus obtaining the original query execution path. Although the obtained original query execution path can complete physical node connectivity in the knowledge base corresponding to the preset ontology, directly executing this original query execution path often leads to high redundant traversal overhead because it does not consider the high-density aggregation risk of graph nodes and the specific operational requirements of users. Therefore, the generated original query execution path will be used as the underlying structural foundation to support subsequent path traversal order adjustment processing performed on the original query execution path.

[0092] Preferably, to ensure that subsequent path optimization has a clear business action orientation, a technical action of intention logic classification based on the query behavior feature words is implemented. The query behavior feature words extracted in the preceding steps are obtained and input into a pre-configured intent mapping rule base for classification condition matching to generate corresponding target user intent categories. Specifically, the generated target user intent categories include three basic categories: aggregation intent indicating the acquisition of statistical calculation results, selective result intent indicating the extraction of a detailed entity list, and ambiguous intent representing unclear action requests. In the context of aviation query applications, if the extracted query behavior feature words are "which" or "specifically includes," the generated target user intent category is the selective result intent; if the query behavior feature words are "total" or "how much," the generated target user intent category is the aggregation intent.

[0093] Preferably, after generating the target user intent category, this target user intent category, reflecting the user's subjective action request, is fused with the previously identified target fan-out cluster set, reflecting the objective risk of graph explosion. This fusion process essentially maps the target user intent category (e.g., whether full detailed data is needed) to each target fan-out cluster in the target fan-out cluster set, to assess the actual computational pressure on which the current user's operational intent might cause a result explosion under class nodes with a specific fan-out topology. Furthermore, this application generates query plan optimization decision information based on the assessed actual computational pressure. This generated query plan optimization decision information provides a structured decision reference that integrates topological scale characteristics and the target user intent category for subsequent graph traversal logic reconstruction.

[0094] Preferably, based on the query plan optimization decision information generated above, a path reconstruction mechanism is triggered to correct unreasonable underlying graph traversal order. The pre-set query plan builder obtains the original query execution path and adjusts the traversal order of the original query execution path based on the query plan optimization decision information. During the specific path traversal order adjustment process, if the query plan optimization decision information indicates that a portion of the original query execution path has a high fan-out diffusion tendency and the current target user intent category does not require full details (such as the corresponding aggregation intent), the query plan builder will perform post-sorting or delayed expansion processing on the access extension actions of that portion of the path, thereby obtaining an optimized query execution path. This optimized query execution path, traversing according to the object attributes and inheritance relationships, can avoid the risk of prematurely triggering a large number of instance explosions with lower detection costs.

[0095] Preferably, after obtaining the optimized query execution path, in order to block the disordered reading of large-scale instance nodes at the physical query level, further operator implantation preparation processing is implemented for the fan-out convergence target node. This application performs rule matching processing based on the target user intent category and the target fan-out cluster set to generate an aggregation operator. For example, in an aviation scenario, when the target user intent category is the aggregation intent, and the target fan-out cluster set contains a target fan-out cluster with "flight" as the fan-out convergence target node, this application generates the aggregation operator for performing data merging and numerical counting operations. Simultaneously, node processing position scanning is performed in the optimized query execution path to accurately locate the node processing position before reaching the fan-out convergence target node during the query traversal of object attributes and inheritance relationships based on the current extended query node set, and the located node processing position is extracted and confirmed as the execution position.

[0096] Preferably, after accurately locating the execution position, the generated aggregation operator is inserted before the execution position corresponding to the fan-out convergence target node. This operation of pre-inserting the aggregation operator ensures that the subsequent knowledge base retrieval engine is pre-triggered to perform logical merging or quantity truncation of data dimensions before traversing the optimized query execution path to the high-risk fan-out convergence target node, thereby blocking the scattered expansion and reading of a large number of underlying instances at the physical connectivity level. After completing the above-mentioned insertion action for the aggregation operator, the target fan-out cluster set is finally combined to generate a query execution plan for semantic querying in the knowledge base corresponding to the preset ontology based on the original natural language question. This generated query execution plan differs from the traditional indiscriminate exhaustive expansion retrieval instruction. It encapsulates underlying query logic optimized by intent filtering and topology pruning, keeping the computational engine consumption at a low level while responding to the real target user intent category and actually issuing semantic query tasks.

[0097] like Figure 2 As shown, this is an embodiment of a multi-layer fan-out detection device based on semantics and structure, which includes: The first program unit is used to perform query expansion processing on the original natural language question input by the user, so as to generate multiple current expanded query nodes and thus form a set of current expanded query nodes. Based on a preset ontology definition file, an ontology basic rule base is constructed. The preset ontology definition file is the ontology specification file of the domain to which the original natural language question belongs. The second program unit is used to perform hierarchical fan-out pattern detection processing on the current extended query node set based on the ontology basic rule base, so as to generate a candidate fan-out cluster set. The third program unit is used to extract class node information, relationship link information and field annotation information corresponding to the candidate fan-out clusters from the preset ontology definition file based on the candidate fan-out cluster set to generate a target fan-out cluster set. The fourth program unit is used to extract query behavior feature words from the original natural language question to form a joint target fan-out cluster set, and generate a query execution plan for semantic querying in the knowledge base corresponding to the preset ontology based on the original natural language question.

[0098] like Figure 3 The image shows an electronic device that includes a processor and a memory. The memory is used to store computer programs; When the processor executes the program stored in the memory, it implements the functions of each module of the device described in the embodiments of this application, or implements the steps of the method described.

[0099] Figures 2-3 For an exemplary description, please refer to the above. Figure 1 This will not be elaborated upon here.

Claims

1. A multi-layer fan-out detection method based on semantics and structure, characterized in that, include: Step 1: Perform query expansion processing on the original natural language question input by the user to generate multiple current expanded query nodes, which then constitute a current expanded query node set. Based on a preset ontology definition file, construct an ontology basic rule base. The preset ontology definition file is the ontology specification file for the domain to which the original natural language question belongs. Step 2: Based on the ontology basic rule base, perform hierarchical fan-out pattern detection processing on the current expanded query node set to generate a candidate fan-out cluster set. Step 3: Based on the candidate fan-out cluster set, extract class node information, relationship link information, and field annotation information corresponding to the candidate fan-out clusters from the preset ontology definition file to generate a target fan-out cluster set. Step 4: Extract query behavior feature words from the original natural language question to form a joint target fan-out cluster set, and generate a query execution plan for semantic querying in the knowledge base corresponding to the preset ontology based on the original natural language question.

2. The multi-layer fan-out detection method based on semantics and structure according to claim 1, characterized in that, Based on a preset ontology definition file, an ontology basic rule base for supporting node branch recognition is constructed, including: parsing the preset ontology definition file to extract the object attribute set, class hierarchy information and attribute feature tags of the ontology class from the preset ontology definition file; and performing structured aggregation processing on the object attribute set, the class hierarchy information and the attribute feature tags to construct the ontology basic rule base for supporting node branch recognition.

3. The multi-layer fan-out detection method based on semantics and structure according to claim 2, characterized in that, The current extended query node includes class nodes composed of a source class, subclasses, and a parent class, as well as object attributes between class nodes. The source class represents the class node that serves as the starting point for traversal during the query extension process. The subclasses represent class nodes that inherit from other classes in the class hierarchy described by the class hierarchy information. The parent class represents class nodes that are inherited by other classes in the class hierarchy described by the class hierarchy information. The subclass hierarchy depth represents the number of inheritance levels of the subclass relative to the parent class in the class hierarchy described by the class hierarchy information. The object attributes represent the semantic association relationships between different class nodes.

4. The multi-layer fan-out detection method based on semantics and structure according to claim 3, characterized in that, Step 2 includes: parsing the object attribute set from the ontology base rule base and identifying a first convergence topology structure from the current extended query node set, where multiple different source classes point to the same target class through different object attributes, to determine a first-level fan-out node; parsing the class hierarchy information from the ontology base rule base and identifying a second convergence topology structure from the current extended query node set, where multiple subclasses converge to the same parent class through inheritance relationships, to determine a second-level fan-out node; determining the remaining extended query nodes in the current extended query node set that are not covered by the first-level and second-level fan-out nodes, to determine a third-level fan-out node; and performing aggregation and encapsulation processing on the first-level, second-level, and third-level fan-out nodes according to the fan-out convergence target node to obtain multiple candidate fan-out clusters, which then constitute the candidate fan-out cluster set.

5. The multi-layer fan-out detection method based on semantics and structure according to claim 4, characterized in that, Determining the first-level fan-out node involves: identifying the target class in the first convergence topology and marking it as a first-level fan-out node. The target class is a class node related to the original natural language query target, which is pointed to by multiple source classes through different object attributes. Determining the second-level fan-out node involves: determining the parent class in the second convergence topology whose subclass hierarchy depth meets the requirements based on a preset subclass hierarchy depth threshold, and marking the parent class as a second-level fan-out node. Determining the third-level fan-out node involves: calculating the semantic embedding vector similarity between the remaining extended query nodes; when the semantic embedding vector similarity between any two remaining extended query nodes exceeds a preset similarity threshold, the remaining extended query nodes that meet the conditions are marked as third-level fan-out nodes.

6. The multi-layer fan-out detection method based on semantics and structure according to claim 5, characterized in that, When the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes are aggregated and encapsulated according to the fan-out convergence target node to obtain multiple candidate fan-out clusters and thus constitute the candidate fan-out cluster set, the relationship between the generation of a candidate fan-out cluster and the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes is as follows: based on the fan-out convergence target node, the first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes are grouped to obtain several groups of fan-out nodes corresponding to the same fan-out convergence target node. The first-level fan-out nodes, the second-level fan-out nodes, and the third-level fan-out nodes located in the same group are encapsulated to generate a candidate fan-out cluster. The fan-out convergence target node refers to a class node in the current extended query node set that is jointly pointed to by multiple other current extended query nodes through object attributes or inheritance relationships, and may generate a large number of instances, leading to an explosion of query results.

7. The multi-layer fan-out detection method based on semantics and structure according to claim 1, characterized in that, Step 3 includes: traversing each candidate fan-out cluster in the candidate fan-out cluster set, extracting class node information, relation link information, and field annotation information corresponding to the candidate fan-out cluster from the preset ontology definition file to form corresponding fan-out context information; concatenating the fan-out context information with the original natural language question one by one to generate structured intent verification prompts; inputting the intent verification prompts into a large language model for semantic reasoning calculation to generate intent matching confidence, wherein the intent matching confidence is used to characterize the convergence mode of multiple other current extended query nodes represented by the corresponding candidate fan-out cluster pointing to the same current extended query node and the semantic consistency with the original natural language question; and generating a target fan-out cluster set based on the intent matching confidence.

8. The multi-layer fan-out detection method based on semantics and structure according to claim 7, characterized in that, Based on the intent matching confidence, a target fan-out cluster set is generated, including: in response to the same fan-out convergence target node being detected as a fan-out node by multiple levels, using a preset level priority rule to resolve the conflict caused by the same fan-out convergence target node being detected as a fan-out node by multiple levels, and simultaneously filtering each of the candidate fan-out clusters in the candidate fan-out cluster set based on the intent matching confidence, so as to retain the candidate fan-out clusters whose intent matching confidence exceeds a preset confidence threshold and are characterized as conforming to the user's expected semantics from the candidate fan-out cluster set, and then the remaining candidate fan-out clusters in the candidate fan-out cluster set constitute the target fan-out cluster set.

9. The multi-layer fan-out detection method based on semantics and structure according to claim 1, characterized in that, Extracting query behavior feature words from the original natural language question involves matching the original natural language question with feature words in a preset keyword dictionary to extract query behavior feature words from the original natural language question. The preset keyword dictionary includes several feature words, each of which corresponds to a keyword in the original natural language question that expresses the intent of the query behavior.

10. The multi-layer fan-out detection method based on semantics and structure according to claim 9, characterized in that, A joint target fan-out cluster set is used to generate a query execution plan for semantic querying in a knowledge base corresponding to a preset ontology based on the original natural language question. This includes: performing intent logic classification processing based on the query behavior feature words to generate corresponding target user intent categories, including: aggregation intent, selective result intent, and intent ambiguity; fusing the target fan-out cluster set with the target user intent categories to generate query plan optimization decision information; having the query plan builder adjust the traversal order of the original query execution path based on the query plan optimization decision information to obtain an optimized query execution path, wherein the original query execution path is obtained by traversing the current extended query node set according to object attributes and inheritance relationships; generating an aggregation operator based on the target user intent category and the target fan-out cluster set, and inserting the aggregation operator before the execution position corresponding to the fan-out convergence target node to generate a query execution plan for semantic querying in a knowledge base corresponding to a preset ontology based on the original natural language question, where the execution position represents the node processing position before reaching the fan-out convergence target node during the query traversal process based on the current extended query node set and object attributes and inheritance relationships.