Public opinion relationship identification method, device, computer equipment and storage medium
By identifying named entities and core predicates in the text, combined with the public opinion relationship clustering vocabulary, we can accurately identify public opinion relationships between enterprises or industries, solving the problem of traditional methods being unable to identify relationship dynamics, and improving the accuracy and efficiency of public opinion analysis.
Patent Information
- Application Number
- CN201811421802.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-26
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2038-11-26
AI Technical Summary
Traditional information data analysis methods cannot accurately identify the relationship dynamics between multiple companies or industries, resulting in inaccurate public opinion analysis.
By obtaining the target text, use the preset named entity recognition model to identify the named entities, perform syntactic analysis to identify the core predicate, traverse the public opinion relationship clustering vocabulary to determine the public opinion relationship category to which the core predicate belongs, and determine the named entity based on the category and named entity. The public opinion relationship among them is constructed, and a multivariate data group is constructed and updated to the public opinion relationship database.
It achieves accurate identification and analysis of public opinion relationships between named entities, reduces text content, refines core vocabulary, and improves the accuracy and efficiency of public opinion analysis.
Smart Images

Figure CN109710918B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a method, apparatus, computer equipment and storage medium for identifying public opinion relationships. Background Art
[0002] With the development of information technology, the speed of information dissemination is getting faster and faster, and the amount of information is also increasing. For example, corporate announcements, news, judicial documents, etc., these information are helpful for corporate decision makers or managers to understand corporate or industry dynamics, judge risks, and predict prospects.
[0003] Traditional information data analysis methods cannot accurately identify the relationship dynamics between multiple companies or industries in data information, which is not conducive to public opinion analysis. Summary of the invention
[0004] Based on this, it is necessary to provide a public opinion relationship identification method, device, computer equipment and storage medium that can accurately identify the public opinion relationship between named entities in response to the above technical problems.
[0005] A method for identifying public opinion relations, the method comprising:
[0006] Obtain target text containing the public opinion relationship to be identified;
[0007] Inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text;
[0008] Performing syntactic analysis on the target text according to the multiple named entities to identify the core predicate of the target text;
[0009] Traversing a preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs;
[0010] According to the public opinion relationship category and the multiple named entities, the public opinion relationship between the multiple named entities is determined.
[0011] In one embodiment, the inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text comprises:
[0012] Inputting the target text into a preset named entity recognition model to obtain a preliminary recognition result of the named entity;
[0013] Based on a preset entity naming database, a plurality of named entities are screened out from the named entity preliminary recognition results.
[0014] In one embodiment, the performing syntactic analysis on the target text according to the multiple named entities to identify the core predicate of the target text includes:
[0015] According to the multiple named entities, marking the target text with named entities;
[0016] Obtaining a domain category identifier carried by the target text, and searching a gerund group library of a corresponding domain according to the domain category identifier;
[0017] Traversing the gerund group library of the corresponding field, dividing the target text into sentence components;
[0018] The core predicate of the target text is determined according to the sentence components of the target text and the named entity tagging results of the target text.
[0019] In one embodiment, before traversing the preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs, the method further includes:
[0020] Get the text data set published within the set time range;
[0021] Filtering the text data set to contain multiple texts with the same named entity combination, and extracting core predicates from the multiple texts respectively;
[0022] The extracted multiple core predicates are clustered to construct the preset public opinion relationship clustering vocabulary.
[0023] In one embodiment, after determining the public opinion relationship between the multiple named entities according to the public opinion relationship category and the multiple named entities, the method further includes:
[0024] Constructing a multi-dimensional data set including the plurality of named entities and public opinion relations between the plurality of named entities;
[0025] The multi-element data set is updated to a preset public opinion relationship database, in which a plurality of multi-element data sets including named entity combination information and public opinion relationship information between corresponding named entity combinations are stored.
[0026] In one embodiment, after updating the multivariate data set to a preset public opinion relationship database, the method further includes:
[0027] Receive a target named entity query request, and obtain known named entity information and known public opinion relationship information carried by the target named entity query request; the known named entity information is used to describe the known named entities in the named entity combination information of the multi-data group, and the known public opinion relationship information is used to describe the public opinion relationship information between the named entity combinations in the multi-data group;
[0028] Traversing the preset public opinion relationship database to search for a multivariate data set containing the known named entity information and the known public opinion relationship information;
[0029] According to the found multi-data group, target named entity information in the named entity combination information of the multi-data group is determined.
[0030] In one embodiment, after updating the multivariate data set to a preset public opinion relationship database, the method further includes:
[0031] Receive a public opinion relationship query request, and obtain known named entity combination information carried in the public opinion relationship query request;
[0032] Traversing the preset public opinion relationship database to search for a multi-element data group containing the known named entity combination;
[0033] According to the found multi-element data group, public opinion relationship information between the known named entity combinations is determined.
[0034] A public opinion relationship identification device, the device comprising:
[0035] A target text acquisition module is used to acquire target text containing the public opinion relationship to be identified;
[0036] A named entity recognition module, used for inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text;
[0037] A core predicate identification module, configured to perform syntactic analysis on the target text according to the plurality of named entities, and identify the core predicate of the target text;
[0038] A public opinion relationship category determination module, used to traverse a preset public opinion relationship clustering vocabulary to determine the public opinion relationship category to which the core predicate belongs;
[0039] The public opinion relationship determination module is used to determine the public opinion relationship between the multiple named entities according to the public opinion relationship category and the multiple named entities.
[0040] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0041] Obtain target text containing the public opinion relationship to be identified;
[0042] Inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text;
[0043] Performing syntactic analysis on the target text according to the multiple named entities to identify the core predicate of the target text;
[0044] Traversing a preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs;
[0045] According to the public opinion relationship category and the multiple named entities, the public opinion relationship between the multiple named entities is determined.
[0046] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0047] Obtain target text containing the public opinion relationship to be identified;
[0048] Inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text;
[0049] Performing syntactic analysis on the target text according to the multiple named entities to identify the core predicate of the target text;
[0050] Traversing a preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs;
[0051] According to the public opinion relationship category and the multiple named entities, the public opinion relationship between the multiple named entities is determined.
[0052] The above-mentioned public opinion relationship identification method, device, computer equipment and storage medium obtain a target text containing a public opinion relationship to be identified, input the target text into a preset named entity recognition model to obtain multiple named entities, determine the objects of the public opinion relationship in the target text, perform syntactic analysis on the target text based on the multiple named entities using syntactic structures, identify the core predicate of the target text, and link the multiple named entities that have public opinion relationships through the identification of named entities and core predicates, thereby reducing the content of the target text and extracting the core vocabulary of the target text, determining the public opinion relationship category to which the core predicate belongs by traversing a preset public opinion relationship clustering vocabulary, and determining the public opinion category to which the core predicate belongs using the public opinion relationship clustering vocabulary, so as to facilitate the determination of the public opinion relationship between multiple named entities according to the public opinion category, and accurately identify the public opinion relationship between the named entities contained in the target text. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is an application scenario diagram of a method for identifying public opinion relations in an embodiment;
[0054] Figure 2 A flowchart of a method for identifying public opinion relations in one embodiment;
[0055] Figure 3 A flowchart of a method for identifying public opinion relations in another embodiment;
[0056] Figure 4 A flowchart of a method for identifying public opinion relations in another embodiment;
[0057] Figure 5 A flowchart of a method for identifying public opinion relations in another embodiment;
[0058] Figure 6 It is a structural block diagram of a public opinion relationship identification device in one embodiment;
[0059] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] The public opinion relationship identification method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The server 104 obtains the target text containing the public opinion relationship to be identified, inputs the target text into the preset named entity recognition model, obtains multiple named entities contained in the target text, performs syntactic analysis on the target text according to the multiple named entities, identifies the core predicate of the target text, and determines the public opinion relationship category to which the core predicate belongs by traversing the preset public opinion relationship clustering vocabulary. According to the public opinion relationship category and the multiple named entities, the public opinion relationship between the multiple named entities is determined and pushed to the terminal 102. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0062] In one embodiment, Figure 2 As shown, a method for identifying public opinion relations is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0063] Step S200, obtaining a target text containing a public opinion relationship to be identified.
[0064] Public opinion relationship refers to the relationship between two or more named entities. Named entities can be non-natural entities such as institutions, groups, legal persons, and enterprises. The target text refers to the text that contains two or more named entities and needs to identify the public opinion relationship between the named entities. In the embodiment, taking the financial field as an example, the target text can be the title, introduction, etc. of news related to the financial field. The target text can be manually selected, or it can be selected according to the set selection rules, and a web crawler algorithm can be used to obtain the text that meets the selection rules as the target text.
[0065] Step S300: input the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text.
[0066] A named entity recognition model refers to a data analysis model used to identify entities with specific meanings in a text. A preset named entity recognition model can be a model obtained by training with a large amount of sample data for identifying named entities such as institutions, groups, legal persons, and enterprises. The target text is preprocessed and input into the preset named entity recognition model. Through the recognition processing of the preset named entity recognition model, the recognition result is output to determine the multiple named entities contained in the target text. The named entity recognition model can be a Bilstm model or a CRF model, or a BiLSTM+CRF model, etc. In an embodiment, the training process of the preset named entity recognition model includes: obtaining a large number of training samples containing known named entities, identifying the known named entities in the training samples, and inputting the identified training samples into the constructed BiLSTM+CRF model for training. When the parameter values of the model evaluation parameters such as precision and recall rate reach the preset range, the trained model is the preset named entity recognition model.
[0067] Step S400 , performing syntactic analysis on the target text according to the multiple named entities, and identifying the core predicate of the target text.
[0068] Syntactic analysis refers to the analysis of the components of a sentence and their order of arrangement. Syntactic analysis includes sentence pattern analysis and component analysis. The basic components that constitute a sentence, such as subject, predicate, object, predicate, attributive, adverbial, appositive, etc., are determined based on the identified multiple named entities. When the target text includes clauses, there may be multiple predicates, among which the core predicate refers to the predicate that links multiple named entities. In the embodiment, taking the target text containing a main clause and a subordinate clause as an example, when one of the named entities appears in the main clause, the core predicate is the predicate in the main clause. When multiple named entities appear in the same subordinate clause, the core predicate is the predicate in the subordinate clause.
[0069] Step S500, traverse the preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs.
[0070] The preset public opinion relationship clustering word library refers to a word library consisting of a plurality of different word sets, which is obtained by clustering the same type of public opinion relationship words to obtain a word set, wherein each word set is provided with a characteristic word representing the type of public opinion relationship. The server takes the core predicate as the target, traverses the preset public opinion relationship clustering word library, searches for the word set corresponding to the core predicate, and thereby determines the public opinion relationship category to which the core predicate belongs based on the characteristic words of the word set. In an embodiment, the public opinion relationship clustering word library can obtain data samples that express similar events, extract core predicates from the data samples, and the extracted predicates generally express the same thing, so they belong to different expressions of the same semantics, and cluster the extracted core predicates to obtain a word set of the same type of public opinion relationship words.
[0071] Step S600, determining the public opinion relationship between the multiple named entities according to the public opinion relationship category and the multiple named entities.
[0072] The server identifies multiple named entities contained in the target text and the categories of public opinion relations between the named entities, and can determine the public opinion relations between the multiple named entities. When the number of named entities is 2, the public opinion relations between the named entities can be expressed as a triple data form of named entity A-core predicate-named entity B, and the identified triple data is sent to the terminal.
[0073] The above-mentioned public opinion relationship identification method obtains a target text containing the public opinion relationship to be identified, inputs the target text into a preset named entity recognition model to obtain multiple named entities, determines the objects of the public opinion relationship in the target text, and performs syntactic analysis on the target text based on the multiple named entities using syntactic structures to identify the core predicates of the target text. Through the identification of named entities and core predicates, multiple named entities with public opinion relationships are linked, the content of the target text is reduced and the core vocabulary of the target text is extracted. By traversing a preset public opinion relationship clustering vocabulary, the public opinion relationship category to which the core predicate belongs is determined, and the public opinion category to which the core predicate belongs is determined using the public opinion relationship clustering vocabulary, so as to facilitate the determination of the public opinion relationship between multiple named entities according to the public opinion category, and accurately identify the public opinion relationship between the named entities contained in the target text.
[0074] In one embodiment, Figure 3 As shown, in step S300, the target text is input into a preset named entity recognition model to obtain multiple named entities contained in the target text, including:
[0075] Step S320, input the target text into a preset named entity recognition model to obtain a preliminary named entity recognition result.
[0076] Step S340 , based on a preset entity naming database, a plurality of named entities are screened out from the named entity preliminary recognition results.
[0077] The preset entity naming database refers to a database containing the full names and abbreviations of known non-natural person entities such as institutions, groups, legal persons, and enterprises. The preset entity naming database can be constructed by obtaining data such as industrial and commercial information. By using a preset named entity recognition model, the named entities in the target text are recognized, and multiple named entities can be preliminarily identified. The multiple named entities obtained by recognition are matched with the full abbreviation data in the preset entity naming database, and invalid data that failed to match in the preliminary recognition results are filtered to obtain multiple valid named entities, where the number of named entities can be two or more. In an embodiment, the specified named entities can also be screened by configuring the preset entity naming database as needed.
[0078] In one embodiment, step S400, performing syntactic analysis on the target text according to the multiple named entities, and identifying the core predicate of the target text includes:
[0079] Step S420, annotating the target text with named entities according to the multiple named entities;
[0080] Step S430, obtaining the domain category identifier carried by the target text, and searching for a gerund group library of the corresponding domain according to the domain category identifier.
[0081] Step S440, traverse the gerund group library of the corresponding field, and divide the sentence components of the target text.
[0082] Step S450, determining the core predicate of the target text according to the sentence components of the target text and the named entity tagging result of the target text.
[0083] The domain category identifier refers to the identifier used to characterize the industry field to which the target text belongs. The domain category identifier is added to the target text according to the data source during the acquisition process of the target text. The domain category identifier can be obtained by parsing the data source of the target text. The domain categories include finance, Internet, education, medical care, etc. Different domain categories involve some domain-specific vocabulary. For example, "investment", "takeover", "listing", "serve as a sponsor", "become a shareholder", etc. are all proprietary gerund group vocabulary in the financial industry. According to the existing proprietary vocabulary in the field, the gerund group library of each field can be pre-built. According to the domain to which the target sentence belongs, the gerund group library corresponding to the field is traversed to divide the sentence components of the target text, such as the division of the main clause and the subordinate clause, and the division of the components in the main clause and the subordinate clause. According to the multiple named entities obtained by the preset entity naming recognition model, the target text is annotated with named entities. When one of the named entities appears in the main clause, the core predicate is the predicate in the main clause. When multiple named entities appear in the same subordinate clause, the core predicate is the predicate in the subordinate clause. For example, "After the transaction is completed, Group A will become the second largest shareholder of Company B." The entities identified are Group A and Company B, and the core predicate of the sentence is "become a shareholder..." Then, the result of dividing the sentence components is semantically labeled to obtain the agent of the core predicate. Semantic role labeling is to analyze the core predicate in the sentence and the relationship between the other components of the sentence and the core predicate, which can be used to distinguish the agent and the patient of the predicate. For example, the sponsor is Bank C, and the shareholder is Group A. What is obtained is a parsed result of the sentence, which can be expressed as a triple, such as "Group A-become a shareholder-Company B".
[0084] In one embodiment, before step S500, traversing a preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs, the method further includes:
[0085] Step S460, obtaining a text data set published within a set time range.
[0086] Step S470 , screening the text data set to contain multiple texts with the same named entity combination, and extracting core predicates from the multiple texts respectively.
[0087] Step S480, clustering the extracted multiple core predicates to construct a preset public opinion relationship clustering vocabulary.
[0088] The text data set published within the preset time may refer to each news text published within the set time range. Multiple texts containing the same named entity combination refer to multiple texts containing a combination of multiple named entities, and each text contains the same named entity combination. Multiple texts containing the same named entity combination published within the set time range are generally expressions of the same event in various ways of expression. Due to different language expressions, the core predicates of each text are different, but the expressions are the same semantics, and each text has the same named entity. For example, "On April 2, 2018, X Enterprise acquired Y Enterprise", then in the texts that appear in X Enterprise and Y Enterprise at the same time, there will be many expressions involving acquisition, such as "X Enterprise becomes the major shareholder of Y Enterprise", "X Enterprise takes over Y Enterprise", etc., then we can extract multiple core predicates based on X Enterprise and Y Enterprise under the acquisition category. According to the core predicates in the extracted multiple texts, clustering processing is performed to construct a preset public opinion relationship clustering vocabulary. Another example is "Group A invested 6.6 billion shares in Company B", "Company B got rid of foreign capital, why did Group A take over 6.6 billion", "Behind the surge of 18 billion in the market value of Company B: Group A increased product prices and faced severe competition". In so many sentences, various forms of triples can be parsed, such as "Group A invested in Company B", "Group A took over Company B", "Group A joined Company B". Then, "invest, take over, join, become a shareholder" and other related terms are of the same category and can be classified into a category of names through clustering, such as investment relationships.
[0089] In one embodiment, Figure 4 As shown, after determining the public opinion relationship between multiple named entities according to the public opinion relationship category and multiple named entities in step S600, the method further includes:
[0090] Step S620, constructing a multi-dimensional data set including multiple named entities and public opinion relations between the multiple named entities.
[0091] Step S640, updating the multi-element data set to a preset public opinion relationship database, wherein the preset public opinion relationship database stores a plurality of multi-element data sets including named entity combination information and public opinion relationship information between corresponding named entity combinations.
[0092] A multi-tuple data group refers to an associated data group that links multiple named entities together through public opinion relations between multiple named entities. Multi-tuple refers to the sum of the named entities and relations contained. For example, a data group consisting of two named entities and a public opinion relationship between them is a ternary data group. A data group consisting of three named entities can be a quinary data group. The number of tuples of the data group can be determined according to the number of public opinion relations that exist. It can be understood that a multi-tuple data group can be split into multiple ternary data groups based on public opinion relations. The multi-tuple data group contains named entity combination information and public opinion relationship information between corresponding named entity combinations. In an embodiment, the server constructs a multi-tuple data group containing multiple named entities according to the public opinion relations between the named entities, splits the multi-tuple data group into multiple ternary data groups, and updates the ternary data group to a preset public opinion relationship database, wherein the public opinion relationship database refers to a pre-set database for storing multi-tuple data groups, which can be used to find another unknown information by using two known information in the ternary data group through data search. Similarly, other unknown information can also be found based on two or more known information in the multi-tuple data group.
[0093] In one embodiment, Figure 4 As shown, after step S640, the multivariate data set is updated to the preset public opinion relationship database, it also includes:
[0094] Step S720, receive the target named entity query request, obtain the known named entity information and known public opinion relationship information carried by the target named entity query request, the known named entity information is used to describe the known named entities in the named entity combination information of the multi-data group, and the known public opinion relationship information is used to describe the public opinion relationship information between the named entity combinations in the multi-data group.
[0095] Step S740, traverse the preset public opinion relationship database to search for a multivariate data set containing known named entity information and known public opinion relationship information.
[0096] Step S760: determining target named entity information in the named entity combination information of the multi-dimensional data set according to the found multi-dimensional data set.
[0097] The target named entity query request refers to a request instruction for finding a specific named entity that has a public opinion relationship with the known named entity, given a known named entity and a public opinion relationship with the known named entity. The server receives the target named entity query request, obtains the known named entity information and the known public opinion relationship information carried by the target named entity query request, traverses the preset public opinion relationship database, searches for a multivariate data group containing the known named entity information and the known public opinion relationship information, and extracts the multivariate data group that meets the search requirements, thereby obtaining the target named entity to be queried in the named entity combination information of the multivariate data group. For example, what companies need to be found that have an investment relationship with "Company B"? The information contained in the target named entity query request includes: named entity A is "Company B", the clustering relationship of the core predicates between the named entities is "investment relationship", and by traversing the preset public opinion relationship database, searching for a triple data group whose clustering relationship is "investment relationship" and one of the named entities A is "Company B", a triple data group set of named entity B that has an investment relationship with "Company B" can be obtained, wherein the triple data group set includes two categories: A investing in B and B investing in A. Taking financial news as an example, when querying the relationship between named entity A and public opinion, a set of related entities B can be fed back. In other embodiments, if the cluster relationship corresponding to the core predicate can be determined as an investment relationship, the relationship between entities contained in the investment relationship also includes core predicates such as investment, takeover, entry, and becoming a shareholder, with Company B and any one of these core predicates as the target, a web crawler algorithm is used to obtain related news and other data, thereby obtaining named entities that have an investment relationship with Company B.
[0098] In one embodiment, Figure 5 As shown, after step S640, the multivariate data set is updated to the preset public opinion relationship database, it also includes:
[0099] Step S820: receiving a public opinion relationship query request, and obtaining known named entity combination information carried in the public opinion relationship query request.
[0100] Step S840, traverse the preset public opinion relationship database to search for multi-dimensional data groups containing known named entity combinations.
[0101] Step S860, determining public opinion relationship information between known named entity combinations based on the found multi-dimensional data group.
[0102] Through the public opinion relationship query request, multiple relationships between two named entities can be queried. For example, news about leading companies in the same industry, such as company M and company N, in a period of time will have multiple relationships, such as cooperating to invest in a company and competing with each other. According to the public opinion relationship query request, the known named entity combination information carried can be obtained to determine the two named entities to be queried, and the existing triple data groups can be traversed. Find the triple data group that contains both named entities at the same time, so as to obtain multiple relationships between the two named entities, such as cooperation, competition, investment, supplier relationship, etc. Through the above method, it is easy to analyze the public opinion relationship. For example, "Bank C serves as the sponsor of H Company's initial public offering of A-shares and listing", then for Bank C and H Company, the information that can be obtained is that Bank C sponsors H Company, and when the IPO broker of H Company is identified, it can also be known that the corresponding one is Bank C. When the sentence to be analyzed contains two named entities and its core predicate is one of the public opinion relationship clustering vocabulary, the relationship category between the named entities can be quickly determined. For example, "Company M invests in Company K", the two named entities can be easily classified as investment relationships.
[0103] It should be understood that although Figure 2-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0104] In one embodiment, Figure 6 As shown, a public opinion relationship identification device is provided, comprising:
[0105] A target text acquisition module 200 is used to acquire a target text containing a public opinion relationship to be identified;
[0106] A named entity recognition module 300 is used to input a target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text;
[0107] A core predicate identification module 400 is used to perform syntactic analysis on the target text according to the multiple named entities to identify the core predicate of the target text;
[0108] The public opinion relationship category determination module 500 is used to traverse the preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs;
[0109] The public opinion relationship determination module 600 is used to determine the public opinion relationship between multiple named entities according to the public opinion relationship category and multiple named entities.
[0110] In one embodiment, the named entity recognition module 300 is further used to input the target text into a preset named entity recognition model to obtain a preliminary named entity recognition result, and filter out multiple named entities from the preliminary named entity recognition result based on a preset entity naming database.
[0111] In one embodiment, the core predicate identification module 400 is further used to perform named entity annotation on the target text according to multiple named entities, obtain the domain category identifier carried by the target text, search for the gerund group library of the corresponding domain according to the domain category identifier, traverse the gerund group library of the corresponding domain, divide the target text into sentence components, and determine the core predicate of the target text according to the sentence components of the target text and the named entity annotation results of the target text.
[0112] In one embodiment, the public opinion relationship identification device also includes a public opinion relationship clustering vocabulary building module, which is used to obtain a text data set published within a set time range, filter the text data set to contain multiple texts with the same named entity combination, extract core predicates from the multiple texts respectively, cluster the extracted multiple core predicates, and build a preset public opinion relationship clustering vocabulary.
[0113] In one embodiment, the public opinion relationship identification device also includes a public opinion relationship database update module, which is used to construct a multi-dimensional data group including multiple named entities and public opinion relationships between multiple named entities, and update the multi-dimensional data group to a preset public opinion relationship database, in which multiple multi-dimensional data groups including named entity combination information and public opinion relationship information between corresponding named entity combinations are stored.
[0114] In one embodiment, the public opinion relationship identification device also includes a target named entity query module, which is used to receive a target named entity query request, obtain known named entity information and known public opinion relationship information carried by the target named entity query request, the known named entity information is used to describe the known named entities in the named entity combination information in the multi-dimensional data group, and the known public opinion relationship information is used to describe the public opinion relationship information between the named entity combinations in the multi-dimensional data group. It traverses a preset public opinion relationship database to search for a multi-dimensional data group containing known named entity information and known public opinion relationship information, and determines the target named entity information in the named entity combination information of the multi-dimensional data group based on the found multi-dimensional data group.
[0115] In one embodiment, the public opinion relationship identification device also includes a public opinion relationship query module, which is used to receive a public opinion relationship query request, obtain known named entity combination information carried by the public opinion relationship query request, traverse a preset public opinion relationship database, and search for multi-data groups containing known named entity combinations, and determine the public opinion relationship information between the known named entity combinations based on the found multi-data groups.
[0116] The above-mentioned public opinion relationship identification device obtains a target text containing a public opinion relationship to be identified, inputs the target text into a preset named entity recognition model, obtains multiple named entities, determines the objects of the public opinion relationship in the target text, performs syntactic analysis on the target text based on the multiple named entities using syntactic structures, identifies the core predicate of the target text, and connects the multiple named entities with public opinion relationships through the identification of named entities and core predicates, thereby reducing the content of the target text and extracting the core vocabulary of the target text, determines the public opinion relationship category to which the core predicate belongs by traversing a preset public opinion relationship clustering vocabulary, and determines the public opinion category to which the core predicate belongs using the public opinion relationship clustering vocabulary, so as to facilitate the determination of the public opinion relationship between multiple named entities according to the public opinion category, and accurately identifies the public opinion relationship between the named entities contained in the target text.
[0117] For the specific definition of the public opinion relationship identification device, please refer to the definition of the public opinion relationship identification method above, which will not be repeated here. Each module in the above-mentioned public opinion relationship identification device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0118] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for identifying public opinion relationships is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0119] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0120] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0121] Obtain target text containing the public opinion relationship to be identified;
[0122] Input the target text into a preset named entity recognition model to obtain multiple named entities contained in the target text;
[0123] Perform syntactic analysis on the target text based on multiple named entities to identify the core predicate of the target text;
[0124] Traverse the preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs;
[0125] According to the public opinion relationship category and multiple named entities, the public opinion relationship between the multiple named entities is determined.
[0126] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0127] Input the target text into the preset named entity recognition model to obtain the preliminary recognition result of the named entity;
[0128] Based on a preset entity naming database, multiple named entities are screened out from the preliminary named entity recognition results.
[0129] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0130] Based on multiple named entities, named entity annotation is performed on the target text;
[0131] Obtain the domain category identifier carried by the target text, and search for the gerund group library of the corresponding domain according to the domain category identifier;
[0132] Traverse the gerund group library of the corresponding field and divide the sentence components of the target text;
[0133] The core predicate of the target text is determined based on the sentence components of the target text and the named entity annotation results of the target text.
[0134] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0135] Get the text data set published within the set time range;
[0136] Filter the text data set to contain multiple texts with the same named entity combination, and extract the core predicates in the multiple texts respectively;
[0137] The extracted multiple core predicates are clustered to construct a preset public opinion relationship clustering vocabulary.
[0138] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0139] Construct a multi-dimensional data set containing multiple named entities and public opinion relations between multiple named entities;
[0140] The multivariate data set is updated to a preset public opinion relationship database, in which a plurality of multivariate data sets including named entity combination information and public opinion relationship information between corresponding named entity combinations are stored.
[0141] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0142] Receive a target named entity query request, and obtain known named entity information and known public opinion relationship information carried by the target named entity query request, wherein the known named entity information is used to describe the known named entities in the named entity combination information in the multi-dimensional data group, and the known public opinion relationship information is used to describe the public opinion relationship information between the named entity combinations in the multi-dimensional data group;
[0143] Traversing a preset public opinion relationship database to search for a multivariate data set containing known named entity information and known public opinion relationship information;
[0144] According to the found multi-data group, target named entity information in the named entity combination information of the multi-data group is determined.
[0145] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0146] Receive a public opinion relationship query request, and obtain known named entity combination information carried in the public opinion relationship query request;
[0147] Traverse the preset public opinion relationship database to find multi-dimensional data groups containing known named entity combinations;
[0148] According to the found multi-dimensional data set, the public opinion relationship information between the known named entity combinations is determined.
[0149] The computer device for implementing the public opinion relationship identification method obtains a target text containing the public opinion relationship to be identified, inputs the target text into a preset named entity recognition model, obtains multiple named entities, determines the objects of the public opinion relationship in the target text, performs syntactic analysis on the target text based on the multiple named entities using syntactic structures, identifies the core predicate of the target text, and connects the multiple named entities with the public opinion relationship through the identification of the named entities and the core predicates, thereby reducing the content of the target text and extracting the core vocabulary of the target text, determines the public opinion relationship category to which the core predicate belongs by traversing a preset public opinion relationship clustering vocabulary, and determines the public opinion category to which the core predicate belongs using the public opinion relationship clustering vocabulary, so as to facilitate the determination of the public opinion relationship between multiple named entities according to the public opinion category, and accurately identifies the public opinion relationship between the named entities contained in the target text.
[0150] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0151] Obtain target text containing the public opinion relationship to be identified;
[0152] Input the target text into a preset named entity recognition model to obtain multiple named entities contained in the target text;
[0153] Perform syntactic analysis on the target text based on multiple named entities to identify the core predicate of the target text;
[0154] Traverse the preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs;
[0155] According to the public opinion relationship category and multiple named entities, the public opinion relationship between the multiple named entities is determined.
[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0157] Input the target text into the preset named entity recognition model to obtain the preliminary recognition result of the named entity;
[0158] Based on a preset entity naming database, multiple named entities are screened out from the preliminary named entity recognition results.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0160] Based on multiple named entities, named entity annotation is performed on the target text;
[0161] Obtain the domain category identifier carried by the target text, and search for the gerund group library of the corresponding domain according to the domain category identifier;
[0162] Traverse the gerund group library of the corresponding field and divide the sentence components of the target text;
[0163] The core predicate of the target text is determined based on the sentence components of the target text and the named entity annotation results of the target text.
[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0165] Get the text data set published within the set time range;
[0166] Filter the text data set to contain multiple texts with the same named entity combination, and extract the core predicates in the multiple texts respectively;
[0167] The extracted multiple core predicates are clustered to construct a preset public opinion relationship clustering vocabulary.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0169] Construct a multi-dimensional data set containing multiple named entities and public opinion relations between multiple named entities;
[0170] The multivariate data set is updated to a preset public opinion relationship database, in which a plurality of multivariate data sets including named entity combination information and public opinion relationship information between corresponding named entity combinations are stored.
[0171] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0172] Receive a target named entity query request, and obtain known named entity information and known public opinion relationship information carried by the target named entity query request, wherein the known named entity information is used to describe the known named entities in the named entity combination information in the multi-dimensional data group, and the known public opinion relationship information is used to describe the public opinion relationship information between the named entity combinations in the multi-dimensional data group;
[0173] Traversing a preset public opinion relationship database to search for a multivariate data set containing known named entity information and known public opinion relationship information;
[0174] According to the found multi-data group, target named entity information in the named entity combination information of the multi-data group is determined.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0176] Receive a public opinion relationship query request, and obtain known named entity combination information carried in the public opinion relationship query request;
[0177] Traverse the preset public opinion relationship database to find multi-dimensional data groups containing known named entity combinations;
[0178] According to the found multi-dimensional data set, the public opinion relationship information between the known named entity combinations is determined.
[0179] The computer-readable storage medium for implementing the method for identifying public opinion relations obtains a target text containing a public opinion relation to be identified, inputs the target text into a preset named entity recognition model, obtains a plurality of named entities, determines the objects of the public opinion relation in the target text, performs syntactic analysis on the target text according to the plurality of named entities using a syntactic structure, identifies the core predicate of the target text, and connects the plurality of named entities having the public opinion relation through the identification of the named entities and the core predicate, thereby reducing the content of the target text and extracting the core vocabulary of the target text, determines the public opinion relation category to which the core predicate belongs by traversing a preset public opinion relation clustering vocabulary, and determines the public opinion category to which the core predicate belongs using the public opinion relation clustering vocabulary, so as to facilitate determining the public opinion relation between the plurality of named entities according to the public opinion category, and accurately identifies the public opinion relation between the named entities contained in the target text.
[0180] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0181] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0182] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for identifying public opinion relations, the method comprising: Obtain target text containing the public opinion relationship to be identified; Inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text; According to the multiple named entities, marking the target text with named entities; Obtaining a domain category identifier carried by the target text, and searching a gerund group library of a corresponding domain according to the domain category identifier; Traversing the gerund group library of the corresponding field, dividing the target text into sentence components; Determining the core predicate of the target text according to the sentence components of the target text and the named entity annotation results of the target text; the core predicate refers to the predicate that links multiple named entities; Traversing a preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs; According to the public opinion relationship category and the multiple named entities, the public opinion relationship between the multiple named entities is determined.
2. The method according to claim 1, characterized in that: The step of inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text comprises: Inputting the target text into a preset named entity recognition model to obtain a preliminary recognition result of the named entity; Based on a preset entity naming database, a plurality of named entities are screened out from the named entity preliminary recognition results.
3. The method according to claim 1, characterized in that Before traversing the preset public opinion relationship clustering word library to determine the public opinion relationship category to which the core predicate belongs, the method further includes: Get the text data set published within the set time range; Filtering the text data set to contain multiple texts with the same named entity combination, and extracting core predicates from the multiple texts respectively; The extracted multiple core predicates are clustered to construct the preset public opinion relationship clustering vocabulary.
4. The method according to claim 1, characterized in that: After determining the public opinion relationship between the multiple named entities according to the public opinion relationship category and the multiple named entities, the method further includes: Constructing a multi-dimensional data set including the plurality of named entities and public opinion relations between the plurality of named entities; The multi-element data set is updated to a preset public opinion relationship database, in which a plurality of multi-element data sets including named entity combination information and public opinion relationship information between corresponding named entity combinations are stored.
5. The method according to claim 4, characterized in that After the multi-element data set is updated to the preset public opinion relationship database, the method further includes: Receive a target named entity query request, and obtain known named entity information and known public opinion relationship information carried by the target named entity query request; the known named entity information is used to describe the known named entities in the named entity combination information of the multi-data group, and the known public opinion relationship information is used to describe the public opinion relationship information between the named entity combinations in the multi-data group; Traversing the preset public opinion relationship database to search for a multivariate data set containing the known named entity information and the known public opinion relationship information; According to the found multi-data group, target named entity information in the named entity combination information of the multi-data group is determined.
6. The method according to claim 4, characterized in that After the multi-element data set is updated to the preset public opinion relationship database, the method further includes: Receive a public opinion relationship query request, and obtain known named entity combination information carried in the public opinion relationship query request; Traversing the preset public opinion relationship database to search for a multi-element data group containing the known named entity combination; According to the found multi-element data group, public opinion relationship information between the known named entity combinations is determined.
7. A public opinion relationship identification device, characterized in that: The device comprises: A target text acquisition module is used to acquire target text containing the public opinion relationship to be identified; A named entity recognition module, used for inputting the target text into a preset named entity recognition model to obtain a plurality of named entities contained in the target text; The core predicate identification module is used to annotate the target text with named entities according to the multiple named entities; obtain the domain category identifier carried by the target text, and search the gerund group library of the corresponding domain according to the domain category identifier; traverse the gerund group library of the corresponding domain to divide the sentence components of the target text; determine the core predicate of the target text according to the sentence components of the target text and the named entity annotation results of the target text; the core predicate refers to the predicate that links multiple named entities; A public opinion relationship category determination module, used to traverse a preset public opinion relationship clustering vocabulary to determine the public opinion relationship category to which the core predicate belongs; The public opinion relationship determination module is used to determine the public opinion relationship between the multiple named entities according to the public opinion relationship category and the multiple named entities.
8. The device according to claim 7, characterized in that The device also includes a public opinion relationship database updating module, which is used to construct a multi-data group including the multiple named entities and the public opinion relationships between the multiple named entities; and update the multi-data group to a preset public opinion relationship database, in which multiple multi-data groups including named entity combination information and public opinion relationship information between corresponding named entity combinations are stored.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Named entity relation extraction and construction method based on deep learning
CN104199972A
Public opinion smart supervision method
CN106294619A
