Abnormal detection method of invoice copy, related device and computer storage medium

By constructing an analysis model of feature extractor, feature adapter and discriminator, the problem of invoice photocopies modification and detection is solved, and rapid and effective abnormality detection is achieved, and the bank's audit costs and financing risks are reduced.

CN119672749APending Publication Date: 2025-03-21AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411741665.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and effectively detect whether the photocopy of the invoice has been modified, which makes it difficult for banks to monitor the authenticity of the invoice during the financing process, increasing the review cost and financing risks.

Method used

By building an analysis model including feature extractor, feature adapter and discriminator, a neural network is used to perform feature extraction and abnormal detection of invoice photocopies, without using abnormal images for model training.

Benefits of technology

It has achieved rapid and effective abnormal detection of invoice photocopies, helping banks reduce audit costs, improve financing efficiency, and reduce financing risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672749A_ABST
    Figure CN119672749A_ABST
Patent Text Reader

Abstract

The invention provides an invoice copy anomaly detection method, a related device and a computer storage medium. The method comprises the following steps: receiving an invoice copy image; the invoice photocopy image is input into an analysis model, a detection result of the invoice photocopy image is output and obtained, the detection result indicates whether the invoice photocopy image is abnormal or not, the analysis model is obtained by training a neural network through a training sample set, the training sample set comprises at least one training sample invoice photocopy, and the training sample invoice photocopy comprises at least one training sample invoice photocopy. The analysis model comprises a feature extractor, a feature adapter and a discriminator. According to the method, abnormal images do not need to be used for model training, abnormal detection of the invoice movie copy is still achieved, a bank is helped to monitor the authenticity of the enterprise invoice movie copy in the financing process, manpower, material resources and financial resources of auditing are reduced, financing efficiency is improved, and financing risks are reduced. For enterprises, the financing process is simplified, the system risk is avoided, and the fund risk is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image detection technology, and in particular to a method for detecting anomalies in invoice photocopies, a related device and a computer storage medium. Background Art

[0002] In supply chain financial services, real trade background transactions are an important basis for corporate financing. To ensure the authenticity, legality and validity of trade background transactions, it is necessary to strictly review invoice photocopies, invoices and other vouchers. Invoices, as trade background vouchers that directly reflect the details of each transaction, are an important basis for supply chain financing. As a result, there are endless means of modifying and concealing invoice amounts and buyers and sellers through means such as PS (photo shop), but there is no effective and fast detection method to identify whether invoice photocopies have been modified. Although deep learning such as Generative Adversarial Networks (GAN) has made a lot of progress in supervised learning scenarios, in real scenarios, the number of abnormal data is often very small, which makes model training difficult. Summary of the invention

[0003] In view of this, the present application provides an abnormality detection method, related device and computer storage medium for invoice photocopies, which can detect abnormalities in invoice photocopies without using abnormal images for model training, to help banks monitor the authenticity of corporate invoice photocopies during the financing process, reduce the human, material and financial resources for review, improve financing efficiency and reduce financing risks. For enterprises, it simplifies the financing process, avoids system risks and reduces financial risks.

[0004] The first aspect of the present application provides a method for detecting anomalies in an invoice photocopy, comprising:

[0005] Receive photocopy images of invoices;

[0006] The invoice photocopy image is input into the analysis model, and the detection result of the invoice photocopy image is output; wherein the detection result is whether it is abnormal, and the analysis model is obtained by training a neural network with a training sample set, and the training sample set includes at least one training sample invoice photocopy, and the analysis model includes a feature extractor, a feature adapter and a discriminator.

[0007] Optionally, in the process of training the neural network to obtain the analysis model, an abnormal feature generator is also included, and the training method of the analysis model includes:

[0008] Constructing a training sample set; wherein the training sample set includes at least one training sample invoice photocopy;

[0009] Extracting features from the training sample invoice photocopy by a feature extractor to obtain training sample features;

[0010] Extracting local features of the training samples by a feature adapter to obtain local features of the training samples;

[0011] Adding Gaussian noise to the local features of the training samples by an abnormal feature generator to obtain forged abnormal features of the training samples;

[0012] The discriminator discriminates each local feature of the training sample and each forged abnormal feature of the training sample to obtain a predicted discrimination result; wherein, if the score output by the discriminator is a positive number, the predicted discrimination result is normal, and if the score output by the discriminator is a negative number, the predicted discrimination result is abnormal;

