A method and device for extracting elements from official documents

By combining the method of rule templates and deep learning models, the problems of insufficient factor extraction and low accuracy in the official document field are solved, more accurate and complete official document element extraction is achieved, and the wrong text is corrected.

CN114282518BActive Publication Date: 2025-02-11BEIJING FANGCUN WUYOU TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111459657.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2025-02-11
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

The prior art fails to effectively consider the relative position information and element information content errors between elements in the extraction of specific elements in the field of official documents, resulting in insufficient extraction and low accuracy.

Method used

The method combining rule templates and deep learning models is used to extract official document elements. The sub-elements of the pending text are extracted through the rule template, the deep learning model performs error correction and specific features recognition, and finally forms the final elements by fusion of the results of the rule template and the deep learning model.

Benefits of technology

It improves the accuracy and completeness of official document element extraction, can automatically extract elements that cannot be identified by the rule base, and correct the content of the error text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114282518B_ABST
    Figure CN114282518B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for extracting elements from the field of official documents. The method for extracting elements from the field of official documents includes: obtaining a text to be processed; extracting sub-elements of the text to be processed through a rule template to form rule template element information; extracting sub-elements of the text to be processed through a deep learning model to form deep learning element information; fusing the rule template element information and the deep learning element information to form the final element. The present application is aimed at specific elements that cannot be identified by rules, and extracts elements through a deep model using text semantic information, paragraph belonging information, and relative position information between elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular relates to a method and device for extracting elements from official documents. Background Art

[0002] At present, China's society is changing with each passing day due to the rapid development of computer networks, big data and artificial intelligence technologies. At the same time, the government office system is facing major opportunities and challenges. Effectively using new Internet technologies to assist manual review of government documents efficiently and accurately has become an urgent problem to be solved.

[0003] Although the feature extraction methods in the prior art can extract legal elements, they have not yet taken into account the relative position information between specific elements in the standard text and the errors in the element information content, resulting in insufficient element feature extraction and low accuracy. Summary of the invention

[0004] In order to solve at least one of the above technical problems, the present application provides a method for extracting elements from the official document field.

[0005] The first aspect of the present application provides a method for extracting elements from the field of official documents, and the method for extracting elements from the field of official documents comprises:

[0006] Get the text to be processed;

[0007] Extracting sub-elements of the text to be processed through a rule template to form rule template element information;

[0008] Extracting sub-elements of the text to be processed through a deep learning model to form deep learning element information;

[0009] The rule template element information and the deep learning element information are integrated to form a final element.

[0010] Optionally, extracting sub-elements of the text to be processed by a deep learning model to form deep learning element information includes:

[0011] Performing error correction on the text to be processed, thereby forming a text to be processed after error correction;

[0012] Specific elements are identified and extracted from the text to be processed after error correction, thereby forming deep learning element information.

[0013] Optionally, performing error correction processing on the text to be processed to form an error-corrected text to be processed includes:

[0014] Get the text content of the text to be processed;

[0015] Perform vector mapping on the text content to obtain text vector, mask vector and part-of-speech vector:

[0016] Obtaining a part-of-speech dictionary, wherein the part-of-speech dictionary includes multiple types of Chinese parts of speech;

[0017] Fusing the text vector, the mask vector, and the part-of-speech vector to obtain a final vector;

[0018] Get the trained typo correction model;

[0019] The final vector is input into the wrong character correction model to obtain the text to be processed after error correction.

[0020] Optionally, the step of identifying and extracting specific elements from the error-corrected text to be processed to form deep learning element information includes:

[0021] Obtaining the text content of the text to be processed after error correction;

[0022] The text content is fed into the Bert pre-trained model in line order to obtain the CLS sentence vector containing the semantic information of the entire line of text;

[0023] Acquire a paragraph vector and a position vector according to the text content;

[0024] Fusing the CLS sentence vector, the paragraph vector, and the position vector to form a fused vector;

[0025] The sequence labeling method is used to identify and extract official document elements from the fusion vector to obtain deep learning element information.

