Scenic spot intelligent question answering and recommendation method based on knowledge graph and large model fusion

By constructing a multi-layered abstract semantic network for scenic areas and injecting it with a large language model, the problem of unstable knowledge retrieval in intelligent question answering and recommendation for scenic areas was solved, parallel intent processing and unified output were achieved, and the smoothness of interaction and content adaptability were improved.

CN121880532BActive Publication Date: 2026-07-07HANGZHOU KANYUANFANG TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU KANYUANFANG TECHNOLOGY CO LTD
Filing Date
2026-03-19
Publication Date
2026-07-07

Smart Images

  • Figure CN121880532B_ABST
    Figure CN121880532B_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent interactive technology for scenic areas, and discloses an intelligent question-answering and recommendation method for scenic areas that integrates knowledge graphs and large-scale models. The method includes receiving multimodal raw data to generate a set of entity relationship pairs, restructuring the structure into a multi-layered abstract semantic network for the scenic area; constructing an initial large-scale language model containing a memory network and a reasoning module, injecting all semantic associations from the semantic network into the memory network; collecting and labeling query samples with multiple intent tags to fine-tune the model, generating a dedicated interactive model. When responding to user queries, the model performs intent classification and knowledge retrieval in parallel, invoking the structured knowledge and reasoning module generation capabilities of the memory network, and merging and outputting answers and recommendations. This method improves the depth of semantic understanding and interactive integration of scenic areas, optimizing the intelligent service experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent interactive technology for scenic areas, specifically to an intelligent question-answering and recommendation method for scenic areas that integrates knowledge graphs and large-scale models. Background Technology

[0002] Existing intelligent question-answering and recommendation technologies for scenic spots often combine knowledge graphs with large-scale models. Knowledge graphs supplement the factual knowledge of large-scale models, improving answer accuracy. However, in practice, knowledge graphs are often input as flat lists of entity relationships, without structural reorganization of these relationships to form multi-layered abstract semantic networks. This makes it difficult to reflect the hierarchical relationships and complex semantics between scenic spot elements. Knowledge injection often relies on prompt concatenation or external database retrieval, failing to embed structured knowledge into the internal memory components of large-scale models. This results in knowledge retrieval depending on temporary context matching, leading to insufficient stability. When responding to queries, conventional solutions perform intent classification and knowledge retrieval step-by-step, first identifying a single intent and then performing a targeted retrieval. Multiple intents are not processed in parallel, and the outputs are mostly independent answers or recommendations, lacking integration.

[0003] This invention aims to address the problems of insufficient knowledge fusion depth and inefficient interaction mechanisms in existing technologies. Specifically, it requires breaking through the technical path of injecting the full semantic associations of multi-layered abstract semantic networks into a large model memory network, thereby changing the traditional flat knowledge input and external retrieval mode. Simultaneously, it requires establishing a mechanism that executes intent classification and knowledge retrieval in parallel during query response, synchronously invoking the structured knowledge and reasoning module generation capabilities of the memory network, thus changing the step-by-step processing and single-output interaction logic and achieving the fusion generation of answers and recommendations. Summary of the Invention

[0004] The purpose of this invention is to provide a method for intelligent question answering and recommendation of scenic spots that integrates knowledge graphs and large models, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, this invention provides a method for intelligent question answering and recommendation of scenic spots that integrates knowledge graphs and large-scale models. The method includes:

[0006] Receive and parse multimodal raw data about the scenic area, and generate a set of entity relation pairs containing semantic relationships;

[0007] The entity relationship set is restructured to form a scenic area semantic network with multiple levels of abstraction;

[0008] An initial large language model containing a memory network and a reasoning module is constructed, and all semantic relationships of the scenic area semantic network are injected into the memory network of the initial large language model as structured knowledge.

[0009] Collect and label scenic spot query requests from real user interaction scenarios to form a sample set of scenic spot queries with multiple intent tags;

[0010] The initial large language model with injected structured knowledge is iteratively fine-tuned using the scenic area query sample set to generate a dedicated scenic area interaction model with multi-intent parsing capabilities.

[0011] In response to the user's natural language query, the dedicated scenic area interaction model simultaneously invokes the structured knowledge and reasoning module generation capabilities of its internal memory network, performs intent classification and knowledge retrieval in parallel, and finally merges to generate a unified output containing answers and recommended content.

[0012] Preferably, the structural reorganization of the entity relationship set to form a scenic area semantic network with multiple levels of abstraction includes:

[0013] Traverse the set of entity relationship pairs and identify the core scenic area entities within it;

[0014] For each core scenic area entity, extract all directly related surrounding entities and relationships to form a first-order semantic subgraph centered on the core scenic area entity;

[0015] Based on predefined semantic abstraction rules, semantic clustering is performed on the surrounding entities in each first-order semantic subgraph, and semantically similar surrounding entities are classified into higher-level abstract concept nodes.

[0016] Establish the inclusion relationship between the core scenic area entities and the corresponding abstract concept nodes, and at the same time establish the hierarchical relationship between different abstract concept nodes, thereby forming a multi-layer semantic network structure that includes a concrete entity layer and an abstract concept layer.

[0017] The multi-layered semantic network structure formed by all core scenic area entities is interconnected. Nodes in different semantic network structures establish cross-network connections when the semantic similarity threshold is met, ultimately forming a unified scenic area semantic network with multiple levels of abstraction.

[0018] Preferably, the step of semantically clustering the surrounding entities in each first-order semantic subgraph according to predefined semantic abstraction rules, and classifying semantically similar surrounding entities into higher-level abstract concept nodes, includes:

[0019] Load a preset scenic area domain ontology, which defines the abstract concept categories to which different entity types belong;

[0020] For each surrounding entity in the target first-order semantic subgraph, the entity is matched with the entity type in the scenic area domain ontology using entity linking technology to obtain its initial concept category.

[0021] For multiple surrounding entities belonging to the same initial concept category, calculate the cosine similarity of their vectorized representations;

[0022] If the cosine similarity exceeds a preset intra-class similarity threshold, then these surrounding entities are merged into an entity group.

[0023] A new abstract concept node is created for each entity group. The attributes of the abstract concept node are summarized from the common attributes of all surrounding entities in the group, and a subordinate link is established between all surrounding entities in the group and the abstract concept node.

[0024] Preferably, the step of establishing the inclusion relationship between the core scenic area entities and their corresponding abstract concept nodes, and simultaneously establishing the hierarchical relationship between different abstract concept nodes, thereby forming a multi-layer semantic network structure containing a concrete entity layer and an abstract concept layer, includes:

[0025] In the semantic network of the scenic area, a hierarchical index is created in the vertical direction, and the layers where the original core scenic area entities and surrounding entities are located are marked as the base entity layers;

[0026] The newly created abstract concept node is placed in an abstract concept layer that is higher than the basic entity layer, and its layer height is recorded in the layer index.

[0027] Establish a "concrete to abstract" pointing link between the core scenic area entity and each abstract concept node derived from its first-order semantic subgraph, and assign the link the semantic relationship of "instance belongs";

[0028] Calculate the semantic relevance between different abstract concept nodes. If the entity groups represented by two abstract concept nodes have a hierarchical relationship in the classification system of the scenic area domain ontology, then establish a "from abstract to more abstract" pointing link between them and assign the link a "conceptual inclusion" semantic relationship, thereby forming a tree-like or graph-like hierarchical relationship.

[0029] Preferably, the construction of an initial large language model including a memory network and a reasoning module, and the injection of all semantic relationships of the scenic area semantic network as structured knowledge into the memory network of the initial large language model, includes:

[0030] We select a general large language model as the basic architecture and add a readable and writable external memory network component in addition to its internal parameter layer.

[0031] The external memory network component is implemented by a vector database with a key-value pair structure, where the key is used to store knowledge indexes and the value is used to store the corresponding knowledge content.

