Scenic area accompanying service method and system based on generative AI and knowledge base linkage

The integration of generative AI with a knowledge base and dynamic weighting based on tourist behavior and spatial clustering addresses the issue of knowledge forgetting in intelligent tourism systems, ensuring accurate and reliable responses.

CN120316231AActive Publication Date: 2025-07-15SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING

Patent Information

Application Number
CN202510775137.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-07-15
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

In the existing smart guide system for scenic spots, the generative artificial intelligence model can easily lead to systematic forgetting of the core knowledge that has been mastered in the scenic spots, affecting the accuracy and reliability of the answers.

Method used

Through a method based on the linkage of generative AI and knowledge base, tourists' question information can be obtained in real time, tourists' distribution thermal data and behavioral trajectory generate dynamically weighted related data, combined with spatiotemporal weight factors and coverage evaluation, model parameters are dynamically adjusted to ensure the stability and accuracy of core knowledge.

Benefits of technology

Effectively maintain the long-term memory ability of the generative AI model to the core knowledge of the scenic spot, ensure the consistency and accuracy of the answer content, and improve service quality and user experience through a self-optimization mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316231A_ABST
    Figure CN120316231A_ABST
Patent Text Reader

Abstract

The invention discloses a scenic spot accompanying service method and a scenic spot accompanying service system based on linkage of a generative AI and a knowledge base, particularly relates to the technical field of artificial intelligence and smart tourism, and is used for solving the problems that core knowledge is forgotten and the answer accuracy is reduced due to dynamic knowledge updating of a generative AI model in an existing scenic spot guide system. The method comprises the following steps: extracting tourist question keywords in real time and retrieving a knowledge base to generate associated data; dynamically weighting the associated data priority based on the tourist aggregation density; generating an initial answer through real-time parameter adjustment; fusing the spatial-temporal clustering and the knowledge graph structure entropy to generate a weight factor; correcting the answer coverage defect and evaluating the result; outputting a final answer after directional addition of core knowledge iterative training; it is guaranteed that core knowledge of the scenic area is stably reserved in the dynamic learning process of the generative AI, meanwhile, the real-time scene requirement is accurately responded, and the reliability, accuracy and individuation level of the navigation service are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of artificial intelligence and intelligent tourism. More specifically, the present invention relates to a scenic area companion service method and system based on the linkage between generative AI and a knowledge base. Background Art

[0002] Currently, the intelligent guided tour systems in scenic areas generally use generative artificial intelligence technology to provide question-and-answer services for tourists and implement information query functions by docking with the scenic area knowledge base. The prior art usually adopts a static knowledge injection method, that is, importing the basic data of the scenic area into the AI model for pre-training before system deployment to form a fixed knowledge response system. During the service operation process, some systems attempt to supplement real-time information by dynamically updating the content of the knowledge base, such as adding scenic spot introductions or temporary activity notifications, so as to improve the timeliness and integrity of information services.

[0003] However, this dynamic update mechanism has defects in practical applications: when the generative artificial intelligence model performs real-time learning on new knowledge, due to the global adjustment characteristics of neural network parameters, it will cause systematic forgetting of the core knowledge of the scenic area that has been mastered, resulting in a decrease in the accuracy of the AI model when answering basic and common sense questions of tourists, such as confusing the historical eras of the scenic area and misdescribing the architectural features, seriously affecting the reliability of the guided tour service and the user experience. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, embodiments of the present invention provide a scenic area companion service method and system based on the linkage between generative AI and a knowledge base to solve the problems raised in the above background art.

[0005] To achieve the above object, the present invention provides the following technical solutions: A scenic area companion service method based on the linkage between generative AI and a knowledge base, comprising the following steps: S1. Real-time obtain the question information input by tourists through a mobile terminal, extract the keyword set in the question information, and retrieve the matching associated data from the scenic area knowledge base; S2. Calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution heat data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted associated data set; S3. Input the associated data set and the question information into a pre-trained generative AI model, complete real-time adaptation training through parameter dynamic adjustment, and generate initial answer information; S4. Generate a spatio-temporal weight factor according to the spatio-temporal clustering result of the tourist behavior trajectory and the spectral clustering structure entropy of the dynamic knowledge graph; S5. Use the spatio-temporal weight factor to correct the core knowledge coverage of the initial answer information and generate the spatio-temporal constraint coverage evaluation result; S6. When the coverage evaluation result does not meet the threshold, call the core knowledge data of the corresponding keyword set in the scenic area knowledge base, append it to the associated data, retrain the generative AI model, and output the final answer information to the mobile terminal.

[0006] In a preferred embodiment, the question information input by the tourist through the mobile terminal is obtained in real time, the keyword set in the question information is extracted, and the matching associated data is retrieved from the scenic area knowledge base, including: Collect the tourist's question information in real time through the input interface of the mobile terminal; Perform word segmentation on the question information and filter out the stop words to generate the initial keyword set; Screen the entity nouns matching the scenic area knowledge base from the initial keyword set to form the final keyword set; Match the coordinate data, historical event data, and cultural explanation data of the corresponding scenic spots in the scenic area knowledge base according to the final keyword set; Merge the matching coordinate data, historical event data, and cultural explanation data into associated data.

[0007] In a preferred embodiment, the scenic area knowledge base contains structured data classified and stored according to geographical distribution, historical background, and cultural attributes.

[0008] In a preferred embodiment, calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution heat data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted associated data set, including: Obtain the real-time tourist position coordinate set of the corresponding scenic spots based on the tourist distribution heat data; Divide the geographical area of each scenic spot into grid cells of a preset size, and count the number of real-time tourist position coordinates in each grid cell as the tourist aggregation density; Set the priority weight coefficient of the real-time updated knowledge according to the matching degree between the tourist aggregation density and the content label of the real-time updated knowledge in the scenic area knowledge base; Perform dynamic weighted calculation on the real-time updated knowledge based on the priority weight coefficient to generate a dynamically weighted associated data set containing weighted values.

[0009] In a preferred embodiment, input the associated data set and the question information into a pre-trained generative AI model, and complete real-time adaptation training through parameter dynamic adjustment to generate the initial answer information, including: Perform vectorized splicing on the weighted values in the dynamically weighted associated data set and the question information to generate a fused input vector; Dynamically adjust the attention weight allocation ratio of the generative AI model according to the distribution characteristics of the weighted values in the fusion input vector; Perform gradient descent optimization on the decoder layer of the generative AI model based on the adjusted attention weight allocation ratio to update the model parameters; Perform inference calculation on the question information through the updated generative AI model to generate initial answer information containing the core knowledge features of the scenic area.

[0010] In a preferred embodiment, generate a spatio-temporal weight factor according to the spatio-temporal clustering result of the tourist behavior trajectory and the spectral clustering structure entropy of the dynamic knowledge graph, including: Perform spatio-temporal segmentation on the continuous positioning data of the tourist mobile terminal, and identify the trajectory segments with density higher than the preset threshold as spatio-temporal hot spot regions; Construct a logical dependency graph among events, people, and buildings in the scenic area knowledge base, and calculate the betweenness centrality index of each node; Calculate the spatio-temporal association strength according to the overlapping area between the geographical boundary of the spatio-temporal hot spot region and the associated region of the high-betweenness centrality nodes in the logical dependency graph; Fuse the topological structure chaos index of the logical dependency graph and the spatio-temporal association strength after normalization and weighting to generate a spatio-temporal weight factor; Perform standardization processing on the spatio-temporal weight factor, and output a set of normalized spatio-temporal weight factors.

