A method and system for processing association between knowledge graph and data

By preprocessing and classifying data documents in the enterprise knowledge base, dividing the documents into text blocks, and establishing a knowledge graph, the problem of insufficient correlation between knowledge graphs and data documents is solved, and the efficiency and accuracy of knowledge acquisition are improved.

CN119128172BActive Publication Date: 2025-04-08BEIJING ZHONGKE RUITU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411174331.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-04-08
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively associate the data documents in the enterprise knowledge base with the knowledge graph, resulting in insufficient knowledge acquisition efficiency and accuracy.

Method used

By obtaining and preprocessing the data document data, the document vector and classification vector are determined, the document is divided into text blocks, the document title extraction model is established, the initial knowledge graph is constructed, and the association relationship of the knowledge graph is determined through vector matching, and the final knowledge graph is finally generated.

Benefits of technology

It realizes efficient correlation between knowledge graphs and data documents, improves the efficiency and accuracy of knowledge acquisition, and enables users to quickly retrieve the required knowledge point data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128172B_ABST
    Figure CN119128172B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of knowledge graphs, and specifically discloses a processing method and system for associating knowledge graphs with data, including obtaining data document data, determining a document vector based on the preprocessed data document data, determining a document classification vector based on the document vector, and classifying each data document data based on the document classification vector; segmenting the data document data based on a preset keyword database, and obtaining a number of text blocks of the data document data based on the segmentation results; extracting the title of the data document data based on a document title extraction model, and constructing an initial knowledge graph based on the title of the data document data; determining the association relationship of the initial knowledge graph based on the document classification vector, the title vector and the text block vector, and determining the final knowledge graph based on the association relationship of the initial knowledge graph. Associating the knowledge graph with the data document improves the accuracy of the association between the knowledge graph and the data and the efficiency of document query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of knowledge graph technology, and more specifically, to a method and system for processing the association between knowledge graphs and data. Background Art

[0002] Knowledge Graph (KG) is a knowledge domain visualization or knowledge domain mapping map. It is a series of various graphs that show the knowledge development process and structural relationship. It uses visualization technology to describe knowledge resources and their carriers, mine, analyze, construct, draw and display knowledge and their mutual connections, and display complex knowledge fields through data mining, information processing, knowledge measurement and graph drawing. With the development of artificial intelligence technology, it currently has broad application prospects in the field of high-dimensional knowledge management.

[0003] The enterprise knowledge base is the foundation of the enterprise's cognitive brain. Its core value is to serve as a knowledge center, improve the efficiency of cognition and decision-making, and is very important for promoting the growth of the enterprise's business. Knowledge is the root of all civilizations, and it is indispensable for the development and growth of enterprises. How to manage and operate the enterprise knowledge base is the key. By establishing an enterprise knowledge base, information and knowledge assets can be preserved and accumulated, the circulation of information and knowledge within the enterprise can be accelerated, and knowledge sharing within the enterprise can be realized. Therefore, how to associate the data documents in the enterprise knowledge base with the knowledge graph to improve the efficiency and accuracy of knowledge acquisition has become a technical problem that needs to be solved in this field. Summary of the invention

[0004] The present invention provides a method and system for processing the association between a knowledge graph and data, which is used to solve the problem of associating data documents in an enterprise knowledge base with a knowledge graph in the prior art, including:

[0005] Acquire data document data, pre-process the data document data, determine a document vector based on the pre-processed data document data, determine a document classification vector based on the document vector, and classify each data document data based on the document classification vector;

[0006] Acquire a preset keyword database, segment the document data according to the preset keyword database, and obtain a plurality of text blocks of the document data according to the segmentation results;

[0007] Establish a document title extraction model, extract the title of the document data according to the document title extraction model, and construct an initial knowledge graph based on the title of the document data;

[0008] Calculate the title vector of each title and the text block vector of each text block in the initial knowledge graph, determine the association relationship of the initial knowledge graph based on the document classification vector, title vector and text block vector, and determine the final knowledge graph based on the association relationship of the initial knowledge graph.

