Neural network-based text structured information extraction method and related device thereof

By employing a neural network-based text structured information extraction method, and utilizing word discovery algorithms and classification models to automate the processing of medical insurance clauses, the problem of difficulty in interpreting medical insurance clauses and lack of interoperability is solved, achieving efficient and accurate information extraction.

CN113987125BActive Publication Date: 2026-04-10SHENZHEN PING AN MEDICAL HEALTH TECHNOLOGY SERVICES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Current medical insurance clause interpretation relies on manual processing, which makes it difficult to understand and prone to disputes. Furthermore, the lack of interoperability between medical insurance policies in different regions increases the difficulty of interpretation. Therefore, there is a need for automated methods for extracting structured information from text.

Method used

A neural network-based approach is adopted, which uses a word discovery algorithm to identify candidate words, uses a classification model trained with standard words to classify text, constructs and extracts expressions and performs matching to generate structured text information.

Benefits of technology

It has enabled automated and structured information extraction from texts such as medical insurance clauses, improving the efficiency and accuracy of information acquisition and reducing the difficulty of manual interpretation and the risk of disputes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113987125B_ABST
    Figure CN113987125B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the field of artificial intelligence, and relates to a text structured information extraction method and device based on a neural network, a computer device and a storage medium. The method comprises the following steps: obtaining a to-be-processed text; determining a candidate word in the to-be-processed text based on a preset word discovery algorithm; inputting the to-be-processed text with the candidate word into a classification model trained according to a standard word to obtain a text classification result of the to-be-processed text with respect to the standard word; when it is determined that the to-be-processed text meets a text classification condition according to the text classification result, constructing an extraction expression based on the candidate word; matching the to-be-processed text with the extraction expression to obtain a matching result; and generating text structured information based on the matching result. In addition, the application also relates to blockchain technology, and the to-be-processed text can be stored in a blockchain. The application realizes automatic extraction of text structured information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, and storage medium for extracting structured text information based on neural networks. Background Technology

[0002] In daily life, we often encounter various clauses, such as medical insurance clauses and social security clauses. These clauses, drafted from a practical standpoint, explain various aspects of related matters, often appearing lengthy, tedious, and difficult to understand. However, sometimes it is necessary to accurately understand the clauses and extract the required information promptly. For example, my country's medical insurance is generally managed at the city level, and medical insurance between cities is not interconnected. Medical insurance clauses are determined by local policies, which increases the difficulty for insured individuals to understand them. Furthermore, the interpretation of medical insurance clauses mainly relies on manual processing. Due to differences in the professional level of personnel in medical insurance agencies, disputes may arise between medical insurance agencies and insured individuals due to unclear interpretations of the clauses. Therefore, automatically extracting structured information from the clauses is extremely important. Summary of the Invention

[0003] The purpose of this application is to propose a method, apparatus, computer device, and storage medium for extracting structured text information based on neural networks, so as to achieve automated extraction of structured text information.

[0004] To address the aforementioned technical problems, this application provides a method for extracting structured text information based on neural networks, employing the following technical solution:

[0005] Get the text to be processed;

[0006] Based on a preset word discovery algorithm, candidate words are identified in the text to be processed;

[0007] Input the text to be processed containing candidate words into the classification model trained based on the standard words, and obtain the text classification result of the text to be processed according to the standard words;

[0008] When it is determined from the text classification results that the text to be processed meets the text classification conditions, an extraction expression is constructed based on the candidate words;

[0009] The text to be processed is matched with the extracted expression to obtain the matching result;

[0010] Textual structured information is generated based on the matching results.

[0011] To address the aforementioned technical problems, this application also provides a neural network-based text structured information extraction device, which employs the following technical solution:

[0012] The text acquisition module is used to acquire the text to be processed.

[0013] The candidate word determination module is used to determine candidate words in the text to be processed based on a preset word discovery algorithm;

[0014] The text classification module is used to input the text to be processed containing candidate words into a classification model trained based on standard words, and obtain the text classification result of the text to be processed for the standard words.

[0015] An expression construction module is used to construct an extraction expression based on the candidate words when the text to be processed is determined to meet the text classification conditions according to the text classification results.

[0016] The text matching module is used to match the text to be processed with the extracted expression to obtain the matching result;

[0017] The information generation module is used to generate structured text information based on the matching results.

[0018] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:

[0019] Get the text to be processed;

[0020] Based on a preset word discovery algorithm, candidate words are identified in the text to be processed;

[0021] Input the text to be processed containing candidate words into the classification model trained based on the standard words, and obtain the text classification result of the text to be processed according to the standard words;

[0022] When it is determined from the text classification results that the text to be processed meets the text classification conditions, an extraction expression is constructed based on the candidate words;

