Bill image detection method and device, equipment, storage medium and program product

By extracting crease information and ink spectral information from the invoice image and combining it with multi-scale data analysis, the problem of low accuracy in invoice image anti-counterfeiting detection was solved, and accurate identification of counterfeit information was achieved at different resolutions.

CN121505733APending Publication Date: 2026-02-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511620386.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of anti-counterfeiting detection of invoice images is low, especially when the image quality is low, making it difficult to effectively identify counterfeit content.

Method used

By acquiring the feature vector of the invoice image, extracting crease information and ink spectral information, and performing downsampling processing based on at least two preset resolutions, and combining deep learning network analysis of feature vectors at different resolutions, the location of counterfeit information in the invoice image is determined.

Benefits of technology

It improves the accuracy of anti-counterfeiting detection of invoice images, can accurately identify counterfeit information at different resolutions, and enhances anti-interference capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505733A_ABST
    Figure CN121505733A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a bill image detection method and device, equipment, a storage medium and a program product, and relates to the technical field of finance. The method comprises the following steps: acquiring a bill image, and extracting a feature vector of the bill image; the bill image represents the transaction voucher; the feature vector represents crease information and printing ink spectrum information of the bill image; performing down-sampling processing on the feature vector based on at least two preset resolutions to obtain down-sampling images corresponding to the preset resolutions; the down-sampling image represents the feature vector after down-sampling processing; determining a target area according to the feature vector of the bill image and each down-sampling image; the target area represents the position of the forged information in the bill image. According to the method, the anti-counterfeiting detection accuracy of the bill image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of finance, and in particular to a bill image detection method and device, equipment, a storage medium and a program product. BACKGROUND

[0002] A bill (such as a check, a money order, etc.) is an important voucher in financial transactions, containing key information such as an amount, a signature, a seal, etc. However, due to improper storage, environmental factors (such as light, humidity), or human tampering, a bill image often has problems such as blurring, occlusion, reflection, creases, etc., which seriously affect subsequent anti-forgery detection.

[0003] In related technologies, optical character recognition and morphological operations are used for anti-forgery detection, mainly analyzing the visual content of an image. However, in related technologies, the quality of a bill image is required to be high, and when the quality of a bill image is not high, the accuracy of anti-forgery detection of the bill image is low.

[0004] Therefore, how to improve the accuracy of anti-forgery detection of a bill image becomes a technical problem to be solved. SUMMARY

[0005] The present application provides a bill image detection method and device, equipment, a storage medium and a program product to solve the technical problem of low accuracy of anti-forgery detection of a bill image.

[0006] In a first aspect, the present application provides a bill image detection method, comprising:

[0007] obtaining a bill image and extracting a feature vector of the bill image; the bill image representing a transaction voucher; the feature vector representing crease information and ink spectrum information of the bill image;

[0008] performing down-sampling processing on the feature vector based on at least two preset resolutions to obtain a down-sampled image corresponding to the preset resolutions; the down-sampled image representing the feature vector after down-sampling processing;

[0009] determining a target region according to the feature vector of the bill image and each down-sampled image; the target region representing the position of forged information in the bill image.

[0010] In a second aspect, the present application provides a bill image detection device, comprising:

[0011] an obtaining module configured to obtain a bill image and extract a feature vector of the bill image; the bill image representing a transaction voucher; the feature vector representing crease information and ink spectrum information of the bill image;

[0012] The sampling module is configured to perform down-sampling processing on the feature vector based on at least two preset resolutions to obtain down-sampling images corresponding to the preset resolutions; the down-sampling images represent the feature vector after the down-sampling processing.

[0013] The determining module is configured to determine a target region according to the feature vector of the bill image and each down-sampling image; the target region represents a location of the counterfeit information in the bill image.

[0014] In a third aspect, the present application provides a bill image detection device, comprising a memory and a processor.

[0015] The memory stores computer execution instructions.

[0016] The processor executes the computer execution instructions stored in the memory, so that the processor executes the first aspect and / or various possible implementation manners of the first aspect.

[0017] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.

[0018] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which is executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect. The bill image detection method, device, equipment, storage medium and program product provided by the present application can acquire a bill image and extract feature information of the bill image, the bill image represents a transaction voucher, the feature vector represents crease information and ink spectrum information of the bill image, the crease information and the ink spectrum information corresponding to the feature vector are physical feature information of the bill image, not only visual content information of the bill image, the crease information and the ink spectrum information provide deeper information, such as information of multiple wave bands that cannot be perceived by the human eye, and thus have stronger anti-interference ability, thereby ensuring the accuracy of subsequent analysis. The feature vector is subjected to down-sampling processing based on at least two preset resolutions to obtain down-sampling images corresponding to the preset resolutions, and a target region is determined according to the feature vector of the bill image and each down-sampling image, so as to perform multi-scale data analysis on the feature vector of the bill image under different resolutions, instead of analyzing the feature vector under a single resolution, thereby accurately determining counterfeit information in the bill image, and improving the accuracy of the anti-counterfeiting detection of the bill image. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate one embodiment consistent with the present application and, together with the specification, serve to explain the principles of the application.

[0020] Figure 1 A flowchart of a method for detecting a bill image provided by the present application is shown in FIG. 1.

[0021] Figure 2 A flowchart of a method for determining a target region provided by the present application is shown in FIG. 2. Figure 1 ;

[0022] Figure 3 A flowchart of a method for determining a target region provided by the present application is shown in FIG. 3. Figure 2 ;

[0023] Figure 4 A flowchart of a method for determining first weight information provided by the present application is shown in FIG. 4.

[0024] Figure 5 A flowchart of a method for extracting a feature vector of a bill image provided by the present application is shown in FIG. 5.

[0025] Figure 6 A flowchart of a training process of an image denoising model provided by the present application is shown in FIG. 6. Figure 1 ;

[0026] Figure 7 A flowchart of a training process of an image denoising model provided by the present application is shown in FIG. 7. Figure 2 ;

[0027] Figure 8 A flowchart of a training process of an image denoising model provided by the present application is shown in FIG. 8. Figure 3 ;

[0028] Figure 9 A flowchart of a training process of an image denoising model provided by the present application is shown in FIG. 9. Figure 4 ;

[0029] Figure 10 A flowchart of a training process of an image denoising model provided by the present application is shown in FIG. 10. Figure 5 ;

[0030] Figure 11 A flowchart of a training process of an image denoising model provided by the present application is shown in FIG. 11. Figure 6 ;

[0031] Figure 12 A structural diagram of a bill image detection device provided by the present application is shown in FIG. 12.

[0032] Figure 13 A structural diagram of a bill image detection device provided by the present application is shown in FIG. 13.

[0033] The specific embodiments of the application have been shown by the above drawings, and will be described in more detail hereinafter. These drawings and detailed description are not intended to limit the scope of the concept of the application in any way, but to illustrate the concept of the application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0034] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The following description is made with reference to the accompanying drawings in which like reference numerals represent like elements, unless the context of use indicates otherwise. The following description of exemplary embodiments is not representative of all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0035] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards of relevant countries and regions, necessary security measures are taken, public order and good customs are not violated, and appropriate operation portals are provided for users to choose authorization or refusal.

