A knowledge graph data intelligent retrieval method and system based on large language model

By constructing a knowledge graph and large language model, combined with dynamic environmental factors, the problem of accurate capture of emotional polarization and public opinion conflicts in social media is solved, and efficient and accurate retrieval and Q&A of public opinion information is achieved.

CN120067302BActive Publication Date: 2025-08-19ANHUI ZHONGKE GUOJIN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510529568.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-19
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately capture emotional polarization phenomena and public opinion conflicts in social media comments, resulting in insufficient response capabilities of public opinion monitoring and intelligent question-and-answer systems in dynamic environments, affecting the accuracy and practicality of search results.

Method used

By constructing a knowledge graph, using a large language model to generate semantic embedding vectors, combining event semantic dispersion, propagation structure change rate, context switching frequency and event conflict factors, dynamic environmental factors are constructed to achieve accurate classification of the positive and negative emotions distribution of public opinion comments, and to retrieve answers through multi-hop inference calculations.

Benefits of technology

It improves the accuracy and robustness of processing real-time public opinion information, can dynamically respond to changes in the external environment, reduces the deviations in search and question-and-answer, and improves the accuracy and adaptability of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067302B_ABST
    Figure CN120067302B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data analysis technology, and specifically to a knowledge graph data intelligent retrieval method and system based on a large language model. By modeling the sentiment scores of public opinion comments, capturing the skewness, fat tail, and multi-peak characteristics, dividing the comment data into two categories, positive and negative, and quantifying the two sentiment distributions, the event conflict factor not only reflects the degree of opposition between positive and negative emotions in public opinion, but also provides a quantitative basis for the integration of external dynamic environmental information; by combining the event conflict factor with the event semantic discreteness, the propagation structure change rate, and the context switching frequency into the dynamic environmental factor, and then converting it into an adjustment vector of the same dimension as the entity embedding, the final query and entity matching can dynamically respond to external public opinion changes, alleviate the retrieval and question-answering deviations caused by the traditional method's inability to correctly capture emotional polarization and abnormal emotions, and improve the accuracy and robustness of the intelligent retrieval method in processing real-time public opinion information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis technology, and in particular to a method and system for intelligent retrieval of knowledge graph data based on a large language model. Background Art

[0002] In current public opinion monitoring and intelligent question-answering systems, many methods mainly rely on text embeddings generated by large language models and semantic retrieval based on knowledge graphs to cope with diverse information queries.

[0003] When faced with large amounts of unstructured data on social media, current methods often have the following problems:

[0004] First, social media comment data is highly diverse and noisy, with sentiment expressions often exhibiting skewed, fat-tailed, and multimodal distributions. Traditional Gaussian mixture models or static threshold-based methods often struggle to accurately capture outliers and sentiment polarization, leading to inaccurate sentiment classification.

[0005] Secondly, existing methods lack effective means to measure the opposing or conflicting emotional information in public opinion comments, resulting in deviations in judging the controversiality or polarization of events. This will affect the entire retrieval system's ability to respond to the dynamic public opinion environment, thereby reducing the accuracy and practicality of the retrieval results. Summary of the Invention

[0006] In response to the above-mentioned shortcomings of the existing technology, the present invention provides a knowledge graph data intelligent retrieval method and system based on a large language model, which can effectively solve the problem in the existing technology that it is difficult to combine the actual emotional state of public opinion information to improve the accuracy of retrieval results.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0008] The present invention provides a method for intelligent retrieval of knowledge graph data based on a large language model, which at least includes:

[0009] Build a knowledge graph and generate semantic embedding vectors for the input query and entity nodes in the knowledge graph;

[0010] Incorporating time-dependent environmental features into entity representations allows the matching between queries and entity nodes to dynamically reflect changes in the external environment and events, including:

[0011] The time-dependent environmental factors are constructed based on the change rate of event semantic discreteness, the change rate of event propagation structure, the frequency of context switching, and the event conflict factor. The event conflict factor includes:

[0012] Introducing Mix The distribution model captures the positive and negative sentiment distributions in public opinion comments, and we have:

[0013] Establish a sentiment score set, based on the skewness, fat tail and multi-peak characteristics of the sentiment score, and assume that the sentiment score is composed of multiple mixed Mixture of distribution models: Indicates sentiment score The overall probability density function of the variable, Indicates the The mixing weights of the components, represents the probability density function of the distribution, according to the degrees of freedom of the components , scale parameters and mean get;

