Text information extraction methods, apparatus, equipment and storage media

By combining a multi-functional attention mechanism and a neural network, the problem of recognizing similar-looking characters and synonyms in bank office documents has been solved, achieving high-accuracy extraction of text information.

CN116050385BActive Publication Date: 2026-04-21INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2022-12-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify and distinguish similar-looking characters and synonyms in bank office documents, leading to inaccurate text information extraction.

Method used

A multi-functional attention mechanism is adopted to extract features from text information through character-level, word-level, and paragraph-level attention mechanisms, including the generation of character-level and word-level feature vectors. It combines Bi-directional Convolutional Neural Networks (BiCNN), Bi-directional Gate Recurrent Unit (BiGRU), and Bi-directional Graph Convolutional Network (BiGCN) neural networks for feature extraction and weighting to generate a feature vector matrix. Finally, the information extraction is completed through the Softmax function.

Benefits of technology

It improves the accuracy of text information extraction and can effectively identify and distinguish structurally similar objects and semantically similar objects in text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116050385B_ABST
    Figure CN116050385B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, and storage medium for extracting text information, which can be applied to the fields of natural language processing and financial technology. The method includes: determining word information and corresponding word vectors in the text information; extracting character-level features from structurally similar objects in the word information to obtain character-level feature vectors; extracting word-level features from semantically similar objects in the word vectors to obtain word-level feature vectors; obtaining a feature vector matrix based on a multi-functional attention mechanism, using the character-level and word-level feature vectors; and obtaining the text information extraction result based on the feature vector matrix.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of natural language processing technology and financial technology, and in particular to a method, apparatus, device, medium and program product for extracting text information. Background Technology

[0002] Information extraction, as a subfield of natural language processing, aims to transform unstructured information such as text, images, and sound into structured information in a table-like format through structuring. This process yields new information points, which are then extracted from various documents and integrated in a unified form.

[0003] In related technologies, due to the complexity of event structures and the special nature of the content in bank office documents, there is a problem that it is difficult to accurately identify and distinguish similar-looking characters and synonyms when extracting text information. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a text information extraction and text recognition method, apparatus, device, medium and program product.

[0005] According to a first aspect of this disclosure, a method for extracting text information is provided, comprising:

[0006] Determine the word information in the text and the word vectors corresponding to the aforementioned word information;

[0007] Character-level feature extraction is performed on structurally similar objects in the above word information to obtain character-level feature vectors;

[0008] Word-level feature extraction is performed on semantically similar objects in the above word vectors to obtain word-level feature vectors;

[0009] Based on the multi-functional attention mechanism, a feature vector matrix is ​​obtained from the aforementioned character-level feature vectors and word-level feature vectors; and

[0010] Based on the above feature vector matrix, the text information extraction results are obtained.

[0011] According to embodiments of this disclosure, the feature vector matrix obtained based on the multi-functional attention mechanism, according to the character-level feature vector and the word-level feature vector, includes:

[0012] Based on the character-level attention mechanism, the first vector is obtained according to the above character-level feature vector and the above word vector;

[0013] Based on the word-level attention mechanism, the second vector is obtained from the word-level feature vector and the first vector; and

[0014] Based on the paragraph-level attention mechanism, the feature vector matrix is ​​obtained according to the second vector mentioned above.

[0015] According to embodiments of this disclosure, the first vector obtained based on the character-level attention mechanism, according to the character-level feature vector and the word vector, includes:

[0016] Based on the aforementioned character-level attention mechanism, and according to the aforementioned character-level feature vectors, the weights corresponding to the structurally similar objects are obtained; and

[0017] Based on the word vectors and the weights corresponding to the structurally similar objects mentioned above, the first vector is obtained.

[0018] According to embodiments of this disclosure, the second vector, derived from the word-level attention mechanism and the word-level feature vector and the first vector, includes:

[0019] Based on the aforementioned character-level attention mechanism, and according to the aforementioned word-level feature vectors, the weights corresponding to the aforementioned semantically similar objects are obtained; and

[0020] Based on the first vector and the weights corresponding to the semantically similar objects, the second vector is obtained.