[0023] The text to be processed is matched with the extracted expression to obtain the matching result;

[0024] Textual structured information is generated based on the matching results.

[0025] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:

[0026] Get the text to be processed;

[0027] Based on a preset word discovery algorithm, candidate words are identified in the text to be processed;

[0028] Input the text to be processed containing candidate words into the classification model trained based on the standard words, and obtain the text classification result of the text to be processed according to the standard words;

[0029] When it is determined from the text classification results that the text to be processed meets the text classification conditions, an extraction expression is constructed based on the candidate words;

[0030] The text to be processed is matched with the extracted expression to obtain the matching result;

[0031] Textual structured information is generated based on the matching results.

[0032] Compared with the prior art, the embodiments of this application have the following advantages: After obtaining the text to be processed, candidate words are identified in the text through a word discovery algorithm. Candidate words are words that are initially determined to be valuable in the text to be processed. The classification model is trained in advance using standard words, and then the text to be processed containing candidate words is input into the classification model to determine the correlation between the text to be processed containing candidate words and the standard words, thereby achieving the screening of candidate words and obtaining the text classification result. When the text classification result shows that the text to be processed containing candidate words has a strong correlation with the standard words, a regular extraction expression is constructed based on the candidate words. The extraction expression is matched with the text to be processed, and valuable information can be extracted from the text to be processed based on the matching result, thereby achieving the automated extraction of structured information from the text. Attached Figure Description

[0033] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0035] Figure 2 This is a flowchart of an embodiment of the neural network-based text structured information extraction method according to this application;

[0036] Figure 3 This is a schematic diagram of a structure of an embodiment of the neural network-based text structured information extraction device according to this application;

[0037] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0039] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0040] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0041] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0042] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0043] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0044] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0045] It should be noted that the neural network-based text structured information extraction method provided in this application embodiment is generally executed by a server, and correspondingly, the neural network-based text structured information extraction device is generally set in the server.

[0046] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0047] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the neural network-based text structured information extraction method according to this application. The neural network-based text structured information extraction method includes the following steps:

[0048] Step 201: Obtain the text to be processed.

[0049] In this embodiment, the neural network-based text structured information extraction method is run on an electronic device (e.g., Figure 1 The server shown can communicate with the terminal via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future known wireless connection methods.

[0050] Specifically, the server can perform text structured information processing based on the received structured information extraction instructions. First, the server needs to obtain the text to be processed, which is the text from which structured information is to be extracted.

[0051] It should be emphasized that, to further ensure the privacy and security of the text to be processed, the text can also be stored in a node of a blockchain.

[0052] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0053] Step 202: Based on the preset word discovery algorithm, candidate words are identified in the text to be processed.

[0054] Word discovery algorithms refer to algorithms that discover and mine new words from text. Here, a new word refers to a text segment that has independent meaning and has not yet been included in an existing thesaurus or dictionary. Candidate words are words in the text to be processed that may be new words and have high value.

[0055] Specifically, the text to be processed is first processed using a pre-defined word discovery algorithm to extract potential new words. These new words are then used as candidate words in the text for further classification. When determining whether a text segment is a new word, the word discovery algorithm considers the left and right collocations of the segment. This means that the left and right sides of the segment can be combined with different characters or phrases to form meaningful expressions. Furthermore, the internal collocations of the segment are relatively fixed, and the segment often appears as a fixed whole. Additionally, the segment does not exist in existing thesaurus or dictionaries.

[0056] Step 203: Input the text to be processed containing candidate words into the classification model trained based on the standard words to obtain the text classification result of the text to be processed based on the standard words.

[0057] This application can pre-build a standard lexicon, which contains standard words. Standard words are words that are semantically basic, such as "reimbursement ratio" which can be a standard word.

[0058] Specifically, after identifying candidate words in the text to be processed, texts without candidate words are no longer processed. Texts containing candidate words are then input into the classification model. The classification model is a text classification model that has been pre-trained on standard words and can determine whether there is a relationship between the text to be processed and the standard words. When candidate words in the text to be processed are similar to standard words, there is a strong relationship between the text to be processed and the standard words. The classification model can output the relationship between the text to be processed and the standard words as the text classification result.

[0059] Step 204, when it is determined according to the text classification result that the text to be processed meets the text classification condition, an extraction expression is constructed based on the candidate words.

[0060] Specifically, the text classification result can show whether there is an association relationship between the text to be processed and the standard words. When the text classification result shows that there is an association relationship between the text to be processed and a certain standard word, the text to be processed meets the text classification condition, and the text to be processed belongs to the category represented by the standard word. The standard words are some basic but important words set in advance. When the text to be processed meets the text classification condition, it indicates that there are valuable candidate words in the text to be processed, and structured information extraction can be performed.

