Data mining analysis method based on entity recognition and relation extraction

By using the BERT-BiLSTM-CRF model for entity recognition and relationship extraction in digital archives management, combined with Pkuseg, CBOW and BiLSTM, and using graph structure and deep reinforcement learning to build a knowledge graph, the problem of low correlation of archive data is solved and achieved The in-depth mining and efficient utilization of archive data improves the efficiency of archives management and resource utilization.

CN118550987APending Publication Date: 2024-08-27安徽明生恒卓科技有限公司
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410342193.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The data correlation and utilization rate in existing digital archives management are low, leading to the problem of insufficient utilization of archive resources.

Method used

The entity recognition model based on BERT-BiLSTM-CRF is combined with Pkuseg, CBOW and BiLSTM, and the word attention mechanism is introduced to conduct hybrid knowledge reasoning through graph structure, embedding representation and deep reinforcement learning, build a knowledge graph, and realize deep mining of archival data. and analysis.

Benefits of technology

It improves the relevance and utilization of archive data, assists users in archive correlation analysis and intelligent retrieval, provides data support for archive research and decision-making, and improves the efficiency of smart archive management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550987A
    Figure CN118550987A
Patent Text Reader

Abstract

The invention discloses a data mining analysis method based on entity recognition and relation extraction, which comprises the following steps: collecting archive data, classifying and sorting, and obtaining archive text data through preliminary data recognition and data cleaning; the BERT-BiLSTM-CRF entity recognition model is used for carrying out entity recognition on the archive text data, and a result with an entity mark is output; in combination with Pkuseg, CBOW and BiLSTM, introducing a word attention mechanism, and performing entity relationship extraction on a result with entity marks to obtain a relationship between entities; based on a graph structure, embedded representation and deep reinforcement learning method, mixed knowledge reasoning is performed on entities and relationships thereof to obtain a knowledge graph, deep mining and analysis of digital archive data are realized, the association degree and the utilization rate of the archive data are improved, the utilization value of the archive data is brought into full play, a user is assisted to perform archive association analysis and intelligent retrieval, and the user experience is improved. Data support is provided for archive research and judgment decision, and the intelligent archive management efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital archive management, and in particular to a data mining and analysis method based on entity recognition and relationship extraction. Background Art

[0002] Archives, as the sedimentation and accumulation of history, provide the most fundamental basis for human development. With the continuous updating and development of modern technology, archival data management has gradually tended towards digitization and informatization. The current archival data management forms mainly include electronic archives and paper archives. In the existing technology, paper archives are managed by traditional manual methods, which has an increasing demand for physical storage space and creates huge management work for managers. When archival data is classified, stored and managed by computers, there are problems such as low relevance of archival data, resulting in low utilization of archival resources. Research on archival data management from the perspective of archival data entity content is of great significance for improving the efficiency of archival data management and the actual utilization rate of archival data.

[0003] Data mining and analysis technology is the intersection of machine learning and database management. With the support of database management technology, a large amount of data is extracted from the database, and analyzed through machine learning technology to mine potentially valuable information. There have been many successful examples of applying data mining and analysis technology in archive management work, mainly through multidimensional data analysis tools, data mining tools, etc. to conduct data statistical analysis. However, in the era of rapid development of Internet technology, smart archive management requires us to be able to explore the deeper meaning of archives, such as the relationship between a person and other people, the relationship with related institutions, and the relationship with certain events, so as to realize the association analysis and recommendation of people, cities, events, works, etc. related to the archives research object, assist users in archives association analysis and intelligent retrieval, and provide data support for archives research and decision-making. Summary of the invention

[0004] The present invention is mainly to solve the problems of low data relevance and utilization in the existing digital archive management. It provides a data mining and analysis method based on entity recognition and relationship extraction. Entity recognition is realized through the BERT-BiLSTM-CRF entity recognition model. In combination with Pkuseg, CBOW and BiLSTM, a word attention mechanism is introduced to realize entity relationship extraction. Based on graph structure, embedded representation and deep reinforcement learning, hybrid knowledge reasoning is performed on entities and their relationships to obtain a knowledge graph, so as to realize deep mining and analysis of digital archive data, improve the relevance and utilization of archive data, give full play to the utilization value of archive data, assist users in archive association analysis and intelligent retrieval, and provide data support for archive research and decision-making.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions.

[0006] A data mining analysis method based on entity recognition and relationship extraction includes the following steps: Step S1: Collect and classify archival materials, and obtain archival text data through preliminary data identification and data cleaning; Step S2: Use the BERT-BiLSTM-CRF entity recognition model to perform entity recognition on the archive text data and output the results with entity tags; Step S3: Combine Pkuseg, CBOW and BiLSTM, introduce the word attention mechanism, extract entity relations from the results with entity tags, and obtain the relations between entities; Step S4: Based on the graph structure, embedded representation and deep reinforcement learning methods, hybrid knowledge reasoning is performed on entities and their relationships to obtain a knowledge graph.