[0021] According to embodiments of this disclosure, the feature matrix obtained based on the paragraph-level attention mechanism and the second vector includes:

[0022] By concatenating the vectors in the second vector above, we obtain the sentence-level feature vector matrix;

[0023] Based on the paragraph-level attention mechanism described above, and according to the sentence-level feature vector matrix, the third vector is obtained; and

[0024] The aforementioned dimensionality reduction operation and nonlinear activation operation are performed on the third vector to obtain the aforementioned eigenvector matrix.

[0025] According to embodiments of this disclosure, the third vector obtained based on the paragraph-level attention mechanism and the sentence-level feature vector matrix includes:

[0026] Based on the paragraph-level attention mechanism described above, and according to the sentence-level feature matrix, the weights corresponding to the sentences are obtained; and

[0027] Based on the sentence-level feature matrix and the weights corresponding to the sentences, the third vector is obtained.

[0028] According to embodiments of this disclosure, the structurally similar objects include characters with similar forms, the character-level feature vectors include the radical feature vectors and component feature vectors of the characters with similar forms, and the semantically similar objects include synonyms.

[0029] A second aspect of this disclosure provides a text information extraction apparatus, comprising: a determining module, a first extraction module, a second extraction module, and an obtaining module. The determining module is used to determine word information and corresponding word vectors in the text information. The first extraction module is used to extract character-level features from structurally similar objects in the word information to obtain character-level feature vectors. The second extraction module is used to extract word-level features from semantically similar objects in the word vectors to obtain word-level feature vectors. The obtaining module is used to obtain a feature vector matrix based on a multi-functional attention mechanism, according to the character-level feature vectors and the word-level feature vectors. The extraction module is used to obtain the text information extraction result based on the feature vector matrix.

[0030] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the methods described above.

[0031] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the methods described above.

[0032] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0033] According to the text information extraction method, apparatus, device, medium, and program products provided in this disclosure, character-level feature extraction can be performed on structurally similar objects in word information to obtain character-level feature vectors, and word-level feature extraction can be performed on semantically similar objects in word vectors to obtain word-level feature vectors. Based on a multi-functional attention mechanism, a feature vector matrix can be obtained from the character-level and word-level feature vectors. Finally, the text information extraction result can be obtained from the feature vector matrix. Because character-level feature extraction is performed on structurally similar objects in word information and word-level feature extraction is performed on semantically similar objects in word vectors, structurally similar objects and semantically similar objects can be identified and distinguished during the text information extraction process, thereby improving the accuracy of text information extraction. Attached Figure Description

[0034] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0035] Figure 1 The illustration shows an application scenario diagram of a text information extraction method, apparatus, device, medium, and program product according to embodiments of the present disclosure;

[0036] Figure 2 A flowchart illustrating a text information extraction method according to an embodiment of the present disclosure is shown schematically.

[0037] Figure 3 The illustration schematically depicts a diagram of constructing word vectors according to an embodiment of the present disclosure;

[0038] Figure 4 A flowchart illustrating the process of obtaining the eigenvector matrix according to an embodiment of the present disclosure is shown schematically.

[0039] Figure 5 A schematic diagram illustrating a multifunctional attention mechanism according to an embodiment of the present disclosure is shown.

[0040] Figure 6 The illustration shows a schematic diagram of a text information extraction method according to an embodiment of the present disclosure;

[0041] Figure 7 This schematically illustrates a structural block diagram of a text information extraction and text recognition device according to embodiments of the present disclosure; and

[0042] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a text information extraction and text recognition method according to an embodiment of the present disclosure. Detailed Implementation

[0043] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0044] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0045] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0046] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0047] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.

[0048] In the technical solution disclosed herein, the acquisition, collection, storage, use, processing, transmission, provision, disclosure, and application of data all comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.