[0011] In a preferred embodiment, use the spatio-temporal weight factor to correct the core knowledge coverage of the initial answer information to generate a spatio-temporal constrained coverage evaluation result, including: Extract semantic features matching the core knowledge labels in the scenic area knowledge base from the initial answer information to generate a set of core knowledge features; Rank the set of core knowledge features based on the set of normalized spatio-temporal weight factors to generate a core knowledge feature priority sequence; Compare the core knowledge feature priority sequence with the semantic coverage range of the initial answer information to identify the missing feature segments; Perform dynamic correlation matching on the missing feature segments and the spatio-temporal weight factor to generate a spatio-temporal constrained coverage evaluation result.

[0012] In a preferred embodiment, when the coverage evaluation result does not meet the threshold, call the core knowledge data of the corresponding keyword set in the scenic area knowledge base, append it to the associated data, retrain the generative AI model, and then output the final answer information to the mobile terminal, including: Generate a knowledge append trigger instruction when the priority and weight value of the defect marker in the coverage evaluation result meet the preset conditions; Retrieve the core knowledge data corresponding to the missing coverage feature segment from the scenic area knowledge base according to the knowledge addition trigger instruction, and generate a knowledge addition set; Dynamically append the knowledge addition set to the dynamically weighted associated data set to form an enhanced associated data set; Based on the enhanced associated data set, perform incremental training on the decoder layer of the generative AI model to update the model parameters; Through the updated generative AI model, perform semantic fusion calculation on the initial answer information, generate the final answer information and output it to the mobile terminal.

[0013] On the other hand, the present invention provides a scenic area companion service system based on the linkage of generative AI and knowledge base, including the following modules: A question retrieval module, which is used to obtain the question information input by tourists through the mobile terminal in real time, extract the keyword set in the question information, and retrieve the matching associated data from the scenic area knowledge base; A heat weighted module, which is used to calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution heat data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted associated data set; A model adaptation module, which is used to input the associated data set and the question information into a pre-trained generative AI model, and complete real-time adaptation training through dynamic parameter adjustment to generate initial answer information; A spatio-temporal weight module, which is used to generate a spatio-temporal weight factor according to the spatio-temporal clustering result of the tourist behavior trajectory and the spectral clustering structure entropy of the dynamic knowledge graph; A coverage correction module, which is used to correct the core knowledge coverage of the initial answer information by using the spatio-temporal weight factor to generate a spatio-temporal constraint coverage evaluation result; A result output module, which is used to call the core knowledge data of the corresponding keyword set in the scenic area knowledge base when the coverage evaluation result does not meet the threshold, append it to the associated data, retrain the generative AI model, and then output the final answer information to the mobile terminal.

[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. Through the dynamic weighted association data and spatio-temporal coupling weight mechanism, effectively maintain the long-term memory ability of the generative AI model for the core knowledge of the scenic area; during the process of real-time knowledge update, adopt the dynamic allocation strategy of priority weights, associate the tourist aggregation density with the knowledge criticality, and ensure that the core knowledge in the high-density area is stably strengthened during model training; at the same time, quantify the knowledge coverage defect through the spatio-temporal weight factor, trigger the addition of core knowledge and local parameter adjustment in a targeted manner, and block the interference coverage of the global training on the existing knowledge; so that when the model absorbs real-time information, it can quickly adapt to the dynamic scenario and avoid large-scale forgetting of historical data, significantly improve the consistency of the answer content in dimensions such as basic historical facts and geographical information, and ensure the accuracy and credibility of the information obtained by tourists.

[0015] 2. Through the knowledge coverage evaluation and closed-loop iteration mechanism, realize the self-optimization and personalized adaptation of service quality; based on the spatio-temporal weight factor generated by the tourist behavior trajectory and knowledge topology characteristics, it can accurately identify the coverage shortage problem caused by the dynamicity of the scenario in the answer, and combine the directional retrieval and incremental training of the knowledge base to form a continuous improvement cycle of "evaluation-compensation-verification"; not only strengthens the understanding ability of the generative AI for complex knowledge associations, but also reduces resource consumption through lightweight training strategies, enabling the system to still stably output guided tour content that meets the spatio-temporal needs and interest preferences of tourists in high-concurrency scenarios, taking into account service efficiency and user experience. Brief Description of the Drawings

[0016] Figure 1 It is a flowchart of the scenic area companion service method based on the linkage of generative AI and knowledge base of the present invention; Figure 2 It is a schematic structural diagram of the scenic area companion service system based on the linkage of generative AI and knowledge base of the present invention. Detailed Embodiments

[0017] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0018] Embodiment 1: Figure 1 The scenic area companion service method based on the linkage of generative AI and knowledge base of the present invention is given, including the following steps: S1. Real-time obtain the question information input by tourists through mobile terminals, extract the keyword set in the question information and retrieve the matching associated data from the scenic area knowledge base; S2. Calculate the density of tourist gatherings at the scenic spots corresponding to the associated data based on the tourist distribution thermal data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted associated data set; S3, input the associated data set and question information into the pre-trained generative AI model, complete real-time adaptation training through dynamic parameter adjustment and generate initial answer information; S4, generating spatiotemporal weight factors based on the spatiotemporal clustering results of tourist behavior trajectories and the spectral clustering structure entropy of the dynamic knowledge graph; S5. Use the spatiotemporal weight factor to modify the core knowledge coverage of the initial answer information and generate a spatiotemporal constrained coverage evaluation result; S6. When the coverage evaluation result does not meet the threshold, the core knowledge data of the corresponding keyword set in the scenic spot knowledge base is called, appended to the associated data, and the generative AI model is retrained to output the final answer information to the mobile terminal.

[0019] S1. Real-time acquisition of question information input by tourists through mobile terminals, extraction of keyword sets in the question information and retrieval of matching related data from the scenic spot knowledge base, specifically implemented as follows: The input interface of the mobile terminal collects tourists' questions in real time. The input interface of the mobile terminal includes voice input function and text input function. The voice input function collects tourists' voice questions through the built-in microphone of the terminal and converts the voice into text information using voice recognition technology; the text input function receives the text question information input by tourists through the touch screen or keyboard of the terminal. Voice recognition technology converts voice signals into text and outputs the question information in text format.

[0020] The question information is segmented and stop words are filtered to generate an initial set of keywords. The word segmentation process uses the dictionary-based maximum forward matching method to divide the text question information into words according to the scenic spot-specific dictionary. The scenic spot-specific dictionary contains a vocabulary set of scenic spot names, historical figures names and cultural terms. For example, a tourist asks "What is the history of this scenic spot?" After word segmentation, words such as "this scenic spot", "history", "there are" and "which" are obtained. Stop words are filtered to remove function words and auxiliary words that have no actual meaning through a predefined stop word list. The stop word list includes common words such as "的", "了", "吗", "有" and "哪个". After filtering, an initial set of keywords is generated, such as "this scenic spot" and "history".