[0026] Optionally, the fusing the rule template element information and the deep learning element information to form a final element includes:

[0027] The rule template element information and the deep learning element information are combined through the main and secondary element splicing strategy to form the final element.

[0028] The present application also provides a document domain element extraction device, the document domain element extraction device comprising:

[0029] A module for acquiring text to be processed, wherein the module is used to acquire text to be processed;

[0030] A rule template extraction module, the rule template extraction module is used to extract sub-elements of the text to be processed through the rule template to form rule template element information;

[0031] A deep learning model extraction module, the deep learning model extraction module is used to extract sub-elements of the text to be processed through a deep learning model to form deep learning element information;

[0032] A fusion module is used to fuse the rule template element information and the deep learning element information to form a final element.

[0033] Optionally, the deep learning model extraction module includes:

[0034] A wrong character correction module, wherein the wrong character correction module is used to perform error correction processing on the text to be processed, thereby forming a corrected text to be processed;

[0035] An element recognition module is used to identify and extract specific elements from the text to be processed after error correction, thereby forming deep learning element information.

[0036] Optionally, the element identification module includes:

[0037] A text content acquisition module, the text content acquisition module is used to acquire the text content of the text to be processed after error correction;

[0038] A Bert pre-training model input module, which is used to input the text content into the Bert pre-training model in line order to obtain a CLS sentence vector containing semantic information of the entire line of text;

[0039] A division module, the division module is used to obtain a paragraph vector and a position vector according to the text content;

[0040] A vector fusion module, the vector fusion module is used to fuse the CLS sentence vector, the paragraph vector and the position vector to form a fusion vector;

[0041] A deep learning element information extraction module is used to use a sequence labeling method to perform document element recognition and extraction on the fusion vector to obtain deep learning element information.

[0042] The present application also provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for extracting elements from official document domain as described above.

[0043] The present application also provides a readable storage medium, which stores a computer program. When the computer program is executed by a processor, it is used to implement the method for extracting elements from the official document field as described above.

[0044] This application has the following advantages:

[0045] 1. Fully study the characteristics of specific elements in the field of official documents. For elements that cannot be identified using the rule base method, use a combination of deep model networks (CCM+EIM) to automatically extract relevant official document elements and correct their content.

[0046] 2. For specific elements that cannot be identified by rules, deep models are used to extract elements using text semantic information, paragraph information, and relative position information between elements.

[0047] 3. For the results of the two strategies, the main and secondary splicing strategy of elements is used to calculate the similarity and set the threshold, and the model and rule output results are used to jointly correct the returned results. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flowchart of a preferred embodiment of the method for extracting elements from the official document field of the present application.

[0049] Figure 2 It is a schematic diagram of the structure of a computer device of a terminal or server suitable for implementing the implementation mode of the present application.

[0050] Figure 3 This is a module diagram of a deep learning model extraction module according to an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical scheme and advantages of the implementation of this application clearer, the technical scheme in the implementation of this application will be described in more detail in combination with the drawings in the implementation of this application. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described implementation is a part of the implementation of this application, not all of the implementations. The implementation described below with reference to the drawings is exemplary and is intended to be used to explain this application, and cannot be understood as a limitation on this application. Based on the implementation in this application, all other implementations obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The implementation of this application is described in detail below in combination with the drawings.

[0052] Figure 1 It is a flowchart of a preferred embodiment of the method for extracting elements from the official document field of the present application.

[0053] The first aspect of the present application provides a method for extracting elements from the official document domain, including:

[0054] Step 1: Get the text to be processed;

[0055] Step 2: extracting sub-elements of the text to be processed through a rule template to form rule template element information;

[0056] Step 3: extracting sub-elements of the text to be processed through a deep learning model to form deep learning element information;

[0057] Step 4: Fuse the rule template element information and the deep learning element information to form the final element.

[0058] This application has the following advantages:

[0059] 1. Fully study the characteristics of specific elements in the field of official documents. For elements that cannot be identified using the rule base method, use a combination of deep model networks (CCM+EIM) to automatically extract relevant official document elements and correct their content.

