Natural language based document processing method, apparatus and computer program product

By using pre-trained models and hybrid decision-making strategies, document structure can be quickly and accurately segmented and extracted, solving the problems of inefficiency and errors faced by enterprise employees when processing large documents, and achieving efficient and accurate document processing.

CN121029987BActive Publication Date: 2026-03-27DALIAN YUNLU TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, enterprise employees are inefficient and prone to errors and omissions when processing large documents, resulting in high legal risks, and there is a lack of automated processing solutions.

Method used

A pre-trained document recognition model is used to identify document types. Combining rule matching and machine learning models, coarse-grained segmentation is performed first, followed by fine-grained analysis. A hybrid decision is made using an offline-trained text classifier to quickly and accurately segment and extract document structure and information.

Benefits of technology

It improves the accuracy and efficiency of document processing, reduces noise and interference, lowers computational complexity, is suitable for enterprise-level document processing, and improves the work efficiency of practitioners.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121029987B_ABST
    Figure CN121029987B_ABST
Patent Text Reader

Abstract

The application provides a natural language-based document processing method, comprising the following steps: identifying the type of an original document by using a pre-trained document recognition model; processing text segments of the original document based on natural language technology; quickly matching the belonging chapter of the text segments by rule matching; in the case of rule matching failure, loading a corresponding chapter model according to the type of the document, and identifying the belonging chapter of the text segments based on the chapter model; and generating a structured chapter list according to the chapter belonging results of all text segments of the original document. The model structure of the application is easy to maintain and extend, the document segmentation and information extraction performance is good, and the application is especially suitable for enterprise-level document processing, and can effectively improve the work efficiency of employees.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the technical field of artificial intelligence, and in particular, to a document processing method and device based on natural language and a computer program product. BACKGROUND

[0002] In some industries, employees need to disclose important document information such as contracts, policy updates, legal terms, etc. to customers. When the content of the document changes, the employee needs to re-read and extract the changed content to ensure that the data conveyed to the customer is accurate and compliant. For example, a fund prospectus is generally at least dozens or even hundreds of pages. Under the current mode, the employee needs to download the document from the official website and read it in full, and manually compare and extract information.

[0003] The way of manually reading and comparing the changed content of the document is not only inefficient, but also prone to errors and omissions, resulting in high legal risks for the enterprise. At present, there is no solution for automatic processing of such industry documents.

[0004] Therefore, it is an urgent need for some industries to intelligently and efficiently complete document comparison and ensure data accuracy. SUMMARY

[0005] In view of the deficiencies of the prior art, the present application provides a document processing scheme based on natural language, which can help employees efficiently and accurately complete document comparison.

[0006] The present application solves the above technical problems in the following aspects:

[0007] On the one hand, the present application provides a document processing method based on natural language, comprising:

[0008] using a pre-trained document recognition model to identify the type of the original document;

[0009] processing the text segments of the original document based on natural language technology, and quickly matching the belonging chapter of the text segments through rule matching;

[0010] In the case of rule matching failure, loading a corresponding chapter model according to the type of the document, and identifying the belonging chapter of the text segments based on the chapter model;

[0011] generating a structured chapter list according to the chapter belonging results of all text segments of the original document.

[0012] Another aspect of the present application provides a document processing device based on natural language, comprising:

[0013] a type identification module, which uses a pre-trained document recognition model to identify the type of the original document;

[0014] a chapter matching module, configured to process the text segments of the original document based on natural language technology, and quickly match the belonging chapters of the text segments through rule matching;

[0015] a chapter recognition model, configured to, in the case that the rule matching fails, load a corresponding chapter model according to the type of the document, and recognize the belonging chapters of the text segments based on the chapter model;

[0016] a chapter structuring module, configured to generate a structured chapter list according to the chapter belonging results of all the text segments of the original document.

[0017] Another aspect of the present application also provides a computer program product, which, when executed by a processor, causes the processor to implement the method as described above.