[0032] Each semantic association in the scenic area semantic network is converted into a triplet statement in natural language.

[0033] Using the text encoder of the initial large language model itself, each triplet statement is encoded into a high-dimensional vector, which is stored as knowledge content in the value of the external memory network component;

[0034] Simultaneously, core topic words are extracted from the triplet statements and encoded into knowledge index vectors, which are stored in the keys of the external memory network component to complete the injection of structured knowledge.

[0035] Preferably, the step of iteratively fine-tuning the initial large language model injected with structured knowledge using the scenic area query sample set to generate a dedicated scenic area interaction model with multi-intent parsing capabilities includes:

[0036] The sample set of scenic spot queries is divided into a training subset and a validation subset;

[0037] For each scenic spot query sample with multiple intent labels in the training subset, it is fed as input text into the initial large language model injected with structured knowledge.

[0038] The inference module of the initial large language model processes the input text and generates an intermediate query vector;

[0039] Using the intermediate query vector as the retrieval key, an approximate retrieval is performed in the external memory network component to recall the most relevant knowledge content vectors.

[0040] The recalled knowledge content vector is fused with the intermediate query vector to form an enhanced context vector;

[0041] Based on the enhanced context vector, the initial large language model generates an initial response to the scenic area query sample;

[0042] The initial response is compared with the multiple intent tags of the scenic area query samples, and the difference loss between the model prediction and the actual tags is calculated.

[0043] The parameters of the inference module in the initial large language model and the read / write mechanism parameters of the external memory network component are updated using the backpropagation algorithm based on the difference loss, while preserving the injected structured knowledge content unchanged;

[0044] The process is repeated until the model's performance on the validation subset stabilizes, thus obtaining the dedicated scenic area interaction model.

[0045] Preferably, the step of using the difference loss to update the parameters of the inference module in the initial large language model and the read / write mechanism parameters of the external memory network component through backpropagation algorithm, while preserving the injected structured knowledge content unchanged, includes:

[0046] Calculate the gradient of the difference loss with respect to the weights of the output layer of the inference module, and use the gradient descent algorithm to adjust the weights of the output layer to reduce the difference loss;

[0047] Calculate the gradient of the difference loss with respect to the query vector and key vector in the attention mechanism of the inference module, and update the attention weight allocation strategy to optimize the focus of attention on the input text;

[0048] Calculate the gradient of the difference loss with respect to the parameters of the read / write controller in the external memory network component, and adjust the gating signal generation logic of the read / write controller to optimize the accuracy of knowledge retrieval;

[0049] During the parameter update process, write protection constraints are applied to the memory area storing the injected structured knowledge content to ensure that the weight of the storage unit corresponding to the knowledge content vector is not modified.

[0050] After each iteration update, the integrity of the key-value pair vector database in the external memory network component is verified to confirm that the injected triplet statement encoding vectors have not experienced numerical drift.

[0051] Preferably, in response to the user's natural language query, the dedicated scenic area interaction model simultaneously invokes the structured knowledge and reasoning module's generation capabilities within its internal memory network, performs intent classification and knowledge retrieval in parallel, and finally fuses and generates a unified output containing answers and recommended content, including:

[0052] The dedicated scenic area interaction model receives natural language query text input by the user;

[0053] The reasoning module of the dedicated scenic area interaction model performs deep semantic analysis on the natural language query text to generate a comprehensive query representation vector.

[0054] The dedicated scenic area interaction model simultaneously inputs the comprehensive query representation vector into two parallel processing paths.

[0055] The first processing path maps the comprehensive query representation vector to a preset intent classification space, outputs the probability distribution of the natural language query text belonging to each predefined scenic spot intent category, and identifies the dominant user intent.

[0056] The second processing path uses the comprehensive query representation vector as the retrieval key to perform vector similarity retrieval in the memory network of the dedicated scenic area interaction model to obtain the set of structured knowledge fragments most relevant to the query.

[0057] The identified dominant user intent is used as a guiding signal to filter and sort the retrieved set of structured knowledge fragments;

[0058] The structured knowledge fragment set after filtering and sorting is integrated with the comprehensive query representation vector and input into the text generator of the reasoning module to generate a coherent text answer that directly responds to the dominant user intent.

[0059] Based on the generated text answer, entity information that meets the recommendation criteria is extracted from the filtered and sorted set of structured knowledge fragments according to the type of dominant user intent, and appended to the text answer in the form of a structured list to form the unified output.

[0060] Preferably, the second processing path uses the comprehensive query representation vector as the retrieval key to perform vector similarity retrieval in the memory network of the dedicated scenic area interaction model to obtain a set of structured knowledge fragments most relevant to the query, including:

[0061] The comprehensive query representation vector is sent to the external memory network component of the dedicated scenic area interaction model;

[0062] The external memory network component calculates the cosine similarity between the comprehensive query representation vector and all knowledge index vectors in the memory network;

[0063] Sort all knowledge index vectors in descending order based on the calculated cosine similarity;

[0064] Select a number of knowledge index vectors whose ranking exceeds a set threshold or whose ranking is at the top, and determine them as relevant indexes;

[0065] Read the knowledge content vector stored in pairs with the relevant index;

[0066] The knowledge content vector is decoded and restored to the original natural language description of triple statements, forming an initial set of knowledge fragments;

[0067] The initial set of knowledge fragments is deduplicated and redundant to obtain the set of structured knowledge fragments most relevant to the query.

[0068] Preferably, the step of using the identified dominant user intent as a guiding signal to filter and sort the retrieved set of structured knowledge fragments includes:

[0069] Based on the dominant user intent, knowledge filtering rules and weight allocation rules related to the dominant user intent are loaded from a preset configuration rule base;

[0070] Based on the knowledge filtering rules, the structured knowledge fragment set is traversed, and triplet statements that are irrelevant to the dominant user intent or have a relevance below the relevance threshold are removed.

[0071] For the triple statements retained after filtering, a relevance weight is calculated for them according to the weight allocation rule, which considers the semantic distance between the entity in the triple statement and the dominant user intent keyword, the degree of matching of the relationship type, and the confidence of the knowledge source.

[0072] The retained triplet statements are sorted in descending order according to the calculated relevance weights to generate a sorted set of structured knowledge fragments.

[0073] Compared with the prior art, the beneficial effects of the present invention are:

[0074] The entity relationships containing semantic connections are restructured to form a multi-level abstract semantic network for scenic areas. All semantic connections within this network are then injected as structured knowledge into the memory network of the initial large language model. Conventional techniques input knowledge as a flat list of entity relationships or fail to embed knowledge into the model's internal memory components, relying on external retrieval or temporary contextual matching. This results in fragmented and unstable knowledge retrieval. The new approach allows the model's memory network to directly store the hierarchical semantic connections between scenic area elements. Knowledge retrieval can then quickly locate cross-level information based on the abstract hierarchy, enhancing the understanding of the complex semantic relationships within the scenic area scene. This avoids knowledge connection breaks caused by temporary splicing and allows the model to more directly capture the implicit hierarchy, subordination, and cross-relationships between scenic area elements.

[0075] When responding to user natural language queries, the dedicated scenic area interaction model performs intent classification and knowledge retrieval in parallel. Simultaneously, it utilizes the structured knowledge and reasoning capabilities of its internal memory network to generate a unified output containing both answers and recommendations. Conventional techniques perform intent classification and knowledge retrieval step-by-step, defining a single intent before retrieving corresponding knowledge. This often results in independent answers or recommendations, easily leading to content mismatch with user needs due to fragmented intents, and also introduces delays in the interaction process. The parallel mechanism synchronizes intent recognition and knowledge retrieval, simultaneously utilizing the fixed semantic associations of the memory network and the dynamic generation capabilities of the reasoning module. This ensures that answers and recommendations are generated within the same semantic parsing framework, avoiding a sense of fragmentation in content, reducing waiting time, and making the output more suitable for the diverse needs of users in integrated scenarios. This enhances the smoothness of the interaction and the overall adaptability of the content. Attached Figure Description

