Public opinion information display method and system based on knowledge graph

Through natural language processing and semantic vector technology, the knowledge graph is constructed and updated, which solves the problem of low accuracy in displaying public opinion information and achieves accurate display of public opinion information and performance evaluation of the knowledge graph.

CN118260437BActive Publication Date: 2024-10-01CHINA NAT INST OF STANDARDIZATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410480051.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2024-10-01
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

The accuracy of public opinion information display in the existing technology is low, and nodes within the same target attribute value range cannot be effectively distinguished, resulting in inaccurate display of public opinion information.

Method used

Use natural language processing methods to perform entity recognition and relationship extraction, convert to triple format, evaluate entity correlation coefficients, build a knowledge graph, obtain semantic relationships between entities through semantic vectors, design a graph visualization interface, and regularly update the knowledge graph performance Evaluation index to improve the accuracy of public opinion information display.

Benefits of technology

The accuracy of the display of public opinion information is improved, and the performance and integrity of the knowledge graph are numerically evaluated to ensure the information integrity and coverage capabilities of the knowledge graph.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118260437B_ABST
    Figure CN118260437B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for displaying public opinion information based on a knowledge graph. The method for displaying public opinion information based on a knowledge graph includes the following steps: public opinion information collection; analysis and processing of public opinion information data source; knowledge graph construction; performance evaluation. The present invention obtains a public opinion information data source by collecting public opinion information and performs data cleaning and preprocessing, then performs entity recognition and relationship extraction and converts it into a triple format, and evaluates the entity data extracted from the public opinion information data source to obtain the entity association coefficient of the entity data, uses the results to construct a knowledge graph and design a visualization interface, and finally performs a performance evaluation on the knowledge graph, and regularly updates and maintains the data in the knowledge graph, thereby improving the accuracy of public opinion information display and solving the problem of low accuracy of public opinion information display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph technology, and in particular to a method and system for displaying public opinion information based on knowledge graph. Background Art

[0002] As knowledge graphs become one of the important knowledge representations in the era of big data, knowledge graphs have become an important branch technology of artificial intelligence by virtue of the advantages of correlation analysis between data. It is a structured semantic knowledge base used to describe concepts and their interrelationships in the physical world in symbolic form. In the face of complex network structures, knowledge graphs can integrate scattered information and knowledge into a structured knowledge base to facilitate machine understanding and application. Public opinion information is a description and reflection of public opinion. It refers to the information, news, information, intelligence, instructions, data and signals used to objectively reflect the state of public opinion and its movement in the process of collecting, sorting, analyzing, reporting, using and feedback of people's social and political attitudes. Online public opinion is the public's highly influential and biased speeches and opinions on certain hot and focal issues in real life that are spread through the Internet. Due to the characteristics of the Internet such as virtuality, concealment, divergence, penetration and randomness, more and more netizens are willing to express their opinions and spread their ideas through this channel. In the scenario of commercial public opinion monitoring, the public opinion targets to be analyzed and monitored exist in the form of points in the knowledge graph, while the relationships between them exist in the form of edges in the knowledge graph. By matching the information collected by the knowledge graph, we can directly perform fine-grained semantic understanding for any analysis intentions in the business needs of corporate customers.

[0003] In the prior art, by configuring numerical attributes, quickly mining the associations between nodes, and using the nodes in the knowledge graph to classify and highlight them, the efficiency of data mining processing is improved.

[0004] For example, the invention patent with announcement number CN112000718B discloses a knowledge graph display method, system, medium, and device based on attribute layout, including: loading a node table and an edge table configured with the numerical value of a target attribute to obtain the knowledge graph displayed in the current canvas; when loading the node table and the edge table, if the target attribute is a numerical attribute, the node table and the edge table are directly loaded; if the target attribute is not a numerical attribute, the target attribute of each node is first marked with a corresponding numerical value, and then the node table and the edge table configured with the numerical value of the target attribute are loaded; configuration is performed based on the target attribute, including the target attribute and the numerical value of the target attribute; all nodes belonging to the same target attribute numerical range are displayed separately from other nodes in the knowledge graph.

[0005] For example, the invention patent with announcement number: CN114398464B announces a method and system for displaying discussion data based on knowledge graph, including: obtaining expert discussion voice data, and performing speech recognition processing on the expert discussion voice data to obtain expert discussion text data; inputting the expert discussion text data into a trained vector extraction model to obtain a knowledge representation vector corresponding to the expert discussion text data; the expert discussion text data includes the discussion topic in the discussion process, the relevant knowledge required by the experts, and the relevant knowledge provided by the experts; matching the knowledge representation vector with a preset historical knowledge graph, and in the case of successful matching, displaying the matched historical knowledge graph; in the case of failed matching, constructing a new knowledge graph based on the expert discussion text data, merging the new knowledge graph with the historical knowledge graph, and displaying the new knowledge graph; wherein, in the process of matching the knowledge representation vector with the preset historical knowledge graph, obtaining the corresponding historical knowledge graph node according to the knowledge representation vector, and extracting the relevant historical knowledge graph according to the historical knowledge graph node.

[0006] However, the inventors of this application found that the above technology has at least the following technical problems in the process of implementing the technical solution of the invention in the embodiment of this application:

[0007] In the prior art, since the node table and edge table are loaded by judging whether the target attribute is a numerical attribute, and are configured based on the target attribute, all nodes belonging to the same target attribute numerical range are displayed separately from other nodes in the knowledge graph, resulting in the problem of low accuracy in the display of public opinion information. Summary of the invention

[0008] The embodiments of the present application solve the problem of low accuracy of public opinion information display in the prior art by providing a method and system for displaying public opinion information based on a knowledge graph, thereby improving the accuracy of public opinion information display.

[0009] An embodiment of the present application provides a method for displaying public opinion information based on a knowledge graph, comprising the following steps: S1, collecting corresponding public opinion information data from preset channels to obtain a public opinion information data source, and performing data cleaning and preprocessing, wherein the public opinion information data source is a collection of public opinion information data; S2, converting the results of entity recognition and relationship extraction of the public opinion information data source using a natural language processing method into a triple format, and obtaining the entity association coefficient of the entity data by evaluating the entity data extracted from the public opinion information data source, wherein the entity association coefficient is used to evaluate the degree of association between the entity data; S3, constructing a knowledge graph based on the entity association coefficient and the results of relationship extraction, and obtaining the semantic relationship between the entities of the knowledge graph through the semantic vector, while mapping the semantic relationship between entities to a low-dimensional vector space and designing a graph visualization interface; S4, performing a performance evaluation on the knowledge graph to obtain a knowledge graph performance evaluation index, and regularly updating and maintaining the data in the knowledge graph, wherein the knowledge graph performance evaluation index is used to evaluate the performance of the knowledge graph.

[0010] Furthermore, the specific steps of the relationship extraction are as follows: perform entity recognition on the public opinion information data source through natural language processing methods to obtain the entities of the public opinion information data source; train the relationship extraction model through supervision and in combination with training data, and the training data includes the entities of the public opinion information data source and the relationship labels between them; use the relationship extraction model to analyze the semantic relationships between the entities of the public opinion information data source and the relationships between the entities, identify the data relationships between the entities based on the semantic relationships, and classify the data relationships based on the attributes of the data relationships.

[0011] Furthermore, the conversion to triple format also includes testing the triple format, and the specific steps are as follows: obtaining test cases by analyzing the attributes of entity data and the results of relationship extraction and the relationship between the two, and importing the test cases into the knowledge graph; using the test cases to test in turn whether the entity data in the knowledge graph have corresponding relationship links and whether the representation methods of the same entity data and relationship extraction results are consistent and conform to the corresponding semantic relationship, and at the same time testing whether the converted triple format is missing; repairing problems found during the test and retesting until the requirements are met.

[0012] Furthermore, a specific method for obtaining the entity association coefficient is as follows: digitizing the results of entity recognition of the public opinion information data source to obtain public opinion information entity data, and dividing the public opinion information entity data into a first group of entity data groups and a second group of entity data groups according to attributes; calculating the corresponding standard deviation based on the first group of entity data groups and the second group of entity data groups; regularly monitoring the consistency of the association relationship in the knowledge graph, and determining whether there is inconsistency in the association relationship, if there is inconsistency in the association relationship, correcting and updating the data in the knowledge graph, otherwise obtaining the entity association coefficient of the entity data based on the first group of entity data groups and the second group of entity data groups and the corresponding standard deviation.

[0013] Furthermore, the specific method for obtaining the semantic relationship is as follows: construct a graph structure based on the knowledge graph nodes and knowledge graph edges, and assign a corresponding initial representation vector to each node based on the characteristics and attributes of the node, the knowledge graph nodes are the subject and object of the triple, and the knowledge graph edges are the predicate of the triple; represent the results of entity and relationship extraction in the knowledge graph as low-dimensional space vectors, and obtain semantic relationships based on the similarity between vectors; use the similarity between nodes and the attributes of the nodes to measure the node error to obtain the node loss function, and use the back propagation algorithm to minimize the node loss function until there is no error between the knowledge graph nodes.

[0014] Furthermore, the specific steps for obtaining the knowledge graph performance evaluation index are as follows: generating a labeled data set based on the public opinion information data source, the labeled data set including the labeling information of entities and relationships in the knowledge graph, and the labeled data set is used to evaluate the accuracy of knowledge graph relationship extraction; selecting a sample data set from the knowledge graph within an evaluation time period for comparison with the labeled data set to obtain the accuracy of the knowledge graph, and obtaining the update frequency of the knowledge graph based on the update speed of the sample data set within the evaluation time period, and obtaining the corresponding knowledge graph performance evaluation index in combination with the corresponding reference value and the integrity evaluation index, and the integrity evaluation index is used to evaluate the knowledge graph's coverage capability for the public opinion information data source.

[0015] Furthermore, the knowledge graph performance evaluation index is calculated using the following formula:

[0016] ,

[0017] In the formula, represents a natural constant, represents the knowledge graph performance evaluation index, represents the completeness assessment index, is the accuracy, is the update frequency, is the reference value of accuracy, is the reference value of the update frequency, is the correction factor of accuracy, is the correction factor for the update frequency.