[0021] Filter the entity nouns in the initial keyword set that match the scenic area knowledge base to form the final keyword set. The filtering process is achieved by matching each word in the initial keyword set with the entity nouns stored in the scenic area knowledge base classified by geographical distribution, historical background, and cultural attributes. If a word exists in the entity noun set of any classification, the word is retained. For example, "this scenic area" matches the set of scenic spot names in the geographical distribution classification, and "history" matches the set of event types in the historical background classification, both of which are retained as the final keyword set. Unmatched words such as "which" are excluded. The entity noun set in the geographical distribution classification includes scenic spot names and coordinate data, the historical background classification includes historical events and chronological data, and the cultural attribute classification includes dialect words and cultural explanation tags.

[0022] Match the coordinate data, historical event data, and cultural explanation data of the corresponding scenic spots in the scenic area knowledge base according to the final keyword set. The matching process retrieves data from different classifications respectively: according to the geographical distribution words in the final keyword set, such as "this scenic area", retrieve the longitude and latitude coordinate data of the scenic spot stored in the scenic area knowledge base; according to the historical background words, such as "history", retrieve the historical event description data that meets the time range in the scenic area knowledge base, and the time range is automatically set according to the implicit time information in the tourist's question. For example, when the time is not specified, all historical events are retrieved by default; according to the cultural attribute words, calculate the semantic similarity between them and the cultural explanation tags, and filter the associated cultural explanation data with a similarity higher than the set value. The semantic similarity is achieved by measuring the distance in the semantic vector space.

[0023] Merge the matched coordinate data, historical event data, and cultural explanation data into associated data. The merging operation includes data format unification and redundancy processing: convert the coordinate data into geographical coordinate format, arrange the historical event data in chronological order and remove duplicate descriptions, and sort the cultural explanation data by similarity score and retain the entry with the highest score. The associated data is used as the input for the subsequent steps for the training of the generative model and answer generation.

[0024] S2. Calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution heat data to adjust the priority weights of the real-time updated knowledge in the associated data, and generate a dynamically weighted set of associated data. The specific implementation is as follows: Obtain the real-time tourist location coordinate set corresponding to the scenic spots based on the tourist distribution heat data. The tourist distribution heat data is collected in real time through the application programming interface integrating the electronic map service, specifically including the geographical location coordinates, timestamp information, and device unique identifier of the tourist mobile terminal. The geographical location coordinates are obtained through the satellite positioning system or the cellular network base station positioning technology. The satellite positioning system uses the Global Positioning System or the Beidou Navigation System, and the base station positioning technology performs triangulation positioning calculation by measuring the signal strength difference between the terminal and at least three base stations. The coordinate data is stored in the internationally common decimal longitude and latitude format, such as "116.28°E, 39.99°N". The real-time tourist location coordinate set is divided into regions according to the predefined scenic spot geographical boundaries in the scenic area knowledge base. The scenic spot geographical boundaries are formed by enclosing the polygon vertex coordinate data stored in the scenic area knowledge base. The polygon vertex coordinate data is collected on-site by surveying equipment and stored in the geographical information database. For example, the geographical boundary of a rectangular scenic spot is formed by sequentially connecting four vertex coordinates (116.28°E, 39.99°N), (116.30°E, 39.99°N), (116.30°E, 40.01°N), and (116.28°E, 40.01°N). The real-time tourist location coordinate set only retains the coordinate points that fall within the range of this polygon.

[0025] Divide the geographical area of each scenic spot into grid cells of a preset size, and count the number of real-time tourist location coordinates in each grid cell as the tourist aggregation density. The preset size of the grid cell is dynamically adjusted according to the scenic spot area. The adjustment rule is as follows: when the scenic spot area is greater than or equal to 1 square kilometer, the side length of the grid cell is 100 meters; when the scenic spot area is less than 1 square kilometer and greater than or equal to 0.1 square kilometer, the side length of the grid cell is 50 meters; when the scenic spot area is less than 0.1 square kilometer, the side length of the grid cell is 20 meters. The grid division is realized by using the plane rectangular coordinate system projection conversion technology. The specific steps include: converting the longitude and latitude coordinates of the scenic spot geographical boundary into coordinate points in the plane rectangular coordinate system through the Gauss-Krüger projection algorithm, and setting the origin of the plane coordinate system as the minimum longitude and latitude values of the scenic spot polygon vertices; generating equidistant grid cells in the plane coordinate system according to the preset grid side length, and each grid cell is defined by its lower left and upper right plane coordinates. When counting the tourist aggregation density, convert the real-time tourist location coordinates into plane coordinates through the same projection algorithm and determine the grid cell to which it belongs. For example, for a grid cell in the plane coordinate system of a scenic spot, the lower left coordinate is (100, 200) and the upper right coordinate is (150, 250), then the plane coordinate point (120, 220) belongs to this grid cell, and the number of all coordinate points in this grid cell is the tourist aggregation density.

[0026] Set the priority weight coefficient of the real-time updated knowledge according to the matching degree between the tourist aggregation density and the content tags of the real-time updated knowledge in the scenic area knowledge base. The content tags of the real-time updated knowledge are divided into three types: emergency notice type, activity change type, and facility status type. The specific definitions are as follows: The emergency notice type tags are associated with safety evacuation, temporary closure of the museum, and disaster warning knowledge; the activity change type tags are associated with performance time adjustment, ticket policy change, and activity cancellation knowledge; the facility status type tags are associated with equipment maintenance, route closure, and service suspension knowledge. The matching degree determination rule is: If the scenic area area associated with the content tags of the real-time updated knowledge is the same as the scenic area area to which the grid cell with a tourist aggregation density higher than the preset threshold belongs, it is determined to be a match. The preset threshold is dynamically set according to 20% of the maximum carrying capacity of the scenic area, and the maximum carrying capacity data is stored in the scenic area knowledge base. For example, if the maximum carrying capacity of a scenic spot is 5,000 people and the preset threshold is 1,000 people, the matching is triggered when the tourist aggregation density in a grid cell exceeds 1,000 people. The weight coefficient setting formula is designed differently according to the knowledge type: The weight coefficient of the emergency notice type knowledge = tourist aggregation density / preset threshold × 2; the weight coefficient of the activity change type knowledge = tourist aggregation density / preset threshold × 1.5; the weight coefficient of the facility status type knowledge = tourist aggregation density / preset threshold × 1. For example, if the tourist aggregation density of a grid is 1,200 people and the preset threshold is 1,000 people, the weight coefficient of the associated emergency notice type knowledge is 1200 / 1000×2 = 2.4, and the calculation result is reserved to two decimal places.