[0007] The present invention provides a data mining and analysis method based on entity recognition and relationship extraction, collects archival materials and classifies them, obtains archival text data through preliminary data recognition and data cleaning; performs entity recognition through the BERT-BiLSTM-CRF entity recognition model, combines Pkuseg, CBOW and BiLSTM, introduces a word attention mechanism, performs entity relationship extraction, and performs hybrid knowledge reasoning on entities and their relationships based on graph structure, embedded representation and deep reinforcement learning to obtain a knowledge graph, realizes deep-level mining and analysis of digital archival data, improves the relevance and utilization rate of archival data, gives full play to the utilization value of archival data, assists users in archival relevance analysis and intelligent retrieval, provides data support for archival research and decision-making, and improves the efficiency of smart archive management.

[0008] Preferably, the specific process of step S2 includes the following steps: Step S21: Use the BERT pre-trained language model to convert the text into a semantically rich sentence vector; Step S22: using the BiLSTM bidirectional long short-term memory network model to extract contextual semantic features of the sentence vector, including using the forward layer LSTM of the BiLSTM to obtain the semantic features of the previous text, using the backward layer LSTM to obtain the semantic features of the following text, and then combining the two to obtain the final features; Step S23: After adding constraints to the labels output in step S22 using the CRF conditional random field, the optimal label sequence is output.

[0009] The present invention performs entity recognition through the BERT-BiLSTM-CRF model, which mainly includes three parts. The first is the BERT pre-trained language model, which converts the unstructured text data of the archive into a vector form and extracts the rich semantic features contained in the data, and then further extracts the context features in the data through the BiLSTM model, and finally adds constraints through CRF to reduce the generation of error sequences and output the final tag sequence. CRF (conditional random field) technology imposes necessary constraints and restrictions on the labels output by the model, effectively avoiding the appearance of unreasonable entity labels.

[0010] Preferably, in step S21, as a key part of BERT, the Transformer encoder based on the self-attention mechanism adjusts the weight sparse matrix by calculating the degree of association between each sentence and other sentences in the full-text data, thereby obtaining the expression of the feature vector of the sentence.

[0011] The present invention uses a pre-trained Chinese BERT model to obtain rich semantic information in the context, and uses Transformers for pre-training to generate deep bidirectional language representation information.

[0012] Preferably, the specific process of step S22 includes the following steps: Step S221: Calculate the forget gate and select the information to be forgotten; the input is the text data of the current module and the output h of the text data of the previous module t-1 , maps the previous neuron cell state to 0-1, 0 means complete deletion, 1 means complete retention, the calculation formula is as follows: f t =σ(W f x t +U f h t-1 +V f c t-1) ; Step S222: Calculate the memory gate and select the information to be memorized; the input is the text data of the current module and the output h of the text data of the previous module t-1 , the value i that needs to be updated is determined by the input layer Sigmoid activation function t , use the tanh function to create a new candidate value vector And add it to the neuron state, update the neuron state to get C t , the calculation formula is as follows: i t =σ(W i x t +U i h t-1 +V i ct-1 ); Step S223: Calculate the output gate and the current hidden layer state, select the output value; determine the output neuron state through the Sigmoid activation function of the output layer. t , the neuron state is processed by the tanh function and multiplied by the output of the Sigmoid gate to obtain the final output part h t , the calculation formula is as follows: o t =σ(W o x t +U o h t-1 +V o c t ); h t =o t ⊙tanh(c t ).

[0013] The LSTM model is a special recurrent neural network. The internal structure of the hidden unit in the network structure is very complex. By introducing memory units and gated memory units to save historical information and long-term states, and using gates to control the flow of information, the storage and update of context information are effectively realized. The structure of LSTM includes: forget gate, input gate and output gate. The calculation process is: using the external state h at the previous moment t-1 and the current input x t , calculate three gates and candidate states Combined with forget gate f t and input gate i t To update the memory cell c t ; Combined with output gate O t , passing the information of the internal state to the external state h t . However, there is still a problem when LSTM performs feature extraction: it cannot encode information from the back to the front. For example, "Xiao Ming's academic performance is very good", where "very good" is a modification of "academic performance". To solve this problem, the forward LSTM and the reverse LSTM are combined into BiLSTM, which can better capture bidirectional semantic dependencies. In the cell unit of BiLSTM, a unique "gate" mechanism is introduced, which enables the neural network to accurately remember key information while forgetting secondary information, thereby significantly enhancing the neural network's ability to understand the semantics of long texts.

[0014] Preferably, the construction process of the BERT-BiLSTM-CRF entity recognition model in step S2 specifically includes the following steps: Step A1: Construct a training set using limited manually annotated data; Step A2: Use the BERT model to convert the text in the training set into a semantically rich sentence vector representation; Step A3: Use the sentence vectors from step A2 to train the BiLSTM-CRF model to obtain a trained BiLSTM-CRF model; Step A4: Convert the unlabeled full-text data into sentence vectors through the BERT model, and input them into the trained BiLSTM-CRF model in step A3 for label prediction; Step A5: Perform confidence evaluation on the prediction results of step A4, select samples with confidence higher than the set threshold into the existing training set, and further train the BiLSTM-CRF model until the entity recognition model with the best performance is obtained.

