Rule engine-based bank industry electronic bill intelligent auditing method
Through the intelligent audit method based on the rules engine, document receipts are pre-processed, layout analysis and text recognition, and combined with the Drools rule engine for automated audit, the document processing problems of different layout layouts are solved, and an efficient and accurate automated process is achieved.
Patent Information
- Application Number
- CN202510481688.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-18
AI Technical Summary
It is difficult for the existing technology to intelligently process documents and receipts with different layouts, and cannot flexibly configure audit rules and processes. Traditional manual audits are inefficient and insufficient accuracy.
Intelligent auditing methods based on rules engines are adopted, including image preprocessing, layout analysis, text recognition and semantic entity extraction, and automated auditing is used using Drools rules engine, supplemented by manual fine verification.
It has realized the standardization, automation and intelligence of document review, shortened the audit cycle, reduced labor costs, and improved audit efficiency and accuracy.
Smart Images

Figure CN120340040A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent review of electronic bills, and particularly to an intelligent review method for banking electronic bills based on a rule engine. Background Art
[0002] Since international settlement operations are often accompanied by process handling with a long cycle, it is difficult to achieve "simultaneous delivery of goods and payment" immediately. Therefore, it is necessary to use documents to transfer transaction data, transfer and settle creditor's rights and debts, etc. At the same time, a wide range of trade categories and settlement objects have brought a huge amount of documentary bills and complex styles. How to reliably and efficiently review and process documents, and at the same time make limited information release greater value, tests the wisdom and ability of the bank's technology department.
[0003] In this context, the documentary bill center is gradually moving from the budding stage of centralized unified management and standardized scale processing to the breakthrough exploration stage of building a digital documentary bill talent echelon and intelligent human-machine linkage verification. With the support of advanced technology products and basic capabilities, it transcends the functional scope of traditional documentary bill centers and radiates the influence of technological innovation in the financial field to a wider range of business products and bank services to meet the continuously expanding market demand and complex and changeable international situation.
[0004] Existing patents mainly focus on single processes such as bill OCR recognition and information extraction, lacking a coherent process from bill recognition, image detection to layout recognition and rule review. It is difficult to intelligently process documentary bills with different layout arrangements, and it is impossible to flexibly configure review rules and review processes. Traditional manual review methods already have many deficiencies in terms of review efficiency, accuracy, and flexibility.
[0005] Therefore, it is necessary to provide an intelligent review method for banking electronic bills based on a rule engine to standardize, automate, and intelligentize the existing documentary bill review and processing process. Summary of the Invention
[0006] The purpose of the present invention is to provide an intelligent review method for banking electronic bills based on a rule engine to standardize, automate, and intelligentize the existing documentary bill review and processing process, while continuously improving the overall operation efficiency of the institution while simplifying the operation process of back-office business personnel.
[0007] To solve the problems existing in the prior art, the present invention provides an intelligent review method for banking electronic bills based on a rule engine, including the following steps: S1: Gray-scale the documentary bill image so that each pixel in the documentary bill image is converted to be represented by a brightness value from 0 to 255; S2: Denoise the documentary bill image; S3: Use the Canny edge detection operator to obtain the contour of the document image; S4: Use the Radon transform method to restore the document image. The calculation method of the Radon transform method is as follows: where, is the pixel gray value at the coordinate position of the document image, is the area element in the double integral, is at the angle and the distance where the Radon transform value is located, is the Dirac generalized function; S5: Use the LayoutLM-v1 model to identify and classify the elements in the layout of the document image; S6: Use the Faster R-CNN algorithm for text recognition and extraction, complete the semantic entity recognition and relationship extraction tasks based on the multi-modal DeepSeek-VL model, and organize the structured key-value pair data to extract the key information in the document image; S7: Use the Drools rule engine to audit the document image.
[0008] Optionally, in the intelligent audit method for banking electronic bills based on the rule engine, in S1: Use the maximum value method, weighted average method or Gamma correction method for grayscale processing.
[0009] Optionally, in the intelligent audit method for banking electronic bills based on the rule engine, The maximum value method means selecting the maximum value of the components from the document image as the gray value; The calculation method of the weighted average method is as follows: where, represents the gray value obtained by calculation of the pixel at the coordinate position in the document image, , and respectively represent the original pixel values of the corresponding RGB three channels at the coordinate position in the document image, is any coordinate position in the document image, , and are the corresponding weight values of the three channels; The Gamma correction method is to perform nonlinear transformation on the gray value of the document image, adjust the contrast and brightness of the document image, and perform grayscale processing.
[0010] Optionally, in the intelligent review method of banking e-bills based on a rule engine, in S2: Gaussian filtering, median filtering, or mean filtering is used for noise reduction processing.
[0011] Optionally, in the intelligent review method of banking e-bills based on a rule engine, the formula for noise reduction processing using Gaussian filtering is as follows: Where, represents the value obtained after Gaussian filtering noise reduction processing for the pixel at the coordinate position in the document image, is any coordinate position in the document image, represents the standard deviation of the Gaussian distribution.
[0012] Optionally, in the intelligent review method of banking e-bills based on a rule engine, in S5: The LayoutLM-v1 model marks different element category regions with different colors. Different element categories include titles, texts, lists, and tables, and outputs the content of regions of the same element category to the same array.
[0013] Optionally, in the intelligent review method of banking e-bills based on a rule engine, the TableGPT2 model is used to structurally extract table data.
[0014] Optionally, in the intelligent review method of banking e-bills based on a rule engine, after S6 and before S7, the following steps are further included: The key information is cleaned through regular matching and then sent to the Drools rule engine for business review.
[0015] Optionally, in the intelligent review method of banking e-bills based on a rule engine, the documents are divided into electronic documents and paper documents. The paper documents are obtained as color document images through camera shooting or scanner scanning.
[0016] Optionally, in the intelligent review method of banking e-bills based on a rule engine, for the document image directly generated by the report engine, the following steps are further included: performing different color channel processing on the document image, separating the background and base plate of the document image under overlapping backgrounds or complex base plates, and / or extracting the seal.
[0017] Compared with the prior art, the present invention has the following advantages: (1) The present invention hands over the processed document image to the Drools rule engine for primary review, and realizes the automated process of document review with the help of timed batch task scheduling. Supplementary manual fine verification of some rough screening results is carried out to achieve human-machine collaborative linkage, thereby shortening the overall review cycle and enabling data to have efficient driving force.
[0018] (2) The present invention solves the problems of low processing efficiency, heavy workload, high labor costs and expenses caused by manual intervention and manual review required by traditional bill review technologies, reduces the processing costs of institutional document business, better meets the business needs of modern enterprises and institutions, standardizes, automates and intelligentizes the existing document review and processing processes, and continuously improves the overall operation efficiency of institutions while simplifying the operation process of back-office business personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of intelligent review provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of edge detection effect provided by an embodiment of the present invention; Figure 3 It is a schematic diagram of skew correction effect provided by an embodiment of the present invention; Figure 4 It is a schematic diagram of seal separation effect provided by an embodiment of the present invention; Figure 5 It is a schematic diagram of key information extraction effect provided by an embodiment of the present invention; Figure 6 It is a schematic diagram of the working principle of the Drools rule engine provided by an embodiment of the present invention; Figure 7 It is a demonstration diagram of the platform rule configuration interface provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0020] The following will describe the specific embodiments of the present invention in more detail with reference to the schematic diagrams. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the drawings are all in a very simplified form and use non-precise scales, only for the purpose of facilitating and clearly assisting in explaining the purpose of the embodiments of the present invention.
[0021] In the following text, if the method described herein includes a series of steps, the order of these steps presented herein is not necessarily the only order in which these steps can be executed, and some of the described steps may be omitted and / or some other steps not described herein may be added to the method.
[0022] Existing patents mainly focus on single processes such as bill OCR recognition and information extraction, lack a coherent process from bill recognition, image detection to layout recognition and rule review, are difficult to perform intelligent processing on documents with different layout arrangements, and cannot flexibly configure review rules and review processes. Moreover, the traditional manual review method has many deficiencies in terms of review efficiency, accuracy and flexibility.
[0023] In order to solve the problems existing in the prior art, the present invention provides a method for intelligent review of banking electronic bills based on a rule engine.
[0024] The documents in the bank can be generally classified into electronic documents and paper documents according to their forms. The paper documents are obtained as color document images through camera shooting or scanner scanning. The document images are RGB three-channel color images with a depth of 24 bits.
[0025] As Figure 1 shown, the intelligent review method includes the following steps: S1: The rich color information contained in the document image contributes little to the subsequent text detection task. In order to extract text feature information more efficiently and reduce redundant data in the image for easy calculation, the document image can be grayscale processed first to make it a single-channel image, that is, each pixel in the document image is converted to a brightness value represented by 0 to 255, thereby reducing the calculation amount in the subsequent image processing process.
[0026] Preferably, the maximum value method, weighted average method or Gamma correction method is used for grayscale processing.
[0027] Further, (1) The maximum value method refers to selecting the maximum value of the components in the document image as the grayscale value, which can retain the regional details of the bright part and is more suitable for processing images with a darker original tone. However, the overall image after grayscale is relatively bright, and some information may be lost for overexposed images; (2) The calculation method of the weighted average method is as follows: Among them, represents the grayscale value obtained by calculation of the pixel at the coordinate position in the document image, , and respectively represent the original pixel values of the RGB three channels at the coordinate position in the document image, is any coordinate position in the document image, , and are the corresponding weight values of the three channels; (3) The Gamma correction method is to perform a non-linear transformation on the grayscale value of the document image, adjust the contrast and brightness of the document image, and can enhance the dynamic range of the image for grayscale processing.
[0028] S2: During the acquisition stage of various document image information, random interference is often generated for the image data due to reasons such as equipment problems, light source influence, and compression algorithms during image transmission, which in turn affects the image quality. In order to improve the subsequent recognition effect, the document image can be denoised; Preferably, spatial filtering methods such as Gaussian filtering, median filtering or mean filtering can be used for denoising.
[0029] Furthermore, Gaussian filtering is a linear filtering method to eliminate Gaussian white noise. The pixel value at the coordinate position is processed by convolution operation, and the weighted average of the grayscale values around the pixel is calculated to replace the original pixel value. The formula for Gaussian filtering for noise reduction is as follows: in, Indicates that the document image The pixel at the coordinate position is processed by Gaussian filtering to obtain the value of noise reduction. is any coordinate position in the document image, Represents the standard deviation of the Gaussian distribution.
[0030] For the document images polluted by noise, more image details are retained after Gaussian filtering and noise reduction processing. In the actual business process, other appropriate noise reduction methods can also be selected according to different scenes such as background interference, shooting blur, light influence, etc. to restore the image or enhance the data of the document information. However, for document images with too much interference noise, missing key information, and large defacement range, in order to ensure the accuracy of subsequent data, they are generally returned or discarded, and no subsequent image processing and review process will be carried out.
[0031] Preferably, Figure 4 As shown, for the document image directly generated by the report engine, the following steps are also included: performing different color channel processing on the document image, such as setting corresponding color thresholds according to the printing ink pigment and signature color actually used in the bank, separating the document image under overlapping background or complex background, and / or extracting information such as seals, which will help the operation and processing of subsequent processes.
[0032] Grayscale processing, noise reduction, and background separation of document images are image preprocessing steps.
[0033] S3: The Canny edge detection operator is used to obtain the outline of the document image. The Canny edge detection operator uses Gaussian filtering to retain more image details. At the same time, it uses non-extreme value suppression and double threshold methods to process edge points. Its anti-noise ability and edge positioning performance are relatively good. Figure 2 As shown, Figure 2 A schematic diagram of the edge detection effect provided by an embodiment of the present invention.
[0034] S4: During the process of collecting document images, due to human factors such as shooting angles and improper placement, the document images are often skewed. Or due to reasons such as document bending and problems with perspective relationships, the documents are tilted in position or deviated from the center of the image in the image. This type of document image with abnormal position in the image will have an adverse impact on data accuracy during subsequent processes such as layout analysis and text detection. Therefore, an inclination correction step is required before further processing the image.
[0035] Preferably, the document image can be restored by correction algorithms such as the Hough transform method, the Radon transform method, and the projection method. Among them, the Hough transform method uses a voting algorithm and has strong robustness for line detection. The Radon transform method is a type of projection transform method. Due to its fast calculation speed and good real-time performance, it has been widely used in fields such as medical imaging and optical image processing. And it is sensitive to the geometric features of the image and is more suitable for use after noise reduction processing. For a two-dimensional image, the calculation method of the Radon transform method is as follows: Among them, is the pixel gray value at the coordinate position of the document image, is the area element in the double integral, is at the angle and the distance where the Radon transform value is, is the Dirac generalized function; the present invention can first extract the contour of the document image through edge detection to reduce noise interference and error influence, thereby improving the accuracy of inclination correction. After performing the Radon transform method, a horizontal image of the document at the correct scanning angle can be obtained. As Figure 3 shown, Figure 3 is a schematic diagram of the inclination correction effect provided by an embodiment of the present invention.
[0036] S5: Use the LayoutLM-v1 model to identify and classify the elements in the layout of the document image; the LayoutLM-v1 model marks different element category areas with different colors. Different element categories include titles, texts, lists, and tables, and outputs the content of the same element category area to the same array. When processing the table area, it is identified through a special table understanding model, such as structuring and extracting the table data through the TableGPT2 model. Thus, the situation under each element category can be better processed, and it is also possible to avoid including special areas under certain categories in the scope of text detection. For example, list symbols, dividing lines, table borders, etc. generally do not appear again in the marked text area, while the table area often includes structured text, numbers, symbols, etc. If recognized in the same mode, it is often prone to errors.
[0037] The present invention first analyzes the layout of the document image, which can effectively narrow the recognition range and more accurately locate different content areas in the picture, having an efficiency advantage in the subsequent processing flow.
[0038] S6: When detecting the title and text areas, since the text in the image can be regarded as a special object, but its boundary is relatively difficult to determine compared with ordinary objects, the text detection algorithms are mostly text detection algorithms based on object detection or text detection algorithms based on image segmentation.
[0039] S61: The Faster R-CNN algorithm (the Faster R-CNN algorithm is a method based on object detection) is used for text recognition and extraction. Specifically, in the first stage, the Faster R-CNN algorithm uses the ResNet-FPN structure as the feature extraction network to generate feature maps of different scales of the same image, and then takes the feature maps as the input of the RPN (Region Proposal Network) to obtain the ROI (Region Of Interest). In the second stage, different ROIs of different sizes are fixed to the same size by using different ROI Align, and finally sent to the fully connected layer to determine whether the pixel at the current position belongs to the text area. After detecting the text area, the corresponding area can be recognized and extracted by using mature OCR technology. Preferably, for rare Chinese characters that cannot be recognized in the Chinese recognition scenario, manual means can also be used to manually import them with the help of the cloud input method SDK or the cloud font library; for content with unknown languages, it can be input through translation tools or manual translation.
[0040] S62: Just recognizing the text information is not enough to organize the loose data into structured data. Therefore, semantic processing needs to be combined, such as completing SER (Semantic Entity Recognition) and RE (Relation Extraction) tasks with the help of the multi-modal DeepSeek-VL model, determining the semantic entities to which a certain area of text belongs, and extracting the relationships between them to organize structured key-value pair data, and finally extracting the key information in the document image. The key information extraction effect is referred to Figure 5 。
[0041] S63: The key information is cleaned through regular matching.
[0042] S7: Use the Drools rule engine to review the document images. For the processes that need to be supplemented, conduct manual review and disposal, and finally complete the human-machine collaborative review process of the documents. The review mode using the Drools rule engine has the following advantages: First, it reduces the interference of human factors, makes the review process more transparent and accurate, and improves the accuracy of the review results. Second, it can flexibly configure document review rules and classification criteria, shortening the change cycle for adapting to new regulations and new requirements. Third, it can comprehensively utilize the security information provided by in-house systems such as risk control, conduct multi-dimensional evaluation of data, and comprehensively judge the risk information existing in the documents.
[0043] Further, as Figure 6 shown, Figure 6 Figure 1 shows the schematic diagram of the working principle of the Drools rule engine provided by the embodiment of the present invention. The Drools rule engine defines business rules in the form of DRL (Drools Rule Language) in a file, performs rule matching on each submitted fact, and supports reacting dynamically to data changes. It liberates the review manpower from complex rule learning and reduces the growing business rule maintenance cost. Thus, developers can respond to business demands more flexibly and efficiently, meet the diverse scenario needs of users, and improve the overall operation efficiency of the platform.
[0044] As Figure 7 shown, Figure 7 Figure 2 shows the demonstration diagram of the rule configuration interface in the Drools rule engine provided by the embodiment of the present invention.
[0045] In summary, compared with the prior art, the present invention has the following advantages: (1) The present invention hands over the processed document images to the Drools rule engine for primary review, and realizes the automated process of document review through timed batch task scheduling. With manual fine verification of some rough screening results, it realizes human-machine collaborative linkage, thereby shortening the overall review cycle and enabling data to have efficient driving force.
[0046] (2) The present invention solves the problems of low processing efficiency, heavy workload, high labor cost and expenses caused by manual intervention and manual review required by traditional bill review technologies, reduces the processing cost of institutional document business, better meets the business needs of modern enterprises and institutions, standardizes, automates and intelligentizes the existing document review and processing process, and continuously improves the overall operation efficiency of the institution while simplifying the operation process of back-office business personnel.
[0047] The above are only the preferred embodiments of the present invention and do not impose any restrictive effect on the present invention. Any person skilled in the art, within the scope of the technical solution of the present invention, makes any form of equivalent substitution or modification and other changes to the technical solution and technical content disclosed by the present invention, which are all within the content of the technical solution of the present invention and still fall within the protection scope of the present invention.
Claims
1. An intelligent audit method for banking e-bills based on a rule engine, characterized in that, It includes the following steps: S1: Grayscale the document image so that each pixel in the document image is converted to a brightness value represented by 0 to 255; S2: Denoise the document image; S3: Use the Canny edge detection operator to obtain the contour of the document image; S4: Use the Radon transform method to restore the document image. The calculation method of the Radon transform method is as follows: Among them, is the pixel gray value of the document image at the coordinate position, is the area element in the double integral, is the Radon transform value at the angle and the distance ; is the Dirac generalized function; S5: Use the LayoutLM-v1 model to identify and classify the elements in the layout of the document image; S6: Use the Faster R-CNN algorithm for text recognition and extraction, complete the semantic entity recognition and relationship extraction tasks based on the multi-modal DeepSeek-VL model, and organize structured key-value pair data to extract the key information in the document image; S7: Use the Drools rule engine to audit the document image.
2. The intelligent auditing method for banking e-bills based on a rule engine according to claim 1, wherein In S1: The grayscale processing is performed by the maximum value method, weighted average method or Gamma correction method.
3. The intelligent audit method for banking electronic bills based on a rule engine according to claim 2, wherein The maximum value method means selecting the maximum value of the components from the document image as the grayscale value; The calculation method of the weighted average method is as follows: Among them, represents the gray value obtained by calculation of the pixel at the coordinate position in the document image, , and respectively represent the original pixel values corresponding to the RGB three channels of the document image at the coordinate position, is any coordinate position in the document image, , and are the corresponding weights of the three channels; The Gamma correction method performs grayscale processing by performing a non-linear transformation on the grayscale value of the document image to adjust the contrast and brightness of the document image.
4. The intelligent auditing method for banking e-bills based on a rule engine according to claim 1, characterized in that, In S2: Gaussian filtering, median filtering or mean filtering is used for denoising processing.
5. The method for intelligent review of banking electronic bills based on a rule engine according to claim 4, characterized in that The formula for noise reduction using Gaussian filtering is as follows: Among them, represents the value obtained after Gaussian filtering noise reduction for the pixel at the coordinate position in the document image, is any coordinate position in the document image, represents the standard deviation of the Gaussian distribution.
6. The intelligent audit method for banking electronic bills based on a rule engine according to claim 1, characterized in that In S5: The LayoutLM-v1 model marks different element category regions with different colors. Different element categories include titles, texts, lists, and tables, and outputs the content of the same element category region to the same array.
7. The method for intelligent review of banking e-bills based on a rules engine according to claim 6, characterized in that, Structured extraction of table data is performed through the TableGPT2 model.
8. The intelligent audit method for banking electronic bills based on a rule engine according to claim 1, characterized in that, After S6 and before S7, the following steps are further included: The key information is sent to the Drools rule engine for business audit after being cleaned by regular matching.
9. The intelligent audit method for banking e-bills based on a rules engine according to claim 1, characterized in that, Documents are divided into electronic documents and paper documents. Paper documents are obtained as color document images by shooting with a camera or scanning with a scanner.
10. The intelligent audit method for banking e-bills based on a rule engine according to claim 1, characterized in that Documents are divided into electronic documents and paper documents. Paper documents are obtained as color document images by shooting with a camera or scanning with a scanner.