[0036] And the present application involves big data analysis of user information (including but not limited to personal biological characteristics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and uses artificial intelligence technology for automatic decision-making, and makes technical solutions based on automatic decision-making results that have a significant impact on personal rights and interests, provides appropriate operation portals for users to choose to agree or refuse automatic decision-making results; if the user chooses to refuse, the expert decision-making process is entered.

[0037] It should be noted that the method, device, equipment, storage medium and product for detecting bill images provided by the present application can be used in the field of financial technology, and can also be used in any field other than the field of financial technology. The application field of the method, device, equipment, storage medium and product for detecting bill images in the present application is not limited.

[0038] The specific application scenarios of the present application include automatic auditing of bills in bank business. For example, after the bank system receives the bill image uploaded by the customer, potential counterfeiting traces (such as seal image processing and amount alteration) are detected to reduce the cost of manual review. The specific application scenarios of the present application also include batch anti-counterfeiting analysis of historical bill libraries to identify previously undiscovered tampering cases, thereby assisting risk control.

[0039] In related technologies, manually defined rules (such as edge detection algorithms and template matching) can be used to perform anti-counterfeiting detection using optical character recognition and morphological operations to identify counterfeit content in document images. However, manually defined rules only analyze visual content and ignore the physical anti-counterfeiting features of the document (such as infrared fluorescent marks and paper texture), which requires high image quality and results in low accuracy in anti-counterfeiting detection of highly realistic counterfeit documents or low-quality document images.

[0040] Machine learning or deep learning algorithms can also be used to extract visual features from invoice images, and then these features can be used to detect counterfeit content in the invoice images. However, extracting visual features from invoice images still requires high-quality images, resulting in low accuracy in anti-counterfeiting detection for low-quality invoice images. Furthermore, it is difficult to perform block-based detection (such as inconsistencies between the amount and signature logic), making it impossible to detect such counterfeit content.

[0041] The document image detection method provided in this application aims to solve the above-mentioned technical problems of the prior art.

[0042] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0043] Figure 1 This is a flowchart illustrating the document image detection method provided in this application. Figure 1 As shown, the method includes:

[0044] S101. Acquire the bill image and extract the feature vector of the bill image; the bill image represents the transaction certificate; the feature vector represents the crease information and ink spectrum information of the bill image.

[0045] It should be noted that the subject of this application may be an electronic device or apparatus with data processing capabilities.

[0046] For example, in response to a detection command sent by the user, the detection command instructs the anti-counterfeiting information detection of the document image, and obtains the document image and its feature vector from the detection command. The document image represents a transaction document, such as a check image or a draft image; the document image can be a color image or a black-and-white image. The feature vector represents the crease information and ink spectral information of the document image; that is, the feature vector is the feature vector corresponding to the document image, and the feature vector stores the crease information and ink spectral information extracted from the document image.

[0047] Crease information includes the location and direction of the crease in the document image, such as the coordinates and angles of the crease. It may also include the length of the crease, such as its pixel length. Ink spectral information includes infrared reflectance information of the document image, such as reflectance information in multiple infrared bands. Ink spectral information may also include ultraviolet fluorescence characteristics, such as the wavelength and intensity of visible light emitted by a specific area of ​​the document image under ultraviolet excitation.

[0048] A preset image feature extraction algorithm can be used to extract the feature vector of the ticket image. For example, machine learning algorithms or deep learning algorithms can be used to extract the feature vector of the ticket image. The extracted feature vector includes feature values ​​corresponding to multiple pixels. Each feature value includes the value of the crease information (such as the coordinate value of the crease) and the value of the ink spectrum information (such as the wavelength value of visible light) at the corresponding pixel position in the ticket image.

[0049] S102. Based on at least two preset resolutions, the feature vector is downsampled to obtain a downsampled image corresponding to the preset resolution; the downsampled image represents the feature vector after downsampling.

[0050] For example, after acquiring the ticket image and extracting its feature vector, the feature vector is downsampled based on at least two preset resolutions to obtain downsampled images corresponding to the preset resolutions. That is, the feature vector of one ticket image corresponds to at least two downsampled images. The downsampled image represents the feature vector after downsampling; that is, the information in the downsampled image includes the feature vector after downsampling.

[0051] Feature vectors can be downsampled using preset downsampling algorithms, such as nearest neighbor downsampling or bilinear interpolation. Alternatively, convolutional neural networks can be used to downsample feature vectors. For example, a preset convolution kernel (the kernel size is determined by the downsampling ratio) can be used to perform a convolution operation on the feature vectors to obtain a downsampled image.

[0052] At least two preset resolutions are lower than the resolution corresponding to the ticket image. For example, if the resolution corresponding to the ticket image is 100 pixels long and 100 pixels wide, one preset resolution is 50 pixels long and 50 pixels wide, and the other preset resolution is 25 pixels long and 25 pixels wide.

[0053] S103. Determine the target region based on the feature vector of the bill image and each downsampled image; the target region represents the location of the forged information in the bill image.

[0054] For example, after obtaining the downsampled image, the target region is determined based on the feature vector of the ticket image and each downsampled image. The target region represents the location of forged information in the ticket image; that is, the target region includes multiple locations in the ticket image where forged information exists. These locations in the ticket image are pixel positions. The forged information is counterfeit data in the ticket image, and this counterfeit data is not real data.

[0055] The location of forged information in a document image can be analyzed based on its feature vector and various downsampled images, thereby determining the target region. For example, regions in the document image that meet preset analysis conditions can be identified based on the feature vector and various downsampled images, and these regions can be designated as the target region.

[0056] Specifically, assuming the signature information in the ticket image has been tampered with, the feature values ​​corresponding to the signature area in the ticket image's feature vector and each downsampled image can be analyzed. If the feature values ​​corresponding to the signature area in the ticket image's feature vector and each downsampled image are inconsistent with the feature values ​​of the historical signature area, then the historical signature area is the signature area in images of tickets signed by the user in the past. The feature values ​​of the historical signature area are the crease information and ink spectrum information of the historical signature area. In this case, the signature area in the ticket image is determined to be the target area.

[0057] Alternatively, a relatively large region within the ticket image can be initially determined based on the downsampled image corresponding to the lowest preset resolution. This larger region includes the location of the forgery information. After initially determining the larger region, each downsampled image is analyzed sequentially according to the preset resolution from smallest to largest. Each time, the initially determined larger region is narrowed down based on the analyzed downsampled image, until the downsampled image corresponding to the largest preset resolution has been analyzed, resulting in a smaller region within the ticket image. Finally, based on this smaller region and the feature vector of the ticket image, the target region is determined, thereby finding the smallest region where the forgery information is located.

[0058] This application embodiment acquires a ticket image and extracts its feature information. The ticket image represents a transaction certificate, and the feature vector represents the crease information and ink spectral information of the ticket image. The crease information and ink spectral information corresponding to the feature vector are the physical feature information of the ticket image, providing deeper information beyond the visual content information of the ticket image, such as information in multiple bands that are imperceptible to the human eye. Therefore, it has stronger anti-interference ability, thus ensuring the accuracy of subsequent analysis. Based on at least two preset resolutions, the feature vector is downsampled to obtain downsampled images corresponding to the preset resolutions. Based on the feature vector of the ticket image and each downsampled image, the target region is determined. This enables multi-scale data analysis of the feature vectors of the ticket image at different resolutions, rather than analyzing the feature vector at a single resolution. This allows for accurate identification of counterfeit information in the ticket image, thereby improving the accuracy of anti-counterfeiting detection of the ticket image.

[0059] Figure 2 The flowchart for determining the target area provided in this application Figure 1 .like Figure 2 As shown, this embodiment... Figure 1 In the embodiment, S103 is further described, and S103 includes the following sub-steps:

[0060] S201. For each downsampled image, determine the first weight information corresponding to each pixel in the downsampled image; the first weight information characterizes the degree of influence of the pixels in the downsampled image on the detection of counterfeit information in the ticket image.

[0061] For example, for each downsampled image, first weight information is determined for each pixel in the downsampled image. The first weight information characterizes the degree of influence of the pixels in the downsampled image on the detection of counterfeit information in the document image; that is, the first weight information can be used to determine whether the information in the document image is counterfeit.

