Public opinion early warning method and device based on knowledge graph, equipment and storage medium

By constructing a knowledge graph based on knowledge graph, the problem of insufficient public opinion warning understanding ability in the existing technology is solved, and the fine-grained classification and identification of public opinion data is realized, and the accuracy and flexibility of early warning are improved.

CN120106089APending Publication Date: 2025-06-06BEIJING ZHIHUI XINGGUANG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510110120.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In the existing technology, the ability to understand public opinion early warning methods is weak and it is impossible to classify and identify public opinion data in a fine-grained manner.

Method used

Using a knowledge graph-based method, by obtaining keyword data, early warning example data and encyclopedia data, basic concepts and event concepts are extracted, and early warning knowledge graph is constructed through concept mining and association relationships, thereby conducting public opinion warning.

Benefits of technology

It improves the accuracy and fine-grainedness of public opinion warnings, can more accurately identify and interpret early warning results, and enhances the flexibility and adaptability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106089A_ABST
    Figure CN120106089A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of public opinion analysis, and discloses a public opinion early warning method, device and equipment based on a knowledge graph and a storage medium, and the method comprises the steps: obtaining keyword data, early warning instance data and encyclopedia data corresponding to different public opinion targets; constructing an early warning knowledge graph based on the data; determining a trigger word and an entity object representing / triggering a specific event from the to-be-queried data, and searching in the early warning knowledge graph based on the trigger word and the entity object to obtain a concept sub-graph; and converting the concept subgraph into a descriptive language, inputting the descriptive language as supplementary knowledge and the to-be-queried data into a preset public opinion target early warning model, and determining a public opinion early warning result of the to-be-queried data. According to the method, the early warning result is converted into fine-grained semantic extraction in an event mode and a multi-dimensional mode, so that each early warning point is interpretable, multi-dimensional attributes are included, reuse and screening are convenient, and downstream tasks can be conveniently analyzed and used in a finer and wider mode through the multi-dimensional result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of public opinion analysis, and in particular to a public opinion early warning method, device, equipment and storage medium based on a knowledge graph. Background Art

[0002] Public opinion is the sum of various emotions, attitudes and opinions held by the public in various social groups in a certain social space regarding hot events, specific issues and social phenomena. Public opinion is generated around specific topics, and the evolution of public opinion often changes with the development of topics. By using data analysis to discover changes in topics, predict the development and changes of public opinion in the future, and track and analyze them, it is convenient to prevent the occurrence of sudden events.

[0003] In the current field of public opinion warning, the most commonly used warning method is still "text classification + rules + dictionary". This solution is still a relatively shallow semantic analysis, without a deep understanding of the core semantics of the text. In addition, the general public opinion dictionary is still flat one-dimensional data, which is only responsible for recalling data and cannot parse the real warning intention. The result of the classification model only determines whether a warning is needed and cannot give more explanations. Summary of the invention

[0004] In view of this, the present invention provides a public opinion warning method, device, equipment and storage medium based on knowledge graph to solve the problem that the public opinion warning method in the related technology has weak understanding ability and cannot perform fine-grained classification and identification of public opinion data.

[0005] In a first aspect, the present invention provides a public opinion early warning method based on a knowledge graph, the method comprising:

[0006] Obtain keyword data, warning instance data, and encyclopedia data corresponding to different public opinion targets;

[0007] Extracting basic concepts that match the public opinion target from the keyword data, and performing concept mining based on the keyword data, warning instance data, and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts;

[0008] Combining the basic concepts and event concepts to generate a compound event concept, and determining the association relationship between the basic concepts, non-concept words, event concepts and compound event concepts based on the warning instance data;

[0009] Extracting instance events related to event concepts from the warning instance data, and establishing association relationships between the instance events and the basic concepts, non-concept words, event concepts, and compound event concepts;

[0010] The early warning knowledge graph is constructed with basic concepts, non-concept words, event concepts, compound event concepts and instance events as nodes, and the associations between basic concepts, non-concept words, event concepts, compound event concepts and instance events as edges;

[0011] Determine trigger words and entity objects representing / triggering specific events from the data to be queried, and search the early warning knowledge graph based on the trigger words and the entity objects to obtain a concept subgraph;

[0012] After converting the concept subgraph into descriptive language, the concept subgraph is input into a preset public opinion target warning model together with the data to be queried as supplementary knowledge, so that the preset public opinion target warning model analyzes the data to be queried based on the supplementary knowledge and determines the public opinion warning result of the data to be queried.

[0013] In an optional implementation, the concept mining based on keyword data, warning instance data and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts include:

[0014] The keyword data, warning instance data and encyclopedia data are processed by word segmentation, high-frequency word mining, new word discovery and entity classification to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in the expression of the basic concepts.

[0015] In an optional implementation, the determining the association relationship between the basic concepts, non-concept words, event concepts and compound event concepts based on the warning instance data includes:

[0016] Based on the warning instance data, synonym / hypernym relationships among basic concepts, non-concept words, event concepts and compound event concepts are determined.

[0017] In an optional implementation, the establishing of the association relationship between the instance event and the basic concept, the non-concept word, the event concept and the compound event concept includes:

[0018] Establish the hierarchical relationship, location relationship, event inclusion relationship and co-occurrence relationship between the instance event and the basic concepts, non-concept words, event concepts and compound event concepts.

[0019] In an optional implementation, the step of searching the early warning knowledge graph based on the trigger word and the entity object to obtain a concept subgraph includes:

[0020] Based on the trigger word and the entity object, a target event concept and a target basic concept are obtained by searching in the warning knowledge graph;

[0021] Adjacent nodes having association relationships with target event concepts and target basic concepts are searched from the warning knowledge graph to obtain a concept subgraph.

[0022] In an optional implementation, converting the concept subgraph into a descriptive language includes:

[0023] Performing text matching on the concept subgraph to determine the target event concept contained in the data to be queried;

[0024] Event attributes are extracted from the target event concept to obtain descriptive language.

[0025] In an optional implementation, the public opinion target warning model analyzes the data to be queried based on the supplementary knowledge to determine the public opinion warning result of the data to be queried, including:

[0026] The preset public opinion target warning model analyzes the target supplementary knowledge in the supplementary knowledge corresponding to the data to be queried; determines the warning public opinion target based on the event attribute corresponding to the target supplementary knowledge; and generates the public opinion warning result of the data to be queried based on the warning public opinion target and the target supplementary knowledge.

[0027] In a second aspect, the present invention provides a public opinion early warning device based on a knowledge graph, comprising:

[0028] The acquisition module is used to obtain keyword data, warning instance data and encyclopedia data corresponding to different public opinion targets;

[0029] The first processing module is used to extract basic concepts that meet the public opinion target from the keyword data, and perform concept mining based on the keyword data, warning instance data and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts;

[0030] A second processing module is used to combine the basic concepts and event concepts to generate a compound event concept, and determine the association relationship between the basic concepts, non-concept words, event concepts and compound event concepts based on the warning instance data;

[0031] The third processing module is used to extract instance events related to event concepts from the warning instance data, and establish association relationships between the instance events and the basic concepts, non-concept words, event concepts and compound event concepts;

[0032] The fourth processing module is used to construct an early warning knowledge graph with basic concepts, non-concept words, event concepts, compound event concepts and instance events as nodes and with the associations between basic concepts, non-concept words, event concepts, compound event concepts and instance events as edges;

[0033] A fifth processing module is used to determine the trigger words and entity objects representing / triggering the specific event from the data to be queried, and search the early warning knowledge graph based on the trigger words and the entity objects to obtain a concept subgraph;

[0034] The sixth processing module is used to convert the concept sub-graph into a descriptive language and input it into a preset public opinion target warning model together with the data to be queried as supplementary knowledge, so that the preset public opinion target warning model analyzes the data to be queried based on the supplementary knowledge and determines the public opinion warning results of the data to be queried.

[0035] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method provided in the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0036] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method provided in the first aspect or any corresponding embodiment thereof.

[0037] Beneficial effects:

[0038] The present invention uses the keywords of each public opinion target to extract the basic concepts of the public opinion target, and then performs concept mining based on keyword data, warning instance data and encyclopedia data to obtain event concepts and non-concept words related to the public opinion target, and forms a composite event concept by combining the basic concepts and event concepts, and determines the association between each concept. By extracting instance events related to the event concept from the warning instance data and establishing the association between it and each concept, the warning knowledge graph of each public opinion target is constructed, and a unified warning concept graph is provided for the subsequent public opinion warning of the data to be queried, thereby turning the warning knowledge and user rules into knowledge, structured, abstracted and conceptualized, so as to better use and manage the knowledge, and conveniently edit and update it, and then detect and identify the data based on the warning knowledge graph, and at the same time, the recognition result of the warning knowledge graph is handed over to the preset public opinion target warning model to guide the preset public opinion target warning model to make more accurate judgments, thereby turning the warning result into an event and multi-dimensional, and converting the preset public opinion target warning model into a fine-grained semantic extraction. Each fine-grained event result includes rich warning knowledge graph information, making each warning point explainable, including attributes in multiple dimensions for easy reuse and screening. This multi-dimensional result can facilitate more detailed and extensive analysis and use of downstream tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a flow chart of a public opinion early warning method based on a knowledge graph according to an embodiment of the present invention;

[0041] Figure 2 is an example diagram of predefined nodes in the early warning knowledge graph according to an embodiment of the present invention;

[0042] Figure 3 is an example diagram of a knowledge graph relationship according to an embodiment of the present invention;

[0043] Figure 4 is an example diagram of another knowledge graph relationship according to an embodiment of the present invention;

[0044] Figure 5 It is an overall construction framework diagram of the early warning knowledge graph according to an embodiment of the present invention;