[0060] 2. For specific elements that cannot be identified by rules, deep models are used to extract elements using text semantic information, paragraph information, and relative position information between elements.

[0061] 3. For the results of the two strategies, the main and secondary splicing strategy of elements is used to calculate the similarity and set the threshold, and the model and rule output results are used to jointly correct the returned results.

[0062] In this embodiment, the sub-elements of the text to be processed are extracted through the rule template to form the rule template element information, which is specifically:

[0063] The extraction of the text to be processed through rule templates is mainly aimed at official document elements with specific prefixes or suffixes, which are generally specific government agency names, unit names or dates, etc. For such special official document elements, the rule library is directly used for recognition, and for elements such as government agencies or document issuance dates, it is generally not necessary to correct typos in their content. In the end, the recognition results will be judged by strategies to ensure the accuracy of the results.

[0064] In this embodiment, the sub-elements of the text to be processed are extracted by the deep learning model to form deep learning element information, including:

[0065] Performing error correction on the text to be processed, thereby forming a text to be processed after error correction;

[0066] Specific elements are identified and extracted from the text to be processed after error correction, thereby forming deep learning element information.

[0067] See also Figure 3, extracting sub-elements of the text to be processed through deep learning models is mainly aimed at official document elements that do not have specific identification marks (that is, they cannot be identified by rule templates). They can only be identified and judged through text semantic information, paragraph belonging information, and relative position information between elements. This strategy mainly includes two modules, namely the Chinese Correction Module (CCM) and the Elements Identify Module (EIM).

[0068] In this embodiment, error correction processing is performed on the text to be processed, so as to form the text to be processed after error correction, including:

[0069] Get the text content of the text to be processed;

[0070] Perform vector mapping on the text content to obtain text vector, mask vector and part-of-speech vector:

[0071] Obtaining a part-of-speech dictionary, wherein the part-of-speech dictionary includes multiple types of Chinese parts of speech;

[0072] Fusing the text vector, the mask vector, and the part-of-speech vector to obtain a final vector;

[0073] Get the trained typo correction model;

[0074] The final vector is input into the wrong character correction model to obtain the text to be processed after error correction.

[0075] In this embodiment, the main function of the above-mentioned error correction is to correct the wrong characters in the original text content, so as to provide text content guarantee for the subsequent accurate identification of official document elements. First, the input text content is vector-mapped: the text vector is numerically mapped to the text through a dictionary; the mask vector is composed of 0 / 1 values, and the vacancies that do not reach the specified character length are ignored; the part-of-speech vector is vector-mapped to the obtained part-of-speech list according to the word segmenter after the input text is segmented to obtain a phrase list and a corresponding part-of-speech list. The part-of-speech dictionary includes 15 types of Chinese parts of speech, which are marked by numerical labels 0-14. It can also be said that the part-of-speech vector of the text is composed of numerical values ​​0-14. The final vector representation is fused by adding the text vector, the mask vector and the part-of-speech vector, and then the fused vector is sent to the encoder module of the transformer for vector calculation. The linear output layer uses a superposition combination of two linear layers and a Softmax layer for model output. Finally, the original text content will correct the wrong characters and output them through the empirical knowledge obtained during model training, providing guarantee for subsequent element recognition.

[0076] In this embodiment, specific elements are identified and extracted from the text to be processed after error correction, so as to form deep learning element information including:

[0077] Obtaining the text content of the text to be processed after error correction;

[0078] The text content is sent into the Bert pre-trained model in row order to obtain a CLS sentence vector containing the semantic information of the entire line of text; specifically, for each line of text content, a CLS sentence vector containing the semantic information of the entire line of text will be obtained through the Bert model, and the text content is sent into the Bert model in row order to obtain the CLS sentence vector of the number of text lines. The CLS sentence vectors are spliced ​​in the order of input, and finally a joint CLS sentence vector including the semantic information of the entire article is obtained.