[0062] For example, the larger the first weight, the greater the probability that the image information corresponding to a pixel in the sampled image corresponding to that pixel in the sampled image is counterfeit. Conversely, the smaller the first weight, the less likely that the image information corresponding to that pixel in the ticket image is counterfeit.

[0063] Deep learning networks can be used to analyze the feature values ​​corresponding to each pixel in a downsampled image, and based on the analysis results, a first weight information can be generated for each pixel in the downsampled image. For example, a deep learning network can be used in conjunction with a pre-defined attention mechanism to analyze each pixel in the downsampled image, thereby generating corresponding first weight information for different pixels.

[0064] S202. Based on the feature vector of the bill image, determine the second weight information corresponding to each pixel in the bill image; wherein, the second weight information characterizes the degree of influence of the pixel in the bill image on the detection of counterfeit information in the bill image.

[0065] For example, based on the feature vector of the ticket image, second weight information corresponding to each pixel in the ticket image is determined. The second weight information characterizes the degree of influence of each pixel in the ticket image on the detection of counterfeit information in the ticket image; that is, the second weight information can be used to determine whether the information in the ticket image is counterfeit.

[0066] For example, the larger the second weight, the greater the probability that the image information corresponding to a pixel in the ticket image corresponding to that second weight is counterfeit. Conversely, the smaller the weight, the less likely that the image information corresponding to that pixel in the ticket image is counterfeit.

[0067] Deep learning networks can be used to analyze the feature values ​​in the feature vectors corresponding to each pixel in a ticket image. Based on the analysis results, a second weight information can be generated for each pixel in the ticket image. For example, a deep learning network combined with a pre-defined attention mechanism can be used to analyze each pixel in the ticket image, thereby generating corresponding second weight information for different pixels.

[0068] S203. Determine the target region based on the first weight information corresponding to each pixel in each downsampled image and the second weight information of each pixel in the ticket image.

[0069] For example, after determining the first weight information and the second weight information, the target region is determined based on the first weight information corresponding to each pixel in each downsampled image and the second weight information of each pixel in the ticket image.

[0070] For example, for each first weight information and each second weight information, it can be used to determine whether the information in the ticket image is counterfeit. For each second weight information, the corresponding first weight information in each sampled image can be found. That is, the pixel in the ticket image corresponding to the second weight information corresponds to the pixel in the downsampled image corresponding to the first weight information. In other words, the pixel in the ticket image corresponding to the second weight information is downsampled to obtain the pixel in the downsampled image corresponding to the first weight information. Therefore, the second weight information and multiple first weight information corresponding to the second weight information can be aggregated to obtain an aggregated weight, which corresponds to the aggregated weight of a pixel in the ticket image. Based on this aggregated weight, it can be determined whether the image information of the pixel in the ticket image corresponding to the aggregated weight is counterfeit. The multiple pixels in the ticket image corresponding to all image information determined to be counterfeit information are the target region.

[0071] In this embodiment, for each downsampled image, a first weight information corresponding to each pixel in the downsampled image is determined. This first weight information provides a basis for subsequent judgment on whether the information in the document image is counterfeit. Based on the feature vector of the document image, a second weight information corresponding to each pixel in the document image is determined. This second weight information also provides a basis for subsequent judgment on whether the information in the document image is counterfeit. Based on the first weight information corresponding to each pixel in each downsampled image and the second weight information of each pixel in the document image, the target region is determined. Multiple sampled images at different resolutions can be analyzed in parallel, thereby analyzing the feature information of the document image at different resolutions and determining the probability that the image information corresponding to each pixel is counterfeit at different resolutions. Then, the analysis results at different resolutions are aggregated to obtain the total probability that the image information corresponding to each pixel is counterfeit. The focus of the analysis on the document image differs at different resolutions, thus ensuring the reliability of the data analysis and improving the analysis effect, i.e., improving the accuracy of the determined target region.

[0072] Figure 3 The flowchart for determining the target area provided in this application Figure 2 .like Figure 3 As shown, this embodiment... Figure 2 S203 in the embodiment is further described, and the method includes:

[0073] S301. For each downsampled image, determine the first weight information corresponding to each pixel in the downsampled image; the first weight information characterizes the degree of influence of the pixels in the downsampled image on the detection of counterfeit information in the ticket image.

[0074] The execution process of S301 is the same as that of S201, and will not be described again here.

[0075] S302. Based on the feature vector of the bill image, determine the second weight information corresponding to each pixel in the bill image; wherein, the second weight information characterizes the degree of influence of the pixel in the bill image on the detection of counterfeit information in the bill image.

[0076] The execution process of S302 is the same as that of S202, and will not be described again here.

[0077] S303. For each pixel in each downsampled image, determine at least one mapping point in the ticket image corresponding to the pixel in the downsampled image; wherein the mapping point represents the pixel in the ticket image.

[0078] For example, for each pixel in each downsampled image, at least one mapping point in the ticket image corresponding to the pixel in the downsampled image is determined. Here, the mapping point represents the pixel in the ticket image; that is, for each pixel in each downsampled image, the pixel corresponds to at least one pixel in the ticket image.

[0079] For example, for each pixel in each downsampled image, determine at least one mapping point in the ticket image that corresponds to the pixel in the downsampled image, and downsample that at least one mapping point to obtain the pixel.

[0080] S304. For each mapping point in the bill image, determine the target weight information of the mapping point based on the first weight information of the pixel in the downsampled image corresponding to the mapping point and the second weight information of the mapping point; the target weight information characterizes the possibility that the pixel in the bill image is counterfeit information.

[0081] For example, for each pixel in each downsampled image, after determining at least one mapping point in the ticket image corresponding to the pixel in the downsampled image, for each mapping point in the ticket image, target weight information of the mapping point is determined based on the first weight information of the pixels in each downsampled image corresponding to the mapping point and the second weight information of the mapping point. The target weight information characterizes the probability that the pixel in the ticket image is counterfeit information.

[0082] For example, target weight information can be determined by multiplying the first weight information of pixels in each downsampled image corresponding to the mapping point with the second weight information of the mapping point. The target weight information includes the product, meaning it comprises multiple products of first and second weight information. The beneficial effect of this is that by successively multiplying the second weight with multiple first weights, each multiplication suppresses non-forged information in the document image while preserving forged information. Specifically, pixels corresponding to non-forged information in the document image have smaller second weight values, while pixels corresponding to forged information have larger second weight values. This continuously suppresses non-forged information and preserves forged information, ultimately identifying the forged information in the document image.

[0083] S305. Determine the target region based on the target weight information of each pixel in the ticket image.

[0084] For example, after determining the target weight information of the mapping points, the target region is determined based on the target weight information of each pixel in the ticket image.

[0085] For example, for each pixel in a ticket image, the product of the pixel value and the target weight information can be calculated. If the product is greater than or equal to a preset product threshold, the pixel is determined to belong to the target region; otherwise, the pixel is determined not to belong to the target region. The preset product threshold can be set based on historical data analysis.

[0086] After determining the target weight information, all pixels belonging to the target area can be marked in the form of a heatmap. The heatmap marks all pixels in the target area, while other pixels are not marked, so that users can verify forged information.

[0087] In this embodiment, for each pixel in each sampled image, at least one mapping point is determined in the ticket image corresponding to the pixel in the downsampled image. For each mapping point in the ticket image, the target weight information of the mapping point is determined based on the first weight information of the pixel in the downsampled image corresponding to the mapping point and the second weight information of the mapping point. Based on the target weight information of each pixel in the ticket image, the target region is determined. This can achieve the effect of gradually suppressing non-forged information in the ticket image while retaining forged information in the ticket image, and finally finding the forged information in the ticket image. At the same time, the target region is displayed to the user using a heatmap, which makes it convenient for the user to verify the forged information in the ticket image.