[0014] Calculate the posterior probability of the component based on the distribution probability density function, and use the posterior probability to determine whether the public opinion comment is a positive or negative sentiment distribution;

[0015] Mapping environmental factors into environmental embedding vectors and combining them with semantic embedding vectors to construct dynamic similarity in response to changes in the external environment and events;

[0016] The multi-hop reasoning score is calculated based on dynamic similarity and multi-hop reasoning, and the retrieval answer is output in combination with a large language model.

[0017] Furthermore, the relationship formula defining the distribution probability density function is:

[0018]

[0019] represents the Gamma function, represents the normalization factor.

[0020] Furthermore, the expectation maximization algorithm is used to The parameters of the distribution model, including degrees of freedom, scale parameter and mean, are estimated and the optimal parameters are obtained by iterative optimization.

[0021] Furthermore, the method for judging whether a public opinion comment is a positive emotion distribution or a negative emotion distribution by using posterior probability is:

[0022] Sentiment score for each public opinion comment and each component , calculate the posterior probability :

[0023]

[0024] Indicates sentiment score The probability density function of , and obtain the posterior probability of the two components ;

[0025] For each public opinion comment , according to its posterior probability Classify the emotion into positive or negative categories;

[0026] Combined with kernel density estimation, we obtain the positive emotion probability distribution function and the negative emotion probability distribution function.

[0027] Furthermore, the method of constructing dynamic similarity by combining semantic embedding vectors is:

[0028] Define the mapping function to transform the environmental factors Mapping to environment embedding vector ;

[0029] Defining the dynamic similarity between query and entity nodes through cosine similarity .

[0030] Furthermore, the relationship for calculating the multi-hop reasoning score is:

[0031]

[0032] in, Indicates the The attenuation coefficient of the jump, Indicates time Next, user query With the path Entities The environmentally adjusted match, Indicates the number of hops in the path, Represents the multi-hop reasoning score.

[0033] Furthermore, the context switching frequency The construction method is:

[0034] Label public opinion data with sentiment labels, including positive, negative, and neutral;

[0035] Expand keyword set represents the similarity threshold, represents the initial keyword set, Indicates keywords, Indicates calculating the semantic similarity between keywords and public opinion data;

[0036] Identify potential topics in public opinion data and analyze the frequency of context switching based on topic changes :

[0037] Represents public opinion data Belong to the topic The probability distribution of

[0038] Indicates at time All public opinion data sets under and Respectively and The probability distribution of each public opinion data and topic in the public opinion data set at the moment, represents the KL divergence.

[0039] Furthermore, the event semantic discreteness change rate Calculation is performed according to the following relationship:

[0040] Indicates the time window length, Indicates at time The semantic embedding vector of Indicates at time The semantic embedding vector of .

[0041] A knowledge graph data intelligent retrieval system is implemented according to any one of the above-mentioned knowledge graph data intelligent retrieval methods based on a large language model.

[0042] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0043] Compared with the prior art, the technical solution provided by the present invention has the following beneficial effects:

[0044] By utilizing a mix The distribution model models the sentiment scores of public opinion comments, more accurately capturing the skewness, fat tails, and multimodal characteristics. It automatically divides the comment data into positive and negative categories and quantifies the difference between the two sentiment distributions. The event conflict factor not only reflects the degree of opposition between positive and negative emotions in public opinion, but also provides a quantitative basis for the integration of external dynamic environmental information.

[0045] By combining sentiment analysis, similarity calculation, topics, and KL divergence, we can accurately track changes in topics and sentiment in public opinion data and precisely define the frequency of context switching.

[0046] By combining the event conflict factor with the event semantic discreteness, the communication structure change rate, and the context switching frequency into dynamic environmental factors, and then converting them into adjustment vectors of the same dimension as the entity embedding, the final query and entity matching can dynamically respond to changes in external public opinion, alleviate the retrieval and question-answering bias caused by the traditional methods' inability to correctly capture emotional polarization and abnormal emotions, and improve the accuracy, robustness, and adaptability of intelligent retrieval methods in processing real-time public opinion information. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.

[0048] Figure 1 Schematic diagram of the overall method of the present invention. DETAILED DESCRIPTION