[0009] Furthermore, determining the document vector according to the preprocessed document data includes:

[0010] Obtain document data, perform word segmentation on the document data based on the Jieba word segmentation tool, filter out stop words in the document data after word segmentation, and obtain document word segmentation;

[0011] The document word segmentation of the document data is vectorized according to the preset vector algorithm to obtain the document vector.

[0012] Further, determining the document classification vector according to the document vector includes:

[0013] Establish a document vector data set based on the document vector, set an initial k value, and randomly select the initial cluster center of the document vector data set based on the initial k value;

[0014] Calculate the Euclidean distance between each document vector in the document vector data set and the k initial cluster centers, and cluster the document vectors into the cluster with the closest Euclidean distance to the initial cluster center;

[0015] Calculate the mean of the document vectors in each cluster, and set a new cluster center based on the mean of the document vectors in each cluster;

[0016] Repeat the iteration of the new cluster center until the cluster center no longer changes, and finally obtain the k clusters. Determine the k document classification vectors according to the cluster center of each cluster.

[0017] Furthermore, the document data is segmented according to the preset keyword database, and a plurality of text blocks of the document data are obtained according to the segmentation results, including:

[0018] Finding a preset segmentation mark in the document data, segmenting the document data according to the preset segmentation mark to obtain an initial text block;

[0019] Extracting keywords from the initial text block, and calculating the relevance between the keywords in the initial text block and a preset keyword database;

[0020] If the relevance between the keywords in the initial text block and the preset keyword database is greater than a first preset threshold, the initial text block is determined as the final text block;

[0021] If the correlation between the keywords in the initial text block and the preset keyword database is less than or equal to the first preset threshold, the initial text block is merged with the adjacent subsequent text block according to the arrangement order of the text blocks in the document data to obtain a final text block.

[0022] Furthermore, the calculation of the relevance between the keywords in the initial text block and the preset keyword database includes:

[0023] Obtaining the keyword weight of each preset keyword in the preset keyword database and calculating the frequency of each keyword in the preset keyword database appearing in the initial text block;

[0024] The keywords in the initial text block are weighted and summed according to the frequency of occurrence of each keyword in the preset keyword database in the initial text block and the corresponding keyword weight, and the weighted sum value of the keywords in the initial text block is determined as the relevance of the keywords in the initial text block to the preset keyword database.

[0025] Furthermore, the step of establishing a document title extraction model and extracting the title of the document data according to the document title extraction model includes:

[0026] Establishing a data document corpus, determining the corpus content and corresponding content titles based on the data document corpus, and establishing training sample data based on the corpus content and corresponding content titles;

[0027] Establishing an initial document title extraction model according to the training sample data and training the initial document title extraction model to obtain a trained document title extraction model;

[0028] The document data is input into the trained document title extraction model, and several content titles of the document data are extracted according to the document title extraction model.

[0029] Furthermore, determining the association relationship of the initial knowledge graph according to the document classification vector, the title vector and the text block vector includes:

[0030] Calculate the matching degree between the title vector and the document classification vector, and determine the classification of the document data corresponding to the title vector according to the matching degree between the title vector and the document classification vector;

[0031] According to the classification of document data, the matching level between the title vector and the text block vector in the document data classification is determined, and according to the matching level between the title vector and the text block vector in the document data classification, the association relationship of the initial knowledge graph is determined.

[0032] Furthermore, the calculating the matching degree between the title vector and the document classification vector includes:

[0033] Obtaining the number of document vectors in each document data classification, calculating the ratio of the number of document vectors to all document vectors, and determining the classification weight of the document data classification according to the ratio of the number of document vectors to all document vectors;

[0034] Calculate the cosine similarity between the title vector and the document classification vector, and multiply the cosine similarity between the title vector and the document classification vector by the classification weight of the corresponding document data classification;

[0035] The matching degree between the title vector and the document classification vector is determined according to the product of the cosine similarity between the title vector and the document classification vector and the classification weight of the corresponding document data classification.