[0049] In implementing this disclosure, it was found that bank office text extraction methods mainly fall into two categories: phased pipeline event extraction methods and joint event extraction methods. The phased pipeline method divides event extraction into three stages: trigger word identification, element detection, and post-processing. Specifically, in the process of extracting bank office text events, event trigger words are first identified; then, event element detection is performed based on the identified trigger words; finally, a certain post-processing procedure is used to construct a complete event from the identified event trigger words and elements. The joint extraction method combines the trigger word identification and element detection steps of the phased extraction method into one, performing both simultaneously. This method considers more the semantic relationship between trigger words and their elements throughout the entire sentence. However, in related technologies, considering the complexity of the event structure and the special nature of the content in bank office texts, it is difficult to accurately identify and distinguish similar-looking characters and synonyms in the text.

[0050] Therefore, embodiments of this disclosure provide a text information extraction method, including: determining word information and word vectors corresponding to the word information in the text information; performing character-level feature extraction on structurally similar objects in the word information to obtain character-level feature vectors; performing word-level feature extraction on semantically similar objects in the word vectors to obtain word-level feature vectors; obtaining a feature vector matrix based on the character-level feature vectors and word-level feature vectors using a multi-functional attention mechanism; and obtaining the text information extraction result based on the feature vector matrix.

[0051] Figure 1 The illustration shows an application scenario diagram of text information extraction according to an embodiment of the present disclosure.

[0052] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0053] Users can interact with server 105 via network 104 using at least one of the first terminal device 101, second terminal device 102, and third terminal device 103 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, second terminal device 102, and third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0054] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0055] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0056] For example, the server 105 can determine the word information and the word vectors corresponding to the word information in the text information, and perform character-level feature extraction on structurally similar objects in the word information to obtain character-level feature vectors. Then, it can perform word-level feature extraction on semantically similar objects in the word vectors to obtain word-level feature vectors. Based on the multi-functional attention mechanism, a feature vector matrix can be obtained according to the character-level feature vectors and word-level feature vectors. Finally, the text information extraction result can be obtained according to the feature vector matrix.

[0057] It should be noted that the text information extraction method provided in this embodiment can generally be executed by server 105. Correspondingly, the text information extraction device provided in this embodiment can generally be located in server 105. The text information extraction method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the text information extraction device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0058] 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.

[0059] The following will be based on Figure 1 The described scene, through Figures 2-6 The text information extraction method of the disclosed embodiments is described in detail.

[0060] Figure 2 A flowchart illustrating a text information extraction method according to an embodiment of the present disclosure is shown.

[0061] like Figure 2 As shown, the method 200 includes operations S210 to S250.

[0062] In operation S210, the word information in the text information and the word vectors corresponding to the word information are determined.

[0063] According to embodiments of this disclosure, the text content in Word (electronic document) and PDF (Portable Document Format) documents can be parsed using TextMind (an intelligent text analysis platform) to obtain word information from the text. For example, taking the sentence "I go to school" as an example, TextMind can distinguish the subject, predicate, and object, resulting in "I go to school," where the subject, predicate, and object are separated.

[0064] According to an embodiment of the present disclosure, word vectors corresponding to word information obtained by parsing through Text Mind can be generated according to Word2Vec (Word to Vector, a model for generating word vectors), which is a process of digitizing words. For example, according to Word2Vec, a corresponding word vector is generated for "I", "go", and "school" in "‘I’‘go’‘school’".

[0065] In operation S220, character-level feature extraction is performed on structurally similar objects in the word information to obtain character-level feature vectors.

[0066] According to an embodiment of the present disclosure, the word information obtained by parsing text information through Text Mind is input into a BiCNN (Bi-directional Convolutional Neural Networks) neural network. Feature extraction and analysis of radical components are performed on structurally similar objects in the word information to generate character-level feature vectors for distinguishing structurally similar objects. For example, the radical components of "延" and "廷" are respectively subjected to feature extraction and analysis to distinguish these two structurally similar objects, thereby determining the importance of these two characters.

[0067] In operation S230, word-level feature extraction is performed on semantically similar objects in the word vectors to obtain word-level feature vectors.

[0068] According to an embodiment of the present disclosure, the word vectors corresponding to the word information obtained by Word2Vec are input into a BiGRU (Bi-directional Gate Recurrent Unit) neural network. Analysis is performed on semantically similar objects existing in the word vectors corresponding to the word information to generate word-level feature vectors for distinguishing semantically similar objects.