[0049] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0050] The present invention will be further described below with reference to the embodiments.

[0051] Example 1 (see Figure 1 ): A method for intelligent retrieval of knowledge graph data based on a large language model, comprising at least the following steps:

[0052] Real-time capture of public opinion data from social media platforms (such as TikTok, Weibo, WeChat official accounts, etc.), including text (news, comments, posts), images, videos, and related interactive data (likes, comments, reposts), and pre-processing of public opinion information data, such as denoising and standardization methods, to achieve data cleaning.

[0053] LLM and NLP methods are used to extract event-related entities (such as events, people, places, time, etc.) and the semantic relationships between them from the pre-processed public opinion data.

[0054] Building a knowledge graph ,in Represents all extracted entity nodes, Represents the edges between entities, each edge Configuration weights describe data credibility and relationship closeness;

[0055] Query on user input And each entity node in the knowledge graph Generate embedding vectors using large language models respectively:

[0056] Represents a query The semantic embedding vector obtained after conversion by the large language model captures the semantic information in the query. Represents an entity node The semantic embedding vector obtained after conversion by the large language model represents the entity node The semantic content of Represents the process of LLM extracting embeddings;

[0057] Incorporating time-dependent environmental features into entity representation allows the matching between queries and entity nodes to dynamically reflect changes in the external environment and events.

[0058] Define time-dependent environmental factors :

[0059]

[0060] in, It represents the rate of change of event semantic discreteness, which is used to measure the change of semantic embedding vector over time within the time window. represents the rate of change of the event propagation structure, represents the event conflict factor, Indicates the frequency of context switching, Represents a fusion function that integrates multiple dynamic environmental features into an overall environmental factor, such as weighting multiple dynamic environmental features to output an environmental factor .

[0061] Furthermore, the dynamic environment characteristics involved in the above scheme are solved separately, including:

[0062] Event semantic discreteness change rate Indicates the length of the time window, describing how many time steps have passed. It can be minutes, hours, or days, depending on the scenario. Indicates at time The semantic embedding vector is generated by the description or text of the public opinion event, reflecting the semantic state of the event at that moment. Indicates at time Therefore, the semantic discreteness change rate of the event reflects the degree of "mutation" or "evolution" of the event topic or description content over time, capturing whether the event theme has changed significantly. If the change is large, it means that the semantic characteristics of the event have been updated;

[0063] Event propagation structure change rate Representation propagation diagram The function of extracting structural features such as the diameter (the maximum shortest path length between any two points in the propagation graph), the average shortest path (the average of the shortest path lengths between all node pairs), etc. , indicating that at time The propagation graph constructed contains the entity nodes extracted at that time and the relationship between them Therefore, the rate of change of the event propagation structure can quantify the changes in the information diffusion pattern of public opinion events over time. For example, when an event suddenly attracts a lot of attention, it may lead to an increase in the connectivity of the propagation graph, a decrease in the diameter, or a decrease in the distance between nodes. Vice versa, by monitoring the dynamic changes in the rate of change of the event propagation structure, we can timely capture the emergence, development, or decline of public opinion hotspots, and provide assistance for subsequent dynamic adjustments to the environment.

[0064] In the public opinion data of social media, there are dynamic changes in emotions and topics, especially in informal language (such as slang, pinyin, emoticons, etc.) and complex emotional expressions (such as sarcasm, puns). Sentiment analysis often faces accuracy issues. At the same time, social media topics and emotions change extremely quickly, often accompanied by sudden events or user interactions, resulting in frequent and complex switching of emotions and topics. In addition, emotions and topics in social media are often multi-layered and intertwined. Emotional fluctuations may directly affect topic changes, and vice versa. Therefore, combining sentiment analysis, topics, and KL divergence to achieve context switching frequency The construction steps are as follows:

[0065] Label public opinion data with sentiment labels, including positive, negative, and neutral;

[0066] Dynamically expand keyword sets based on sentiment tags and similarity Represents the similarity threshold, which is used to filter out keywords with high similarity to the current public opinion data, helping to better describe the core topics in public opinion. represents the initial keyword set, Indicates keywords, Indicates calculating the semantic similarity between keywords and public opinion data (through cosine similarity);

[0067] Use the LDA (Latent Dirichlet Allocation) model to identify potential topics in public opinion data and analyze the frequency of context switching based on topic changes. :