[0018] The present application first performs coarse-grained segmentation and then fine-grained analysis in the processing task of large documents, thereby avoiding the application of computationally intensive algorithms to the full text. The text classifier trained offline is used for online use by the user, and machine learning prediction and rule matching are comprehensively utilized for hybrid decision-making when processing new documents, the rule engine is preferentially used for fast matching, and the machine learning model is used for deep semantic analysis when the matching fails, thereby realizing intelligent segmentation of the document structure quickly and accurately, solving the problems of "what type of document is this" and "where is the main part of the document". After the macro structure of the document is processed, the appropriate information extraction strategy is selected according to the type of the document, the micro content of the document is processed, the specific information points are extracted from the structured paragraphs, and the sentence-level segmentation is performed by using the natural language processing technology, thereby solving the problem of "what key information does this document part contain". This targeted information extraction can avoid the application of specific domain information extraction rules on irrelevant documents, improve the accuracy, and is more accurate than processing the whole document, thereby reducing noise and interference, improving the hit rate, and reducing the computational complexity. The model structure of the present application is easy to maintain and extend, the document segmentation and information extraction performance are good, and the present application is particularly suitable for enterprise-level document processing, thereby effectively improving the work efficiency of the practitioners. BRIEF DESCRIPTION OF DRAWINGS

[0019] Other features, objects, and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings.

[0020] Figure 1 a system architecture schematic diagram for applying the method of the embodiments of the present disclosure;

[0021] Figure 2 a flowchart of the natural language-based document processing method provided by the embodiments of the present disclosure;

[0022] Figure 3This is a flowchart illustrating the document segmentation process in an embodiment of this disclosure.

[0023] Figure 4 A flowchart of a document content extraction method provided in this embodiment of the disclosure;

[0024] Figure 5 This is a flowchart illustrating the information extraction process in this embodiment of the disclosure.

[0025] Figure 6 A block diagram of a document processing apparatus provided in embodiments of this disclosure;

[0026] Figure 7 A block diagram of a document processing apparatus provided in another embodiment of this disclosure. Detailed Implementation

[0027] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.

[0028] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. Furthermore, for clarity, portions unrelated to the description of exemplary embodiments have been omitted from the drawings. It should be noted that, unless otherwise specified, the embodiments and features described in the present disclosure can be combined with each other.

[0029] Figure 1 A schematic diagram of a system architecture applying the methods of embodiments of the present disclosure is shown.

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

[0031] Terminal devices 101, 102, and 103 interact with server 105 via network 104 to receive or send messages, etc. Various client applications can be installed on terminal devices 101, 102, and 103, such as document processing and enterprise office applications.

[0032] The terminal devices 101, 102, and 103 can be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various special-purpose or general-purpose electronic devices, including but not limited to CT machines, smart terminals, portable computers, desktop computers, and the like. When the terminal devices 101, 102, and 103 are software, they can be installed in the above-listed electronic devices. They can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services) or as a single software or software module.

[0033] The server 105 can be a server that provides various intelligent services, for example, a backend server that provides services for a client application installed on the terminal devices 101, 102, and 103. For example, the server can train and deploy an intelligent document processing model to support enterprise office processes so as to display a visualization result on the terminal devices 101, 102, and 103.

[0034] The server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers or as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services) or as a single software or software module.

[0035] The various methods provided by the embodiments of the present disclosure can be executed by the server 105 or the terminal devices 101, 102, and 103. Alternatively, the various methods of the embodiments of the present disclosure can be partially executed by the terminal devices 101, 102, and 103 and partially executed by the server 105.

[0036] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the above description is only illustrative. According to the needs of implementation, there can be any number of terminal devices, networks, and servers.

[0037] The following describes an embodiment of implementing the intelligent document processing method provided by the present disclosure. Figure 2

[0038] The following describes an embodiment of implementing the intelligent document processing method provided by the present disclosure. Figure 2 As described above, the embodiments of the present disclosure provide an intelligent document processing method.

[0039] Figure 2 ​As shown, the document processing method includes steps S210-S240.

[0040] S210: Identify the type of the original document using a pre-trained document recognition model.

[0041] The original document can be uploaded by the user, or read through a software interface after the user provides the location of the online document. The original document usually has a specific organizational structure and chapter structure, including PDF, Word documents.

[0042] The type of the original document is related to the industry, including financial product brochures, contracts, or medical records. Different types of original documents have different types of information, such as text, numbers, charts, images, etc., and the content is usually complex, for example, a fund prospectus is usually at least dozens or even hundreds of pages.