[0036] Furthermore, the determining of the matching level between the title vector and the text block vector in the classification of the document data according to the classification of the document data includes:

[0037] Calculate the cosine similarity between the title vector and the text block vector in the document data classification to obtain the title similarity;

[0038] Obtaining a preset similarity tolerance value, calculating a difference between the title similarity and the preset similarity tolerance value, and determining whether the difference between the title similarity and the preset similarity tolerance value is greater than a second preset threshold;

[0039] If the difference between the title similarity and the preset similarity tolerance value is greater than the second preset threshold, the preset first matching level is used as the matching level between the title vector and the text block vector in the document data classification;

[0040] If the difference between the title similarity and the preset similarity tolerance value is less than or equal to the second preset threshold, determining whether the difference between the title similarity and the preset similarity tolerance value is greater than a third preset threshold;

[0041] If the difference between the title similarity and the preset similarity tolerance value is greater than the third preset threshold, the preset second matching level is used as the matching level between the title vector and the text block vector in the document data classification;

[0042] If the difference between the title similarity and the preset similarity tolerance value is less than or equal to the third preset threshold, the preset third matching level is used as the matching level between the title vector and the text block vector in the document data classification.

[0043] In order to achieve the above object, the present invention also provides a processing system for associating a knowledge graph with data, including:

[0044] The first module is used to obtain document data, pre-process the document data, determine a document vector based on the pre-processed document data, determine a document classification vector based on the document vector, and classify each document data based on the document classification vector;

[0045] The second module is used to obtain a preset keyword database, segment the document data according to the preset keyword database, and obtain a number of text blocks of the document data according to the segmentation results;

[0046] The third module is used to establish a document title extraction model, extract the title of the document data according to the document title extraction model, and construct an initial knowledge graph according to the title of the document data;

[0047] The fourth module is used to calculate the title vector of each title and the text block vector of each text block in the initial knowledge graph, determine the association relationship of the initial knowledge graph according to the document classification vector, title vector and text block vector, and determine the final knowledge graph according to the association relationship of the initial knowledge graph.

[0048] The beneficial effects of the present invention are:

[0049] By applying the above technical solutions, the present invention combines the knowledge graph with document data, so that users can search for corporate data based on the knowledge graph. By classifying the document data, the scope of document retrieval is narrowed, thereby improving the retrieval efficiency. By calculating the matching degree of document classification vectors, title vectors and text block vectors, the retrieval accuracy is improved. When searching through the knowledge graph, users can quickly extract the required knowledge point data. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 The overall flow chart of a method for processing the association between a knowledge graph and data proposed in an embodiment of the present invention is shown;

[0052] Figure 2 A schematic diagram of the structure of a knowledge graph and data-associated processing system proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] The present application embodiment provides a method for processing the association between a knowledge graph and data, such as Figure 1 As shown, including:

[0055] S101, obtaining document data, preprocessing the document data, determining a document vector according to the preprocessed document data, determining a document classification vector according to the document vector, and classifying each document data according to the document classification vector;

[0056] In some embodiments of the present application, determining the document vector based on the preprocessed data document data includes: obtaining the data document data, performing word segmentation processing on the data document data based on the jieba word segmentation tool, filtering out stop words in the data document data after the word segmentation processing, and obtaining document word segmentation; performing vectorization processing on the document word segmentation of the data document data according to a preset vector algorithm to obtain a document vector.

[0057] In this embodiment, multiple data document data are obtained from the knowledge base, each data document data is segmented based on the jieba word segmentation tool and stop words that have no practical meaning are filtered out, and the document segmentation is vectorized based on the word2vec algorithm to obtain the document vector corresponding to each data document data.

[0058] In some embodiments of the present application, the method of determining a document classification vector based on a document vector includes: establishing a document vector data set based on the document vector, setting an initial k value, and randomly selecting an initial cluster center of the document vector data set based on the initial k value; calculating the Euclidean distance between each document vector in the document vector data set and the k initial cluster centers, and clustering the document vectors into clusters with the closest Euclidean distance to the initial cluster centers; calculating the mean of the document vectors within each cluster, and setting a new cluster center based on the mean of the document vectors within each cluster; repeatedly iterating the new cluster center until the cluster center no longer changes, thereby obtaining the final k clusters, and determining k document classification vectors based on the cluster center of each cluster.