[0027] Perform dynamic weighted calculation on the real-time updated knowledge based on the priority weight coefficient to generate a dynamically weighted associated data set containing weighted values. The dynamic weighted calculation is achieved through the following steps: Extract all real-time updated knowledge entries from the scenic area knowledge base, and screen out the eligible knowledge according to the content tag matching degree; Combine the screened knowledge entries with their weight coefficients, and the combination method is to append a weight value field after the knowledge content field, and the fields are connected by the delimiter "|". For example, the real-time updated knowledge "The east gate of Scenic Spot B is temporarily closed" is converted to "The east gate of Scenic Spot B is temporarily closed|Weight 3.2" after weighting. After generating the dynamically weighted associated data set, merge it with the associated data retrieved in step S1 according to the data identifier, and the data identifier is generated by the keyword hash value of the knowledge content. The merging rules include: If the same data identifier exists in both sets, add up its weight value; if it only exists in one set, keep it directly. For example, "Performance time adjustment|Weight 2.5" exists in the dynamically weighted associated data set, and "Performance time adjustment|Weight 1.0" exists in the associated data of step S1. After merging, "Performance time adjustment|Weight 3.5" is generated. The finally generated dynamically weighted associated data set is sorted in descending order of the weight value to ensure that high-priority knowledge is preferentially called in subsequent model training.

[0028] S3. Input the associated data set and the question information into the pre-trained generative AI model, and complete real-time adaptation training through dynamic parameter adjustment to generate initial answer information. The specific implementation is as follows: Concatenate the weighted values in the dynamically weighted associated data set with the question information in a vectorized manner to generate a fused input vector. The dynamically weighted associated data set contains weighted entries of real-time updated knowledge and core scenic area knowledge. The weighted values are stored in floating-point format, and the weight values are generated through the dynamic weighting calculation in step S2. The question information text is converted into a semantic vector through a pre-trained word vector model. The word vector model is implemented using a Word2Vec model trained based on public corpora, mapping each vocabulary into a 300-dimensional real number vector. The process of concatenating the weighted value and the semantic vector is as follows: expand the weight value into a constant vector with the same dimension as the semantic vector. For example, the weight 3.5 is expanded into a 300-dimensional vector [3.5, 3.5, …, 3.5], and then added to the semantic vector element by element. For example, if the semantic vector is [0.2, -0.5, 1.3, …, 0.7], and the expanded weight vector is [3.5, 3.5, …, 3.5], the fused result is [3.7, 3.0, 4.8, …, 4.2]. The fused input vector is used as the input of the generative AI model for subsequent attention weight adjustment.

[0029] According to the distribution characteristics of the weighted values in the fused input vector, dynamically adjust the attention weight allocation ratio of the generative AI model. The attention weight allocation ratio reflects the attention intensity of the model to different input positions. The adjustment process includes the following steps: calculate the mean square error of all weighted values in the fused input vector. If the mean square error exceeds a preset threshold (e.g., 1.5), it is determined that the distribution difference of the weighted values is significant; for positions with weighted values higher than the mean, increase their attention weights proportionally. For example, a fused input vector contains three weighted values 3.5, 1.2, and 0.8, with a mean of 1.83 and a mean square error of 1.2. When the mean square error is lower than the threshold, no adjustment is made; if the weighted values are 5.0, 0.5, and 0.3, with a mean square error of 2.3, when the mean square error exceeds the threshold, the attention weight of the high-weight position (5.0) is increased by 20%. The adjusted attention weight allocation ratio is stored in the form of a probability matrix. The rows of the matrix correspond to the decoding time steps, the columns correspond to the input positions, and the element values represent the attention probabilities.

[0030] Perform gradient descent optimization on the decoder layer of the generative AI model based on the adjusted attention weight allocation ratio to update the model parameters. The loss function for gradient descent optimization consists of two parts: the first part is the answer generation loss, which calculates the cross-entropy between the generated text and the standard answer; the second part is the attention consistency loss, which calculates the mean square error between the adjusted attention weights and the initial weights. During the parameter update process, the learning rate is dynamically adjusted according to the weighted value: when the weighted value is higher than the mean, a smaller learning rate (e.g., 0.001) is used to prevent overfitting; when the weighted value is lower than the mean, a larger learning rate (e.g., 0.005) is used to accelerate knowledge absorption. For example, a weighted value of 3.5 corresponds to a learning rate of 0.001, and a weight of 0.8 corresponds to a learning rate of 0.005. The number of optimization iterations is set according to the dimension of the fused input vector. For a 300-dimensional vector, the default number of iterations is 50. After each iteration, verify the convergence of the loss function. If the loss decrease amplitude is less than 1% for 5 consecutive iterations, the training is terminated early.

[0031] Perform inference calculation on the question information through the updated generative AI model to generate initial answer information containing the core knowledge features of the scenic area. The inference calculation process is divided into two stages: the encoding stage inputs the question information text into the model encoder to generate a context vector representation; the decoding stage gradually generates the answer text based on the context vector and the adjusted attention weight distribution. During the generation process, the model gives priority to focusing on the semantic segments corresponding to the high-weight associated data. For example, when the weight of "performance time adjustment" is 3.5, the decoder assigns a higher probability when generating "time"-related words. The initial answer information is output after text post-processing (such as punctuation correction and grammar checking). For example, when the input question is "Has the performance time changed today?", the generated answer is "The current performance time has been adjusted to 14:00. Please refer to the scenic area announcement for details." The parameter update and inference calculation of the generative AI model share the same computational graph structure to ensure the logical consistency of training and inference.

[0032] S4. Generate a spatio-temporal weight factor according to the spatio-temporal clustering result of the tourist behavior trajectory and the spectral clustering structure entropy of the dynamic knowledge graph. The specific implementation is as follows: Perform spatio-temporal segmentation on the continuous positioning data of the tourist mobile terminal to identify the trajectory segments with a density higher than the preset threshold as spatio-temporal hot regions. The continuous positioning data is collected in real time through the global positioning system of the mobile terminal and contains longitude, latitude, and timestamp information, with the timestamp accuracy accurate to the second level. The spatio-temporal segmentation is realized by the collaborative processing of a sliding time window and geographical grid division: the length of the time window is set to 15 minutes, and the side length of the geographical grid is 50 meters. The time window and grid side length parameters are dynamically adjusted according to the scenic area area and tourist flow characteristics. For example, for a scenic area with an area larger than 10 square kilometers, a 30-minute time window and a 100-meter grid side length are used.

[0033] Within each time window, count the number of location data points in each grid. If the number of data points in a certain grid exceeds the preset threshold, then determine that the time - space range where the grid is located is a spatio - temporal hot - spot area. The calculation formula for the preset threshold is: single - grid threshold = maximum carrying capacity of the scenic area / total number of grids × 5%. Among them, the data of the maximum carrying capacity of the scenic area comes from the operation planning document of the scenic area management department, and the total number of grids is obtained by dividing the geographical range of the scenic area by the grid area. For example, if the total area of a scenic area is 5 square kilometers and the side length of the grid is 50 meters, then the total number of grids is (5000 meters / 50 meters) × (5000 meters / 50 meters) = 10000; if the maximum carrying capacity is 20000 people, then the single - grid threshold is 20000 / 10000 × 5% = 0.1 person, and in actual processing, it is rounded up to 1 person. When the number of location data points in a certain grid within a certain time window exceeds 1, it is marked as a hot - spot area.