[0013] The error between the predicted discrimination results and the actual discrimination results of the training samples is used to adjust the parameters in the discriminator until the error between the predicted discrimination results and the actual discrimination results of the training samples meets the preset convergence conditions, and the final feature extractor, feature adapter and discriminator are used as analysis models.

[0014] Optionally, after receiving the invoice photocopy image, the analysis model performs feature extraction on the invoice photocopy image by a feature extractor to obtain the invoice photocopy image features; performs local feature extraction on the invoice photocopy image features by a feature adapter to obtain the local features of the invoice photocopy image; and performs discrimination on the local features of the invoice photocopy image by a discriminator to obtain the detection result of the invoice photocopy image; wherein, if the score output by the discriminator is a positive number, the detection result of the invoice photocopy image is normal, and if the score output by the discriminator is a negative number, the detection result of the invoice photocopy image is abnormal.

[0015] Optionally, all backbone networks used in the analysis model are pre-trained with ImageNet.

[0016] Optionally, the backbone network is WideResnet50.

[0017] Optionally, the feature adapter is a fully connected layer without bias, and the input and output feature sizes of the fully connected layer are the same.

[0018] The second aspect of the present application provides an abnormality detection device for an invoice photocopy, comprising:

[0019] A receiving unit, used for receiving an image of a photocopy of an invoice;

[0020] The detection unit is used to input the invoice photocopy image into the analysis model and output the detection result of the invoice photocopy image; wherein the detection result is whether it is abnormal, the analysis model is obtained by training a neural network with a training sample set, the training sample set includes at least one training sample invoice photocopy, and the analysis model includes a feature extractor, a feature adapter and a discriminator.

[0021] Optionally, in the process of training the neural network to obtain the analysis model, an abnormal feature generator is also included, and the training unit of the analysis model includes:

[0022] A training sample set construction unit, used to construct a training sample set; wherein the training sample set includes at least one training sample invoice photocopy;

[0023] A feature extraction unit, used to extract features from the training sample invoice photocopy through a feature extractor to obtain training sample features;

[0024] A local feature extraction unit, used for extracting local features of the training samples through a feature adapter to obtain local features of the training samples;

[0025] A noise unit, used for adding Gaussian noise to the local features of the training samples through an abnormal feature generator to obtain a forged abnormal feature of the training samples;

[0026] A prediction unit is used to discriminate each local feature of each training sample and each forged abnormal feature of each training sample through a discriminator to obtain a prediction discrimination result; wherein, if the score output by the discriminator is a positive number, the prediction discrimination result is normal, and if the score output by the discriminator is a negative number, the prediction discrimination result is abnormal;

[0027] The adjustment unit is used to adjust the parameters in the discriminator using the error between the predicted discrimination result and the actual discrimination result of the training sample until the error between the predicted discrimination result and the actual discrimination result of the training sample meets the preset convergence condition, and the final feature extractor, feature adapter and discriminator are used as the analysis model.

[0028] Optionally, after receiving the invoice photocopy image, the analysis model performs feature extraction on the invoice photocopy image by a feature extractor to obtain the invoice photocopy image features; performs local feature extraction on the invoice photocopy image features by a feature adapter to obtain the local features of the invoice photocopy image; and performs discrimination on the local features of the invoice photocopy image by a discriminator to obtain the detection result of the invoice photocopy image; wherein, if the score output by the discriminator is a positive number, the detection result of the invoice photocopy image is normal, and if the score output by the discriminator is a negative number, the detection result of the invoice photocopy image is abnormal.

[0029] Optionally, all backbone networks used in the analysis model are pre-trained with ImageNet.

[0030] Optionally, the backbone network is WideResnet50.

[0031] Optionally, the feature adapter is a fully connected layer without bias, and the input and output feature sizes of the fully connected layer are the same.

[0032] A third aspect of the present application provides an electronic device, including:

[0033] one or more processors;

[0034] a storage device having one or more programs stored thereon;

[0035] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting anomalies of invoice photocopies as described in any one of the first aspects.

[0036] A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for detecting anomalies of an invoice photocopy as described in any one of the first aspects is implemented.