[0045] Figure 6This is an example diagram of the semantic understanding process of the early warning knowledge graph according to an embodiment of the present invention;

[0046] Figure 7 is a schematic diagram of the structure of a public opinion early warning device based on a knowledge graph according to an embodiment of the present invention;

[0047] Figure 8 is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0049] In the current public opinion warning field, the most commonly used warning method is still "text classification + rules + dictionary". This solution is still a relatively shallow semantic analysis, without a deep understanding of the core semantics of the text. In addition, the general public opinion dictionary is still flat one-dimensional data, which is only responsible for recalling data and cannot parse the real warning intention. The result of the classification model is only to judge whether a warning is needed, but cannot give more explanations. The accuracy is poor. At the same time, when the dictionary or user needs change, the model often needs to be retrained, which is time-consuming and laborious.

[0050] Disadvantages of existing technology:

[0051] 1. Lack of accuracy. General models mainly learn the main content of the text or high-frequency semantics. As a result, many fine-grained semantics in the text cannot be detected and recognized, and the error rate when the system infers generalization is also high.

[0052] 2. The results lack interpretability: The system can only tell whether to issue an alert, but cannot provide easy-to-understand reasons, nor can it provide more guidance information for downstream tasks.

[0053] 3. Inability to efficiently reuse historical data or knowledge data: The historical warning data actually includes a variety of expected event types. Warning personnel can easily infer the cause of the warning and other knowledge based on these data. However, the existing programs mainly enhance the programs by simply extracting keywords. This method cannot learn deeper semantic knowledge, so it cannot significantly improve the effectiveness of the program and leads to waste of data or knowledge.

[0054] 4. Poor flexibility: When warning requirements or standards may change, the program cannot change quickly and often requires retraining the model, increasing time and cost.

[0055] 5. Poor reusability of warning results: Because the output result of the program is single, that is, "yes" or "no" warning data, it cannot provide more dimensions or information to guide the next step of analysis and use.

[0056] Moreover, the understanding ability of current classification models, i.e. large models, is impressive, but it has two important problems: 1) the hallucination problem, i.e. generating erroneous and fact-inconsistent results, and 2) the inability to quickly adapt to new and dynamically changing knowledge.

[0057] The present invention aims to solve the problems of insufficient accuracy, poor flexibility, inability to efficiently reuse warning knowledge, single results, and poor reusability in the prior art by proposing an early warning method based on knowledge graph and big model. The present invention uses artificially defined rules and historical warning data to establish a structured and easy-to-understand early warning concept graph, which makes the early warning knowledge and user rules and other requirements knowledgeable and structured, and then detects and identifies data based on the knowledge graph, uses the graph to semantically understand the text, and inputs the semantic understanding results to the big model to guide the big model to make more accurate judgments again, thereby improving the processing effect of the system.

[0058] Specifically, the technical solution provided by the present invention is committed to solving complex semantic understanding problems in the field of public opinion warning, including 1) the current public opinion system has weak understanding capabilities and is unable to classify and identify public opinion data in a fine-grained manner, and 2) it is unable to efficiently reuse and learn knowledge data that has been warned in history. 3) The flexibility and adaptability of the system are poor, that is, when user needs and warning standards are adjusted, the program cannot be adjusted in time to quickly adapt to new changes or applications. The public opinion warning solution based on knowledge graph proposed in the present invention aims to improve the accuracy and fine-grained semantic understanding capabilities of the program on the one hand, and on the other hand, enable the program to learn knowledge from warning data, while improving the flexible deployment capabilities of the system.

[0059] According to an embodiment of the present invention, an embodiment of a public opinion warning method based on a knowledge graph is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0060] Based on the above problems, in this embodiment, a public opinion early warning method based on knowledge graph is provided, which is applied to computer devices such as CPU, single-chip microcomputer, etc. Figure 1Flow chart of the public opinion early warning method based on knowledge graph according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0061] Step S101, obtaining keyword data, warning instance data and encyclopedia data corresponding to different public opinion targets.

[0062] Among them, the public opinion target is a construction target for public opinion warning set according to business needs, such as corruption issues, public security issues, etc. In actual applications, multiple public opinion targets can be set according to actual needs, and the present invention is not limited to this.

[0063] Specifically, keyword data refers to various keywords related to public opinion targets, which can be collected and sorted manually, as well as various keywords automatically mined by programs. Some represent basic concepts, and some represent event concepts. Finally, after manual unified sorting, it is used to determine the final concept system of each public opinion target. Warning instance data refers to the warning data text accumulated in the database. These data come from public data collected on the Internet, but are considered to be warning-related after processing. These data may be a piece of news or various post data such as a microblog. Encyclopedia data is used to provide more professional and complete information, such as the scope and description of administrative divisions, representative locations within the divisions, as well as personnel profiles, film and television work profiles, etc. The above keyword data, warning instance data and encyclopedia data are used to construct the warning knowledge graph of public opinion targets to provide accurate data reference for subsequent public opinion warnings.