[0043] In order to facilitate subsequent processing and analysis, the macro structure of the document is first processed. After the type of the document is determined (such as a fund prospectus), the downstream task can only extract the key information of this type of document (such as fund fees), avoiding applying specific domain information extraction rules on irrelevant documents, improving accuracy. In addition, information extraction on correctly segmented paragraphs is more accurate than processing the entire document, which can reduce noise and interference, improve hit rate, and reduce computational complexity. From the perspective of data processing, first segment the document at a coarse granularity, then perform fine-grained analysis, avoid applying computationally intensive algorithms to the full text, and use different analysis strategies for different types of document paragraphs, which can optimize resource usage.

[0044] The pre-trained document recognition model is a machine learning-based classifier, and during training, the training documents are converted into numerical feature vectors based on TF-IDF technology as input data. The training process includes: feature extraction and domain-specific keyword extraction on the training documents, building a vocabulary; calculating the term frequency-inverse document frequency weight in the vocabulary; reducing the weight of common words and increasing the weight of domain keywords; generating a numerical feature vector according to the weight result. Finally, the obtained numerical feature vector is used as the input of the classifier for model training.

[0045] The trained document recognition model can be deployed online to identify the type of new input documents.

[0046] S220: Process the text segments of the original document based on natural language technology, and quickly match the ownership chapter of the text segments through rule matching.

[0047] S230: In the case of rule matching failure, load the corresponding chapter model according to the type of the document, and identify the ownership chapter of the text segments based on the chapter model.

[0048] After solving the problem of "what type of document is this", the next problem is "where are the sections of the document". To reduce the consumption and dependence on machine models, first use rule matching to quickly identify sections with obvious patterns, and then use machine models to identify sections that do not match. This hybrid strategy uses rule engines to quickly process text with obvious features, and then uses machine learning models to process ambiguous and complex cases, achieving a balance between speed and accuracy.

[0049] Rule matching can use the heuristic rule matching module integrated by KeyWordSearch. A list of keywords or regular expressions is maintained inside the matching module, and each keyword corresponds to a specific section. When processing the original document, if the text matches a strong rule (such as a standard chapter title), the attribution can be determined directly.

[0050] Different types of documents usually have relatively fixed text structures and section organizations. A configuration directory can be used to maintain the section information corresponding to different types of documents, predefining the section structure of each type of document, including section name, ID, alias, etc. At the same time, decouple the configuration from the code to facilitate future maintenance and expansion. For example, add or delete specific sections for a certain type of document, or add section information for a new type of document.

[0051] In the case of rule matching failure, load the corresponding section model according to the type of the document, and identify the attribution section of the text segment based on the section model. The section model is also a machine learning-based classification model, which is pre-trained for different document types. Different document types can include fund prospectus, contract, medical record. The corresponding model is used to predict which pre-defined section a text segment (such as a sentence or paragraph) is most likely to belong to, for example, the sections of a fund prospectus include "Fund Introduction", "Investment Strategy", "Risk Factors", etc.

[0052] In implementation, after determining the document type, load the pre-trained classification model from the disk at initialization. Convert the input text segment of the original document into a numerical vector using the loaded Vectorizer, then use the section model to predict the probability distribution of the text segment belonging to the pre-defined section, and select the section with the highest probability as the prediction result, i.e. the identified attribution section.

[0053] Further, after identifying the attribution section of the text segment, the recognition result can also be used to predict the confidence, and the result exceeding the threshold is accepted as the attribution section. Specifically, calculate the likelihood ratio of the recognition result by Naive Bayes probability, convert the likelihood ratio to confidence by logistic function, and mark the section with confidence less than 0.5 as unclassified. The confidence can be adjusted according to actual conditions.

[0054] The chapter model is a classifier built based on Logistic Regression and Support Vector Machine (SVM), and uses TF-IDF technique to generate feature matrix for training. When training the model, the entry script of the whole model training process is started by Train.py (training flow controller). Then the following steps are performed:

[0055] 1) Load the labeled training data;

[0056] 2) Call the training function to convert the training text data into numerical features;

[0057] 3) Initialize the chapter model;

[0058] 4) Train the chapter model using the feature data;