[0068] Represents public opinion data Belong to the topic The probability distribution of , describing the correlation between the two;

[0069] Indicates at time All public opinion data sets under and Respectively and The probability distribution of each public opinion data and topic in the public opinion data set at the moment, It represents the KL divergence, measures the difference between two probability distributions, quantifies the distribution change of each topic in the public opinion data at two time points, and reflects the drastic degree of topic change in public opinion.

[0070] Event conflict factor JSD stands for the symmetric Kullback-Leibler Divergence (KL divergence, which measures the difference between two probability distributions). It is used to measure the difference between two probability distributions, and its value range is usually between 0 and 1. Indicates time Internal Mix The probability distribution function of positive emotions obtained by the distribution model (describing the time The sentiment score is The probability distribution of comments in the positive sentiment category), Indicates time Internal Mix The probability distribution function of negative emotions obtained by the distribution model (describing the probability distribution function of negative emotions in time The sentiment score is The probability distribution of comments in the negative emotion category), the larger the JSD value, the higher the separation between the two, reflecting that the emotional opposition and polarization in the comments are more obvious, thus constituting the event conflict factor.

[0071] It is worth noting that when constructing the event conflict factor, considering the skewness, fat tail and multi-peak phenomena in the sentiment score data, the mixed The distribution model captures the degree of emotional opposition or polarization in public opinion comments, namely the distribution of positive and negative emotions, and determines the event conflict factor. The specific steps are as follows:

[0072] Extract all public opinion comments from social media within a preset time window and use sentiment analysis models (e.g. based on BERT or other pre-trained models) to calculate a continuous sentiment score set for each public opinion comment. Indicates the The sentiment score of a public opinion comment, which usually ranges from -1 to 1, with higher values indicating more positive sentiment and lower values indicating more negative sentiment.

[0073] Assume that the sentiment score is a mixture of two The distribution model is mixed, where one distribution corresponds to positive emotions (positive sentiment) and the other corresponds to negative emotions (negative sentiment), then:

[0074]

[0075] Represents the sentiment score variable The overall probability density function of Indicates the The mixing weights of the components, ;

[0076] Likewise, The degrees of freedom are The probability density function of the distribution of components, the expression is:

[0077]

[0078] in, Indicates the The mean of the components describes the central tendency of emotions. Components with higher means represent positive emotions, while components with lower means represent negative emotions. Indicates the The scale parameter of the component reflects the discrete degree of the sentiment score. Indicates the The degrees of freedom of the components control the thickness of the tail of the distribution, represents the Gamma function, represents the normalization factor;

[0079] It should be noted that Smaller ones allow for more extreme comments, which is suitable for extreme expressions in social media. The larger the value, the closer it is to a normal distribution. In this embodiment, the emotions of social media comments are often not symmetrically distributed. For example, an event may cause anger in the early stage, and the emotions are mostly concentrated in the negative range. However, as rumors are debunked and understanding deepens, some positive tendencies appear, and the mixed Distribution Model It can more accurately fit the emotional concentration trend under skewed conditions. In addition, extreme emotions are common in public opinion events, such as "boycott" and "blood debt with blood" and other intense expressions will significantly deviate from the mainstream emotions. It can tolerate these extreme values of emotions (fat tails) and is insensitive to anomalies, thus providing a more stable basis for classification. Secondly, because different groups of people may have completely different emotions about the same event, the constructed mixed The distribution model can more accurately divide the emotional boundaries when two emotions coexist but the sample distribution is very different, so as to fit the actual public opinion events. The distribution model can more flexibly adapt to the non-normality of sentiment score data, such as skewness and fat tail phenomena, thereby improving the accuracy and robustness of sentiment segmentation.

[0080] Among them, the expectation maximization (EM) algorithm is used to The distribution model parameters are estimated and iterative optimization is performed to obtain the optimal parameters (i.e. the updated etc.), including:

[0081] Step E: Calculate each The posterior probability of each component, while introducing an auxiliary variable For M-step update, we have:

[0082]

[0083] express About the quantity The square of the standardized deviation;

[0084] Sentiment score for each public opinion comment and each component , calculate the posterior probability :

[0085]

[0086] M step: according to the posterior probability and auxiliary variables (reflect Pair The contribution of ) updates the parameters, then:

[0087] represents the updated mixing weight, Indicates the total number of samples, that is, the number of all public opinion comments within the preset time window;