[0034] Construct a logical dependency relationship graph among events, people, and buildings in the scenic - area knowledge base, and calculate the betweenness centrality index of each node. The construction rules for the logical dependency relationship graph are: taking events, people, and buildings as nodes, if there is a direct causal relationship or spatial subordination relationship between two nodes, then establish a directed edge. The causal relationship is defined as the clear decision - making association in historical events, and the weight value of the edge is the frequency of mentioning this decision in historical documents; the spatial subordination relationship is defined as the inclusion relationship between a building and a geographical area, and the weight value of the edge is the certainty score of the inclusion relationship (in the range of 0 - 1).

[0035] The betweenness centrality index is calculated by the Brandes algorithm. The specific steps are as follows: traverse the shortest paths between all pairs of nodes, count the number of times each node appears in these paths, and the calculation formula is: node betweenness centrality index = (number of shortest paths passing through this node) / (total number of shortest paths of all node pairs in the whole graph) × 100%. Nodes with a betweenness centrality index higher than 10% are determined as high - betweenness centrality nodes. For example, if a certain node appears in 300 shortest paths and the total number of shortest paths in the whole graph is 3000, then its betweenness centrality index is 10%, reaching the threshold.

[0036] Calculate the spatio - temporal correlation intensity according to the overlapping area between the geographical boundary of the spatio - temporal hot - spot area and the associated area of high - betweenness centrality nodes in the logical dependency relationship graph. The geographical boundary of the spatio - temporal hot - spot area is determined by the vertex coordinates of the circumscribed polygon of the hot - spot grids, and the vertex coordinates are calculated and generated by the convex hull algorithm. The associated area of high - betweenness centrality nodes is the predefined node influence range in the knowledge base, and the influence - range data comes from historical activity - range records or geographical radiation models. For example, the influence range of a certain historical event is set as a circular area with a radius of 500 meters centered on the event occurrence location.

[0037] The overlapping area calculation uses polygon Boolean operations in a plane coordinate system: the polygons of the spatio-temporal hotspot regions and the node-associated regions are transformed to the same plane coordinate system through Gauss-Krüger projection, and the intersection area between the two is calculated. The formula for spatio-temporal correlation strength is: Spatio-temporal correlation strength = Intersection area / (Spatio-temporal hotspot region area + Node-associated region area - Intersection area). The calculation result is linearly normalized and mapped to the interval from 0 to 1. For example, if the area of a certain spatio-temporal hotspot region is 1200 square meters, the node-associated region is a circular region with a radius of 30 meters (area ≈ 2827 square meters), and the intersection area is 800 square meters, then the spatio-temporal correlation strength = 800 / (1200 + 2827 - 800) = 800 / 3227 ≈ 0.248, and the normalized value is 0.248.

[0038] The topological structure disorder degree index of the logical dependency relationship graph and the spatio-temporal correlation strength are weighted and fused after normalization to generate a spatio-temporal weight factor.

[0039] The topological structure disorder degree index analyzes the topological characteristics of the logical dependency relationship graph through the spectral clustering algorithm. The specific calculation process includes the following steps: First, construct the adjacency matrix of the logical dependency relationship graph. The rows and columns of the adjacency matrix correspond to the nodes in the graph respectively, and the matrix element values are the edge weights between the nodes. The edge weights are determined according to the dependency relationship strength between the nodes. For example, the causal relationship weight between a historical event and a decision-making person is the ratio of the number of times they are associated in historical documents to the total number of documents, and the spatial subordination relationship weight is the certainty score of the geographical inclusion relationship. Then calculate all the eigenvalues of the adjacency matrix. The eigenvalues represent the structural characteristics of the graph in different dimensions. After the calculation, they are sorted in descending order according to the numerical values, and the top k eigenvalues are selected for subsequent analysis. The value of k is the integer part of the square root of the total number of graph nodes. For example, when the graph contains 100 nodes, k = 10. Subsequently, normalize the selected top k eigenvalues, that is, calculate the proportion of each eigenvalue in the sum of these k eigenvalues to obtain a normalized eigenvalue sequence. Calculate the entropy value based on the normalized eigenvalue sequence. The physical meaning of the entropy value is the degree of disorder of the eigenvalue distribution. The calculation method is to sum the product of each normalized eigenvalue and its natural logarithm and then take the negative value. Specifically, multiply each normalized eigenvalue by the natural logarithm of this value, add up all the product results and then take the opposite number, and finally obtain the entropy value.

[0040] The entropy value ranges between 0 and the maximum value of the natural logarithm. The higher the value, the more uniform the eigenvalue distribution and the more chaotic the topological structure of the graph. For example, the eigenvalue distribution of a completely randomly connected graph is uniform, and the entropy value is close to the theoretical maximum value; for a graph with a clear hierarchy and a centralized structure, the eigenvalues are concentrated in a few dimensions, and the entropy value is close to 0.

[0041] For subsequent calculations, the entropy value is linearly scaled and mapped to the standard interval of 0 to 1. The scaling formula is: Normalized entropy value = (Original entropy value - Minimum theoretical entropy value) / (Maximum theoretical entropy value - Minimum theoretical entropy value), where the minimum theoretical entropy value corresponds to a completely centralized structure (dominant single eigenvalue), and the maximum theoretical entropy value corresponds to a completely uniform distribution. The finally obtained normalized entropy value is the topological structure chaos index, which is positively correlated with the structural complexity of the graph spectrum and is used to quantify the topological chaos degree of knowledge dependence relationships. For example, when there are cross-dependence relationships among multiple nodes in a historical event graph spectrum, the entropy value is significantly higher than that of a graph spectrum with only a linear causal chain, indicating that the former has a more complex structure and more scattered knowledge associations.

[0042] The normalization process uses the maximum-minimum scaling method to map the entropy value to the interval of 0 to 1. The weighted fusion formula is: Spatiotemporal weight factor = Normalized topological structure chaos index × α + Normalized spatiotemporal correlation strength × β, where α and β are weighting coefficients and α + β = 1. The initial values are set as α = 0.6 and β = 0.4, and they are dynamically adjusted according to the knowledge coverage effect of the scenic area during actual operation. The adjustment rule is: If the evaluation result of the core knowledge coverage is lower than the expectation, then increase the value of α to strengthen the influence of the topological chaos degree. For example, if the normalized chaos index of a certain area is 0.8 and the normalized spatiotemporal correlation strength is 0.5, then the spatiotemporal weight factor = 0.8 × 0.6 + 0.5 × 0.4 = 0.68.

[0043] The spatiotemporal weight factor is standardized to output the set of normalized spatiotemporal weight factors. The standardization process uses the Z-score method, and the calculation formula is: Standardized value = (Original value - Mean) / Standard deviation, where the mean and standard deviation are calculated in real time based on all spatiotemporal weight factors of the current scenic area. For example, if there are 100 spatiotemporal weight factors in the current scenic area, with a mean of 0.5 and a standard deviation of 0.15, and the original value of a certain weight factor is 0.68, then the standardized value = (0.68 - 0.5) / 0.15 ≈ 1.2. The set of normalized spatiotemporal weight factors is sorted in descending order of the standardized value, and the entries with high standardized values are preferentially used for the core knowledge coverage correction in the subsequent steps. The standardization process also includes outlier filtering: If the absolute value of the standardized value of a certain weight factor is greater than 3, it is regarded as an outlier and replaced with the mean of adjacent entries to prevent extreme values from interfering with model training. For example, if it is detected that the standardized value of a certain weight factor is 3.5, then it is replaced with the mean 1.1 of the two adjacent entries (1.2 and 1.0) in the sorting.