[0076] Figure 1 This is a schematic diagram illustrating the working principle of the intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models as described in this invention.

[0077] Figure 2A flowchart for constructing a multi-level abstract semantic network for scenic areas;

[0078] Figure 3 A flowchart for generating abstract concept nodes for semantic clustering;

[0079] Figure 4 A biaxial line graph showing the fine-tuning and iteration effects of a dedicated scenic area interaction model;

[0080] Figure 5 A biaxial bar chart showing the number of scenic area query types and processing accuracy. Detailed Implementation

[0081] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0082] Please see Figure 1 This invention provides a method for intelligent question answering and recommendation of scenic spots by integrating knowledge graphs and large-scale models. The method includes: receiving and parsing multimodal raw data about scenic spots; generating a set of entity relationship pairs containing semantic associations through information extraction technology; restructuring the generated set of entity relationship pairs to form a scenic spot semantic network with multiple levels of abstraction, which can more effectively organize scenic spot knowledge; constructing an initial large-scale language model containing a memory network and a reasoning module, and injecting all semantic associations of the scenic spot semantic network as structured knowledge into the model's memory network; collecting and labeling scenic spot query requests from real user interaction scenarios to form a sample set of scenic spot queries with multiple intent labels; using this sample set to iteratively fine-tune the initial large-scale language model with injected structured knowledge, enabling the model to generate a dedicated scenic spot interaction model with multi-intent parsing capabilities; when a user initiates a natural language query, this dedicated model can simultaneously call the structured knowledge of the internal memory network and the generation capabilities of the reasoning module, performing intent classification and knowledge retrieval in parallel, and finally merging to generate a unified output containing direct answers and personalized recommendations.

[0083] In one embodiment of the present invention, see [reference] Figure 2After receiving and parsing the multimodal raw data, the resulting set of entity relationship pairs requires further processing to form a scenic area semantic network. This set of entity relationship pairs is traversed to identify core scenic area entities, such as specific attractions or landmark buildings. Around each identified core scenic area entity, all directly related surrounding entities and their relationships are extracted, forming a first-order semantic subgraph centered on that core scenic area entity. According to predefined semantic abstraction rules, semantic clustering is performed on the surrounding entities in each first-order semantic subgraph, classifying semantically similar surrounding entities into higher-level abstract concept nodes. Inclusion relationships are established between core scenic area entities and their corresponding abstract concept nodes, while hierarchical relationships are also established between different abstract concept nodes, thus forming a multi-layered semantic network structure containing both concrete entity layers and abstract concept layers. All multi-layered semantic network structures formed by core scenic area entities are interconnected. When nodes in different semantic network structures meet a preset semantic similarity threshold, cross-network connections are established between them, ultimately forming a unified scenic area semantic network with multiple levels of abstraction.

[0084] In practice, the process begins by traversing the set of entity relationship pairs generated after receiving and parsing the multimodal raw data, and identifying the core scenic area entity within it. For example, from a set of entity relationship pairs containing "Beijing Forbidden City - located in - Dongcheng District, Beijing", "Beijing Forbidden City - built in - Ming Dynasty", "Hall of Supreme Harmony - located in - Beijing Forbidden City", "Palace of Heavenly Purity - located in - Beijing Forbidden City", "Forbidden City ticket - price is - 60 yuan", and "Forbidden City opening hours - is - 08:30-17:00", "Beijing Forbidden City" is identified as a core scenic area entity. Around the core scenic area entity "Beijing Forbidden City", all directly related surrounding entities and relationships are extracted, forming a first-order semantic subgraph centered on "Beijing Forbidden City". This first-order semantic subgraph includes surrounding entities such as "Dongcheng District, Beijing", "Ming Dynasty", "Hall of Supreme Harmony", "Palace of Heavenly Purity", "Forbidden City ticket", and "Forbidden City opening hours", as well as relationships such as "located in", "built in", "price is", and "is".

[0085] In some embodiments, semantic clustering is performed on the surrounding entities in each first-order semantic subgraph according to predefined semantic abstraction rules. The predefined semantic abstraction rules can be based on a scenic area domain classification system. For the first-order semantic subgraph of "Beijing Forbidden City," the surrounding entities of "Hall of Supreme Harmony," "Hall of Heavenly Purity," and "Hall of Mental Cultivation" are semantically clustered. These entities all semantically belong to "palace architecture," therefore they are classified into a higher-level abstract concept node named "Core Palace Building Complex." Similarly, "Forbidden City Tickets" and "Jingshan Park Tickets" are classified as "Ticket Information" abstract concept nodes, and "Forbidden City Opening Hours" and "Forbidden City Closing Days" are classified as "Operating Hours" abstract concept nodes. A new abstract concept node is created for each entity group formed by the clustering of surrounding entities. The "Main Function" attribute of the abstract concept node is summarized from the "Grand Ceremony" attribute of "Hall of Supreme Harmony" and the "Emperor's Sleeping Place" attribute of "Hall of Heavenly Purity" within the group as "Palace Affairs and Life," and a subordinate link is established between the specific surrounding entities of "Hall of Supreme Harmony" and "Hall of Heavenly Purity" and the "Core Palace Building Complex" abstract concept node.

[0086] Optionally, an inclusion relationship is established between core scenic area entities and their corresponding abstract concept nodes, creating a hierarchical index in the vertical direction within the scenic area's semantic network. The layer containing the original entities "Beijing Forbidden City," "Hall of Supreme Harmony," "Palace of Heavenly Purity," and "Forbidden City Tickets" is marked as the basic entity layer. Newly created abstract concept nodes such as "Core Palace Complex," "Ticket Information," and "Operating Hours" are placed in an abstract concept layer higher than the basic entity layer, and the layer height value of the abstract concept layer is recorded in the hierarchical index. A "concrete-to-abstract" link is established between the "Beijing Forbidden City" core scenic area entity and the "Core Palace Complex" abstract concept node, and the link is assigned the semantic relationship of "instance belongs." Similarly, a link with the semantic relationship of "instance belongs" is established between the "Beijing Forbidden City" core scenic area entity and the "Ticket Information" abstract concept node.

[0087] It is understandable that a hierarchical relationship is established between different abstract concept nodes, and the semantic relevance between them is calculated. For example, the abstract concept nodes "core palace complex" and "sacrificial hall" have a hierarchical relationship in the classification system of the scenic area domain ontology; "sacrificial hall" is a subclass of "core palace complex." An "abstract to more abstract" link is established between the "core palace complex" and "sacrificial hall" abstract concept nodes, and this link is assigned the semantic relationship of "conceptual inclusion." By establishing links such as "Beijing Forbidden City - instance belongs to -> core palace complex" and "core palace complex - concept inclusion -> sacrificial hall," a tree-like or graph-like hierarchical relationship from concrete entities to abstract concepts is formed, thus creating a multi-layered semantic network structure containing both concrete entity layers and abstract concept layers.

[0088] In implementation, the multi-layered semantic network structures formed by all core scenic area entities are interconnected. For example, the Temple of Heaven, another core scenic area entity, also forms its own multi-layered semantic network structure, containing the concrete entities of the Hall of Prayer for Good Harvests and the Imperial Vault of Heaven, as well as the abstract concept node of the "sacrificial building complex." The semantic similarity between the abstract concept node of the "core palace building complex" in the semantic network structure of the Forbidden City and the abstract concept node of the "sacrificial building complex" in the semantic network structure of the Temple of Heaven is calculated. Semantic similarity is calculated by comparing the vector representations of the abstract concept nodes. The semantic similarity calculation can use the following formula to measure the vector representations of two abstract concept nodes. and Degree of correlation: ;