[0037] It can be seen from the above scheme that the present application provides an abnormality detection method, related device and computer storage medium for invoice photocopies. After receiving the invoice photocopy image, the invoice photocopy image is input into the analysis model, and the detection result of the invoice photocopy image is output, wherein the detection result is whether it is abnormal. The analysis model is obtained by training a neural network with a training sample set, and the training sample set includes at least one training sample invoice photocopy. The analysis model includes a feature extractor, a feature adapter and a discriminator. The present application does not need to use abnormal images for model training, and still realizes abnormality detection of invoice photocopies to help banks monitor the authenticity of corporate invoice photocopies during the financing process, reduce the manpower, material and financial resources for auditing, improve financing efficiency, and reduce financing risks. For enterprises, it simplifies the financing process, avoids system risks, and reduces financial risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0039] Figure 1 A specific flow chart of a method for detecting anomalies of an invoice photocopy provided in an embodiment of the present application;

[0040] Figure 2 A flowchart of a training method for an analysis model provided in another embodiment of the present application;

[0041] Figure 3 A schematic diagram of an abnormality detection device for an invoice photocopy provided in another embodiment of the present application;

[0042] Figure 4 A schematic diagram of an electronic device for implementing an abnormality detection method for invoice photocopies provided in another embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0045] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0046] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0047] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0048] The present application embodiment provides a method for detecting anomalies in an invoice photocopy, such as Figure 1 As shown, the specific steps include:

[0049] S101, receiving an image of a photocopy of an invoice.

[0050] S102: Input the invoice photocopy image into the analysis model, and output the detection result of the invoice photocopy image.

[0051] Among them, the detection result is whether it is abnormal, the analysis model is obtained by training the neural network with a training sample set, the training sample set includes at least one training sample invoice photocopy, and the analysis model includes a feature extractor, a feature adapter and a discriminator.

[0052] Optionally, in another embodiment of the present application, in the process of training the neural network to obtain the analysis model, the neural network also includes an abnormal feature generator, and the training method of the analysis model includes:

[0053] S201: Construct a training sample set.

[0054] The training sample set includes at least one training sample invoice photocopy.

[0055] In the specific implementation process of this application, the training sample invoice photocopies are photocopies of real invoices signed between the financing customer and the core enterprise.

[0056] In addition, the obtained real invoice photocopies can be divided into training set χ train and the test set χ test .

[0057] S202: Extract features from the training sample invoice photocopies using a feature extractor to obtain training sample features.

[0058] Continuing with the above example, for χ train ∪χ test For any image in, the pre-trained network φ (neural network) extracts features from different levels. Formally, define L as a subset of the level indexes to be used. The feature map from level l∈L is represented as Among them, H l , W l and C l is the height, width and channel size of the feature map. For an entry at position (h,w) Its neighborhood with patch size p is defined as:

[0059]

[0060] In order to integrate the features of different levels All feature maps are linearly resized to the same size (H0, W0), i.e. the size of the largest one. Simply concatenating these feature maps yields the feature map This process is defined as:

[0061] o i =f cat (resize(z l′,i ,(H0,W0))|l′∈L

[0062] Will is defined as the entry at position (h,w). The above expression can be simplified to:

[0063] o i =F φ (x i )

[0064] Among them, F φ is a feature extractor.

[0065] S203: extract local features of the training samples through a feature adapter to obtain local features of the training samples.

[0066] Since the distribution of industrial images is usually different from the datasets used in bone intervention training, the feature adapter G θ Transfer the training features to the target domain. Feature adapter G θ The local feature o h,w Projected to the adapted feature q h,w ,Right now:

[0067]

[0068] It should be noted that the feature adapter can be composed of simple neural blocks, such as fully connected layers or multi-layer perceptrons (MLP). In experiments, it was found that a single fully connected layer can produce good performance.

[0069] This application does not directly use pre-trained features during model training, but instead uses a feature adapter to generate target-oriented features to reduce domain bias.

[0070] S204. Add Gaussian noise to the local features of the training samples through an abnormal feature generator to obtain forged abnormal features of the training samples.

[0071] Continuing from the above example, the training sample forges abnormal features by The noise vector is generated by adding Gaussian noise to it. Sampling follows a Gaussian distribution Abnormal characteristics Merged into:

[0072] This application does not directly synthesize abnormal points on the image, but generates training sample forged abnormal features by applying noise to normal features in the feature space (local features of training samples). By properly calibrating the scale of the noise, a tightly integrated normal feature space can be obtained.

[0073] S205 , using a discriminator to discriminate each local feature of a training sample and each forged abnormal feature of a training sample to obtain a prediction discrimination result.

[0074] Among them, if the score output by the discriminator is a positive number, the predicted discrimination result is normal, and if the score output by the discriminator is a negative number, the predicted discrimination result is abnormal.

[0075] Specifically, the discriminator D ψ As a normality scorer, it directly estimates the normality of each position (h,w). Since the negative samples (training samples forged abnormal features) and the normal features {q i |x i ∈χ train} are generated together and they are fed into the discriminator during training. The discriminator expects the output of normal features to be positive and the output of abnormal features to be negative. Simply use a 2-layer multi-layer perceptron (MLP) structure, like a common classifier, and evaluate normality as

[0076] S206. Use the error between the predicted discrimination result and the actual discrimination result of the training sample to adjust the parameters in the discriminator until the error between the predicted discrimination result and the actual discrimination result of the training sample meets the preset convergence condition, and use the final feature extractor, feature adapter and discriminator as the analysis model.

[0077] Among them, the true discrimination result of the training sample is the detection and judgment result corresponding to the above-mentioned local features of the training sample and the forged abnormal features of the training sample (the training samples provided in this application are all normal, and the true discrimination result is normal. The forged abnormal features of the training sample are Gaussian noise added by the feature, and the true discrimination result is abnormal). For example, the local feature A of the training sample is input into the discriminator, and the predicted discrimination result A* is output. Then, the discrimination result A* should be normal. If A* is abnormal, it means that the parameters of the current discriminator need to be adjusted. The forged abnormal feature B of the training sample is input into the discriminator, and the predicted discrimination result B* is output. Then, the discrimination result A* should be abnormal. If A* is normal, it means that the parameters of the current discriminator need to be adjusted.

[0078] It should be noted that the abnormal feature generator is discarded in the testing process and the actual application process, that is, the analysis model does not include the abnormal feature generator, which is only needed in the training process. i ∈X test Sequentially sent to the above feature extractor and feature adapter G θ , get the adapted features Anomaly score has discriminator D ψ Provided for:

[0079]

[0080] Specifically, after receiving the invoice photocopy image, the analysis model uses a feature extractor to extract features of the invoice photocopy image to obtain the features of the invoice photocopy image; uses a feature adapter to extract local features of the invoice photocopy image to obtain the local features of the invoice photocopy image; uses a discriminator to discriminate the local features of the invoice photocopy image to obtain the detection result of the invoice photocopy image; wherein, if the score output by the discriminator is a positive number, the detection result of the invoice photocopy image is normal, and if the score output by the discriminator is a negative number, the detection result of the invoice photocopy image is abnormal.

[0081] Optionally, in another embodiment of the present application, all backbone networks used by the analysis model are pre-trained with ImageNet.

[0082] Optionally, in another embodiment of the present application, the backbone network is WideResnet50.

[0083] Optionally, in another embodiment of the present application, the feature adapter is a fully connected layer without bias, and the input and output feature sizes of the fully connected layer are the same.

[0084] Optionally, in another embodiment of the present application, when the backbone network is a ResNet-like structure, its second and third intermediate layers are used for the feature extractor.

[0085] Optionally, in another embodiment of the present application, the discriminator has a linear layer, a batch normalization layer, a leakyRelu activation function and a linear layer rental field, using the Adam optimizer, the training cycle for each data set is 200, and the batch size is 3.

[0086] It can be seen from the above scheme that the present application provides a method for detecting anomalies of invoice photocopies. After receiving the image of the invoice photocopy, the image of the invoice photocopy is input into the analysis model, and the detection result of the invoice photocopy image is output, wherein the detection result is whether it is abnormal. The analysis model is obtained by training a neural network with a training sample set, and the training sample set includes at least one training sample invoice photocopy. The analysis model includes a feature extractor, a feature adapter, and a discriminator. The present application does not need to use abnormal images for model training, and still realizes anomaly detection of invoice photocopies to help banks monitor the authenticity of corporate invoice photocopies during the financing process, reduce the manpower, material and financial resources for auditing, improve financing efficiency, and reduce financing risks. For enterprises, it simplifies the financing process, avoids system risks, and reduces financial risks.

[0087] Another embodiment of the present application provides an abnormality detection device for an invoice photocopy, such as Figure 3 As shown, specifically including:

[0088] The receiving unit 301 is used to receive the image of the photocopy of the invoice.

[0089] The detection unit 302 is used to input the invoice photocopy image into the analysis model and output the detection result of the invoice photocopy image.

[0090] Among them, the detection result is whether it is abnormal, the analysis model is obtained by training the neural network with a training sample set, the training sample set includes at least one training sample invoice photocopy, and the analysis model includes a feature extractor, a feature adapter and a discriminator.

[0091] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 1 As shown, no further description is given here.

[0092] Optionally, in another embodiment of the present application, in the process of training the neural network to obtain the analysis model, an abnormal feature generator is also included. An implementation of the training unit of the analysis model includes:

[0093] The training sample set construction unit is used to construct the training sample set.

[0094] The training sample set includes at least one training sample invoice photocopy.

[0095] The feature extraction unit is used to extract features from the training sample invoice photocopies through a feature extractor to obtain training sample features.

[0096] The local feature extraction unit is used to extract local features of the training samples through the feature adapter to obtain local features of the training samples.

[0097] The noise unit is used to add Gaussian noise to the local features of the training samples through the abnormal feature generator to obtain the forged abnormal features of the training samples.

[0098] The prediction unit is used to discriminate each local feature of the training sample and each forged abnormal feature of the training sample through a discriminator to obtain a prediction discrimination result.

[0099] Among them, if the score output by the discriminator is a positive number, the predicted discrimination result is normal, and if the score output by the discriminator is a negative number, the predicted discrimination result is abnormal.

[0100] The adjustment unit is used to adjust the parameters in the discriminator using the error between the predicted discrimination result and the actual discrimination result of the training sample until the error between the predicted discrimination result and the actual discrimination result of the training sample meets the preset convergence condition, and the final feature extractor, feature adapter and discriminator are used as the analysis model.

[0101] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 2 As shown, no further description is given here.

[0102] Optionally, in another embodiment of the present application, after the analysis model receives the invoice photocopy image, the feature extractor performs feature extraction on the invoice photocopy image to obtain the invoice photocopy image features; the feature adapter performs local feature extraction on the invoice photocopy image features to obtain the local features of the invoice photocopy image; the discriminator performs discrimination on the local features of the invoice photocopy image to obtain the detection result of the invoice photocopy image; wherein, if the score output by the discriminator is a positive number, the detection result of the invoice photocopy image is normal, and if the score output by the discriminator is a negative number, the detection result of the invoice photocopy image is abnormal.

[0103] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.

[0104] Optionally, in another embodiment of the present application, all backbone networks used by the analysis model are pre-trained with ImageNet.

[0105] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.

[0106] Optionally, the backbone network is WideResnet50.

[0107] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.

[0108] Optionally, the feature adapter is a fully connected layer without bias, where the input and output feature sizes of the fully connected layer are the same.

[0109] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.

[0110] Optionally, in another embodiment of the present application, when the backbone network is a ResNet-like structure, its second and third intermediate layers are used for the feature extractor.

[0111] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.

[0112] Optionally, in another embodiment of the present application, the discriminator has a linear layer, a batch normalization layer, a leakyRelu activation function and a linear layer rental field, using the Adam optimizer, the training cycle for each data set is 200, and the batch size is 3.

[0113] The specific working process of the units disclosed in the above embodiments of the present application can be found in the corresponding method embodiments, which will not be repeated here.

[0114] It can be seen from the above scheme that the present application provides an abnormality detection device for invoice photocopies. After the receiving unit 301 receives the invoice photocopy image; the detection unit 302 inputs the invoice photocopy image into the analysis model, and outputs the detection result of the invoice photocopy image, wherein the detection result is whether it is abnormal. The analysis model is obtained by training a neural network with a training sample set, and the training sample set includes at least one training sample invoice photocopy. The analysis model includes a feature extractor, a feature adapter, and a discriminator. The present application does not need to use abnormal images for model training, and still realizes abnormality detection of invoice photocopies to help banks monitor the authenticity of corporate invoice photocopies during the financing process, reduce the manpower, material and financial resources for auditing, improve financing efficiency, and reduce financing risks. For enterprises, it simplifies the financing process, avoids system risks, and reduces financial risks.

[0115] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0116] Another embodiment of the present application provides an electronic device, such as Figure 4 As shown, including:

[0117] One or more processors 401 .

[0118] The storage device 402 stores one or more programs.

[0119] When the one or more programs are executed by the one or more processors 401, the one or more processors 401 implement the method for detecting anomalies of an invoice photocopy as described in any one of the above embodiments.

[0120] Another embodiment of the present application provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for detecting anomalies of an invoice photocopy as described in any one of the above embodiments is implemented.

[0121] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0122] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0123] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0124] Another embodiment of the present application provides a computer program product, which, when executed, is used to execute the above-mentioned method for detecting anomalies in invoice copies.

[0125] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0126] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in this application is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing this application.

[0127] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0128] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.

Claims

1. A method for detecting anomalies in invoice photocopies, characterized in that: include: Receive photocopy images of invoices; The invoice photocopy image is input into the analysis model, and the detection result of the invoice photocopy image is output; wherein the detection result is whether it is abnormal, and the analysis model is obtained by training a neural network with a training sample set, and the training sample set includes at least one training sample invoice photocopy, and the analysis model includes a feature extractor, a feature adapter and a discriminator.

2. The method for detecting abnormality of an invoice photocopy according to claim 1, characterized in that: In the process of training the neural network to obtain the analysis model, the neural network also includes an abnormal feature generator, and the training method of the analysis model includes: Constructing a training sample set; wherein the training sample set includes at least one training sample invoice photocopy; Extracting features from the training sample invoice photocopy by a feature extractor to obtain training sample features; Extracting local features of the training samples by a feature adapter to obtain local features of the training samples; Adding Gaussian noise to the local features of the training samples by an abnormal feature generator to obtain forged abnormal features of the training samples; The discriminator discriminates each local feature of the training sample and each forged abnormal feature of the training sample to obtain a predicted discrimination result; wherein, if the score output by the discriminator is a positive number, the predicted discrimination result is normal, and if the score output by the discriminator is a negative number, the predicted discrimination result is abnormal; The error between the predicted discrimination results and the actual discrimination results of the training samples is used to adjust the parameters in the discriminator until the error between the predicted discrimination results and the actual discrimination results of the training samples meets the preset convergence conditions, and the final feature extractor, feature adapter and discriminator are used as analysis models.