[0044] Step S4 addresses the problem of core knowledge coverage deviation caused by the lack of knowledge relevance in the generative AI model during dynamic learning by coupling the spatio-temporal characteristics of tourist behavior with the complexity of the knowledge topology. Compared with the existing technology that only relies on knowledge update frequency or static label weighting, this method innovatively introduces the fusion weight of spatio-temporal correlation intensity and topological chaos degree, enabling the model to simultaneously perceive the aggregation state of the physical space and the evolution of the knowledge network structure during training, and blocking the interference coverage of high-chaos knowledge on core knowledge; through the joint quantification of spatio-temporal and knowledge domain features, it breaks through the limitations of traditional single-dimensional weight allocation, while ensuring real-time knowledge injection, it directionally strengthens the stability of core knowledge during the generation process, thereby significantly reducing the knowledge forgetting rate and improving the answer accuracy under the same hardware conditions.

[0045] S5. Use the spatio-temporal weight factor to correct the core knowledge coverage of the initial answer information and generate the spatio-temporal constraint coverage evaluation result. The specific implementation is as follows: Extract the semantic features matching the core knowledge labels of the scenic area knowledge base from the initial answer information to generate a core knowledge feature set. The core knowledge labels are predefined knowledge classification identifiers in the scenic area knowledge base, including historical event labels, cultural term labels, and geographical coordinate labels. The semantic feature extraction is implemented through a pre-trained word vector model. The word vector model uses the Word2Vec model trained based on public corpora. After splitting the text in the initial answer information into lexical units, calculate the semantic similarity between each lexical unit and the core knowledge labels. The semantic similarity is calculated through the cosine similarity algorithm, and the lexical units with similarity higher than the set threshold are selected as core knowledge features.

[0046] Based on the normalized spatio-temporal weight factor set, prioritize the core knowledge feature set to generate a core knowledge feature priority sequence. The normalized spatio-temporal weight factor set comes from the standardized weight values generated in step S4, and each weight factor is associated with a specific spatio-temporal hot spot area and knowledge dependency. The priority sorting rule is: match the weight value of each feature in the core knowledge feature set with the corresponding feature in the normalized spatio-temporal weight factor set, and sort them from high to low according to the weight value to generate a priority sequence. If a feature does not match a weight value in the normalized spatio-temporal weight factor set, it is defaulted to the lowest priority and placed at the end of the sequence.

[0047] Identify the missing feature segments by comparing the priority sequence of core knowledge features with the semantic coverage range of the initial answer information. The semantic coverage range is determined by the core knowledge features already present in the initial answer information. The specific method is as follows: Convert the initial answer information into a semantic vector through a word vector model and perform similarity matching with each feature vector in the core knowledge feature set. If the similarity is higher than the threshold, it is determined to be covered. The rule for determining missing coverage is: In the priority sequence of core knowledge features, if the top N features are not covered in the initial answer information, it is determined that there is a missing coverage. The value of N is dynamically adjusted according to the length of the priority sequence. The rule is that when the sequence length is greater than or equal to 5, N = 3; when it is less than 5, N = 1.

[0048] Perform dynamic correlation matching between the missing feature segments and the spatio-temporal weight factors to generate a spatio-temporal constrained coverage evaluation result. The dynamic correlation matching rule is: Traverse the missing feature segments and retrieve their associated normalized spatio-temporal weight factors. If the weight factor is higher than the preset threshold, generate a coverage defect mark and record the weight value; if the weight factor is lower than the threshold, mark it as a low-priority defect. The coverage evaluation result is output in the form of a set of defect marks, and high-priority defects are preferentially compensated in subsequent processing.

[0049] S6. When the coverage evaluation result does not meet the threshold, call the core knowledge data of the corresponding keyword set in the scenic area knowledge base, append it to the associated data, retrain the generative AI model, and then output the final answer information to the mobile terminal. The specific implementation is as follows: When the priority and weight value of the defect marks in the coverage evaluation result meet the preset conditions, generate a knowledge append trigger instruction. The setting rule of the preset conditions is: The defect marks in the coverage evaluation result need to meet the condition that the priority is "high priority" and the associated normalized spatio-temporal weight factor value is greater than the preset threshold, or the weight value ranks in the top 20% among all defect marks. The priority classification is set according to the scenic area knowledge coverage strategy. "High priority" corresponds to the core knowledge loopholes that need to be repaired immediately, and "low priority" corresponds to the secondary knowledge defects that can be processed later. The preset threshold is 0.5, and the top 20% of the weight rankings are the marks with a weight value ≥ 0.6. Then, for the marks that meet the trigger conditions, generate two knowledge append trigger instructions. The trigger instructions include knowledge tags, weight values, and priority information, which are used to guide subsequent knowledge retrieval.

[0050] Retrieve the core knowledge data corresponding to the missing coverage feature segments from the scenic area knowledge base according to the knowledge addition trigger instruction, and generate a knowledge addition set. The retrieval process is achieved by combining the exact matching and semantic extension matching of knowledge tags: the exact matching first looks for knowledge entries that are exactly the same as the trigger instruction tags in the "historical events", "geographical coordinates", and "cultural terms" classifications of the scenic area knowledge base; if no exact match is found, the retrieval scope is extended through semantic similarity calculation, and the associated knowledge with a similarity higher than the threshold (such as 0.7) is screened and added to the knowledge addition set together. The entries in the knowledge addition set are sorted according to the knowledge type and authoritative score. The authoritative score is comprehensively calculated from the literature level of the data source (such as primary historical materials, secondary research papers) and the expert review status (such as reviewed / unreviewed) to ensure that the entries with high authority are retained first.

[0051] Dynamically append the knowledge addition set to the dynamically weighted associated data set to form an enhanced associated data set. The dynamic append operation includes data deduplication, weight fusion, and timeliness verification: if the entries in the knowledge addition set already exist in the dynamically weighted associated data set, compare the weight values of the two, retain the larger value and update the timeliness tag (such as "latest version"); if it is a new entry, assign an initial weight value (such as 1.0) and add the timeliness tag "newly added". The enhanced associated data set is stored through the dual indexing of the timestamp and weight value to ensure that high-weight and high-timeliness data are preferentially called during training.