[0064] Step S102, extracting basic concepts that meet the public opinion target from the keyword data, and performing concept mining based on the keyword data, warning instance data and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts.

[0065] Specifically, the basic concepts are the core words directly related to the public opinion targets and the qualifiers that limit the core words. They are the basis of the knowledge graph. As the basic concept nodes of the early warning knowledge graph, they are mainly divided into two categories: the first category appears as core nodes in the early warning scenario, such as: personnel, places, animals, plants, and administrative divisions; the second category is used to limit the core concepts, such as: hazard degree, hazard description, safety description, toxicity, taboos, alcohol and grain alcohol content, explosion-proof level, special drug categories, etc.; the first and second categories are both core concepts for public opinion target early warning.

[0066] Furthermore, in the above step S102, concept mining is performed based on keyword data, warning instance data and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with basic concepts or assist in expressing basic concepts, specifically including:

[0067] The keyword data, warning instance data and encyclopedia data are segmented, high-frequency words are mined, new words are discovered and entities are classified to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in the expression of the basic concepts. Among them, the event concept is the smallest semantic unit that makes up the graph, has the smallest granularity of independent semantics, is also the smallest event concept, and is also a node in the event classification system. For example: explosion, fire, etc., which serve as atomic event concept nodes of the knowledge graph. Non-concept words are mainly common words, such as verbs, adjectives, phrases, etc. These words are generally highly co-occurring with the above core concepts or are important auxiliary words for the expression of these concepts, and serve as non-concept nodes of the knowledge graph.

[0068] Step S103, combining the basic concepts and the event concepts to generate a compound event concept, and determining the association relationship between the basic concepts, non-concept words, event concepts and the compound event concept based on the warning instance data.

[0069] Among them, the above-mentioned composite event concept is mainly based on business needs, that is, the public opinion target is composed of atomic event concepts, basic concepts, etc., which can make faster matching processing during semantic recognition, such as: gas tank explosion, airplane fire, etc. The composite event concept needs to establish a hierarchical relationship with its corresponding atomic event concept, and the composite concept serves as the composite event concept node of the knowledge graph. For example, the main nodes of the knowledge graph are as follows Figure 2 shown.

[0070] Specifically, the association relationship between basic concepts, non-concept words, event concepts and compound event concepts is determined based on the warning instance data, including: determining the synonym / hypernym relationship between basic concepts, non-concept words, event concepts and compound event concepts based on the warning instance data. Thus, the association relationship between basic concepts, non-concept words, event concepts and compound event concepts is determined by the association between different warning events in the warning instance data. For example: Figure 3 As shown in the figure, isA indicates a hyponymous relationship, and syn indicates a synonymous relationship. Figure 3 The entity personnel is in a hierarchical relationship with doctor and student, while tomato and tomato are in a synonymous relationship.

[0071] Step S104, extracting instance events related to event concepts from the warning instance data, and establishing association relationships between the instance events and basic concepts, non-concept words, event concepts, and compound event concepts.

[0072] Among them, the instance event is a specific warning event, such as "a barbecue restaurant in City A caught fire", which is used as the instance event node of the knowledge graph. In practical applications, the instance event node should establish a hierarchical relationship with its corresponding event concept.

[0073] Specifically, the association relationship between instance events and basic concepts, non-concept words, event concepts and compound event concepts is established, including: establishing hierarchical relationships, occurrence location relationships, event inclusion relationships and co-occurrence relationships between instance events and basic concepts, non-concept words, event concepts and compound event concepts.

[0074] Among them, synonym / hypernymy relationship mainly refers to semantic synonym / hypernymy relationship. The relationship between event concepts is also a kind of hyponymy relationship. The relationship between event instance nodes and atomic event concept nodes is also a hyponymy relationship. The location relationship refers to the location associated with the event, generally refers to the location of the event. The event inclusion relationship refers to the nodes that may be associated or included when the event occurs. These nodes and corresponding relationships are used to define or constrain the specific semantic content of an event. They need to be determined based on business and common sense concepts, and generally can include any concept. The "event inclusion" relationship can also be based on the corresponding sub-relationships of the specific event type. In the process of semantic understanding of the knowledge graph, different role templates will be defined for each event, referring to the important roles that must exist or have important associations when the event occurs. The role type is determined according to business needs and common sense. For example, beating incidents generally include the perpetrator role and the victim role. A role usually belongs to one of the graphs, or has a synonym / hypernymy relationship with the nodes in the graph. Co-occurrence relationships generally refer to nodes that appear together with concept nodes or have important constraints, generally referring to non-conceptual nodes such as verbs and adjectives. Exemplarily, the association relationship between each node in the knowledge graph is as follows: Figure 4 shown.

[0075] Step S105, constructing an early warning knowledge graph with basic concepts, non-concept words, event concepts, compound event concepts and instance events as nodes, and with the associations between basic concepts, non-concept words, event concepts, compound event concepts and instance events as edges.