3. The method for detecting abnormality of an invoice photocopy according to claim 1, characterized in that: After receiving the invoice photocopy image, the analysis model uses a feature extractor to extract features from the invoice photocopy image to obtain the invoice photocopy image features; uses a feature adapter to extract local features from the invoice photocopy image features to obtain the local features of the invoice photocopy image; uses a discriminator to discriminate the local features of the invoice photocopy image to obtain the detection result of the invoice photocopy image; wherein, if the score output by the discriminator is a positive number, the detection result of the invoice photocopy image is normal, and if the score output by the discriminator is a negative number, the detection result of the invoice photocopy image is abnormal.

4. The method for detecting abnormality of an invoice photocopy according to claim 1, characterized in that: All backbone networks used in the analysis models are pre-trained with ImageNet.

5. The method for detecting abnormality of an invoice photocopy according to claim 4, characterized in that: The backbone network is WideResnet50.

6. The method for detecting abnormality of an invoice photocopy according to claim 1, characterized in that: The feature adapter is a fully connected layer without bias, and the input and output feature sizes of the fully connected layer are the same.

7. An abnormality detection device for invoice photocopies, characterized in that: include: A receiving unit, used for receiving an image of a photocopy of an invoice; The detection unit is used to input the invoice photocopy image into the analysis model and output the detection result of the invoice photocopy image; wherein the detection result is whether it is abnormal, the analysis model is obtained by training a neural network with a training sample set, the training sample set includes at least one training sample invoice photocopy, and the analysis model includes a feature extractor, a feature adapter and a discriminator.

8. The device for detecting abnormality of an invoice photocopy according to claim 7, characterized in that: In the process of training the neural network to obtain the analysis model, an abnormal feature generator is also included. The training unit of the analysis model includes: A training sample set construction unit, used to construct a training sample set; wherein the training sample set includes at least one training sample invoice photocopy; A feature extraction unit, used to extract features from the training sample invoice photocopy through a feature extractor to obtain training sample features; A local feature extraction unit, used for extracting local features of the training samples through a feature adapter to obtain local features of the training samples; A noise unit, used for adding Gaussian noise to the local features of the training samples through an abnormal feature generator to obtain a forged abnormal feature of the training samples; A prediction unit is used to discriminate each local feature of each training sample and each forged abnormal feature of each training sample through a discriminator to obtain a prediction discrimination result; wherein, if the score output by the discriminator is a positive number, the prediction discrimination result is normal, and if the score output by the discriminator is a negative number, the prediction discrimination result is abnormal; The adjustment unit is used to adjust the parameters in the discriminator using the error between the predicted discrimination result and the actual discrimination result of the training sample until the error between the predicted discrimination result and the actual discrimination result of the training sample meets the preset convergence condition, and the final feature extractor, feature adapter and discriminator are used as the analysis model.

9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting anomalies of an invoice photocopy as claimed in any one of claims 1 to 6.

10. A computer storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the method for detecting anomalies of an invoice photocopy as claimed in any one of claims 1 to 6 is implemented.