[0088] Figure 4 This application provides a flowchart illustrating the process for determining the first weight information. For example... Figure 4 As shown, this embodiment... Figure 2In the embodiment, S201 is further explained. The determination of each pixel information in the downsampled image in S201 includes the following sub-steps:

[0089] S401. Based on a preset attention mechanism, determine the third weight information corresponding to each pixel in the downsampled image and the fourth weight information corresponding to each pixel in the downsampled image; the third weight information characterizes the influence of the color information of the pixels in the bill image on the detection of counterfeit information; the fourth weight information characterizes the influence of the feature information of the pixels in the bill image on the detection of counterfeit information, and the feature information characterizes the features of crease information and ink spectral information.

[0090] For example, based on a preset attention mechanism, third weight information and fourth weight information corresponding to each pixel in the downsampled image are determined. The third weight information characterizes the influence of the color information of pixels in the document image on the detection of counterfeit information; that is, the color information can be used to determine whether the information in the document image is counterfeit. The fourth weight information characterizes the influence of the feature information of pixels in the document image on the detection of counterfeit information. The feature information characterizes the features of crease information and ink spectral information; that is, the crease information and ink spectral information can be used to determine whether the information in the document image is counterfeit.

[0091] Color information refers to the channel information in the ticket image. For example, if the ticket image is a three-channel color image, the corresponding feature vector also includes three-channel feature vectors. Downsampling the feature vectors of the ticket image yields a three-channel image. Therefore, for each pixel in the downsampled image, that pixel corresponds to one channel. A pre-defined attention mechanism can be used to determine the third weight information corresponding to each pixel in the downsampled image. If the focus in ticket anti-counterfeiting detection is on counterfeit seal information, the pre-defined attention mechanism will increase the weight of the red channel (i.e., the channel corresponding to red ink). That is, for each pixel in the ticket image, if the pixel is a pixel of the red channel, the third weight information corresponding to that pixel is larger. If the pixel is a pixel of another channel, such as a pixel of the green or blue channel, the third weight information corresponding to that pixel is smaller.

[0092] The feature information includes crease information and ink spectrum information. A deep learning network can be used to analyze the feature information corresponding to each pixel in the downsampled image. Based on the analysis results, a fourth weight information is generated for each pixel in the downsampled image. For example, a deep learning network combined with a pre-defined attention mechanism can be used to analyze the feature information corresponding to each pixel in the downsampled image, thereby generating corresponding fourth weight information for pixels with different feature information.

[0093] S402. Determine the first weight information corresponding to the pixels in the downsampled image based on the third and fourth weight information corresponding to the pixels in the downsampled image.

[0094] For example, after determining the third weight information corresponding to each pixel in the downsampled image and the fourth weight information corresponding to each pixel in the downsampled image, the first weight information corresponding to each pixel in the downsampled image is determined based on the third weight information and the fourth weight information corresponding to each pixel in the downsampled image.

[0095] For example, for each pixel in any downsampled image, calculate the product of the third weight information corresponding to the pixel and the third weight information corresponding to the pixel. Based on the product, determine the first weight information of the pixel in the downsampled image. The first weight information of the pixel in the downsampled image includes the product.

[0096] In these embodiments, by determining the third weight information and the fourth weight information corresponding to each pixel in the downsampled image based on a preset attention mechanism, the color information and feature information of the ticket image can be analyzed separately. Both the color information and feature information of the ticket image can serve as criteria for determining whether the image information is counterfeit, further enriching the information available for determining whether the image information is counterfeit. Based on the third and fourth weight information corresponding to the pixels in the downsampled image, the first weight information corresponding to the pixels in the downsampled image is determined, fusing the color information and feature information of the ticket image, thereby improving the accuracy of the first weight information.

[0097] Figure 5 This is a schematic diagram of the process for extracting feature vectors from a document image provided in this application, as shown below. Figure 5 As shown, this embodiment... Figure 1 S101 in the embodiment will be further explained. The extraction of the feature vector of the ticket image in S101 includes the following sub-steps:

[0098] S501. Input the ticket image into the pre-trained image denoising model to obtain the denoised ticket image.

[0099] For example, after acquiring the ticket image, the ticket image is input into a pre-trained image denoising model to obtain a denoised ticket image. The pre-trained image denoising model is used to denoise the image.

[0100] For example, a pre-trained image denoising model can be a trained deep learning model.

[0101] S502. Extract the feature vector of the denoised ticket image.

[0102] For example, after obtaining the denoised ticket image, the feature vector of the denoised ticket image is extracted. That is, the feature vector of the denoised ticket image is used for subsequent data analysis. The execution process of extracting the feature vector of the denoised ticket image is the same as the execution process of extracting the feature vector of the ticket image in S101, and will not be described again here.

[0103] In this embodiment, by inputting the ticket image into a pre-trained image denoising model, a denoised ticket image is obtained, and the feature vector of the denoised ticket image is extracted, which improves the accuracy of the extracted feature vector. Using the feature vector of the denoised ticket image for subsequent data analysis can yield more accurate data analysis results, that is, a more accurate target region can be obtained.

[0104] Figure 6 A flowchart illustrating the training process of the image denoising model provided in this application. Figure 1 ,like Figure 6 As shown, the above method also includes the following steps:

[0105] S601. Based on the initial model, noise is added to the training image to obtain a noisy image; the training image is an image without noise, and the noisy image represents the training image with added preset noise information.

[0106] For example, based on the initial model, noise is added to the training images to obtain noisy images. The training images are noise-free images, while the noisy images represent the training images with added pre-defined noise information. The initial model is the model to be trained. There are multiple training images. Each training image corresponds to a noisy image.

[0107] The initial model can be a deep learning model to be trained.

[0108] Preset algorithms can be used to add noise to the training images. For example, a preset Gaussian noise generation algorithm can be used to generate Gaussian noise, which can then be added to the training images.

[0109] S602. Denoise the noisy image to obtain a denoised image.

[0110] For example, after obtaining a noisy image, the noisy image is denoised to obtain a denoised image.

[0111] For example, the initial model uses a pre-defined image denoising algorithm to denoise noisy images, resulting in a denoised image. The benefit of this is that it teaches the initial model how to denoise noisy images, allowing the model parameters to be adjusted so that the trained model has stronger image denoising capabilities.

[0112] S603. Based on the image to be trained and the denoised image, train the initial model to obtain the trained image denoising model.

[0113] For example, an initial model is trained based on the image to be trained and the denoised image to obtain a trained image denoising model. For instance, for each image to be trained and its corresponding denoised image, the difference between the image to be trained and the corresponding denoised image can be calculated. Based on minimizing the difference, the initial model is trained to obtain a trained image denoising model.

[0114] In this embodiment, the training image is denoised according to the initial model to obtain a noisy image. The noisy image is then denoised to obtain a denoised image. The initial model is then trained based on the training image and the denoised image to obtain a complete image denoising model. Through training, the model learns how to denoise images so that it can be used for model inference on ticket images in the future, thereby obtaining a high-quality denoised image for anti-counterfeiting detection.

[0115] In a specific embodiment, the step S601 above, which involves adding noise to the training image to obtain a noisy image, includes the following sub-steps:

[0116] First, according to the preset noise addition order, preset noise information is added to the training image to obtain a noisy image; wherein, the noisy image represents the image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image.

[0117] Second, the image with added noise corresponding to the last noise-adding step in the preset noise-adding sequence is determined as the noise image corresponding to the image to be trained.

[0118] Figure 7 A flowchart illustrating the training process of the image denoising model provided in this application. Figure 2 ,like Figure 7 As shown, this embodiment... Figure 6 S601 in the embodiment will be further described. The above method includes:

[0119] S701. According to the preset noise addition order, add preset noise information to the training image to obtain a noisy image; wherein, the noisy image represents the image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image.

