Document processing method and device and storage medium

By determining the document structure information and using the target model to output table content for multi-dimensional verification, the problem of low document risk identification accuracy in existing technologies is solved, and higher risk identification accuracy is achieved.

CN121921793APending Publication Date: 2026-04-24INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2025-12-31
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies, optical character recognition algorithms cannot accurately extract the table topology in document risk identification, and simple keyword matching is insufficient for risk identification, resulting in low accuracy in document risk identification.

Method used

By determining the document structure information, including the position information of table boxes and text boxes, the target model is used to output the table content, and multi-dimensional verification is performed to generate a risk report.

Benefits of technology

It improves the accuracy of document risk identification by accurately dividing tabular and text data, conducting multi-dimensional verification, and generating detailed risk reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921793A_ABST
    Figure CN121921793A_ABST
Patent Text Reader

Abstract

The invention discloses a document processing method and device and a storage medium. Relates to the field of artificial intelligence, and comprises: receiving a target document to be subjected to risk identification, and determining document structure information of the target document, the document structure information comprising table box position information and textbox position information; determining table data and text data in the target document according to the document structure information, and determining text content according to the text data; inputting the table data into a target model, and outputting table content corresponding to the table data by utilizing the target model; and performing multi-dimensional verification according to the text content and the table content to obtain a risk report for the target document. Through the document risk identification method and device, the problem that the accuracy of document risk identification is low in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more specifically, to a document processing method, apparatus, and storage medium. Background Technology

[0002] Document risk identification is a crucial part of risk control. Financial institutions' documents often contain a large amount of unstructured long text and feature a mix of text and images. The importance of extracting effective information from these documents for risk identification is becoming increasingly prominent.

[0003] However, related technologies rely on optical character recognition (OCR) algorithms to extract text from documents and use simple keyword matching to determine if there is any error in the text in order to identify risks. OCR algorithms simply extract and list text from tables, which can lead to missing table topological structures in the document, and simple keyword matching is also insufficient for accurate risk identification.

[0004] There is currently no effective solution to the problem of low accuracy in document risk identification in related technologies. Summary of the Invention

[0005] The main objective of this application is to provide a document processing method, apparatus, and storage medium to address the problem of low accuracy in document risk identification in related technologies.

[0006] To achieve the above objectives, according to one aspect of this application, a document processing method is provided. The method includes: receiving a target document to be risk-identified, and determining the document structure information of the target document, wherein the document structure information includes table box position information and text box position information; determining table data and text data in the target document based on the document structure information, and determining text content based on the text data; inputting the table data into a target model, and using the target model to output the table content corresponding to the table data; performing multi-dimensional verification based on the text content and table content to obtain a risk report for the target document.

[0007] Furthermore, determining the document structure information of the target document includes: converting the target document into a format to obtain the target image corresponding to the target document; determining multiple line information in the target image through a contour detection algorithm, wherein the line information includes vertical line information and horizontal line information; determining multiple rectangle information based on the multiple line information, and classifying the multiple rectangle information to obtain table box position information and text box position information; and determining the document structure information based on the table box position information and text box position information.

[0008] Furthermore, determining the table data and text data in the target document based on the document structure information includes: converting the target document to obtain the target image corresponding to the target document; cropping the target image based on the table box position information to obtain the table data; and cropping the target image based on the text box position information to obtain the text data.

[0009] Furthermore, the table content corresponding to the table data output by the target model includes: calling the program interface of the target model based on the table data to output the initial content; verifying the initial content based on the preset identity validator, wherein the preset identity validator is used to represent the identity relationship between different numerical contents; if the verification result is that the verification passes, the initial content is determined as the table content corresponding to the table data.

[0010] Furthermore, based on the text content and table content, multi-dimensional verification is performed to obtain a risk report for the target document, including: generating a target knowledge graph based on the text content and using the target knowledge graph to perform path search to obtain path risk results; performing consistency verification on the text content and table content to obtain consistency risk results; identifying risk content in the target document that corresponds to the path risk results and consistency risk results based on the document structure information; and generating a risk report based on the path risk results, consistency risk results, and risk content.