[0069] In operation S240, based on a multi-functional attention mechanism, a feature vector matrix is obtained according to the character-level feature vectors and the word-level feature vectors.

[0070] According to an embodiment of the present disclosure, based on a character-level attention mechanism, weights corresponding to structurally similar objects are obtained according to the character-level feature vectors, and weighted word vectors are obtained according to the weights and the word vectors; based on a word-level attention mechanism, weights corresponding to semantically similar objects are obtained according to the word-level feature vectors, and the word vectors are weighted again according to the weights and the weighted word vectors.

[0071] According to embodiments of this disclosure, the obtained reweighted word vectors are input into a BiGCN (Bi-directional Graph Convolutional Network) neural network. The vectors in the reweighted word vectors are concatenated to generate a sentence-level feature vector matrix. For example, if the word information corresponding to the previous word vectors is "I go to school, I ride my bicycle to school", this word information is obtained by separating the words in the sentence. Inputting it into the BiGCN neural network will yield word information corresponding to the generated sentence-level feature vector matrix as "I go to school" and "I ride my bicycle to school".

[0072] According to embodiments of this disclosure, a sentence-level feature vector matrix is ​​input into a paragraph-level attention mechanism to obtain weights corresponding to sentences. Based on the weights and the sentence-level feature vector matrix, a weighted sentence-level feature vector matrix is ​​obtained. Dimensionality reduction and nonlinear activation operations are then performed to obtain a feature vector matrix, where the feature vector matrix can represent the feature vector matrix corresponding to the entire text.

[0073] In operation S250, the text information extraction result is obtained based on the feature vector matrix.

[0074] According to embodiments of this disclosure, the feature vector matrix is ​​input into the Softmax (normalized exponential function) function to complete the identification and classification of important information in the text information, and obtain the text information extraction result.

[0075] According to embodiments of this disclosure, by performing character-level feature extraction on structurally similar objects in word information and word-level feature extraction on semantically similar objects in word vectors, structurally similar objects and semantically similar objects can be identified and distinguished during the text information extraction process, thereby improving the accuracy of text information extraction.

[0076] Figure 3 A schematic diagram illustrating the construction of word vectors according to an embodiment of the present disclosure is shown.

[0077] like Figure 3 As shown, text information can be parsed using Txet Mind to obtain word information, and word vectors corresponding to the word information can be obtained by training with Word2Vec.

[0078] According to embodiments of this disclosure, assuming a given input statement consists of m words, the input statement can be represented as follows: The corresponding word vector can be represented as Among them, with words The corresponding word vectors are , and words The corresponding word vectors are , ..., with words The corresponding word vectors are .

[0079] Figure 4 A flowchart illustrating the process of obtaining the eigenvector matrix according to an embodiment of the present disclosure is shown.

[0080] like Figure 4 As shown, the method 400 includes operations S410 to S430.

[0081] When operating S410, based on the character-level attention mechanism, the first vector is obtained according to the character-level feature vector and word vector.

[0082] According to embodiments of this disclosure, character-level feature vectors are input into a character-level attention mechanism, enabling the generation of weights corresponding to structurally similar objects based on the character-level feature vectors. These weights are then assigned to the word vectors corresponding to structurally similar objects, resulting in a weighted word vector, i.e., a first vector. The first vector represents the word vector obtained by weighting the structurally similar objects present in the word information.

[0083] When operating the S420, based on the word-level attention mechanism, the second vector is obtained from the word-level feature vector and the first vector.

[0084] According to embodiments of this disclosure, word-level feature vectors are input into a word-level attention mechanism, enabling the generation of weights corresponding to semantically similar objects based on the word-level feature vectors. These weights are then assigned to the vectors in the first vector corresponding to semantically similar objects, resulting in a weighted first vector, or second vector. The second vector represents the word vector obtained after weighting the semantically similar objects present in the word vectors.

[0085] In operating S430, based on the paragraph-level attention mechanism, the feature vector matrix is ​​obtained according to the second vector.