[0059] 5) Save the trained chapter model and vectorizer to disk.

[0060] The key technique adopted in the training process is Bag-of-Words, which uses TfidfVectorizer provided by scikit-learn to scan all training documents, build a dictionary, and construct a vocabulary. The training text is converted into TF-IDF vectors to measure the importance of each word, and the training text is vectorized to generate a feature matrix for training.

[0061] S240: Generate a structured chapter list according to the chapter attribution results of all text segments of the original document.

[0062] According to the results of chapter attribution predicted by the rules matching and chapter model in the previous steps, the structured information of the original document can be generated, including the classification label of the document and the structured document paragraphs, such as the chapters of the fund prospectus, completing the document-level and chapter-level processing.

[0063] The document segmentation processing flow implemented in this embodiment is as shown in Figure 3 After identifying the document type, load the corresponding chapter recognition model, then read the text, and preferentially match by keywords rules. If the matching is successful, directly mark the chapter, if the matching is unsuccessful, use the loaded chapter recognition model for prediction, and the prediction result is subjected to Naive Bayes prediction confidence. If the confidence is greater than the threshold, mark it as an acceptable prediction result, otherwise mark it as unclassified. After completing the analysis of the document, record all the chapter edits, and output the structured chapter list.

[0064] In this embodiment, an offline-trained text classifier is adopted in the document segmentation task to facilitate online prediction. When processing new documents, machine learning prediction and rule matching are comprehensively utilized for hybrid decision-making. First, the rule engine is used for quick matching. When no match is found, the machine learning model performs in-depth semantic analysis, enabling fast and accurate intelligent segmentation of the document structure.

[0065] Furthermore, after completing document-level and chapter-level processing of the document, key content analysis and extraction processing can also be performed on the document.

[0066] Figure 4 It is a flowchart of the document content extraction method provided by this embodiment.

[0067] As Figure 4 shown, extracting the document content includes steps S410 - S430.

[0068] S410: According to the document type and structured document paragraphs, load multiple information extractors corresponding to the current document type.

[0069] S420: Use multiple information extractors to extract specific information respectively.

[0070] S430: Package the hit item objects according to the information extraction results.

[0071] In this embodiment, the document type has been identified through the upstream document segmentation task and the document paragraphs have been divided. At this time, the information extractors corresponding to the current document type can be loaded. For example, for a fund prospectus, the key information to be extracted includes time, amount, and terms, and each key information corresponds to an extractor, thus realizing sentence-level and entity-level document processing. In this processing process, the classified and segmented document fragments are used as input, and the output is the extracted key information, such as time, amount, terms, etc.

[0072] The information extractor is implemented through a query class (Query Class), which defines multiple regular expressions (Regex) for specific information to match specific texts. For example, the date extraction class covers various formats, such as "May 1, 2023", "05 / 01 / 2023", "May 1, 2023", Chinese capitalized dates, etc. Another example is the amount extraction class, which covers US dollars, RMB, and Chinese capitalized amounts. All predefined regular patterns are pre-compiled using re.compile() during initialization, which can improve query performance.

[0073] Further, the information extractor also contains a list of confirmatory keywords and negative keywords. A context verification mechanism is used to reduce false positives in step S420, which is: detecting the context of the current matched specific text, verifying the reasonableness of the specific text based on the list of confirmatory keywords and negative keywords; when the context is verified to be reasonable, the current specific text is marked as a high-confidence hit item.

[0074] In implementation, each query class maintains a list of confirmatory keywords and negative keywords. For example, for "date", the confirmatory keywords are "effective date", "signed on", "until", "Dated:", and the negative keywords are "clause number", "version number", "file number". After matching a specific text, its surrounding context is checked. Only when the context is reasonable, the matching item is marked as a high-confidence hit item.

[0075] The extracted text format is usually diverse, so after matching a specific text, the data can also be standardized to change the information from "raw" to "regular". The data format of the verified specific text is standardized to obtain standardized specific information. Specifically, the normalize() method is included in each query class. In processing, dates are uniformly converted to YYYY-MM-DD format, such as "2023-05-01"; and amounts are converted to floating-point numbers without commas, such as 1200000.00.