[0120] For example, according to a preset noise addition order, preset noise information is added to the training image to obtain a noisy image. The noisy image represents the image with the preset noise information added. The preset noise addition order includes at least two noise addition steps, each corresponding to a preset noise information and a noisy image. That is, the first noise addition step adds the preset noise information corresponding to that step to the training image. The training image with the preset noise information added is the noisy image corresponding to that step, and the preset noise information added in that step is the preset noise information corresponding to that step.

[0121] The second noise-adding step adds the preset noise information corresponding to the first noise-adding step to the noise-adding image. The noise-adding image with the preset noise information is the noise-adding image corresponding to the first step. The preset noise information added in this step is the preset noise information corresponding to the first step.

[0122] The preset noise information can be noise information generated by a preset noise algorithm.

[0123] S702. The noise image corresponding to the last noise addition step in the preset noise addition sequence is determined as the noise image corresponding to the image to be trained.

[0124] For example, the image with added noise corresponding to the last noise-adding step in the preset noise-adding sequence is determined as the noise image corresponding to the image to be trained.

[0125] For example, if the preset noise addition sequence includes two noise addition steps, then the noise-added image corresponding to the second step is determined to be the noise image corresponding to the image to be trained, that is, the noise image corresponding to the image to be trained is the noise-added image corresponding to the second step.

[0126] S703. Denoise the noisy image to obtain a denoised image.

[0127] The execution process of S703 is the same as that of S602, and will not be described again here.

[0128] S704. Based on the image to be trained and the denoised image, train the initial model to obtain the trained image denoising model.

[0129] The execution process of S704 is the same as that of S603, and will not be described again here.

[0130] In this embodiment, a preset noise information is added to the training image according to a preset noise addition order to obtain a noisy image. The preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image. The noisy image corresponding to the last noise addition step in the noise addition order is determined as the noise information corresponding to the training image. This can increase the difficulty and diversity of the training data, thereby forcing the model to learn more essential noise information, such as the noise generation process and the characteristics of the noise generated in each process, rather than just remembering a certain noise feature of the sample. This improves the model's ability to recognize noise.

[0131] In one specific embodiment, S703 above includes the following sub-steps:

[0132] First, according to the preset denoising order, determine the noise extraction information in the noisy image and the intermediate image after removing the noise extraction information; wherein, the preset denoising order includes at least two denoising steps, each denoising step corresponding to a noise extraction information and an intermediate image; the noise addition step and the denoising step correspond one-to-one.

[0133] Second, the intermediate image corresponding to the last denoising step in the preset denoising sequence is determined as the denoised image.

[0134] Figure 8 A flowchart illustrating the training process of the image denoising model provided in this application. Figure 3 ,like Figure 8 As shown, this embodiment... Figure 7 S703 in the embodiment will be further described. The above method includes:

[0135] S801. According to the preset noise addition order, add preset noise information to the training image to obtain a noisy image; wherein, the noisy image represents the image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image.

[0136] The execution process of S801 is the same as that of S701, and will not be described again here.

[0137] S802. The noise image corresponding to the last noise addition step in the preset noise addition sequence is determined as the noise image corresponding to the image to be trained.

[0138] The execution process of S802 is the same as that of S702, and will not be described again here.

[0139] S803. According to the preset denoising order, determine the noise extraction information in the noisy image and the intermediate image after removing the noise extraction information; wherein, the preset denoising order includes at least two denoising steps, each denoising step corresponds to a noise extraction information and an intermediate image; the noise addition step and the denoising step correspond one-to-one.

[0140] For example, according to a preset denoising order, noise extraction information in the noisy image and an intermediate image after removing the noise extraction information are determined. The preset denoising order includes at least two denoising stages, each corresponding to a type of noise extraction information and an intermediate image; the noise addition stage and the denoising stage are in one-to-one correspondence. That is, each noise addition stage corresponds to each denoising stage. This denoising stage generates noise extraction information to remove the noise extraction information from the noisy image generated by the corresponding noise addition stage, and generates an intermediate image, which is the denoised image of the noisy image generated by the corresponding noise addition stage. The generated noise extraction information is the noise extraction information corresponding to the denoising stage, and the generated intermediate image is the intermediate image corresponding to the denoising stage.

[0141] The preset denoising order is the reverse of the preset noise addition order. For example, if the preset noise addition order generates a first noisy image and a second noisy image in sequence, the preset denoising order generates a second intermediate image and a first intermediate image in sequence. The first noisy image corresponds to the first intermediate image, and the second noisy image corresponds to the second intermediate image.

[0142] The noise extraction algorithm can be used to determine the noise information in a noisy image, such as a filtering-based noise extraction algorithm or a deep learning-based noise extraction algorithm. Then, a pre-defined denoising algorithm, such as a deep learning-based denoising algorithm, can be used to remove the noise information from the noisy image, thus obtaining an intermediate image. Different pre-defined noise extraction algorithms or different pre-defined denoising algorithms will have different model parameters in their corresponding image denoising models.

[0143] S804. The intermediate image corresponding to the last denoising step in the preset denoising sequence is determined as the denoised image.

[0144] For example, the intermediate image corresponding to the last denoising step in the preset denoising sequence is determined as the denoised image. For instance, if the preset denoising sequence includes two denoising steps, then the intermediate image corresponding to the second denoising step is determined as the denoised image. That is, the denoised image is the intermediate image corresponding to the second step.

[0145] S805. Based on the image to be trained and the denoised image, train the initial model to obtain the trained image denoising model.

[0146] The execution process of S805 is the same as that of S704, and will not be described again here.

[0147] In this embodiment, noise extraction information in the noisy image and intermediate images after removing the noise extraction information are determined according to a preset denoising order. The preset denoising order includes at least two denoising steps, with each denoising step corresponding to a denoising step. The intermediate image corresponding to the last denoising step in the preset denoising order is determined as the denoised image. This forces the model to learn the noise generation process and the noise features generated in each process, and gradually remove the noise extraction information from the noisy image corresponding to the training image, rather than removing all noise information at once. This achieves refined noise removal processing and improves the model's noise removal capability.

[0148] In one specific embodiment, S805 above includes the following sub-steps:

[0149] First, for each noise addition stage and the corresponding noise removal stage, based on the preset noise information of the noise addition stage and the noise extraction information of the corresponding noise removal stage, a first difference information is determined based on a preset first loss function; wherein, the preset first loss function is used to determine the difference between the preset noise information and the noise extraction information, and the first difference information characterizes the difference between the preset noise information and the noise extraction information.

[0150] Second, based on the first difference information, the initial model is trained to obtain the trained image denoising model.

[0151] Figure 9 A flowchart illustrating the training process of the image denoising model provided in this application. Figure 4 ,like Figure 9 As shown, this embodiment... Figure 8 S805 in the embodiment will be further described. The above method includes:

[0152] S901. According to the preset noise addition order, add preset noise information to the training image to obtain a noisy image; wherein, the noisy image represents the image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image.

[0153] The execution process of S901 is the same as that of S801, and will not be described again here.

[0154] S902. The noise image corresponding to the last noise addition step in the preset noise addition sequence is determined as the noise image corresponding to the image to be trained.

[0155] The execution process of S902 is the same as that of S802, and will not be described again here.

[0156] S903. According to the preset denoising order, determine the noise extraction information in the noisy image and the intermediate image after removing the noise extraction information; wherein, the preset denoising order includes at least two denoising steps, each denoising step corresponds to a noise extraction information and an intermediate image; the noise addition step and the denoising step correspond one-to-one.

[0157] The execution process of S903 is the same as that of S803, and will not be described again here.

[0158] S904. For each noise-adding stage and the corresponding noise-removing stage, based on the preset noise information of the noise-adding stage and the noise extraction information of the corresponding noise-removing stage, a first difference information is determined based on a preset first loss function; wherein, the preset first loss function is used to determine the difference between the preset noise information and the noise extraction information, and the first difference information characterizes the difference between the preset noise information and the noise extraction information.