[0088] represents the updated mean;

[0089] , through Take the square root to get the updated ;

[0090] Use numerical methods to solve this nonlinear equation , you can get the updated represents the Digamma function;

[0091] Therefore, based on the above update formula, after completing the E step and the M step, it is decided whether to stop the iteration or return to the E step to continue the next round of update according to the preset convergence standard (such as the parameter change amplitude is lower than the preset threshold or the maximum number of iterations is reached). Then, the EM algorithm is used to update the hybrid. The distribution model is used to estimate parameters and obtain the precise parameters of each emotion component, which facilitates the accurate calculation of event conflict factors.

[0092] because , we can get the updated parameters of component 1 and component 2, that is, the posterior probability of the two components can be obtained in the same way For each public opinion comment , if exists , then the public opinion comment is classified as positive emotion, belonging to the set , otherwise it is a negative emotion class, belonging to the set ;

[0093] Therefore, the collection Perform kernel density estimation (KDE) on the sentiment scores of all public opinion comments in the article to obtain a smooth positive sentiment probability distribution function. ;

[0094] Similarly, we get the probability distribution function of negative emotions , Represents the kernel density estimation function.

[0095] Furthermore, in order to allow environmental factors to directly affect the embedding representation, the mapping function is defined ,Will Mapped to a vector of the same dimension as the entity embedding, namely the environment embedding vector , then:

[0096] A multi-layer neural network for environment mapping tasks, consisting of a series of fully connected layers and nonlinear activation functions (such as ReLU, Sigmoid, etc.). express A set of parameters, including the weight matrix of each layer and the bias vector , through nonlinear transformation, Able to capture It can also "embed" the nonlinear and complex semantic information in the entity representation into a vector space consistent with the entity representation, so as to facilitate the subsequent vector addition and similarity calculation. express dimensional real vector space, adding them together to get the total embedding representation , better reflect the real-time changes of the external environment and events.

[0097] In this way, the dynamic similarity between query and entity nodes can be defined using entity embeddings with context adjustments. (Measure user queries and entity nodes in the knowledge graph In time The following matching indicators):

[0098]

[0099] The semantic embedding vector representing the query (the large language model Converted), and Represents the Euclidean norm (or modulus) of the respective vectors, which is used for normalization to ensure that the scale of the final similarity value is not affected by the length of the vector.

[0100] In summary, dynamic similarity measures user Entity embeddings adjusted with the environment The degree of matching between them can capture the directional similarity between the two in the high-dimensional semantic space. Generally, the higher the value, the better the semantic matching. More importantly, by introducing By directly integrating real-time external environmental information into entity representations, entity semantics can be dynamically updated when public opinion hotspots or breaking news occur, ensuring that query matching not only relies on static text descriptions but also reflects current environmental changes, thereby improving the accuracy of responses to user queries and the real-time performance of the system.

[0101] In this way, indirect relationships between queries and events can be captured through multi-hop reasoning, including:

[0102] From the knowledge graph Select a path containing multiple entity nodes, where one path can be: query subject → event → related person → location, etc.

[0103] Get multi-hop reasoning score based on dynamic similarity :

[0104]

[0105] in, Indicates the The attenuation coefficient of the jump, Indicates time Next, user query With the path Entities The environmentally adjusted match, Indicates the number of hops in the path. It should be noted that multi-hop reasoning can discover the indirect relationship between the query and the event through the intermediate nodes, so as to understand the information in the public opinion event;

[0106] Then, we can score based on multi-hop reasoning Combined with data credibility (or other data information, such as contextual information), the final retrieval answer is generated through a large language model. ,For example:

[0107] The multi-hop reasoning score, data credibility, and contextual matching information are concatenated into a vector X. A latent state is then derived through a feedforward neural network. This latent state is then combined with the prompts from the large language model to generate the final answer text that matches the current public sentiment and query context. This solution does not go into detail here.

[0108] The present invention also provides a knowledge graph data intelligent retrieval system based on a large language model. The system is implemented according to the above method and will not be described in detail here.