[0059] In this embodiment, the document vectors in the document data are clustered based on the k-means clustering algorithm, the initial k value is set to 8, the document data are clustered into 8 categories according to the document vectors, and the cluster center of each cluster is extracted as the document classification vector of each category.

[0060] S102, obtaining a preset keyword database, segmenting the document data according to the preset keyword database, and obtaining a plurality of text blocks of the document data according to the segmentation result;

[0061] In some embodiments of the present application, the data document data is segmented according to a preset keyword database, and a plurality of text blocks of the data document data are obtained according to the segmentation results, including: searching for preset segmentation characters in the data document data, segmenting the data document data according to the preset segmentation characters, and obtaining initial text blocks; extracting keywords in the initial text blocks, and calculating the correlation between the keywords in the initial text blocks and the preset keyword database; if the correlation between the keywords in the initial text blocks and the preset keyword database is greater than a first preset threshold, determining the initial text block as the final text block; if the correlation between the keywords in the initial text block and the preset keyword database is less than or equal to the first preset threshold, merging the initial text block with an adjacent subsequent text block according to the arrangement order of the text blocks in the data document data, and obtaining a final text block.

[0062] In this embodiment, the preset segmentation mark can be a separator such as a paragraph mark or a line break in the document data, and the keyword is a high-frequency word in the initial text block. The final text block is obtained by the correlation between the keywords in the initial text block and the preset keyword database.

[0063] In some embodiments of the present application, the calculation of the relevance between the keywords in the initial text block and the preset keyword database includes: obtaining the keyword weight of each preset keyword in the preset keyword database and calculating the frequency of occurrence of each keyword in the preset keyword database in the initial text block; performing weighted summation of the keywords in the initial text block according to the frequency of occurrence of each keyword in the preset keyword database in the initial text block and the corresponding keyword weight, and determining the weighted sum value of the keywords in the initial text block as the relevance between the keywords in the initial text block and the preset keyword database.

[0064] In this embodiment, each keyword is preset with a keyword weight, and the relevance between the keyword in the initial text block and the preset keyword database is obtained by weighted sum of each keyword weight and the frequency of the keyword in the initial text block.

[0065] S103, establishing a document title extraction model, extracting the titles of the document data according to the document title extraction model, and constructing an initial knowledge graph according to the titles of the document data;

[0066] In some embodiments of the present application, the establishment of a document title extraction model and extracting the titles of data document data according to the document title extraction model include: establishing a data document corpus, determining the corpus content and corresponding content titles according to the data document corpus, and establishing training sample data according to the corpus content and corresponding content titles; establishing an initial document title extraction model according to the training sample data and training the initial document title extraction model to obtain a trained document title extraction model; inputting the data document data into the trained document title extraction model, and extracting several content titles of the data document data according to the document title extraction model.

[0067] In this embodiment, a document title extraction model is established, and the document title extraction model is used to extract the corpus content and the corresponding content title in the document data.

[0068] S104, calculate the title vector of each title and the text block vector of each text block in the initial knowledge graph, determine the association relationship of the initial knowledge graph based on the document classification vector, the title vector and the text block vector, and determine the final knowledge graph based on the association relationship of the initial knowledge graph.

[0069] In some embodiments of the present application, the method of determining the association relationship of the initial knowledge graph based on the document classification vector, the title vector and the text block vector includes: calculating the matching degree between the title vector and the document classification vector, and determining the classification of the data document data corresponding to the title vector based on the matching degree between the title vector and the document classification vector; determining the matching level between the title vector and the text block vector in the data document data classification based on the classification of the data document data, and determining the association relationship of the initial knowledge graph based on the matching level between the title vector and the text block vector in the data document data classification.