[0018] Furthermore, the integrity assessment index is specifically obtained by the following method: counting the number of entities in the knowledge graph, and comparing the number of entities in the knowledge graph with the number of entities in the public opinion information to obtain the entity coverage rate, and the entity coverage rate is used to describe the proportional relationship between the number of entities contained in the knowledge graph and the number of entities in the actual public opinion information; counting the number of relationships in the knowledge graph, and comparing the number of relationships in the knowledge graph with the number of relationships in the public opinion information to obtain the relationship coverage rate, and the relationship coverage rate is used to describe the proportional relationship between the number of relationships contained in the knowledge graph and the number of relationships in the actual public opinion information; comparing and analyzing the data of the knowledge graph and the data source of the public opinion information to obtain the information missing situation and analyzing the information missing situation to obtain the information completeness rate, and combining the entity coverage rate threshold and the relationship coverage rate threshold to obtain the integrity assessment index of the knowledge graph, and the information completeness rate is used to evaluate the degree of information completeness in the knowledge graph.

[0019] Furthermore, the integrity assessment index is calculated using the following formula:

[0020] ,

[0021] In the formula, represents the entity coverage, represents the relationship coverage, represents the information completeness rate, is the entity coverage threshold, is the relationship coverage threshold, Represents a natural constant.

[0022] The embodiment of the present application provides a public opinion information display system based on a knowledge graph, including a public opinion information collection module, a public opinion information data source analysis and processing module, a knowledge graph construction module and a performance evaluation module; wherein the public opinion information collection module is used to collect corresponding public opinion information data from preset channels to obtain a public opinion information data source, and perform data cleaning and preprocessing, and the public opinion information data source is a collection of public opinion information data; the public opinion information data source analysis and processing module is used to convert the results of entity recognition and relationship extraction of the public opinion information data source using a natural language processing method into a triple format, and extract the entities extracted from the public opinion information data source by The entity association coefficient of the entity data is evaluated, and the entity association coefficient is used to evaluate the degree of association between entity data; the knowledge graph construction module is used to construct a knowledge graph based on the entity association coefficient and the result of relationship extraction, and obtain the semantic relationship between the entities of the knowledge graph through the semantic vector, and at the same time map the semantic relationship between entities to a low-dimensional vector space and design a graph visualization interface; the performance evaluation module is used to evaluate the performance of the knowledge graph to obtain a knowledge graph performance evaluation index, and regularly update and maintain the data in the knowledge graph, and the knowledge graph performance evaluation index is used to evaluate the performance of the knowledge graph.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0024] 1. Collect public opinion information to obtain the public opinion information data source and perform data cleaning and preprocessing. Then, perform entity recognition and relationship extraction and convert them into triple format. The entity data extracted from the public opinion information data source is evaluated to obtain the entity association coefficient of the entity data. The results are used to build a knowledge graph and design a visualization interface. Finally, the knowledge graph is evaluated for performance, and the data in the knowledge graph is regularly updated and maintained, thereby realizing the evaluation of the knowledge graph performance, and then realizing the improvement of the accuracy of public opinion information display, which effectively solves the problem of low accuracy of public opinion information display in the existing technology.

[0025] 2. Obtain annotated data sets by analyzing the public opinion information data source, select sample data sets from the knowledge graph, and then compare the sample data sets with the annotated data sets to obtain the accuracy and update frequency. Finally, combine the corresponding reference values ​​to obtain the knowledge graph performance evaluation index, thereby realizing the numerical evaluation of the knowledge graph performance, and then realizing a more accurate evaluation of the knowledge graph performance.

[0026] 3. The entity coverage rate is obtained by comparing the number of entities in the knowledge graph with the number of entities in the public opinion information, and the relationship coverage rate is obtained by comparing the number of relationships in the knowledge graph with the number of relationships in the public opinion information. The corresponding information completeness rate is obtained in combination with the information missing situation. Finally, the integrity of the knowledge graph is evaluated by calculating the integrity evaluation index, thereby realizing the numerical evaluation of the integrity of the knowledge graph, and then realizing a more accurate evaluation of the integrity of the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A flowchart of a method for displaying public opinion information based on a knowledge graph provided in an embodiment of the present application;

[0028] Figure 2 A diagram of the process of extracting the relationship between public opinion information data sources provided in the embodiment of the present application;

[0029] Figure 3 A schematic diagram of the structure of the public opinion information display system based on the knowledge graph provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] The embodiments of the present application solve the problem of low accuracy of public opinion information display in the prior art by providing a public opinion information display method and system based on a knowledge graph. The public opinion information data source is obtained by collecting corresponding public opinion information data from preset channels, and data cleaning and preprocessing are performed. The results of entity recognition and relationship extraction of the public opinion information data source using a natural language processing method are converted into a triple format. The entity association coefficient of the entity data is obtained by evaluating the entity data extracted from the public opinion information data source. A knowledge graph is constructed based on the entity association coefficient and the results of relationship extraction. The semantic relationship between entities in the knowledge graph is obtained through a semantic vector. At the same time, the semantic relationship between entities is mapped to a low-dimensional vector space and a graph visualization interface is designed. Finally, the knowledge graph is performance evaluated to obtain a knowledge graph performance evaluation index. The data in the knowledge graph is regularly updated and maintained, thereby improving the accuracy of public opinion information display.

