A data analysis method and storage medium
By clustering enterprise unstructured files and extracting event models, the problem of inaccurate event extraction in the existing technology is solved, the logical context analysis and tracking of the enterprise's decision-making process is realized, and the accuracy and efficiency of event extraction are improved. .
Patent Information
- Application Number
- CN202111313060.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-11-08
AI Technical Summary
Existing technology cannot accurately and effectively extract events, especially in unstructured documents formed during the corporate decision-making process, which cannot reflect the characteristics of logical context, making it difficult to track and implement decisions.
By clustering article data, calculating word vectors and using K-means clustering algorithm, combined with TextRank algorithm and Naive Bayes classifier model, we can extract keywords and form event models, establish event context, and realize unstructured documents accurate event extraction.
It improves the accuracy and effectiveness of event extraction, enables better tracking and review of the development process of important corporate matters, and improves the efficiency of decision-making execution.
Smart Images

Figure HDA0003342501390000011 
Figure HDA0003342501390000012
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis, and in particular to a data analysis method capable of extracting events. Background Art
[0002] Enterprises need to make many decisions during the operation process, especially major decisions, appointment and removal of important cadres, arrangement of major projects and use of large amounts of funds. These decisions will form a lot of meeting records, lists of matters and resolution documents. At the same time, these matters and resolutions will be implemented by organizations at all levels. For tracking the entire process from these decisions to execution and implementation, the functions provided by the information system are currently used to establish records and associations through relational databases, or some clustering algorithms are used to form various topics. There are also some structured analysis algorithms corresponding to event extraction. However, they cannot meet the needs of accurate event extraction. Summary of the invention
[0003] Therefore, it is necessary to provide a data analysis method that can meet the needs of accurate and effective event extraction.
[0004] To achieve the above object, the inventor provides a data analysis method, comprising the following steps:
[0005] Cluster the articles, with the article title weight recorded as Δt, and the article content paragraph title weight as Δg (Δt>Δg>1).
[0006] Segment the article title to get the title word vector V t ,The weight value of each title word vector is the word frequency multiplied by Δt;
[0007] Segment the article paragraph title to obtain the paragraph title word vector V g ,The weight value of each paragraph title word vector is the word frequency multiplied by Δg;
[0008] Segment the rest of the article to form a content word vector V c ,The weight value is the word frequency;
[0009] Merge title word vector V t , paragraph title word vector V g , content word vector V c , get the word vector of the article,
[0010] For the word vectors of the article, the cosine similarity is calculated as the spatial distance, and then the K-means clustering algorithm is used to cluster different article data to obtain the article clustering set D = {D1, D2, ..., D n}.
[0011] Event extraction for article clustering set: traverse the article clustering set D = {D1, D2, ..., D n}, and use the TextRank algorithm for the article titles of articles belonging to the same cluster, processing only nouns and verbs, to obtain the most important n word set K t ; Use the TextRank algorithm for all the paragraph titles of the same cluster, only process the nouns and verbs, and get the most important n word set K g ; For all other contents of articles in the same cluster, the TextRank algorithm is used, only the nouns and verbs are processed, and the most important n word set K is obtained c ; Finally, we get the event model of article data.
[0012] Specifically, the method further includes the steps of calculating the cosine distance according to the word vector of the article to complete the training of the naive Bayes classifier model.
[0013] Specifically, the method further includes the steps of classifying all paragraphs of all articles according to the event model, and traversing each event in reverse order to form an event context according to the paragraphs associated with each event.
[0014] Specifically, before clustering the articles, the steps include extracting from the article header: article title, publishing unit and publishing article using regular expression matching, parsing the article body content, extracting the article paragraph titles using pattern matching method, and extracting and dividing the paragraphs.
[0015] Specifically, the article is an official document.
[0016] A data analysis storage medium stores a computer program, which, when executed, performs the following steps:
[0017] Cluster the articles, with the article title weight recorded as Δt, and the article content paragraph title weight as Δg (Δt>Δg>1).
[0018] Segment the article title to get the title word vector V t ,The weight value of each title word vector is the word frequency multiplied by Δt;
[0019] Segment the article paragraph title to obtain the paragraph title word vector V g ,The weight value of each paragraph title word vector is the word frequency multiplied by Δg;
[0020] Segment the rest of the article to form a content word vector V c ,The weight value is the word frequency;
[0021] Merge title word vector V t, paragraph title word vector V g , content word vector V c , get the word vector of the article,
[0022] For the word vectors of the article, the cosine similarity is calculated as the spatial distance, and then the K-means clustering algorithm is used to cluster different article data to obtain the article clustering set D = {D1, D2, ..., D n}.
[0023] Event extraction for article clustering set: traverse the article clustering set D = {D1, D2, ..., D n}, and use the TextRank algorithm for the article titles of articles belonging to the same cluster, processing only nouns and verbs, to obtain the most important n word set K t ; Use the TextRank algorithm for all the paragraph titles of the same cluster, only process the nouns and verbs, and get the most important n word set K g ; For all other contents of articles in the same cluster, the TextRank algorithm is used, only the nouns and verbs are processed, and the most important n word set K is obtained c ; Finally, we get the event model of article data.
[0024] Specifically, when the computer program is run, it also executes the steps of calculating the cosine distance according to the word vector of the article to complete the training of the naive Bayes classifier model.
[0025] Specifically, when the computer program is run, it also performs steps including classifying all paragraphs of all articles according to the event model, and traversing each event in reverse order to form an event context according to the paragraphs associated with each event.
[0026] Specifically, when the computer program is run, it also executes the following steps: before clustering the articles, extract the following from the article headers: article title, issuing unit and issuing article, parse the article body content, extract the article paragraph titles by pattern matching method, and extract the divided paragraphs.
[0027] Specifically, the article is an official document.
[0028] Different from the existing technology, the above scheme can perform K-means clustering operation after extracting word vectors from article data, can perform more accurate clustering according to the theme of keywords, and then perform event extraction based on the clusters, which can ultimately improve the accuracy and effectiveness of event extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1A flow chart of the data analysis method described in the specific implementation mode;
[0030] Figure 2 This is a data analysis medium module diagram described in a specific implementation method. DETAILED DESCRIPTION
[0031] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings.
[0032] In the actual life process, our inventors found that the association between records established through persistence in a relational database is for structured data, and cannot be applied to situations where resolutions are issued and implemented through various documents. At present, various clustering algorithms can form various topics, but for such unstructured documents with a typical logical sequence from decision-making, execution, tracking, and feedback, it is impossible to reflect the characteristics of the logical context, and these logical contexts are precisely the focus of enterprises. At the same time, a decision of an enterprise may cover different topics, such as the topic of state-owned enterprise reform. The different levels of organizations in each enterprise have different measures in the implementation process, which makes it difficult to accurately cluster them together. The algorithm for extracting events from text files focuses on extracting the events therein, and has similar problems as the clustering algorithm, and cannot reflect the logical context well.
[0033] In business activities, enterprises decompose various decisions, matters, and tasks based on strategic goals. These decisions, matters, and tasks will be issued and communicated to subordinate organizations through unstructured documents such as official documents and meeting minutes, and implemented by organizations at all levels; similarly, subordinate organizations will also form various types of unstructured documents in the process of implementing these meeting decisions, matters, and tasks, and further decompose them into subtasks or projects for execution, reporting, and feedback. Unstructured files are file data without a fixed format, such as meeting minutes, notification documents, task arrangements, speech drafts, and other documents. How to analyze, extract, and associate the series of unstructured files generated from these meeting decisions, matters, and tasks from decision-making to decomposition to planning, execution, tracking, and feedback has become the research topic of the present invention. The present invention processes and analyzes these unstructured files in the field of state-owned enterprise operations to form semi-structured information, and then preliminarily classifies this information through a clustering algorithm, and then focuses on these classified semi-structured information to extract related events and uses a pre-trained model to associate these extracted events, thereby forming the context of these decisions, matters, and tasks, and providing a method for enterprises to track and review the development process of important matters.
[0034] Figure 1 This is a flow chart of a data analysis method described in this scheme, comprising the following steps:
[0035] S1 clusters the articles, with the article title weight recorded as Δt and the article content paragraph title weight as Δg (Δt>Δg>1).
[0036] Segment the article title to get the title word vector V t ,The weight value of each title word vector is the word frequency multiplied by Δt;
[0037] Segment the article paragraph title to obtain the paragraph title word vector V g ,The weight value of each paragraph title word vector is the word frequency multiplied by Δg;
[0038] Segment the rest of the article to form a content word vector V c ,The weight value is the word frequency;
[0039] Merge title word vector V t , paragraph title word vector V g , content word vector V c , get the word vector of the article,
[0040] For the word vectors of the article, the cosine similarity is calculated as the spatial distance, and then the K-means clustering algorithm is used to cluster different article data to obtain the article clustering set D = {D1, D2, ..., D n}.
[0041] S2 extracts events from the article cluster set: traverse the article cluster set D = {D1, D2, ..., D n}, and use the TextRank algorithm for the article titles of articles belonging to the same cluster, processing only nouns and verbs, to obtain the most important n word set K t ; Use the TextRank algorithm for all the paragraph titles of the same cluster, only process the nouns and verbs, and get the most important n word set K g ; For all other contents of articles in the same cluster, the TextRank algorithm is used, only the nouns and verbs are processed, and the most important n word set K is obtained c ; Finally, we get the event model of article data.
[0042] The above solution can perform K-means clustering operation after extracting word vectors from article data, can perform more accurate clustering based on the theme of keywords, and then perform event extraction based on the clusters, which can ultimately improve the accuracy and effectiveness of event extraction.
[0043] In some other specific embodiments, the method of calculating the cosine distance according to the word vector of the article is further included to complete the training of the naive Bayes classifier model. By training the naive Bayes classifier model, the classifier model can be used to automatically perform the operation of clustering articles, and the related files can be quickly clustered, thereby improving the classification efficiency of the method of the present invention and improving the practicality.
[0044] In some specific embodiments, the step of classifying all paragraphs of all articles according to the event model and traversing each event in reverse order to form an event context according to the paragraphs associated with each event is also included. In the data storage, a storage connection relationship can be established with events as keywords and paragraphs of article data as units. Through the above scheme, a corresponding relationship between keywords and paragraphs can be established, and article data can be better stored.
[0045] In some other specific embodiments, before clustering the articles, the steps are also included, using regular expression matching to extract from the article header: article title, issuing unit and issuing article, parsing the article body content, using pattern matching method to extract article paragraph titles, extracting and dividing paragraphs. Through the above scheme, the present invention can parse the article data, extract valid data, and achieve the technical effect of dividing the article title and paragraph.
[0046] In some other specific embodiments, the article is an official document. According to practical applications, the official document includes state-owned assets supervision documents, which are divided into phased official documents with sequential contexts such as decision-making, issuing official documents, supervision plans, project implementation, project feedback, and project summaries. The technical solution of the present invention can have better adaptability to official documents, and can better perform article clustering and time feature context extraction for official document databases that do not need to be stored.
[0047] In such Figure 2 In the illustrated embodiment, the present invention also discloses a data analysis storage medium 2 storing a computer program, wherein the computer program, when executed, performs the following steps:
[0048] Cluster the articles, with the article title weight recorded as Δt, and the article content paragraph title weight as Δg (Δt>Δg>1).
[0049] Segment the article title to get the title word vector V t ,The weight value of each title word vector is the word frequency multiplied by Δt;
[0050] Segment the article paragraph title to obtain the paragraph title word vector V g ,The weight value of each paragraph title word vector is the word frequency multiplied by Δg;
[0051] Segment the rest of the article to form a content word vector V c ,The weight value is the word frequency;
[0052] Merge title word vector V t , paragraph title word vector V g , content word vector V c , get the word vector of the article,
[0053] For the word vectors of the article, the cosine similarity is calculated as the spatial distance, and then the K-means clustering algorithm is used to cluster different article data to obtain the article clustering set D = {D1, D2, ..., D n}.
[0054] Event extraction for article clustering set: traverse the article clustering set D = {D1, D2, ..., D n}, and use the TextRank algorithm for the article titles of articles belonging to the same cluster, processing only nouns and verbs, to obtain the most important n word set K t ; Use the TextRank algorithm for all the paragraph titles of the same cluster, only process the nouns and verbs, and get the most important n word set K g ; For all other contents of articles in the same cluster, the TextRank algorithm is used, only the nouns and verbs are processed, and the most important n word set K is obtained c ; Finally, we get the event model of article data.
[0055] Specifically, when the computer program is run, it also executes the steps of calculating the cosine distance according to the word vector of the article to complete the training of the naive Bayes classifier model.
[0056] Specifically, when the computer program is run, it also performs steps including classifying all paragraphs of all articles according to the event model, and traversing each event in reverse order to form an event context according to the paragraphs associated with each event.
[0057] Specifically, when the computer program is run, it also executes the following steps: before clustering the articles, extract the following from the article headers: article title, issuing unit and issuing article, parse the article body content, extract the article paragraph titles by pattern matching method, and extract the divided paragraphs.
[0058] Specifically, the article is an official document.
[0059] It should be noted that, although the above embodiments have been described in this article, the patent protection scope of the present invention is not limited thereby. Therefore, based on the innovative concept of the present invention, changes and modifications made to the embodiments described herein, or equivalent structures or equivalent process changes made using the contents of the present invention specification and drawings, directly or indirectly applying the above technical solutions to other related technical fields, are all included in the patent protection scope of the present invention.
Claims
1. A data analysis method, characterized in that: The steps include: Cluster the articles, with the article title weight recorded as Δt and the article content paragraph title weight as Δg, where Δt>Δg>1. Segment the article title to get the title word vector V t ,The weight value of each title word vector is the word frequency multiplied by Δt; Segment the article paragraph title to obtain the paragraph title word vector V g ,The weight value of each paragraph title word vector is the word frequency multiplied by Δg; Segment the rest of the article to form a content word vector V c ,The weight value is the word frequency; Merge title word vector V t , paragraph title word vector V g , content word vector V c , get the word vector of the article, For the word vectors of the article, the cosine similarity is calculated as the spatial distance, and then the K-means clustering algorithm is used to cluster different article data to obtain the article clustering set D = {D1, D2, ..., D n }; Event extraction for article clustering set: traverse the article clustering set D = {D1, D2, ..., D n }, and use the TextRank algorithm for the article titles belonging to the same cluster, only processing the noun and verb parts of speech, to obtain the most important n word set K t ; Use the TextRank algorithm for all the paragraph titles of the same cluster, only process the nouns and verbs, and get the most important n word set K g ; For all other contents of articles in the same cluster, the TextRank algorithm is used, only the nouns and verbs are processed, and the most important n word set K is obtained c ; Finally, we get the event model of article data; According to the word vector of the article, the cosine distance calculation method is calculated to complete the training of the naive Bayes classifier model; Classify all paragraphs of all articles according to the event model, and traverse each event in reverse order to form an event context according to the paragraphs associated with each event; Before clustering the articles, the steps include extracting from the article header: article title, publishing unit and publishing article using regular expression matching, parsing the article body content, extracting the article paragraph titles using pattern matching method, and extracting and dividing the paragraphs.
2. The data analysis method according to claim 1, characterized in that: The article in question is an official document.
3. A data analysis storage medium, characterized in that: A computer program is stored, and when the computer program is run, the following steps are performed: Cluster the articles, with the article title weight recorded as Δt and the article content paragraph title weight as Δg, where Δt>Δg>1. Segment the article title to get the title word vector V t ,The weight value of each title word vector is the word frequency multiplied by Δt; Segment the article paragraph title to obtain the paragraph title word vector V g ,The weight value of each paragraph title word vector is the word frequency multiplied by Δg; Segment the rest of the article to form a content word vector V c ,The weight value is the word frequency; Merge title word vector V t , paragraph title word vector V g , content word vector V c , get the word vector of the article, For the word vectors of the article, the cosine similarity is calculated as the spatial distance, and then the K-means clustering algorithm is used to cluster different article data to obtain the article clustering set D = {D1, D2, ..., D n }; Event extraction for article clustering set: traverse the article clustering set D = {D1, D2, ..., D n }, and use the TextRank algorithm for the article titles belonging to the same cluster, only processing the noun and verb parts of speech, to obtain the most important n word set K t ; Use the TextRank algorithm for all the paragraph titles of the same cluster, only process the nouns and verbs, and get the most important n word set K g ; For all other contents of articles in the same cluster, the TextRank algorithm is used, only the nouns and verbs are processed, and the most important n word set K is obtained c ; Finally, we get the event model of article data; When the computer program is executed, the computer program further performs the steps of calculating the cosine distance calculation method according to the word vector of the article to complete the training of the naive Bayes classifier model; When the computer program is executed, the computer program further performs the steps of classifying all paragraphs of all articles according to the event model, and traversing each event in reverse order to form an event context according to the paragraphs associated with each event; When the computer program is run, it also executes the steps of extracting the following from the article headers: article title, issuing unit and issuing article, parsing the article body content, extracting the article paragraph titles by pattern matching method, and extracting and dividing the paragraphs before clustering the articles.
4. The data analysis storage medium according to claim 3, characterized in that: The article in question is an official document.
Citation Information
Patent Citations
Text summarization generation method and equipment
CN108319668A
Hot event detection method and system
CN110232149A