[0052] Based on the enhanced associated data set, perform incremental training on the decoder layer of the generative AI model and update the model parameters. The incremental training adopts a local parameter optimization strategy. The specific steps are as follows: fix the parameters of the encoder layer of the generative AI model, and only perform backpropagation optimization on the fully connected network parameters of the decoder layer. The training data consists of the knowledge content and its weight value in the enhanced associated data set. The loss function is designed as the sum of the weighted cross-entropy loss and the regularization term. The weighted cross-entropy loss adjusts the loss contribution according to the weight value of the knowledge entry, and the regularization term is used to prevent overfitting of the decoder layer. The number of training iterations is dynamically adjusted according to the scale of the enhanced associated data set. The rule is: when the data volume is less than 50, iterate 10 times; when it is 50 - 100, iterate 20 times; when it is greater than 100, iterate 30 times. After each iteration, verify the convergence of the loss function. If the loss decrease amplitude is less than 1% for 5 consecutive iterations, terminate the training in advance.

[0053] Semantic fusion calculation is performed on the initial answer information through an updated generative AI model to generate the final answer information and output it to the mobile terminal. The semantic fusion calculation is implemented by combining the attention mechanism with context splicing: the initial answer information is spliced with the high-weight knowledge text in the enhanced associated data to form an input sequence, and the encoder is used to generate a joint semantic representation; during decoding, the model attention layer dynamically assigns attention weights to the newly added knowledge to generate the fused answer text. After grammar correction, redundancy filtering, and sensitive word detection, the final answer information is pushed to the tourist device through the network interface of the mobile terminal, and the push format is JSON structured data, including text content, knowledge source annotation, and timeliness label.

[0054] The solution of this embodiment solves the common problem of insufficient coverage of core knowledge in the scenic area knowledge service by the generative AI model through multi-dimensional feature coupling and dynamic iteration mechanism; the existing technology usually relies on the knowledge update frequency or static label weighting, without considering the dynamic correlation between the physical space aggregation state and the knowledge topology structure, resulting in high-confusion knowledge interfering with the core knowledge expression. By introducing a spatio-temporal weight factor as a dynamic regulator of knowledge coverage, the spatio-temporal clustering results of tourist behavior trajectories are fused with the spectral clustering structure entropy of the knowledge graph, so that the weight factor reflects both the spatial aggregation intensity and the knowledge network complexity, forming a dual-domain feature coupling mechanism; through the coverage evaluation results, it triggers directional knowledge addition and incremental training of the decoder, realizing a closed-loop optimization of "evaluation - addition - training - generation", significantly reducing the consumption of computing resources; incorporating spatio-temporal dynamics and knowledge topology evolution into a unified weight framework, and through priority-driven local parameter optimization, blocking the interference of irrelevant knowledge on the generation process, thereby improving the answer accuracy and knowledge stability under the same hardware conditions.

[0055] It should be noted that the intelligent scenic spot guide service can be realized through the collaborative architecture of the cloud data center and the WeChat mini-program. The cloud data center integrates a structured scenic spot knowledge base, and the data in the library is classified and stored according to dimensions such as geographical coordinates, historical events, and cultural attributes. For example, the geographical coordinate data includes the longitude, latitude, and coverage radius of scenic spots, and the historical event data is associated with the timeline and the character relationship graph. When the WeChat mini-program obtains the real-time location of tourists through the electronic map interface, it triggers the keyword retrieval mechanism of the knowledge base: extracts entity nouns from the tourist's question text, matches the structured data of the corresponding dimension in the knowledge base, and dynamically inputs the associated content into the pre-trained generative AI model for real-time fine-tuning. The fine-tuning adopts a lightweight gradient update strategy, only adjusting the parameters of the decoder layer to adapt to the scenic spot knowledge characteristics, and generating accurate answers that integrate geographical coordinates and historical allusions. At the same time, based on the tourist location, stay duration, and historical interaction data, a personalized guide route is generated through a hybrid recommendation algorithm (collaborative filtering + knowledge graph path recommendation). The cloud architecture realizes data isolation for multiple scenic spots through a vertically partitioned database, caches hot knowledge data in Redis to reduce retrieval latency, and the intelligent routing middleware dynamically allocates computing resources, combined with containerized virtual scheduling to support high-concurrency access. Deeply couple the static knowledge base, dynamic AI training, and the scenario-based recommendation system to form a "data-model-service" closed loop.

[0056] Embodiment 2: Figure 2 The structural schematic diagram of the scenic spot companion service system based on the linkage between generative AI and the knowledge base of the present invention is given. The scenic spot companion service system based on the linkage between generative AI and the knowledge base includes the following modules: A question retrieval module, configured to obtain in real time the question information input by tourists through a mobile terminal, extract the keyword set in the question information, and retrieve the matching associated data from the scenic spot knowledge base; A heat weighted module, configured to calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution heat data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted associated data set; A model adaptation module, configured to input the associated data set and the question information into a pre-trained generative AI model, complete real-time adaptation training through dynamic parameter adjustment, and generate initial answer information; A spatio-temporal weight module, configured to generate a spatio-temporal weight factor according to the spatio-temporal clustering result of tourist behavior trajectories and the spectral clustering structure entropy of the dynamic knowledge graph; A coverage correction module, configured to use the spatio-temporal weight factor to correct the core knowledge coverage of the initial answer information, and generate a spatio-temporal constrained coverage evaluation result; A result output module, configured to, when the coverage evaluation result does not meet the threshold, call the core knowledge data of the corresponding keyword set in the scenic spot knowledge base, append it to the associated data, retrain the generative AI model, and output the final answer information to the mobile terminal.

[0057] The calculations involved in the embodiments are all dimensionless numerical calculations, and the preset parameters and threshold selections in the calculations are set by those skilled in the art according to the actual situation.

[0058] It should be noted that the present invention can be deployed on the device itself to achieve embedded applications, or can be run on a PC or other terminal with a user interface, so as to meet various hardware environments and usage requirements.

[0059] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more collections of available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0060] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices and modules can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0061] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the devices or modules can be in an electrical, mechanical or other form.

[0062] The module described as a separation component may or may not be physically separated. The component shown as a module may or may not be a physical module. It may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0063] In addition, in each embodiment of this application, each functional module can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.

[0064] If the above-mentioned function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0065] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0066] Finally: The above is only the preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A scenic area companion service method based on the linkage between generative AI and a knowledge base, characterized in that, It includes the following steps: S1. Obtain the question information input by tourists through the mobile terminal in real time, extract the keyword set in the question information, and retrieve the matching associated data from the scenic area knowledge base; S2. Calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution heat data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted set of associated data; S3. Input the set of associated data and the question information into the pre-trained generative AI model, complete real-time adaptation training through dynamic parameter adjustment, and generate the initial answer information; S4. Generate a spatio-temporal weight factor according to the spatio-temporal clustering result of the tourist behavior trajectory and the spectral clustering structure entropy of the dynamic knowledge graph; S5. Use the spatio-temporal weight factor to correct the core knowledge coverage of the initial answer information and generate a spatio-temporal constrained coverage evaluation result; S6. When the coverage evaluation result does not meet the threshold, call the core knowledge data of the corresponding keyword set in the scenic area knowledge base, append it to the associated data, retrain the generative AI model, and output the final answer information to the mobile terminal.