[0076] Among them, core words directly related to the public opinion target and qualifiers that limit the core words are extracted from the above-mentioned data set composed of keyword data, warning instance data and encyclopedia data as the basic concept nodes of the warning knowledge graph; common words that co-occur with core words or assist in the expression of core words are mined as non-concept nodes of the warning knowledge graph; data related to the preset public opinion target classification are mined as atomic event concept nodes of the warning knowledge graph; atomic event concept nodes, basic concept nodes and non-concept nodes are combined as compound event concept nodes of the warning knowledge graph; public opinion instance events are extracted as instance event nodes of the warning knowledge graph.

[0077] For example, the overall construction process of the early warning knowledge graph is as follows: Figure 5As shown, after processing the basic data, the early warning knowledge graph is constructed and accessed mainly through steps such as concept mining, relationship mining, and instance data extraction.

[0078] The construction data of the knowledge graph mainly includes: 1) Various keywords, which are collected and sorted manually, as well as various keywords automatically mined by the program. Some represent basic concepts, and some represent event concepts. Finally, they are manually sorted and unified to determine the final concept system. 2) The database accumulates warning data texts. These data come from public data collected on the Internet, but after processing, they are considered to be related to warnings. These data may be a piece of news or various post data such as a Weibo post. 3) Various encyclopedia data provide more professional and complete information, such as the scope and description of administrative divisions, representative places within the divisions, as well as personnel profiles, film and television work profiles, etc.

[0079] Concept mining:

[0080] Initial basic concepts: First, they come from the accumulated keyword data, mainly considering the integrity, representativeness and other characteristics and node business needs, namely the public opinion goals, and finally they are sorted and screened to form the initial basic concepts.

[0081] Event concept or non-concept word mining: mainly from existing data, through word segmentation, high-frequency word mining, new word discovery, entity classification, etc., new concepts or dictionary supplementary maps can be mined. High-frequency words can collect frequently appearing and representative words, such as explosion, fire, etc. New word discovery is mainly to mine event concepts in fields with less data. Entity classification can determine whether these words are existing concepts, etc.

[0082] The word segmentation tool uses LAC, the new word discovery uses the NER sequence labeling algorithm, and the entity classification is based on BERT. The specific algorithm can be adjusted as needed.

[0083] Relationship Mining:

[0084] The relationship mining here includes the hierarchical relationship between basic concepts and events, as well as the discovery and generation of the combination relationship of compound event concepts. The main methods include: 1) Based on manual sorting and rule-based mining, a batch of compound concepts can be easily generated based on business common sense + rules. 2) Based on the Bert concept combination classification model and artificial filtering rules such as frequency, the generated compound event concepts are further classified and judged.

[0085] Early warning instance data extraction:

[0086] The event extraction method is used to extract instance data related to various warning event concepts from historical data, and relatively high-frequency or representative instances are selected and associated with concept nodes. On the one hand, they can be used as descriptions of concepts, and on the other hand, they can be used as auxiliary features in subsequent semantic understanding. For example: "beating someone" (concept) -> "a case of provoking trouble and violently beating others occurred at a certain time and location" (specific instance data).

[0087] Knowledge graph access and usage:

[0088] The knowledge graph data is stored using NebulaGraph. The node data, index data, etc. of the graph can be stored in the MySQL database for semantic understanding, entity search, etc.

[0089] Step S106, determining the trigger words and entity objects that represent / trigger specific events from the data to be queried, and searching in the early warning knowledge graph based on the trigger words and entity objects to obtain a concept subgraph.

[0090] The data to be queried is data to be analyzed to determine whether a public opinion warning is needed, which may be a piece of news or various post data such as a Weibo post.

[0091] Specifically, the above step S106 includes: searching the warning knowledge graph based on the trigger words and entity objects to obtain the target event concept and the target basic concept; searching the warning knowledge graph for adjacent nodes that have an association relationship with the target event concept and the target basic concept to obtain a concept subgraph.

[0092] In practical applications, the above step S106 is the semantic understanding process of the knowledge graph, that is, extracting event concepts, especially compound event concepts and their related attributes. The event concepts and the related nodes around them in the graph are used to uniquely identify class events and their constituent elements. The algorithm is based on the idea of ​​event extraction. The specific process includes: 1) extracting trigger words to determine whether it is possible to represent or trigger a specific type of event, such as "fire" and "smoke" are both trigger words for the "fire" event concept; 2) extracting related entities, such as: personnel, venues, buildings, etc., and linking them to specific basic concepts; 3) subgraph search: searching for event concepts from the graph, and the adjacent nodes of the basic concepts to form a semantic subgraph, namely the above-mentioned concept subgraph.

[0093] Step S107, convert the concept sub-graph into descriptive language and input it into the preset public opinion target warning model together with the data to be queried as supplementary knowledge, so that the preset public opinion target warning model analyzes the data to be queried based on the supplementary knowledge and determines the public opinion warning result of the data to be queried.

