Image authentication method, device, computer equipment and storage medium

Through discrete cosine transformation and steganographic watermarking technology on images, the problem of manual auditing failing to identify illegal images is solved, and the security verification of the image transmission process is realized, which improves the efficiency and security of financial auditing.

CN109767376BActive Publication Date: 2025-01-10PING AN TECH (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201811527538.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-13
Publication Date
2025-01-10
Estimated Expiration
2038-12-13

AI Technical Summary

Technical Problem

In the prior art, manual review images cannot effectively identify illegal images, resulting in financial fraud cases and inefficient review.

Method used

By performing discrete cosine transformation on the image, adding a steganographic watermark, and extracting the watermark sequence during the transmission process for verification. If the watermark sequence is consistent, the output verification will be passed to ensure the integrity of the image transmission process.

Benefits of technology

It effectively eliminates financial risks caused by PS images or non-this incident images, and improves the efficiency and security of image review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109767376B_ABST
    Figure CN109767376B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of information encryption, and discloses an image authentication method, device, computer equipment and storage medium. The image authentication method includes: obtaining a first image, performing discrete cosine transformation on the first image to obtain a first image sub-image; adding a steganographic watermark to the first image sub-image according to a first watermark sequence; performing inverse discrete cosine transformation on the first image sub-image with the steganographic watermark to obtain a second image; sending the second image to an audit terminal, obtaining the image received by the audit terminal as a third image, and extracting a second watermark sequence of the third image; if the second watermark sequence is the same as the first watermark sequence, outputting a verification result. The technical solution provided by the present invention can verify whether the transmission process of the image has been tampered with, prevent financial risks caused by illegal images, and improve the efficiency of image auditing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information encryption, and more specifically, relates to an image authentication method, device, computer equipment and storage medium. Background Art

[0002] In the process of financial audit, a large number of uploaded images need to be authenticated. At present, when authenticating images, most of them are manually reviewed to identify whether the uploaded images are legal images. However, criminals re-photograph images, fabricate images, or reuse old images and upload them. The manual identification method cannot effectively identify such illegal images, leading to financial fraud cases. On the other hand, the manual identification method of uploaded images cannot quickly complete the image review and is inefficient.

[0003] In summary, using manual screening of uploaded images cannot effectively prevent the occurrence of financial fraud cases and is inefficient. Summary of the invention

[0004] The embodiments of the present invention provide an image authentication method, an apparatus, a computer device and a storage medium to solve the problem of low efficiency in identifying images to be reviewed in the prior art.

[0005] An image authentication method, comprising:

[0006] Acquire a first image, and perform discrete cosine transform on the first image to obtain a first image sub-image;

[0007] adding a steganographic watermark to the first image sub-image according to a first watermark sequence;

[0008] Performing an inverse discrete cosine transform on the first image sub-image with the steganographic watermark added thereto to obtain a second image;

[0009] Sending the second image to an audit terminal, acquiring the image received by the audit terminal as a third image, and extracting a second watermark sequence of the third image;

[0010] If the second watermark sequence is identical to the first watermark sequence, a verification pass result is output.

[0011] An image authentication device, comprising:

[0012] A first image transformation module, used to acquire a first image, and perform discrete cosine transformation on the first image to obtain a first image sub-image;

[0013] A first watermark adding module, used for adding a steganographic watermark to the first image sub-image according to a first watermark sequence;

[0014] A second image transformation module, configured to perform an inverse discrete cosine transformation on the first image sub-image with the steganographic watermark added thereto to obtain a second image;

[0015] A second watermark extraction module, configured to send the second image to an audit terminal, obtain the image received by the audit terminal as a third image, and extract a second watermark sequence of the third image;

[0016] The verification result output module is used to output a verification result if the second watermark sequence is the same as the first watermark sequence.

[0017] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned image authentication method when executing the computer program.

[0018] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned image authentication method are implemented.

[0019] The above-mentioned image authentication method, device, computer equipment and storage medium obtain a first image, perform a discrete cosine transform on the first image to obtain a first image sub-image, then add a steganographic watermark to the first image sub-image according to the first watermark sequence, and then perform an inverse discrete cosine transform on the first image sub-image with the steganographic watermark to obtain a second image; then send the second image to the audit terminal, obtain the image received by the audit terminal as the third image, and extract the second watermark sequence of the third image; finally, if the second watermark sequence is the same as the first watermark sequence, output the result of verification. By adding a steganographic watermark to the acquired image and then authenticating the watermark sequence, it is possible to verify whether the image transmission process has been tampered with, eliminate financial risks caused by PS images or images not related to this event, and improve the efficiency of image auditing. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 is a schematic diagram of an application environment of an image authentication method in one embodiment of the present invention;

[0022] Figure 2 is a flow chart of an image authentication method in one embodiment of the present invention;

[0023] Figure 3 is another flow chart of an image authentication method according to an embodiment of the present invention;

[0024] Figure 4 is another flow chart of an image authentication method according to an embodiment of the present invention;

[0025] Figure 5 is another flow chart of an image authentication method according to an embodiment of the present invention;

[0026] Figure 6 is another flow chart of an image authentication method according to an embodiment of the present invention;

[0027] Figure 7 is another flow chart of an image authentication method according to an embodiment of the present invention;

[0028] Figure 8 is a principle block diagram of an image authentication device in one embodiment of the present invention;

[0029] Fig. 9 is another principle block diagram of an image authentication device in one embodiment of the present invention;

[0030] Fig.10 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

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

[0032] The image authentication method provided in this application can be applied in Figure 1In an application environment, the client communicates with the server through a network, the server obtains a first image through the client, performs a discrete cosine transform on the obtained first image to obtain a first image sub-image, then adds a steganographic watermark to the first image sub-image according to the first watermark sequence, and then performs an inverse discrete cosine transform on the first image sub-image with the steganographic watermark to obtain a second image; then the server sends the second image of the client to the audit terminal, and then obtains the image received by the audit terminal as the third image, and extracts the second watermark sequence of the third image, wherein the audit terminal is a database for the server to store audit information; finally, the server compares the second watermark sequence with the first watermark sequence, and if the second watermark sequence is the same as the first watermark sequence, the server outputs the verification result to the client. Among them, the client can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers.

[0033] In one embodiment, if Figure 2 As shown, an image authentication method is provided, which is applied in Figure 1 The server in the example is used as an example to illustrate the following steps:

[0034] S201: Acquire a first image, and perform discrete cosine transform on the first image to obtain a first image sub-image.

[0035] The first image refers to an image to be reviewed obtained by the client, including an event image, a user image or a data image, etc., which can be obtained by collecting with a shooting tool of the client.

[0036] Specifically, the server obtains the first image through the client, and then performs a discrete cosine transform (DCT) on the first image, that is, performs DCT block division on the first image to obtain a first image sub-image. Optionally, when performing DCT block division on the first image, the first image can be divided into 9*9 blocks of first image sub-images.

[0037] S202: Adding a steganographic watermark to the first image sub-image according to the first watermark sequence.

[0038] The first watermark sequence can be obtained from the watermark sequence database by pre-establishing a corresponding watermark sequence database. Optionally, when selecting the first watermark sequence from the watermark sequence database, the first watermark sequence equal to the number of the first image sub-images after the block is selected, that is, a corresponding first watermark sequence is obtained for each first image sub-image. For example, if the first image is divided into 9*9 (81) first image sub-images by DCT block, 81 first watermark sequences are obtained from the watermark sequence database.

[0039] Specifically, the server obtains the first watermark sequence with the same number as the first image sub-image from the watermark sequence database, and obtains the DCT coefficient of the first image sub-image; then the first watermark sequence is used to encrypt the first image sub-image using the Blowfish algorithm to form a ciphertext; then the Blowfish algorithm is used to generate a pseudo-random sequence, and the DCT coefficient that needs to be changed is found according to the generated pseudo-random sequence, and the last bit of the DCT coefficient is changed to the value corresponding to the ciphertext to obtain the changed DCT coefficient, thereby generating a steganographic watermark. Among them, the Blowfish algorithm is a symmetric key block cipher algorithm with a 64-bit block and a variable key length, which can be used to encrypt a 64-bit string.

[0040] Optionally, the server may also use other methods to add a watermark to the first image, such as a spatial domain method, Fourier transform, wavelet transform, or the like.

[0041] S203: Performing an inverse discrete cosine transform on the first image sub-image with the steganographic watermark added thereto to obtain a second image.

[0042] Specifically, the server performs a DCT inverse transform on the sub-image of the first image with the stego watermark added thereto, and obtains the image with the stego watermark added thereto as the second image, and then sends the second image to the audit terminal.

[0043] Optionally, in order to ensure that the first image is captured by the client's shooting tool, the process of obtaining the first image and adding a steganographic watermark to the first image to obtain the second image can be implemented through an APP specified by the client. For example, the server obtains the client's camera permission through the specified APP, and then opens the client's camera through the specified APP to capture the first image, and then adds a steganographic watermark to the captured first image.

[0044] Optionally, the process of adding a steganographic watermark to the first image to obtain the second image can also be completed by embedding a corresponding software development kit (SDK) in the APP. Optionally, it can also be achieved by providing a corresponding application programming interface (API) service.

[0045] S204: Send the second image to the audit terminal, obtain the image received by the audit terminal as the third image, and extract the second watermark sequence of the third image.

[0046] It is understandable that in the process of sending the second image to the audit terminal, criminals may attack the transmission process and tamper with the second image to achieve their financial fraud purposes. Therefore, it is necessary to use the image received by the audit terminal as the third image and authenticate the third image.

[0047] Specifically, the server sends the second image of the client to the audit terminal, obtains the image received by the audit terminal as the third image, and then extracts the watermark from the third image to obtain the second watermark sequence. The process of extracting the watermark from the third image by the server can be: performing the same DCT transformation on the first image and the third image, and then subtracting the two transformed images to obtain the second watermark sequence.

[0048] S205: If the second watermark sequence is the same as the first watermark sequence, output a verification result.

[0049] Specifically, the server compares the sequence of the second watermark sequence with the sequence of the corresponding position of the first watermark sequence. If the sequences of each corresponding position in the two sequences are the same, it indicates that the second image has not been tampered with during the transmission process, and the server outputs the result of verification to the client. If the sequences of more than one corresponding position in the two sequences are different, it indicates that the second image has been tampered with during the transmission process, and the server outputs the result of verification failure to the client.

[0050] It can be understood that since the attacker does not know the specific first watermark sequence, it is difficult to impersonate an illegal image as a legitimate image by adding the same first watermark sequence.

[0051] It can be understood that if the second watermark sequence extracted based on the third image is empty, or the second watermark sequence is different from the first watermark sequence, indicating that the third image is not transmitted from the second image, it can be determined that the third image is not an image of this event, or is an image that has been PSed, and the server outputs a verification failure result.

[0052] exist Figure 2In the corresponding embodiment, a first image is obtained, a discrete cosine transform is performed on the first image to obtain a first image sub-image, a steganographic watermark is added to the first image sub-image according to the first watermark sequence, and then a discrete cosine inverse transform is performed on the first image sub-image with the steganographic watermark to obtain a second image; then the second image is sent to the audit terminal, the image received by the audit terminal is obtained as the third image, and the second watermark sequence of the third image is extracted; finally, if the second watermark sequence is the same as the first watermark sequence, the result of verification is output. By adding a steganographic watermark to the acquired image and then authenticating the watermark sequence, it is possible to verify whether the image transmission process has been tampered with, eliminate financial risks caused by PS images or images not related to this event, and improve the efficiency of image auditing.

[0053] In one embodiment, if Figure 3 As shown, after step S203, that is, after the step of performing an inverse discrete cosine transform on the first image sub-image with the steganographic watermark to obtain the second image, the image authentication method provided in this embodiment further includes the following steps:

[0054] S301: Convert the second image into a binary file by using a preset conversion algorithm, and obtain an information summary sequence of the binary file as a first information summary sequence.

[0055] Optionally, the preset conversion algorithm may be a BASE64 algorithm or other conversion algorithms, which are not specifically limited here. The BASE64 algorithm is one of the encoding methods for transmitting 8-bit bytecodes, and is a method for representing binary data based on 64 printable characters.

[0056] The first information digest sequence refers to an information digest sequence obtained by the Message Digest Algorithm MD5 (MD5 for short). The MD5 algorithm is a hash function that can generate a 128-bit (16-byte) hash value, which can be used to ensure the integrity and consistency of information transmission.

[0057] Specifically, the server converts the acquired first image into a binary file through the client using the BASE64 algorithm, and then obtains the information digest sequence of the binary file as the first information digest sequence through the MD5 algorithm. Optionally, step S301 can also be completed by an SDK embedded in the APP of the client, or by providing a corresponding API service.

[0058] S302: Send the binary file to the audit terminal, obtain the file received by the audit terminal, convert the received file into an image using a preset conversion algorithm, and use the converted image as the third image.

[0059] It is understood that the files received by the audit terminal include files transmitted to the audit terminal by other clients (i.e., without adding a steganographic watermark and / or binary conversion). Optionally, the server verifies the files received by the audit terminal, and if the files received by the audit terminal are not binary files, the server outputs a verification failure result to the client.

[0060] Specifically, after the server sends the binary file converted by the client to the audit terminal, it obtains the file received by the audit terminal, converts the file received by the audit terminal into an image through a preset conversion algorithm consistent with step S301, and then uses the converted image as the third image.

[0061] S303: Acquire an information summary sequence of the third image as a second information summary sequence.

[0062] Specifically, the server obtains the information digest sequence of the third image according to the MD5 algorithm, and uses it as the second information digest sequence.

[0063] S304: If the second information digest sequence is consistent with the first information digest sequence, output a result indicating that the digest sequence verification has passed.

[0064] Specifically, the server compares the second information digest sequence with the first information digest sequence to determine whether the two are consistent. Optionally, the server can use a regular expression to determine whether the second information digest sequence matches the first information digest sequence, or use the equal formula to determine whether the two are equal. If the server determines that the second information digest sequence is consistent with the first information digest sequence, indicating that the image has not been tampered with during the image transmission process, the server outputs the result of the summary sequence verification to the client. If the server determines that the second information digest sequence is inconsistent with the first information digest sequence, indicating that the image may have been tampered with during the image transmission process, or there is a loss in the transmission process, the server outputs the result of the summary sequence verification failure to the client, so that the client re-uploads the first image.

[0065] exist Figure 3 In the corresponding embodiment, the second image is converted into a binary file by a preset conversion algorithm, the information digest sequence of the binary file is obtained as the first information digest sequence, and then the binary file is sent to the audit terminal, and the file received by the audit terminal is obtained, and the received file is converted into an image by a preset conversion algorithm, and the converted image is used as the third image; then the information digest sequence of the third image is obtained as the second information digest sequence, and if the second information digest sequence is consistent with the first information digest sequence, the result of the summary sequence verification is output. By converting the image by a preset conversion algorithm and obtaining the information digest sequence of the image, the security of image transmission can be further improved on the basis of watermark sequence verification, and the efficiency of preventing financial risks can be improved.

[0066] In one embodiment, if Figure 4 As shown, after step S203, that is, after the step of performing an inverse discrete cosine transform on the first image sub-image with the steganographic watermark to obtain the second image, the image authentication method provided in this embodiment further includes the following steps:

[0067] S401: Perform Advanced Encryption Standard encryption on the second image using a preset key to obtain an encrypted image.

[0068] Specifically, the server uses a preset key to perform Advanced Encryption Standard (AES) encryption on the second image to obtain an AES-encrypted image. The preset key can be specifically set according to actual needs and is not limited here.

[0069] S402: Sign the encrypted image with open authorization to obtain the signed image.

[0070] Among them, open authorization (Oauth) is an open standard that allows users to allow third-party applications to access the private resources (such as photos, videos, contact lists) stored by the user on a website. By signing the encrypted image with Oauth, the security of transmission can be further increased.

[0071] Specifically, the server performs an open authorized signature process on the encrypted image to obtain the signed image, and then transmits the signed image to the review terminal.

[0072] S403: Send the signed image to the review terminal, and obtain the image received by the review terminal as the third image.

[0073] It can be understood that the images received by the audit terminal include images transmitted to the audit terminal from other clients (ie, images that have not been subjected to the addition of steganographic watermarks and / or encryption signatures).

[0074] Specifically, after transmitting the image signed by the client to the review terminal, the server obtains the image actually received by the review terminal as the third image.

[0075] S404: Authenticate the third image. If the authentication is successful, use a preset key to decrypt the third image. If the decryption is successful, output a result indicating that the encryption verification is successful.

[0076] Specifically, the server authenticates the third image of the audit terminal. If the third image is an image signed in the form of Oauth, the authentication is successful; if the third image is an image not signed in the form of Oauth, the authentication fails. It can be understood that if the authentication is successful, it means that the third image is obtained by legally transmitting the second image, and the server then performs the AES encryption verification step. If the authentication fails, it means that the third image comes from an illegal user, and the server outputs the verification failure result to the client, and no longer performs the AES encryption verification step.

[0077] Furthermore, after successful authentication, the server uses a preset key to perform AES decryption on the third image. If the third image can be decrypted, it indicates that the acquired third image is an image of the second image after legal transmission, and the result of encryption verification passing is output to the client; if the third image cannot be decrypted or does not need to be decrypted, it indicates that the acquired third image is an illegal image (including illegally acquired images and tampered images), and the result of encryption verification failing is output to the client to prompt the user to re-upload the first image.

[0078] exist Figure 4 In the corresponding embodiment, the second image is encrypted by using the preset key to perform the advanced encryption standard to obtain the encrypted image; then the encrypted image is signed with open authorization to obtain the signed image; then the signed image is sent to the audit terminal, and the image received by the audit terminal is obtained as the third image, and finally the third image is authenticated. If the authentication is successful, the third image is decrypted by using the preset key. If the decryption is successful, the result of the encryption verification is output. By encrypting the second image by the advanced encryption standard and signing the encrypted image, the security of image transmission can be further improved on the basis of watermark sequence verification, and the efficiency of preventing financial risks can be improved.

[0079] In one embodiment, if Figure 5 As shown, after step S204, that is, after the step of sending the second image to the audit terminal, obtaining the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image, the image authentication method provided by this embodiment further includes the following steps:

[0080] S501: Obtain moiré feature values ​​of a third image.

[0081] Among them, moiré refers to the high-frequency colored stripes that appear in the image due to high-frequency interference of the photosensitive elements on devices such as digital cameras or scanners. The moiré feature value refers to the probability value of the high-frequency signal appearing in the image under the one-dimensional spectrum diagram.

[0082] Optionally, the process of the server obtaining the moiré feature value of the third image is: first, converting the third image into a two-dimensional spectrum graph by Fourier transform; then converting the two-dimensional spectrum graph into a one-dimensional spectrum image according to the frequency and amplitude of the third image, and then obtaining the probability value of the occurrence of the high-frequency signal as the moiré feature value of the third image according to the converted one-dimensional spectrum image. The Fourier transform may be a discrete two-dimensional Fourier transform.

[0083] S502: If the moiré feature value reaches a preset frequency threshold, outputting a result indicating that the moiré verification has failed.

[0084] It should be understood that since the re-photographed image will have moiré patterns, and the moiré patterns are mainly reflected in the high-frequency signals of the image, the server can set a frequency threshold as a preset frequency threshold. If the moiré feature value of the image exceeds the preset frequency threshold, the third image can be determined to be an illegal image after re-photographing. The preset frequency threshold can be specifically set according to the actual situation and is not limited here.

[0085] Specifically, the server compares the obtained moiré feature value with a preset frequency threshold. If the obtained moiré feature value reaches the preset frequency threshold, indicating that the third image is a re-photographed image and is an illegal image, the server outputs the moiré verification failure result to the client; if the obtained moiré feature value does not reach the preset frequency threshold, indicating that the third image is not a re-photographed image and is a legal image, the server outputs the moiré verification pass result to the client.

[0086] exist Figure 5 In the corresponding embodiment, by obtaining the moiré feature value of the third image, if the moiré feature value reaches the preset frequency threshold, the result of moiré verification failure is output. By verifying the moiré of the third image, it is possible to further ensure that the image being reviewed is not a re-photographed image on the basis of the watermark sequence verification, thereby improving the efficiency of preventing financial risks and the accuracy of image review.

[0087] In one embodiment, if Figure 6 As shown, after step S204, that is, after the step of sending the second image to the audit terminal, obtaining the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image, the image authentication method provided by this embodiment further includes the following steps:

[0088] S601: If the second watermark sequence is different from the first watermark sequence, obtaining a test noise histogram of the third image.

[0089] It should be understood that the camera noise is also called noise or noise points, which mainly refers to the rough part of the image generated in the process of the Charge-coupled Device (CCD) or Complementary Metal Oxide Semiconductor (CMOS) in the camera receiving and outputting light as a received signal. It also refers to foreign pixels that should not appear in the image, usually caused by electronic interference. Since cameras from different manufacturers use different photosensitive components, there are differences between different sensors. These differences will cause the sensor to respond differently to light, leaving unique "noise" on each photo. These unique "noises" are also called camera fingerprints. Optionally, the camera fingerprint of the image can be identified by obtaining the noise histogram of the image.

[0090] Specifically, if the server determines that the watermark of the third image is inconsistent with the preset watermark, it indicates that the third image comes from a non-specified client; or the image is obtained by an APP that is not specified by the user, for example, the user takes a photo without opening the APP, and then uses the APP to upload the image stored in the mobile terminal; then the server can perform camera fingerprint recognition on the third image to determine whether the third image comes from the user's mobile terminal. Specifically, the process of the server obtaining the test noise histogram of the third image can be: first convolve the third image through a convolution algorithm, then segment the convolved image, and then generate a local variance and histogram based on the segmented image, and finally perform edge recognition again based on the obtained local variance and histogram to obtain the test noise histogram of the third image.

[0091] S602: Calculate the similarity between the test noise histogram and the reference noise histogram. If the similarity reaches a preset similarity threshold, output a result indicating that the camera fingerprint verification has passed.

[0092] Among them, the baseline noise histogram can be obtained by the user when registering on the server. For example, when the user registers on the server, the user's face image is collected through the camera of the user's mobile terminal, and then the camera fingerprint in the collected user face image is obtained, and the collected camera fingerprint is stored as the baseline noise histogram in the server's database.

[0093] Specifically, the server calculates the similarity between the acquired test noise histogram and the reference noise histogram, and then compares the obtained similarity with the preset similarity threshold. If the similarity between the test noise histogram and the reference noise histogram exceeds the preset similarity threshold, the server determines that the third image comes from the camera authenticated by the user, and outputs the verification result to the client; if the similarity between the test histogram and the reference noise histogram does not exceed the preset similarity threshold, the server determines that the third image does not come from the camera authenticated by the user, and outputs the verification result to the client. By verifying the camera fingerprint of the third image, it can be checked whether the uploaded image comes from the authenticated client. Among them, the preset similarity threshold can be specifically set according to actual needs, and is not specifically limited here.

[0094] exist Figure 6 In the corresponding embodiment, if the second watermark sequence is different from the first watermark sequence, the test noise histogram of the third image is obtained, and then the similarity between the test noise histogram and the reference noise histogram is calculated. If the similarity reaches the preset similarity threshold, the result of the camera fingerprint verification is output. By identifying the camera fingerprint of the third image, it can be ensured that the third image comes from a legitimate client, and the financial risks caused by re-photographed images or PS images can be eliminated, thereby improving the efficiency of image review; in addition, once a financial fraud incident occurs, it can also provide a basis for quickly identifying the source of the image.

[0095] In one embodiment, if Figure 7 As shown, after step S204, that is, after the step of sending the second image to the audit terminal, obtaining the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image, the image authentication method provided by this embodiment further includes the following steps:

[0096] S701: If the third image is a face image, the third image is input into a preset micro-expression recognition model to obtain user micro-expressions.

[0097] It can be understood that in this embodiment, the third image is an image involving the user's face. Optionally, it can be determined whether the step of obtaining the user's micro-expression can be performed according to the application environment of different clients. For example, when an APP needs to obtain the user's face image when processing an event, the third image at this time can be used to obtain the user's micro-expression.

[0098] The preset micro-expression recognition model uses a trained model. Optionally, the preset micro-expression recognition model uses a deep learning training model, by preparing sample images with expression annotations in advance, and then inputting the sample images into the training model for training, so that the training model learns the acquisition and recognition of micro-expressions, and obtains the preset micro-expression recognition model.

[0099] Specifically, the server judges the third image. If the third image is a face image, the third image is input into a preset micro-expression recognition model. The user's expression in the third image is recognized by the preset micro-expression recognition model to obtain user micro-expressions, such as happiness, confidence, uneasiness or tension, etc.

[0100] S702: Score the user's micro-expressions according to a preset scoring standard, and output a verification result based on the scoring result.

[0101] Among them, the preset scoring standard refers to the standard between the user's micro-expression and the corresponding score, which can be set according to actual needs and is not specifically limited here. Optionally, the preset scoring standard is set to a scoring table, and the server matches the user's micro-expression obtained in step S701 with the micro-expression in the scoring table, and then obtains the score corresponding to the matched micro-expression for scoring, and then outputs the verification result according to the scoring result. Specifically, if the score reaches the preset score threshold, the result of verification passing is output; if the score does not reach the preset score threshold, the result of verification failing is output. Among them, the preset score threshold can be set according to actual conditions and is not specifically limited here.

[0102] exist Figure 7 In the corresponding embodiment, if the third image is a face image, the third image is input into a preset micro-expression recognition model to obtain the user's micro-expression, score the user's micro-expression according to a preset scoring standard, and then output the verification result according to the scoring result. By performing micro-expression recognition on the third image, financial fraud risks can be further prevented on the basis of watermark sequence authentication, and the efficiency and accuracy of image review can be improved.

[0103] It should be understood that the watermark sequence verification, information digest sequence verification, advanced standard encryption verification, signature verification, moiré verification and camera fingerprint verification in the above embodiments can be applied separately, or two or more methods can be used in combination. When used in combination, the effect of multiple verification can be achieved, making the image authentication process more rigorous and enhancing the effect of preventing financial risks.

[0104] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0105] In one embodiment, an image authentication device is provided, which corresponds one-to-one to the image authentication method in the above embodiment. Figure 8As shown, the image authentication device includes a first image transformation module 801, a first watermark adding module 802, a second image transformation module 803, a second watermark extraction module 804 and a verification result output module 805. The functional modules are described in detail as follows:

[0106] A first image transformation module 801 is used to obtain a first image and perform discrete cosine transformation on the first image to obtain a first image sub-image;

[0107] A first watermark adding module 802, configured to add a steganographic watermark to the first image sub-image according to a first watermark sequence;

[0108] The second image transformation module 803 is used to perform an inverse discrete cosine transformation on the first image sub-image with the steganographic watermark to obtain a second image;

[0109] The second watermark extraction module 804 is used to send the second image to the audit terminal, obtain the image received by the audit terminal as the third image, and extract the second watermark sequence of the third image;

[0110] The verification result output module 805 is used to output a verification result if the second watermark sequence is the same as the first watermark sequence.

[0111] Furthermore, if Fig. 9 As shown, the image authentication device provided in this embodiment further includes a digest sequence verification module 901, wherein the digest sequence verification module 901 includes a first sequence acquisition unit 9011, a third image acquisition unit 9012, a second sequence acquisition unit 9013 and a sequence verification result output unit 9014.

[0112] A first sequence acquisition unit 9011 is used to convert the second image into a binary file by using a preset conversion algorithm, and obtain an information summary sequence of the binary file as a first information summary sequence;

[0113] The third image acquisition unit 9012 is used to send the binary file to the audit terminal, acquire the file received by the audit terminal, convert the received file into an image using a preset conversion algorithm, and use the converted image as the third image;