[0159] For example, for each noise-adding stage and its corresponding noise-removing stage, a first difference information is determined based on the preset noise information of the noise-adding stage and the noise extraction information of the corresponding noise-removing stage, using a preset first loss function. The preset first loss function is used to determine the difference between the preset noise information and the noise extraction information, and the first difference information characterizes the difference between the preset noise information and the noise extraction information.

[0160] For example, the first loss function calculates the difference between the preset noise information of each noise-adding stage and the noise extraction information of the corresponding noise-removing stage. For instance, the first loss function calculates the Euclidean distance between the preset noise information of the noise-adding stage and the noise extraction information of the corresponding noise-removing stage. The larger the Euclidean distance, the larger the difference; conversely, the smaller the difference, the smaller the difference. Based on the function value of the first loss function, the first difference information is determined, such as the calculated difference value.

[0161] S905. Based on the first difference information, train the initial model to obtain the trained image denoising model.

[0162] For example, after determining the first difference information, the initial model is trained based on the first difference information to obtain the trained image denoising model.

[0163] For example, the initial model is trained by minimizing the sum of the first difference information corresponding to all noise-adding steps, resulting in a trained image denoising model.

[0164] In this embodiment, for each noise addition stage corresponding to a noise removal stage, based on the preset noise information of the noise addition stage and the noise extraction information of the corresponding noise removal stage, a first difference information is determined based on a preset first loss function. Based on the first difference information, the initial model is trained to obtain a trained image denoising model. This can force the model to remove noise information more accurately. The removed noise information is closest to the noise information added to the image to be trained, thereby improving the model's denoising ability.

[0165] In one specific embodiment, S805 above includes the following sub-steps:

[0166] First, for each noise-adding stage and its corresponding denoising stage, crease information is extracted from the noise-adding image corresponding to the noise-adding stage, which is the first information, and crease information is extracted from the intermediate image corresponding to the denoising stage, which is the second information.

[0167] Second, based on the first information and the second information, and using a preset second loss function, a second difference information is determined; wherein, the preset second loss function is used to determine the difference between the crease information in the noisy image and the crease information in the intermediate image, and the second difference information characterizes the difference between the crease information in the noisy image and the crease information in the intermediate image.

[0168] Third, based on the second difference information, the initial model is trained to obtain the trained image denoising model.

[0169] Figure 10 A flowchart illustrating the training process of the image denoising model provided in this application. Figure 5 ,like Figure 10 As shown, this embodiment... Figure 8 S805 in the embodiment will be further described. The above method includes:

[0170] S1001. According to the preset noise addition order, add preset noise information to the training image to obtain a noisy image; wherein, the noisy image represents the image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image.

[0171] The execution process of S1001 is the same as that of S801, and will not be described again here.

[0172] S1002. The noise image corresponding to the last noise addition step in the preset noise addition sequence is determined as the noise image corresponding to the image to be trained.

[0173] The execution process of S1002 is the same as that of S802, and will not be described again here.

[0174] S1003. According to the preset denoising order, determine the noise extraction information in the noisy image and the intermediate image after removing the noise extraction information; wherein, the preset denoising order includes at least two denoising steps, each denoising step corresponds to a noise extraction information and an intermediate image; the noise addition step and the denoising step correspond one-to-one.

[0175] The execution process of S1003 is the same as that of S803, and will not be described again here.

[0176] S1004. For each noise-adding stage and the corresponding noise-removing stage, extract crease information from the noise-adding image corresponding to the noise-adding stage as the first information, and extract crease information from the intermediate image corresponding to the corresponding noise-removing stage as the second information.

[0177] For example, for each noise-adding stage and the corresponding noise-reducing stage, crease information is extracted from the noise-adding image corresponding to the noise-adding stage as the first information, and crease information is extracted from the intermediate image corresponding to the corresponding noise-reducing stage as the second information.

[0178] For example, a preset crease information extraction algorithm, such as a deep learning-based crease information extraction algorithm, can be used to extract crease information from a noisy image as the first information, and the preset crease information extraction algorithm can also be used to extract crease information from the intermediate image corresponding to the denoising stage as the second information.

[0179] S1005. Based on the first information and the second information, determine the second difference information based on the preset second loss function; wherein, the preset second loss function is used to determine the difference between the crease information in the noisy image and the crease information in the intermediate image, and the second difference information characterizes the difference between the crease information in the noisy image and the crease information in the intermediate image.

[0180] For example, based on the first information and the second information, and using a preset second loss function, second difference information is determined. The preset second loss function is used to determine the difference between the crease information in the noisy image and the crease information in the intermediate image, and the second difference information characterizes the difference between the crease information in the noisy image and the crease information in the intermediate image.

[0181] For example, the second loss function calculates the difference between the first information and the corresponding second information for each noisy step. This difference is calculated by the Euclidean distance between the first and second information for each noisy step; a larger Euclidean distance indicates a larger difference, and vice versa. Based on the value of the second loss function, the second difference information is determined, such as the calculated difference value.

[0182] S1006. Based on the second difference information, train the initial model to obtain the trained image denoising model.

[0183] For example, after determining the second difference information, the initial model is trained based on the second difference information to obtain a trained image denoising model.

[0184] For example, the initial model is trained by minimizing the sum of the second difference information corresponding to all noise-adding steps, resulting in a trained image denoising model.

[0185] In this embodiment, for each noise-adding stage, crease information is extracted from the noise-added image corresponding to the noise-adding stage (as first information), and crease information is extracted from the intermediate image corresponding to the denoising stage (as second information). Based on the first and second information, a second difference information is determined using a preset second loss function. The initial model is then trained based on the second difference information to obtain a trained image denoising model. This forces the model to remove noise information more accurately, resulting in the denoised image retaining more crease information from the training image. When the trained image denoising model is used to process the ticket image subsequently, more crease information from the ticket image can be retained, thus ensuring the quality of the extracted feature vector of the ticket image and improving the accuracy of anti-counterfeiting detection of the ticket image.

[0186] In one specific embodiment, S805 above includes the following sub-steps:

[0187] First, for each noise-adding stage and its corresponding noise-removing stage, ink spectral information is extracted from the noise-adding image corresponding to the noise-adding stage, which is the third information, and ink spectral information is extracted from the intermediate image corresponding to the corresponding noise-removing stage, which is the fourth information.

[0188] Second, based on the third and fourth information, and using a preset third loss function, the third difference information is determined; wherein, the preset third loss function is used to determine the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image, and the third difference information characterizes the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image.

[0189] Third, based on the third difference information, the initial model is trained to obtain the trained image denoising model.

[0190] Figure 11 A flowchart illustrating the training process of the image denoising model provided in this application. Figure 6 ,like Figure 11 As shown, this embodiment... Figure 8 S805 in the embodiment will be further described. The above method includes:

[0191] S1101. According to the preset noise addition order, add preset noise information to the training image to obtain a noisy image; wherein, the noisy image represents the image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image.

[0192] The execution process of S1101 is the same as that of S801, and will not be described again here.

[0193] S1102. The noise image corresponding to the last noise addition step in the preset noise addition sequence is determined as the noise image corresponding to the image to be trained.

[0194] The execution process of S1102 is the same as that of S802, and will not be described again here.

[0195] S1103. According to the preset denoising order, determine the noise extraction information in the noisy image and the intermediate image after removing the noise extraction information; wherein, the preset denoising order includes at least two denoising steps, each denoising step corresponds to a noise extraction information and an intermediate image; the noise addition step and the denoising step correspond one-to-one.

[0196] The execution process of S1103 is the same as that of S803, and will not be described again here.

