Knowledge graph construction method, device and equipment and readable storage medium
Through text preprocessing and knowledge graph construction of news data, the problems of insufficient timeliness, incomplete information sources and insufficient knowledge support in the anti-fraud program are solved, achieving timely response and comprehensive monitoring of new fraud elements, and providing a comprehensive Knowledge support improves the effectiveness of anti-fraud decision-making.
Patent Information
- Application Number
- CN202311541088.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2024-10-18
AI Technical Summary
Existing anti-fraud solutions have problems with insufficient timeliness, incomplete information sources, and insufficient knowledge support in content identification, monitoring, and decision-making.
By performing text preprocessing on news data, extracting word sequences, classifying and extracting target knowledge elements, constructing target knowledge triples, and generating knowledge graphs, it can be used to identify fraudulent content, monitor information and provide decision support.
It achieves timely response, comprehensive monitoring and comprehensive knowledge support to new fraud elements, improving the effectiveness and accuracy of anti-fraud decision-making.
Smart Images

Figure CN118798335A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of knowledge graph construction, and specifically to a knowledge graph construction method, device, equipment and readable storage medium. Background Art
[0002] Existing anti-fraud solutions have the following technical disadvantages:
[0003] 1. In the anti-fraud content identification link, the response to new fraud content elements is not timely enough, and the fraud-related keyword library used for matching lacks timeliness. Fraud-related content identification is usually judged based on keywords, and keywords are subject to the timeliness of the corpus. In addition, as the size of the keyword library increases, the update cost increases, the update cycle is extended, and the word library is outdated.
[0004] 2. In the anti-fraud monitoring link, there is currently a lack of a comprehensive monitoring system, insufficient sources of monitoring information, a lack of overall perception monitoring, scattered focus points, and a lack of orderly organization.
[0005] 3. In the process of anti-fraud decision-making, there are few sources of knowledge support. The data and knowledge sources used in anti-fraud decision-making are relatively scattered, and some anti-fraud knowledge is highly subjective and has weak support capabilities. In addition, due to the form of knowledge organization, the anti-fraud knowledge used to support decision-making is difficult to connect with general knowledge in other fields to play a supporting role. Summary of the invention
[0006] The embodiments of the present application provide a knowledge graph construction method, device, equipment and readable storage medium to solve the above-mentioned technical problems existing in existing anti-fraud solutions.
[0007] In a first aspect, an embodiment of the present application provides a method for constructing a knowledge graph, including:
[0008] Perform text preprocessing on the news data to be processed to obtain a word sequence;
[0009] Classifying and extracting the news to be processed based on the word sequence to obtain target knowledge elements;
[0010] Based on the target knowledge element and the preset construction method, construct a target knowledge triple;
[0011] Generate a target knowledge graph based on the target knowledge triples.
[0012] In one embodiment, the step of performing text preprocessing on the news data to be processed to obtain a word sequence includes:
[0013] Acquire news data to be processed, wherein the news data to be processed includes news content plain text and news metadata;
[0014] The news content plain text and the news metadata are cleaned and segmented in turn to obtain a word sequence.
[0015] In one embodiment, the news to be processed is classified based on the word sequence to obtain target knowledge elements including:
[0016] Classifying the news to be processed into news types based on the word sequence to obtain case review news;
[0017] The news to be processed is subject-classified based on the word sequence to obtain news subjects, and the case review news and the news subjects belong to the target knowledge element.
[0018] In one embodiment, the news to be processed is extracted based on the word sequence to obtain target knowledge elements including:
[0019] Extracting keywords from the news to be processed based on the word sequence to obtain target keywords;
[0020] Entity extraction is performed on the news to be processed based on the word sequence to obtain a target entity, and the target keyword and the target entity belong to a target knowledge element.
[0021] In one embodiment, constructing the target knowledge triple based on the target knowledge element and the preset construction method includes:
[0022] In the case where the preset construction method is news metadata conversion knowledge, constructing a target knowledge triple according to the news metadata and the target entity;
[0023] When the preset construction mode is vocabulary attribute conversion knowledge, a target knowledge triple is constructed according to the target keyword and the target entity.
[0024] In one embodiment, constructing the target knowledge triple based on the target knowledge element and the preset construction method further includes:
[0025] In the case where the preset construction method is to convert knowledge from the topic classification result, constructing a target knowledge triple according to the news topic;
[0026] When the preset construction method is to construct knowledge based on co-occurrence relationships, construct target knowledge triples according to the target keywords and key entities;
[0027] When the preset construction method is similar news processing, duplicate detection is performed on the news to be processed, and a target knowledge triple is constructed according to the duplicate detection result.
[0028] In one embodiment, after generating the target knowledge graph based on the target knowledge triples, the method includes:
[0029] Analyze the target news to obtain a target entity related to the target news, wherein the target entity does not include an entity related to the news metadata;
[0030] Determining a first number of target entities present in the target knowledge graph;
[0031] Based on the ratio of the total number of the target entities to the first number and a preset threshold, it is determined whether the target news is repeated.
[0032] In a second aspect, the present application embodiment provides a knowledge graph construction device, including:
[0033] A text preprocessing module, used for performing text preprocessing on the news data to be processed to obtain a word sequence;
[0034] A classification and extraction module, used for classifying and extracting the news to be processed based on the word sequence to obtain target knowledge elements;
[0035] A target knowledge triple construction module, used to construct a target knowledge triple based on the target knowledge element and a preset construction method;
[0036] A target knowledge graph generation module is used to generate a target knowledge graph based on the target knowledge triples.
[0037] In a third aspect, an embodiment of the present application provides a device comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, the knowledge graph construction method described in the first aspect is implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the knowledge graph construction method described in the first aspect is implemented.
[0039] The knowledge graph construction method, apparatus, device and readable storage medium provided in the embodiments of the present application obtain the latest anti-fraud knowledge from news texts, extract keyword entities used to identify fraudulent content into the knowledge graph, ensure that in the anti-fraud content identification link, it can respond to new fraud elements in a timely manner, and solve the problem of lack of timeliness of the fraud-related keyword library; by constructing a news-based knowledge graph, extracting and organizing the anti-fraud knowledge contained in the news, obtaining keyword entities in the news content, and obtaining a comprehensive description of the news, the problem of insufficient comprehensiveness of the anti-fraud information source; through the knowledge graph, knowledge reasoning and knowledge association are performed, and knowledge recommendations for anti-fraud decision-making are directly inferred based on the entity associations in the knowledge graph, and by associating entity graphs in other fields, comprehensive knowledge support can be provided for the formulation of anti-fraud decisions, solving the problem of few sources of knowledge support in the anti-fraud decision-making link. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 This is one of the flow charts of the knowledge graph construction method provided in the embodiment of the present application;
[0042] Figure 2 This is the second flow chart of the knowledge graph construction method provided in the embodiment of the present application;
[0043] Figure 3 It is a schematic diagram of the structure of the knowledge graph construction device provided in the embodiment of the present application;
[0044] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] Reference Figure 1 , Figure 1This is one of the flow charts of the knowledge graph construction method in the embodiment of the present application. The knowledge graph construction method provided in the embodiment of the present application may include:
[0047] Step 100, performing text preprocessing on the news data to be processed to obtain a word sequence;
[0048] The knowledge graph construction method provided in the embodiment of the present application may also include:
[0049] Step 110, obtaining news data to be processed, wherein the news data to be processed includes news content plain text and news metadata;
[0050] Step 120, cleaning and word segmentation are performed on the news content plain text and the news metadata in sequence to obtain a word sequence.
[0051] Specifically, the knowledge graph construction method proposed in this application can be divided into the following four parts: news acquisition, news text processing, knowledge graph construction and knowledge graph application. This embodiment describes in detail the news acquisition part and the text preprocessing of the news text processing part.
[0052] News acquisition part: news data (i.e., the news data to be processed in this embodiment) is acquired online through web crawlers, application programming interfaces (APIs), website subscriptions, etc. The acquired news data to be processed includes news content plain text and news metadata (news title, news author, news source, and release date, etc.).
[0053] Text preprocessing of the news text processing part: first, the plain text of the news content is cleaned, then the cleaned text is segmented, and finally the segmentation result is converted into a word vector through the FastText (word vector) model, that is, the word sequence in this embodiment.
[0054] Step 200, classifying and extracting the news to be processed based on the word sequence to obtain target knowledge elements;
[0055] Specifically, knowledge elements can be extracted through the news acquisition module and the news text processing module, and the extracted knowledge elements include news metadata, news entities, classification results, etc. The specific classification and extraction methods will be described in detail below.
[0056] Step 300, constructing a target knowledge triple based on the target knowledge element and a preset construction method;
[0057] Based on the knowledge elements extracted from the above news acquisition part and the news text processing part, the target knowledge triples can be constructed through five methods: news metadata conversion knowledge, vocabulary attribute conversion knowledge, topic classification result conversion knowledge, co-occurrence relationship construction knowledge, and similar news processing.
[0058] Step 400, generating a target knowledge graph based on the target knowledge triples.
[0059] The target knowledge triples obtained by the above-mentioned multiple construction methods are input into the knowledge graph database to generate a news-oriented anti-fraud knowledge graph. The news-oriented anti-fraud knowledge graph generated in this embodiment has the following applications.
[0060] 1. Information monitoring: Based on the association query function of the knowledge graph, statistics of multiple data are collected from a comprehensive perspective to carry out dynamic information monitoring, such as data statistics (quantity distribution of different types of fraud news), hot query (entities most commonly used for fraud), new fraud discovery (query statistics of new fraud-related entities) and evaluation and early warning (building an automated risk assessment plan);
[0061] 2. Case study: Based on the reasoning function of the knowledge graph, the knowledge hidden in the news text is mined. For example, a large number of news entities have a "fraud channel" relationship with the [WeChat] entity, and at the same time have a "case type" relationship with the [emotional fraud case] entity. It is inferred that text messages may be the main fraud channel for emotional fraud cases.
[0062] 3. Decision support: This application can provide support for anti-fraud governance decisions in two aspects: pre-decision support and post-decision support. Data and knowledge support can be provided before decision-making, and the effect of decision-making can be tested after decision-making.
[0063] This embodiment obtains the latest anti-fraud knowledge from news texts, extracts keyword entities used to identify fraudulent content into the knowledge graph, ensures that in the anti-fraud content identification link, it can respond to new fraud elements in a timely manner, and solves the problem of lack of timeliness in the fraud-related keyword library; by constructing a news-based knowledge graph, extracting and organizing the anti-fraud knowledge contained in the news, obtaining keyword entities in the news content, and obtaining a comprehensive description of the news, the problem of insufficient comprehensive anti-fraud information sources; through the knowledge graph, knowledge reasoning and knowledge association are performed, and knowledge recommendations for anti-fraud decision-making are directly inferred based on the entity associations in the knowledge graph. It can also provide comprehensive knowledge support for the formulation of anti-fraud decisions by associating entity graphs in other fields, and solve the problem of few sources of knowledge support in the anti-fraud decision-making link.
[0064] Reference Figure 2 , Figure 2This is the second flow chart of the knowledge graph construction method in the embodiment of the present application. In one embodiment, the knowledge graph construction method provided in the embodiment of the present application may also include:
[0065] Step 210, classifying the news to be processed into news types based on the word sequence to obtain case review news;
[0066] Step 220, subject-classifying the news to be processed based on the word sequence to obtain news subjects, wherein the case review news and the news subjects belong to the target knowledge element.
[0067] The knowledge graph construction method provided in the embodiment of the present application may also include:
[0068] Step 230, extracting keywords from the news to be processed based on the word sequence to obtain target keywords;
[0069] Step 240, performing entity extraction on the news to be processed based on the word sequence to obtain a target entity, wherein the target keyword and the target entity belong to a target knowledge element.
[0070] Specifically, the news text processing module also includes news type classification, news topic classification, keyword extraction and entity extraction.
[0071] News type classification: There are many types of news involving fraud, such as work reports reporting anti-fraud results, case reviews reporting fraud cases, and safety education that publicizes anti-fraud methods. The knowledge graph construction method proposed in this application is biased towards event graphs, and case review news is preferred. News type classification divides news into case review and non-case review categories through a trained Bayesian binary classifier. The news data used for training comes from public data, and the model is trained after manual annotation. According to the model calculation, if the probability that the news belongs to the case review category is greater than n, it will be retained and input into other processing links for processing. If the probability is less than n, it will be discarded.
[0072] News topic classification: Fraud cases include fake rebates, fake investment and financial management, impersonation of public security, procuratorial and judicial organs, and impersonation of relatives and friends. This application constructs a bidirectional long short-term memory network classification model and introduces an attention mechanism to classify news texts by topic.
[0073] Keyword extraction: Extracting keywords from news texts provides semantic sources for the knowledge graph, including key nouns such as fraud channels and key verbs such as fraud methods. In this application, the keywords are taken from the top k words with higher rankings in the calculation results of the term frequency-inverse document frequency (TF-IDF) statistical method, and the part-of-speech recognition uses the dictionary matching method. The keywords and their part-of-speech are used to construct semantic relationships by matching with the domain word list (including dictionaries such as the fraud behavior verb list, the fraud channel noun list, and other word lists). For example, if the keyword "false order brushing" successfully matches the fraud behavior verb list, then relationships such as [News A] - involves key verb -> [false order brushing], [false order brushing] -> is -> [fraud means] are constructed; if it fails to match the existing word list, a co-occurrence relationship is constructed with the news entity.
[0074] Entity extraction: Extracting entities of types such as time, location, organization, software application, website URL, and phone number from news texts forms the basis for constructing the knowledge graph. The extracted entities are enriched with semantic relationships through matching with the domain word list (including the administrative division entity word list, the common software entity list, the institution entity list, the common website entity list, and other entity lists). For example, when the entities [Shanghai] and [Hu] are identified, through comparison with the administrative division entity word list, these two entities will be aligned as [Shanghai City] in the knowledge graph. Another example is when the entity [Construction Bank] is identified, through comparison with the institution entity list, this entity will be represented as the entity [China Construction Bank] in the knowledge graph.
[0075] This embodiment improves the timeliness of anti-fraud knowledge by mining knowledge in online news, timely obtains new anti-fraud knowledge for news of continuously changing fraud cases, thereby supporting the fraud governance work to make new decisions and timely respond to the task requirements of new type fraud governance.
[0076] In one embodiment, the knowledge graph construction method provided by the embodiments of this application may further include:
[0077] Step 310, when the preset construction method is to convert news metadata into knowledge, construct a target knowledge triple according to the news metadata and the target entity;
[0078] Step 320, when the preset construction method is to convert word list attributes into knowledge, construct a target knowledge triple according to the target keyword and the target entity.
[0079] The knowledge graph construction method provided by the embodiments of this application may further include:
[0080] Step 330, when the preset construction method is to convert the theme classification result into knowledge, construct a target knowledge triple according to the news theme;
[0081] Step 340, when the preset construction method is to construct knowledge based on co-occurrence relationship, construct target knowledge triples according to the target keywords and key entities;
[0082] Step 350, when the preset construction method is similar news processing, duplicate detection is performed on the news to be processed, and a target knowledge triple is constructed according to the duplicate detection result.
[0083] Specifically, regarding the knowledge graph construction part:
[0084] Based on the knowledge elements extracted from the news acquisition part and the news text processing part, the target knowledge triples are constructed according to the following five methods:
[0085] 1. News metadata conversion knowledge: Based on the nature of news metadata itself, knowledge with fixed semantics is directly constructed with news entities, for example, [News A]-Author->[Zhang San]; [News A]-Source->[People's Daily Online].
[0086] 2. Convert knowledge based on vocabulary attributes: Use the keywords and entities that are successfully matched through the vocabulary to build knowledge with fixed semantics based on the properties of the vocabulary. For example, by matching the keyword [interest-free loan] through the fraudulent behavior verb table, you can build knowledge [News A]-Fraudulent means->[Interest-free loan]; by matching the entity [WeChat] through the common software entity table, you can build knowledge [News A]-Fraudulent channel->[WeChat].
[0087] 3. Convert knowledge based on topic classification results: Construct knowledge based on news topic classification results, for example, [News A]-Case Type->[Case of Impersonating Public Security, Procuratorate and Judiciary].
[0088] 4. Construct knowledge based on co-occurrence relationships: Build knowledge based on co-occurrence relationships by matching successful keywords and key entities through the vocabulary. For example, identify the key noun [subpoena] and the key verb [summon], and construct the knowledge [News A]-key noun->[subpoena], [News A]-key verb->[summon].
[0089] 5. Similar news processing: To process duplicate news reporting the same news event, a duplicate detection method is used for judgment. If it is determined to be duplicate, only the entity relationship obtained by converting news metadata knowledge is retained, other relationships are discarded, and another relationship with the duplicate news is established. For example: [News A]-same report->[News B]. The specific method of judging duplicate news will be described in detail below.
[0090] This embodiment organizes various knowledge in fraud management scenarios in the form of knowledge graphs, integrates rich elements in fraud management work, and performs applications in information monitoring, news case research, and decision support based on the characteristics of the graph, effectively supporting fraud management work.
[0091] In one embodiment, the knowledge graph construction method provided in the embodiment of the present application may also include:
[0092] Step 500, analyzing the target news to obtain a target entity having a relationship with the target news, wherein the target entity does not include an entity related to the news metadata;
[0093] Step 600, determining a first number of target entities existing in the target knowledge graph;
[0094] Step 700: Determine whether the target news is repeated based on the ratio of the total number of the target entities to the first number and a preset threshold.
[0095] Specifically, the method for determining whether there is duplicate news in the knowledge graph is as follows: by analyzing the target news, it is determined that there is a relationship between the target news and r (i.e., the total number of target entities in this embodiment) target entities, and these r target entities do not include the three entities of news occurrence time, source, and author whose relationships are constructed based on news metadata; then, it is determined whether all r entities exist in the knowledge graph. If there are y (i.e., the first number in this embodiment) entities in the knowledge graph, the ratio of the number of identical entity relationships (y:r) is calculated. When the ratio is greater than a preset threshold, it is determined that the target news is duplicated with the news already existing in the knowledge graph; when the ratio is less than or equal to the preset threshold, or the target entity does not exist in the knowledge graph, the entities and relationships related to the target entity are added to the knowledge graph to refresh the knowledge graph.
[0096] This embodiment stores knowledge in the form of a knowledge graph. The universality of the knowledge graph structure ensures that the news knowledge graph proposed in this application can be integrated and complemented with other knowledge graphs, ensuring the circulation of knowledge, improving the utilization rate of this graph, and providing richer knowledge support for fraud governance work.
[0097] refer to Figure 3 , Figure 3 It is a structural diagram of the knowledge graph construction device in the embodiment of the present application. The knowledge graph construction device provided in the embodiment of the present application is described below. The knowledge graph construction device described below and the knowledge graph construction method described above can be referenced to each other.
[0098] The text preprocessing module 301 is used to perform text preprocessing on the news data to be processed to obtain a word sequence;
[0099] A classification and extraction module 302 is used to classify and extract the news to be processed based on the word sequence to obtain target knowledge elements;
[0100] A target knowledge triple construction module 303 is used to construct a target knowledge triple based on the target knowledge element and a preset construction method;
[0101] The target knowledge graph generation module 304 is used to generate a target knowledge graph based on the target knowledge triples.
[0102] Optionally, the text preprocessing module includes:
[0103] A news data acquisition unit to be processed, used to acquire news data to be processed, wherein the news data to be processed includes news content plain text and news metadata;
[0104] The text preprocessing unit is used to perform cleaning and word segmentation processing on the news content plain text and the news metadata in sequence to obtain a word sequence.
[0105] Optionally, the classification extraction module includes:
[0106] A news classification unit, used for classifying the news to be processed into news types based on the word sequence to obtain case review news;
[0107] The subject classification unit is used to classify the news to be processed based on the word sequence to obtain news topics, and the case review news and the news topics belong to the target knowledge element.
[0108] Optionally, the classification extraction module further includes:
[0109] A keyword extraction unit, used for extracting keywords from the news to be processed based on the word sequence to obtain target keywords;
[0110] The entity extraction unit is used to perform entity extraction on the news to be processed based on the word sequence to obtain a target entity, wherein the target keyword and the target entity belong to a target knowledge element.
[0111] Optionally, the target knowledge triple building module includes:
[0112] A first knowledge triple construction unit is used to construct a target knowledge triple according to the news metadata and the target entity when the preset construction mode is news metadata conversion knowledge;
[0113] The second knowledge triple construction unit is used to construct a target knowledge triple according to the target keyword and the target entity when the preset construction method is vocabulary attribute conversion knowledge.
[0114] Optionally, the target knowledge triple building module further includes:
[0115] A third knowledge triplet construction unit is used to construct a target knowledge triplet according to the news topic when the preset construction method is to convert the knowledge from the topic classification result;
[0116] A fourth knowledge triple construction unit is used to construct a target knowledge triple according to the target keyword and the key entity when the preset construction method is to construct knowledge based on a co-occurrence relationship;
[0117] The fifth knowledge triple construction unit is used to perform duplication detection on the news to be processed when the preset construction method is similar news processing, and construct a target knowledge triple according to the duplication detection result.
[0118] Optionally, the knowledge graph construction device further includes:
[0119] A target news analysis module, used to analyze the target news to obtain a target entity related to the target news, wherein the target entity does not include an entity related to the news metadata;
[0120] A target entity quantity determination module, used to determine a first quantity of target entities existing in the target knowledge graph;
[0121] The duplicate news determination module is used to determine whether the target news is duplicate based on the ratio of the total number of the target entities to the first number and a preset threshold.
[0122] Figure 4 The following is an example of a physical structure diagram of a device, such as Figure 4 As shown, the device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call a computer program in the memory 430 to execute the steps of the knowledge graph construction method.
[0123] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0124] On the other hand, an embodiment of the present application also provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the computer can execute the steps of the knowledge graph construction method provided in the above embodiments.
[0125] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus the necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the knowledge graph construction method described in each embodiment or some parts of the embodiment.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A knowledge graph construction method, characterized in that: include: Perform text preprocessing on the news data to be processed to obtain a word sequence; Classifying and extracting the news to be processed based on the word sequence to obtain target knowledge elements; Based on the target knowledge element and the preset construction method, construct a target knowledge triple; Generate a target knowledge graph based on the target knowledge triples.
2. The knowledge graph construction method according to claim 1, characterized in that: The text preprocessing of the news data to be processed to obtain a word sequence comprises: Acquire news data to be processed, wherein the news data to be processed includes news content plain text and news metadata; The news content plain text and the news metadata are cleaned and segmented in turn to obtain a word sequence.
3. The knowledge graph construction method according to claim 2, characterized in that: The news to be processed is classified based on the word sequence, and the target knowledge elements obtained include: Classifying the news to be processed into news types based on the word sequence to obtain case review news; The news to be processed is subject-classified based on the word sequence to obtain news subjects, and the case review news and the news subjects belong to the target knowledge element.
4. The knowledge graph construction method according to claim 3, characterized in that: The news to be processed is extracted based on the word sequence to obtain target knowledge elements including: Extracting keywords from the news to be processed based on the word sequence to obtain target keywords; Entity extraction is performed on the news to be processed based on the word sequence to obtain a target entity, and the target keyword and the target entity belong to a target knowledge element.
5. The knowledge graph construction method according to claim 4, characterized in that: The constructing of the target knowledge triple based on the target knowledge element and the preset construction method includes: In the case where the preset construction method is news metadata conversion knowledge, constructing a target knowledge triple according to the news metadata and the target entity; When the preset construction mode is vocabulary attribute conversion knowledge, a target knowledge triple is constructed according to the target keyword and the target entity.
6. The knowledge graph construction method according to claim 4, characterized in that: The constructing of the target knowledge triple based on the target knowledge element and the preset construction method further includes: In the case where the preset construction method is to convert knowledge from the topic classification result, constructing a target knowledge triple according to the news topic; When the preset construction method is to construct knowledge based on co-occurrence relationships, construct target knowledge triples according to the target keywords and key entities; When the preset construction method is similar news processing, duplicate detection is performed on the news to be processed, and a target knowledge triple is constructed according to the duplicate detection result.
7. The knowledge graph construction method according to claim 2, characterized in that: After generating the target knowledge graph based on the target knowledge triples, the method includes: Analyze the target news to obtain a target entity related to the target news, wherein the target entity does not include an entity related to the news metadata; Determining a first number of target entities present in the target knowledge graph; Based on the ratio of the total number of the target entities to the first number and a preset threshold, it is determined whether the target news is repeated.
8. A knowledge graph construction device, characterized in that: include: A text preprocessing module, used for performing text preprocessing on the news data to be processed to obtain a word sequence; A classification and extraction module, used for classifying and extracting the news to be processed based on the word sequence to obtain target knowledge elements; A target knowledge triple construction module, used to construct a target knowledge triple based on the target knowledge element and a preset construction method; A target knowledge graph generation module is used to generate a target knowledge graph based on the target knowledge triples.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the knowledge graph construction method described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the knowledge graph construction method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Psychological disease knowledge graph construction method and system
CN113128233A
Depth analysis method and system for fraud data
CN114579692A
Method, device and equipment for analyzing perceptual data by using knowledge graph and medium
CN115129897A
Extraction method and device of relation triad, equipment and storage medium
CN115146068A
Knowledge graph-based fraud detection
WO2020199621A1
Cited By
Method and device for querying path based on associated knowledge graph, medium and equipment
CN120873171A