[0094] Specifically, the above step S107 converts the concept subgraph into a descriptive language, including: performing text matching on the concept subgraph to determine the target event concept contained in the to-be-queried data; and extracting event attributes of the target event concept to obtain a descriptive language.

[0095] In practical applications, the above semantic subgraph is submitted to the graph matching or text matching model for judgment to determine whether the data contains the target event concept; event attribute extraction: each type of event includes attributes such as time, location, and role, and each type of event can be configured with different role templates, such as: "beating" events include "perpetrator" and "victim". The entities corresponding to each role are extracted according to the data, and then the basic attributes such as the time and location of occurrence are extracted. For example, the complete semantic understanding process is as follows: Figure 6 shown.

[0096] Furthermore, the above-mentioned step S107 presets a public opinion target warning model to analyze the data to be queried based on the supplementary knowledge to determine the public opinion warning results of the data to be queried, including: the preset public opinion target warning model analyzes the target supplementary knowledge in the corresponding supplementary knowledge in the data to be queried; determines the warning public opinion target based on the event attributes corresponding to the target supplementary knowledge; generates the public opinion warning results of the data to be queried based on the warning public opinion target and the target supplementary knowledge.

[0097] Among them, the target supplementary knowledge includes: the semantics related to the fine-grained classification and recognition of instance events and basic concepts, non-concept words, event concepts and compound event concepts corresponding to the early warning public opinion target of the queried data, and the instance events are used as example data of the early warning public opinion target to facilitate the intuitive understanding of the classification results of the preset public opinion target early warning model. This multi-dimensional result can facilitate more detailed and extensive analysis and use of downstream tasks.

[0098] The public opinion warning method based on knowledge graph provided by the embodiment of the present invention extracts the basic concepts of the public opinion targets by using the keywords of each public opinion target, and then performs concept mining based on keyword data, warning instance data and encyclopedia data to obtain event concepts and non-concept words related to the public opinion targets, and forms a composite event concept by combining the basic concepts and event concepts, and determines the association between each concept, and constructs a warning knowledge graph for each public opinion target by extracting instance events related to the event concept from the warning instance data and establishing the association between it and each concept, so as to provide a unified warning concept graph for the public opinion warning of the subsequent data to be queried, thereby turning the warning knowledge and user rules into knowledge, structured, abstracted and conceptualized, so as to better use and manage the knowledge, and conveniently edit and update it, and then detect and identify the data based on the warning knowledge graph, and at the same time, hand over the recognition result of the warning knowledge graph to the preset public opinion target warning model to guide the preset public opinion target warning model to make more accurate judgments, thereby turning the warning result into event and multidimensional, and converting the preset public opinion target warning model into fine-grained semantic extraction. Each fine-grained event result includes rich warning knowledge graph information, making each warning point explainable, including attributes in multiple dimensions for easy reuse and screening. This multi-dimensional result can facilitate more detailed and extensive analysis and use of downstream tasks.

[0099] Specifically, since the constructed early warning knowledge graph includes structured and relatively new semantic knowledge, the preset public opinion target early warning model has a strong reasoning ability. The combination of the two can effectively improve the accuracy of the public opinion early warning system. The concept subgraph extracted from the semantic understanding of the knowledge graph is converted into a descriptive language that is easy for people to understand, and then supplemented with specific example data as prompts to output the large model, as supplementary knowledge to enhance the judgment ability of the large model, etc. Specific prompts can be adjusted according to the task, and specific examples are as follows:

[0100] Task: We expect you, as a professional tag classification team, to assist us in completing the tag / event classification task of online public opinion and return the results and format that meet the requirements.

[0101] Role: In the following labeling tasks, you will play the role of a label classification expert, responsible for label classification; Label classification expert: has 20 years of experience in label classification and public opinion processing, and is proficient in government business, especially the business needs of the network security department and the Cyberspace Administration of China. Label classification has high accuracy and professionalism. According to the label order from top to bottom, only one label can be selected. After selecting a label, the labeling task for this single data is completed and the labeling of the next data will continue.

[0102] 1. Advertising noise: described as information related to advertising, artistic creation, popularization of law, popular science, recruitment, decoration, marketing planning, and weather forecast;

[0103] 2. Film and television noise: described as TV dramas, film and television plays, novel stories, classic cases, case analysis, warning films, ancient history, modern history related information;

[0104] 3. Other noise: information describing neutral, positive, fair and just information;

[0105] 4. Assault incidents: such as safety hazards;

[0106] 5. Others: Content not included in the above categories.

[0107] Stage: label classification; Participants: label classification experts; Output: label serial number; Task: ensure the accuracy of label classification, no need to output classification reasons.

[0108] The data to be queried is as follows:

[0109] A netizen in a certain place posted a video saying that A in the area was driving a car with a cloned license plate and started beating and cursing after being discovered by the owner of the car with the cloned license plate.