[0089] in: Representing abstract concept nodes With abstract concept nodes The semantic similarity value between them Representing abstract concept nodes Distributed vector representation, Representing abstract concept nodes Distributed vector representation, This represents the dot product operation of vectors. Representing vectors The length of the mold, Representing vectors The modulus length. If the calculated semantic similarity value exceeds the preset semantic similarity threshold, a cross-network connection is established between the abstract concept node of "core palace complex" and the abstract concept node of "sacrificial complex". The connection relationship can be defined as "functionally related".

[0090] In one embodiment of the present invention, see [reference] Figure 3When performing semantic clustering on surrounding entities in a first-order semantic subgraph according to semantic abstraction rules, a pre-defined scenic area domain ontology needs to be loaded. This ontology defines the abstract concept categories to which different entity types belong. For each surrounding entity in the target first-order semantic subgraph, it is matched with the entity type in the scenic area domain ontology using entity linking technology to obtain its initial concept category. For multiple surrounding entities belonging to the same initial concept category, the cosine similarity of their vectorized representations is calculated. If the similarity exceeds a pre-defined intra-class similarity threshold, these surrounding entities are merged into an entity group. A new abstract concept node is created for each entity group. The attributes of this node are summarized from the common attributes of all surrounding entities in the group, and all surrounding entities in the group are linked to this abstract concept node. A hierarchical index is created in the vertical direction in the scenic area semantic network, and the layer containing the original core scenic area entities and surrounding entities is marked as the base entity layer. The newly created abstract concept node is placed in an abstract concept layer higher than the base entity layer, and its layer height is recorded in the hierarchical index. Establish "concrete to abstract" pointing links between the core scenic area entity and each abstract concept node derived from it, and assign the semantic relationship of "instance belongs" to the link. Calculate the semantic relevance between different abstract concept nodes. If the entity groups represented by two nodes have a hierarchical relationship in the classification system of the scenic area domain ontology, then establish "abstract to more abstract" pointing links between them, and assign the semantic relationship of "concept contains" to the link, thereby forming a hierarchical structure.

[0091] In practice, the process begins by loading a pre-defined scenic area domain ontology. This ontology defines the abstract concept categories to which different entity types belong in a structured manner. For example, the ontology includes top-level abstract concept categories such as "buildings," "facilities," "activities," and "services." The "buildings" category is further subdivided into subcategories such as "palaces," "temples," "pavilions," and "city walls." For each surrounding entity in the target first-order semantic subgraph, such as the entities "Hall of Supreme Harmony," "Palace of Heavenly Purity," "Palace Museum Cultural and Creative Store," and "Palace Museum Guided Tour Service," entity linking technology is used to match these surrounding entities with the entity types in the scenic area domain ontology. The entities "Hall of Supreme Harmony" and "Palace of Heavenly Purity" are assigned the initial concept category "buildings-palaces," the entity "Palace Museum Cultural and Creative Store" is assigned the initial concept category "facilities-stores," and the entity "Palace Museum Guided Tour Service" is assigned the initial concept category "services-guided tours."

[0092] In some embodiments, the cosine similarity of the vectorized representations of multiple surrounding entities that have obtained the same initial concept category is calculated. For example, for entities "Hall of Supreme Harmony" and "Palace of Heavenly Purity" that belong to the same initial concept category "Architecture-Palace", their distributed vector representations are obtained. The vector representation of entity "Hall of Supreme Harmony" is as follows: The vector representation of the entity "Qianqing Palace" is: Calculate the cluster similarity between the entities "Hall of Supreme Harmony" and "Palace of Heavenly Purity". Calculate using the following formula: ;

[0093] in: This represents the cluster similarity value between the entities "Hall of Supreme Harmony" and "Palace of Heavenly Purity". The vectorized representation of the entity "Hall of Supreme Harmony". The vectorized representation of the entity "Qianqing Palace" This represents the dot product operation of vectors. Representing vectors The length of the mold, Representing vectors The modulus. If the calculated cluster similarity... If the similarity value exceeds a preset intra-class similarity threshold (e.g., a threshold of 0.85), the entities "Hall of Supreme Harmony" and "Palace of Heavenly Purity" are merged into a single entity group. A new abstract concept node is created for the entity group formed by merging "Hall of Supreme Harmony" and "Palace of Heavenly Purity," named "Core Palace Building." The "Architectural Style" attribute of the abstract concept node "Core Palace Building" is summarized as "Ming and Qing Dynasty Palace Style" from the "Hall of Supreme Harmony" and "Palace of Heavenly Purity" attributes within the entity group. The "Main Function" attribute of the abstract concept node "Core Palace Building" is summarized as "Ceremony and Governance" from the "Hall of Supreme Harmony" and "Government Palace" attributes within the entity group. A subordinate link is established between the entities "Hall of Supreme Harmony" and "Palace of Heavenly Purity" within the entity group and the newly created abstract concept node "Core Palace Building."

[0094] Optionally, establishing the inclusion relationship between core scenic area entities and corresponding abstract concept nodes requires creating a hierarchical index in the scenic area's semantic network. The layer containing the original core scenic area entity "Beijing Forbidden City" and surrounding entities "Hall of Supreme Harmony," "Palace of Heavenly Purity," "Forbidden City Cultural and Creative Store," and "Forbidden City Guided Tour Service" is marked as the basic entity layer, labeled as layer 0 in the hierarchical index. The newly created abstract concept nodes "Core Palace Buildings," "Retail Service Points," and "Guided Tour Service" are placed in an abstract concept layer higher than the basic entity layer, labeled as layer 1 in the hierarchical index, with a layer height value of 1 recorded in the index. A "concrete-to-abstract" link is established between the core scenic area entity "Beijing Forbidden City" and the abstract concept node "Core Palace Buildings" derived from its first-order semantic subgraph, and the link is assigned the semantic relationship of "instance belongs."

[0095] It is understandable that establishing hierarchical relationships between different abstract concept nodes requires calculating their semantic relevance. If the entity groups represented by two abstract concept nodes have a hierarchical relationship in the classification system of the scenic area domain ontology, then a "from abstract to more abstract" link is established between them. In the classification system of the scenic area domain ontology, the concept of "palace architecture" is a subordinate concept of "ancient architecture," meaning that the concept of "ancient architecture" includes the concept of "palace architecture." The entity group represented by the abstract concept node "core palace architecture" belongs to the concept of "palace architecture," while the entity group represented by another abstract concept node, "sacrificial architecture," belongs to the concept of "sacrificial architecture." The concept of "sacrificial architecture" is also a subordinate concept of "ancient architecture" in the scenic area domain ontology. Establishing a "from abstract to more abstract" link between the abstract concept node "core palace architecture" and the abstract concept node "sacrificial architecture" assigns the semantic relationship of "conceptual inclusion" to the link, indicating that the concept of "ancient architecture" includes the sub-concepts of "palace architecture" and "sacrificial architecture." In the semantic network of the scenic area, a higher-level abstract concept node "Ancient Building Complex" is created and placed at the second level of the hierarchical index. A pointing link with a "conceptual inclusion" semantic relationship is established between the abstract concept node "Ancient Building Complex" and the abstract concept node "Core Palace Building". Similarly, a pointing link with a "conceptual inclusion" semantic relationship is established between the abstract concept node "Ancient Building Complex" and the abstract concept node "Sacrificial Building". This forms a tree-like or graph-like hierarchical relationship from the basic entity layer to the high-level abstract concept layer.