[0070] In some embodiments of the present application, the calculation of the matching degree between the title vector and the document classification vector includes: obtaining the number of document vectors in each data document data classification, calculating the ratio of the number of document vectors to all document vectors, and determining the classification weight of the data document data classification according to the ratio of the number of document vectors to all document vectors; calculating the cosine similarity between the title vector and the document classification vector, multiplying the cosine similarity between the title vector and the document classification vector by the classification weight of the corresponding data document data classification; determining the matching degree between the title vector and the document classification vector according to the product of the cosine similarity between the title vector and the document classification vector and the classification weight of the corresponding data document data classification.

[0071] In this embodiment, the number of document vectors in each document data classification is counted to obtain the classification weight of the corresponding document data classification. The matching degree between the title vector and the document classification vector is obtained by multiplying the classification weight with the cosine similarity between the title vector and the document classification vector.

[0072] In some embodiments of the present application, the method of determining the matching level of the title vector and the text block vector in the data document data classification according to the classification of the data document data includes: calculating the cosine similarity between the title vector and the text block vector in the data document data classification to obtain the title similarity; obtaining a preset similarity tolerance value, calculating the difference between the title similarity and the preset similarity tolerance value, and determining whether the difference between the title similarity and the preset similarity tolerance value is greater than a second preset threshold value; if the difference between the title similarity and the preset similarity tolerance value is greater than the second preset threshold value, then using the preset first matching level as the matching level between the title vector and the data document data classification. the matching level of the text block vector in the document data classification; if the difference between the title similarity and the preset similarity tolerance value is less than or equal to the second preset threshold, then determine whether the difference between the title similarity and the preset similarity tolerance value is greater than the third preset threshold; if the difference between the title similarity and the preset similarity tolerance value is greater than the third preset threshold, then use the preset second matching level as the matching level of the title vector and the text block vector in the document data classification; if the difference between the title similarity and the preset similarity tolerance value is less than or equal to the third preset threshold, then use the preset third matching level as the matching level of the title vector and the text block vector in the document data classification.

[0073] In this embodiment, the matching level is determined by the difference between the title similarity and the preset similarity tolerance value. The larger the difference between the title similarity and the preset similarity tolerance value, the lower the corresponding matching level, thereby obtaining the association relationship between the document data and the initial knowledge graph.

[0074] In another aspect, the present invention proposes a processing system for associating a knowledge graph with data, the system comprising:

[0075] The first module is used to obtain data document data, preprocess the data document data, determine the document vector based on the preprocessed data document data, determine the document classification vector based on the document vector, and classify each data document data based on the document classification vector; the second module is used to obtain a preset keyword database, segment the data document data according to the preset keyword database, and obtain several text blocks of the data document data according to the segmentation results; the third module is used to establish a document title extraction model, extract the title of the data document data according to the document title extraction model, and construct an initial knowledge graph based on the title of the data document data; the fourth module is used to calculate the title vector of each title in the initial knowledge graph and the text block vector of the text block, determine the association relationship of the initial knowledge graph based on the document classification vector, the title vector and the text block vector, and determine the final knowledge graph based on the association relationship of the initial knowledge graph.

[0076] By applying the above technical solutions, the present invention obtains data document data, pre-processes the data document data, determines a document vector based on the pre-processed data document data, determines a document classification vector based on the document vector, and classifies each data document data based on the document classification vector; obtains a preset keyword database, segments the data document data based on the preset keyword database, and obtains several text blocks of the data document data based on the segmentation results; establishes a document title extraction model, extracts the title of the data document data based on the document title extraction model, and constructs an initial knowledge graph based on the title of the data document data; calculates the title vector of each title in the initial knowledge graph and the text block vector of the text block, determines the association relationship of the initial knowledge graph based on the document classification vector, the title vector and the text block vector, and determines the final knowledge graph based on the association relationship of the initial knowledge graph. The knowledge graph is associated with the data document, which improves the accuracy of the association between the knowledge graph and the data and the efficiency of document query.