2. The scenic area companion service method based on the linkage of generative AI and knowledge base according to claim 1, wherein Obtain the question information input by tourists through the mobile terminal in real time, extract the keyword set in the question information, and retrieve the matching associated data from the scenic area knowledge base, including: Collect the question information of tourists in real time through the input interface of the mobile terminal; Perform word segmentation on the question information and filter out stop words to generate an initial keyword set; Screen the entity nouns matching the scenic area knowledge base from the initial keyword set to form a final keyword set; Match the corresponding coordinate data, historical event data, and cultural explanation data of the scenic spots in the scenic area knowledge base according to the final keyword set; Merge the matching coordinate data, historical event data, and cultural explanation data into associated data.

3. The scenic area companion service method based on the linkage between generative AI and knowledge base according to claim 2, characterized in that, The scenic area knowledge base contains structured data classified and stored according to geographical distribution, historical background, and cultural attributes.

4. The scenic area companion service method based on the linkage between generative AI and knowledge base according to claim 1, characterized in that, Calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution heat data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted set of associated data, including: Obtain the real-time tourist position coordinate set of the corresponding scenic spots based on the tourist distribution heat data; Divide the geographical area of each scenic spot into grid cells of a preset size, and count the number of real-time tourist position coordinates in each grid cell as the tourist aggregation density; Set the priority weight coefficient of the real-time updated knowledge according to the matching degree between the tourist aggregation density and the content label of the real-time updated knowledge in the scenic area knowledge base; Perform dynamic weighted calculation on the real-time updated knowledge based on the priority weight coefficient to generate a dynamically weighted set of associated data containing weighted values.

5. The scenic area companion service method based on the linkage of generative AI and knowledge base according to claim 1, characterized in that, Input the set of associated data and the question information into the pre-trained generative AI model, complete real-time adaptation training through dynamic parameter adjustment, and generate the initial answer information, including: Perform vectorized splicing on the weighted values in the dynamically weighted set of associated data and the question information to generate a fused input vector; Dynamically adjust the attention weight distribution ratio of the generative AI model according to the distribution characteristics of the weighted values in the fused input vector; Perform gradient descent optimization on the decoder layer of the generative AI model based on the adjusted attention weight distribution ratio, and update the model parameters; Infer and calculate the question information through the updated generative AI model to generate initial answer information containing the core knowledge features of the scenic area.

6. The scenic area companion service method based on the linkage between generative AI and knowledge base according to claim 1, characterized in that, Generate spatio-temporal weight factors based on the spatio-temporal clustering results of tourists' behavior trajectories and the spectral clustering structure entropy of the dynamic knowledge graph, including: Perform spatio-temporal segmentation on the continuous positioning data of tourists' mobile terminals, and identify trajectory segments with density higher than the preset threshold as spatio-temporal hot regions; Construct a logical dependency relationship graph among events, people, and buildings in the scenic area knowledge base, and calculate the betweenness index of each node; Calculate the spatio-temporal correlation intensity according to the overlapping area between the geographical boundary of the spatio-temporal hot region and the associated region of the high-betweenness nodes in the logical dependency relationship graph; Weight and fuse the topological structure chaos index of the logical dependency relationship graph and the spatio-temporal correlation intensity after normalization to generate spatio-temporal weight factors; Perform standardization processing on the spatio-temporal weight factors, and output a set of normalized spatio-temporal weight factors.

7. The scenic area companion service method based on the linkage between generative AI and knowledge base according to claim 1, characterized in that, Use the spatio-temporal weight factors to correct the core knowledge coverage of the initial answer information, and generate a spatio-temporal constrained coverage evaluation result, including: Extract semantic features matching the core knowledge labels in the scenic area knowledge base from the initial answer information to generate a set of core knowledge features; Based on the set of normalized spatio-temporal weight factors, prioritize the set of core knowledge features to generate a core knowledge feature priority sequence; Compare the core knowledge feature priority sequence with the semantic coverage range of the initial answer information to identify missing feature segments in coverage; Dynamically match the missing feature segments in coverage with the spatio-temporal weight factors to generate a spatio-temporal constrained coverage evaluation result.

8. The scenic area companion service method based on the linkage between generative AI and knowledge base according to claim 1, characterized in that, When the coverage evaluation result does not meet the threshold, call the core knowledge data of the corresponding keyword set in the scenic area knowledge base, append it to the associated data and retrain the generative AI model, and then output the final answer information to the mobile terminal, including: When the priority and weight value of the defect mark in the coverage evaluation result meet the preset conditions, generate a knowledge append trigger instruction; Retrieve the core knowledge data corresponding to the missing feature segments in coverage from the scenic area knowledge base according to the knowledge append trigger instruction to generate a knowledge append set; Dynamically append the knowledge append set to the dynamically weighted associated data set to form an enhanced associated data set; Perform incremental training on the decoder layer of the generative AI model based on the enhanced associated data set to update the model parameters; Perform semantic fusion calculation on the initial answer information through the updated generative AI model, generate the final answer information and output it to the mobile terminal.

9. A scenic area companion service system based on the linkage between generative AI and a knowledge base, for implementing the scenic area companion service method based on the linkage between generative AI and a knowledge base according to any one of claims 1-8, characterized in that Including the following modules: Question retrieval module, used to obtain the question information input by tourists through the mobile terminal in real time, extract the keyword set in the question information and retrieve the matching associated data from the scenic area knowledge base; Thermal weighting module, used to calculate the tourist aggregation density of the scenic spots corresponding to the associated data based on the tourist distribution thermal data to adjust the priority weight of the real-time updated knowledge in the associated data, and generate a dynamically weighted associated data set; Model adaptation module, used to input the associated data set and the question information into the pre-trained generative AI model, complete real-time adaptation training through dynamic parameter adjustment and generate initial answer information; A spatio-temporal weight module, which is used to generate spatio-temporal weight factors according to the spatio-temporal clustering results of tourists' behavior trajectories and the spectral clustering structure entropy of the dynamic knowledge graph; A coverage correction module, which is used to correct the core knowledge coverage of the initial answer information by using the spatio-temporal weight factors to generate a spatio-temporal constraint coverage evaluation result; A result output module, which is used to call the core knowledge data of the corresponding keyword set in the scenic area knowledge base when the coverage evaluation result does not meet the threshold, append it to the associated data, retrain the generative AI model, and then output the final answer information to the mobile terminal.

Citation Information

Patent Citations

  • Component e-commerce platform search result classification display method

    CN111915392A

  • Sub-graph-based tense knowledge graph question and answer method

    CN114706951A

  • Generative large model modeling method, system and equipment based on knowledge graph

    CN117688974A

  • Intelligent question and answer implementation method and device, equipment and storage medium

    CN118626604A

  • Historical scenic spot-oriented generation type smart text travel guide system and historical scenic spot-oriented generation type smart text travel guide method

    CN119741458A

Cited By

  • Newborn intensive care unit service platform

    CN120744071A

  • A neonatal intensive care unit service platform

    CN120744071B

  • Enterprise-level papermaking process question and answer method and system based on large model

    CN121051205A

  • Fishery breeding evaluation method and device based on big data, storage medium and program product

    CN121119817A

  • Self-adaptive dynamic knowledge updating method and system in combination with spatio-temporal data

    CN121144328A