[0096] In one embodiment of the present invention, when constructing an initial large language model including a memory network and an inference module, a general large language model is selected as the basic architecture, and a readable and writable external memory network component is added outside its internal parameter layer. This component is implemented by a vector database with a key-value pair structure. Each semantic relationship in the scenic area semantic network is converted into a triplet statement in natural language. The text encoder of the initial large language model itself encodes each triplet statement into a high-dimensional vector as knowledge content and stores it in the value of the memory network. At the same time, core topic words are extracted from the triplet statements and encoded into knowledge index vectors and stored in the key. When iteratively fine-tuning the model injected with structured knowledge using a scenic area query sample set, the sample set is divided into a training subset and a validation subset. For each sample in the training subset, it is input into the model. The model inference module generates an intermediate query vector, which is used as the retrieval key to perform an approximate retrieval in the memory network to recall relevant knowledge content vectors. The recalled knowledge content vector is fused with the intermediate query vector to form an enhanced context vector. The model generates an initial response based on this, and the initial response is compared with the multiple intent labels of the sample to calculate the difference loss. The difference loss is used to update the parameters of the model's inference module and the read / write mechanism parameters of the memory network component via backpropagation, while retaining the injected structured knowledge content. This process is repeated until the model performance stabilizes. During parameter updates, the gradients of the difference loss with respect to the output layer weights of the inference module, the query and key vectors in the attention mechanism, and the read / write controller parameters of the memory network are calculated. These parameters are then adjusted to optimize performance. Write protection constraints are applied to the memory region storing the injected knowledge content, and the integrity of the knowledge vectors in the memory network is verified after each iteration.

[0097] In practical implementation, a general large language model is selected as the basic architecture when constructing the initial large language model. For example, a pre-trained language model based on the Transformer architecture is chosen, and a readable and writable external memory network component is added outside the internal parameter layer of the basic architecture. The external memory network component is implemented by a vector database with a key-value pair structure. The key vectors in the vector database are used to store knowledge indexes, and the value vectors are used to store the corresponding knowledge content. Each semantic relationship in the scenic area semantic network is converted into a triplet statement in natural language. For example, the relation "Beijing Forbidden City - located in - Dongcheng District, Beijing" is converted into the sentence "Beijing Forbidden City is located in Dongcheng District, Beijing", and the relation "Hall of Supreme Harmony - located in - Beijing Forbidden City" is converted into the sentence "Hall of Supreme Harmony is located in Beijing Forbidden City". The text encoder of the initial large language model itself encodes each triplet statement into a high-dimensional vector. For example, the sentence "Beijing Forbidden City is located in Dongcheng District, Beijing" is encoded into a 512-dimensional vector [0.12, -0.05, ..., 0.23], which is stored as knowledge content in the value vector storage area of ​​the external memory network component. Simultaneously, core keywords are extracted from triplet statements. For example, from the sentence "The Forbidden City in Beijing is located in Dongcheng District, Beijing", the keywords "Forbidden City in Beijing" and "Dongcheng District, Beijing" are extracted. The keywords are concatenated and encoded into a knowledge index vector, for example, a vector [0.08, 0.15, ..., -0.11], which is stored in the key vector storage area of ​​the external memory network component, thus completing the injection of structured knowledge.

[0098] In some embodiments, the process of iteratively fine-tuning an initial large language model infused with structured knowledge using a set of scenic area query samples to generate a dedicated scenic area interaction model involves data partitioning and training cycles. The set of scenic area query samples is divided into a training subset and a validation subset. For example, a set containing 10,000 labeled samples is divided in an 8:2 ratio into a training subset containing 8,000 samples and a validation subset containing 2,000 samples. For each scenic area query sample with multiple intent labels in the training subset, such as a query sample "What are the main palaces in the Forbidden City and their opening hours?", whose multiple intent labels are "list of attractions" and "time query", this query sample is fed as input text into the initial large language model infused with structured knowledge.

[0099] The initial large language model's inference module processes the input text, generating an intermediate query vector through a multi-layer attention mechanism. In its implementation, the inference module first converts each word in the input text sequence into a corresponding word vector representation, forming an initial sequence representation. This sequence representation is then fed into a multi-layered Transformer architecture, each layer containing a self-attention mechanism and a feedforward neural network. In the self-attention mechanism, each word representation undergoes a linear transformation to generate a query vector, key vector, and value vector. The attention score, calculated by the dot product of the query vector and all key vectors, captures the contextual dependencies between words in the sequence. Through this multi-layered structure, the model progressively performs deep semantic analysis on the input text. The first few layers focus on parsing basic grammar and local semantic relationships, while subsequent layers strive to build a global, high-level semantic understanding of the entire query text. Finally, the sequence representation, enhanced by the multi-layered attention mechanism and output from the last Transformer layer, is aggregated or its vector at a specific position is selected as the intermediate query vector, containing the overall semantic information of the input text. Using the intermediate query vector as the retrieval key, an approximate retrieval is performed in the external memory network component. By calculating the cosine similarity between the intermediate query vector and all key vectors, the most relevant knowledge content vectors are recalled, for example, the top 5 most relevant knowledge content vectors. These 5 recalled knowledge content vectors are then fused with the intermediate query vector, forming an enhanced context vector through concatenation and linear transformation. Based on this enhanced context vector, the initial large language model generates an initial response to the scenic area query sample, for example, generating the initial response text "The main palaces in the Forbidden City include the Hall of Supreme Harmony and the Palace of Heavenly Purity." The initial response is compared with the multiple intent labels of the scenic area query sample, and the difference loss between the model-predicted intent distribution and the true intent labels is calculated using the cross-entropy loss function.

[0100] Optionally, the parameters of the inference module and the read / write mechanism parameters of the external memory network component in the initial large language model are updated using the backpropagation algorithm with the difference loss, while preserving the injected structured knowledge content. The gradient of the difference loss with respect to the output layer weights of the inference module is calculated, and the output layer weights are adjusted using the gradient descent algorithm to reduce the difference loss. The gradient of the difference loss with respect to the query vector and key vector in the attention mechanism of the inference module is calculated, and the attention weight allocation strategy is updated to optimize the focus on the input text. The gradient of the difference loss with respect to the read / write controller parameters in the external memory network component is calculated. The read / write controller parameters include threshold parameters used to control the retrieval range, and the gating signal generation logic of the read / write controller is adjusted to optimize the accuracy of knowledge retrieval. During the parameter update process, write protection constraints are applied to the memory region storing the injected structured knowledge content to ensure that the weights of the storage units corresponding to the knowledge content vectors are not modified. After each iteration update, the integrity of the key-value pair vector database in the external memory network component is verified, and the Euclidean distance before and after the knowledge content vector update is calculated to confirm that the injected triplet statement encoding vectors have not undergone numerical drift. The update process follows the following parameter update rules: ;

[0101] in: Indicates the amount of model parameter updates. Indicates the learning rate. Indicates difference loss Regarding the set of parameters to be updated gradient, parameter set Includes inference module parameters and memory network read / write mechanism parameters However, it does not include the fixed parameters corresponding to the injected knowledge content vector. Repeat the above training steps until the model's performance on the validation subset stabilizes, thus obtaining a dedicated scenic area interaction model.

[0102] It's understandable that preserving the injected knowledge content is crucial during iterative fine-tuning. The key-value vector database of the external memory network component was initialized and loaded with all the triplet knowledge from the scenic area semantic network before training. During training, when processing the query "What are the opening hours of the Forbidden City?", the intermediate query vector generated by the inference module retrieves knowledge entries related to "opening hours" from the key vector, such as "The Forbidden City is open from 08:30 to 17:00" and "The Forbidden City is closed on Mondays." These knowledge vectors serve as fixed contextual information in the response generation during the training loop, but the value vector parameters storing these vectors... During the entire backpropagation process, the gradient is masked and does not participate in weight updates. Updates to the read / write controller parameters affect the retrieval process. For example, by adjusting the parameters, the model can be made to prioritize retrieving knowledge index vectors related to "ticket price" and "ticket purchase method" when faced with queries related to "tickets," without changing the value of the stored knowledge content vector "the price of a ticket to the Forbidden City is 60 yuan." After multiple iterations, the model's classification accuracy for multiple intents—"attraction query," "route planning," and "service facilities"—on the validation subset no longer significantly improves, the loss function converges, and training stops. At this point, the obtained model is a dedicated scenic area interaction model with multi-intent parsing capabilities.