[0031] The technical solution in the embodiment of the present application is to solve the problem of low accuracy of public opinion information display. The overall idea is as follows:

[0032] By collecting public opinion information, we obtain the public opinion information data source and perform data cleaning and preprocessing, then perform entity recognition and relationship extraction and convert them into triple format, and evaluate the entity data extracted from the public opinion information data source to obtain the entity association coefficient of the entity data. The results of entity recognition and relationship extraction are used to construct a knowledge graph and design a visualization interface. Finally, the knowledge graph is evaluated for performance, and the data in the knowledge graph is regularly updated and maintained, thereby improving the accuracy of public opinion information display.

[0033] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0034] like Figure 1 As shown, it is a flowchart of the public opinion information display method based on the knowledge graph provided in an embodiment of the present application, and the method includes the following steps: S1, collecting corresponding public opinion information data from preset channels to obtain a public opinion information data source, and performing data cleaning and preprocessing, the public opinion information data source is a collection of public opinion information data; S2, converting the results of entity recognition and relationship extraction of the public opinion information data source using a natural language processing method into a triple format, and obtaining the entity association coefficient of the entity data by evaluating the entity data extracted from the public opinion information data source, and the entity association coefficient is used to evaluate the degree of association between entity data; S3, constructing a knowledge graph based on the entity association coefficient and the results of relationship extraction, and obtaining the semantic relationship between entities of the knowledge graph through semantic vectors, and mapping the semantic relationship between entities to a low-dimensional vector space and designing a graph visualization interface; S4, performing performance evaluation on the knowledge graph to obtain a knowledge graph performance evaluation index, and regularly updating and maintaining the data in the knowledge graph, and the knowledge graph performance evaluation index is used to evaluate the performance of the knowledge graph.

[0035] In this embodiment, the public opinion information data is data on public views, comments, emotions and opinions collected and analyzed from the Internet, social media, news and forum channels. Specifically, more data can be collected for analysis based on actual conditions, thereby improving the accuracy of public opinion information display.

[0036] Further, such as Figure 2 As shown, it is a process diagram of the relationship extraction of the public opinion information data source provided in an embodiment of the present application, and the specific steps of the relationship extraction are as follows: the public opinion information data source is subjected to entity recognition through a natural language processing method to obtain the entities of the public opinion information data source; the relationship extraction model is trained through a supervised method in combination with training data, and the training data includes the entities of the public opinion information data source and the relationship labels between them; the relationship extraction model is used to analyze the semantic relationships between the entities of the public opinion information data source and the relationships between the entities, and the data relationships between the entities are identified based on the semantic relationships and the data relationships are classified based on the attributes of the data relationships.

[0037] In this embodiment, entities include people, organizations, and places; the relationship extraction model is a machine learning model used to extract the relationships between entities from unstructured or semi-structured data, and represent these relationships as entity-relationship triples, that is, in the form of subject, relationship, and object; relationship extraction can extract entities and relationships between entities in the text, thereby forming a structured knowledge representation, which can be used for many natural language processing tasks, such as question-answering systems, information retrieval, etc.; relationship extraction can help identify key information in the text, thereby improving the effectiveness of information retrieval and recommendation systems. By understanding the relationships between entities, the text content can be better understood, thereby improving the relevant Relationship extraction helps to understand the semantic relationships in text, such as the causal relationship between events, the connection between entities, etc., which helps machines better understand the meaning of human language, thereby improving the performance of natural language processing systems; relationship extraction can help identify events in text and the relationship between events, thereby supporting event extraction and text summarization tasks. By extracting the relationship between events, we can better understand the topic and structure of the text, thereby generating a more accurate and complete summary; based on the extracted relationships, we can perform knowledge reasoning and inference, discover new facts or infer hidden information, and build a more intelligent and flexible natural language processing system.

[0038] Furthermore, after conversion to the triple format, it also includes testing the triple format, and the specific steps are as follows: obtain test cases by analyzing the attributes of the entity data and the results of the relationship extraction and the relationship between the two, and import the test cases into the knowledge graph; use the test cases to test in turn whether the entity data in the knowledge graph have corresponding relationship links and whether the representation methods of the same entity data and relationship extraction results are consistent and conform to the corresponding semantic relationship, and at the same time test whether the converted triple format is missing; repair the problems found during the test and retest until the requirements are met.

[0039] In this embodiment, the representation of triples is very concise and clear, consisting of three parts, which respectively represent the relationship between the subject, the predicate and the object. This simplicity allows knowledge to be effectively stored and expressed in a structured manner; triples present the relationship between entities in a structured form. By representing knowledge in the form of triples, the attributes of entities and the relationship between entities can be clearly described, making knowledge easier to understand and manage; the structure of triples makes it very flexible and can adapt to various types of knowledge representation and query requirements. Different predicates can represent different types of relationships, and different entities can appear as subjects or objects in different triples; the knowledge graph can continuously expand and enrich the knowledge base by continuously adding new triples, and new facts can be added in the form of new triples, making the knowledge graph more comprehensive and complete; each part of the triple has a clear semantic meaning, the subject represents the entity, the predicate represents the relationship or attribute, and the object represents the end point of the relationship or the attribute value, making the query and reasoning of the knowledge graph more accurate and reliable.