[0079] According to the text content, the paragraph vector and position vector are obtained; specifically, according to the division of the official document text paragraphs, the full text can be divided into the header, the body and the colophon, and the paragraph vector is formed through numerical mapping. In addition, the relative position relationship between the elements also follows certain rules, and the relative position relationship can be converted into a position vector.

[0080] The CLS sentence vector, the paragraph vector and the position vector are fused to form a fused vector; specifically, the CLS sentence vector, the paragraph vector and the position vector are fused to form a fused vector.

[0081] The sequence labeling method is used to identify and extract official document elements from the fusion vector to obtain deep learning element information.

[0082] Specifically, the text content is first sent to the Bert pre-trained model in line order to obtain the CLS sentence vector containing the semantic information of the entire line of text. The Bert model can fuse the semantic information represented by each line of text into a 1×768 two-dimensional sentence vector through powerful knowledge information and model architecture. Then all the texts are sent to Bert in line order to obtain the sentence vectors, and the n×768 two-dimensional vector representation representing the semantic information of the entire text is obtained. In terms of government documents, according to the text layout of the document content, all texts can be divided into three parts (heading, body and colophon), each part is distinguished by the long separator in the document, and different paragraphs contain specific document elements, which can also be used as the unique paragraph position information of the document elements for the deep model to learn. The paragraph vector is composed of 0-2 numerical labels (0: header, 1: body, 2: colophon), representing which paragraph part a line of text belongs to. In addition, the relative position relationship between the elements in the official document also follows certain rules. For example, the "title" of the official document element must be preceded and followed by specific elements such as "issuing agency logo" and "main sending agency". The relative position relationship between the elements can also be like paragraph position information, so that the model can incorporate relevant position order information during training and can more easily distinguish specific official document elements during prediction. After the EIM module fuses and adds the three vectors, it uses the sequence labeling method to identify the official document elements on the fused sentence vector. The subsequent model is mainly composed of a bidirectional LSTM layer, a multi-head self-attention layer, and a linear output layer (2 linear layers + Softmax layer). The bidirectional LSTM layer can fully learn the sentence structure information of the relative position between elements. The latter multi-head self-attention layer and linear output layer fuse the semantic information of the elements, paragraph information, and the relative position information between elements into a high-dimensional vector, making it easier for the model to identify elements. Official document elements basically include 17 element categories (6 types of headers, 9 types of bodies, and 2 types of colophons), so 17 BIO label forms (such as B-baoti, I-baioti, O) are designed in the element recognition task for sequence labeling tasks of multiple element categories.

[0083] In this embodiment, the rule template element information and the deep learning element information are integrated to form the final element, which includes:

[0084] The rule template element information and the deep learning element information are combined through the main and secondary element splicing strategy to form the final element.

[0085] Specifically, when splicing the recognition results, we use the main and secondary splicing strategy to return the splicing results. There are two situations for the main and secondary splicing strategy: one is that one of the rules or the model has a recognition result, and the recognition result is directly filled in the element slot; the other is that both the rule and the model can recognize the result. If the two results are the same, they are directly filled in the corresponding element slot. If the two results are different, the similarity between the two should be calculated first. If the similarity is greater than 0.8, the result of model recognition should be filled in the element slot. Otherwise, the rule recognition result should be filled in. The similarity calculation is mainly to prevent the special situation that the element content has typos when the rule extracts elements from the content through a specific prefix / suffix. If the calculation results of the rule and the model are different, but the similarity is greater than 0.8, it means that the recognition results of the two are basically the same. The difference should be that there are typos in the original content, and the model modifies the typos through the algorithm. At this time, the model output result should be the main one. If the similarity is less than 0.8, it means that the model recognition result is inaccurate. At this time, the rule output result should be the main one.