[0061] Structured information extraction is realized based on the extraction expression. The candidate words in the text to be processed can be used as the basis to construct the extraction expression.

[0062] Step 205, match the text to be processed with the extraction expression to obtain a matching result.

[0063] Specifically, the constructed extraction expression can be a regular expression. A regular expression, also known as a rule expression, is a logical formula for string operations. It is composed of some predefined specific characters and combinations of these specific characters to form a "rule string", and this "rule string" is used to express a filtering logic for strings.

[0064] Matching the text to be processed with the extraction expression can obtain a matching result, and the matching result contains the text information related to the candidate words recognized from the text to be processed.

[0065] Step 206, generate text structured information based on the matching result.

[0066] Specifically, the extraction expression matches text information from the text to be processed based on a fixed format. The fixed format sometimes unavoidably brings meaningless characters. For example, the "le" in the matching result "rose by" has no actual meaning. Therefore, the matching result can be refined to remove meaningless characters and generate text structured information. The text structured information can be output and displayed.

[0067] In one embodiment, when the text to be processed meets the text classification condition, the candidate words in the text to be processed can also be marked and output as text structured information.

[0068] The text to be processed in this application can be texts in various fields. For example, it can be medical insurance terms, social security terms, product manuals, official documents, announcements, etc. In practical applications, for texts in different fields, classification models and extraction expressions can be constructed针对性 to improve the accuracy of text structured information extraction.

[0069] In this embodiment, after acquiring the text to be processed, a word discovery algorithm is used to identify candidate words in the text. Candidate words are words that are initially determined to be valuable in the text. The classification model is trained in advance using standard words, and then the text to be processed containing candidate words is input into the classification model to determine the correlation between the text containing candidate words and the standard words, thereby filtering the candidate words and obtaining the text classification result. When the text classification result shows that the text containing candidate words has a strong correlation with the standard words, a regular extraction expression is constructed based on the candidate words. The extraction expression is matched with the text to be processed, and valuable information can be extracted from the text based on the matching result, thereby realizing the automated extraction of structured information from the text.

[0070] Furthermore, step S201 may include: obtaining the file to be processed; identifying the file format of the file to be processed; when the file format belongs to the first format, determining the file to be processed as the text to be processed; when the file format belongs to the second format, converting the file to be processed according to the first format to obtain the text to be processed.

[0071] Specifically, the server first obtains the files to be processed. These files come in various formats and may not be directly compatible with text processing. Therefore, the file format of the files to be processed can be identified first. File formats include a first format and a second format. The first format is one that can be directly processed with text, such as a text format (txt). The second format is one that cannot be directly processed with text, such as jpg (Joint Photographic Experts Group, also known as JPEG, an image file format), png (Portable Network Graphics), and pdf (Portable Document Format).

[0072] When the file format of the file to be processed is the first format, the file to be processed is directly identified as the text to be processed; when the file format of the file to be processed is the second format, the file to be processed is converted to the first format to obtain the text to be processed. For example, the format conversion of the file to be processed can be performed by OCR (Optical Character Recognition) technology.

[0073] In this embodiment, the file format of the file to be processed is identified so that the file to be processed can be converted into a first format that can be processed, thus obtaining the text to be processed, laying the foundation for text processing.

[0074] Further, the above step S202 may include: performing N-Gram segmentation on the text to be processed to obtain multiple strings; for each string, calculating the left adjacent entropy and the right adjacent entropy of the string, and calculating the information entropy of the string according to the left adjacent entropy and the right adjacent entropy; calculating the average mutual information of the string; performing a linear operation on the information entropy and the average mutual information to obtain the score of the string; when the score is greater than a preset score threshold, determining the string as a candidate word.

[0075] Among them, N-Gram is also called the Chinese Language Model (CLM), and it can utilize the collocation information between adjacent words in the context. N-Gram segmentation is also called N-ary segmentation, which refers to sequentially dividing or partitioning the text corpus into adjacent N characters. N is usually a positive integer greater than or equal to 2. For example, for binary segmentation, it means sequentially dividing or partitioning the text corpus into adjacent 2 Chinese characters. For the text corpus "Natural Language Processing" with N = 2 for N-Gram segmentation, the strings that can be obtained are "自然", "然语", "语言", "言处", and "处理".

[0076] Specifically, perform N-Gram segmentation on the text to be processed to obtain multiple strings. Before N-Gram segmentation, the text to be processed can be preprocessed first, and strings such as punctuation marks, stop words, carriage returns, and spaces in the text to be processed are replaced with preset identifiers.