[0015] At the entity recognition level, the present invention accurately extracts existing entities from the full-text data. Entity recognition is the cornerstone of building a knowledge graph, and its accuracy is crucial to the quality of the knowledge graph. In order to improve the accuracy of entity recognition, the present invention also proposes a self-supervised deep learning model training method to solve the problem that traditional deep learning models require a large amount of manually labeled data. Specifically, a training set is first constructed using limited manually labeled data; then, with the help of the Bert model, the text in the training set is converted into a semantically rich sentence vector representation; finally, these sentence vectors are used to train a BiLSTM-CRF entity recognition model, thereby achieving efficient entity recognition with less manually labeled data. After the entity recognition model training is completed, the unlabeled full-text data is converted into sentence vectors through the BERT model, and the trained model is used for label prediction; then, the prediction results are evaluated for confidence, and a confidence threshold is set; those samples with confidence higher than the threshold will be selected into the existing training set for further training of the entity recognition model. This process will be repeated until the model performance is no longer improved. Finally, the full-text data is input into the trained entity recognition model to output results with entity tags.

[0016] Preferably, the specific process of step S3 includes the following steps: Step S31: Use the Pkuseg word segmentation tool to perform word segmentation processing on the full text data to obtain the word segmentation result; Step S32: using the CBOW continuous bag of words model to convert the word segmentation results into word vectors with rich semantic information; Step S33: using the BiLSTM bidirectional long short-term memory network model to capture the overall semantic encoding of the full-text data; Step S34: introducing the attention mechanism, automatically adjusting the weights according to the sample data, and obtaining the entity relationship extraction prediction results; Step S35: Use the result of entity recognition to correct the prediction result of entity relationship extraction to obtain the head entity-relationship-tail entity triple (h, r, t).

[0017] On the basis of entity recognition, the complex relationship between entities and full-text data is further extracted and analyzed. In order to ensure the accuracy of entity segmentation, all identified entities are included in the user dictionary of Pkuseg. Subsequently, Pkuseg is used to perform detailed segmentation on the full-text data, and the segmentation results are input into the CBOW continuous bag-of-words model to be converted into word vectors with rich semantic information. Next, BiLSTM is used to capture the overall semantic encoding of the full-text data. However, considering that the full-text data contains a large amount of irrelevant noise information in addition to entities and their relationships, an attention mechanism is introduced into the relationship extraction model. This mechanism can automatically adjust the weights according to the sample data, so that the model focuses more on entities and their relationships, while relatively ignoring noise information, thereby improving the accuracy and efficiency of relationship extraction.

[0018] Preferably, the specific process of step S34 includes the following steps: Step S341: Based on the feature vector h output by BiLSTM in step S33 i , calculate the attention weight e ti , the calculation formula is as follows: e ti =a(s t-1 ,h i ); Step S342: According to the attention weight e ti , calculate the attention weight probability vector a ti , the calculation formula is as follows: Step S343: Based on the feature vector h output by BiLSTM in step S33 i and the attention weight probability vector a ti , calculate the attention weight configuration c t , the calculation formula is as follows:

[0019] e ti For the alignment model, it represents the influence of the state of the BiLSTM layer at the moment on the output layer at the moment of connection, which is calculated by the state of the BiLSTM layer at the moment and the state of the output layer at the moment. ti Perform softmax normalization to obtain the attention weight probability vector ati .c t Represents the semantic vector of the output layer at time t, which is obtained by multiplying the hidden states at multiple times and their corresponding attention weights. Using the attention mechanism can not only improve the accuracy of relation extraction, but also reduce the computational complexity of the model and improve the operating efficiency of the model.

[0020] Preferably, the specific process of step S4 includes the following steps: Step S41: constructing a path using a graph structure; Step S42: Convert the path into a vector using the embedded representation; Step S43: Entities and relationships are regarded as state space and action space respectively, and state conversion is realized through entity wandering. When the correct entities and relationships are found, the model is rewarded, thereby training and optimizing the model; Step S44: After the training is completed, the vector is input into the deep reinforcement learning model for knowledge reasoning, completing the relationship in the knowledge graph, and finally outputting a complete knowledge graph.

[0021] After entity recognition and relationship extraction, a large number of "head entity-relationship-tail entity" triplets are obtained. However, there is an obvious problem that the relationship between entities is relatively sparse, which is not conducive to the integrity of the knowledge graph. In order to solve this problem, the present invention introduces knowledge reasoning, which can effectively enrich the relationship between entities, thereby achieving the purpose of supplementing the knowledge graph. Among the many knowledge reasoning methods, the method based on graph structure has high interpretability, but its computational complexity is high, which is difficult to apply for large knowledge graphs. Although the method based on embedded representation has high computational performance, its interpretability is relatively weak. In addition, the knowledge reasoning method based on deep reinforcement learning performs well, but also faces the problem of insufficient interpretability. In order to combine the advantages of these three methods, the present invention proposes a hybrid knowledge reasoning method, which first uses the graph structure to construct the path to ensure the interpretability of the model; then, the path is converted into a vector using embedded representation to improve computational efficiency; then, the knowledge reasoning task is converted into a decision problem, and the entity and relationship are regarded as state space and action space respectively. Through the wandering of the entity, the state conversion can be realized; when the correct entity and relationship are found, the model is rewarded, so as to train and optimize the model. After training is completed, the vector is input into the deep reinforcement learning model for knowledge reasoning to complete the relationships in the knowledge graph. Finally, the constructed knowledge graph is output, which is a more complete and relationship-rich knowledge graph.

[0022] Knowledge graphs are used to organize digital archival resources in a knowledge-based manner, enabling collaborative management and timely feedback of various types of information, providing auxiliary functions for archival correlation analysis and intelligent retrieval, while improving archival query efficiency and user experience, making archival work not only as a "custodian" but also a "knowledge provider."