[0086] The present application also provides a device for extracting elements from the field of official documents, which includes a module for obtaining text to be processed, a rule template extraction module, a deep learning model extraction module and a fusion module. The module for obtaining text to be processed is used to obtain the text to be processed; the rule template extraction module is used to extract sub-elements of the text to be processed through the rule template to form rule template element information; the deep learning model extraction module is used to extract sub-elements of the text to be processed through the deep learning model to form deep learning element information; the fusion module is used to fuse the rule template element information and the deep learning element information to form the final element.

[0087] In this embodiment, the deep learning model extraction module includes a typo correction module and an element recognition module. The typo correction module is used to perform error correction processing on the text to be processed, thereby forming a corrected text to be processed; the element recognition module is used to identify and extract specific elements of the text to be processed after error correction, thereby forming deep learning element information.

[0088] In this embodiment, the element recognition module includes a text content acquisition module, a Bert pre-trained model input module, a partitioning module, a vector fusion module and a deep learning element information extraction module, wherein the text content acquisition module is used to obtain the text content of the text to be processed after error correction; the Bert pre-trained model input module is used to input the text content into the Bert pre-training model in sequence according to the line order to obtain the CLS sentence vector containing the semantic information of the whole line of text; the partitioning module is used to obtain the paragraph vector and the position vector according to the text content; the vector fusion module is used to fuse the CLS sentence vector, the paragraph vector and the position vector to form a fusion vector; the deep learning element information extraction module is used to use the sequence labeling method to perform document element recognition and extraction on the fusion vector to obtain deep learning element information.

[0089] In this embodiment, each model in the wrong character correction module and the element recognition module adopts a serial training method, and the output loss of both models is the cross entropy loss. The loss of joint model training is ,in It is used as the confidence level to calculate the contribution of the two losses.

[0090] This application targets the field of government documents and combines a deep model network with a rule base to automatically extract relevant document elements and correct the content of erroneous text to a certain extent. In addition to using a rule base to accurately extract elements with specific prefixes / suffixes, this application also takes into account the influence of the parts of the document field elements (header, body, colophon) and the relative position information between elements on element extraction. In the case of errors in the content of document elements, there is a high probability that the specified elements will be extracted and their typos will be corrected, and when splicing the extraction results of the rules and models, the element extraction results are also corrected through certain strategies.

[0091] The present application also provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned method for extracting elements from the official document domain.

[0092] The present application also provides a readable storage medium, which stores a computer program. When the computer program is executed by a processor, it is used to implement the method for extracting elements from the official document field as described above.

[0093] The computer-readable storage medium may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by the device, the data is processed according to the above method.

[0094] Reference below Figure 2 , which shows a schematic structural diagram of a computer device 400 suitable for implementing the embodiments of the present application. Figure 2 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0095] like Figure 2 As shown, the computer device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0096] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.

[0097] In particular, according to the embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above functions defined in the method of the present application are executed. It should be noted that the computer storage medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus or a device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0098] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0099] The modules or units involved in the embodiments described in this application may be implemented by software or hardware. The modules or units described may also be set in a processor, and the names of these modules or units do not constitute limitations on the modules or units themselves in some cases.

[0100] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for extracting elements from official documents, characterized in that: The method for extracting elements from the official document domain includes: Get the text to be processed; Extracting sub-elements of the text to be processed through a rule template to form rule template element information; Extracting sub-elements of the text to be processed through a deep learning model to form deep learning element information; Fusion of the rule template element information and the deep learning element information to form a final element; The step of extracting sub-elements of the text to be processed by a deep learning model to form deep learning element information includes: Performing error correction on the text to be processed, thereby forming a text to be processed after error correction; Identify and extract specific elements of the text to be processed after error correction, thereby forming deep learning element information; The error correction processing of the to-be-processed text to form the to-be-processed text after error correction comprises: Get the text content of the text to be processed; Perform vector mapping on the text content to obtain text vector, mask vector and part-of-speech vector: Obtaining a part-of-speech dictionary, wherein the part-of-speech dictionary includes multiple types of Chinese parts of speech; Fusing the text vector, the mask vector, and the part-of-speech vector to obtain a final vector; Get the trained typo correction model; Inputting the final vector into the wrong character correction model to obtain the corrected text to be processed; The step of identifying and extracting specific elements from the error-corrected text to be processed to form deep learning element information includes: Obtaining the text content of the text to be processed after error correction; The text content is fed into the Bert pre-trained model in line order to obtain the CLS sentence vector containing the semantic information of the entire line of text; Acquire a paragraph vector and a position vector according to the text content; Fusing the CLS sentence vector, the paragraph vector, and the position vector to form a fused vector; The sequence labeling method is used to identify and extract the official document elements from the fusion vector to obtain deep learning element information; The fusing of the rule template element information and the deep learning element information to form a final element includes: Processing the rule template element information and the deep learning element information through the element main-sub splicing strategy to form a final element; The processing of the rule template element information and the deep learning element information by the element main-sub splicing strategy to form the final element includes:

1. If either the rule template element information or the deep learning element information has a recognition result, fill in the recognition result directly in the element slot; 2. Both the rule template feature information and the deep learning feature information can identify results. If the two results are the same, they will be directly filled in the corresponding feature slots. If the two results are different, the similarity between the two should be calculated first. If the similarity is greater than 0.8, the result of the deep learning feature information identification should be filled in the feature slot. Otherwise, the identification result of the rule template feature information should be filled in.

2. A document domain element extraction device, characterized in that: The document domain element extraction device comprises: A module for acquiring text to be processed, wherein the module is used to acquire text to be processed; A rule template extraction module, the rule template extraction module is used to extract sub-elements of the text to be processed through a rule template to form rule template element information; A deep learning model extraction module, the deep learning model extraction module is used to extract sub-elements of the text to be processed through a deep learning model to form deep learning element information; A fusion module, the fusion module is used to fuse the rule template element information and the deep learning element information to form a final element; The deep learning model extraction module includes: A wrong character correction module, wherein the wrong character correction module is used to perform error correction processing on the text to be processed, thereby forming a corrected text to be processed; An element recognition module, which is used to identify and extract specific elements from the text to be processed after error correction, thereby forming deep learning element information; The element recognition module comprises: A text content acquisition module, the text content acquisition module is used to acquire the text content of the text to be processed after error correction; A Bert pre-training model input module, which is used to input the text content into the Bert pre-training model in line order to obtain a CLS sentence vector containing semantic information of the entire line of text; A division module, the division module is used to obtain a paragraph vector and a position vector according to the text content; A vector fusion module, the vector fusion module is used to fuse the CLS sentence vector, the paragraph vector and the position vector to form a fusion vector; A deep learning element information extraction module, which is used to use a sequence labeling method to perform document element recognition and extraction on the fusion vector to obtain deep learning element information; The step of identifying and extracting specific elements from the error-corrected text to be processed to form deep learning element information includes: Obtaining the text content of the text to be processed after error correction; The text content is fed into the Bert pre-trained model in line order to obtain the CLS sentence vector containing the semantic information of the entire line of text; Acquire a paragraph vector and a position vector according to the text content; Fusing the CLS sentence vector, the paragraph vector, and the position vector to form a fused vector; The sequence labeling method is used to identify and extract the official document elements from the fusion vector to obtain deep learning element information; The fusing of the rule template element information and the deep learning element information to form a final element includes: Processing the rule template element information and the deep learning element information through the element main-sub splicing strategy to form a final element; The processing of the rule template element information and the deep learning element information by the element main-sub splicing strategy to form the final element includes:

1. If either the rule template element information or the deep learning element information has a recognition result, fill in the recognition result directly in the element slot; 2. Both the rule template feature information and the deep learning feature information can identify results. If the two results are the same, they will be directly filled in the corresponding feature slots. If the two results are different, the similarity between the two should be calculated first. If the similarity is greater than 0.8, the result of the deep learning feature information identification should be filled in the feature slot. Otherwise, the identification result of the rule template feature information should be filled in.

3. A computer device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for extracting elements from the official document domain as claimed in claim 1.

4. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the method for extracting elements from official document domain as claimed in claim 1.