[0086] According to embodiments of this disclosure, concatenating the vectors in the second vector yields a sentence-level feature vector matrix. Inputting the sentence-level feature vector matrix into a paragraph-level attention mechanism yields weights corresponding to sentences. Assigning these weights to the sentence-level feature vector matrix yields a weighted sentence-level feature vector matrix. Dimensionality reduction and nonlinear activation operations are then performed to obtain the feature vector matrix.

[0087] According to embodiments of this disclosure, based on a character-level attention mechanism, structurally similar objects can be distinguished by assigning different weights; based on a word-level attention mechanism, semantically similar objects can be distinguished by assigning different weights; and based on a paragraph-level attention mechanism, the feature vector matrix of the entire text can be obtained, thereby improving the accuracy of text information extraction.

[0088] According to embodiments of this disclosure, a first vector is obtained based on a character-level attention mechanism, using character-level feature vectors and word vectors, including: obtaining weights corresponding to structurally similar objects based on character-level feature vectors; and obtaining the first vector based on word vectors and the weights corresponding to structurally similar objects.

[0089] According to an embodiment of this disclosure, if a character-level feature vector is input into a character-level attention mechanism, the word state vector can be expressed as the following formula (1).

[0090] (1)

[0091] in, It can represent a word state vector. It can represent the first Character-level feature vectors of each word. It can represent an activation function.

[0092] The weights corresponding to structurally similar objects can be expressed as follows (2).

[0093] (2)

[0094] in, It can represent the parameter vector obtained through training. It can represent the first The weights corresponding to structurally similar objects.

[0095] The weighted vector can be expressed as the following formula (3).

[0096] (3)

[0097] in, It can represent the first The weighted vector representation of each word. It can represent the first Word vectors of 100 words.

[0098] According to embodiments of this disclosure, based on a character-level attention mechanism, it is possible to obtain weights for objects with similar structures, and based on these weights, a weighted first vector can be obtained.

[0099] According to embodiments of this disclosure, a second vector is obtained based on a word-level attention mechanism and a word-level feature vector and a first vector, including: obtaining the weights corresponding to semantically similar objects based on the word-level feature vector and the first vector and the weights corresponding to semantically similar objects based on the word-level attention mechanism; and obtaining the second vector based on the first vector and the weights corresponding to semantically similar objects.

[0100] According to an embodiment of this disclosure, if a word-level feature vector is input into a word-level attention mechanism, the hidden layer output vector can be expressed as the following formula (4).

[0101] (4)

[0102] in, It can represent the first The hidden layer output vector is represented by a weighted sum of each word. It can represent the first Word-level feature vectors of 1 word.

[0103] The weights corresponding to semantically similar objects can be expressed as the following formula (5).

[0104] (5)

[0105] in, It can represent the first The weights corresponding to semantically similar objects.

[0106] The weighted second vector can be expressed as the following formula (6).

[0107] (6)

[0108] in, It can represent the first vector in the first vector. The weighted vector of each word It can be represented as , where n can represent the number of words in the vector.

[0109] According to embodiments of this disclosure, based on a character-level attention mechanism, weights corresponding to semantically similar objects can be obtained, and a weighted second vector can be obtained based on the weights.

[0110] According to embodiments of this disclosure, based on a paragraph-level attention mechanism, a feature matrix is ​​obtained from a second vector, including: concatenating the vectors in the second vector to obtain a sentence-level feature vector matrix; obtaining a third vector based on the sentence-level feature vector matrix using the paragraph-level attention mechanism; and performing dimensionality reduction and nonlinear activation operations on the third vector to obtain the feature vector matrix.

[0111] According to embodiments of this disclosure, the vectors in the second vector are concatenated using a BiGNN neural network, and dimensionality reduction and nonlinear activation operations are performed to obtain a sentence-level feature vector matrix.

[0112] The dimensionality reduction operation can be expressed as the following formula (7).

[0113] (7)

[0114] in, It can indicate the length of the target sentence. , It can represent the dimension of word vectors. It can represent positive integers. It can represent the second vector. The vector corresponding to each word It can represent a vector matrix after dimensionality reduction.