[0040] Furthermore, a specific method for obtaining the entity association coefficient is as follows: digitize the results of entity recognition of the public opinion information data source to obtain public opinion information entity data, and divide the public opinion information entity data into a first entity data group and a second entity data group according to attributes; calculate the corresponding standard deviation based on the first entity data group and the second entity data group; regularly monitor the consistency of the association relationship in the knowledge graph, and determine whether there is any inconsistency in the association relationship. If there is any inconsistency in the association relationship, correct and update the data in the knowledge graph, otherwise obtain the entity association coefficient of the entity data based on the first entity data group and the second entity data group and the corresponding standard deviation.

[0041] In this embodiment, the entity relevance coefficient of the entity data can be obtained by natural language processing method, and can also be calculated more accurately. The entity relevance coefficient of the entity data is calculated by the following formula:

[0042] ,

[0043] In the formula, The entity association coefficient representing the entity data, Indicates the entity data number, , Indicates the total number of entity data. Indicates the first entity data group Entity data, Indicates the first Entity data, is the standard deviation of the first entity data set, The standard deviation of the second group of entity data is used to realize the numerical analysis of the degree of association of entity data.

[0044] Furthermore, the specific method for obtaining semantic relations is as follows: construct a graph structure based on knowledge graph nodes and knowledge graph edges, and assign a corresponding initial representation vector to each node based on the characteristics and attributes of the node, the knowledge graph nodes are the subject and object of the triple, and the knowledge graph edges are the predicate of the triple; represent the results of entity and relationship extraction in the knowledge graph as low-dimensional space vectors, and obtain semantic relations based on the similarity between vectors; use the similarity between nodes and the attributes of the nodes to measure the node error to obtain the node loss function, and use the back propagation algorithm to minimize the node loss function until there is no error between the knowledge graph nodes.

[0045] In this embodiment, the tools and functions provided by the deep learning framework are used to obtain and calculate the loss function. At the same time, the back propagation algorithm is a commonly used neural network learning algorithm. Its core principle is to use the chain rule to calculate the gradients of various parameters in the network and update the parameters according to these gradients; the back propagation algorithm needs to input a set of training samples, calculate the output results through forward propagation, and then compare the actual output with the expected output to calculate the error; the error is transferred from the output layer to the input layer layer by layer, the error of each neuron is calculated, and the gradient of each weight is obtained using the chain derivation rule; according to the calculated gradient, the network parameters are updated using an optimization algorithm; by continuously iterating the above process, the back propagation algorithm can gradually adjust the weights of the neural network so that the output of the network gradually approaches the expected output, thereby improving the prediction accuracy and performance of the neural network; in addition, the performance and efficiency of the back propagation algorithm will also be affected by many factors, including network structure, activation function, optimization algorithm, etc. In practical applications, it is necessary to select and adjust according to specific problems and needs; the loss function is minimized.

[0046] Furthermore, the specific steps for obtaining the knowledge graph performance evaluation index are as follows: generate a labeled data set based on the public opinion information data source, the labeled data set includes the labeling information of entities and relationships in the knowledge graph, and the labeled data set is used to evaluate the accuracy of knowledge graph relationship extraction; select a sample data set from the knowledge graph within the evaluation time period to compare with the labeled data set to obtain the accuracy of the knowledge graph, and obtain the update frequency of the knowledge graph based on the update speed of the sample data set within the evaluation time period, and at the same time combine the corresponding reference value and the integrity evaluation index to obtain the corresponding knowledge graph performance evaluation index, and the integrity evaluation index is used to evaluate the knowledge graph's coverage of the public opinion information data source.

[0047] In this embodiment, the knowledge graph will be updated as the public opinion information data source is updated. The update frequency of the knowledge graph can be obtained by evaluating the update speed of the sample data set. The generation of annotated data sets from the public opinion information data source is a process involving data collection, processing, annotation and organization, which aims to provide high-quality data support for public opinion analysis, monitoring or related machine learning models. According to the needs of public opinion analysis, clear annotation specifications are formulated. For example, different sentiment tendencies, topic classifications and opinion identification labels can be defined. Detailed annotation guidelines can be formulated to clarify annotation standards and operating procedures. Professional annotation tools or platforms are needed to annotate the preprocessed data. Manual annotation or machine-assisted annotation can be used to ensure the accuracy and consistency of the annotation. At the same time, the annotation results need to be quality checked to correct erroneous or inconsistent annotations. A high-quality public opinion information annotation data set is generated to achieve the continuous and effective operation of the knowledge graph.

[0048] Furthermore, in addition to being obtained by comparing the knowledge graph performance evaluation index with other similar graphs, a more accurate calculation can be performed. The knowledge graph performance evaluation index is calculated using the following formula:

[0049] ,

[0050] In the formula, represents a natural constant, represents the knowledge graph performance evaluation index, represents the completeness assessment index, is the accuracy, is the update frequency, is the reference value of accuracy, is the reference value of the update frequency, is the correction factor of accuracy, is the correction factor for the update frequency.