[0076] In S430, the packaged hit item object includes: the raw text of the hit item, the standardized text, the corresponding position in the document, and the confidence score of the hit item.

[0077] Specifically, the extraction result is packaged into a "hit" (Hit) object, which contains the following contents:

[0078] -raw_text: raw text, such as "May 1st,2023".

[0079] -normalized_value: normalized value, such as "2023-05-01".

[0080] -position: exact position in the document (page number, line number, coordinates).

[0081] -query_type: query type that produces the hit item (such as DateQuery).

[0082] -initial_confidence: initial confidence score.

[0083] Finally, each query class returns a list of all hit item objects of the class.

[0084] Taking the fund prospectus as an example, Figure 5 The processing procedure for realizing information extraction is given. As shown in the figure, Figure 5 The input is the classified and segmented chapters, and in this framework, all chapters are traversed to extract information, and different types of information are extracted by different information extractors, i.e., different Query classes, and in the figure, there are a date query class DataQuer, an expense query class ExpensesQuery, and a name query class NameQuery. In each class, a regular expression library is compiled, and then the text is scanned sentence by sentence to determine whether it matches the regular expression, the original text segment is extracted, context keyword verification is performed, if it is a confirmatory keyword, a high confidence label is given, otherwise a low confidence label is given, then the original text segment is subjected to data standardization, encapsulated into a hit object, and output, and finally a hit list is output, which contains the location, value and confidence in the original document.

[0085] In this embodiment, the analysis and extraction of key content adopt the strategy of "divide and conquer", and dedicated extractors are constructed for different information types, and combined with three technologies of high-performance regular expressions, context verification and data standardization, high coverage, high accuracy and high regularity are realized. The document processing method provided in this embodiment can realize the document classification and segmentation task alone, or can realize information extraction in combination with upstream and downstream tasks, the model performance is good, the model structure is easy to maintain and expand, and it is especially suitable for enterprise-level document processing, and can effectively improve the work efficiency of employees.

[0086] Correspondingly, the specification of the present disclosure also provides embodiments of a natural language-based document processing apparatus 600 and 600'. Figure 6 、 Figure 7 The schematic diagram of the document processing apparatus 600 and 600' provided in the embodiments of the present disclosure is shown.

[0087] As shown in the figure, Figure 6 The document processing apparatus 600 comprises a type identification module 610, a chapter matching module 620, a chapter identification module 630, and a chapter structuring module 640.

[0088] The type identification module 610 uses a pre-trained document identification model to identify the type of the original document.

[0089] The chapter matching module 620 is used for processing the text segment of the original document based on natural language technology, and quickly matching the belonging chapter of the text segment through rule matching.

[0090] The chapter identification module 630 is used for loading the corresponding chapter model according to the type of the document in the case of rule matching failure, and identifying the belonging chapter of the text segment based on the chapter model.

[0091] The chapter structuring module 640 is configured to generate a structured chapter list according to the chapter attribution results of all text segments of the original document.

[0092] After the document is processed at the granularity of the document level and the paragraph level, the document can be further processed at the granularity of the sentence level and the entity level. Therefore, the document processing apparatus 600' further includes a loading module 650, an information extraction module 660, and an encapsulation module 670, as shown in the following. Figure 7

[0093] The loading module 650 is configured to load a plurality of information extractors corresponding to the current document type according to the document type and the structured document paragraph.

[0094] The information extraction module 660 is configured to extract specific information by using the plurality of information extractors respectively.

[0095] The encapsulation module 670 is configured to encapsulate a hit item object according to the information extraction result.

[0096] The document processing apparatus provided by the embodiments of the present disclosure comprehensively utilizes machine learning prediction and rule matching to make a mixed decision when processing a new document, and uses a divide-and-conquer strategy when analyzing and extracting key content, and constructs a dedicated and optimized extractor for different information types. The intelligent document processing apparatus is easy to maintain and extend, has excellent document segmentation and information extraction performance, is particularly suitable for enterprise-level document processing, and can effectively improve the work efficiency of employees.

[0097] Based on the same inventive concept, the specification of the present disclosure also provides a computer program product for intelligent document processing, which contains a computer program that, when executed by a processor, causes the processor to implement various methods as described above.

[0098] The specific embodiments of the present disclosure are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0099] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the apparatus and computer program product embodiments are described more simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the part of the method embodiment. ​