[0110] By inputting the above-mentioned data text to be queried and the supplementary knowledge of the beating incident into the above-mentioned preset public opinion target warning model, the output result is that the data to be queried needs to be subject to public opinion warning of the beating incident, and its public opinion warning results include: the place of occurrence is "a certain place", the person who beat people is "the owner of the car with a cloned license plate", the person who was beaten is "A", and the reason for the beating is "driving a car with a cloned license plate".

[0111] The present invention creates a warning concept map, i.e., the above-mentioned warning knowledge map, and establishes a unified structured knowledge map according to the goals and data of public opinion warning. According to the manually organized rules and historical warning data, a large amount of perceptual instance warning data is abstracted, conceptualized, and knowledge-based, so as to better use and manage this knowledge. The concept map includes both concept nodes such as event categories, people, and locations, as well as specific event instance nodes, such as "a beating incident occurred in a certain store in a certain place". This structured knowledge can be easily edited and updated.

[0112] By implementing the public opinion warning scheme provided by the present invention, the final warning result can be event-based and multi-dimensionalized by converting the statistical classification model into fine-grained semantic extraction. Each fine-grained event result includes elements such as event category, time, place, event, role, etc. This multi-dimensional result can facilitate downstream tasks to be analyzed and used more finely and extensively. And through the joint processing method of knowledge graph + large model, the knowledge of the knowledge graph is newer, more complete and more interpretable, and the warning content is event-based and structured. Each warning point is interpretable, including attributes of multiple dimensions, which is convenient for reuse and screening; and the large model has a strong ability to generate and understand, and the recognition results of the knowledge graph, such as concept nodes, subgraphs, etc., are converted into easy-to-understand descriptive texts, which are input to the large model to guide the large model to make further judgments and identifications, thereby improving the overall effect of the public opinion warning system.

[0113] In the embodiments of the present invention, a public opinion early warning device based on a knowledge graph is also provided, which is used to implement the above embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0114] This embodiment provides a public opinion early warning device based on knowledge graph, such as Figure 7 As shown, the device comprises:

[0115] The acquisition module 701 is used to acquire keyword data, warning instance data and encyclopedia data corresponding to different public opinion targets;

[0116] The first processing module 702 is used to extract basic concepts that meet the public opinion target from the keyword data, and perform concept mining based on the keyword data, warning instance data and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts;

[0117] The second processing module 703 is used to combine the basic concepts and the event concepts to generate a compound event concept, and determine the association relationship between the basic concepts, non-concept words, event concepts and the compound event concepts based on the warning instance data;

[0118] The third processing module 704 is used to extract instance events related to event concepts from the warning instance data, and establish association relationships between the instance events and basic concepts, non-concept words, event concepts and compound event concepts;

[0119] The fourth processing module 705 is used to construct a warning knowledge graph with basic concepts, non-concept words, event concepts, compound event concepts and instance events as nodes and with the associations between basic concepts, non-concept words, event concepts, compound event concepts and instance events as edges;

[0120] The fifth processing module 706 is used to determine the trigger words and entity objects representing / triggering the specific event from the data to be queried, and search in the early warning knowledge graph based on the trigger words and entity objects to obtain a concept subgraph;

[0121] The sixth processing module 707 is used to convert the concept sub-graph into descriptive language and input it into the preset public opinion target warning model together with the data to be queried as supplementary knowledge, so that the preset public opinion target warning model analyzes the data to be queried based on the supplementary knowledge and determines the public opinion warning results of the data to be queried.

[0122] The public opinion early warning device based on knowledge graph provided by the embodiment of the present invention extracts the basic concepts of the public opinion targets by using the keywords of each public opinion target, and then performs concept mining based on keyword data, early warning instance data and encyclopedia data to obtain event concepts and non-concept words related to the public opinion targets, and forms a composite event concept by combining the basic concepts and event concepts, and determines the association between each concept, and constructs an early warning knowledge graph for each public opinion target by extracting instance events related to the event concept from the early warning instance data and establishing the association between it and each concept, so as to provide a unified early warning concept graph for the public opinion early warning of the subsequent data to be queried, thereby turning the early warning knowledge and user rules into knowledge, structured, abstracted, and conceptualized, so as to better use and manage the knowledge, and conveniently edit and update it, and then detect and identify the data based on the early warning knowledge graph, and at the same time, hand over the recognition result of the early warning knowledge graph to the preset public opinion target early warning model to guide the preset public opinion target early warning model to make a more accurate judgment, thereby turning the early warning result into an event and multi-dimensional, and converting the preset public opinion target early warning model into a fine-grained semantic extraction. Each fine-grained event result includes rich warning knowledge graph information, making each warning point explainable, including attributes in multiple dimensions for easy reuse and screening. This multi-dimensional result can facilitate more detailed and extensive analysis and use of downstream tasks.

[0123] The knowledge graph-based public opinion warning device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0124] The further functional description of each of the above modules and units is the same as that of the above corresponding method embodiments and will not be repeated here.