[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present invention can be implemented by hardware, or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard 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 methods described in each implementation scenario of the present invention.

[0078] 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 cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing association between a knowledge graph and data, characterized in that: include: Acquire data document data, pre-process the data document data, determine a document vector based on the pre-processed data document data, determine a document classification vector based on the document vector, and classify each data document data based on the document classification vector; Acquire a preset keyword database, segment the document data according to the preset keyword database, and obtain a plurality of text blocks of the document data according to the segmentation results; Establish a document title extraction model, extract the title of the document data according to the document title extraction model, and construct an initial knowledge graph based on the title of the document data; Calculate the title vector of each title and the text block vector of each text block in the initial knowledge graph, determine the association relationship of the initial knowledge graph based on the document classification vector, the title vector and the text block vector, and determine the final knowledge graph based on the association relationship of the initial knowledge graph; The document data is segmented according to the preset keyword database, and a plurality of text blocks of the document data are obtained according to the segmentation results, including: Finding a preset segmentation mark in the document data, segmenting the document data according to the preset segmentation mark to obtain an initial text block; Extracting keywords from the initial text block, and calculating the relevance between the keywords in the initial text block and a preset keyword database; If the relevance between the keywords in the initial text block and the preset keyword database is greater than a first preset threshold, the initial text block is determined as the final text block; If the relevance between the keywords in the initial text block and the preset keyword database is less than or equal to a first preset threshold, the initial text block is merged with an adjacent subsequent text block according to the arrangement order of the text blocks in the document data to obtain a final text block; The calculating the relevance between the keywords in the initial text block and the preset keyword database includes: Obtaining the keyword weight of each preset keyword in the preset keyword database and calculating the frequency of each keyword in the preset keyword database appearing in the initial text block; The keywords in the initial text block are weighted and summed according to the frequency of occurrence of each keyword in the preset keyword database in the initial text block and the corresponding keyword weight, and the weighted sum value of the keywords in the initial text block is determined as the relevance of the keywords in the initial text block to the preset keyword database.

2. The method for processing the association between a knowledge graph and data according to claim 1, characterized in that: The step of determining the document vector according to the preprocessed document data includes: Obtain document data, perform word segmentation on the document data based on the Jieba word segmentation tool, filter out stop words in the document data after word segmentation, and obtain document word segmentation; The document word segmentation of the document data is vectorized according to the preset vector algorithm to obtain the document vector.

3. The method for processing the association between a knowledge graph and data according to claim 2, characterized in that: The step of determining the document classification vector according to the document vector includes: Establish a document vector data set based on the document vector, set an initial k value, and randomly select the initial cluster center of the document vector data set based on the initial k value; Calculate the Euclidean distance between each document vector in the document vector data set and the k initial cluster centers, and cluster the document vectors into the cluster with the closest Euclidean distance to the initial cluster center; Calculate the mean of the document vectors in each cluster, and set a new cluster center based on the mean of the document vectors in each cluster; Repeat the iteration of the new cluster center until the cluster center no longer changes, and finally obtain the k clusters. Determine the k document classification vectors according to the cluster center of each cluster.

4. The method for processing the association between a knowledge graph and data according to claim 1, characterized in that: The step of establishing a document title extraction model and extracting the title of the document data according to the document title extraction model includes: Establishing a data document corpus, determining the corpus content and corresponding content titles based on the data document corpus, and establishing training sample data based on the corpus content and corresponding content titles; Establishing an initial document title extraction model according to the training sample data and training the initial document title extraction model to obtain a trained document title extraction model; The document data is input into the trained document title extraction model, and several content titles of the document data are extracted according to the document title extraction model.

5. The method for processing the association between knowledge graph and data according to claim 3, characterized in that: The determining of the association relationship of the initial knowledge graph according to the document classification vector, the title vector and the text block vector includes: Calculate the matching degree between the title vector and the document classification vector, and determine the classification of the document data corresponding to the title vector according to the matching degree between the title vector and the document classification vector; According to the classification of document data, the matching level between the title vector and the text block vector in the document data classification is determined, and according to the matching level between the title vector and the text block vector in the document data classification, the association relationship of the initial knowledge graph is determined.

6. The method for processing the association between a knowledge graph and data according to claim 5, characterized in that: The calculating the matching degree between the title vector and the document classification vector includes: Obtaining the number of document vectors in each document data classification, calculating the ratio of the number of document vectors to all document vectors, and determining the classification weight of the document data classification according to the ratio of the number of document vectors to all document vectors; Calculate the cosine similarity between the title vector and the document classification vector, and multiply the cosine similarity between the title vector and the document classification vector by the classification weight of the corresponding document data classification; The matching degree between the title vector and the document classification vector is determined according to the product of the cosine similarity between the title vector and the document classification vector and the classification weight of the corresponding document data classification.

7. The method for processing the association between a knowledge graph and data according to claim 6, characterized in that: The step of determining the matching level between the title vector and the text block vector in the classification of the document data according to the classification of the document data includes: Calculate the cosine similarity between the title vector and the text block vector in the document data classification to obtain the title similarity; Obtaining a preset similarity tolerance value, calculating a difference between the title similarity and the preset similarity tolerance value, and determining whether the difference between the title similarity and the preset similarity tolerance value is greater than a second preset threshold; If the difference between the title similarity and the preset similarity tolerance value is greater than the second preset threshold, the preset first matching level is used as the matching level between the title vector and the text block vector in the document data classification; If the difference between the title similarity and the preset similarity tolerance value is less than or equal to the second preset threshold, determining whether the difference between the title similarity and the preset similarity tolerance value is greater than a third preset threshold; If the difference between the title similarity and the preset similarity tolerance value is greater than the third preset threshold, the preset second matching level is used as the matching level between the title vector and the text block vector in the document data classification; If the difference between the title similarity and the preset similarity tolerance value is less than or equal to the third preset threshold, the preset third matching level is used as the matching level between the title vector and the text block vector in the document data classification.

8. A processing system for associating knowledge graphs with data, characterized in that: include: The first module is used to obtain document data, pre-process the document data, determine a document vector based on the pre-processed document data, determine a document classification vector based on the document vector, and classify each document data based on the document classification vector; The second module is used to obtain a preset keyword database, segment the document data according to the preset keyword database, and obtain a number of text blocks of the document data according to the segmentation results; The third module is used to establish a document title extraction model, extract the title of the document data according to the document title extraction model, and construct an initial knowledge graph according to the title of the document data; The fourth module is used to calculate the title vector of each title and the text block vector of each text block in the initial knowledge graph, determine the association relationship of the initial knowledge graph according to the document classification vector, the title vector and the text block vector, and determine the final knowledge graph according to the association relationship of the initial knowledge graph; The second module segments the document data according to the preset keyword database, and obtains several text blocks of the document data according to the segmentation results, including: Finding a preset segmentation mark in the document data, segmenting the document data according to the preset segmentation mark to obtain an initial text block; Extracting keywords from the initial text block, and calculating the relevance between the keywords in the initial text block and a preset keyword database; If the relevance between the keywords in the initial text block and the preset keyword database is greater than a first preset threshold, the initial text block is determined as the final text block; If the relevance between the keywords in the initial text block and the preset keyword database is less than or equal to a first preset threshold, the initial text block is merged with an adjacent subsequent text block according to the arrangement order of the text blocks in the document data to obtain a final text block; The calculating the relevance between the keywords in the initial text block and the preset keyword database includes: Obtaining the keyword weight of each preset keyword in the preset keyword database and calculating the frequency of each keyword in the preset keyword database appearing in the initial text block; The keywords in the initial text block are weighted and summed according to the frequency of occurrence of each keyword in the preset keyword database in the initial text block and the corresponding keyword weight, and the weighted sum value of the keywords in the initial text block is determined as the relevance of the keywords in the initial text block to the preset keyword database.

Citation Information

Patent Citations

  • Method, device and equipment for managing digital content and readable storage medium

    CN113010869A