[0077] For each string, calculate its left adjacent entropy and right adjacent entropy. Entropy, that is, information entropy, refers to the degree of freedom of the string, that is, the richness of the left adjacent character or right adjacent character of the string. The information entropy of the string is proportional to the number of the left adjacent character or right adjacent character of the string. If the string can be paired with more left adjacent characters or right adjacent characters, the corresponding information entropy of the string is greater. If the candidate word can be paired with fewer left adjacent characters or right adjacent characters, the corresponding information entropy of the candidate word is smaller.

[0078] The left adjacent entropy, also called the left information entropy or the left adjacent character information entropy, refers to the richness of the left adjacent character of the string, that is, the number of sub-words that can be paired on the left side of the string. The formula for the left adjacent entropy is as follows:

[0079]

[0080] Among them, W m is the set of left adjacent characters of the string, string represents the string, and P(ω i 丨string) is the conditional probability.

[0081] The right neighbor entropy, also known as the right information entropy or the right neighbor word information entropy, refers to the richness of the right neighbor words of a string, that is, the number of sub-words that can be paired on the right side of the string. The right neighbor entropy formula is as follows:

[0082]

[0083] where W n is the set of right neighbor words of the string, string represents the string, and P(ω i 丨string) is the conditional probability.

[0084] The larger the calculated entropy, the greater the amount of information it represents. Based on the left neighbor entropy and the right neighbor entropy, the information entropy L(W) of the string can be calculated as:

[0085]

[0086] A string can be composed of substrings. For example, for the string "Futian District", it can be composed of the left substring "Futian" and the right substring "District". The mutual information between two substrings evaluates their significance when together. The greater the mutual information, the stronger the mutual dependence, rather than being dispensable. In actual text data, the frequency of many characters appearing together is very high, but this does not mean that their combination can be regarded as a word. Therefore, mutual information can be used to evaluate which combinations of substrings are truly meaningful and which are dispensable.

[0087] The mutual information MI(W) between two substrings is:

[0088]

[0089] where p(x) represents the probability of the substring appearing in the text to be processed, l represents the left substring, and r represents the right substring.

[0090] Since the mutual information quantity is affected by the length of the substring (the longer the substring, the larger the mutual information value), therefore, the average mutual information AMI(W) is used as a measure of the string cohesion degree:

[0091]

[0092] where n represents the length of the string.

[0093] Then, a linear operation is performed on the information entropy and the average mutual information of the string to obtain the score of the string score:

[0094] score = α·L(W) + β·AMI(W) (6)

[0095] The linear operation parameters α and β can be set. If both are set to 1, then information entropy and average mutual information are considered equally important; otherwise, one will be favored over the other.

[0096] Whether a string is a new word can be determined using the scores mentioned above. A score threshold can be preset, and the score of a string is compared with the score threshold. When the score is greater than the preset score threshold, the string is determined to be a new word, and the determined new word is identified as a candidate word.

[0097] In one embodiment, when performing N-Gram segmentation, N can have multiple values. Then, a word discovery algorithm is used to identify multiple new words of different lengths and obtain multiple candidate words of different lengths.

[0098] In one embodiment, since N can take various values ​​during N-gram segmentation, the lengths of the new words may differ. However, due to the different values ​​of N, there may be overlap between the characters of the new words, and some new words may exist within others. In such cases, the new words with the largest range can be retained and used as candidate words. For example, if the new words "outpatient reimbursement ratio" and "employee outpatient reimbursement ratio" are extracted, then "employee outpatient reimbursement ratio" is retained and identified as a candidate word.

[0099] In this embodiment, the information entropy and average mutual information of the strings obtained after N-Gram segmentation are calculated. The score of the string is calculated based on the information entropy and average mutual information. The score can measure the value of the string, so new words can be selected based on the score and used as candidate words.

[0100] Furthermore, step S203 may include: performing N-Gram segmentation on the text to be processed containing candidate words to obtain multiple N-Gram phrases; and sequentially inputting each N-Gram phrase into the input unit of the classification model according to the position of each N-Gram phrase in the text to be processed to obtain the text classification result for the standard word. The classification model is a multi-label classification model that has been pre-trained based on the standard word.

[0101] Specifically, the text to be processed containing candidate words is segmented into N-Gram segments to obtain multiple N-Gram phrases. The N-Gram phrases are distributed in different positions in the text to be processed and have positional information.

[0102] The classification model in this application can be the fasttext model, which is a fast text classification model. Its architecture is similar to the CBOW model in word2vec, consisting of an input layer, a hidden layer, and an output layer. The input layer can contain multiple input units.