[0051] In this embodiment, the evaluation of the knowledge graph generally considers precision and update frequency, and in actual situations, it can be considered to be combined with recall rate and coverage. In the knowledge graph, precision reflects the accuracy of the information provided by the graph. The higher the precision, the more accurate the results returned by the graph and the lower the possibility of false alarms. The recall reflects the ability of the graph to find all relevant information. The higher the recall, the more comprehensive the graph can find relevant information and the lower the possibility of missed reports. A high update frequency means that the graph can reflect changes in the real world more quickly, thereby providing users with more accurate information. A knowledge graph with a wide coverage can provide more comprehensive information, which helps users to understand and analyze various topics and issues more deeply. The size of the coverage depends on factors such as the construction method of the graph, the data source, and the maintenance strategy. These four indicators jointly determine the performance and practicality of the knowledge graph. In practical applications, it is necessary to balance these four indicators according to specific needs to achieve the best effect. For example, in some scenarios, more attention may be paid to precision to ensure the accuracy of the returned results; while in other scenarios, more attention may be paid to recall to find all relevant information as much as possible, thereby improving the timeliness of the knowledge graph.

[0052] Furthermore, the integrity assessment index is obtained specifically through the following method: counting the number of entities in the knowledge graph, and comparing the number of entities in the knowledge graph with the number of entities in the public opinion information to obtain the entity coverage rate, which is used to describe the proportional relationship between the number of entities contained in the knowledge graph and the number of entities in the actual public opinion information; counting the number of relationships in the knowledge graph, and comparing the number of relationships in the knowledge graph with the number of relationships in the public opinion information to obtain the relationship coverage rate, which is used to describe the proportional relationship between the number of relationships contained in the knowledge graph and the number of relationships in the actual public opinion information; comparing and analyzing the data of the knowledge graph and the data source of the public opinion information to obtain the information missing situation and analyzing the information missing situation to obtain the information completeness rate, and combining the entity coverage rate threshold and the relationship coverage rate threshold to obtain the integrity assessment index of the knowledge graph, and the information completeness rate is used to evaluate the degree of information completeness in the knowledge graph.

[0053] In this embodiment, the information completeness, entity coverage and relationship coverage of the knowledge graph are important indicators for evaluating the quality of the knowledge graph; the higher the entity coverage, the more extensive the graph contains entity types and information, and the better it can meet the needs of user queries and reasoning. Improving entity coverage usually requires increasing data sources, optimizing entity extraction and links, and other methods to achieve this; the higher the relationship coverage, the tighter and more complete the connections between entities in the graph, and the better it can describe and express the complexity and diversity of the real world. Improving relationship coverage requires attention to the extraction and representation of relationships between entities, as well as the expansion and fusion of the graph; the higher the information completeness, the more blank or unfilled parts there are in the graph, which may affect the use value and accuracy of the graph. Reducing the information completeness is one of the keys to improving the quality of the knowledge graph; the quality of the knowledge graph is improved.

[0054] Furthermore, in addition to being obtained through entity and relationship coverage analysis, the integrity assessment index can also be calculated more accurately. The integrity assessment index is calculated using the following formula:

[0055] ,

[0056] In the formula, represents the entity coverage, represents the relationship coverage, represents the information completeness rate, is the entity coverage threshold, is the relationship coverage threshold, Represents a natural constant.

[0057] In this embodiment, the integrity of the knowledge graph as a collection of information is directly related to the accuracy and reliability of the information provided. Through integrity assessment, it can be ensured that the information covered in the graph is comprehensive, reducing misunderstandings or wrong decisions caused by missing information; for users who rely on knowledge graphs for query, reasoning or analysis, the integrity of the graph directly affects the user experience. A complete knowledge graph can provide richer and more accurate information to meet the diverse needs of users, thereby improving user satisfaction; in many fields, such as finance, medical care, education, etc., knowledge graphs are widely used to assist decision-making. A complete knowledge graph can provide more comprehensive data support to help decision makers grasp the situation more accurately and formulate more reasonable strategies; through integrity assessment, problems and deficiencies in the construction process of the knowledge graph can be discovered, providing direction for subsequent optimization and development. This helps to continuously improve the structure and content of the graph and improve the overall quality of the graph; the information in the real world is constantly changing, and the knowledge graph needs to be continuously updated to adapt to this change. The integrity assessment can help discover outdated or missing information that may exist in the graph, so as to update and supplement it in time to maintain the timeliness and accuracy of the graph; through integrity assessment, the numerical evaluation of the integrity of the knowledge graph is realized.

[0058] like Figure 3 As shown, it is a structural schematic diagram of the public opinion information display system based on the knowledge graph provided in the embodiment of the present application. The public opinion information display system based on the knowledge graph provided in the embodiment of the present application includes a public opinion information collection module, a public opinion information data source analysis and processing module, a knowledge graph construction module and a performance evaluation module; wherein the public opinion information collection module is used to collect corresponding public opinion information data from preset channels to obtain a public opinion information data source, and perform data cleaning and preprocessing, and the public opinion information data source is a collection of public opinion information data; the public opinion information data source analysis and processing module is used to convert the results of entity recognition and relationship extraction of the public opinion information data source using a natural language processing method into a triple format , and obtain the entity association coefficient of the entity data by evaluating the entity data extracted from the public opinion information data source. The entity association coefficient is used to evaluate the degree of association between entity data; the knowledge graph construction module is used to construct a knowledge graph based on the entity association coefficient and the results of relationship extraction, and obtain the semantic relationship between the entities of the knowledge graph through the semantic vector, and at the same time map the semantic relationship between entities to a low-dimensional vector space and design a graph visualization interface; the performance evaluation module is used to evaluate the performance of the knowledge graph to obtain the knowledge graph performance evaluation index, and regularly update and maintain the data in the knowledge graph. The knowledge graph performance evaluation index is used to evaluate the performance of the knowledge graph.