[0114] A second sequence acquiring unit 9013, used for taking the information summary sequence of the third image as a second information summary sequence;

[0115] The sequence verification result output unit 9014 is used to output a result indicating that the digest sequence verification is passed if the second information digest sequence is consistent with the first information digest sequence.

[0116] Furthermore, the image authentication device provided in this embodiment further includes an image encryption verification module, wherein the image encryption verification module is specifically used for:

[0117] Using a preset key to perform advanced encryption standard encryption on the second image to obtain an encrypted image;

[0118] The encrypted image is signed with open authorization to obtain the signed image;

[0119] Sending the signed image to the review terminal, and obtaining the image received by the review terminal as the third image;

[0120] The third image is authenticated. If the authentication is successful, the third image is decrypted using a preset key. If the decryption is successful, a result indicating that the encryption verification is successful is output.

[0121] Furthermore, the image authentication device provided in this embodiment further includes a moiré verification module, wherein the moiré verification module is specifically used for:

[0122] Obtaining a moiré feature value of the third image;

[0123] If the moiré feature value reaches the preset frequency threshold, the result of moiré verification failure is output.

[0124] Furthermore, the image authentication device provided in this embodiment further includes a camera fingerprint verification module, wherein the camera fingerprint verification module is specifically used for:

[0125] If the second watermark sequence is different from the first watermark sequence, obtaining a test noise histogram of the third image;