[0103] Based on the order of N-gram phrases in the text to be processed, each N-gram phrase is sequentially input into the classification unit of the classification model, with one N-gram phrase input into each classification unit. Using N-gram phrases as input allows for the creation of relationships between phrases, optimizing the phrase vectors (the model converts phrases into vectors for processing). Simultaneously, N-grams can associate adjacent words, allowing the model to learn the information contained in word order, i.e., contextual information, thus improving the accuracy of the model's classification.

[0104] The FastText model is pre-trained on standard words using a multi-label training approach. The trained FastText model is a multi-label classification model. For the input text, it calculates the correlation between the text and multiple standard words, outputting these correlations as probabilities to obtain the text classification result for each standard word. In other words, FastText treats standard words as "categories" and determines whether the text belongs to the "category" represented by a particular standard word.

[0105] In this embodiment, the text to be processed containing candidate words is split into multiple N-Gram phrases using N-Gram splitting. The N-Gram phrases are then input into the classification model according to their positions in the text to be processed, so that the model can learn contextual information and improve the accuracy of text classification.

[0106] Furthermore, step S204 may include: extracting the attribution degree for the standard word from the text classification results; comparing the attribution degree with a preset attribution degree threshold; determining that the text to be processed meets the text classification conditions when the attribution degree is greater than the attribution degree threshold; and constructing an extraction expression based on the candidate words.

[0107] Specifically, the text classification results can use the attribution score to measure the association between the text to be processed and the standard words. The attribution score can be a number ranging from [0,1]. For each standard word, the classification model can output the attribution score of the text to be processed relative to the standard word.

[0108] A threshold for attribution can be preset. When there is an attribution value greater than the threshold, it indicates that the text to be processed has a strong correlation with a certain standard word and meets the text classification criteria. At this time, extraction expressions can be constructed for the candidate words in the text to be processed, in preparation for the processing of text structure information.

[0109] In this embodiment, the attribution degree is used to characterize the association between the text to be processed and the standard words. Based on the attribution degree and the attribution degree threshold, the text to be processed that meets the text classification conditions can be quickly determined, thereby achieving further screening of candidate words.

[0110] Furthermore, the above steps for constructing extraction expressions based on candidate words may include: determining the candidate word category based on the text classification results, wherein the candidate word category includes numerical and textual categories; when the candidate word category is numerical, constructing a numerical extraction expression based on the candidate word; when the candidate word category is textual, constructing a textual extraction expression based on the candidate word.

[0111] Specifically, text classification results can represent the correlation between the text to be processed and the standard words, and the candidate words in the text to be processed have a significant impact on the correlation. Standard words can be pre-classified into categories, and when the text to be processed is determined to meet the text classification criteria based on the text classification results, the category of the standard words can be used as the candidate word category for the candidate words.

[0112] There are two categories of candidate words: numerical and textual. Numerical candidate words typically appear with numerical information; for example, "reimbursement ratio" would appear as "reimbursement ratio is 50%". Therefore, a template for extracting numerical candidate words can be preset. Substituting the candidate words into the extraction template will yield the numerical extraction expression. The numerical extraction expression can take the form of "candidate word + identifier + numerical symbol". The identifier is constructed based on common textual expressions such as "for", "is", "increased (by)," and "decreased (by)". The numerical symbol in the template is used to match numerical information.

[0113] Candidate words for textual content typically appear alongside ordinary textual information. For example, in the phrase "household registration requires a migration certificate," the candidate words "household registration" and "migration certificate" appear together. A preset extraction template for textual candidate words can be used. Substituting the candidate words into the template yields a text extraction expression. The text extraction expression can take the form of "candidate word 1 + identifier + candidate word 2," where the identifier is constructed based on common textual expression habits such as "requires."

[0114] That's understandable; we can also construct two categories of extraction expressions for candidate words.

[0115] In this embodiment, different candidate word categories have different expression habits. Different forms of extraction expressions are constructed according to the candidate word categories in order to accurately match the text to be processed.

[0116] Furthermore, step S206 may include: generating a structured information table based on the matching results; annotating the text to be processed based on the matching results; and outputting the structured information table and the annotated text to be processed as structured text information.

[0117] Specifically, after obtaining the matching results, irrelevant items can be removed, and a structured information table can be generated based on the matching results after the removal operation. For example, for the matching result "'Employee outpatient reimbursement ratio' is '8%'", the word "is" can be removed, and a structured information table can be generated based on "Employee outpatient reimbursement ratio" and "8%" to clearly display the structured information.

[0118] Furthermore, the system can annotate the text to be processed based on the matching results, highlighting the matched text information within the text and extracting text information matched by different characters in the expression, which can be annotated using different colors; it can also be annotated based on structured information tables. For example, "employee outpatient reimbursement ratio" can be highlighted in red, and "8%" can be highlighted in blue.

