Invoice early warning method and device based on machine learning, equipment and storage medium
Visual and text feature extraction and cross-verification of invoices through machine learning technology solves the shortcomings of traditional invoice processing systems in dealing with complex fraud methods, improves the accuracy and flexibility of invoice warnings, and reduces financial risks.
Patent Information
- Application Number
- CN202411434302.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-17
AI Technical Summary
Traditional invoice processing systems have difficulty coping with complex or changing fraudulent means, especially in the absence of flexibility and adaptability in invoice voiding and red-blocking operations, resulting in financial losses and audit risks.
Using machine learning-based invoice warning method, visual feature extraction and text recognition of invoices through convolutional neural networks and recurrent neural networks, advanced image and text features are constructed, cross-verification and multi-head attention feature stitching to achieve abnormalities of invoices Type classification identification.
It improves the accuracy of invoice warning, can identify seals, signatures and invoice integrity, and verify whether the dates, amounts, etc. in the text are logical, enhancing the model's expressive ability and the accuracy of the recognition results.
Smart Images

Figure CN119323793A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of invoice warning technology, and in particular to an invoice warning method, device, equipment and computer-readable storage medium based on machine learning. Background Art
[0002] With the increase of economic activities, invoice processing has become an indispensable part of daily business operations. However, common problems in the invoice management process, such as invoice cancellation and redemption operations, may lead to financial losses and audit risks if not handled properly.
[0003] Traditional invoice processing systems usually use rule-based methods to identify anomalies. These systems rely on fixed logic to determine whether an invoice complies with regulations. For example, the system may check whether the date and amount on the invoice conform to the preset format and range. However, this approach is difficult to deal with complex or changing fraud methods, especially in terms of invoice cancellation and redemption operations. Traditional methods often lack flexibility and adaptability. Summary of the invention
[0004] The present invention provides an invoice warning method, device, equipment and storage medium based on machine learning, the main purpose of which is to improve the accuracy of invoice warning.
[0005] To achieve the above purpose, the present invention provides an invoice early warning method based on machine learning, comprising:
[0006] Obtain an invoice to be processed, and use a convolutional neural network in a pre-trained invoice early warning model to extract visual features of the invoice to be processed to obtain an image feature set;
[0007] Using the recurrent neural network in the invoice early warning model to perform keyword text recognition on the invoice to be processed, and obtain a text feature set;
[0008] Performing image integrity verification on the image feature set to obtain a high-level image feature set, and performing text relevance feature extraction on the text feature set to obtain a high-level text feature set;
[0009] Performing text extraction on the image feature set to obtain an image text set, and cross-validating the image text set and the text feature set to obtain a cross-validation feature;
[0010] Performing multi-head attention feature concatenation on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set;
[0011] The fused feature set is subjected to full-connection classification and recognition based on preset invoice anomaly types to obtain an early warning result of the invoice to be processed.
[0012] Optionally, performing image integrity verification on the image feature set to obtain a high-level image feature set includes:
[0013] Using a texture analysis algorithm to perform feature extraction on each irregular image in the image feature set, to obtain seal features, damage features, alteration features and signature features;
[0014] Performing standard seal binary classification judgment on the seal features to obtain a seal recognition result;
[0015] Calling a pre-built signature database to identify and match the signature features to obtain a signature recognition result;
[0016] The damaged image, altered image, seal recognition result and signature recognition result are output to obtain a high-level image feature set.
[0017] Optionally, the text feature set is subjected to text correlation feature extraction to obtain a high-level text feature set, including:
[0018] Performing word segmentation on the text feature set to obtain a text word segmentation set;
[0019] Performing entity recognition on the text segmentation set to obtain entity recognition features;
[0020] Perform dependency recognition on the text segmentation words in the text segmentation set to obtain dependency syntactic features;
[0021] Using a sequence labeling service to label the numerical type of the segmented words in the text segmented word set to obtain numerical labeling features;
[0022] A logical consistency analysis is performed on the entity recognition features, dependency syntactic features, and numerical annotation features to obtain a high-level text feature set.
[0023] Optionally, cross-validating the image text set and the text feature set to obtain a cross-validation feature includes:
[0024] Performing a basic comparison between the image text set and the text feature set based on content and information data format to obtain a direct comparison result;
[0025] Using a pre-built consistency analysis neural network, the image text set and the text feature set are evaluated for consistency to obtain a consistency evaluation score;
[0026] The direct comparison result and the consistency evaluation score are output to obtain a cross-validation feature.
[0027] Optionally, the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features are subjected to multi-head attention feature concatenation to obtain a fused feature set, including:
[0028] The image feature set, the text feature set, the advanced image feature set, the advanced text feature set and the cross-validation feature are quantized and encoded respectively to obtain an encoding vector set;
[0029] Perform feature extraction on the encoding vector set according to a multi-head attention mechanism to obtain an attention weight matrix;
[0030] According to the attention weight matrix, weighted sum calculation is performed on each encoding vector in the encoding vector set to obtain a multi-head attention fusion feature vector;
[0031] Performing layer normalization on the multi-head attention fusion feature vector to obtain a normalized fusion feature vector;
[0032] The features of each dimension in the normalized fused feature vector are concatenated, and a preset number of dimensionality reduction operations are performed on the concatenated result to obtain a fused feature set.
[0033] Optionally, the convolutional neural network in the pre-trained invoice warning model is used to extract visual features of the invoice to be processed to obtain an image feature set, including:
[0034] Using a Gaussian algorithm to perform image noise reduction on the invoice to be processed, to obtain a noise-reduced invoice image;
[0035] Performing a preset number of convolution and pooling operations on the denoised invoice image to obtain a feature matrix set;
[0036] An object recognition operation of a preset visual feature type is performed on the feature matrix set to obtain an image feature set.
[0037] Optionally, the recurrent neural network in the invoice early warning model is used to perform keyword text recognition on the invoice to be processed to obtain a text feature set, including:
[0038] Utilizing the recurrent neural network in the invoice early warning model, extracting text information from the invoice to be processed;
[0039] The text information is subjected to feature recognition of preset key fields to obtain a text feature set.
[0040] In order to solve the above problems, the present invention also provides an invoice early warning device based on machine learning, the device comprising:
[0041] A basic feature extraction module is used to obtain invoices to be processed, extract visual features of the invoices to be processed using a convolutional neural network in a pre-trained invoice early warning model to obtain an image feature set, and perform keyword text recognition on the invoices to be processed using a recurrent neural network in the invoice early warning model to obtain a text feature set;
[0042] An advanced feature extraction module is used to perform image integrity verification on the image feature set to obtain an advanced image feature set, perform text relevance feature extraction on the text feature set to obtain an advanced text feature set, perform text extraction on the image feature set to obtain an image text set, and perform cross-validation on the image text set and the text feature set to obtain a cross-validation feature;
[0043] A multi-head attention feature fusion module is used to perform multi-head attention feature splicing on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set;
[0044] The invoice warning module is used to perform full-connection classification recognition on the fused feature set based on the preset invoice abnormality type to obtain the warning result of the invoice to be processed.
[0045] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0046] at least one processor; and,
[0047] a memory communicatively connected to the at least one processor; wherein,
[0048] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned machine learning-based invoice warning method.
[0049] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned machine learning-based invoice warning method.
[0050] The embodiment of the present invention identifies the invoice to be processed from the two aspects of image features and text features, and then improves the invoice warning evaluation effect by constructing advanced features, wherein the advanced image feature set can identify the seal, signature and invoice integrity, and the advanced text feature set can identify whether the date, amount, number, etc. in the text are logical; the present invention also cross-validates between text features and image features to further determine whether the invoice text information and image information are consistent, thereby improving the accuracy of invoice warning; the present invention also realizes feature fusion through a multi-head attention mechanism, comprehensively understands the richness and complexity of the input data, improves the model expression ability, and thus increases the accuracy of the model recognition result. Therefore, the invoice warning method, device, equipment and storage medium based on machine learning provided by the embodiment of the present invention can improve the accuracy of invoice warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A flow chart of an invoice early warning method based on machine learning provided in one embodiment of the present invention;
[0052] Figure 2 A detailed flowchart of a step in a machine learning-based invoice early warning method provided in one embodiment of the present invention;
[0053] Figure 3 A detailed flowchart of a step in a machine learning-based invoice early warning method provided in one embodiment of the present invention;
[0054] Figure 4 A functional module diagram of an invoice early warning device based on machine learning provided by an embodiment of the present invention;
[0055] Figure 5 A schematic diagram of the structure of an electronic device for implementing the machine learning-based invoice warning method provided in one embodiment of the present invention.
[0056] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0058] The embodiment of the present application provides an invoice warning method based on machine learning. In the embodiment of the present application, the execution subject of the invoice warning method based on machine learning includes but is not limited to at least one of the electronic devices such as the server, the terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the invoice warning method based on machine learning can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0059] Reference Figure 1 FIG. 1 is a flow chart of an invoice early warning method based on machine learning provided in an embodiment of the present invention. In this embodiment, the invoice early warning method based on machine learning includes:
[0060] S1. Obtain an invoice to be processed, and use a convolutional neural network in a pre-trained invoice warning model to extract visual features of the invoice to be processed to obtain an image feature set.
[0061] In the embodiment of the present invention, the invoice to be processed may be an electronic invoice or a scanned image of a paper invoice. The enterprise performs regular invoice aggregation according to preset conditions (for example: a. before the due date of accounts receivable; b. invoices corresponding to completed orders with an order status of "approved by the funding party").
[0062] Furthermore, the invoice early warning model is a neural network model with multimodal data input, which is used to determine whether an invoice is abnormal by recognizing images and texts, wherein abnormal states include invoice cancellation and invoice red cancellation.
[0063] In detail, in the embodiment of the present invention, the convolutional neural network in the pre-trained invoice warning model is used to extract visual features of the invoice to be processed to obtain an image feature set, including:
[0064] Using a Gaussian algorithm to perform image noise reduction on the invoice to be processed, to obtain a noise-reduced invoice image;
[0065] Performing a preset number of convolution and pooling operations on the denoised invoice image to obtain a feature matrix set;
[0066] An object recognition operation of a preset visual feature type is performed on the feature matrix set to obtain an image feature set.
[0067] The embodiment of the present invention first uses the Gaussian algorithm to smooth the noise in the invoice to be processed to obtain a noise-reduced invoice image. Then, according to a preset number of convolution and pooling operations, feature extraction is performed on the noise-reduced invoice image. The number of executions of the convolution and pooling process is related to the actual data dimensionality reduction, as long as the order of magnitude of the feature data after pooling is relatively appropriate and more features are retained.
[0068] Finally, an image feature set is obtained by performing an object recognition operation of a preset visual feature type. In the embodiment of the present invention, the preset visual feature type is a seal, signature, trace of alteration, missing part, etc., so the image feature set includes seal position information, color information, shape information, etc.
[0069] S2. Using the recurrent neural network in the invoice early warning model to perform keyword text recognition on the invoice to be processed, to obtain a text feature set.
[0070] The recurrent neural network (RNN) is a type of neural network used to process sequence data, and is particularly suitable for time series prediction, natural language processing and other tasks involving sequential dependencies.
[0071] It should be known that the text data in the invoice usually appears in the form of a sequence, such as a list of items, date, amount, etc. The RNN is good at processing sequence data, and can process the input data step by step through time steps and retain context information. This enables the RNN to understand and analyze the order and dependencies in the text, ensuring accurate extraction of information.
[0072] In detail, in the embodiment of the present invention, the recurrent neural network in the invoice early warning model is used to perform keyword text recognition on the invoice to be processed to obtain a text feature set, including:
[0073] Utilizing the recurrent neural network in the invoice early warning model, extracting text information from the invoice to be processed;
[0074] The text information is subjected to feature recognition of preset key fields to obtain a text feature set.
[0075] In the embodiment of the present invention, the RNN can effectively identify and extract key fields in the invoice, such as date and amount, by learning patterns in the text sequence, even if this information may appear in different text positions.
[0076] S3. Perform image integrity verification on the image feature set to obtain a high-level image feature set, and perform text relevance feature extraction on the text feature set to obtain a high-level text feature set.
[0077] For details, refer to Figure 2 As shown, in the embodiment of the present invention, the image integrity verification is performed on the image feature set to obtain a high-level image feature set, including:
[0078] S301, using a texture analysis algorithm to perform feature extraction on each irregular image in the image feature set to obtain seal features, damage features, alteration features, and signature features;
[0079] S302, performing standard seal binary classification judgment on the seal features to obtain a seal recognition result;
[0080] S303, calling a pre-built signature database to identify and match the signature features to obtain a signature recognition result;
[0081] S304: Output the damaged image, altered image, seal recognition result and signature recognition result to obtain a high-level image feature set.
[0082] In the embodiment of the present invention, the texture analysis algorithm has a powerful ability to process and analyze the detailed features in the image. By applying methods such as GLCM, LBP, wavelet transform and Gabor filter, the features such as seal, damage, alteration and signature in the invoice image can be effectively extracted. These features can be used for further classification and recognition tasks to improve the accuracy and robustness of the invoice processing system.
[0083] Then, the embodiment of the present invention performs secondary authenticity authentication on the characteristic parts of the seal and signature to obtain the seal recognition result and the signature recognition result, and then outputs them comprehensively with the damage and alteration features to obtain a high-level image feature set.
[0084] Further, refer to Figure 3 As shown, in the embodiment of the present invention, the text feature set is subjected to text correlation feature extraction to obtain a high-level text feature set, including:
[0085] S311, performing word segmentation on the text feature set to obtain a text word segmentation set;
[0086] S312, performing entity recognition on the text segmentation set to obtain entity recognition features;
[0087] S313, performing dependency relationship recognition on the text segmentation set to obtain dependency syntactic features;
[0088] S314, using a sequence labeling service to label the numerical type of the segmented words in the text segmented word set to obtain numerical labeling features;
[0089] S315: Perform logical consistency analysis on the entity recognition features, dependency syntactic features, and numerical annotation features to obtain a high-level text feature set.
[0090] In the embodiment of the present invention, the word segmentation process is first performed by a word segmentation tool to obtain a text word segmentation set, and then the entities in the text word segmentation set, such as date, amount and invoice number, are identified and their positions and attributes are recorded. Then, dependency syntactic analysis is used to determine the dependency relationship between words in the text to help identify the consistency and logic of the text structure; then, the sequence annotation service is used to annotate the time expression and amount to ensure the accurate identification and consistent expression of these elements in the text.
[0091] Finally, a consistency analysis method, such as a cross-validation method, is used to perform a logical consistency analysis on the entity recognition features, dependency syntactic features, and numerical annotation features. For example, the amount in the entity recognition feature is compared with the amount in the sequence annotation to verify whether they are consistent; check whether the date field meets the logical requirements of the accounting period, thereby obtaining a set of high-level text features.
[0092] In summary, the advanced image feature set can detect image anomalies and improve information consistency; while the advanced text feature set can identify logical consistency and data accuracy. In the embodiments of the present invention, these advanced features can be used to more comprehensively and accurately identify and detect anomalies, thereby improving the efficiency and reliability of the system.
[0093] S4. Perform text extraction on the image feature set to obtain an image text set, and perform cross-validation on the image text set and the text feature set to obtain a cross-validation feature.
[0094] In the embodiment of the present invention, if a text feature set and an image feature set are to be cross-validated, it is first necessary to perform an image-to-text operation on the image feature set to obtain an image-to-text set.
[0095] In detail, in the embodiment of the present invention, the cross-validation of the image text set and the text feature set to obtain the cross-validation feature includes:
[0096] Performing a basic comparison between the image text set and the text feature set based on content and information data format to obtain a direct comparison result;
[0097] Using a pre-built consistency analysis neural network, the image text set and the text feature set are evaluated for consistency to obtain a consistency evaluation score;
[0098] The direct comparison result and the consistency evaluation score are output to obtain a cross-validation feature.
[0099] The consistency analysis neural network is a neural network obtained through sample training, which is used to evaluate the consistency between two sets of data. It can not only compare whether the data are the same, but also determine whether a single data is abnormal based on logic.
[0100] Specifically, in the embodiment of the present invention, consistency evaluation is performed through direct comparison and network analysis comparison, and the final result is output to obtain cross-validation features. Among them, direct comparison is relatively simple, comparing the content and the expression form of data; while more advanced network analysis can capture potential complex relationships and anomalies, which can serve as a supplement and verification of direct comparison.
[0101] S5. Perform multi-head attention feature concatenation on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set.
[0102] In detail, in an embodiment of the present invention, the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features are subjected to multi-head attention feature concatenation to obtain a fused feature set, including:
[0103] The image feature set, the text feature set, the advanced image feature set, the advanced text feature set and the cross-validation feature are quantized and encoded respectively to obtain an encoding vector set;
[0104] Perform feature extraction on the encoding vector set according to a multi-head attention mechanism to obtain an attention weight matrix;
[0105] According to the attention weight matrix, weighted sum calculation is performed on each encoding vector in the encoding vector set to obtain a multi-head attention fusion feature vector;
[0106] Performing layer normalization on the multi-head attention fusion feature vector to obtain a normalized fusion feature vector;
[0107] The features of each dimension in the normalized fused feature vector are concatenated, and a preset number of dimensionality reduction operations are performed on the concatenated result to obtain a fused feature set.
[0108] In an embodiment of the present invention, the multi-head attention mechanism allows the model to capture information from different feature subspaces, and each attention head can focus on different feature patterns and relationships, which can more comprehensively understand the diversity and complexity of the input data.
[0109] Specifically, in an embodiment of the present invention, the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation feature are first uniquely quantized and encoded using a one-hot encoding method to obtain a set of encoding vectors. Then, the attention relationship between each vector is calculated according to the multi-head attention mechanism to obtain an attention weight matrix. Then, the encoding vector set is weighted and summed according to the attention weight matrix to achieve feature attention enhancement and obtain a multi-head attention fusion feature vector. Next, the embodiment of the present invention calculates the mean and standard deviation of all feature dimensions of each fused feature vector through a layer normalization operation, and then uses the calculated mean and standard deviation to normalize the fused feature vector so that its mean is 0 and its standard deviation is 1.
[0110] When each layer of features in the multi-head attention fusion feature vector is normalized, a normalized fusion feature vector can be obtained. Then, the normalized fusion feature vector is feature concatenated to obtain a fusion feature set. However, the fusion feature set is large in magnitude at this time, and needs to be reduced to a suitable magnitude to ensure the model operation efficiency.
[0111] S6. Perform full-connection classification and recognition based on preset invoice anomaly types on the fused feature set to obtain an early warning result of the invoice to be processed.
[0112] In the embodiment of the present invention, the preset invoice exception types are invoice cancellation and invoice red cancellation, so the fusion feature set can be subjected to a fully connected three-classification judgment to determine whether the invoice to be processed is a normal invoice, a red cancellation invoice or a voided invoice.
[0113] The embodiment of the present invention identifies the invoice to be processed from the two aspects of image features and text features, and then improves the invoice warning evaluation effect by constructing advanced features, wherein the advanced image feature set can identify the seal, signature and invoice integrity, and the advanced text feature set can identify whether the date, amount, number, etc. in the text are logical; the present invention also cross-validates between text features and image features to further determine whether the invoice text information and image information are consistent, thereby improving the accuracy of invoice warning; the present invention also realizes feature fusion through a multi-head attention mechanism, fully understands the richness and complexity of the input data, improves the model expression ability, and thus increases the accuracy of the model recognition result. Therefore, the invoice warning method based on machine learning provided by the embodiment of the present invention can improve the accuracy of invoice warning.
[0114] like Figure 4 , which is a functional module diagram of an invoice warning device based on machine learning provided in one embodiment of the present invention.
[0115] The invoice warning device 100 based on machine learning of the present invention can be installed in an electronic device. According to the functions implemented, the invoice warning device 100 based on machine learning can include a basic feature extraction module 101, an advanced feature extraction module 102, a multi-head attention feature fusion module 103 and an invoice warning module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0116] In this embodiment, the functions of each module / unit are as follows:
[0117] The basic feature extraction module 101 is used to obtain the invoice to be processed, extract visual features of the invoice to be processed using the convolutional neural network in the pre-trained invoice warning model to obtain an image feature set, and perform keyword text recognition on the invoice to be processed using the recurrent neural network in the invoice warning model to obtain a text feature set;
[0118] The high-level feature extraction module 102 is used to perform image integrity verification on the image feature set to obtain a high-level image feature set, perform text relevance feature extraction on the text feature set to obtain a high-level text feature set, perform text extraction on the image feature set to obtain an image text set, and perform cross-validation on the image text set and the text feature set to obtain a cross-validation feature;
[0119] The multi-head attention feature fusion module 103 is used to perform multi-head attention feature splicing on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set;
[0120] The invoice warning module 104 is used to perform full-connection classification recognition on the fused feature set based on a preset invoice abnormality type to obtain a warning result of the invoice to be processed.
[0121] In detail, each module described in the machine learning-based invoice warning device 100 described in the embodiment of the present application adopts the same method as above when used. Figures 1 to 3 The invoice early warning method based on machine learning has the same technical means as described in the text and can produce the same technical effects, so I will not go into details here.
[0122] like Figure 5 , is a schematic diagram of the structure of an electronic device 1 for implementing an invoice warning method based on machine learning provided by an embodiment of the present invention.
[0123] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an invoice early warning program based on machine learning.
[0124] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device 1, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing an invoice warning program based on machine learning, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device and process data.
[0125] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the invoice warning program based on machine learning, but also can be used to temporarily store data that has been output or is to be output.
[0126] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0127] The communication interface 13 is used for communication between the above-mentioned electronic device 1 and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0128] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0129] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0130] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0131] The invoice early warning program based on machine learning stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0132] Obtain an invoice to be processed, and use a convolutional neural network in a pre-trained invoice early warning model to extract visual features of the invoice to be processed to obtain an image feature set;
[0133] Using the recurrent neural network in the invoice early warning model to perform keyword text recognition on the invoice to be processed, and obtain a text feature set;
[0134] Performing image integrity verification on the image feature set to obtain a high-level image feature set, and performing text relevance feature extraction on the text feature set to obtain a high-level text feature set;
[0135] Performing text extraction on the image feature set to obtain an image text set, and cross-validating the image text set and the text feature set to obtain a cross-validation feature;
[0136] Performing multi-head attention feature concatenation on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set;
[0137] The fused feature set is subjected to full-connection classification and recognition based on preset invoice anomaly types to obtain an early warning result of the invoice to be processed.
[0138] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0139] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0140] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0141] Obtain an invoice to be processed, and use a convolutional neural network in a pre-trained invoice early warning model to extract visual features of the invoice to be processed to obtain an image feature set;
[0142] Using the recurrent neural network in the invoice early warning model to perform keyword text recognition on the invoice to be processed, and obtain a text feature set;
[0143] Performing image integrity verification on the image feature set to obtain a high-level image feature set, and performing text relevance feature extraction on the text feature set to obtain a high-level text feature set;
[0144] Performing text extraction on the image feature set to obtain an image text set, and cross-validating the image text set and the text feature set to obtain a cross-validation feature;
[0145] Performing multi-head attention feature concatenation on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set;
[0146] The fused feature set is subjected to full-connection classification and recognition based on preset invoice anomaly types to obtain an early warning result of the invoice to be processed.
[0147] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0148] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0150] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0151] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0152] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0153] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0154] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An invoice early warning method based on machine learning, characterized in that: The method comprises: Obtain an invoice to be processed, and use a convolutional neural network in a pre-trained invoice early warning model to extract visual features of the invoice to be processed to obtain an image feature set; Using the recurrent neural network in the invoice early warning model to perform keyword text recognition on the invoice to be processed, and obtain a text feature set; Performing image integrity verification on the image feature set to obtain a high-level image feature set, and performing text relevance feature extraction on the text feature set to obtain a high-level text feature set; Performing text extraction on the image feature set to obtain an image text set, and cross-validating the image text set and the text feature set to obtain a cross-validation feature; Performing multi-head attention feature concatenation on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set; The fused feature set is subjected to full-connection classification and recognition based on preset invoice anomaly types to obtain an early warning result of the invoice to be processed.
2. The invoice early warning method based on machine learning as claimed in claim 1, characterized in that: The image integrity verification is performed on the image feature set to obtain a high-level image feature set, including: Using a texture analysis algorithm to perform feature extraction on each irregular image in the image feature set, to obtain seal features, damage features, alteration features and signature features; Performing standard seal binary classification judgment on the seal features to obtain a seal recognition result; Calling a pre-built signature database to identify and match the signature features to obtain a signature recognition result; The damaged image, altered image, seal recognition result and signature recognition result are output to obtain a high-level image feature set.
3. The invoice early warning method based on machine learning as claimed in claim 1, characterized in that: The step of performing text correlation feature extraction on the text feature set to obtain a high-level text feature set includes: Performing word segmentation on the text feature set to obtain a text word segmentation set; Performing entity recognition on the text segmentation set to obtain entity recognition features; Perform dependency recognition on the text segmentation words in the text segmentation set to obtain dependency syntactic features; Using a sequence labeling service to label the numerical type of the segmented words in the text segmented word set to obtain numerical labeling features; A logical consistency analysis is performed on the entity recognition features, dependency syntactic features, and numerical annotation features to obtain a high-level text feature set.
4. The invoice early warning method based on machine learning as claimed in claim 1, characterized in that: The cross-validation of the image text set and the text feature set to obtain a cross-validation feature includes: Performing a basic comparison between the image text set and the text feature set based on content and information data format to obtain a direct comparison result; Using a pre-built consistency analysis neural network, the image text set and the text feature set are evaluated for consistency to obtain a consistency evaluation score; The direct comparison result and the consistency evaluation score are output to obtain a cross-validation feature.
5. The invoice early warning method based on machine learning as claimed in claim 1, characterized in that: The multi-head attention feature concatenation is performed on the image feature set, the text feature set, the advanced image feature set, the advanced text feature set and the cross-validation feature to obtain a fused feature set, including: The image feature set, the text feature set, the advanced image feature set, the advanced text feature set and the cross-validation feature are quantized and encoded respectively to obtain an encoding vector set; Perform feature extraction on the encoding vector set according to a multi-head attention mechanism to obtain an attention weight matrix; According to the attention weight matrix, weighted sum calculation is performed on each encoding vector in the encoding vector set to obtain a multi-head attention fusion feature vector; Performing layer normalization on the multi-head attention fusion feature vector to obtain a normalized fusion feature vector; The features of each dimension in the normalized fused feature vector are concatenated, and a preset number of dimensionality reduction operations are performed on the concatenated result to obtain a fused feature set.
6. The invoice early warning method based on machine learning as claimed in claim 1, characterized in that: The convolutional neural network in the pre-trained invoice warning model is used to extract visual features of the invoice to be processed to obtain an image feature set, including: Using a Gaussian algorithm to perform image noise reduction on the invoice to be processed, to obtain a noise-reduced invoice image; Performing a preset number of convolution and pooling operations on the denoised invoice image to obtain a feature matrix set; An object recognition operation of a preset visual feature type is performed on the feature matrix set to obtain an image feature set.
7. The invoice early warning method based on machine learning as claimed in claim 1, characterized in that: The method of using the recurrent neural network in the invoice early warning model to perform keyword text recognition on the invoice to be processed to obtain a text feature set includes: Utilizing the recurrent neural network in the invoice early warning model, extracting text information from the invoice to be processed; The text information is subjected to feature recognition of preset key fields to obtain a text feature set.
8. An invoice early warning device based on machine learning, characterized in that: The device comprises: A basic feature extraction module is used to obtain invoices to be processed, extract visual features of the invoices to be processed using a convolutional neural network in a pre-trained invoice early warning model to obtain an image feature set, and perform keyword text recognition on the invoices to be processed using a recurrent neural network in the invoice early warning model to obtain a text feature set; An advanced feature extraction module is used to perform image integrity verification on the image feature set to obtain an advanced image feature set, perform text relevance feature extraction on the text feature set to obtain an advanced text feature set, perform text extraction on the image feature set to obtain an image text set, and perform cross-validation on the image text set and the text feature set to obtain a cross-validation feature; A multi-head attention feature fusion module is used to perform multi-head attention feature splicing on the image feature set, text feature set, advanced image feature set, advanced text feature set and cross-validation features to obtain a fused feature set; The invoice warning module is used to perform full-connection classification recognition on the fused feature set based on the preset invoice abnormality type to obtain the warning result of the invoice to be processed.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the machine learning-based invoice warning method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the machine learning-based invoice warning method as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Bill self-service delivery control system for self-service reimbursement
CN119863328A