[0109] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0110] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A knowledge graph data intelligent retrieval method based on a large language model, characterized by: The steps include: LLM and NLP methods are used to extract event-related entities and their semantic relationships from pre-processed public opinion data. Entities include events, people, places, and time. A knowledge graph is constructed, and semantic embedding vectors are generated for the input query and entity nodes in the knowledge graph. Time-dependent environmental features are incorporated into the entity representation, so that the matching between the query and entity nodes dynamically reflects changes in the external environment and events, including: The fusion function constructs time-dependent environmental factors based on the change rate of event semantic discreteness, the change rate of event propagation structure, the frequency of context switching, and the event conflict factor. The event conflict factor is constructed as follows: Introducing Mix The distribution model captures the positive and negative sentiment distributions in public opinion comments, and we have: Establish a sentiment score set, based on the skewness, fat tail and multi-peak characteristics of the sentiment score, and assume that the sentiment score is composed of multiple mixed Mixture of distribution models: Indicates sentiment score The overall probability density function of the variable, Indicates the The mixing weights of the components, represents the probability density function of the distribution, according to the degrees of freedom of the components , scale parameters and mean get; Calculate the posterior probability of the component based on the distribution probability density function, and use the posterior probability to determine whether the public opinion comment is a positive or negative sentiment distribution; Define a mapping function to map environmental factors into environmental embedding vectors, and combine them with semantic embedding vectors to construct dynamic similarity to respond to changes in the external environment and events; Calculate multi-hop reasoning scores based on dynamic similarity and multi-hop reasoning, and output retrieval answers in combination with a large language model; Event semantic discreteness change rate Calculation is performed according to the following relationship: Indicates the time window length, Indicates at time The semantic embedding vector of Indicates at time The semantic embedding vector of Context switching frequency : Indicates at time All public opinion data sets under and Respectively and The probability distribution of each public opinion data and topic in the public opinion data set at the moment, represents KL divergence; Event propagation structure change rate Representation propagation diagram Function to extract structural features.

2. The method for intelligent retrieval of knowledge graph data based on a large language model according to claim 1, characterized in that: The relationship defining the distribution probability density function is: represents the Gamma function, represents the normalization factor.

3. The method for intelligent retrieval of knowledge graph data based on a large language model according to claim 2, characterized in that: Using the expectation maximization algorithm to The parameters of the distribution model, including degrees of freedom, scale parameter and mean, are estimated and the optimal parameters are obtained by iterative optimization.

4. The method for intelligent retrieval of knowledge graph data based on a large language model according to claim 3 is characterized in that: The method for judging whether a public opinion comment is a positive emotion distribution or a negative emotion distribution by using posterior probability is: Sentiment score for each public opinion comment and each component , calculate the posterior probability : Indicates sentiment score The probability density function of , and obtain the posterior probability of the two components ; For each public opinion comment , according to its posterior probability Classify the emotion into positive or negative categories; Combined with kernel density estimation, we obtain the positive emotion probability distribution function and the negative emotion probability distribution function.

5. The method for intelligent retrieval of knowledge graph data based on a large language model according to claim 1, characterized in that: The method for constructing dynamic similarity by combining semantic embedding vectors is: Environmental factors Mapping to environment embedding vector ; Defining the dynamic similarity between query and entity nodes through cosine similarity Indicates a query, Represents an entity node, Indicates time.

6. The method for intelligent retrieval of knowledge graph data based on a large language model according to claim 5, characterized in that: The relationship formula for calculating the multi-hop reasoning score is: in, Indicates the The attenuation coefficient of the jump, Indicates time Next, user query With the path Entities The environmentally adjusted match, Indicates the number of hops in the path, Represents the multi-hop reasoning score.

7. The method for intelligent retrieval of knowledge graph data based on a large language model according to claim 1, characterized in that: The context switching frequency The construction method is: Label public opinion data with sentiment labels, including positive, negative, and neutral; Expand keyword set represents the similarity threshold, represents the initial keyword set, Indicates keywords, Indicates calculating the semantic similarity between keywords and public opinion data; Identify potential topics in public opinion data and analyze the frequency of context switching based on topic changes : Represents public opinion data Belong to the topic The probability distribution of Determining context switching frequency through probability distribution .

8. The knowledge graph data intelligent retrieval system is characterized by: The system is implemented according to the intelligent retrieval method for knowledge graph data based on a large language model according to any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Recommendation method fusing knowledge graph and sentiment analysis

    CN119397105A

  • Knowledge graph-based fuzzy matching method and apparatus, computer device, and storage medium

    WO2022142027A1