[0103] In one embodiment of the present invention, when a dedicated scenic area interaction model responds to a user's natural language query, it first receives the query text input by the user. The model's inference module performs deep semantic analysis on the text to generate a comprehensive query representation vector. This comprehensive query representation vector is simultaneously input into two parallel processing paths. The first processing path maps it to a preset intent classification space and outputs the probability distribution of the query belonging to each predefined intent category to identify the dominant user intent. The second processing path uses this vector as a retrieval key to perform vector similarity retrieval in the model's memory network to obtain the set of structured knowledge fragments most relevant to the query. The identified dominant user intent serves as a guiding signal to filter and sort the retrieved set of knowledge fragments. The filtered and sorted set of knowledge fragments is integrated with the comprehensive query representation vector and input into the text generator of the inference module to generate a coherent text answer. Based on the text answer, entity information that meets the recommendation criteria is extracted from the set of knowledge fragments according to the type of dominant user intent and appended to the text answer in the form of a structured list to form a unified output.

[0104] In its implementation, the inference module of the dedicated scenic area interaction model performs deep semantic analysis on the natural language query text "I want to visit the Forbidden City, what are the highlights? Do I need to buy a ticket?". It then generates a comprehensive query representation vector through a multi-layer neural network transformation. This comprehensive query representation vector is a high-dimensional numerical representation that encapsulates the overall semantics of the query. The dedicated scenic area interaction model simultaneously inputs this comprehensive query representation vector into two parallel processing pathways. These two pathways share the comprehensive query representation vector as input but execute different subtasks.

[0105] In some embodiments, the first processing pathway maps the comprehensive query representation vector to a preset intent classification space, which is spanned by a set of predefined scenic area intent categories, such as "attraction introduction," "ticket inquiry," "route planning," "facilities and services," and "historical anecdotes." The first processing pathway, through a fully connected layer and a softmax activation function, outputs the probability distribution of the natural language query text belonging to each predefined scenic area intent category, thus identifying the dominant user intent. For example, for the query "I want to visit the Forbidden City, what are the highlights? Do I need to buy a ticket?", refer to Table 1 for the model's output intent probability distribution. Based on the probability distribution, "attraction introduction" and "ticket inquiry" can be identified as the dominant user intents for this query.

[0106] Table 1: Output table of intent classification probabilities for example queries.

[0107]

[0108] The second processing pathway uses the comprehensive query representation vector as the retrieval key to perform vector similarity retrieval in the memory network of the dedicated scenic area interaction model, obtaining a set of structured knowledge fragments most relevant to the query. For example, the retrieval returns knowledge fragments such as "The Hall of Supreme Harmony is the core building of the Forbidden City, used for holding grand ceremonies," "The Palace of Heavenly Purity is the sleeping quarters of the Ming and Qing emperors," "The Forbidden City is open from 08:30 to 17:00," and "The Forbidden City ticket price is 60 yuan, with half-price tickets for students."

[0109] Optionally, the identified dominant user intent is used as a guiding signal to filter and sort the retrieved set of structured knowledge fragments. The filtering process filters out low-relevance knowledge based on the dominant user intent. For example, if the dominant user intent includes "attraction introduction" and "ticket inquiry," the knowledge fragment "Jingshan Park is located north of the Forbidden City" is removed because it has a weak direct relevance to the dominant user intent. For the retained knowledge fragments, they are sorted according to their relevance to the dominant user intent. Fragments about "Hall of Supreme Harmony" and "Palace of Heavenly Purity," which are highly relevant to "attraction introduction," are ranked first, followed by fragments related to "ticket inquiry," such as "price" and "opening hours." The filtered and sorted set of structured knowledge fragments is then integrated with the comprehensive query representation vector. The integration method involves concatenating the knowledge fragment text as a prefix context, which is then input into the text generator of the reasoning module to generate a coherent text answer that directly responds to the dominant user intent.

[0110] It is understandable that, based on the generated text answer, it is necessary to extract entity information that meets the recommendation criteria from the filtered and sorted set of structured knowledge fragments according to the type of the dominant user intent, and append it to the text answer in the form of a structured list. The dominant user intent "attraction introduction" belongs to the entity enumeration type intent, and the entity information that meets the recommendation criteria is the specific attraction name and its brief attributes. The entities "Hall of Supreme Harmony" and "Palace of Heavenly Purity" are extracted from the knowledge fragment set, and their key attributes are extracted to form a list. The recommendation generation follows the following entity selection criteria: ;

[0111] in: This represents the final set of entities used for recommendations. Indicates the first One candidate entity, Representing entities type Indicates the dominant user intent A defined set of entity types Representing entities Knowledge Fragment Rank in the filtered and sorted set This indicates the preset upper limit for the number of recommendations. The entity "Hall of Supreme Harmony" is of type "Palace Building," belonging to the entity type set defined by the intent of "Scenic Spot Introduction," and its knowledge fragment ranks highly, therefore it was selected. Finally, the text answer is appended with a recommendation list: "Recommended Highlights: 1. Hall of Supreme Harmony - the core palace for grand ceremonies; 2. Palace of Heavenly Purity - the sleeping quarters of the Ming and Qing emperors." The text answer and the recommendation list together constitute the unified output for responding to the query.

[0112] See Figure 4 This is a biaxial line graph showing the fine-tuning iteration effect of a dedicated scenic area interaction model. The performance continuously increases with each iteration, showing significant improvement in the early stages (1-6 iterations) and gradually stabilizing in the later stages (after 10 iterations). Conversely, the performance continuously decreases with each iteration, with a rapid decline in the early stages and gradual convergence in the later stages. The model's performance continuously optimizes during fine-tuning, reaching a stable state around 10 iterations, indicating that the training process is effective and has good convergence. This type of chart is used to evaluate the effectiveness and efficiency of model training, helping to determine a reasonable number of iterations, and is a key reference for optimizing intelligent question-answering models for scenic areas. The trend indicates that the model enters a stable period around 10 iterations, with limited performance improvement in subsequent iterations. This can guide the reasonable control of iterations in actual training, avoiding resource waste caused by overtraining.

[0113] In one embodiment of the present invention, when the second processing path uses a comprehensive query representation vector for retrieval, the vector is sent to the model's external memory network component. The memory network component calculates the cosine similarity between the vector and all internal knowledge index vectors, and sorts all knowledge index vectors in descending order based on the calculation results. Several knowledge index vectors with rankings exceeding a set threshold or the highest ranking are selected as relevant indexes, and knowledge content vectors paired with these relevant indexes are read. The knowledge content vectors are decoded and restored to the original natural language description of triple statements, forming an initial set of knowledge fragments. This initial set is then deduplicated and redundantly eliminated to obtain the final set of relevant knowledge fragments. When filtering and sorting the knowledge fragment set using the dominant user intent, relevant knowledge filtering rules and weight allocation rules are loaded from a preset configuration rule base according to the dominant intent. The knowledge fragment set is traversed according to the filtering rules, and triple statements that are irrelevant to the dominant intent or have a relevance below the threshold are removed. For the triplet statements retained after screening, their relevance weights are calculated according to the weighting rules. The weight calculation takes into account factors such as the semantic distance between the entity and the intent keyword in the statement, the degree of matching of the relation type, and the confidence of the knowledge source. Finally, the retained statements are sorted in descending order according to the calculated weights.