[0119] The final structured text information can include a structured information table and annotated text to be processed. This structured text information can be sent to a terminal for display, allowing users to quickly access the structured text information within the text to be processed.

[0120] In this embodiment, a structured information table can be generated based on the matching results, or the text to be processed can be annotated based on the matching results to highlight the structured information, thereby improving the efficiency of users in obtaining structured information from text.

[0121] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0122] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0124] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0125] Further reference Figure 3 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a neural network-based text structured information extraction device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0126] like Figure 3 As shown, the neural network-based text structured information extraction device 300 described in this embodiment includes: a text acquisition module 301, a candidate word determination module 302, a text classification module 303, an expression construction module 304, a text matching module 305, and an information generation module 306, wherein:

[0127] The text acquisition module 301 is used to acquire the text to be processed.

[0128] The candidate word determination module 302 is used to determine candidate words in the text to be processed based on a preset word discovery algorithm.

[0129] The text classification module 303 is used to input the text to be processed containing candidate words into the classification model trained based on the standard words, and obtain the text classification result of the text to be processed based on the standard words.

[0130] The expression construction module 304 is used to construct an extraction expression based on candidate words when the text to be processed is determined to meet the text classification conditions according to the text classification results.

[0131] The text matching module 305 is used to match the text to be processed with the extracted expression to obtain the matching result.

[0132] The information generation module 306 is used to generate structured text information based on the matching results.

[0133] In this embodiment, after acquiring the text to be processed, a word discovery algorithm is used to identify candidate words in the text. Candidate words are words that are initially determined to be valuable in the text. The classification model is trained in advance using standard words, and then the text to be processed containing candidate words is input into the classification model to determine the correlation between the text containing candidate words and the standard words, thereby filtering the candidate words and obtaining the text classification result. When the text classification result shows that the text containing candidate words has a strong correlation with the standard words, a regular extraction expression is constructed based on the candidate words. The extraction expression is matched with the text to be processed, and valuable information can be extracted from the text based on the matching result, thereby realizing the automated extraction of structured information from the text.

[0134] In some optional implementations of this embodiment, the text acquisition module 301 may include: a file acquisition submodule, a format recognition submodule, a file determination submodule, and a format conversion submodule, wherein:

[0135] The file acquisition submodule is used to acquire files to be processed.

[0136] The format recognition submodule is used to identify the file format of the file to be processed.

[0137] The file determination submodule is used to determine the file to be processed as text when the file format belongs to the first format.

[0138] The format conversion submodule is used to convert the file to be processed according to the first format when the file format belongs to the second format, so as to obtain the text to be processed.

[0139] In this embodiment, the file format of the file to be processed is identified so that the file to be processed can be converted into a first format that can be processed, thus obtaining the text to be processed, laying the foundation for text processing.

[0140] In some optional implementations of this embodiment, the candidate word determination module 302 may include: a text segmentation module, an information entropy calculation submodule, a mutual information calculation submodule, and a score calculation submodule, wherein:

[0141] The text segmentation module is used to perform N-Gram segmentation on the text to be processed, resulting in multiple strings.

[0142] The information entropy calculation submodule is used to calculate the left and right neighbor entropies of each string, and then calculate the information entropy of the string based on the left and right neighbor entropies.

[0143] The mutual information calculation submodule is used to calculate the average mutual information of strings.

[0144] The score calculation submodule is used to perform linear operations on information entropy and average mutual information to obtain the score of the string.

[0145] The string determination submodule is used to determine a string as a candidate word when the score is greater than a preset score threshold.

[0146] In this embodiment, the information entropy and average mutual information of the strings obtained after N-Gram segmentation are calculated. The score of the string is calculated based on the information entropy and average mutual information. The score can measure the value of the string, so new words can be selected based on the score and used as candidate words.

[0147] In some optional implementations of this embodiment, the text classification module 303 may include: a segmentation submodule and a text classification submodule, wherein:

[0148] The segmentation module is used to perform N-Gram segmentation on the text to be processed containing candidate words, resulting in multiple N-Gram phrases.

[0149] The text classification submodule is used to input each N-Gram phrase into the input unit of the classification model according to the position of each N-Gram phrase in the text to be processed, so as to obtain the text classification result for the standard word. The classification model is a multi-label classification model that has been pre-trained based on the standard word.

[0150] In this embodiment, the text to be processed containing candidate words is split into multiple N-Gram phrases using N-Gram splitting. The N-Gram phrases are then input into the classification model according to their positions in the text to be processed, so that the model can learn contextual information and improve the accuracy of text classification.