[0023] The specific process of step S42 includes the following steps: Step S421: Use the TransH model to abstract each relationship into a normal vector w r The hyperplane of w is used to enhance the semantic difference of different entities under the same relationship, and to simplify the calculation, the constraint w r is the unit normal vector; Step S422: Project the head entity and the tail entity in the fact triple (h, r, t) obtained in step S35 onto the hyperplane, denoted as h ⊥ and t ⊥ ; Step S423: Define the loss function through soft constraints, use the stochastic gradient descent method to minimize the loss function to train the model, and obtain the embedded representation of entities and relationships.

[0024] Based on the TransE model, TransH introduces a hyperplane to replace the original relationship vector, focusing on solving the problems of reflexivity, one-to-many, many-to-one and many-to-many in the relationship in the graph. Since the knowledge graphs used and constructed by the present invention have asymmetric relationships such as one-to-many and many-to-many, and due to the large amount of data, it is necessary to find a balance between model capacity and efficiency. Therefore, the TransH model is selected for graph data embedding representation to ensure good performance in entity and relationship embedding representation tasks.

[0025] Preferably, the specific process of step S1 includes the following steps: Step S11: Collect archival materials and sort out archival materials categories; Step S12: extracting information from the sorted archive materials through text recognition, image recognition, voice recognition, and lens slicing technology to form preliminary digital archive information and save it in the database; Step S13: Clean up invalid information in the preliminary information of the digital archive to obtain valid archive text data.

[0026] The present invention realizes automatic recognition and extraction of key feature information such as name, date of birth, time of joining the work, and educational background in materials through OCR recognition of material forms and material files, and constructs a structured data center for personnel file materials, which specifically includes: data sorting: sorting the personnel file materials of cadres in the archives room, such as paper documents, pictures (some of which need to be processed by image denoising, etc.), and video materials, and combing ten categories of file materials; data recognition: extracting information from the above-mentioned file materials (text, pictures, videos) through text recognition, image recognition, voice recognition, lens slicing and other technologies to form preliminary digital file information and save it in the database; data cleaning: cleaning some useless information in the preliminary digital file information, such as header information in documents, advertising information in videos, and simplifying some traditional Chinese information in file handwritings, etc.

[0027] Therefore, the advantages of the present invention are: (1) Entity recognition is achieved through the BERT-BiLSTM-CRF entity recognition model; BiLSTM can better capture bidirectional semantic dependencies, and the introduction of the gate mechanism enables the neural network to accurately remember key information while forgetting secondary information, thereby significantly enhancing the neural network's ability to understand the semantics of long texts; CRF imposes necessary constraints and restrictions on the labels output by the model, effectively avoiding the emergence of unreasonable entity labels; (2) A self-supervised deep learning model training method is proposed, which solves the problem that traditional deep learning models require a large amount of manually labeled data; (3) Combining Pkuseg, CBOW and BiLSTM, the word attention mechanism is introduced to realize entity relationship extraction; Pkuseg ensures the accuracy of entity segmentation; the use of attention mechanism makes the model focus more on entities and their relationships, while relatively ignoring noise information, which can not only improve the accuracy of relationship extraction, but also reduce the computational complexity of the model and improve the operation efficiency of the model; (4) Based on graph structure, embedded representation and deep reinforcement learning, hybrid knowledge reasoning is performed on entities and their relationships to realize knowledge graph construction; the graph structure is used to construct the path to ensure the interpretability of the model; the embedded representation is used to convert the path into a vector to improve the computational efficiency; the vector is input into the deep reinforcement learning model for knowledge reasoning, and the relationship in the knowledge graph is completed to obtain a more complete and relationship-rich knowledge graph; (5) Realize the coordinated management and timely feedback of various types of information, provide auxiliary functions for archive association analysis and intelligent retrieval, and improve archive query efficiency and user experience, so that archive workers are not only "custodians" but also "knowledge providers"; (6) Realize in-depth mining and analysis of digital archival data, improve the relevance and utilization rate of archival data, give full play to the utilization value of archival data, assist users in archival relevance analysis and intelligent retrieval, and provide data support for archival research and decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart of a data mining and analysis method based on entity recognition and relationship extraction in an embodiment of the present invention.

[0029] Figure 2 It is a flowchart of constructing a BERT-BiLSTM-CRF entity recognition model in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0031] In order to achieve the above purpose, this embodiment adopts the following technical solutions.