[0100] The apparatus, computer program product and method provided by the embodiments of the present disclosure are corresponding, and therefore have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, they will not be described here.

[0101] The units or modules described in the embodiments of the present disclosure can be implemented in the form of software or in the form of programmable hardware. The described units or modules can also be arranged in a processor. In some cases, the name of the unit or module does not constitute a limitation on the unit or module itself.

[0102] The above description is merely preferred embodiments of the present disclosure and a description of the principles of the technology used. Those skilled in the art should understand that the scope of the application involved in the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or equivalent features without departing from the inventive concept. For example, the above features are replaced with similar technical features disclosed in the present disclosure (but not limited to) to form a technical solution.

Claims

1. A natural language based document processing method, characterized by, The method comprises: identifying the type of the original document using a pre-trained document recognition model; processing text segments of the original document based on natural language technology, and quickly matching the attribution chapter of the text segments through rule matching; in the case of rule matching failure, loading a corresponding chapter model according to the type of the document, and identifying the attribution chapter of the text segments based on the chapter model; generating a structured chapter list according to the attribution chapter results of all text segments of the original document; loading multiple information extractors corresponding to the current document type according to the document type and the structured document paragraphs; the information extractors are implemented through a query class, wherein multiple regular expressions for matching specific text are defined for specific information, and a list of confirmatory keywords and negative keywords is also included; obtaining specific text through regular expression matching of the information extractors; detecting the context of the current matched specific text, and verifying the reasonableness of the specific text based on the list of confirmatory keywords and negative keywords; when the context is verified to be reasonable, the current specific text is marked as a high-confidence hit item; encapsulating a hit item object according to the information extraction result.

2. The method of claim 1, wherein, The method further comprises, after identifying the attribution chapter of the text segments based on the chapter model: performing confidence prediction on the identification result, and taking the result exceeding a threshold as an acceptable attribution chapter.

3. The method of claim 1, wherein, The pre-trained document recognition model is a machine learning-based classifier, and during training, the training documents are converted into numerical feature vectors as input data based on TF-IDF technology, comprising: performing feature extraction and domain-specific keyword extraction on the training documents to construct a vocabulary; calculating the term frequency-inverse document frequency weight in the vocabulary; reducing the weight of common words and increasing the weight of domain keywords; generating a numerical feature vector according to the weight result.

4. The method of claim 1, wherein, The chapter model is built based on logistic regression and support vector machine, and a feature matrix for training is generated using the TF-IDF technology.

5. The method of claim 1, wherein, The method further comprises: performing data format standardization on the verified specific text to obtain standardized specific information.

6. The method of claim 5, wherein, The encapsulated hit item object comprises: the original text corresponding to the hit item, the standardized specific information, the location in the document, and the confidence score of the hit item.

7. A natural language based document processing apparatus, characterized by comprising: The method comprises: a type identification module for identifying the type of the original document using a pre-trained document recognition model; a chapter matching module for processing text segments of the original document based on natural language technology, and quickly matching the attribution chapter of the text segments through rule matching; a chapter recognition model for loading a corresponding chapter model according to the type of the document in the case of rule matching failure, and identifying the attribution chapter of the text segments based on the chapter model; a chapter structuring module for generating a structured chapter list according to the attribution chapter results of all text segments of the original document; a loading module for loading multiple information extractors corresponding to the current document type according to the document type and the structured document paragraphs; the information extractors are implemented through a query class, wherein multiple regular expressions for matching specific text are defined for specific information, and a list of confirmatory keywords and negative keywords is also included; an information extraction module for obtaining specific text through regular expression matching of the information extractors; detecting a context of the specific text currently matched, verifying rationality of the specific text based on a list of confirmative keywords and negative keywords; when the context is verified to be rational, the specific text currently is marked as a high-confidence hit item; a packaging module, configured to package a hit item object according to the information extraction result.

8. A computer program product, comprising a computer program which, when executed by a processor, causes the processor to implement the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Document title tree construction method and device, electronic equipment and storage medium

    CN111460083A

  • Key text information extraction method and device

    CN114510553A

  • Electronic file intelligent classification method and device based on deep learning

    CN118568263A