A method and system for information extraction based on natural language text
By using models based on CNN-MLP, ISSA-MOGRPO, and BERT-LSTM-Attention-CRF, the problems of slow information extraction speed, low accuracy, and insufficient semantic understanding in existing technologies are solved, achieving efficient and accurate natural language text information extraction and enhancing the real-time performance and depth of information extraction.
Patent Information
- Application Number
- CN202510311445.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-03-17
Smart Images

Figure CN120106080B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of text information extraction technology, specifically relating to a method and system for information extraction based on natural language text. Background Technology
[0002] Natural language text refers to text composed of human natural languages (such as Chinese and English), and it is one of the main ways humans communicate, express thoughts, and transmit information. Natural language text can include various forms, such as articles, dialogues, books, web page content, emails, and social media posts. With the rapid development of the internet, massive amounts of natural language text are constantly being generated. How to quickly and accurately extract key information from this unstructured natural language text has become a significant technical challenge.
[0003] Existing information extraction technologies have the following drawbacks:
[0004] 1) Slow processing speed: Existing methods often require a long processing time when processing large-scale real-time text data, which cannot meet the real-time requirements. The complex algorithms and model structures lead to high consumption of computing resources and make it difficult to achieve efficient information extraction.
[0005] 2) Low accuracy: When faced with complex and diverse natural language text, the existing technology has a low accuracy in information extraction, which is prone to false positives and false negatives. It lacks an effective text analysis and strategy generation mechanism, resulting in unstable information extraction results.
[0006] 3) Poor flexibility: It relies on manually formulated rules, which are difficult to cover all the complexities of natural language. Moreover, as the language develops and new scenarios emerge, the rules need to be constantly updated, resulting in high maintenance costs.
[0007] 4) Insufficient semantic understanding: Existing methods are insufficient in semantic understanding, making it difficult to accurately capture deep semantic information and relationships in text. The lack of semantic understanding often results in information extraction results remaining at the surface level, making it difficult to uncover valuable information. Summary of the Invention
[0008] In order to address the problems of slow processing speed, low accuracy, poor flexibility and insufficient semantic understanding in existing technologies, the present invention aims to provide an information extraction method and system based on natural language text.
[0009] The technical solution adopted in this invention is as follows:
[0010] A method for information extraction based on natural language text includes the following steps:
[0011] Collect real-time natural language text and preprocess the real-time natural language text to obtain the corresponding preprocessed real-time natural language text;
[0012] Using a text analysis model, preprocessed real-time natural language text is analyzed to obtain the corresponding real-time text analysis results.
[0013] Based on the real-time text analysis results, a strategy generation model is used to generate strategies for the preprocessed real-time natural language text, resulting in corresponding real-time information extraction strategies.
[0014] Based on the real-time information extraction strategy, an information extraction model is used to extract information from the preprocessed real-time natural language text to obtain the corresponding real-time key information.
[0015] Furthermore, real-time natural language text is collected and preprocessed to obtain preprocessed real-time natural language text, including the following steps:
[0016] Collect real-time natural language text and perform format conversion on the real-time natural language text to obtain the format-converted real-time natural language text;
[0017] The real-time natural language text after format conversion is processed sequentially into sentence segmentation and word segmentation to obtain several real-time text fragments after word segmentation.
[0018] Each segmented real-time text fragment is tagged with part-of-speech tags to obtain several tagged real-time text fragments.
[0019] By integrating several part-of-speech tagged real-time text fragments, the corresponding preprocessed real-time natural language text is obtained.
[0020] Furthermore, the text analysis model is built based on the CNN-MLP algorithm, and the text analysis model includes a text feature extraction module built based on the CNN algorithm and a text analysis module built based on the MLP algorithm, which are connected in sequence.
[0021] Furthermore, a text analysis model is used to perform text analysis on the preprocessed real-time natural language text to obtain the corresponding real-time text analysis results, including the following steps:
[0022] The text feature extraction module of the text analysis model is used to extract real-time text features from preprocessed real-time natural language text.
[0023] Based on real-time text features, the text analysis module of the text analysis model is used to perform text analysis and obtain the corresponding real-time text analysis results.
[0024] Furthermore, the policy generation model is constructed based on the ISSA-MOGRPO algorithm, and the policy generation model includes a network parameter optimization module based on the ISSA algorithm and a policy generation module based on the MOGRPO algorithm. The policy generation module includes an objective function set, an experience replay pool, a policy network, and an agent. The agent is connected to the objective function set, the experience replay pool, and the policy network, respectively. The network parameter optimization module is connected to the policy network.
[0025] Furthermore, based on the real-time text analysis results, a strategy generation model is used to generate strategies for the preprocessed real-time natural language text, resulting in corresponding real-time information extraction strategies. This includes the following steps:
[0026] The real-time text analysis results are parsed to obtain the real-time mapping factor. Based on the real-time mapping factor, the optimization objective of the network parameter optimization module of the strategy generation model is updated to obtain the updated optimization objective.
[0027] Based on the updated optimization objective, the network parameter optimization module is used to optimize the policy network of the policy generation module of the policy generation model, resulting in an optimized policy network.
[0028] Using a policy generation module with an optimized policy network, policies are generated from preprocessed real-time natural language text to obtain corresponding real-time information extraction policies.
[0029] Furthermore, the real-time information extraction strategy includes real-time text processing decisions, real-time word embedding adjustment decisions, real-time attention weight adjustment decisions, and real-time sequence labeling adjustment decisions.
[0030] Furthermore, the information extraction model is built based on the BERT-LSTM-Attention-CRF algorithm, and the information extraction model includes a word embedding module built based on the BERT algorithm, a semantic feature extraction module built based on the LSTM algorithm, an attention weight module built based on the Attention mechanism, and an information extraction module built based on the CRF algorithm, which are connected in sequence.
[0031] Furthermore, based on the real-time information extraction strategy, an information extraction model is used to extract information from the preprocessed real-time natural language text to obtain the corresponding real-time key information, including the following steps:
[0032] Based on the real-time text processing decision in the real-time information extraction strategy, the preprocessed real-time natural language text is processed to obtain the processed real-time natural language text.
[0033] Based on the real-time word embedding adjustment decision in the real-time information extraction strategy, the word embedding module of the information extraction model is adjusted to obtain the adjusted word embedding module;
[0034] Based on the real-time attention weight adjustment decision in the real-time information extraction strategy, the attention weight module of the information extraction model is adjusted to obtain the adjusted attention weight module.
[0035] Based on the real-time sequence labeling adjustment decision in the real-time information extraction strategy, the information extraction module of the information extraction model is adjusted to obtain the adjusted information extraction module;
[0036] The adjusted word embedding module of the information extraction model is used to embed words into real-time natural language text after text processing, and real-time word embedding vectors are obtained.
[0037] The semantic feature extraction module of the information extraction model is used to extract real-time semantic features of real-time word embedding vectors;
[0038] The adjusted attention weight module of the information extraction model is used to perform weighted fusion of several real-time feature components of real-time semantic features to obtain real-time weighted fused features.
[0039] Based on the real-time weighted fusion features, the adjusted information extraction module of the information extraction model is used to perform sequence labeling and obtain the corresponding real-time key information.
[0040] An information extraction system based on natural language text is provided to implement information extraction methods. The system includes a preprocessing unit, a text analysis unit, a strategy generation unit, and an information extraction unit connected in sequence.
[0041] The beneficial effects of this invention are as follows:
[0042] This invention provides a method and system for information extraction based on natural language text. By preprocessing the natural language text and employing an artificial intelligence model for automated data processing, the processing time for information extraction is significantly shortened, meeting real-time requirements, effectively reducing computational resource consumption, and achieving efficient information extraction. Dynamic information extraction strategies are generated based on the text state of the natural language text, and information extraction is performed using an information extraction model, improving the accuracy of information extraction, reducing false positives and false negatives, and ensuring stable and reliable information extraction results. The use of an artificial intelligence model for automated text analysis and information extraction reduces reliance on manual rules, thereby improving flexibility and scalability. Through the deep structure of the text analysis model, semantic understanding capabilities are enhanced, accurately capturing deep semantic information and relationships in the text, mining valuable information, and improving the depth and breadth of information extraction.
[0043] Other beneficial effects of the present invention will be further explained in the specific embodiments. Attached Figure Description
[0044] Figure 1 This is a flowchart of the information extraction method based on natural language text in this invention.
[0045] Figure 2 This is a structural block diagram of the information extraction system based on natural language text in this invention. Detailed Implementation
[0046] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.
[0047] Example 1:
[0048] like Figure 1 As shown, this embodiment provides a method for information extraction based on natural language text, including the following steps:
[0049] S1: Collect real-time natural language text and preprocess it to obtain the corresponding preprocessed real-time natural language text, including the following steps:
[0050] S1-1: Collect real-time natural language text and perform format conversion on the real-time natural language text to obtain the format-converted real-time natural language text;
[0051] In this embodiment, the real-time natural language text is a news article: "Recently, my country's independently developed Chang'e 5 probe was successfully launched, marking a major breakthrough for my country in the field of lunar exploration. The probe carries a variety of scientific instruments, aiming to collect soil and rock samples from the lunar surface to provide important data for scientific research. The successful implementation of this mission not only enhances my country's status in the international aerospace field but also makes an important contribution to global lunar exploration research."
[0052] S1-2: The real-time natural language text after format conversion is processed sequentially into sentence segmentation and word segmentation to obtain several real-time text fragments after word segmentation.
[0053] Clause segmentation:
[0054] Sentence 1: "Recently, my country's independently developed Chang'e 5 lunar probe was successfully launched, marking a major breakthrough for my country in the field of lunar exploration."
[0055] Sentence 2: "The probe carries a variety of scientific instruments, designed to collect soil and rock samples from the lunar surface to provide important data for scientific research."
[0056] Sentence 3: "The successful implementation of this mission not only enhanced my country's status in the international aerospace field, but also made an important contribution to global lunar exploration research."
[0057] Word segmentation:
[0058] Word segmentation result of Sentence 1: ["Recently", "our country", "independently developed", "the", "Chang'e-5", "probe", "successfully", "launched", ",", "marking", "that", "our country", "has", "made", "a", "major", "breakthrough", "in", "the", "field", "of", "lunar", "exploration", "."];
[0059] Word segmentation result of Sentence 2: ["The probe", "carried", "a", "variety", "of", "scientific", "instruments", ",", "aiming", "to", "collect", "soil", "and", "rock", "samples", "on", "the", "lunar", "surface", "and", "provide", "important", "data", "for", "scientific", "research", "."];
[0060] Word segmentation result of Sentence 3: ["The successful", "implementation", "of", "this", "mission", "not only", "enhanced", "our country's", "status", "in", "the", "international", "space", "field", "but also", "made", "an", "important", "contribution", "to", "global", "lunar", "exploration", "research", "."];
[0061] S1-3: Perform part-of-speech tagging on each real-time text segment after word segmentation to obtain several real-time text segments after part-of-speech tagging;
[0062] Part-of-speech tagging:
[0063] Part-of-speech tagging result of Sentence 1: [("Recently", "NT"), ("our country", "NR"), ("independently developed", "VV"), ("the", "DEG"), ("Chang'e-5", "NR"), ("probe", "NN"), ("successfully", "VV"), ("launched", "VV"), (",", "PU"), ("marking", "VV"), ("that", "PU"), ("our country", "NR"), ("has", "AS"), ("made", "VV"), ("a", "DEG"), ("major", "JJ"), ("breakthrough", "NN"), ("in", "P"), ("the", "DEG"), ("field", "NN"), ("of", "DEG"), ("lunar", "JJ"), ("exploration", "NN"), ("。", "PU")];
[0064] POS tagging results of sentence 2: [("探测器", "NN"), ("搭载", "VV"), ("了", "AS"), ("多种", "CD"), ("科学", "NN"), ("仪器", "NN"), (",", "PU"), ("旨在", "VV"), ("采集", "VV"), ("月球", "NN"), ("表面", "NN"), ("的", "DEG"), ("土壤", "NN"), ("和", "CC"), ("岩石", "NN"), ("样本", "NN"), (",", "PU"), ("为", "P"), ("科学", "NN"), ("研究", "NN"), ("提供", "VV"), ("重要", "JJ"), ("数据", "NN"), ("。", "PU")];
[0065] POS tagging results of sentence 3: [("此次", "DT"), ("任务", "NN"), ("的", "DEG"), ("成功", "NN"), ("实施", "VV"), (",", "PU"), ("不仅", "AD"), ("提升", "VV"), ("了", "AS"), ("我国", "NR"), ("在", "P"), ("国际", "NN"), ("航天", "NN"), ("领域", "NN"), ("的", "DEG"), ("地位", "NN"), (",", "PU"), ("也", "AD"), ("为", "P"), ("全球", "NN"), ("月球", "NN"), ("探测", "NN"), ("研究", "NN"), ("做出", "VV"), ("了", "AS"), ("重要", "JJ"), ("贡献", "NN"), ("。", "PU")];
[0066] S1-4: Integrate several real-time text segments after POS tagging to obtain the corresponding preprocessed real-time natural language text;
[0067] S2: Use a text analysis model to perform text analysis on the preprocessed real-time natural language text to obtain the corresponding real-time text analysis results;
[0068] The text analysis model is constructed based on the Convolutional Neural Networks (CNN)-Multi-Layer Perceptron (MLP) algorithm, and the text analysis model includes a text feature extraction module constructed based on the CNN algorithm and a text analysis module constructed based on the MLP algorithm connected in sequence;
[0069] The text feature extraction module utilizes the convolutional layers of a convolutional neural network to extract local features from preprocessed real-time natural language text. By using convolutional kernels of different sizes, it captures local features at different scales, such as characters, words, and phrases. Pooling layers are used to reduce the dimensionality of the convolutional features, decreasing the number of features while retaining the most important feature information, thus reducing computational complexity. The extracted local features are mapped to a high-dimensional space, providing rich feature representations for the subsequent text analysis module. The text analysis module fuses the local features extracted by the CNN module to form a complete text feature representation. The nonlinear activation function of a multilayer perceptron (MLP) is used to perform a nonlinear transformation on the fused features, enhancing the model's nonlinear modeling capability. Depending on the specific task requirements, the output layer of the MLP is used for text classification or regression analysis to obtain the final text analysis results.
[0070] The method for constructing a text analysis model includes the following steps:
[0071] A-1: Collect several historical natural language texts, preprocess and add labels to several historical natural language texts, and obtain several preprocessed historical natural language texts with real text analysis results.
[0072] A-2: Several preprocessed historical natural language texts containing real text analysis results are divided into the first model training set and the first model test set in a 7:3 ratio;
[0073] A-3: Using the CNN-MLP algorithm, construct an initial text analysis model, input the first model training set to optimize and train the initial text analysis model, obtain an optimized text analysis model, and generate several historical text analysis results;
[0074] A-4: Input the first model test set, test the optimized text analysis model, obtain several historical text analysis results, and compare and statistically analyze them with the corresponding real text analysis results to obtain the accuracy of the first model test;
[0075] A-5: If the test accuracy of the first model is greater than the first accuracy threshold, then output the final text analysis model; otherwise, continue to optimize and train.
[0076] Using a text analysis model, preprocessed real-time natural language text is analyzed to obtain the corresponding real-time text analysis results. The process includes the following steps:
[0077] S2-1: Text feature extraction module using text analysis model to extract real-time text features of preprocessed real-time natural language text;
[0078] S2-2: Based on the real-time text features, use the text analysis module of the text analysis model to perform text analysis and obtain the corresponding real-time text analysis results;
[0079] Real-time text analysis results include real-time text type analysis results, real-time text defect identification results, real-time text topic identification results, and real-time text volume analysis results. Among them, the real-time text type analysis results indicate the language type and domain of the natural language text, including types such as Chinese prose, English poetry, and Chinese news; the real-time text defect identification results indicate the format defects and content defects of the natural language text; the real-time text topic identification results indicate the topic of the natural language text, including topics such as daily life and technology; and the real-time text volume analysis results indicate the size of the natural language text.
[0080] S3: Based on the real-time text analysis results, use the strategy generation model to generate strategies for the preprocessed real-time natural language text, and obtain the corresponding real-time information extraction strategies.
[0081] The policy generation model is based on the Improved Sparrow Search Algorithm (ISSA) - Multi-Objective Group Relative Policy Optimization (MOGRPO) algorithm. The policy generation model includes a network parameter optimization module based on the ISSA algorithm and a policy generation module based on the MOGRPO algorithm. The policy generation module includes a set of objective functions, an experience replay pool, a policy network, and an agent. The agent is connected to the set of objective functions, the experience replay pool, and the policy network, respectively. The network parameter optimization module is connected to the policy network.
[0082] The network parameter optimization module optimizes the policy network parameters under different optimization objectives using the ISSA algorithm, obtaining the initial network parameters of the optimal policy network and improving the accuracy of the policy generation model. The objective function set of the policy generation module can handle multiple conflicting optimization objectives, such as minimizing prediction error, minimizing prediction accuracy, maximizing prediction efficiency, maximizing computational resource utilization, and minimizing prediction cost, generating policies that balance these objectives. The agent learns historical policies through the experience replay pool, continuously optimizing its own policy generation capabilities. The agent controls the policy network based on the learned experience to generate more effective policies. The design of the experience replay pool and the agent enables the model to continuously learn and optimize, improving the quality of policy generation. Because the policy generation module adopts a group exploration approach, it can avoid getting trapped in local optima to a certain extent. The policy network outputs the distribution probability of actions in a given state. The policy generation module directly updates the policy network through gradients, eliminating the need for the Critic model in traditional reinforcement learning, making the algorithm structure more concise.
[0083] The method for constructing a policy generation model includes the following steps:
[0084] B-1: Using the ISSA-MOGRPO algorithm, construct the initial policy generation model; the initial policy generation model includes an initial network parameter optimization module and an initial policy generation module;
[0085] B-2: Based on several historical analysis results, the initial network parameter optimization module is optimized and trained to obtain the final network parameter optimization module;
[0086] B-3: Use the final network parameter optimization module to initialize the policy network of the initial policy generation module to obtain the initial policy network;
[0087] B-4: Set up the objective function set and experience replay pool for the initial policy network, and set up the action space and state space for the agent of the initial policy generation module;
[0088] B-5: Using the information extraction strategy generation problem as a simulation environment, and based on the initial policy network and an agent with an action space and a state space, an optimized policy generation module is obtained.
[0089] B-6: Traverse all objective functions in the objective function set, optimize and train the optimized policy generation module based on several preprocessed historical natural language texts, obtain the final policy generation module, and generate several historical policy generation experiences.
[0090] B-7: Integrate the final network parameter optimization module and the final policy generation module to obtain the final policy generation model, and store several historical policy generation experiences in the experience replay pool;
[0091] Based on the real-time text analysis results, a strategy generation model is used to generate strategies for the preprocessed real-time natural language text, resulting in corresponding real-time information extraction strategies. The process includes the following steps:
[0092] S3-1: Parse the real-time text analysis results to obtain the real-time mapping factor, and update the optimization objective of the network parameter optimization module of the strategy generation model based on the real-time mapping factor to obtain the updated optimization objective;
[0093] Real-time mapping factors include prediction error value, prediction accuracy, prediction efficiency, computing resource utilization, and prediction cost. When the real-time text type analysis result is a complex type such as Chinese news, the real-time mapping factors include prediction error value or prediction accuracy. When the real-time text defect identification result indicates the presence of defects, the real-time mapping factors include prediction error value, prediction accuracy, and prediction efficiency. When the real-time text volume analysis result is a large volume, the real-time mapping factors include prediction efficiency, computing resource utilization, and prediction cost. In this embodiment, the prediction error value is used as an example to illustrate the workflow of network parameter optimization.
[0094] S3-2: Based on the updated optimization objective, use the network parameter optimization module to optimize the policy network of the policy generation module of the policy generation model, obtaining the optimized policy network, including the following steps:
[0095] S3-2-1: Based on the updated optimization objective, set the fitness function of the network parameter optimization module, and set the algorithm parameters and maximum number of iterations for the ISSA algorithm;
[0096] The formula is:
[0097] f(X) = minMSN
[0098] In the formula, f(X) is the fitness value of ISSA individual X; minMSN is the prediction error value of ISSA individual X; and X is the ISSA individual reference parameter.
[0099] S3-2-2: Encode the initial network parameters of the policy network of the policy generation module of the policy generation model into solution vectors of ISSA individuals, and use the Circle chaotic mapping sequence to initialize based on the solution vectors to generate several initial solutions;
[0100] The formula is:
[0101]
[0102] In the formula, X' c For the initial ISSA individuals of the Circle chaotic map; X c * The initial ISSA individuals are randomly generated, i.e., the initial solution; mod(*) is the modulo function;
[0103] S3-2-3: Use the fitness function to obtain the initial fitness values of all initial ISSA populations, and sort the initial ISSA individuals according to the initial fitness values to obtain the initial discoverers, initial joiners, and initial predators.
[0104] S3-2-4: Use the network parameter optimization module to update the initial ISSA population to obtain an updated ISSA population; the updated ISSA population includes updated discoverers, updated joiners, and updated predators.
[0105] The update formula for the discoverer is:
[0106]
[0107] In the formula, They are the c-th discoverer ISSA individuals in the (t+1)th and tth iterations, respectively; iter max ξ is the maximum number of iterations; Q is a normally distributed random number; L is a 1×D matrix with all elements being 1; R² is the warning value; ST is the safety threshold; c is the ISSA individual indicator; i is the update parameter.
[0108] The update formula for new members is:
[0109]
[0110] In the formula, These are the c-th ISSA individuals that joined at the (t+1)th and tth iterations, respectively. The best position for those whose identities will be exposed; The worst position is ξ; ξ is a random number between 0 and 1; L is a 1×D matrix whose elements are all 1s or -1s; A + The location update parameter; h is the total number of ISSA individuals;
[0111] The predator's update formula is:
[0112]
[0113] In the formula, Let be the c-th predator ISSA individuals in the (t+1)th and tth iterations, respectively; δ is the step size control parameter, and δ = a"·γ", where a" is the convergence factor and γ" is a non-zero positive real number for step size control. The current optimal position; f c f g f w These represent the current, best, and worst fitness of the ISSA individual, respectively; γ is a minimum constant to prevent the denominator from being 0.
[0114]
[0115] In the formula, a" is the convergence factor; tanh(.) is the hyperbolic tangent function; t is the iteration indicator; t max a is the maximum number of iterations. max a min λ and k" are the maximum and minimum values of the convergence factor, respectively; λ is the deceleration rate parameter, k" is the deceleration period parameter, λ = -2π, k" = π;
[0116] S3-2-5: Use the dynamic reverse learning algorithm to perform dynamic reverse learning on the updated ISSA population to generate a dynamically reversed ISSA population.
[0117] The formula is:
[0118]
[0119] In the formula, For dynamically reversed ISSA individuals; γ* is the decreasing inertia coefficient; ub is the upper limit of the search space; lb is the lower limit of the search space; For updated ISSA individuals;
[0120] S3-2-6: Use the fitness function to obtain the updated fitness values of all ISSA individuals in the updated ISSA population and the dynamically reversed ISSA population, and take the ISSA individual with the smallest updated fitness value as the optimal solution.
[0121] S3-2-7: Decode the solution vector corresponding to the optimal solution to obtain the optimal initial network parameters of the policy network, and optimize the policy network of the policy generation module of the policy generation model based on the optimal initial network parameters to obtain the optimized policy network.
[0122] S3-3: Using a policy generation module with an optimized policy network, policies are generated on the preprocessed real-time natural language text to obtain the corresponding real-time information extraction policies.
[0123] Real-time information extraction strategies include real-time text processing decisions, real-time word embedding adjustment decisions, real-time attention weight adjustment decisions, and real-time sequence labeling adjustment decisions;
[0124] Real-time text processing decisions include a series of "select", "skip", and "merge" operations, including "select" ("Chang'e 5", "NR"), ("probe", "NN"), performing "merge" to obtain ("Chang'e 5 probe", "NR"), and "skip" ("recently", "NT"), ("my country", "NR").
[0125] Real-time word embedding adjustment decision-making adjusts word embeddings for keywords such as "Chang'e 5 probe" and "lunar surface";
[0126] Real-time attention weighting decisions assign higher weights to words or phrases such as "successful launch", "major breakthrough", and "scientific instrument".
[0127] The decision to adjust the noun labeling is to label "Chang'e 5" as a proper noun NN, and other nouns will be labeled according to the context;
[0128] S4: Based on the real-time information extraction strategy, use the information extraction model to extract information from the preprocessed real-time natural language text to obtain the corresponding real-time key information;
[0129] The information extraction model is built on the Bidirectional Encoder Representations from Transformers (BERT) - Long Short-Term Memory (LSTM) - Attention - Conditional Random Fields (CRF) algorithm. The information extraction model includes a word embedding module based on the BERT algorithm, a semantic feature extraction module based on the LSTM algorithm, an attention weight module based on the Attention mechanism, and an information extraction module based on the CRF algorithm, which are connected in sequence.
[0130] The context-aware nature of the word embedding module enables word embeddings to better reflect the contextual meaning of words, improving the model's understanding of complex semantics. Utilizing a pre-trained model reduces the need for manual feature engineering and simplifies the model building process. The semantic feature extraction module effectively captures long-term dependencies in the text, enhancing the understanding of complex sentence structures. By integrating contextual information, it generates richer semantic representations, providing more valuable information for subsequent modules. The attention weight module, through an attention mechanism, allows the model to focus more on key information, improving the accuracy of information extraction. It dynamically adjusts feature representations, enabling the model to adapt to the needs of different texts and tasks. The information extraction module effectively models the dependencies between labels, improving the accuracy of sequence labeling. Through precise sequence labeling, it enhances the overall performance and effectiveness of the information extraction model.
[0131] The method for constructing an information extraction model includes the following steps:
[0132] C-1: Add labels to several preprocessed historical natural language texts to obtain several preprocessed historical natural language texts with real key information.
[0133] C-2: Several preprocessed historical natural language texts containing real key information are divided into the training set and the test set of the second model in a 7:3 ratio.
[0134] C-3: Use the BERT-LSTM-Attention-CRF algorithm to build an initial information extraction model, input the second model training set to optimize and train the initial information extraction model, obtain the optimized information extraction model, and generate some historical key information;
[0135] C-4: Input the second model test set, test the optimized information extraction model, obtain some historical key information, and compare and statistically analyze it with the corresponding real key information to obtain the accuracy of the second model test.
[0136] C-5: If the test accuracy of the second model is greater than the second accuracy threshold, output the final information extraction model; otherwise, continue optimization training.
[0137] Based on the real-time information extraction strategy, an information extraction model is used to extract information from the preprocessed real-time natural language text to obtain the corresponding real-time key information, including the following steps:
[0138] S4-1: Based on the real-time text processing decision in the real-time information extraction strategy, perform text processing on the preprocessed real-time natural language text to obtain the processed real-time natural language text.
[0139] S4-2: Based on the real-time word embedding adjustment decision in the real-time information extraction strategy, adjust the word embedding module of the information extraction model to obtain the adjusted word embedding module;
[0140] S4-3: Based on the real-time attention weight adjustment decision in the real-time information extraction strategy, adjust the attention weight module of the information extraction model to obtain the adjusted attention weight module;
[0141] S4-4: Based on the real-time sequence labeling adjustment decision in the real-time information extraction strategy, adjust the information extraction module of the information extraction model to obtain the adjusted information extraction module;
[0142] S4-5: Using the adjusted word embedding module of the information extraction model, word embedding is performed on the real-time natural language text after text processing to obtain real-time word embedding vectors;
[0143] S4-6: Using the semantic feature extraction module of the information extraction model, extract the real-time semantic features of the real-time word embedding vector;
[0144] S4-7: Using the adjusted attention weight module of the information extraction model, several real-time feature components of the real-time semantic features are weighted and fused to obtain real-time weighted fused features;
[0145] S4-8: Based on the real-time weighted fusion features, the adjusted information extraction module of the information extraction model is used to perform sequence labeling to obtain the corresponding real-time key information;
[0146] The real-time key information includes "Chang'e 5 probe", "successful launch", "lunar exploration", "major breakthrough", "scientific instruments", "lunar surface", "soil and rock samples", "scientific research", "international aerospace field", and "important contributions".
[0147] Example 2:
[0148] like Figure 2 As shown, this embodiment provides an information extraction system based on natural language text to implement an information extraction method. The system includes a preprocessing unit, a text analysis unit, a strategy generation unit, and an information extraction unit connected in sequence.
[0149] The preprocessing unit is used to collect real-time natural language text and preprocess the real-time natural language text to obtain the corresponding preprocessed real-time natural language text.
[0150] The text analysis unit is used to perform text analysis on preprocessed real-time natural language text using a text analysis model, and obtain the corresponding real-time text analysis results.
[0151] The strategy generation unit is used to generate strategies for preprocessed real-time natural language text based on real-time text analysis results and using a strategy generation model to obtain corresponding real-time information extraction strategies.
[0152] The information extraction unit is used to extract information from preprocessed real-time natural language text according to the real-time information extraction strategy and the information extraction model, so as to obtain the corresponding real-time key information.
[0153] This invention provides a method and system for information extraction based on natural language text. By preprocessing the natural language text and employing an artificial intelligence model for automated data processing, the processing time for information extraction is significantly shortened, meeting real-time requirements, effectively reducing computational resource consumption, and achieving efficient information extraction. Dynamic information extraction strategies are generated based on the text state of the natural language text, and information extraction is performed using an information extraction model, improving the accuracy of information extraction, reducing false positives and false negatives, and ensuring stable and reliable information extraction results. The use of an artificial intelligence model for automated text analysis and information extraction reduces reliance on manual rules, thereby improving flexibility and scalability. Through the deep structure of the text analysis model, semantic understanding capabilities are enhanced, accurately capturing deep semantic information and relationships in the text, mining valuable information, and improving the depth and breadth of information extraction.
[0154] This invention is not limited to the optional embodiments described above, and anyone can derive other various forms of products based on the inspiration of this invention. The specific embodiments described above should not be construed as limiting the scope of protection of this invention; the scope of protection of this invention should be determined by the claims, and the specification can be used to interpret the claims.
Claims
1. A method for information extraction based on natural language text, characterized in that: Includes the following steps: Collect real-time natural language text and preprocess the real-time natural language text to obtain the corresponding preprocessed real-time natural language text; Using a text analysis model, preprocessed real-time natural language text is analyzed to obtain the corresponding real-time text analysis results. Based on the real-time text analysis results, a strategy generation model is used to generate strategies for the preprocessed real-time natural language text, resulting in corresponding real-time information extraction strategies. The policy generation model is constructed based on the ISSA-MOGRPO algorithm, and includes a network parameter optimization module based on the ISSA algorithm and a policy generation module based on the MOGRPO algorithm. The policy generation module includes an objective function set, an experience replay pool, a policy network, and an agent. The agent is connected to the objective function set, the experience replay pool, and the policy network, respectively. The network parameter optimization module is connected to the policy network. Includes the following steps: The real-time text analysis results are parsed to obtain the real-time mapping factor. Based on the real-time mapping factor, the optimization objective of the network parameter optimization module of the strategy generation model is updated to obtain the updated optimization objective. Based on the updated optimization objective, the network parameter optimization module is used to optimize the policy network of the policy generation module of the policy generation model, resulting in an optimized policy network. Using a policy generation module with an optimized policy network, policies are generated from preprocessed real-time natural language text to obtain corresponding real-time information extraction policies. Based on the real-time information extraction strategy, the information extraction model is used to extract information from the preprocessed real-time natural language text to obtain the corresponding real-time key information. The method for constructing a policy generation model includes the following steps: The ISSA-MOGRPO algorithm is used to construct an initial policy generation model; the initial policy generation model includes an initial network parameter optimization module and an initial policy generation module. Based on several historical analysis results, the initial network parameter optimization module is optimized and trained to obtain the final network parameter optimization module. The final network parameter optimization module is used to initialize the policy network of the initial policy generation module, resulting in the initial policy network. Set up a set of objective functions and an experience replay pool for the initial policy network, and set up an action space and a state space for the agent of the initial policy generation module; The information extraction strategy generation problem is used as a simulation environment, and an optimized strategy generation module is obtained based on the initial policy network and an agent with an action space and a state space. Traverse all objective functions in the objective function set, optimize and train the optimized policy generation module based on several preprocessed historical natural language texts, obtain the final policy generation module, and generate several historical policy generation experiences. The final network parameter optimization module and the final policy generation module are integrated to obtain the final policy generation model, and several historical policy generation experiences are stored in the experience replay pool.
2. The information extraction method based on natural language text according to claim 1, characterized in that: The process of acquiring real-time natural language text and preprocessing it to obtain preprocessed real-time natural language text includes the following steps: Collect real-time natural language text and perform format conversion on the real-time natural language text to obtain the format-converted real-time natural language text; The real-time natural language text after format conversion is processed sequentially into sentence segmentation and word segmentation to obtain several real-time text fragments after word segmentation. Each segmented real-time text fragment is tagged with part-of-speech tags to obtain several tagged real-time text fragments. By integrating several part-of-speech tagged real-time text fragments, the corresponding preprocessed real-time natural language text is obtained.
3. The information extraction method based on natural language text according to claim 2, characterized in that: The text analysis model is built on the CNN-MLP algorithm and includes a text feature extraction module based on the CNN algorithm and a text analysis module based on the MLP algorithm, which are connected in sequence.
4. The information extraction method based on natural language text according to claim 3, characterized in that: Using a text analysis model, preprocessed real-time natural language text is analyzed to obtain the corresponding real-time text analysis results. The process includes the following steps: The text feature extraction module of the text analysis model is used to extract real-time text features from preprocessed real-time natural language text. Based on real-time text features, the text analysis module of the text analysis model is used to perform text analysis and obtain the corresponding real-time text analysis results.
5. The information extraction method based on natural language text according to claim 4, characterized in that: The real-time information extraction strategy includes real-time text processing decision-making, real-time word embedding adjustment decision-making, real-time attention weight adjustment decision-making, and real-time sequence labeling adjustment decision-making.
6. The information extraction method based on natural language text according to claim 5, characterized in that: The information extraction model is constructed based on the BERT-LSTM-Attention-CRF algorithm, and includes a word embedding module based on the BERT algorithm, a semantic feature extraction module based on the LSTM algorithm, an attention weight module based on the Attention mechanism, and an information extraction module based on the CRF algorithm, which are connected in sequence.
7. The information extraction method based on natural language text according to claim 6, characterized in that: Based on the real-time information extraction strategy, an information extraction model is used to extract information from the preprocessed real-time natural language text to obtain the corresponding real-time key information, including the following steps: Based on the real-time text processing decision in the real-time information extraction strategy, the preprocessed real-time natural language text is processed to obtain the processed real-time natural language text. Based on the real-time word embedding adjustment decision in the real-time information extraction strategy, the word embedding module of the information extraction model is adjusted to obtain the adjusted word embedding module; Based on the real-time attention weight adjustment decision in the real-time information extraction strategy, the attention weight module of the information extraction model is adjusted to obtain the adjusted attention weight module. Based on the real-time sequence labeling adjustment decision in the real-time information extraction strategy, the information extraction module of the information extraction model is adjusted to obtain the adjusted information extraction module; The adjusted word embedding module of the information extraction model is used to embed words into real-time natural language text after text processing, and real-time word embedding vectors are obtained. The semantic feature extraction module of the information extraction model is used to extract real-time semantic features of real-time word embedding vectors; The adjusted attention weight module of the information extraction model is used to perform weighted fusion of several real-time feature components of real-time semantic features to obtain real-time weighted fused features. Based on the real-time weighted fusion features, the adjusted information extraction module of the information extraction model is used to perform sequence labeling and obtain the corresponding real-time key information.
8. An information extraction system based on natural language text, used to implement the information extraction method as described in any one of claims 1-7, characterized in that: The system comprises a preprocessing unit, a text analysis unit, a strategy generation unit, and an information extraction unit connected in sequence.
Citation Information
Patent Citations
Natural language processing method and system based on machine learning
CN117493491A
Hydropower remote centralized control safety anti-error method and system
CN118396260A