[0032] A data mining analysis method based on entity recognition and relationship extraction, such as Figure 1 As shown, the following steps are included: Step S1: At the data processing layer, archival materials are collected and classified, including text, video and pictures, etc., and then preliminary data recognition processing is performed, including voice recognition, lens slicing, text preprocessing and image recognition, etc., followed by text parsing, including extracting full text, abstract, keywords, time, source and other information, and finally data cleaning is performed to obtain a pure version of cadre personnel file text data; Step S2: In the entity recognition layer, the BERT-BiLSTM-CRF entity recognition model is used to perform entity recognition on the archive text data and output the results with entity tags. First, the BERT pre-trained language model converts the unstructured text data of the archive into vector form and extracts the rich semantic features contained in the data. The BiLSTM model is then used to further extract the contextual features in the data. Finally, constraints are added through CRF to reduce the generation of error sequences and output the final tag sequence. Step S3: In the relation extraction layer, Pkuseg, CBOW and BiLSTM are combined to introduce the word attention mechanism, and entity relation extraction is performed on the results with entity tags to obtain the relationship between entities. Pkuseg is used to perform detailed word segmentation on the full-text data, and the word segmentation results are input into the CBOW continuous bag-of-words model to be converted into word vectors with rich semantic information. Next, BiLSTM is used to capture the overall semantic encoding of the full-text data, and the attention mechanism is introduced into the relation extraction model. The weights are automatically adjusted according to the sample data to remove the influence of noise information and obtain the prediction results of entity relation extraction. The prediction results of entity relation extraction are corrected using the results of entity recognition to obtain the "head entity-relationship-tail entity" triples; Step S4: In the knowledge reasoning layer, based on the graph structure, embedded representation and deep reinforcement learning methods, hybrid knowledge reasoning is performed on entities and their relationships to obtain a knowledge graph. First, the graph structure is used to construct the path, and then the embedded representation is used to convert the path into a vector. Then the knowledge reasoning task is converted into a decision problem. The entities and relationships are regarded as state space and action space respectively. The state transition can be achieved through the movement of entities. When the correct entities and relationships are found, the model is rewarded to train and optimize the model. After the training is completed, the vector is input into the deep reinforcement learning model for knowledge reasoning to complete the relationship in the knowledge graph. Finally, the constructed knowledge graph is output.

[0033] This embodiment provides a data mining and analysis method based on entity recognition and relationship extraction, collects archival materials and classifies them, obtains archival text data through preliminary data recognition and data cleaning; performs entity recognition through the BERT-BiLSTM-CRF entity recognition model, combines Pkuseg, CBOW and BiLSTM, introduces a word attention mechanism, performs entity relationship extraction, and performs hybrid knowledge reasoning on entities and their relationships based on graph structure, embedded representation and deep reinforcement learning to obtain a knowledge graph, realizes deep mining and analysis of digital archival data, improves the relevance and utilization rate of archival data, gives full play to the utilization value of archival data, assists users in archival relevance analysis and intelligent retrieval, provides data support for archival research and decision-making, and improves the efficiency of smart archive management.

[0034] The specific process of step S2 includes the following steps: Step S21: Use the BERT pre-trained language model to convert the text into a semantically rich sentence vector; Step S22: using the BiLSTM bidirectional long short-term memory network model to extract contextual semantic features of the sentence vector, including using the forward layer LSTM of the BiLSTM to obtain the semantic features of the previous text, using the backward layer LSTM to obtain the semantic features of the following text, and then combining the two to obtain the final features; Step S23: After adding constraints to the labels output in step S22 using the CRF conditional random field, the optimal label sequence is output.

[0035] This embodiment uses the BERT-BiLSTM-CRF model for entity recognition. The model mainly includes three parts. The first is the BERT pre-trained language model, which converts the unstructured text data of the archive into vector form and extracts the rich semantic features contained in the data. The BiLSTM model further extracts the context features in the data. Finally, CRF adds constraints to reduce the generation of error sequences and outputs the final tag sequence. CRF (conditional random field) technology imposes necessary constraints and restrictions on the labels output by the model, effectively avoiding the appearance of unreasonable entity labels.

[0036] In step S21, as a key part of BERT, the Transformer encoder based on the self-attention mechanism adjusts the weight sparse matrix by calculating the degree of association between each sentence and other sentences in the full-text data, thereby obtaining the expression of the sentence's feature vector.

[0037] This embodiment uses a pre-trained Chinese BERT model to obtain rich semantic information in the context, and uses Transformers for pre-training to generate deep bidirectional language representation information.

[0038] The specific process of step S22 includes the following steps: Step S221: Calculate the forget gate and select the information to be forgotten; the input is the text data of the current module and the output h of the text data of the previous module t-1 , maps the previous neuron cell state to 0-1, 0 means complete deletion, 1 means complete retention, the calculation formula is as follows: f t =σ(W f x t+ Uf ht-1 +V f c t-1 ); Step S222: Calculate the memory gate and select the information to be memorized; the input is the text data of the current module and the output h of the text data of the previous module t-1 , the value i that needs to be updated is determined by the input layer Sigmoid activation function t , use the tanh function to create a new candidate value vector And add it to the neuron state, update the neuron state to get C t , the calculation formula is as follows: i t =σ(W i x t+U i h t-1 +V i c t-1 ); Step S223: Calculate the output gate and the current hidden layer state, select the output value; determine the output neuron state through the Sigmoid activation function of the output layer. t , the neuron state is processed by the tanh function and multiplied by the output of the Sigmoid gate to obtain the final output part h t , the calculation formula is as follows: o t =σ(W o x t +U o h t-1 +V o c t ); h t =o t ⊙tanh(c t ).