[0011] Furthermore, consistency checks are performed on the text content and table content to obtain consistency risk results, including: slicing the text content based on paragraph headings to obtain multiple text sub-contents and the topic type of each text sub-content; determining multiple table sub-contents based on the table content, and determining the row and column information corresponding to each table sub-content based on the table frame position information, where the row and column information includes row fields and column fields; determining the correspondence between table sub-contents and text sub-contents based on the row and column information and topic type; and performing consistency checks on each pair of corresponding table sub-contents and text sub-contents to obtain consistency risk results.

[0012] To achieve the above objectives, according to another aspect of this application, a document processing apparatus is provided. The apparatus includes: a structure determination unit, configured to receive a target document to be risk-identified and determine the document structure information of the target document, wherein the document structure information includes table box position information and text box position information; a first content unit, configured to determine table data and text data in the target document based on the document structure information, and determine text content based on the text data; a second content unit, configured to input the table data into a target model and output the table content corresponding to the table data using the target model; and a content verification unit, configured to perform multi-dimensional verification based on the text content and table content to obtain a risk report for the target document.

[0013] Furthermore, the structure determination unit includes: a format conversion module, used to convert the format of the target document to obtain the target image corresponding to the target document; a line determination module, used to determine multiple line information in the target image through a contour detection algorithm, wherein the line information includes vertical line information and horizontal line information; a rectangle classification module, used to determine multiple rectangle information based on multiple line information, and classify the multiple rectangle information to obtain table box position information and text box position information; and an information determination module, used to determine document structure information based on table box position information and text box position information.

[0014] Furthermore, the first content unit includes: a format conversion module, used to convert the format of the target document to obtain the target image corresponding to the target document; a table cropping module, used to crop the target image according to the table box position information to obtain table data; and a text cropping module, used to crop the target image according to the text box position information to obtain text data.

[0015] Furthermore, the second content unit includes: an interface calling module, used to call the program interface of the target model based on the table data and output the initial content; a content verification module, used to verify the initial content based on a preset identity validator, wherein the preset identity validator is used to represent the identity relationship between different numerical contents; and an initial determination module, used to determine the initial content as the table content corresponding to the table data if the verification result is that the verification is passed.

[0016] Furthermore, the content verification unit includes: a graph search module, used to generate a target knowledge graph based on the text content, and use the target knowledge graph to perform path search to obtain path risk results; a consistency verification module, used to perform consistency verification on the text content and table content to obtain consistency risk results; a risk content determination module, used to determine the risk content in the target document that is consistent with the path risk results and consistency risk results based on the document structure information; and a report generation module, used to generate a risk report based on the path risk results, consistency risk results, and risk content.

[0017] Furthermore, the consistency verification module includes: a content slicing submodule, used to slice the text content according to the paragraph headings in the text content to obtain multiple text sub-contents and the topic type of each text sub-content; a row and column information determination submodule, used to determine multiple table sub-contents according to the table content, and to determine the row and column information corresponding to each table sub-content according to the table frame position information, wherein the row and column information includes row fields and column fields; a correspondence determination submodule, used to determine the correspondence between table sub-contents and text sub-contents according to the row and column information and the topic type; and a sub-content verification submodule, used to perform consistency verification based on each pair of corresponding table sub-contents and text sub-contents to obtain the consistency risk result.

[0018] According to another aspect of this application, a computer-readable storage medium is provided, which includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform any document processing method.

[0019] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a processing method for executing any type of document.

[0020] According to another aspect of this application, a computer program product is provided, including computer instructions, which, when executed by a processor, implement the steps of a document processing method according to any one of the above.

[0021] In this embodiment, by receiving the target document to be risk identified and determining its document structure information, including table box position information and text box position information, the table data and text data in the target document are determined based on the document structure information, and the text content is determined based on the text data. The table data is input into the target model, and the target model outputs the table content corresponding to the table data. Multi-dimensional verification is performed based on the text content and table content to obtain a risk report for the target document, thus solving the technical problem of low accuracy in document risk identification in the prior art. Attached Figure Description

[0022] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0023] Figure 1 A hardware structure block diagram of a computer terminal for implementing a document processing method is shown.

[0024] Figure 2 This is a flowchart of a document processing method provided according to an embodiment of this application;