[0059] In this embodiment, public opinion information often involves multiple entities, events, and topics, and the relationships between them are intricate. The knowledge graph can intuitively display the relationships between these entities in a graphical way, helping users quickly understand the overall structure and context of public opinion information; through the knowledge graph, hidden associations and patterns in public opinion information can be discovered. For example, the co-occurrence relationship between different entities and the causal relationship between events can be analyzed, so as to dig out deeper public opinion dynamics and trends; the knowledge graph can structure the entities, events, and topics in the public opinion information, making the retrieval based on these elements more efficient and accurate, and users can quickly and easily understand the overall structure and context of public opinion information. By querying specific entities or events, relevant public opinion information can be quickly obtained, thereby improving the efficiency of information retrieval; knowledge graphs can help analysts understand the public opinion situation more comprehensively, discover key issues and hot topics, and through the analysis of entities and relationships in the graph, the evolution process of public opinion events, the scope of influence, and the attitudes of all parties can be revealed, providing strong support for decision-making; the visual display of the knowledge graph makes public opinion information more vivid and easy to understand. Users can explore different parts of the graph through interactive operations such as zooming in, zooming out, and dragging, and gain an in-depth understanding of the details and background of the public opinion information; a more intuitive and accurate display of public opinion information is achieved.

[0060] The technical solution in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: Compared with the knowledge graph display method and system, medium, and device based on attribute layout announced by the invention patent with announcement number: CN112000718B, the embodiment of the present application obtains a labeled data set by analyzing the public opinion information data source, and then selects a sample data set from the knowledge graph, and then compares the sample data set with the labeled data set to obtain the accuracy and update frequency, and finally obtains the knowledge graph performance evaluation index in combination with the corresponding reference value, thereby realizing the numerical evaluation of the knowledge graph performance, and then realizing a more accurate evaluation of the knowledge graph performance. Estimate; relative to the invention patent announcement with announcement number: CN114398464B, a method and system for displaying discussion data based on a knowledge graph, the embodiment of the present application obtains the entity coverage rate by comparing the number of entities in the knowledge graph with the number of entities in the public opinion information, and then obtains the relationship coverage rate by comparing the number of relations in the knowledge graph with the number of relations in the public opinion information, and obtains the corresponding information completeness rate in combination with the information missing situation, and finally evaluates the integrity of the knowledge graph by calculating the integrity evaluation index, thereby realizing the numerical evaluation of the integrity of the knowledge graph, and then realizing a more accurate evaluation of the integrity of the knowledge graph.

[0061] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0062] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0063] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0064] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0065] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0066] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. The method for displaying public opinion information based on knowledge graph is characterized by: The following steps are involved: S1, collecting corresponding public opinion information data from preset channels to obtain a public opinion information data source, and performing data cleaning and preprocessing, wherein the public opinion information data source is a collection of public opinion information data; S2, converting the results of entity recognition and relationship extraction of the public opinion information data source using a natural language processing method into a triple format, and obtaining an entity association coefficient of the entity data by evaluating the entity data extracted from the public opinion information data source, wherein the entity association coefficient is used to evaluate the degree of association between the entity data; S3, builds a knowledge graph based on the entity association coefficient and the results of relationship extraction, and obtains the semantic relationship between entities in the knowledge graph through semantic vectors. At the same time, the semantic relationship between entities is mapped to a low-dimensional vector space and a graph visualization interface is designed; S4, performing performance evaluation on the knowledge graph to obtain a knowledge graph performance evaluation index, and regularly updating and maintaining data in the knowledge graph, wherein the knowledge graph performance evaluation index is used to evaluate the performance of the knowledge graph; The specific steps for obtaining the knowledge graph performance evaluation index are as follows: Generate a labeled data set based on the public opinion information data source, wherein the labeled data set includes labeled information of entities and relationships in the knowledge graph, and the labeled data set is used to evaluate the accuracy of knowledge graph relationship extraction; Select a sample data set from the knowledge graph within the evaluation period to compare with the annotated data set to obtain the accuracy of the knowledge graph, and obtain the update frequency of the knowledge graph according to the update speed of the sample data set within the evaluation period. At the same time, combine the corresponding reference value and the integrity evaluation index to obtain the corresponding knowledge graph performance evaluation index. The integrity evaluation index is used to evaluate the knowledge graph's coverage of public opinion information data sources; The knowledge graph performance evaluation index is calculated using the following formula: Where, e represents a natural constant, XQ represents a knowledge graph performance evaluation index, WQ represents a completeness evaluation index, G1 represents the precision, G2 represents the update frequency, G′1 represents the reference value of the precision, G′2 represents the reference value of the update frequency, α1 represents the correction factor of the precision, and α2 represents the correction factor of the update frequency; The integrity assessment index is specifically obtained by the following method: Count the number of entities in the knowledge graph, and compare the number of entities in the knowledge graph with the number of entities in the public opinion information to obtain the entity coverage rate, which is used to describe the proportional relationship between the number of entities contained in the knowledge graph and the number of entities in the actual public opinion information; Count the number of relations in the knowledge graph, and compare the number of relations in the knowledge graph with the number of relations in the public opinion information to obtain the relation coverage rate, which is used to describe the proportional relationship between the number of relations contained in the knowledge graph and the number of relations in the actual public opinion information; Compare and analyze the data of the knowledge graph and the data source of public opinion information to obtain the information missing situation and analyze the information missing situation to obtain the information completeness rate. At the same time, combine the entity coverage rate threshold and the relationship coverage rate threshold to obtain the knowledge graph integrity evaluation index. The information completeness rate is used to evaluate the degree of information completeness in the knowledge graph. The integrity assessment index is calculated using the following formula: In the formula, R represents entity coverage, S represents relationship coverage, T represents information completeness, R0 represents entity coverage threshold, S0 represents relationship coverage threshold, e represents a natural constant.