[0039] The LSTM model is a special recurrent neural network. The internal structure of the hidden unit in the network structure is very complex. By introducing memory units and gated memory units to save historical information and long-term states, and using gates to control the flow of information, the storage and update of context information are effectively realized. The structure of LSTM includes: forget gate, input gate and output gate. The calculation process is: using the external state h at the previous moment t-1 and the current input x t , calculate three gates and candidate states Combined with forget gate f t and input gate i t To update the memory cell c t ; Combined with output gate O t , passing the information of the internal state to the external state h t . However, there is still a problem when LSTM performs feature extraction: it cannot encode information from the back to the front. For example, "Xiao Ming's academic performance is very good", where "very good" is a modification of "academic performance". To solve this problem, the forward LSTM and the reverse LSTM are combined into BiLSTM, which can better capture bidirectional semantic dependencies. In the cell unit of BiLSTM, a unique "gate" mechanism is introduced, which enables the neural network to accurately remember key information while forgetting secondary information, thereby significantly enhancing the neural network's ability to understand the semantics of long texts.

[0040] The construction process of the BERT-BiLSTM-CRF entity recognition model in step S2 is as follows Figure 2 As shown, the specific steps include: Step A1: Construct a training set using limited manually annotated data; Step A2: Use the BERT model to convert the text in the training set into a semantically rich sentence vector representation; Step A3: Use the sentence vectors from step A2 to train the BiLSTM-CRF model to obtain a trained BiLSTM-CRF model; Step A4: Convert the unlabeled full-text data into sentence vectors through the BERT model and input them into the BiLSTM-CRF model trained in step A3 for label prediction; Step A5: Perform confidence evaluation on the prediction results of step A4, select samples with confidence higher than the set threshold into the existing training set, and further train the BiLSTM-CRF model until the entity recognition model with the best performance is obtained.

[0041] At the entity recognition level, this embodiment accurately extracts existing entities from the full-text data. Entity recognition is the cornerstone of building a knowledge graph, and its accuracy is crucial to the quality of the knowledge graph. In order to improve the accuracy of entity recognition, this embodiment also proposes a self-supervised deep learning model training method to solve the problem that traditional deep learning models require a large amount of manually labeled data. Specifically, a training set is first constructed using limited manually labeled data; then, with the help of the Bert model, the text in the training set is converted into a semantically rich sentence vector representation; finally, these sentence vectors are used to train a BiLSTM-CRF entity recognition model, thereby achieving efficient entity recognition with less manually labeled data. After the entity recognition model training is completed, the unlabeled full-text data is converted into sentence vectors through the BERT model, and the trained model is used for label prediction; then, the prediction results are evaluated for confidence, and a confidence threshold is set; those samples with confidence higher than the threshold will be selected into the existing training set for further training of the entity recognition model. This process will be iterated until the model performance is no longer improved. Finally, the full-text data is input into the trained entity recognition model to output results with entity tags.

[0042] The specific process of step S3 includes the following steps: Step S31: Use the Pkuseg word segmentation tool to perform word segmentation processing on the full text data to obtain the word segmentation result; Step S32: using the CBOW continuous bag of words model to convert the word segmentation results into word vectors with rich semantic information; Step S33: using the BiLSTM bidirectional long short-term memory network model to capture the overall semantic encoding of the full-text data; Step S34: introducing the attention mechanism, automatically adjusting the weights according to the sample data, and obtaining the entity relationship extraction prediction results; Step S35: Use the result of entity recognition to correct the prediction result of entity relationship extraction to obtain the head entity-relationship-tail entity triple (h, r, t).

[0043] On the basis of entity recognition, the complex relationship between entities and full-text data is further extracted and analyzed. In order to ensure the accuracy of entity segmentation, all identified entities are included in the user dictionary of Pkuseg. Subsequently, Pkuseg is used to perform detailed segmentation on the full-text data, and the segmentation results are input into the CBOW continuous bag-of-words model to be converted into word vectors with rich semantic information. Next, BiLSTM is used to capture the overall semantic encoding of the full-text data. However, considering that the full-text data contains a large amount of irrelevant noise information in addition to entities and their relationships, an attention mechanism is introduced into the relationship extraction model. This mechanism can automatically adjust the weights according to the sample data, so that the model focuses more on entities and their relationships, while relatively ignoring noise information, thereby improving the accuracy and efficiency of relationship extraction.

[0044] The specific process of step S34 includes the following steps: Step S341: Based on the feature vector h output by BiLSTM in step S33 i , calculate the attention weight e ti , the calculation formula is as follows: e ti =a(s t-1 ,h i ); Step S342: According to the attention weight e ti , calculate the attention weight probability vector a ti , the calculation formula is as follows: Step S343: Based on the feature vector h output by BiLSTM in step S33 i and the attention weight probability vector a ti , calculate the attention weight configuration c t , the calculation formula is as follows:

[0045] e ti For the alignment model, it represents the influence of the state of the BiLSTM layer at the moment on the output layer at the moment of connection, which is calculated by the state of the BiLSTM layer at the moment and the state of the output layer at the moment.ti Perform softmax normalization to obtain the attention weight probability vector a ti .c t Represents the semantic vector of the output layer at time t, which is obtained by multiplying the hidden states at multiple times and their corresponding attention weights. Using the attention mechanism can not only improve the accuracy of relation extraction, but also reduce the computational complexity of the model and improve the operating efficiency of the model.

[0046] The specific process of step S4 includes the following steps: Step S41: constructing a path using a graph structure; Step S42: Convert the path into a vector using the embedded representation; Step S43: Entities and relationships are regarded as state space and action space respectively, and state conversion is realized through entity wandering. When the correct entities and relationships are found, the model is rewarded, thereby training and optimizing the model; Step S44: After the training is completed, the vector is input into the deep reinforcement learning model for knowledge reasoning, completing the relationship in the knowledge graph, and finally outputting a complete knowledge graph.