[0025] Figure 3 This is a schematic diagram of a document processing apparatus provided according to an embodiment of this application;

[0026] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding access points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding access points to choose to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.

[0030] Example 1

[0031] According to an embodiment of this application, a method embodiment for processing documents is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0032] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1A hardware structure block diagram of a computer terminal (or mobile device) for implementing a document processing method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0033] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0034] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the document processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the document processing method described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0035] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0036] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0037] Under the aforementioned operating environment, this application provides the following: Figure 2 The document processing method shown. Figure 2 This is a flowchart of a document processing method according to Embodiment 1 of this application.

[0038] Step S201: Receive the target document to be identified for risk identification and determine the document structure information of the target document.

[0039] It should be noted that the document structure information includes table box position information and text box position information.

[0040] Optionally, the target document for risk identification can be a financial analysis report or other document from the target financial institution, including tables and text. The target document can be converted into a target image, and then a contour detection algorithm can be used to detect line information in the target image, thereby determining the position information of table boxes and text boxes.

[0041] For example, a page in the target document contains a 4x5 table, which is a total of 20 sub-tables, and a text box containing 500 characters of text is placed below the table. The table box position information is the coordinate range of each sub-table, and the text box position information is the coordinate range of the text box.

[0042] Step S202: Determine the table data and text data in the target document based on the document structure information, and determine the text content based on the text data.

[0043] Optionally, after obtaining the document structure information, the target image converted from the target document can be cropped using the table box position information and text box position information to obtain table data (e.g., a table image within a 4×5 table area) and text data (e.g., a text image within a text box area). The text content corresponding to the text data can be identified using an open-source optical character recognition algorithm.

[0044] Step S203: Input the tabular data into the target model, and use the target model to output the tabular content corresponding to the tabular data.

[0045] Optionally, the target model can be a large language model, which is used to obtain the table content in the tabular data. For example, the target model can be used to identify the table content corresponding to the tabular data by calling the interface of an open-source large language model and using preset prompts. The preset prompts can be based on thought chains, for example, the preset prompts could be "first output the understanding of the table data, for example, detect table xx containing three years of data, then output the meaning of each specific value in the table data, for example, the value of data A in December is 2000".

[0046] Step S204: Perform multi-dimensional verification based on the text content and table content to obtain a risk report for the target document.

[0047] Optionally, multi-dimensional verification may include verification of the target knowledge graph and consistency verification between table content and text content. The target knowledge graph may be a knowledge graph generated based on the text content. Consistency verification between table content and text content may include verification of the mapping between numerical and semantic spaces, verification of data reference consistency, and verification of temporal logic.

[0048] In summary, by determining the document structure information of the target document, the tabular data and text data were accurately divided. The target model was used to output the table content, and then multi-dimensional verification was performed based on the table content and text content, which improved the accuracy of risk identification of the document.

[0049] To improve the accuracy of risk identification of documents, optionally, determining the document structure information of the target document includes: converting the target document into a format to obtain a target image corresponding to the target document; determining multiple line information in the target image through a contour detection algorithm, wherein the line information includes vertical line information and horizontal line information; determining multiple rectangle information based on the multiple line information, and classifying the multiple rectangle information to obtain table box position information and text box position information; and determining the document structure information based on the table box position information and text box position information.

[0050] Optionally, the target document can be converted into an image format to obtain the corresponding target image, and the target image can be preprocessed (e.g., noise reduction, contrast enhancement, etc.) to improve the accuracy of the contour detection algorithm. The target function of the contour detection algorithm (e.g., the `cv2.Canny` function) can be obtained by calling the `opencv` library in the Python programming language, and the target function can be used to determine multiple line information in the target image (e.g., vertical line information and horizontal line information; vertical line information can be the coordinates of each vertical line, and horizontal line information can be the coordinates of each horizontal line). Based on the combination of these multiple line information, multiple rectangular bounding boxes are constructed, and the area of ​​each bounding box is obtained. The rectangular area is compared with a preset area threshold. If the rectangular area is greater than the preset area threshold, the rectangular bounding box information is text box position information; if the rectangular area is less than the preset area threshold, the rectangular bounding box information is table box position information (here, the table box position information is the finest granular table box position information; for example, a 4×5 table box has 20 sub-tables, and the table box position information of each sub-table can be determined through the above classification). By combining the table frame position information and text box position information of the above multiple sub-tables, the document structure information is obtained.