[0126] The similarity between the test noise histogram and the reference noise histogram is calculated. If the similarity reaches the preset similarity threshold, the result that the camera fingerprint verification passed is output.

[0127] Furthermore, the image authentication device provided in this embodiment further includes a micro-expression recognition module, wherein the micro-expression recognition module is specifically used for:

[0128] If the third image is a face image, the third image is input into a preset micro-expression recognition model to obtain the user's micro-expression;

[0129] Score the user's micro-expressions according to the preset scoring criteria, and output the verification results based on the scoring results.

[0130] For the specific definition of the image authentication device, please refer to the definition of the image authentication method above, which will not be repeated here. Each module in the above-mentioned image authentication device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0131] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a third image, a watermark sequence, a baseline noise histogram and a micro-expression recognition model, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, any one of the above-mentioned image authentication methods is implemented.

[0132] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0133] Acquire a first image, and perform discrete cosine transform on the first image to obtain a first image sub-image;

[0134] adding a steganographic watermark to the first image sub-image according to the first watermark sequence;

[0135] Performing an inverse discrete cosine transform on the first image sub-image with the steganographic watermark to obtain a second image;

[0136] Sending the second image to the audit terminal, obtaining the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image;

[0137] If the second watermark sequence is the same as the first watermark sequence, a verification result is output.