[0047] After entity recognition and relationship extraction, a large number of "head entity-relationship-tail entity" triplets are obtained. But there is an obvious problem, that is, the relationship between entities is relatively sparse, which is not conducive to the integrity of the knowledge graph. In order to solve this problem, this embodiment introduces knowledge reasoning, which can effectively enrich the relationship between entities, thereby achieving the purpose of supplementing the knowledge graph. Among the many knowledge reasoning methods, the method based on graph structure has high interpretability, but its computational complexity is high, and it is difficult to apply for large knowledge graphs. Although the method based on embedded representation has high computational performance, its interpretability is relatively weak. In addition, the knowledge reasoning method based on deep reinforcement learning performs well, but it also faces the problem of insufficient interpretability. In order to combine the advantages of these three methods, this embodiment proposes a hybrid knowledge reasoning method, which first uses the graph structure to construct the path to ensure the interpretability of the model; then, the path is converted into a vector using the embedded representation to improve the computational efficiency; then, the knowledge reasoning task is converted into a decision problem, and the entity and relationship are regarded as the state space and action space respectively. Through the movement of entities, state transitions can be achieved; when the correct entities and relationships are found, the model is rewarded, thereby training and optimizing the model. After training, the vector is input into the deep reinforcement learning model for knowledge reasoning to complete the relationships in the knowledge graph. Finally, the constructed knowledge graph is output, which is a more complete and relationship-rich knowledge graph.

[0048] Knowledge graphs are used to organize digital archival resources in a knowledge-based manner, enabling collaborative management and timely feedback of various types of information, providing auxiliary functions for archival correlation analysis and intelligent retrieval, while improving archival query efficiency and user experience, making archival work not only as a "custodian" but also a "knowledge provider."

[0049] The specific process of step S42 includes the following steps: Step S421: Use the TransH model to abstract each relationship into a normal vector w r The hyperplane of w is used to enhance the semantic difference of different entities under the same relationship, and to simplify the calculation, the constraint w r is the unit normal vector; Step S422: Project the head entity and the tail entity in the fact triple (h, r, t) obtained in step S35 onto the hyperplane, denoted as h ⊥ and t ⊥ ; Step S423: Define the loss function through soft constraints, use the stochastic gradient descent method to minimize the loss function to train the model, and obtain the embedded representation of entities and relationships.

[0050] Based on the TransE model, TransH introduces a hyperplane to replace the original relationship vector, focusing on solving the problems of reflexivity, one-to-many, many-to-one, and many-to-many in the relationship in the graph. Since the knowledge graphs used and constructed in this embodiment have asymmetric relationships such as one-to-many and many-to-many, and due to the large amount of data, it is necessary to find a balance between model capacity and efficiency. Therefore, the TransH model is selected for graph data embedding representation to ensure good performance in entity and relationship embedding representation tasks.

[0051] The specific process of step S1 includes the following steps: Step S11: Collect archival materials and sort out archival materials categories; Step S12: extracting information from the sorted archive materials through text recognition, image recognition, voice recognition, and lens slicing technology to form preliminary digital archive information and save it in the database; Step S13: Clean up invalid information in the preliminary information of the digital archive to obtain valid archive text data.

[0052] This embodiment realizes automatic recognition and extraction of key feature information such as name, date of birth, time of joining the work, and educational background in the materials through OCR recognition of material forms and material files, and builds a structured data center for personnel file materials, which specifically includes: data sorting: sorting the personnel file materials of the cadres in the archives room, such as paper documents, pictures (some of which need to be processed by image denoising, etc.), and video materials, and combing ten categories of file materials; data recognition: extracting information from the above-mentioned file materials (text, pictures, videos) through text recognition, image recognition, voice recognition, lens slicing and other technologies to form preliminary digital file information and save it in the database; data cleaning: cleaning some useless information in the preliminary digital file information, such as header information in documents, advertising information in videos, and simplifying some traditional Chinese information in the file handwriting, etc.

[0053] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data mining analysis method based on entity recognition and relationship extraction, It is characterized in that The following steps are involved: Step S1: Collect and classify archival materials, and obtain archival text data through preliminary data identification and data cleaning; Step S2: Use the BERT-BiLSTM-CRF entity recognition model to perform entity recognition on the archive text data and output the results with entity tags; Step S3: Combine Pkuseg, CBOW and BiLSTM, introduce the word attention mechanism, and extract entity relations from the results with entity tags to obtain the relations between entities; Step S4: Based on the graph structure, embedded representation and deep reinforcement learning methods, hybrid knowledge reasoning is performed on entities and their relationships to obtain a knowledge graph.

2. According to claim 1, a data mining analysis method based on entity recognition and relationship extraction, It is characterized in that The specific process of step S2 includes the following steps: Step S21: Use the BERT pre-trained language model to convert the text into a semantically rich sentence vector; Step S22: using the BiLSTM bidirectional long short-term memory network model to extract contextual semantic features of the sentence vector, including using the forward layer LSTM of the BiLSTM to obtain the semantic features of the previous text, using the backward layer LSTM to obtain the semantic features of the following text, and then combining the two to obtain the final features; Step S23: After adding constraints to the labels output in step S22 using the CRF conditional random field, the optimal label sequence is output.