[0051] In summary, by performing contour detection on the target image obtained from the conversion of the target document, multiple line information is obtained. These line information are then combined to obtain multiple rectangle information. By classifying the rectangle information, table box position information and text box position information are obtained, thus accurately dividing the table area and text area and precisely obtaining the specific position of each sub-table, thereby improving the accuracy of risk identification of the document.

[0052] To improve the accuracy of risk identification of documents, optionally, determining the table data and text data in the target document based on the document structure information includes: converting the target document to obtain the target image corresponding to the target document; cropping the target image based on the table box position information to obtain the table data; and cropping the target image based on the text box position information to obtain the text data.

[0053] Optionally, the target document can be converted into an image format to obtain corresponding target images. There can be multiple target images. For each target image, the coordinates of the sub-tables within the target image can be determined based on the table box position information, and the coordinate range of the table data within the target image can be determined. Then, the icon image can be cropped based on the coordinate range of the table data to obtain the table data (i.e., the image containing the table). Similarly, cropping the target image based on the text box position information can yield the text data (i.e., the image containing the text).

[0054] In summary, by converting the target document's format, the corresponding target image is obtained; by cropping the target image based on the table box position information, table data is obtained; and by cropping the target image based on the text box position information, text data is obtained, thus improving the accuracy of risk identification for documents.

[0055] To improve the accuracy of risk identification of documents, optionally, the table content corresponding to the table data output by the target model includes: calling the program interface of the target model based on the table data to output the initial content; verifying the initial content based on a preset identity validator, wherein the preset identity validator is used to represent the identity relationship between different numerical contents; and determining the initial content as the table content corresponding to the table data if the verification result is that the verification passes.

[0056] Optionally, the program interface of the target model (e.g., an open-source large language model) can be called, and the extracted tabular data (i.e., an image containing tables) can be input. The target model can then identify the corresponding table content using preset prompts. These preset prompts can be based on thought chains; for example, the preset prompt could be "First output the understanding of the table data, e.g., 'Detected table xx containing three years of data,' then output the meaning of each specific value in the table data, e.g., 'The value of data A in December is 2000.'" The understanding of the changed table data and the meaning of each specific value are used as the initial content. A preset identity validator can also be used to verify the initial content. This preset identity validator can include at least one accounting identity, e.g., "Assets = Liabilities + Owner's Equity" or "Operating Revenue - Operating Costs = Gross Profit." If the preset identity validator passes verification, the initial content is determined to be the table content after extracting the table data. If the verification result of the preset identity validator is that the verification fails, the verification result is sent back to the target model, and the target model is used to re-output new initial content until the verification result of the initial content is that the verification passes.

[0057] In summary, the initial content was obtained by calling the target model's program interface, and the initial content was verified according to a preset identity validator. The table content was obtained only after the verification was successful, thus avoiding the illusion problem of the target model, improving the accuracy of the table content, and thereby improving the accuracy of risk identification of the document.

[0058] To improve the accuracy of risk identification for documents, optionally, multi-dimensional verification can be performed based on text and table content to obtain a risk report for the target document, including: generating a target knowledge graph based on the text content and using the target knowledge graph to perform path search to obtain path risk results; performing consistency verification on the text and table content to obtain consistency risk results; identifying risk content in the target document that corresponds to the path risk results and consistency risk results based on the document structure information; and generating a risk report based on the path risk results, consistency risk results, and risk content.

[0059] Optionally, a target knowledge graph can be constructed based on the extracted text content. This graph uses entities (such as companies, individuals, and events) as nodes and relationships between entities (such as equity relationships, transaction relationships, and legal proceedings) as edges, forming a network structure. Graph search algorithms, such as depth-first search or breadth-first search, can then be used to perform path searches, identifying risk transmission paths not directly stated in the text content (e.g., abnormal fund flows, a guarantor being a downstream customer of the borrower, and that customer being involved in pending litigation), and defining these risk transmission paths as path risk results. Consistency checks can also be performed on the text and table content. These checks can include numerical-semantic space mapping checks, data reference consistency checks, and temporal logic checks, resulting in consistency risk results. The content locations corresponding to the path risk results and consistency risk results are determined based on document structure information, and these locations are identified as risk content. The content locations can also be highlighted in the target document. Finally, by combining the path risk results, consistency risk results, and risk content, a risk report is generated.