[0115] The nonlinear activation operation can be expressed as the following formula (8).

[0116] (8)

[0117] in, It can represent the sentence-level feature vector matrix of the p-th sentence.

[0118] If the sentence-level feature vector matrix is ​​input into the paragraph-level attention mechanism, the hidden layer output vector can be expressed as the following formula (9).

[0119] (9)

[0120] in, It can represent the hidden layer output vector after weighting the second vector.

[0121] The weight corresponding to the sentence can be expressed as the following formula (10).

[0122] (10)

[0123] in, It can represent the weight corresponding to the p-th sentence.

[0124] The weighted sentence-level feature vector matrix can be expressed as the following formula (11).

[0125] (11)

[0126] in, This can represent the weighted sentence-level feature vector matrix, i.e., the third vector. It can represent C can represent the number of sentences in the text. .

[0127] The dimensionality reduction operation of the weighted sentence-level feature vector matrix can be expressed as the following formula (12).

[0128] (12)

[0129] Where C can represent the number of sentences in the text. It can indicate the number of paragraphs. , It can represent the maximum number of text paragraphs. It can represent the weighted sentence-level feature vector matrix after dimensionality reduction.

[0130] The nonlinear activation operation can be expressed as the following formula (13).

[0131] (13)

[0132] Here, D can represent the feature vector matrix of the text.

[0133] According to embodiments of this disclosure, the BiGNN neural network can concatenate the vectors in the second vector to obtain a sentence-level feature vector matrix. The sentence-level feature vector matrix is ​​then input into a paragraph-level attention mechanism to obtain weights corresponding to the sentences. Based on the weights, a weighted third vector is obtained, and dimensionality reduction and nonlinear activation operations are performed to obtain the feature vector matrix of the text.

[0134] According to embodiments of this disclosure, a third vector is obtained based on a paragraph-level attention mechanism and a sentence-level feature vector matrix, including: obtaining the weights corresponding to sentences based on the sentence-level feature matrix and the sentence-level feature matrix; and obtaining the third vector based on the sentence-level feature matrix and the weights corresponding to sentences.

[0135] According to embodiments of this disclosure, by inputting the sentence-level feature vector matrix into the paragraph-level attention mechanism, weights corresponding to sentences can be obtained, and a weighted sentence-level feature vector matrix can be obtained based on the weights.

[0136] Figure 5 A schematic diagram of a multifunctional attention mechanism according to an embodiment of the present disclosure is shown.

[0137] like Figure 5As shown, multi-functional attention mechanisms can include character-level attention mechanisms, word-level attention mechanisms, and paragraph-level attention mechanisms. These mechanisms work together to enable text word vectors to have high recognizability, improving the accuracy and efficiency of text information extraction.

[0138] According to embodiments of this disclosure, structurally similar objects may include characters with similar forms, character-level feature vectors may include radical feature vectors and component feature vectors of characters with similar forms, and semantically similar objects may include synonyms.

[0139] According to embodiments of this disclosure, structurally similar objects may include similar-looking characters, and semantically similar objects may include synonyms, enabling the differentiation of similar-looking characters and synonyms in text.

[0140] Figure 6 The illustration shows a schematic diagram of a text information extraction method according to an embodiment of the present disclosure.

[0141] like Figure 6 As shown, Text Mind can be used to obtain word information from office text, and Word2Vec can be used to obtain word vectors corresponding to the word information. Inputting the word information into a BiCNN neural network yields character-level feature vectors; inputting the corresponding word vectors into a BiGRU neural network yields word-level feature vectors. Inputting the character-level feature vectors into a character-level attention mechanism allows for the determination of weights corresponding to similar-looking characters, resulting in a weighted first vector. Similarly, inputting the word-level feature vectors into a word-level attention mechanism allows for the determination of weights corresponding to synonyms, resulting in a weighted second vector.