3. According to claim 2, a data mining analysis method based on entity recognition and relationship extraction, It is characterized in that In step S21, as a key part of BERT, the Transformer encoder based on the self-attention mechanism adjusts the weight sparse matrix by calculating the degree of association between each sentence and other sentences in the full-text data, thereby obtaining the expression of the sentence's feature vector.

4. A data mining and analysis method based on entity recognition and relationship extraction according to claim 2 or 3, It is characterized in that The specific process of step S22 includes the following steps: Step S221: Calculate the forget gate and select the information to be forgotten; the input is the text data of the current module and the output h of the text data of the previous module t-1 , mapping the previous neuron cell state to 0-1, where 0 means complete deletion and 1 means complete retention; Step S222: Calculate the memory gate and select the information to be memorized; the input is the text data of the current module and the output h of the text data of the previous module t-1 , the value i that needs to be updated is determined by the input layer Sigmoid activation function t , use the tanh function to create a new candidate value vector And add it to the neuron state, update the neuron state to get C t ; Step S223: Calculate the output gate and the current hidden layer state, select the output value; determine the output neuron state through the Sigmoid activation function of the output layer. t , the neuron state is processed by the tanh function and multiplied by the output of the Sigmoid gate to obtain the final output part h t .

5. A data mining and analysis method based on entity recognition and relationship extraction according to claim 1, 2 or 3, It is characterized in that The construction process of the BERT-BiLSTM-CRF entity recognition model described in step S2 specifically includes the following steps: Step A1: Construct a training set using limited manually annotated data; Step A2: Use the BERT model to convert the text in the training set into a semantically rich sentence vector representation; Step A3: Use the sentence vectors from step A2 to train the BiLSTM-CRF model to obtain a trained BiLSTM-CRF model; Step A4: Convert the unlabeled full-text data into sentence vectors through the BERT model and input them into the BiLSTM-CRF model trained in step A3 for label prediction; Step A5: Perform confidence evaluation on the prediction results of step A4, select samples with confidence higher than the set threshold into the existing training set, and further train the BiLSTM-CRF model until the entity recognition model with the best performance is obtained.

6. A data mining analysis method based on entity recognition and relationship extraction according to claim 1, It is characterized in that The specific process of step S3 includes the following steps: Step S31: Use the Pkuseg word segmentation tool to perform word segmentation processing on the full text data to obtain the word segmentation result; Step S32: using the CBOW continuous bag of words model to convert the word segmentation results into word vectors with rich semantic information; Step S33: using the BiLSTM bidirectional long short-term memory network model to capture the overall semantic encoding of the full-text data; Step S34: introducing the attention mechanism, automatically adjusting the weights according to the sample data, and obtaining the entity relationship extraction prediction results; Step S35: Use the result of entity recognition to correct the prediction result of entity relationship extraction to obtain the head entity-relationship-tail entity triple (h, r, t).

7. A data mining analysis method based on entity recognition and relationship extraction according to claim 6, It is characterized in that The specific process of step S34 includes the following steps: Step S341: Based on the feature vector h output by BiLSTM in step S33 i , calculate the attention weight e ti ; Step S342: According to the attention weight e ti , calculate the attention weight probability vector a ti ; Step S343: Based on the feature vector h output by BiLSTM in step S33 i and the attention weight probability vector a ti , calculate the attention weight configuration c t .

8. According to claim 1, a data mining analysis method based on entity recognition and relationship extraction, It is characterized in that The specific process of step S4 includes the following steps: Step S41: constructing a path using a graph structure; Step S42: Convert the path into a vector using the embedded representation; Step S43: Entities and relationships are regarded as state space and action space respectively, and state conversion is realized through entity wandering. When the correct entities and relationships are found, the model is rewarded, thereby training and optimizing the model; Step S44: After the training is completed, the vector is input into the deep reinforcement learning model for knowledge reasoning, completing the relationship in the knowledge graph, and finally outputting a complete knowledge graph.

9. A data mining and analysis method based on entity recognition and relationship extraction according to claim 8, It is characterized in that The specific process of step S42 includes the following steps: Step S421: Use the TransH model to abstract each relationship into a normal vector w r The hyperplane of Step S422: Project the head entity and the tail entity in the fact triple (h, r, t) obtained in step S35 onto the hyperplane, denoted as h ⊥ and t ⊥ ; Step S423: Use the stochastic gradient descent method to minimize the loss function to train the model and obtain the embedded representation of entities and relationships.

10. A data mining and analysis method based on entity recognition and relationship extraction according to claim 1 or 2 or 3 or 6 or 7 or 8 or 9, It is characterized in that The specific process of step S1 includes the following steps: Step S11: Collect archival materials and sort out archival materials categories; Step S12: extracting information from the sorted archive materials through preliminary data recognition and text analysis to form preliminary digital archive information and save it in the database; Step S13: Clean up invalid information in the preliminary information of the digital archive to obtain valid archive text data.

Citation Information

Cited By

  • Special field text semantic element recognition method based on enhanced CRF layer

    CN119150878A

  • Entity relationship analysis method, device and equipment for unstructured data

    CN119248905A

  • Deep learning-based mRNA field literature mining system

    CN119990143A