2. The method for displaying public opinion information based on knowledge graph according to claim 1, characterized in that: The specific steps of the relationship extraction are as follows: Perform entity recognition on the public opinion information data source through natural language processing methods to obtain the entity of the public opinion information data source; The relationship extraction model is trained by using a supervised method and combined with training data, wherein the training data includes entities of the public opinion information data source and relationship labels between them; The relationship extraction model is used to analyze the semantic relationships between entities and the relationships between entities in the public opinion information data source, identify the data relationships between entities based on the semantic relationships, and classify the data relationships based on the attributes of the data relationships.

3. The method for displaying public opinion information based on knowledge graph as claimed in claim 1, characterized in that: The conversion to the triplet format also includes testing the triplet format, and the specific steps are as follows: Obtain test cases by analyzing the attributes of entity data, the results of relationship extraction, and the relationship between the two, and import the test cases into the knowledge graph; Use test cases to test whether the entity data in the knowledge graph has corresponding relationship links, whether the representation methods of the same entity data and relationship extraction results are consistent and conform to the corresponding semantic relationship, and test whether the converted triple format is missing; Fix any problems found during testing and retest until the requirements are met.

4. The method for displaying public opinion information based on knowledge graph according to claim 1, characterized in that: The specific method for obtaining the entity association coefficient is as follows: The results of entity recognition of the public opinion information data source are processed into data to obtain public opinion information entity data, and the public opinion information entity data is divided into a first entity data group and a second entity data group according to attributes; Calculate corresponding standard deviations according to the first set of entity data and the second set of entity data; Regularly monitor the consistency of the association relationships in the knowledge graph and determine whether there are inconsistencies in the association relationships. If there are inconsistencies in the association relationships, correct and update the data in the knowledge graph. Otherwise, obtain the entity association coefficient of the entity data based on the first set of entity data and the second set of entity data and the corresponding standard deviation.

5. The method for displaying public opinion information based on knowledge graph as claimed in claim 1, characterized in that: The specific method for obtaining the semantic relationship is as follows: Constructing a graph structure according to knowledge graph nodes and knowledge graph edges, and assigning a corresponding initial representation vector to each node based on the features and attributes of the node, wherein the knowledge graph nodes are the subject and object of the triples, and the knowledge graph edges are the predicates of the triples; The results of entity and relationship extraction in the knowledge graph are represented as low-dimensional space vectors, and semantic relationships are obtained based on the similarity between vectors; The node error is measured by using the similarity between nodes and the attributes of the nodes to obtain the node loss function, and the back propagation algorithm is used to minimize the node loss function until there is no error between the knowledge graph nodes.

6. A public opinion information display system based on knowledge graph, used to execute the public opinion information display method based on knowledge graph according to any one of claims 1 to 5, characterized in that: include: Public opinion information collection module, public opinion information data source analysis and processing module, knowledge graph construction module and performance evaluation module; The public opinion information collection module is used to collect corresponding public opinion information data from preset channels to obtain a public opinion information data source, and perform data cleaning and preprocessing, wherein the public opinion information data source is a collection of public opinion information data; The public opinion information data source analysis and processing module is used to convert the results of entity recognition and relationship extraction of the public opinion information data source using the natural language processing method into a triple format, and to obtain the entity association coefficient of the entity data by evaluating the entity data extracted from the public opinion information data source, and the entity association coefficient is used to evaluate the degree of association between entity data; The knowledge graph construction module is used to construct a knowledge graph based on the entity association coefficient and the results of relationship extraction, and obtain the semantic relationship between entities in the knowledge graph through semantic vectors, while mapping the semantic relationship between entities into a low-dimensional vector space and designing a graph visualization interface; The performance evaluation module is used to perform performance evaluation on the knowledge graph to obtain a knowledge graph performance evaluation index, and to regularly update and maintain the data in the knowledge graph. The knowledge graph performance evaluation index is used to evaluate the performance of the knowledge graph.