[0125] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0126] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0127] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0128] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0129] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0130] The computer device further comprises a communication interface 30 for the control unit to communicate with other devices or a communication network.

[0131] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0132] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A public opinion early warning method based on knowledge graph, characterized in that: The method comprises: Obtain keyword data, warning instance data, and encyclopedia data corresponding to different public opinion targets; Extracting basic concepts that match the public opinion target from the keyword data, and performing concept mining based on the keyword data, warning instance data, and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts; Combining the basic concepts and event concepts to generate a compound event concept, and determining the association relationship between the basic concepts, non-concept words, event concepts and compound event concepts based on the warning instance data; Extracting instance events related to event concepts from the warning instance data, and establishing association relationships between the instance events and the basic concepts, non-concept words, event concepts, and compound event concepts; The early warning knowledge graph is constructed with basic concepts, non-concept words, event concepts, compound event concepts and instance events as nodes, and the associations between basic concepts, non-concept words, event concepts, compound event concepts and instance events as edges; Determine trigger words and entity objects representing / triggering specific events from the data to be queried, and search the early warning knowledge graph based on the trigger words and the entity objects to obtain a concept subgraph; After converting the concept subgraph into descriptive language, the concept subgraph is input into a preset public opinion target warning model together with the data to be queried as supplementary knowledge, so that the preset public opinion target warning model analyzes the data to be queried based on the supplementary knowledge and determines the public opinion warning result of the data to be queried.

2. The method according to claim 1, characterized in that: The concept mining based on keyword data, warning instance data and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts include: The keyword data, warning instance data and encyclopedia data are processed by word segmentation, high-frequency word mining, new word discovery and entity classification to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in the expression of the basic concepts.

3. The method according to claim 1, characterized in that: The determining of the association relationship among the basic concepts, non-concept words, event concepts and compound event concepts based on the warning instance data includes: Based on the warning instance data, synonym / hypernym relationships among basic concepts, non-concept words, event concepts and compound event concepts are determined.

4. The method according to claim 1, characterized in that: The establishing of the association relationship between the instance event and the basic concepts, non-concept words, event concepts and compound event concepts includes: Establish the hierarchical relationship, location relationship, event inclusion relationship and co-occurrence relationship between the instance event and the basic concepts, non-concept words, event concepts and compound event concepts.

5. The method according to claim 1, characterized in that The searching in the early warning knowledge graph based on the trigger word and the entity object to obtain a concept subgraph includes: Based on the trigger word and the entity object, a target event concept and a target basic concept are obtained by searching in the warning knowledge graph; Adjacent nodes having association relationships with target event concepts and target basic concepts are searched from the warning knowledge graph to obtain a concept subgraph.

6. The method according to claim 1, characterized in that The converting the concept sub-graph into a descriptive language comprises: Performing text matching on the concept subgraph to determine the target event concept contained in the data to be queried; Event attributes are extracted from the target event concept to obtain descriptive language.

7. The method according to claim 6, characterized in that The public opinion target warning model analyzes the data to be queried based on the supplementary knowledge to determine the public opinion warning result of the data to be queried, including: The preset public opinion target warning model analyzes the target supplementary knowledge in the supplementary knowledge corresponding to the data to be queried; determines the warning public opinion target based on the event attribute corresponding to the target supplementary knowledge; and generates the public opinion warning result of the data to be queried based on the warning public opinion target and the target supplementary knowledge.

8. A public opinion early warning device based on knowledge graph, characterized in that: include: The acquisition module is used to obtain keyword data, warning instance data and encyclopedia data corresponding to different public opinion targets; The first processing module is used to extract basic concepts that meet the public opinion target from the keyword data, and perform concept mining based on the keyword data, warning instance data and encyclopedia data to obtain event concepts related to the public opinion target and non-concept words that co-occur with the basic concepts or assist in expressing the basic concepts; A second processing module is used to combine the basic concepts and event concepts to generate a compound event concept, and determine the association relationship between the basic concepts, non-concept words, event concepts and compound event concepts based on the warning instance data; The third processing module is used to extract instance events related to event concepts from the warning instance data, and establish association relationships between the instance events and the basic concepts, non-concept words, event concepts and compound event concepts; The fourth processing module is used to construct an early warning knowledge graph with basic concepts, non-concept words, event concepts, compound event concepts and instance events as nodes and with the associations between basic concepts, non-concept words, event concepts, compound event concepts and instance events as edges; A fifth processing module is used to determine the trigger words and entity objects representing / triggering the specific event from the data to be queried, and search the early warning knowledge graph based on the trigger words and the entity objects to obtain a concept subgraph; The sixth processing module is used to convert the concept sub-graph into a descriptive language and input it into a preset public opinion target warning model together with the data to be queried as supplementary knowledge, so that the preset public opinion target warning model analyzes the data to be queried based on the supplementary knowledge and determines the public opinion warning results of the data to be queried.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.