[0151] In some optional implementations of this embodiment, the expression construction module 304 may further include: an attribution extraction submodule, a comparison submodule, a determination submodule, and an expression construction submodule, wherein:

[0152] The attribution extraction submodule is used to extract the attribution of a word to a standard word from the text classification results.

[0153] The comparison submodule is used to compare the degree of belonging with the preset degree of belonging threshold.

[0154] The determination submodule is used to determine whether the text to be processed meets the text classification conditions when the degree of belonging is greater than the degree of belonging threshold.

[0155] The expression building submodule is used to build extraction expressions based on candidate words.

[0156] In this embodiment, the attribution degree is used to characterize the association between the text to be processed and the standard words. Based on the attribution degree and the attribution degree threshold, the text to be processed that meets the text classification conditions can be quickly determined, thereby achieving further screening of candidate words.

[0157] In some optional implementations of this embodiment, the expression construction submodule may include: a category determination unit, a first construction unit, and a second construction unit, wherein:

[0158] The category determination unit is used to determine the candidate word category based on the text classification results. The candidate word categories include numerical categories and text categories.

[0159] The first building unit is used to construct a numerical extraction expression based on the candidate words when the candidate word category is numerical.

[0160] The second building unit is used to construct a text extraction expression based on the candidate words when the candidate word category is text.

[0161] In this embodiment, different candidate word categories have different expression habits. Different forms of extraction expressions are constructed according to the candidate word categories in order to accurately match the text to be processed.

[0162] In some optional implementations of this embodiment, the information generation module 306 may include: a table generation submodule, a text annotation submodule, and an information output submodule, wherein:

[0163] The table generation submodule is used to generate structured information tables based on the matching results.

[0164] The text annotation submodule is used to annotate the text to be processed based on the matching results.

[0165] The information output submodule is used to output structured information tables and annotated text to be processed as structured text information.

[0166] In this embodiment, a structured information table can be generated based on the matching results, or the text to be processed can be annotated based on the matching results to highlight the structured information, thereby improving the efficiency of users in obtaining structured information from text.

[0167] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0168] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0169] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0170] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for a neural network-based text structured information extraction method. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0171] In some embodiments, the processor 42 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the neural network-based text structured information extraction method.

[0172] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0173] The computer device provided in this embodiment can execute the above-described neural network-based text structured information extraction method. Here, the neural network-based text structured information extraction method can be any of the neural network-based text structured information extraction methods described in the various embodiments above.

[0174] In this embodiment, after acquiring the text to be processed, a word discovery algorithm is used to identify candidate words in the text. Candidate words are words that are initially determined to be valuable in the text. The classification model is trained in advance using standard words, and then the text to be processed containing candidate words is input into the classification model to determine the correlation between the text containing candidate words and the standard words, thereby filtering the candidate words and obtaining the text classification result. When the text classification result shows that the text containing candidate words has a strong correlation with the standard words, a regular extraction expression is constructed based on the candidate words. The extraction expression is matched with the text to be processed, and valuable information can be extracted from the text based on the matching result, thereby realizing the automated extraction of structured information from the text.

[0175] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the neural network-based text structured information extraction method described above.

[0176] In this embodiment, after acquiring the text to be processed, a word discovery algorithm is used to identify candidate words in the text. Candidate words are words that are initially determined to be valuable in the text. The classification model is trained in advance using standard words, and then the text to be processed containing candidate words is input into the classification model to determine the correlation between the text containing candidate words and the standard words, thereby filtering the candidate words and obtaining the text classification result. When the text classification result shows that the text containing candidate words has a strong correlation with the standard words, a regular extraction expression is constructed based on the candidate words. The extraction expression is matched with the text to be processed, and valuable information can be extracted from the text based on the matching result, thereby realizing the automated extraction of structured information from the text.