[0142] According to embodiments of this disclosure, inputting the second vector into a BiGCN neural network yields a sentence-level feature vector matrix. This sentence-level feature vector matrix is ​​then input into a paragraph-level attention mechanism to obtain weights corresponding to each sentence. Based on these weights, a weighted sentence-level feature vector matrix is ​​obtained. The weighted sentence-level feature vector matrix undergoes dimensionality reduction and non-linear activation operations to obtain the feature vector matrix of the entire text. This matrix is ​​then input into a fully connected layer using a Softmax function to identify and classify important information within the text, resulting in the text information extraction result.

[0143] According to embodiments of this disclosure, parameters can be shared among the BiCNN neural network, the BiGRU neural network, and the BiGCN neural network.

[0144] Based on the above-described text information extraction method, this disclosure also provides a text information extraction device. The following will combine... Figure 7 The device is described in detail.

[0145] Figure 7 A schematic block diagram of a text information extraction apparatus according to an embodiment of the present disclosure is shown.

[0146] like Figure 7 As shown, the text information extraction device 700 of this embodiment includes a determining module 710, a first extraction module 720, a second extraction module 730, an obtaining module 740, and an extraction module 750.

[0147] The determining module 710 is used to determine word information in the text information and word vectors corresponding to the word information. In one embodiment, the determining module 710 can be used to perform the operation S210 described above, which will not be repeated here.

[0148] The first extraction module 720 is used to extract character-level features from structurally similar objects in the word information to obtain character-level feature vectors. In one embodiment, the first extraction module 720 can be used to perform the operation S220 described above, which will not be repeated here.

[0149] The second extraction module 730 is used to extract word-level features from semantically similar objects in the word vectors to obtain word-level feature vectors. In one embodiment, the second extraction module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0150] The acquisition module 740 is used to obtain a feature vector matrix based on the character-level feature vector and the word-level feature vector, using a multi-functional attention mechanism. In one embodiment, the acquisition module 740 can be used to perform the operation S240 described above, which will not be repeated here.

[0151] The extraction module 750 is used to obtain the text information extraction result based on the feature vector matrix. In one embodiment, the extraction module 750 can be used to perform the operation S250 described above, which will not be repeated here.

[0152] According to embodiments of this disclosure, the obtaining module 740 includes a first obtaining submodule, a second obtaining submodule, and a third obtaining submodule.

[0153] The first acquisition submodule is used to obtain the first vector based on the character-level attention mechanism, according to the character-level feature vector and word vector.

[0154] The second submodule is used to obtain the second vector based on the word-level attention mechanism, using the word-level feature vector and the first vector.

[0155] The third submodule is used to obtain the feature vector matrix based on the second vector using a paragraph-level attention mechanism.

[0156] According to embodiments of this disclosure, the first obtaining submodule includes a first obtaining unit and a second obtaining unit.

[0157] The first acquisition unit is used to obtain the weights corresponding to structurally similar objects based on the character-level attention mechanism and the character-level feature vector.

[0158] The second obtaining unit is used to obtain the first vector based on the word vector and the weights corresponding to structurally similar objects.

[0159] According to embodiments of this disclosure, the second obtaining submodule includes a third obtaining unit and a fourth obtaining unit.

[0160] The third acquisition unit is used to obtain the weights corresponding to semantically similar objects based on word-level feature vectors using a word-level attention mechanism.

[0161] The fourth obtaining unit is used to obtain the second vector based on the weights corresponding to the first vector and semantically similar objects.

[0162] According to embodiments of this disclosure, the third obtaining submodule includes a fifth obtaining unit, a sixth obtaining unit, and a seventh obtaining unit.

[0163] The fifth unit is used to concatenate the vectors in the second vector to obtain the sentence-level feature vector matrix.

[0164] The sixth acquisition unit is used to obtain the third vector based on the sentence-level feature vector matrix using a paragraph-level attention mechanism.

[0165] The seventh unit is used to perform dimensionality reduction and nonlinear activation operations on the third vector to obtain the eigenvector matrix.

[0166] According to embodiments of this disclosure, the sixth obtaining unit includes a first obtaining subunit and a second obtaining subunit.