[0060] In summary, by generating a target knowledge graph based on text content and using the target knowledge graph for path search, path risk results are obtained; consistency verification is performed on the text content and table content to obtain consistency risk results; based on document structure information, risk content in the target document that corresponds to the path risk results and consistency risk results is identified; and a risk report is generated based on the path risk results, consistency risk results, and risk content. This multi-dimensional verification improves the accuracy of risk identification for documents.

[0061] To improve the accuracy of risk identification in documents, optionally, consistency checks are performed on text content and table content to obtain consistency risk results. This includes: slicing the text content based on paragraph headings to obtain multiple text sub-contents and the topic type of each text sub-content; determining multiple table sub-contents based on the table content, and determining the row and column information corresponding to each table sub-content based on the table frame position information, wherein the row and column information includes row fields and column fields; determining the correspondence between table sub-contents and text sub-contents based on the row and column information and topic type; and performing consistency checks on each pair of corresponding table sub-contents and text sub-contents to obtain consistency risk results.

[0062] Optionally, the text content in the target document includes multiple text blocks. Each text block includes a paragraph title and at least one paragraph corresponding to that title. The paragraph title can be used as a dividing criterion to slice the text content, thereby dividing it into multiple text blocks. Each text block is defined as a text sub-content, and the paragraph title of that text block is defined as the topic type of the text sub-content. Table content can be segmented to obtain multiple table sub-contents. Each table sub-content can be a numerical value (e.g., 100) or a field (e.g., ascending). The field can be a row field (the field of the first column of each row in the sub-table), a column field (the field of the first row of each column in the sub-table), or a content field (a field that is not in the first row or column). The coordinates of multiple sub-tables can be determined based on the table frame position information. The target image is then segmented to obtain the sub-table image corresponding to each sub-table. An optical character recognition (OCR) algorithm is used to determine the content information in each sub-table image. This content information is matched with the table sub-content (e.g., text similarity calculation) to determine the coordinates of the content information corresponding to each sub-table content, thereby determining the row and column information corresponding to each sub-table content (e.g., row field for 500 is 2021, column field is operating cost). Since row and column information represents the data type of the table sub-content, and topic type (i.e., paragraph title) represents the data type of the text sub-content, the correspondence between table sub-content and text sub-content can be determined by matching industry information with topic type (e.g., row field for 2021, column field for operating cost, corresponding to the paragraph title "2021 Business Situation" of the 5th text sub-content; a cosine similarity greater than 0.8 indicates a match). (e.g., the table text content in row 3, column 4 corresponds to the 5th text text content). Consistency checks are performed on each pair of corresponding table sub-contents and text sub-contents. These checks can be based on numerical-semantic space mapping (e.g., vectorizing the table sub-contents and row / column information to obtain a first semantic vector, vectorizing the text sub-contents to obtain a second semantic vector, and calculating their cosine similarity; if it is less than 0.5, there is a risk of discrepancies between the text description and the table data), data reference consistency checks (e.g., comparing the numerical units of the row / column information in the table sub-contents with those in the text sub-contents; if they are different, there is a risk of data entry errors), and temporal logic checks (e.g., checking whether the time information in the text sub-contents matches the time information in the row / column information of the table sub-contents; if they do not match, there is a risk of temporal mismatch). The consistency risk result is then determined based on the results of these three checks.

[0063] In summary, by slicing the text content based on paragraph headings, multiple text sub-contents and their respective topic types are obtained; multiple table sub-contents are determined based on the table content, and the row and column information corresponding to each table sub-content is determined based on the table frame position information, where row and column information includes row fields and column fields; the correspondence between table sub-contents and text sub-contents is determined based on the row and column information and topic types; and consistency checks are performed on each pair of corresponding table sub-contents and text sub-contents to obtain consistency risk results, thus improving the accuracy of risk identification for documents.