[0177] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0178] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A neural network-based text structured information extraction method, characterized by, The method comprises the following steps: obtaining a text to be processed; determining a candidate word in the text to be processed based on a preset word discovery algorithm, wherein the word discovery algorithm measures left and right sides of a text segment of the text to be processed in combination with different words or word groups to form a meaningful expression after combination, the text segment is internally combined fixedly, and the text segment does not exist in a word library or a dictionary; inputting the text to be processed with the candidate word into a classification model trained according to a standard word to obtain a text classification result of the text to be processed with respect to the standard word, wherein the classification model is a multi-label classification model trained according to the standard word in advance, used to determine whether the text to be processed with the candidate word is associated with the standard word, and output the association between the text to be processed with the candidate word and the standard word as the text classification result; when it is determined that the text to be processed meets a text classification condition according to the text classification result, constructing an extraction expression based on the candidate word; matching the text to be processed with the extraction expression to obtain a matching result; generating text structured information based on the matching result; the step of determining the candidate word in the text to be processed comprises: segmenting the text to be processed to obtain a plurality of strings; for each string, calculating left and right neighboring entropies of the string, and calculating an information entropy of the string according to the left and right neighboring entropies; calculating an average mutual information of the string; performing linear operation on the information entropy and the average mutual information to obtain a score of the string; when the score is greater than a preset score threshold, determining the string as the candidate word. 2.The neural network-based text structured information extraction method according to claim 1, characterized in that, the step of obtaining the text to be processed comprises: obtaining a file to be processed; identifying a file format of the file to be processed; when the file format belongs to a first format, determining the file to be processed as the text to be processed; when the file format belongs to a second format, performing format conversion on the file to be processed according to the first format to obtain the text to be processed. 3.The neural network-based text structured information extraction method of claim 1, wherein, the step of inputting the text to be processed with the candidate word into the classification model trained according to the standard word to obtain the text classification result of the text to be processed with respect to the standard word comprises: performing N-Gram segmentation on the text to be processed with the candidate word to obtain a plurality of N-Gram word groups; according to positions of the N-Gram word groups in the text to be processed, sequentially inputting the N-Gram word groups into input units of the classification model to obtain the text classification result with respect to the standard word, wherein the classification model is a multi-label classification model trained according to the standard word in advance. 4.The neural network-based text structured information extraction method of claim 1, wherein, the step of constructing the extraction expression based on the candidate word when it is determined that the text to be processed meets the text classification condition according to the text classification result comprises: extracting a belonging degree with respect to the standard word from the text classification result; comparing the belonging degree with a preset belonging degree threshold; when the belonging degree is greater than the belonging degree threshold, determining that the text to be processed meets the text classification condition; construct an extraction expression based on the candidate word. 5.The neural network-based text structured information extraction method according to claim 4, characterized in that, The step of constructing the extraction expression based on the candidate word comprises: determining a candidate word category of the candidate word according to the text categorization result, wherein the candidate word category comprises a numerical value category and a literal category; when the candidate word category is the numerical value category, constructing a numerical value extraction expression based on the candidate word; when the candidate word category is the literal category, constructing a literal extraction expression based on the candidate word. 6.The neural network-based text structured information extraction method of claim 1, wherein, The step of generating the text structured information based on the matching result comprises: generating a structured information table according to the matching result; annotating the to-be-processed text according to the matching result; outputting the structured information table and the annotated to-be-processed text as text structured information.

7. A neural network-based text structured information extraction apparatus, characterized by comprising: a neural network-based text structured information extraction unit configured to extract structured information from a text by using a neural network. comprises: a text acquisition module configured to acquire to-be-processed text; a candidate word determination module configured to determine a candidate word in the to-be-processed text based on a preset word discovery algorithm, wherein the word discovery algorithm measures whether a text segment of the to-be-processed text is a new word by measuring whether the left and right sides of the text segment are collocated with different words or word groups to form a meaningful expression after collocation, and the text segment is internally collocated fixedly and does not exist in a word library or a dictionary; the candidate word determination module is further configured to split the to-be-processed text to obtain a plurality of character strings; for each character string, left-neighbor entropy and right-neighbor entropy of the character string are calculated, and information entropy of the character string is calculated according to the left-neighbor entropy and the right-neighbor entropy; average mutual information of the character string is calculated; the information entropy and the average mutual information are linearly operated to obtain a score of the character string; when the score is greater than a preset score threshold, the character string is determined as the candidate word; a text categorization module configured to input the to-be-processed text with the candidate word into a categorization model trained according to a standard word to obtain a text categorization result of the to-be-processed text with respect to the standard word, wherein the categorization model is a multi-label categorization model trained according to the standard word in advance, used to determine whether the to-be-processed text with the candidate word is associated with the standard word, and output the association between the to-be-processed text with the candidate word and the standard word as the text categorization result; an expression construction module configured to construct an extraction expression based on the candidate word when the to-be-processed text meets a text categorization condition according to the text categorization result; a text matching module configured to match the to-be-processed text with the extraction expression to obtain a matching result; an information generation module configured to generate text structured information based on the matching result.

8. A computer device comprising a memory and a processor, the memory storing computer readable instructions, and the processor implementing the steps of the neural network-based text structured information extraction method according to any one of claims 1 to 6 when executing the computer readable instructions.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by the processor to implement the steps of the neural network-based text structured information extraction method in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Text data processing method and device, computer equipment and storage medium

    CN112632258A

  • Text processing method and device, equipment and storage medium

    CN113205384A