[0167] The first sub-unit is used to obtain the weights of sentences based on the sentence-level feature matrix using a paragraph-level attention mechanism.

[0168] The second sub-unit is used to obtain the third vector based on the sentence-level feature matrix and the weights corresponding to the sentences.

[0169] According to embodiments of this disclosure, any plurality of modules among the determining module 710, the first extraction module 720, the second extraction module 730, the obtaining module 740, and the extraction module 750 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the determining module 710, the first extraction module 720, the second extraction module 730, the obtaining module 740, and the extraction module 750 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the determining module 710, the first extraction module 720, the second extraction module 730, the obtaining module 740, and the extraction module 750 may be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0170] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a text information extraction and text recognition method according to an embodiment of the present disclosure.

[0171] like Figure 8 As shown, an electronic device 800 according to an embodiment of this disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.

[0172] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0173] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.

[0174] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0175] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.

[0176] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the item recommendation method provided in the embodiments of this disclosure.

[0177] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0178] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0179] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by processor 901, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0180] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0181] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0182] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0183] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for extracting text information, comprising: Determine the word information in the text information and the word vectors corresponding to the word information; Character-level feature extraction is performed on structurally similar objects in the word information to obtain character-level feature vectors; Word-level feature extraction is performed on semantically similar objects in the word vectors to obtain word-level feature vectors; Based on the character-level attention mechanism, the weights corresponding to the structurally similar objects are obtained according to the character-level feature vectors; The first vector is obtained based on the weights corresponding to the word vectors and the structurally similar objects; Based on the word-level attention mechanism, the weights corresponding to the semantically similar objects are obtained according to the word-level feature vectors; The second vector is obtained based on the weights corresponding to the first vector and the semantically similar objects; Concatenate the vectors in the second vector to obtain the sentence-level feature vector matrix; Based on the paragraph-level attention mechanism, the weights corresponding to sentences are obtained according to the sentence-level feature vector matrix; The third vector is obtained based on the sentence-level feature vector matrix and the weights corresponding to the sentences; The third vector is subjected to dimensionality reduction and nonlinear activation operations to obtain the eigenvector matrix; as well as Based on the feature vector matrix, the text information extraction result is obtained.

2. The method according to claim 1, wherein, The structurally similar objects include characters with similar shapes, the character-level feature vectors include the radical feature vectors and component feature vectors of the characters with similar shapes, and the semantically similar objects include synonyms.

3. A text information extraction device, comprising: The determination module is used to determine word information in text information and word vectors corresponding to the word information; The first extraction module is used to extract character-level features from structurally similar objects in the word information to obtain character-level feature vectors. The second extraction module is used to extract word-level features from semantically similar objects in the word vectors to obtain word-level feature vectors. The acquisition module is used to obtain a feature vector matrix based on the character-level feature vector and the word-level feature vector, using a multi-functional attention mechanism. as well as The extraction module is used to obtain the text information extraction result based on the feature vector matrix; The acquisition module includes: The first obtaining unit is used to obtain the weights corresponding to the structurally similar objects based on the character-level feature vector, using a character-level attention mechanism. The second obtaining unit is used to obtain the first vector based on the weights corresponding to the word vectors and the structurally similar objects; The third acquisition unit is used to obtain the weights corresponding to the semantically similar objects based on the word-level feature vectors using a character-level attention mechanism. The fourth obtaining unit is used to obtain the second vector based on the weights corresponding to the first vector and the semantically similar objects; The fifth obtaining unit is used to concatenate the vectors in the second vector to obtain a sentence-level feature vector matrix; The first subunit is used to obtain the weights of sentences based on the sentence-level feature vector matrix using a paragraph-level attention mechanism. The second obtaining subunit is used to obtain the third vector based on the sentence-level feature vector matrix and the weights corresponding to the sentences; The seventh obtaining unit is used to perform dimensionality reduction and nonlinear activation operations on the third vector to obtain the feature vector matrix.

4. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 2.

5. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 2.

6. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Intelligent question-answering method, device and equipment based on attention mechanism and storage medium

    CN111428012A

  • Image description generation method based on text hierarchical structure

    CN113569932A