[0064] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0065] Example 2

[0066] This application also provides a document processing apparatus. It should be noted that the document processing apparatus of this application can be used to execute the document processing method provided in this application. The document processing apparatus provided in this application will be described below.

[0067] According to embodiments of this application, an apparatus for implementing the above-described document processing method is also provided, such as... Figure 3 As shown, the device includes:

[0068] The structure determination unit 301 is used to receive the target document to be identified and determine the document structure information of the target document, wherein the document structure information includes table box position information and text box position information.

[0069] The first content unit 302 is used to determine the table data and text data in the target document based on the document structure information, and to determine the text content based on the text data.

[0070] The second content unit 303 is used to input tabular data into the target model and use the target model to output the tabular content corresponding to the tabular data.

[0071] Content verification unit 304 is used to perform multi-dimensional verification based on text content and table content to obtain a risk report for the target document.

[0072] The document processing apparatus provided in this application embodiment receives a target document to be risk-identified through a structure determination unit 301 and determines the document structure information of the target document, wherein the document structure information includes table box position information and text box position information. A first content unit 302 determines the table data and text data in the target document based on the document structure information, and determines the text content based on the text data. A second content unit 303 inputs the table data into a target model, and uses the target model to output the table content corresponding to the table data. A content verification unit 304 performs multi-dimensional verification based on the text content and table content to obtain a risk report for the target document, thus solving the problem of low accuracy in document risk identification in related technologies. This improves the accuracy of document risk identification.

[0073] Optionally, in the document processing apparatus provided in this application embodiment, the structure determination unit 301 includes: a format conversion module, used to convert the format of the target document to obtain a target image corresponding to the target document; a line determination module, used to determine multiple line information in the target image through a contour detection algorithm, wherein the line information includes vertical line information and horizontal line information; a rectangle classification module, used to determine multiple rectangle information based on the multiple line information, and classify the multiple rectangle information to obtain table box position information and text box position information; and an information determination module, used to determine document structure information based on the table box position information and text box position information.

[0074] Optionally, in the document processing apparatus provided in this application embodiment, the first content unit 302 includes: a format conversion module, used to convert the format of the target document to obtain a target image corresponding to the target document; a table cropping module, used to crop the target image according to the table frame position information to obtain table data; and a text cropping module, used to crop the target image according to the text frame position information to obtain text data.

[0075] Optionally, in the document processing apparatus provided in this application embodiment, the second content unit 303 includes: an interface calling module, used to call the program interface of the target model according to the table data and output the initial content; a content verification module, used to verify the initial content according to a preset identity verifier, wherein the preset identity verifier is used to represent the identity relationship between different numerical contents; and an initial determination module, used to determine the initial content as the table content corresponding to the table data if the verification result is that the verification is passed.

[0076] Optionally, in the document processing apparatus provided in this application embodiment, the content verification unit 304 includes: a graph search module, used to generate a target knowledge graph based on the text content, and use the target knowledge graph to perform path search to obtain path risk results; a consistency verification module, used to perform consistency verification on the text content and table content to obtain consistency risk results; a risk content determination module, used to determine the risk content in the target document that is consistent with the path risk results and consistency risk results based on the document structure information; and a report generation module, used to generate a risk report based on the path risk results, consistency risk results, and risk content.

[0077] Optionally, in the document processing apparatus provided in this application embodiment, the consistency verification module includes: a content slicing submodule, used to slice the text content according to the paragraph headings in the text content to obtain multiple text sub-contents and the topic type of each text sub-content; a row and column information determination submodule, used to determine multiple table sub-contents according to the table content, and to determine the row and column information corresponding to each table sub-content according to the table frame position information, wherein the row and column information includes row fields and column fields; a correspondence determination submodule, used to determine the correspondence between table sub-contents and text sub-contents according to the row and column information and the topic type; and a sub-content verification submodule, used to perform consistency verification based on each pair of mutually corresponding table sub-contents and text sub-contents to obtain a consistency risk result.

[0078] It should be noted that the above-mentioned structure determination unit 301, first content unit 302, second content unit 303, and content verification unit 304 correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above-mentioned modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above-mentioned modules can also be part of the device and can run in the computer terminal 10 provided in Embodiment 1.

