Unstructured standard text entity recognition method and device, equipment and storage medium
By preprocessing and feature extraction of unstructured standard text, combined with the pre-trained named entity recognition model, the problem of low accuracy of entity recognition in standard documents is solved, and more complete and accurate information extraction is achieved.
Patent Information
- Application Number
- CN202411400566.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art is not accurate when identifying entities in standard documents, resulting in incomplete information extraction and serious information loss.
By converting format, sharp processing, pixel screening, and text information extraction of non -structured standard text, build a standard text library, and convert it into a serialized data set in BIO format, enter the pre -training naming physical recognition model for identification to identify Essence
It improves the accuracy of text feature extraction, reduces information loss, and enhances the richness and depth of standard file information mining.
Smart Images

Figure CN119358557A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and in particular to a method, apparatus, device and storage medium for identifying unstructured standard text entities. Background Art
[0002] With the rapid development of industry and information technology, the corresponding standard documents are also increasing year by year. Among the available standard documents, they are generally stored in an uneditable and unstructured form, which makes it difficult to conveniently implement in situations where standard text processing is required. There are usually a large number of watermarks and other marks in the text and drawings of standard documents that may be misidentified; how to extract effective information from these standards has become a major problem. The characters in the original standard files cannot be directly copied and edited, and the characters need to be recognized.
[0003] In the related art, in order to recognize entities in standard documents, it is necessary to base on optical character recognition (OCR) and named entity recognition (NER); characters are recognized from the image corresponding to the standard document through OCR and saved as computer text data; then specific types of entities are determined from the computer text data through NER; for example, names of people, places, organizations, time, etc.
[0004] However, in the current standardization work, with the release and implementation of more and more standards, the entity information in the standard documents is gradually increasing. The text extracted from the standard documents by OCR has the attributes of the standard documents such as special nouns, which leads to low accuracy when directly performing NER tasks using ordinary methods. The current NER methods mainly target natural languages in daily life and rarely involve special terms in standard documents. This leads to the use of general NER methods to process standard texts in the process of standard digitization, which will lead to incomplete information extraction and serious information loss. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present application provides a method, apparatus, device and storage medium for unstructured standard text entity recognition, which solves the problems of incomplete information extraction and serious information loss in current standard text entity recognition.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for identifying entities in unstructured standard text, the method comprising:
[0008] Acquire a first standard file to be identified and processed, where the first standard file is in an unstructured form;
[0009] Performing format conversion, sharpening processing, pixel screening, and text information extraction on the first standard file to obtain first text information;
[0010] Screening and denoising the first text information to obtain a standard text corpus, and converting the standard text corpus into a first serialized data set in a BIO format;
[0011] Inputting the first serialized data set into the encoding layer of a preset named entity recognition model to determine an enhanced feature mapping matrix corresponding to all character information in the first standard file; wherein the named entity recognition model is trained based on a large amount of unstructured second standard text;
[0012] The enhanced feature mapping matrix is input into a decoding layer of a named entity recognition model, and an index relationship between a text entity in a first standard file and a plurality of labels in the named entity recognition model is determined to perform text entity recognition.
[0013] According to a first aspect of an embodiment of the present application, before the serialized data set is input into the encoding layer of the preset named entity recognition model to determine the enhanced feature mapping matrix corresponding to all character information in the first standard file, the unstructured standard text entity recognition method further includes:
[0014] Acquire a second standard document in an unstructured form, and obtain a named entity recognition model based on the second standard document;
[0015] Processing the second standard file in a programmatic manner to obtain a second serialized data set, wherein the processing method of the second standard file is consistent with the processing method of the first standard file;
[0016] Dividing the second serialized data set into a training set, a validation set, and a test set according to a preset ratio, so as to perform K times of training, validation, and testing on the preset initial model, and obtain a mature named entity recognition model;
[0017] Among them, the relative change rate of the loss value obtained by the i-th iterative training is determined based on the cost function, the learning rate of the i+1-th iterative training is adjusted based on the progress of the i-th iterative training, K is a positive integer, and i is a positive integer less than K.
[0018] According to a first aspect of an embodiment of the present application, the first standard file is in PDF format; the aforementioned format conversion, sharpening processing, pixel screening and text information extraction of the first standard file to obtain the first text information may include the following steps:
[0019] Using the PIL library in Python, the first standard file stored in PDF format is converted into an image format, and sharpened to obtain a first image with clear and discernible text edges, and the color mode of the first image is RGB mode;
[0020] Filter pixels with large differences in red, green, and blue color channel values in the first image to delete interference information of the first image and retain the original text, thereby obtaining a second image;
[0021] The text in the second image is extracted and stored by Tesseract-OCR to obtain the first text information.
[0022] According to the first aspect of the embodiment of the present application, the first serialized data set includes a B tag, an I tag and an O tag, the B tag represents the starting position of the entity, the I tag represents the position inside the entity, and the O tag represents the position that does not belong to the entity.
[0023] According to the first aspect of the embodiment of the present application, the aforementioned screening and denoising of the first text information to obtain a standard text corpus, and converting the standard text corpus into a first serialized data set in BIO format may include the following steps:
[0024] Based on the pre-trained Chinese language model, the first text information is screened, and the semantically inconsistent parts thereof are corrected to select a preliminarily qualified first target text;
[0025] Based on a string matching tool, the first target text is matched and screened with a preset target language symbol library to obtain a second target text; wherein the target language symbol library includes a plurality of language symbols that do not conform to language habits and are meaningless;
[0026] Convert the sentence texts in the second target text into the first serialized dataset in BIO format.
[0027] According to the first aspect of the embodiment of the present application, the encoding layer of the named entity recognition model includes a feature encoder, which is a transformer model represented by a bidirectional encoder; the decoding layer of the named entity recognition model includes: a bidirectional long short-term memory network layer, a fully connected layer and a conditional random field layer.
[0028] According to the first aspect of the embodiment of the present application, the aforementioned inputting the first serialized data set into the encoding layer of the preset named entity recognition model to determine the enhanced feature mapping matrix corresponding to all character information in the first standard file may include the following steps:
[0029] After the first serialized data set is input into the encoding layer, the sentence text in the first serialized data set is inserted into the aggregation symbol and the separator, the sentence text is converted into a word embedding vector of a fixed dimension, and an embedding matrix is formed;
[0030] Performing a linear transformation on the embedding matrix and the preset transformation matrix to obtain three entity mapping vectors, and dividing the three entity mapping vectors into a first sub-vector, a second sub-vector and a third sub-vector respectively;
[0031] Calculate the correlation between each element in the first sub-vector and each element in the second sub-vector to obtain a correlation matrix;
[0032] Based on the association matrix, the softmax function is used for normalization to generate a weight matrix, and the weight matrix is weightedly fused, information integrated, and dimension matched with the third sub-vector of each word to obtain the initial feature mapping matrix;
[0033] The initial feature mapping matrix is processed through a preset feedforward network and layer normalization function to obtain an enhanced feature mapping matrix.
[0034] According to the first aspect of the embodiment of the present application, the aforementioned step of inputting the enhanced feature mapping matrix into the decoding layer of the named entity recognition model, determining the index relationship between the text entity in the first standard file and the multiple labels in the named entity recognition model, so as to recognize the text entity, may include the following steps:
[0035] The bidirectional dependencies of each output vector of the standard text sequence in the enhanced feature map matrix are captured through a bidirectional long short-term memory network layer to generate contextual representation information for each output vector;
[0036] The context representation information is concatenated to obtain the standard text entity feature matrix output by the bidirectional long short-term memory network layer and passed to the fully connected layer;
[0037] The high-dimensional features in the standard text entity feature matrix are converted into the probability distribution of the standard text entity category, and each tag is classified through linear transformation and activation function to obtain the score of each tag belonging to different categories and obtain the score matrix;
[0038] The score matrix is passed to the conditional random field layer, and global optimization is performed through the dynamic programming algorithm to determine the optimal tag sequence to characterize the index relationship between the text entities in the first standard file and multiple labels in the named entity recognition model, and to recognize the text entities.
[0039] In a second aspect, an embodiment of the present application provides an unstructured standard text entity recognition device, the device comprising an acquisition module, a first processing module, a second processing module, an encoding determination module and a decoding recognition module; wherein,
[0040] An acquisition module, used for acquiring a first standard file to be identified and processed, where the first standard file is in an unstructured form;
[0041] A first processing module, used for performing format conversion, sharpening processing, pixel screening and text information extraction on the first standard file to obtain first text information;
[0042] A second processing module is used to screen and denoise the first text information to obtain a standard text corpus, and convert the standard text corpus into a first serialized data set in BIO format;
[0043] An encoding determination module is used to input the first serialized data set into an encoding layer of a preset named entity recognition model to determine an enhanced feature mapping matrix corresponding to all character information in the first standard file; wherein the named entity recognition model is trained based on a large amount of unstructured second standard text;
[0044] The decoding and recognition module is used to input the enhanced feature mapping matrix into the decoding layer of the named entity recognition model, determine the index relationship between the text entity in the first standard file and the multiple tags in the named entity recognition model, so as to recognize the text entity.
[0045] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the unstructured standard text entity recognition method described in the first aspect is implemented.
[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the unstructured standard text entity recognition method in the aforementioned first aspect is implemented.
[0047] This application provides a method, device, equipment and storage medium for unstructured standard text entity recognition. Compared with the prior art, it has the following beneficial effects:
[0048] Before extracting text information from a first standard file to be identified that is stored in an unstructured form, the present application first performs format conversion, sharpening, and pixel screening to reduce interference, and screens and denoises the first text information to further construct a standard text prediction library to improve the accuracy of text feature extraction; to improve information processing efficiency, the standard text corpus is converted into a first serialized data set in BIO format, and the first serialized data set is input into a pre-trained named entity recognition model, the named entity recognition model is trained based on a large amount of unstructured second standard text, and has comprehensive special terminology tags related to standard files. Based on the named entity recognition model, the tags to which text entities in the first standard file belong can be determined to achieve text entity recognition; the present application performs named entity recognition of standard texts on unstructured first standard files, broadens the application scenarios of entity recognition, and performs digital information mining on the first standard text through the named entity recognition model to obtain entity information of different categories, thereby reducing information loss and improving the richness and depth of standard file information mining. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 It is a flowchart of an unstructured standard text entity recognition method provided in an embodiment of the present application;
[0051] Figure 2 is an exemplary structural diagram of a named entity recognition model provided in an embodiment of the present application;
[0052] Figure 3 yes Figure 1 An exemplary flow chart of S140;
[0053] Figure 4 yes Figure 1 An exemplary flow chart of S150;
[0054] Figure 5 It is a structural schematic diagram of an unstructured standard text entity recognition device provided in an embodiment of the present application;
[0055] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0058] The embodiments of the present application provide a method, apparatus, device and storage medium for identifying unstructured standard text entities.
[0059] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:
[0060] With the rapid development of industry and information technology, the corresponding standard documents are also increasing year by year. Among the available standard documents, they are generally stored in an uneditable and unstructured form, which makes it difficult to conveniently implement in situations where standard text processing is required. There are usually a large number of watermarks and other marks in the text and drawings of standard documents that may be misidentified; how to extract effective information from these standards has become a major problem. The characters in the original standard files cannot be directly copied and edited, and the characters need to be recognized.
[0061] In the related art, in order to identify entities in standard documents, it is necessary to rely on optical character recognition (OCR) and named entity recognition (NER); identify characters from the image corresponding to the standard document through OCR and save it as computer text data; then determine specific types of entities from the computer text data through NER; such as names of people, places, institutions, time, etc. In the available standard files, they are generally stored in an uneditable unstructured form, which makes it difficult to implement conveniently in situations where standard text processing is required; in addition, there are a large number of watermarks and other marks that may be misidentified in the text and drawings of the standard documents. Direct use of optical character recognition will cause the recognized text to be mixed with noise or lose important information. The characters in the original standard file cannot be directly copied and edited, and the characters in it need to be recognized.
[0062] Optical character recognition is a research branch of computer vision. Its goal is to recognize characters from images and save them as computer text data. It is widely used in bill recognition, industrial automation and other fields. The optical character recognition method usually detects the character position from the image first, then performs character recognition on each character position to determine the characters contained in the image.
[0063] The main function of named entity recognition is to automatically identify specific types of entities from text, such as names of people, places, institutions, time, etc. This is very important for many applications in natural language processing (NLP) because it can extract content with specific meanings and provide basic data support for subsequent processing steps. The text extracted from standard documents through OCR has properties such as the special nouns of standard documents, so the accuracy of NER tasks directly performed using ordinary methods will be low. The NER model needs to be able to capture these special properties in order to more accurately identify entities.
[0064] In the current standardization work, as more and more standards are released and implemented, the entity information in standard documents is gradually increasing. The current named entity recognition methods mainly target natural languages in daily life and rarely involve special terms in standard documents. This leads to the problem of incomplete information extraction and serious information loss when using general NER methods to process Chinese standard texts in the process of standard digitization.
[0065] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0066] The following first introduces an unstructured standard text entity recognition method provided by an embodiment of the present application.
[0067] The present application provides a flowchart of a method for identifying unstructured standard text entities, as shown in FIG. Figure 1 As shown, the unstructured standard text entity recognition method may include the following steps S110-S150.
[0068] S110: Acquire a first standard file to be identified and processed, where the first standard file is in an unstructured form.
[0069] S120: Perform format conversion, sharpening processing, pixel screening, and text information extraction on the first standard file to obtain first text information.
[0070] S130: Screen and denoise the first text information to obtain a standard text corpus, and convert the standard text corpus into a first serialized data set in BIO format.
[0071] S140, inputting the first serialized data set into the encoding layer of a preset named entity recognition model to determine an enhanced feature mapping matrix corresponding to all character information in the first standard file; wherein the named entity recognition model is trained based on a large amount of unstructured second standard text.
[0072] S150, inputting the enhanced feature mapping matrix into a decoding layer of a named entity recognition model, determining an index relationship between a text entity in a first standard file and a plurality of labels in the named entity recognition model, so as to recognize the text entity.
[0073] The above is a specific implementation method of an unstructured standard text entity recognition method provided in an embodiment of the present application. Before extracting text information from the first standard file to be identified stored in an unstructured form, the present application first performs format conversion, sharpening and pixel screening to reduce interference, and screens and denoises the first text information to further construct a standard text expectation library to improve the accuracy of text feature extraction; in order to improve information processing efficiency, the standard text corpus is converted into a first serialized data set in BIO format, and the first serialized data set is input into the pre-trained named entity recognition model.
[0074] It should be noted that the named entity recognition model is trained based on a large amount of unstructured second standard text, and has comprehensive special terminology tags related to standard documents. Based on the named entity recognition model, the tags to which text entities in the first standard document belong can be determined to realize the recognition of text entities. The present application performs named entity recognition of standard texts in unstructured first standard documents, broadens the application scenarios of entity recognition, and performs digital information mining of the first standard text through the named entity recognition model, which can obtain entity information of different categories, reduce information loss, and improve the richness and depth of standard document information mining.
[0075] In one example, the first serialized data set includes a number of sentence texts S={s 1 ,…,s i}, where s 1 Represents the first character in the sentence text S, s i Represents the i-th character in the sentence text S.
[0076] In some embodiments, the first standard file is in PDF format; the first standard file is format converted, sharpened, pixel filtered, and text information extracted to obtain the first text information, that is, the aforementioned S120 may specifically include the following steps:
[0077] S210, using the PIL library in Python, converting the first standard file stored in the PDF format into an image format, and performing a sharpening process to obtain a first image with clear and discernible text edges, wherein the color mode of the first image is RGB mode.
[0078] S220 , filtering pixels with relatively large differences in red, green, and blue color channel values in the first image to delete interference information of the first image and retain the original text, thereby obtaining a second image.
[0079] S230 , extracting and storing text in the second image through Tesseract-OCR to obtain first text information.
[0080] In the embodiment of the present application, it is understandable that converting the first standard file into a picture format facilitates subsequent processing; the first standard files obtained through general means are mostly PDF files. Unlike the PDF files that are easier to edit after conversion from text documents, the first standard files obtained are generally non-editable scanned files, so they need to be converted into picture formats for processing. In addition, some pages in the first standard files to be processed contain watermarks, but in the converted pictures, they are on the same layer as the text part and cannot be simply removed. Therefore, the present application adopts the method of filtering out pixels that do not meet the requirements and retaining the required original text for subsequent extraction operations.
[0081] It should be noted that Optical Character Recognition (OCR) is a technology that converts printed or handwritten text into machine-readable data and is widely used in various information extraction scenarios. Tesseract-OCR is an open source optical character recognition engine that supports multilingual text recognition. Through the recognition of this engine, standard text can be extracted into easy-to-operate data text for subsequent data set production and other steps.
[0082] In some embodiments, the first serialized data set includes a B label, an I label, and an O label, wherein the B label represents the starting position of the entity, the I label represents the position inside the entity, and the O label represents the position that does not belong to the entity. The above-mentioned screening and denoising of the first text information to obtain a standard text corpus, and converting the standard text corpus into a first serialized data set in BIO format, that is, the above-mentioned S130 may specifically include the following steps:
[0083] S310, based on the pre-trained Chinese language model, the first text information is screened, the parts that do not conform to the semantics are corrected, and the first target text that is initially qualified is screened. For the text extracted by Tesseract-OCR, due to recognition problems such as scanning clarity, there will be some noise symbols that hinder reading and other sentences that do not conform to Chinese semantics. The correction of the pre-trained Chinese language model can correct the semantic deviation of the extracted text to a certain extent.
[0084] In one example, the pre-trained Chinese language model is a Chinese model based on BERT, where BERT stands for Bidirectional Encoder Representation from Transformers. It is a pre-trained language representation model that emphasizes that it no longer uses the traditional unidirectional language model or the shallow concatenation of two unidirectional language models for pre-training as in the past, but instead uses a new masked language model to generate deep bidirectional language representation.
[0085] The screening and correction process of the pre-trained Chinese language model is as follows: Given a sentence S = {s 1 ,…,s n}, which contains some noise words. For each position i in sentence S, the pre-trained Chinese language model predicts the most likely word The prediction process can be expressed as:
[0086]
[0087] Among them, h i is the context representation of the i-th word, P(s|h i ) is based on the context representation hi The probability of word s. The model is The results identify and correct spelling errors. By generating context-sensitive word embeddings, incorrect words can be accurately detected and appropriate correction suggestions can be made.
[0088] S320, based on the string matching tool, matching and screening the first target text with the preset target language symbol library to obtain the second target text; wherein the target language symbol library includes multiple language symbols that are not in line with language habits and meaningless. It is understandable that in the first target text after the above preliminary processing, the misrecognition caused by other elements such as picture lines will cause some symbols to be mixed in the text, and the pre-trained Chinese language model cannot accurately identify non-semantic text noise, so it needs to be processed again.
[0089] In one example, the string matching tool is a regular expression. Considering the advantages of regular expressions in string matching, matching rules are created based on regular expressions to correct the text; the correction process is as follows:
[0090] Construct a noise character set Ω, including but not limited to: consecutive punctuation marks, HTML or XML tags, special symbols such as: "@", "#", "^", and encoding error characters, etc.; construct a regular expression Regex(Ω) for noise matching. For example, if the noise characters are "#", "@", "!", "*", the following regular expression can be used to match them:
[0091] Regex(Ω)=[#@! *]
[0092] Then use the constructed regular expression Regex(Ω) to match all noise characters in the text and replace them with an empty string. Assume the text is T a , the cleaned text is T a ′,L(Regex(Ω)) represents the language composed of all noise characters matched by the regular expression Regex(Ω), then the operation of removing noise can be expressed as:
[0093] T a ′=T a -L(Regex(Ω))
[0094] Then clean up repeated or redundant whitespace characters. After removing noise characters, there may be redundant spaces, line breaks, etc. in the text. Use regular expressions to match multiple consecutive whitespace characters and replace them with a single space or other appropriate symbol. The corresponding regular expression is:
[0095] Regex(S)=\s+
[0096] Where "\s+" matches one or more whitespace characters. a ″ can be expressed as: T a =T a ′-L(Regex(S))+"".
[0097] S330: Convert the sentence text in the second target text into a first serialized data set in BIO format.
[0098] In some embodiments, please refer to Figure 2 The encoding layer of the named entity recognition model includes a feature encoder, which is a transformer model represented by a bidirectional encoder; the decoding layer of the named entity recognition model includes: a bidirectional long short-term memory network layer, a fully connected layer, and a conditional random field layer.
[0099] In some embodiments, Figure 3 As shown, the aforementioned inputting the first serialized data set into the encoding layer of the preset named entity recognition model to determine the enhanced feature mapping matrix corresponding to all character information in the first standard file, that is, the aforementioned S140 may specifically include the following steps:
[0100] S410: After the first serialized data set is input into the encoding layer, the sentence text in the first serialized data set is inserted with aggregators and separators, the sentence text is converted into a word embedding vector of a fixed dimension, and an embedding matrix is formed.
[0101] S420, linearly transform the embedding matrix and the preset transformation matrix to obtain three entity mapping vectors, and divide the three entity mapping vectors into a first sub-vector, a second sub-vector and a third sub-vector respectively.
[0102] S430 , calculating the correlation between each element in the first sub-vector and each element in the second sub-vector to obtain a correlation matrix.
[0103] S440, based on the association matrix, normalization is performed through the softmax function to generate a weight matrix, and the weight matrix is weightedly fused, information is integrated, and dimension matching is performed on the third sub-vector of each word unit to obtain an initial feature mapping matrix.
[0104] S450, processing the initial feature mapping matrix through a preset feedforward network and layer normalization function to obtain an enhanced feature mapping matrix.
[0105] In the embodiment of the present application, it can be understood that the sentence text is converted into a word embedding E(t i ), each word is embedded in E(t i ) is a vector of fixed dimension; word embedding E(ti ) forms an embedding matrix X = [E(t 1 ), E(t 2 ), ..., E(t n )]; where word embedding E(t i ) is calculated as follows:
[0106] E(t i )=E token (t i )+E segment (t i )+E pos (pos i )
[0107] Among them, E token (t i ) is the basic embedding vector of the entity, obtained from the pre-training matrix; E segment (t i ) indicates the information of the segment to which the entity belongs; E pos (pos i ) represents the position information of the entity in the sequence.
[0108] In one example, the present application linearly transforms the embedding matrix X with the preset transformation matrix to obtain three entity mapping vectors M respectively: q 、M k 、M v , the calculation formula is:
[0109] M q =XW Q =[g 1 ,q 2 , ..., q n ] T
[0110] M k =XW K =[k 1 , k 2 , …, k n ] T
[0111] M v =XW V =[v 1 , v 2 , ..., v n ] T
[0112] Among them, M q Reflects the impact of the current entity on other words, M k Reflects which words have an important impact on the current entity, M vThe feature information of each word in the sequence, W Q , W K , W V is the trainable transformation matrix; M q 、M k 、M v The dimension of each element in is d, which is the dimension required to represent an entity in this mechanism;
[0113] The three entity mapping vectors M q 、M k 、M v Divide into the first subvector, the second subvector and the third subvector:
[0114]
[0115] in, is the feature mapping vector M q 、M k 、M v The i-th subvector of is the transformation matrix of the corresponding sub-vector, the correlation matrix R i Each element r j,k Representation vector The j-th entity representation and vector The association degree between the k-th entity representations, the association matrix R satisfies:
[0116]
[0117] Calculate the matrix R that reflects the average correlation index between each word and the mapping vector Q * , R * satisfy:
[0118]
[0119] Where, d / h is The dimension of each element in Use the softmax function to normalize and get the weight matrix A w :
[0120]
[0121] Based on the weight matrix A w Weighted fusion of the feature mapping vectors of each word Get the i-th entity feature mapping matrix O i :
[0122]
[0123] The multiple O iUse the concatenation function Concat() to merge and pass the weight matrix W O Perform information integration and dimension matching to obtain the initial feature mapping matrix O:
[0124] O = Concat(O i )W O
[0125] The feedforward network FFN() and the layer normalization function LayerNorm() are used to obtain the enhanced feature mapping matrix H corresponding to the initial feature mapping matrix O. The enhanced feature mapping matrix H can be expressed as: H = LayerNorm (O + FFN (O)).
[0126] In some embodiments, Figure 4 As shown, the aforementioned enhanced feature mapping matrix is input into the decoding layer of the named entity recognition model to determine the index relationship between the text entity in the first standard file and the multiple labels in the named entity recognition model to recognize the text entity, that is, the aforementioned S150 may specifically include the following steps:
[0127] S510, capturing the bidirectional dependency of each output vector of the standard text sequence in the enhanced feature mapping matrix through a bidirectional long short-term memory network layer, and generating context representation information of each output vector;
[0128] S520, concatenating the context representation information to obtain a standard text entity feature matrix output by the bidirectional long short-term memory network layer, and passing it to the fully connected layer;
[0129] S530, converting the high-dimensional features in the standard text entity feature matrix into the probability distribution of the standard text entity category, classifying each tag through linear transformation and activation function, obtaining the score of each tag belonging to different categories, and obtaining a score matrix;
[0130] S540, passing the score matrix to the conditional random field layer, performing global optimization through a dynamic programming algorithm, determining an optimal tag sequence to characterize the index relationship between the text entity in the first standard file and the multiple tags in the named entity recognition model, and performing text entity recognition.
[0131] In the embodiment of the present application, it can be understood that after the enhanced feature mapping matrix is passed to the bidirectional long short-term memory network layer, the contextual information of each token in the entity sequence is captured, the bidirectional dependency relationship of the tokens is obtained through the forward and reverse long short-term memory networks, and the context representation information of each token is generated. Multiple context representation information is concatenated to obtain a further standard text entity feature matrix for further processing in the fully connected layer.
[0132] In one example, the enhanced feature map matrix The output vector expressed in time step t is Where N is the batch size of the standard text feature map, T is the number of tokens in the sequence, and D is the hidden layer dimension, that is:
[0133] H=[H 1 , H 2 , …, H T ]
[0134] Through the bidirectional long short-term memory network layer, the bidirectional dependency of each output vector Ht in the standard sequence is captured, and the context representation information of each output vector is generated:
[0135]
[0136] in, and They are the hidden states of the forward and backward LSTM at time step t, and L is the hidden dimension of the two. The state h at time step t is obtained by concatenating the bidirectional context representation information. t , and get the final output of the BiLSTM layer, that is, the standard text entity feature matrix H B :
[0137]
[0138] The standard text entity feature matrix is passed to the fully connected layer to convert the high-dimensional features into the probability distribution of the standard text entity categories; assuming that the weight matrix of the fully connected layer is The bias term is Where C is the number of label types of standard text entities, then the score matrix output by the fully connected layer is The calculation formula is:
[0139] Z=H B ×W FC +b
[0140] In which, each element z in Z n,t,c Indicates the score of the standard text or subtext corresponding to the nth sample at time step t belonging to entity category c;
[0141] The score matrix Z output by the fully connected layer is passed to the conditional random field layer, and combined with the label sequence y to obtain its rationality evaluation score s(X, y) on the input embedding matrix X:
[0142]
[0143] in, represents the score corresponding to label yt at time step t, Represents the correlation score between tags;
[0144] Calculate the confidence p(y|X) of the label sequence y on the input sequence X:
[0145]
[0146] Among them, y(X) represents the labels of all possible standard text entities;
[0147] Get the possible optimal tag sequence through dynamic programming algorithm
[0148] In some embodiments, before the aforementioned serialized data set is input into the encoding layer of the preset named entity recognition model to determine the enhanced feature mapping matrix corresponding to all the character information in the first standard file, that is, before the aforementioned S140, the unstructured standard text entity recognition method may further specifically include the following steps:
[0149] S101. Obtain a second standard document in an unstructured form, and obtain a named entity recognition model based on the second standard document.
[0150] S102: Process the second standard file in a programmatic manner to obtain a second serialized data set, wherein the processing method of the second standard file is consistent with the processing method of the first standard file.
[0151] S103, dividing the second serialized data set into a training set, a validation set and a test set according to a preset ratio, so as to perform K times of training, validation and testing on the preset initial model to obtain a mature named entity recognition model.
[0152] Among them, the relative change rate of the loss value obtained by the i-th iterative training is determined based on the cost function, the learning rate of the i+1-th iterative training is adjusted based on the progress of the i-th iterative training, K is a positive integer, and i is a positive integer less than K.
[0153] In one example, the second serialized dataset D includes a training set D train , validation set D dev and the test set D test , and D={D train , D dev , D test}; Training set D train represents the sampled training data; validation set D dev Denotes the data used for verification; test set D test Represents test data, used for model testing.
[0154] In order to prevent the model from falling into a suboptimal saddle point, this application uses a cost function combined with a random deactivation mechanism to measure the progress of the model iteration and determine whether the model's learning rate needs to be adjusted, so that the model can update its weights and retrain, thereby having the ability to escape from the saddle point. The specific principles are:
[0155] Under the random dropout mechanism, the output h of the BERT layer or BiLSTM layer is h = [h 1 ,h 2 ,…,h n ] are randomly zeroed and scaled:
[0156]
[0157] Among them: r~Bernoulli(p) is an independent binary random vector, each element r j Independently retained with probability p, h⊙r represents the element-by-element product of the two vectors; for the model in this embodiment, if the parameter of the model is θ, then its cost function is the negative log-likelihood based on the conditional random field CRF:
[0158]
[0159] After introducing the random deactivation mechanism, it becomes:
[0160]
[0161] The random dropout mechanism brings some randomness to the training process. The change of gradient can be determined by the cost function Expectations reflected:
[0162]
[0163] Then for a neuron h j , its output contribution to the cost function becomes:
[0164]
[0165] In the original model, if the gradient in some directions is zero, that is, it falls into a local saddle point, then after applying the random dropout mechanism, due to the randomness of r, It may no longer be zero in multiple directions, which allows the model to update the weights and continue training, thus having the ability to escape from the saddle point.
[0166] In some embodiments, the present application provides an unstructured standard text entity recognition device 600, please refer to Figure 5 , the device 600 includes the following modules:
[0167] An acquisition module 610 is used to acquire a first standard file to be identified and processed, where the first standard file is in an unstructured form;
[0168] A first processing module 620, configured to perform format conversion, sharpening processing, pixel screening and text information extraction on the first standard file to obtain first text information;
[0169] The second processing module 630 is used to screen and denoise the first text information to obtain a standard text corpus, and convert the standard text corpus into a first serialized data set in BIO format;
[0170] The encoding determination module 640 is used to input the first serialized data set into the encoding layer of a preset named entity recognition model to determine an enhanced feature mapping matrix corresponding to all character information in the first standard file; wherein the named entity recognition model is trained based on a large amount of unstructured second standard text;
[0171] The decoding and recognition module 650 is used to input the enhanced feature mapping matrix into the decoding layer of the named entity recognition model, determine the index relationship between the text entity in the first standard file and the multiple tags in the named entity recognition model, so as to recognize the text entity.
[0172] According to an embodiment of the present application, any multiple modules among the acquisition module 610, the first processing module 620, the second processing module 630, the encoding determination module 640 and the decoding identification module 650 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.
[0173] In some embodiments, the apparatus 600 may further include a model generation module 660, and the model generation module 660 may be specifically used to:
[0174] Acquire a second standard document in an unstructured form, and obtain a named entity recognition model based on the second standard document;
[0175] Processing the second standard file in a programmatic manner to obtain a second serialized data set, wherein the processing method of the second standard file is consistent with the processing method of the first standard file;
[0176] The second serialized data set is divided into a training set, a validation set, and a test set according to a preset ratio, so as to perform K times of training, validation, and testing on the preset initial model to obtain a mature named entity recognition model.
[0177] In some embodiments, the first processing module 620 may be specifically used for:
[0178] Using the PIL library in Python, the first standard file stored in PDF format is converted into an image format, and sharpened to obtain a first image with clear and discernible text edges, and the color mode of the first image is RGB mode;
[0179] Filter pixels with large differences in red, green, and blue color channel values in the first image to delete interference information of the first image and retain the original text, thereby obtaining a second image;
[0180] The text in the second image is extracted and stored by Tesseract-OCR to obtain the first text information.
[0181] In some embodiments, the second processing module 630 may be specifically used for:
[0182] Based on the pre-trained Chinese language model, the first text information is screened, and the semantically inconsistent parts thereof are corrected to select a preliminarily qualified first target text;
[0183] Based on a string matching tool, the first target text is matched and screened with a preset target language symbol library to obtain a second target text; wherein the target language symbol library includes a plurality of language symbols that do not conform to language habits and are meaningless;
[0184] Convert the sentence texts in the second target text into the first serialized dataset in BIO format.
[0185] In some embodiments, the encoding determination module 640 may be specifically configured to:
[0186] After the first serialized data set is input into the encoding layer, the sentence text in the first serialized data set is inserted into the aggregation symbol and the separator, the sentence text is converted into a word embedding vector of a fixed dimension, and an embedding matrix is formed;
[0187] Performing a linear transformation on the embedding matrix and the preset transformation matrix to obtain three entity mapping vectors, and dividing the three entity mapping vectors into a first sub-vector, a second sub-vector and a third sub-vector respectively;
[0188] Calculate the correlation between each element in the first sub-vector and each element in the second sub-vector to obtain a correlation matrix;
[0189] Based on the association matrix, the softmax function is used for normalization to generate a weight matrix, and the weight matrix is weightedly fused, information integrated, and dimension matched with the third sub-vector of each word to obtain the initial feature mapping matrix;
[0190] The initial feature mapping matrix is processed through a preset feedforward network and layer normalization function to obtain an enhanced feature mapping matrix.
[0191] In some embodiments, the decoding and identification module 650 may be specifically used to:
[0192] The bidirectional dependencies of each output vector of the standard text sequence in the enhanced feature map matrix are captured through a bidirectional long short-term memory network layer to generate contextual representation information for each output vector;
[0193] The context representation information is concatenated to obtain the standard text entity feature matrix output by the bidirectional long short-term memory network layer and passed to the fully connected layer;
[0194] The high-dimensional features in the standard text entity feature matrix are converted into the probability distribution of the standard text entity category, and each tag is classified through linear transformation and activation function to obtain the score of each tag belonging to different categories and obtain the score matrix;
[0195] The score matrix is passed to the conditional random field layer, and global optimization is performed through the dynamic programming algorithm to determine the optimal tag sequence to characterize the index relationship between the text entities in the first standard file and multiple labels in the named entity recognition model, and to recognize the text entities.
[0196] Figure 5 Each module in the device shown has the function of implementing each step in the aforementioned unstructured standard text entity recognition method and can achieve its corresponding technical effect. For the sake of concise description, it will not be repeated here.
[0197] In some embodiments, the present application provides an electronic device, the structure diagram of the electronic device is as follows Figure 6 shown.
[0198] The electronic device may include a processor 710 and a memory 720 storing computer program instructions.
[0199] Specifically, the processor 710 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0200] The memory 720 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 720 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 720 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 720 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 720 is a non-volatile solid-state memory.
[0201] The memory 720 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, typically, the memory 720 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it can perform the operations described in any one of the unstructured standard text entity recognition methods in the above embodiments.
[0202] The processor 710 implements any one of the unstructured standard text entity recognition methods in the above embodiments by reading and executing computer program instructions stored in the memory 720 .
[0203] In one example, the electronic device may further include a communication interface 730 and a bus 700. Figure 6 As shown, the processor 710, the memory 720, and the communication interface 730 are connected via a bus 700 and communicate with each other.
[0204] The communication interface 730 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0205] Bus 700 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 700 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0206] In addition, in combination with the unstructured standard text entity recognition method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the unstructured standard text entity recognition methods in the above embodiment is implemented.
[0207] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0208] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0209] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0210] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0211] In summary, compared with the prior art, this application has the following beneficial effects:
[0212] 1. The named entity recognition model is trained based on a large amount of unstructured second standard text, and has comprehensive special terminology tags related to standard documents, which makes up for the lack of efficient text extraction from scanned copies of standard documents. Based on the named entity recognition model, the label of the text entity in the first standard document can be determined to realize the recognition of text entities.
[0213] 2. This application performs named entity recognition on the standard text of the unstructured first standard document, broadens the application scenarios of entity recognition, and performs digital information mining on the first standard text through the named entity recognition model, which can obtain entity information of different categories, reduce information loss, and improve the richness and depth of standard file information mining.
[0214] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying unstructured standard text entities, characterized in that: include: Acquire a first standard file to be identified and processed, wherein the first standard file is in an unstructured form; Performing format conversion, sharpening processing, pixel screening, and text information extraction on the first standard file to obtain first text information; Screening and denoising the first text information to obtain a standard text corpus, and converting the standard text corpus into a first serialized data set in BIO format; Inputting the first serialized data set into the encoding layer of a preset named entity recognition model to determine an enhanced feature mapping matrix corresponding to all character information in the first standard file; wherein the named entity recognition model is trained based on a large amount of unstructured second standard text; The enhanced feature mapping matrix is input into the decoding layer of the named entity recognition model, and the index relationship between the text entity in the first standard file and the multiple tags in the named entity recognition model is determined to recognize the text entity.
2. The unstructured standard text entity recognition method according to claim 1, characterized in that: Before inputting the serialized data set into the encoding layer of the preset named entity recognition model to determine the enhanced feature mapping matrix corresponding to all the character information in the first standard file, the unstructured standard text entity recognition method further includes: Acquire the second standard file in an unstructured form, so as to obtain the named entity recognition model based on the second standard file; Processing the second standard file in a programmatic manner to obtain a second serialized data set, wherein the processing method of the second standard file is consistent with the processing method of the first standard file; Dividing the second serialized data set into a training set, a validation set, and a test set according to a preset ratio, so as to perform K times of training, validation, and testing on the preset initial model, and obtain a mature named entity recognition model; Among them, the relative change rate of the loss value obtained by the i-th iterative training is determined based on the cost function, the learning rate of the i+1-th iterative training is adjusted based on the progress of the i-th iterative training, K is a positive integer, and i is a positive integer less than K.
3. The unstructured standard text entity recognition method according to claim 1, characterized in that: The first standard file is in PDF format; the first standard file is format converted, sharpened, pixel filtered and text information extracted to obtain the first text information, including: Using the PIL library in Python, convert the first standard file stored in the PDF format into an image format, and perform sharpening processing to obtain a first image with clear and discernible text edges, wherein the color mode of the first image is RGB mode; Filter pixels having large differences in red, green, and blue color channel values in the first image to delete interference information of the first image and retain the original text, thereby obtaining a second image; The text in the second image is extracted and stored by Tesseract-OCR to obtain first text information.
4. The unstructured standard text entity recognition method according to claim 1, characterized in that: The first serialized data set includes a B tag, an I tag, and an O tag, wherein the B tag represents the starting position of the entity, the I tag represents the position inside the entity, and the O tag represents the position that does not belong to the entity; The screening and denoising of the first text information to obtain a standard text corpus, and converting the standard text corpus into a first serialized data set in BIO format, includes: Based on the pre-trained Chinese language model, the first text information is screened, and the semantically inconsistent parts thereof are corrected to select a preliminarily qualified first target text; Based on a string matching tool, the first target text is matched and screened with a preset target language symbol library to obtain a second target text; wherein the target language symbol library includes a plurality of language symbols that are not in line with language habits and are meaningless; The sentence texts in the second target text are converted into a first serialized data set in BIO format.
5. The unstructured standard text entity recognition method according to any one of claims 1 to 4, characterized in that: The encoding layer of the named entity recognition model includes a feature encoder, which is a transformer model represented by a bidirectional encoder; the decoding layer of the named entity recognition model includes: a bidirectional long short-term memory network layer, a fully connected layer and a conditional random field layer.
6. The unstructured standard text entity recognition method according to claim 5, characterized in that: The step of inputting the first serialized data set into the encoding layer of a preset named entity recognition model to determine an enhanced feature mapping matrix corresponding to all character information in the first standard file includes: After the first serialized data set is input into the encoding layer, a summary symbol and a separator are inserted into the sentence text in the first serialized data set, the sentence text is converted into a word embedding vector of a fixed dimension, and an embedding matrix is formed; Linearly transforming the embedding matrix and a preset transformation matrix to obtain three entity mapping vectors, and dividing the three entity mapping vectors into a first sub-vector, a second sub-vector and a third sub-vector respectively; Calculate the correlation between each element in the first sub-vector and each element in the second sub-vector to obtain a correlation matrix; Based on the association matrix, normalization processing is performed through a softmax function to generate a weight matrix, and the weight matrix is weightedly fused, information integrated, and dimensionally matched with the third sub-vector of each word unit to obtain an initial feature mapping matrix; The initial feature mapping matrix is processed by a preset feedforward network and layer normalization function to obtain an enhanced feature mapping matrix.
7. The unstructured standard text entity recognition method according to claim 5, characterized in that: The step of inputting the enhanced feature mapping matrix into a decoding layer of the named entity recognition model and determining an index relationship between a text entity in the first standard file and a plurality of labels in the named entity recognition model to recognize the text entity comprises: Capturing the bidirectional dependency relationship of each output vector of the standard text sequence in the enhanced feature mapping matrix through the bidirectional long short-term memory network layer, and generating context representation information of each output vector; The context representation information is concatenated to obtain a standard text entity feature matrix output by the bidirectional long short-term memory network layer, and the matrix is passed to the fully connected layer; Convert the high-dimensional features in the standard text entity feature matrix into the probability distribution of standard text entity categories, classify each tag through linear transformation and activation function, obtain the score of each tag belonging to different categories, and obtain a score matrix; The score matrix is passed to the conditional random field layer, and global optimization is performed through a dynamic programming algorithm to determine the optimal tag sequence to characterize the index relationship between the text entity in the first standard file and multiple tags in the named entity recognition model, and the text entity is recognized.
8. An unstructured standard text entity recognition device, characterized in that: include: An acquisition module, used for acquiring a first standard file to be identified and processed, wherein the first standard file is in an unstructured form; A first processing module, used for performing format conversion, sharpening processing, pixel screening and text information extraction on the first standard file to obtain first text information; A second processing module is used to screen and denoise the first text information to obtain a standard text corpus, and convert the standard text corpus into a first serialized data set in BIO format; An encoding determination module, used for inputting the first serialized data set into an encoding layer of a preset named entity recognition model, and determining an enhanced feature mapping matrix corresponding to all character information in the first standard file; wherein the named entity recognition model is trained based on a large amount of unstructured second standard text; A decoding and recognition module is used to input the enhanced feature mapping matrix into the decoding layer of the named entity recognition model, determine the index relationship between the text entity in the first standard file and multiple tags in the named entity recognition model, so as to recognize the text entity.
9. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the method for recognizing an entity of an unstructured standard text as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the unstructured standard text entity recognition method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for extracting structured information of text, equipment and medium
CN111753717A
Biomedical entity recognition method for PDF format paper
CN111797630A
Event element detection method combining sequence labeling and pattern matching
CN113177416A
Structured information extraction method and device based on multi-element labeling strategy
CN113836891A
AC motor bearing fault diagnosis method adopting convolutional neural network and bidirectional long-short term memory network
CN114201989A
Cited By
File change identification method, electronic equipment, storage medium and program product
CN120745597A
Handwriting OCR (Optical Character Recognition) optimization method based on image enhancement and revision character recognition
CN122049913A