[0197] S1104. For each noise-adding stage and the corresponding noise-removing stage, ink spectral information is extracted from the noise-adding image corresponding to the noise-adding stage as the third information, and ink spectral information is extracted from the intermediate image corresponding to the corresponding noise-removing stage as the fourth information.

[0198] For example, for each noise-adding stage and the corresponding noise-reducing stage, ink spectral information is extracted from the noise-adding image corresponding to the noise-adding stage as the third information, and ink spectral information is extracted from the intermediate image corresponding to the corresponding noise-reducing stage as the fourth information.

[0199] For example, a preset ink spectral information extraction algorithm, such as a deep learning-based ink spectral information extraction algorithm, can be used to extract the ink spectral information in the noisy image as the third information. The preset ink spectral information extraction algorithm can also be used to extract the ink spectral information in the intermediate image corresponding to the denoising step as the fourth information.

[0200] S1105. Based on the third information and the fourth information, and based on the preset third loss function, determine the third difference information; wherein, the preset third loss function is used to determine the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image, and the third difference information characterizes the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image.

[0201] For example, based on the third and fourth information, a third difference information is determined using a preset third loss function. The preset third loss function is used to determine the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image, and the third difference information characterizes the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image.

[0202] For example, the third loss function calculates the difference between the third and fourth information corresponding to each noise-adding stage. This difference is calculated by the Euclidean distance between the third and fourth information corresponding to each noise-adding stage; a larger Euclidean distance indicates a greater difference, and vice versa. Based on the value of the third loss function, the third difference information is determined, which is the calculated difference value.

[0203] S1106. Based on the third difference information, train the initial model to obtain the trained image denoising model.

[0204] For example, after determining the third difference information, the initial model is trained based on the third difference information to obtain a trained image denoising model.

[0205] For example, the initial model is trained by minimizing the sum of the third difference information corresponding to all noise-adding steps, resulting in a trained image denoising model.

[0206] In this embodiment, for each noise-adding stage, ink spectral information is extracted from the noise-adding image corresponding to the noise-adding stage (as the third information), and ink spectral information is extracted from the intermediate image corresponding to the noise-de-sensing stage (as the fourth information). Based on the third and fourth information, a third difference information is determined based on a preset third loss function. The initial model is then trained based on the third difference information to obtain a trained image denoising model. This forces the model to remove noise information more accurately, so that the noise-removed image retains more ink spectral information from the image to be trained. When the trained image denoising model is used to process the ticket image in the future, more ink spectral information from the ticket image can be retained, thereby ensuring the quality of the extracted feature vector of the ticket image and improving the accuracy of anti-counterfeiting detection of the ticket image.

[0207] In some specific implementations, the initial model can be trained based on the first difference information, the second difference information, and the third difference information to obtain a trained image denoising model.

[0208] For example, the initial model is trained by minimizing the sum of the first difference information, the second difference information, and the third difference information corresponding to all noise addition steps, to obtain the trained image denoising model.

[0209] Figure 12 A schematic diagram of the structure of the document image detection device provided in this application is shown below. Figure 12 As shown, the document image detection device 120 provided in this embodiment includes:

[0210] The acquisition module 1201 is used to acquire the bill image and extract the feature vector of the bill image; the bill image represents the transaction certificate; the feature vector represents the crease information and ink spectrum information of the bill image;

[0211] The sampling module 1202 is used to perform downsampling processing on the feature vector based on at least two preset resolutions to obtain a downsampled image corresponding to the preset resolution; the downsampled image represents the feature vector after downsampling processing.

[0212] The determination module 1203 is used to determine the target region based on the feature vector of the bill image and each downsampled image; the target region represents the location of the forgery information in the bill image.

[0213] In one possible implementation, the determining module 1203 is further configured to:

[0214] For each downsampled image, determine the first weight information corresponding to each pixel in the downsampled image; the first weight information represents the degree of influence of the pixel in the downsampled image on the detection of counterfeit information in the ticket image; determine the second weight information corresponding to each pixel in the ticket image based on the feature vector of the ticket image; wherein, the second weight information represents the degree of influence of the pixel in the ticket image on the detection of counterfeit information in the ticket image; determine the target region based on the first weight information corresponding to each pixel in each downsampled image and the second weight information of each pixel in the ticket image.

[0215] In one possible implementation, the determining module 1203 is further configured to:

[0216] For each pixel in each downsampled image, at least one mapping point in the ticket image corresponding to the pixel in the downsampled image is determined; wherein, the mapping point represents the pixel in the ticket image; for each mapping point in the ticket image, target weight information of the mapping point is determined according to the first weight information of the pixel in the downsampled image corresponding to the mapping point and the second weight information of the mapping point; the target weight information represents the probability that the pixel in the ticket image is counterfeit information; the target region is determined according to the target weight information of each pixel in the ticket image.

[0217] In one possible implementation, the determining module 1203 is further configured to:

[0218] Based on a pre-defined attention mechanism, the third weight information and the fourth weight information corresponding to each pixel in the downsampled image are determined. The third weight information represents the influence of the color information of the pixels in the downsampled image on the detection of forgery information. The fourth weight information represents the influence of the feature information of the pixels in the downsampled image on the detection of forgery information. The feature information represents the features of crease information and ink spectral information. Based on the third and fourth weight information corresponding to the pixels in the downsampled image, the first weight information corresponding to the pixels in the downsampled image is determined.

[0219] In one possible implementation, the acquisition module 1201 is further configured to:

[0220] The ticket image is input into a pre-trained image denoising model to obtain a denoised ticket image; the feature vector of the denoised ticket image is then extracted.

[0221] In one possible implementation, the ticket image detection device 120 further includes a model training module for:

[0222] Based on the initial model, the training image is denoised to obtain a noisy image; the training image is a noise-free image, and the noisy image represents the training image with added preset noise information; the noisy image is denoised to obtain a denoised image; the initial model is trained based on the training image and the denoised image to obtain a trained image denoising model.

[0223] In one possible implementation, the model training module is further used for:

[0224] According to a preset noise addition order, preset noise information is added to the training image to obtain a noisy image; wherein, the noisy image represents the image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image; the noisy image corresponding to the last noise addition step in the preset noise addition order is determined as the noise image corresponding to the training image.

[0225] In one possible implementation, the model training module is further used for:

[0226] According to the preset denoising order, noise extraction information in the noisy image and intermediate image after removing noise extraction information are determined; wherein, the preset denoising order includes at least two denoising steps, each denoising step corresponds to a noise extraction information and an intermediate image; the noise addition step and the denoising step correspond one-to-one; the intermediate image corresponding to the last denoising step in the preset denoising order is determined as the denoised image.

[0227] In one possible implementation, the model training module is further used for:

[0228] For each noise addition stage and its corresponding denoising stage, a first difference information is determined based on the preset noise information of the noise addition stage and the noise extraction information of the corresponding denoising stage, using a preset first loss function. The preset first loss function is used to determine the difference between the preset noise information and the noise extraction information, and the first difference information characterizes the difference between the preset noise information and the noise extraction information. The initial model is trained based on the first difference information to obtain the trained image denoising model.

[0229] In one possible implementation, the model training module is further used for:

[0230] For each noise-adding stage and its corresponding denoising stage, crease information is extracted from the noise-adding image corresponding to the noise-adding stage, which is the first information, and crease information is extracted from the intermediate image corresponding to the denoising stage, which is the second information. Based on the first information and the second information, a second difference information is determined using a preset second loss function. The preset second loss function is used to determine the difference between the crease information in the noise-adding image and the crease information in the intermediate image, and the second difference information represents the difference between the crease information in the noise-adding image and the crease information in the intermediate image. Based on the second difference information, the initial model is trained to obtain the trained image denoising model.

[0231] In one possible implementation, the model training module is further used for:

[0232] For each noise addition stage and its corresponding denoising stage, ink spectral information is extracted from the noise-added image corresponding to the noise addition stage, which is the third information, and ink spectral information is extracted from the intermediate image corresponding to the denoising stage, which is the fourth information. Based on the third and fourth information, a third difference information is determined based on a preset third loss function. The preset third loss function is used to determine the difference between the ink spectral information in the noise-added image and the ink spectral information in the intermediate image. The third difference information characterizes the difference between the ink spectral information in the noise-added image and the ink spectral information in the intermediate image. Based on the third difference information, the initial model is trained to obtain the trained image denoising model.

[0233] Figure 13 This is a schematic diagram of the structure of the document image detection device provided in this embodiment. Figure 13 As shown, the document image detection device 130 provided in this embodiment includes at least one processor 1301 and a memory 1302. Optionally, the document image detection device 130 further includes a communication component 1303. The processor 1301, memory 1302, and communication component 1303 are connected via a bus.

[0234] In a specific implementation, at least one processor 1301 executes computer execution instructions stored in memory 1302, causing at least one processor 1301 to perform the above-described method.

[0235] The specific implementation process of processor 1301 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0236] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0237] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0238] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0239] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0240] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0241] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0242] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0243] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0244] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0245] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.

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

[0247] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0248] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0249] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for detecting a ticket image, characterized in that, include: Acquire a bill image and extract the feature vector of the bill image; the bill image represents a transaction certificate; The feature vector represents the crease information and ink spectral information of the bill image; Based on at least two preset resolutions, the feature vector is downsampled to obtain a downsampled image corresponding to the preset resolution; the downsampled image represents the feature vector after downsampling. The target region is determined based on the feature vector of the bill image and each downsampled image; the target region represents the location of the forged information in the bill image.

2. The method according to claim 1, characterized in that, The step of determining the target region based on the feature vector of the ticket image and each downsampled image includes: For each downsampled image, determine the first weight information corresponding to each pixel in the downsampled image; the first weight information characterizes the degree of influence of the pixels in the downsampled image on the detection of counterfeit information in the ticket image; Based on the feature vector of the bill image, second weight information corresponding to each pixel in the bill image is determined; wherein, the second weight information characterizes the degree of influence of the pixel in the bill image on the detection of counterfeit information in the bill image; The target region is determined based on the first weight information corresponding to each pixel in each downsampled image and the second weight information of each pixel in the ticket image.

3. The method according to claim 2, characterized in that, The step of determining the target region based on the first weight information corresponding to each pixel in each downsampled image and the second weight information of each pixel in the ticket image includes: For each pixel in each downsampled image, at least one mapping point in the ticket image corresponding to the pixel in the downsampled image is determined; wherein, the mapping point represents the pixel in the ticket image; For each mapping point in the ticket image, the target weight information of the mapping point is determined based on the first weight information of the pixel in the downsampled image corresponding to the mapping point and the second weight information of the mapping point; the target weight information characterizes the probability that the pixel in the ticket image is counterfeit information; The target region is determined based on the target weight information of each pixel in the ticket image.

4. The method according to claim 2, characterized in that, Determining the first weight information corresponding to each pixel in the downsampled image includes: Based on a preset attention mechanism, third weight information corresponding to each pixel in the downsampled image and fourth weight information corresponding to each pixel in the downsampled image are determined; the third weight information represents the influence of the color information of the pixels in the ticket image on the detection of counterfeit information; the fourth weight information represents the influence of the feature information of the pixels in the ticket image on the detection of counterfeit information, and the feature information represents the features of crease information and ink spectral information. Based on the third and fourth weight information corresponding to the pixels in the downsampled image, the first weight information corresponding to the pixels in the downsampled image is determined.

5. The method according to claim 1, characterized in that, The extraction of the feature vector from the ticket image includes: The ticket image is input into a pre-trained image denoising model to obtain a denoised ticket image; Extract the feature vector of the denoised ticket image.

6. The method according to claim 5, characterized in that, The method further includes: Based on the initial model, the training image is noise-added to obtain a noisy image; the training image is a noise-free image, and the noisy image represents the training image with added preset noise information. The noisy image is denoised to obtain a denoised image; The initial model is trained based on the image to be trained and the denoised image to obtain a trained image denoising model.

7. The method according to claim 6, characterized in that, The step of adding noise to the training image to obtain a noisy image includes: According to a preset noise addition order, preset noise information is added to the image to be trained to obtain a noisy image; wherein, the noisy image represents an image with preset noise information added, and the preset noise addition order includes at least two noise addition steps, each noise addition step corresponding to a preset noise information and a noisy image. The image with added noise corresponding to the last noise-adding step in the preset noise-adding sequence is determined as the noise image corresponding to the image to be trained.

8. The method according to claim 7, characterized in that, The step of denoising the noisy image to obtain a denoised image includes: According to a preset denoising order, noise extraction information in the noisy image and an intermediate image after removing the noise extraction information are determined; wherein, the preset denoising order includes at least two denoising steps, each denoising step corresponding to a type of noise extraction information and an intermediate image; the noise addition step and the denoising step correspond one-to-one. The intermediate image corresponding to the last denoising step in the preset denoising sequence is determined as the denoised image.

9. The method according to claim 8, characterized in that, The step of training the initial model based on the image to be trained and the denoised image to obtain a trained image denoising model includes: For each noise addition stage and its corresponding noise removal stage, a first difference information is determined based on a preset first loss function, according to the preset noise information of the noise addition stage and the noise extraction information of the corresponding noise removal stage; wherein, the preset first loss function is used to determine the difference between the preset noise information and the noise extraction information, and the first difference information characterizes the difference between the preset noise information and the noise extraction information. Based on the first difference information, the initial model is trained to obtain a trained image denoising model.

10. The method according to claim 8, characterized in that, The step of training the initial model based on the image to be trained and the denoised image to obtain a trained image denoising model includes: For each noise-adding stage and its corresponding noise-removing stage, crease information is extracted from the noise-adding image corresponding to the noise-adding stage as the first information, and crease information is extracted from the intermediate image corresponding to the corresponding noise-removing stage as the second information; Based on the first information and the second information, a second difference information is determined based on a preset second loss function; wherein, the preset second loss function is used to determine the difference between the crease information in the noisy image and the crease information in the intermediate image, and the second difference information characterizes the difference between the crease information in the noisy image and the crease information in the intermediate image; Based on the second difference information, the initial model is trained to obtain a trained image denoising model.

11. The method according to claim 8, characterized in that, The step of training the initial model based on the image to be trained and the denoised image to obtain a trained image denoising model includes: For each noise-adding stage and its corresponding noise-removing stage, ink spectral information is extracted from the noise-adding image corresponding to the noise-adding stage as the third information, and ink spectral information is extracted from the intermediate image corresponding to the corresponding noise-removing stage as the fourth information. Based on the third information and the fourth information, a third difference information is determined based on a preset third loss function; wherein, the preset third loss function is used to determine the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image, and the third difference information characterizes the difference between the ink spectral information in the noisy image and the ink spectral information in the intermediate image. Based on the third difference information, the initial model is trained to obtain a trained image denoising model.

12. A device for detecting a ticket image, comprising: The acquisition module is used to acquire the ticket image and extract the feature vector of the ticket image; The bill image represents a transaction certificate; The feature vector represents the crease information and ink spectral information of the bill image; A sampling module is used to downsample the feature vector based on at least two preset resolutions to obtain a downsampled image corresponding to the preset resolution; the downsampled image represents the feature vector after downsampling. The determination module is used to determine the target region based on the feature vector of the ticket image and each downsampled image; the target region represents the location of the forgery information in the ticket image.

13. A device for detecting invoice images, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 11.

15. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 11.