[0079] Example 3

[0080] Embodiments of this application may provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) Processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0081] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0082] The processor can access information and applications stored in the memory via a transmission device to perform the following steps: receiving the target document to be risk identified and determining the document structure information of the target document, including table box position information and text box position information; determining the table data and text data in the target document based on the document structure information, and determining the text content based on the text data; inputting the table data into the target model and using the target model to output the table content corresponding to the table data; performing multi-dimensional verification based on the text content and table content to obtain a risk report for the target document.

[0083] The processor can also access information and applications stored in the memory via a transmission device to perform the following steps: convert the target document into a format to obtain a target image corresponding to the target document; determine multiple line information in the target image using a contour detection algorithm, wherein the line information includes vertical line information and horizontal line information; determine multiple rectangle information based on the multiple line information, and classify the multiple rectangle information to obtain table box position information and text box position information; determine document structure information based on the table box position information and text box position information.

[0084] The processor can also access information and applications stored in the memory via a transmission device to perform the following steps: convert the target document to a format to obtain a target image corresponding to the target document; crop the target image based on the table box position information to obtain table data; and crop the target image based on the text box position information to obtain text data.

[0085] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: call the program interface of the target model according to the table data and output the initial content; verify the initial content according to the preset identity verifier, wherein the preset identity verifier is used to represent the identity relationship between different numerical contents; if the verification result is that the verification is passed, the initial content is determined to be the table content corresponding to the table data.

[0086] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: generate a target knowledge graph based on the text content, and use the target knowledge graph to perform path search to obtain path risk results; perform consistency verification on the text content and table content to obtain consistency risk results; determine the risk content in the target document that is related to the path risk results and consistency risk results based on the document structure information; and generate a risk report based on the path risk results, consistency risk results, and risk content.

[0087] The processor can also access information and applications stored in the memory via a transmission device to perform the following steps: slice the text content according to the paragraph headings in the text content to obtain multiple text sub-contents and the topic type of each text sub-content; determine multiple table sub-contents according to the table content, and determine the row and column information corresponding to each table sub-content according to the table frame position information, wherein the row and column information includes row fields and column fields; determine the correspondence between table sub-contents and text sub-contents according to the row and column information and the topic type; perform consistency verification based on each pair of corresponding table sub-contents and text sub-contents to obtain the consistency risk result.

[0088] This application provides a document processing solution. It receives a target document for risk identification and determines its document structure information, including table frame and text box position information. Based on the document structure information, it determines the table data and text data within the target document and the text content based on the text data. The table data is input into a target model, which then outputs the corresponding table content. Multi-dimensional verification is performed based on the text and table content to obtain a risk report for the target document. This solution addresses the technical problem of low accuracy in document risk identification in existing technologies.

[0089] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.

[0090] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0091] Example 4

[0092] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the document processing method provided in Embodiment 1.

[0093] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0094] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: receiving a target document to be risk identified, and determining the document structure information of the target document, wherein the document structure information includes table box position information and text box position information; determining table data and text data in the target document based on the document structure information, and determining text content based on the text data; inputting the table data into a target model, and using the target model to output the table content corresponding to the table data; performing multi-dimensional verification based on the text content and table content to obtain a risk report for the target document.

[0095] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: converting the target document into a format to obtain a target image corresponding to the target document; determining multiple line information in the target image using a contour detection algorithm, wherein the line information includes vertical line information and horizontal line information; determining multiple rectangle information based on the multiple line information, and classifying the multiple rectangle information to obtain table box position information and text box position information; and determining document structure information based on the table box position information and text box position information.

[0096] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: converting the format of the target document to obtain a target image corresponding to the target document; cropping the target image according to the table box position information to obtain table data; and cropping the target image according to the text box position information to obtain text data.

[0097] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: calling the program interface of the target model based on the table data to output initial content; verifying the initial content based on a preset identity verifier, wherein the preset identity verifier is used to represent the identity relationship between different numerical contents; and determining the initial content as the table content corresponding to the table data if the verification result is that the verification is passed.