[0138] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0139] Acquire a first image, and perform discrete cosine transform on the first image to obtain a first image sub-image;

[0140] adding a steganographic watermark to the first image sub-image according to the first watermark sequence;

[0141] Performing an inverse discrete cosine transform on the first image sub-image with the steganographic watermark to obtain a second image;

[0142] Sending the second image to the audit terminal, obtaining the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image;

[0143] If the second watermark sequence is the same as the first watermark sequence, a verification result is output.

[0144] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0145] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0146] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. An image authentication method, characterized in that: include: Acquire a first image, and perform discrete cosine transform on the first image to obtain a first image sub-image; adding a steganographic watermark to the first image sub-image according to a first watermark sequence; Performing an inverse discrete cosine transform on the first image sub-image with the steganographic watermark added thereto to obtain a second image; Sending the second image to an audit terminal, acquiring the image received by the audit terminal as a third image, and extracting a second watermark sequence of the third image; If the second watermark sequence is the same as the first watermark sequence, outputting a verification result; After the steps of sending the second image to the audit terminal, acquiring the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image, the image authentication method further includes: If the second watermark sequence is different from the first watermark sequence, obtaining a test noise histogram of the third image; Calculate the similarity between the test noise histogram and the reference noise histogram, and if the similarity reaches a preset similarity threshold, output a result indicating that the camera fingerprint verification has passed; Convert the second image into a binary file using a preset conversion algorithm, and obtain an information digest sequence of the binary file based on an MD5 algorithm as a first information digest sequence; Sending the binary file to the audit terminal, acquiring the file received by the audit terminal, converting the received file into an image using the preset conversion algorithm, and using the converted image as the third image; Acquire the information digest sequence of the third image as the second information digest sequence based on the MD5 algorithm; If the second information digest sequence is consistent with the first information digest sequence, a result indicating that the digest sequence verification is passed is output.