[0114] In a specific implementation, when the second processing path uses the comprehensive query representation vector as a retrieval key to perform vector similarity retrieval in the memory network of the dedicated scenic area interaction model, the comprehensive query representation vector is sent to the external memory network component of the dedicated scenic area interaction model. The external memory network component receives this query vector from the inference module. The query vector is a floating-point vector with a dimension of 768, for example. The external memory network component calculates the cosine similarity between the comprehensive query representation vector and all knowledge index vectors in the memory network. Tens of thousands of knowledge index vectors are stored in the memory network, and each knowledge index vector corresponds to a topic word encoding extracted from the scenic area semantic network triples. Calculating the cosine similarity involves performing a dot product operation on each pair of vectors and dividing by the product of their respective vector lengths. All knowledge index vectors are sorted in descending order according to the calculated cosine similarity, generating an ordered list from the most relevant to the least relevant. Select knowledge index vectors whose ranking exceeds a set threshold or a certain number of the top-ranked vectors, for example, setting the similarity threshold to be greater than 0.7, or fixedly selecting the top 10 index vectors, and determine them as relevant indexes. Read the knowledge content vectors paired with the relevant indexes. The knowledge content vectors are the encoded representations of the original triple declarative sentences. Decode the knowledge content vectors back to the original triple declarative sentences described in natural language. The decoding process is implemented through a decoding layer配套 with the encoder to form an initial set of knowledge fragments. Perform deduplication and redundancy elimination processing on the initial set of knowledge fragments, for example, merging declarative sentences with the same semantics such as "The opening hours of the Forbidden City are 08:30 - 17:00" and "The Forbidden City opens at 08:30 and closes at 17:00" to obtain a set of structured knowledge fragments most relevant to the query.

[0115] In some embodiments, the process of screening and sorting the retrieved set of structured knowledge fragments using the identified dominant user intention as a guiding signal requires accessing an external rule library. According to the dominant user intentions of "scenic spot introduction" and "ticket query", load the knowledge screening rules and weight assignment rules related to the dominant user intentions from a preset configuration rule library. In the configuration rule library, for the intention of "scenic spot introduction", the knowledge screening rule is defined as "retain declarative sentences where the triple predicate is 'is', 'is located', 'introduces' and the subject type is 'building' or'scenic spot'"; for the intention of "ticket query", the knowledge screening rule is defined as "retain declarative sentences where the triple predicate is 'the price is', 'opening hours', 'ticket purchase method'". Traverse the set of structured knowledge fragments according to the knowledge screening rules and eliminate triple declarative sentences that are irrelevant to the dominant user intention or have a relevance lower than the relevance threshold.

[0116] It should be noted that there is an unclear expression "配套 with the encoder" in the translation of . It needs to be further clarified according to the actual situation to ensure the accuracy of the translation.Optionally, for the retained triple statements after filtering, a relevance weight is calculated for each according to the weighting rules. The weighting rules consider the semantic distance between the entity and the dominant user intent keyword, the degree of matching of the relation type, and the confidence of the knowledge source. The semantic distance between the entity and the intent keyword is measured by the Euclidean distance between word vectors; the degree of matching of the relation type is determined according to the intent-relationship mapping table defined in the rule base; and the confidence of the knowledge source is attached to the knowledge fragment as metadata during the knowledge injection stage. The operation of calculating a comprehensive relevance score for each retained knowledge fragment can be expressed by the following quantitative formula: ;

[0117] in: Indicates the first The relevance weights of the retained triplet statements after filtering. Indicates the first Normalized semantic distance between the core entity and the dominant user intent keyword in a triplet statement. Indicates the first The score for the match between the relation type of each triplet statement and the dominant user intent. Indicates the first The confidence coefficient of the knowledge source of each triplet statement. , , These are the preset weighting coefficients for the corresponding items. Based on the calculated relevance weights... The retained triplet statements are sorted in descending order to generate a sorted set of structured knowledge fragments.

[0118] It's understandable that the sorted, structured knowledge fragment set will be directly used for subsequent answer generation and content extraction. For example, for the query "opening hours and main buildings of the Forbidden City," after filtering and weight calculation, the statement "The Hall of Supreme Harmony is the core building of the Forbidden City" receives a higher weight because the entity "Hall of Supreme Harmony" has a close semantic distance to the intent keyword "main buildings" and a high degree of matching with the relation "is." The statement "The Palace Museum is open from 8:30 to 17:00" receives high weight because the relation "opening hours" perfectly matches the intended meaning. The statement that "the Palace Museum offers audio guides" received a lower weight because it was less relevant to the current dominant intent. And they are ranked later. The final sorted list ensures that the most relevant knowledge is prioritized for generating answers, improving the accuracy and relevance of the output.

[0119] See Figure 5This is a dual-axis bar chart showing the number of scenic area query types and their processing accuracy. "Opening Hours" had the highest query volume, while "Accommodation Recommendations" had the lowest. There's an inverse trend between query volume and accuracy: the higher the query volume, the higher the processing accuracy; conversely, the lower the query volume, the lower the accuracy. This allows for optimization of response efficiency for high-query-volume types and supplementation of knowledge data for low-accuracy types. It reveals the correlation between "query volume and accuracy," helping to improve the processing capacity for low-frequency queries and balance the service quality of different query types. By analyzing the query volume distribution, we can clarify users' core needs for scenic area information and help operators prioritize service resources for high-demand types.

[0120] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0121] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A scenic area intelligent question answering and recommendation method integrating knowledge graphs and large-scale models, characterized in that, include: Receive and parse multimodal raw data about the scenic area, and generate a set of entity relation pairs containing semantic relationships; The entity relationship set is restructured to form a scenic area semantic network with multiple levels of abstraction; An initial large language model containing a memory network and a reasoning module is constructed, and all semantic relationships of the scenic area semantic network are injected into the memory network of the initial large language model as structured knowledge. Collect and label scenic spot query requests from real user interaction scenarios to form a sample set of scenic spot queries with multiple intent tags; The initial large language model, infused with structured knowledge, is iteratively fine-tuned using the aforementioned scenic area query sample set to generate a dedicated scenic area interaction model with multi-intent parsing capabilities, including: The sample set of scenic spot queries is divided into a training subset and a validation subset; For each scenic spot query sample with multiple intent labels in the training subset, it is fed as input text into the initial large language model injected with structured knowledge. The inference module of the initial large language model processes the input text and generates an intermediate query vector; We select a general large language model as the basic architecture and add a readable and writable external memory network component in addition to its internal parameter layer. Using the intermediate query vector as the retrieval key, an approximate retrieval is performed in the external memory network component to recall the most relevant knowledge content vectors. The recalled knowledge content vector is fused with the intermediate query vector to form an enhanced context vector; Based on the enhanced context vector, the initial large language model generates an initial response to the scenic area query sample; The initial response is compared with the multiple intent tags of the scenic area query samples, and the difference loss between the model prediction and the actual tags is calculated. The parameters of the inference module in the initial large language model and the read / write mechanism parameters of the external memory network component are updated using the backpropagation algorithm based on the difference loss, while preserving the injected structured knowledge content unchanged; The process is repeated until the model's performance on the validation subset stabilizes, thus obtaining the dedicated scenic area interaction model. In response to the user's natural language query, the dedicated scenic area interaction model simultaneously invokes the structured knowledge and reasoning module generation capabilities of its internal memory network, performs intent classification and knowledge retrieval in parallel, and finally merges to generate a unified output containing answers and recommended content.

2. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 1, characterized in that, The restructuring of the entity relationship set to form a scenic area semantic network with multiple levels of abstraction includes: Traverse the set of entity relationship pairs and identify the core scenic area entities within it; For each core scenic area entity, extract all directly related surrounding entities and relationships to form a first-order semantic subgraph centered on the core scenic area entity; Based on predefined semantic abstraction rules, semantic clustering is performed on the surrounding entities in each first-order semantic subgraph, and semantically similar surrounding entities are classified into higher-level abstract concept nodes. Establish the inclusion relationship between the core scenic area entities and the corresponding abstract concept nodes, and at the same time establish the hierarchical relationship between different abstract concept nodes, thereby forming a multi-layer semantic network structure that includes a concrete entity layer and an abstract concept layer. The multi-layered semantic network structure formed by all core scenic area entities is interconnected. Nodes in different semantic network structures establish cross-network connections when the semantic similarity threshold is met, ultimately forming a unified scenic area semantic network with multiple levels of abstraction.

3. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 2, characterized in that, The step of performing semantic clustering on the surrounding entities in each first-order semantic subgraph according to predefined semantic abstraction rules, and classifying semantically similar surrounding entities into higher-level abstract concept nodes, includes: Load the preset scenic area domain ontology, which defines the abstract concept categories to which different entity types belong; For each surrounding entity in the target first-order semantic subgraph, the entity is matched with the entity type in the scenic area domain ontology using entity linking technology to obtain its initial concept category. For multiple surrounding entities belonging to the same initial concept category, calculate the cosine similarity of their vectorized representations; If the cosine similarity exceeds a preset intra-class similarity threshold, then these surrounding entities are merged into an entity group. A new abstract concept node is created for each entity group. The attributes of the abstract concept node are summarized from the common attributes of all surrounding entities in the group, and a subordinate link is established between all surrounding entities in the group and the abstract concept node.

4. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 3, characterized in that, The process of establishing the inclusion relationship between the core scenic area entities and their corresponding abstract concept nodes, and simultaneously establishing the hierarchical relationship between different abstract concept nodes, thereby forming a multi-layered semantic network structure containing both concrete entity layers and abstract concept layers, includes: In the semantic network of the scenic area, a hierarchical index is created in the vertical direction, and the layers where the original core scenic area entities and surrounding entities are located are marked as the base entity layers; The newly created abstract concept node is placed in an abstract concept layer that is higher than the basic entity layer, and its layer height is recorded in the hierarchy index; Establish "concrete to abstract" pointing links between the core scenic area entity and each abstract concept node derived from its first-order semantic subgraph, and assign the links the semantic relationship of "instance belongs"; Calculate the semantic relevance between different abstract concept nodes. If the entity groups represented by two abstract concept nodes have a hierarchical relationship in the classification system of the scenic area domain ontology, then establish a "from abstract to more abstract" pointing link between them and assign the link a "conceptual inclusion" semantic relationship, thereby forming a tree-like or graph-like hierarchical relationship.

5. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 4, characterized in that, The construction of an initial large language model including a memory network and a reasoning module, and the injection of all semantic relationships of the scenic area semantic network as structured knowledge into the memory network of the initial large language model, includes: The external memory network component is implemented by a vector database with a key-value pair structure, where the key is used to store knowledge indexes and the value is used to store the corresponding knowledge content. Each semantic relationship in the scenic area semantic network is converted into a triplet statement in natural language. Using the text encoder of the initial large language model itself, each triplet statement is encoded into a high-dimensional vector, which is stored as knowledge content in the value of the external memory network component; Simultaneously, core topic words are extracted from the triplet statements and encoded into knowledge index vectors, which are stored in the keys of the external memory network component to complete the injection of structured knowledge.

6. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 5, is characterized in that, The process of using the difference loss to update the parameters of the inference module in the initial large language model and the read / write mechanism parameters of the external memory network component through backpropagation algorithm, while preserving the injected structured knowledge content unchanged, includes: Calculate the gradient of the difference loss with respect to the weights of the output layer of the inference module, and use the gradient descent algorithm to adjust the weights of the output layer to reduce the difference loss; Calculate the gradient of the difference loss with respect to the query vector and key vector in the attention mechanism of the inference module, and update the attention weight allocation strategy to optimize the focus of attention on the input text; Calculate the gradient of the difference loss with respect to the parameters of the read / write controller in the external memory network component, and adjust the gating signal generation logic of the read / write controller to optimize the accuracy of knowledge retrieval; During the parameter update process, write protection constraints are applied to the memory area storing the injected structured knowledge content to ensure that the weight of the storage unit corresponding to the knowledge content vector is not modified. After each iteration update, the integrity of the key-value pair vector database in the external memory network component is verified to confirm that the injected triplet statement encoding vectors have not experienced numerical drift.

7. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 6, characterized in that, In response to the user's natural language query, the dedicated scenic area interaction model simultaneously invokes the structured knowledge and reasoning module's generation capabilities within its internal memory network, performing intent classification and knowledge retrieval in parallel. Finally, it fuses these elements to generate a unified output containing both answers and recommendations, including: The dedicated scenic area interaction model receives natural language query text input by the user; The reasoning module of the dedicated scenic area interaction model performs deep semantic analysis on the natural language query text to generate a comprehensive query representation vector. The dedicated scenic area interaction model simultaneously inputs the comprehensive query representation vector into two parallel processing paths. The first processing path maps the comprehensive query representation vector to a preset intent classification space, outputs the probability distribution of the natural language query text belonging to each predefined scenic spot intent category, and identifies the dominant user intent. The second processing path uses the comprehensive query representation vector as the retrieval key to perform vector similarity retrieval in the memory network of the dedicated scenic area interaction model to obtain the set of structured knowledge fragments most relevant to the query. The identified dominant user intent is used as a guiding signal to filter and sort the retrieved set of structured knowledge fragments; The structured knowledge fragment set after filtering and sorting is integrated with the comprehensive query representation vector and input into the text generator of the reasoning module to generate a coherent text answer that directly responds to the dominant user intent. Based on the generated text answer, entity information that meets the recommendation criteria is extracted from the filtered and sorted set of structured knowledge fragments according to the type of dominant user intent, and appended to the text answer in the form of a structured list to form the unified output.

8. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 7, characterized in that, The second processing path uses the comprehensive query representation vector as the retrieval key to perform vector similarity retrieval in the memory network of the dedicated scenic area interaction model, obtaining a set of structured knowledge fragments most relevant to the query, including: The comprehensive query representation vector is sent to the external memory network component of the dedicated scenic area interaction model; The external memory network component calculates the cosine similarity between the comprehensive query representation vector and all knowledge index vectors in the memory network; Sort all knowledge index vectors in descending order based on the calculated cosine similarity; Select a number of knowledge index vectors whose ranking exceeds a set threshold or whose ranking is at the top, and determine them as relevant indexes; Read the knowledge content vector stored in pairs with the relevant index; The knowledge content vector is decoded and restored to the original natural language description of triple statements, forming an initial set of knowledge fragments; The initial set of knowledge fragments is deduplicated and redundant to obtain the set of structured knowledge fragments most relevant to the query.

9. The intelligent question-answering and recommendation method for scenic spots that integrates knowledge graphs and large models according to claim 8, characterized in that, The step of using the identified dominant user intent as a guiding signal to filter and sort the retrieved set of structured knowledge fragments includes: Based on the dominant user intent, knowledge filtering rules and weight allocation rules related to the dominant user intent are loaded from a preset configuration rule base; Based on the knowledge filtering rules, the structured knowledge fragment set is traversed, and triplet statements that are irrelevant to the dominant user intent or have a relevance below the relevance threshold are removed. For the triple statements retained after filtering, a relevance weight is calculated for them according to the weight allocation rule, which considers the semantic distance between the entity in the triple statement and the dominant user intent keyword, the degree of matching of the relationship type, and the confidence of the knowledge source. The retained triplet statements are sorted in descending order according to the calculated relevance weights to generate a sorted set of structured knowledge fragments.

Citation Information

Patent Citations

  • Ai large model reasoning method based on knowledge graph enhancement

    CN120450043A

  • Intelligent agent long-term memory modeling method based on memory network

    CN120688545A

  • Agricultural legal question and answer intelligent interaction system based on large model

    CN121658616A