[0098] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: generating a target knowledge graph based on the text content, and using the target knowledge graph to perform path search to obtain path risk results; performing consistency verification on the text content and table content to obtain consistency risk results; determining risk content in the target document that is consistent with the path risk results and consistency risk results based on the document structure information; and generating a risk report based on the path risk results, consistency risk results, and risk content.

[0099] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: slicing the text content according to paragraph headings in the text content to obtain multiple text sub-contents and the topic type of each text sub-content; determining multiple table sub-contents according to the table content, and determining the row and column information corresponding to each table sub-content according to the table frame position information, wherein the row and column information includes row fields and column fields; determining the correspondence between table sub-contents and text sub-contents according to the row and column information and the topic type; and performing consistency verification based on each pair of corresponding table sub-contents and text sub-contents to obtain a consistency risk result.

[0100] This application also provides a computer program product, which, when executed on a data processing device, is adapted to perform document processing method steps.

[0101] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0102] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0103] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0104] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0105] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0106] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0107] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A document processing method, characterized in that, include: Receive the target document to be identified for risk identification, and determine the document structure information of the target document, wherein the document structure information includes table box position information and text box position information; Based on the document structure information, determine the table data and text data in the target document, and based on the text data, determine the text content; Input the table data into the target model, and use the target model to output the table content corresponding to the table data; Based on the text content and the table content, a multi-dimensional verification is performed to obtain a risk report for the target document.

2. The method according to claim 1, characterized in that, Determining the document structure information of the target document includes: The target document is converted to a different format to obtain the target image corresponding to the target document. Multiple line information in the target image is determined by a contour detection algorithm, wherein the line information includes vertical line information and horizontal line information; Multiple rectangle information is determined based on the multiple line information, and the multiple rectangle information is classified to obtain the table box position information and the text box position information; The document structure information is determined based on the position information of the table boxes and the position information of the text boxes.

3. The method according to claim 1, characterized in that, Determining the table data and text data in the target document based on the document structure information includes: The target document is converted to a different format to obtain the target image corresponding to the target document. The target image is cropped based on the table frame position information to obtain the table data; The target image is cropped based on the text box position information to obtain the text data.

4. The method according to claim 1, characterized in that, The table content corresponding to the table data output using the target model includes: Based on the data in the table, the program interface of the target model is called to output the initial content; The initial content is verified according to a preset identity verifier, wherein the preset identity verifier is used to represent the identity relationship between different numerical contents; If the verification result is successful, the initial content will be determined as the table content corresponding to the table data.

5. The method according to claim 1, characterized in that, Based on the text content and the table content, a multi-dimensional verification is performed to obtain a risk report for the target document, including: A target knowledge graph is generated based on the text content, and the target knowledge graph is used to perform path search to obtain path risk results; A consistency check is performed on the text content and the table content to obtain a consistency risk result. Based on the document structure information, determine the risk content in the target document that corresponds to the path risk result and the consistency risk result; The risk report is generated based on the path risk results, the consistency risk results, and the risk content.

6. The method according to claim 5, characterized in that, The consistency check of the text content and the table content yields the following consistency risk results: The text content is sliced ​​according to the paragraph headings in the text content to obtain multiple text sub-contents and the topic type of each text sub-content; Multiple table sub-contents are determined based on the table content, and the row and column information corresponding to each table sub-content is determined based on the table frame position information, wherein the row and column information includes row fields and column fields; The correspondence between the table sub-contents and the text sub-contents is determined based on the row and column information and the topic type; Consistency checks are performed on each pair of corresponding table sub-contents and text sub-contents to obtain the consistency risk result.

7. A document processing apparatus, characterized in that, include: A structure determination unit is used to receive a target document to be identified for risk identification and determine the document structure information of the target document, wherein the document structure information includes table box position information and text box position information; The first content unit is used to determine the table data and text data in the target document based on the document structure information, and to determine the text content based on the text data; The second content unit is used to input the table data into the target model and use the target model to output the table content corresponding to the table data. The content verification unit is used to perform multi-dimensional verification based on the text content and the table content to obtain a risk report for the target document.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the document processing method according to any one of claims 1 to 6.

9. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the document processing method according to any one of claims 1 to 6.

10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the document processing method according to any one of claims 1 to 6.