2. The image authentication method according to claim 1, characterized in that: After the step of performing an inverse discrete cosine transform on the first image sub-image to which the steganographic watermark is added to obtain the second image, the image authentication method further comprises: Using a preset key to perform Advanced Encryption Standard encryption on the second image to obtain an encrypted image; Performing an open authorization signing on the encrypted image to obtain a signed image; Sending the signed image to the audit terminal, and acquiring the image received by the audit terminal as the third image; The third image is authenticated. If the authentication is successful, the third image is decrypted using the preset key. If the decryption is successful, a result indicating that the encryption verification is successful is output.

3. The image authentication method according to claim 1, characterized in that: After the steps of sending the second image to the audit terminal, acquiring the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image, the image authentication method further includes: Acquire a moiré feature value of the third image; If the moiré feature value reaches a preset frequency threshold, a result indicating that the moiré verification has failed is output.

4. The image authentication method according to claim 1, wherein: After the steps of sending the second image to the audit terminal, acquiring the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image, the image authentication method further includes: If the third image is a face image, inputting the third image into a preset micro-expression recognition model to obtain the user's micro-expression; The user's micro-expressions are scored according to a preset scoring standard, and a verification result is output according to the scoring result.

5. An image authentication device, characterized in that: include: A first image transformation module, used to acquire a first image, and perform discrete cosine transformation on the first image to obtain a first image sub-image; A first watermark adding module, used for adding a steganographic watermark to the first image sub-image according to a first watermark sequence; A second image transformation module, configured to perform an inverse discrete cosine transformation on the first image sub-image with the steganographic watermark added thereto to obtain a second image; A second watermark extraction module, configured to send the second image to an audit terminal, obtain the image received by the audit terminal as a third image, and extract a second watermark sequence of the third image; A verification result output module, configured to output a verification result if the second watermark sequence is the same as the first watermark sequence; The image authentication device further includes a camera fingerprint verification module, which is specifically used for: After the steps of sending the second image to the audit terminal, obtaining the image received by the audit terminal as the third image, and extracting the second watermark sequence of the third image, if the second watermark sequence is different from the first watermark sequence, obtaining a test noise histogram of the third image; Calculate the similarity between the test noise histogram and the reference noise histogram, and if the similarity reaches a preset similarity threshold, output a result indicating that the camera fingerprint verification has passed; It also includes a digest sequence verification module, which includes a first sequence acquisition unit, a third image acquisition unit, a second sequence acquisition unit and a sequence verification result output unit; The first sequence acquisition unit is used to convert the second image into a binary file by using a preset conversion algorithm, and acquire an information digest sequence of the binary file based on an MD5 algorithm as a first information digest sequence; The third image acquisition unit is used to send the binary file to the audit terminal, acquire the file received by the audit terminal, convert the received file into an image using the preset conversion algorithm, and use the converted image as the third image; The second sequence acquisition unit is used to acquire the information digest sequence of the third image as the second information digest sequence based on the MD5 algorithm; The sequence verification result output unit is used to output a result that the summary sequence verification is passed if the second information summary sequence is consistent with the first information summary sequence.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the image authentication method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the image authentication method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Imaging equipment source detection method based on pattern noise phase

    CN102395041A

  • Method for manufacturing and verifying anti-counterfeiting digital certificate

    CN104517257A

  • Method and device for identifying copying certificate image

    CN105118048A

  • Image data detection for micro-expression analysis and targeted data services

    US20180005272A1