WO2018120459A1 - Method, apparatus and device for verifying authenticity of image, and storage medium and service end - Google Patents

Method, apparatus and device for verifying authenticity of image, and storage medium and service end Download PDF

Info

Publication number
WO2018120459A1
WO2018120459A1 PCT/CN2017/078001 CN2017078001W WO2018120459A1 WO 2018120459 A1 WO2018120459 A1 WO 2018120459A1 CN 2017078001 W CN2017078001 W CN 2017078001W WO 2018120459 A1 WO2018120459 A1 WO 2018120459A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
authentication identifier
pixel
hash fingerprint
server
Prior art date
Application number
PCT/CN2017/078001
Other languages
French (fr)
Chinese (zh)
Inventor
王健宗
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018120459A1 publication Critical patent/WO2018120459A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Definitions

  • the present invention relates to the field of image technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for verifying the authenticity of an image.
  • the existing method In order to identify the falsified image, the existing method generally adds a watermark to the image, and determines whether the image has been tampered by detecting the integrity of the watermark.
  • illegal molecules can re-add the same watermark in the image after tampering with the image, which makes it impossible to identify the image that has been tampered with by illegal molecules, and cannot guarantee the authenticity of the image.
  • the main object of the present invention is to provide a method, device, device and computer readable storage medium for verifying the authenticity of an image, which aims to solve the technical problem that the method for verifying the authenticity of an image cannot guarantee the authenticity of the image.
  • the present invention provides a method for verifying the authenticity of an image, and the method for verifying the authenticity of an image includes:
  • the present invention further provides an apparatus for verifying the authenticity of an image, and the apparatus for verifying the authenticity of the image includes:
  • a calculation module configured to calculate a hash value of the image pixel when the image is acquired, to obtain a hash fingerprint of the image
  • a splicing module configured to acquire identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
  • a sending module configured to send the image that includes the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
  • the present invention further provides an apparatus for verifying the authenticity of an image
  • the apparatus for verifying the authenticity of the image comprises a processor, a network interface, a memory, and a communication bus;
  • the communication bus is configured to implement connection communication between a processor, a network interface, and a memory;
  • the network interface is configured to connect to a server, and perform data communication with the server;
  • the processor is configured to execute a verification image authenticity program stored in the memory to implement the following steps:
  • the present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors To achieve the following steps:
  • the present invention further provides a server for verifying the authenticity of an image
  • the server is connected to a client, wherein the client calculates the image pixel when acquiring an image.
  • a hash value obtaining a hash fingerprint of the image; acquiring identification information identifying the image, stitching the identification information and the hash fingerprint into an authentication identifier, adding to the image; and including the authentication identifier Sending the image to the server;
  • the server is used to:
  • the invention calculates a hash value of the pixel of the received image by the client, obtains a hash fingerprint of the image, and splices the obtained identification information and the hash fingerprint into an authentication identifier, adds the image to the image, and sends the identifier
  • the server is configured to verify, by the server, the authenticity of the image according to the authentication identifier in the image.
  • a hash fingerprint of the image is obtained by pixels of the image, and the image identification information is added to the hash fingerprint to uniquely identify the image, thereby identifying whether the image is falsified by an illegal molecule, and ensuring that the image is The authenticity of the image.
  • FIG. 1 is a schematic flow chart of a preferred embodiment of a method for verifying image authenticity according to the present invention
  • FIG. 2 is a schematic flowchart of obtaining identification information identifying the image in the embodiment of the present invention, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
  • FIG. 3 is a schematic diagram of functional modules of a preferred embodiment of an apparatus for verifying image authenticity according to the present invention.
  • FIG. 4 is a schematic diagram of a functional module of a splicing module according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present invention.
  • the present invention provides a method of verifying the authenticity of an image.
  • FIG. 1 is a schematic flow chart of a method for verifying the authenticity of an image according to a preferred embodiment of the present invention.
  • the method for verifying the authenticity of the image includes:
  • Step S10 When the client acquires an image, calculate a hash value of the image pixel to obtain a hash fingerprint of the image.
  • the client calculates a hash value of the image by using the pixel value of the image, and obtains a hash fingerprint of the image according to the calculated hash value.
  • the image pixel-based fingerprint extraction algorithm is used to obtain the hash value of the image.
  • the image pixel-based fingerprint extraction algorithm in this embodiment can avoid a large change of the hash value of the image due to a small change.
  • the calculated stability of the image hash value is guaranteed.
  • the cryptographic hash function algorithm is extremely sensitive to the input source, and very subtle changes in the input can cause significant changes in the calculated hash value. But sometimes you need to do some harmless operations on the image, such as zooming in or out, but the actual content may not change, but the hash value of the cryptographic hash function output will change greatly, and based on image pixels.
  • the fingerprint extraction algorithm does not have this problem.
  • step S10 includes:
  • Step a when the client acquires the image, pre-process the image to obtain the pre-processed image.
  • the image needs to be pre-processed to obtain the pre-processed image.
  • step a includes:
  • Step a1 when the client acquires the image, performing grayscale processing on the image to obtain the grayscale image;
  • the specific process of the client pre-processing the image is: when the client acquires the image, the client performs graying on the image.
  • the image is processed to obtain the grayed out image.
  • the following four methods are used to grayscale the color image, respectively. For the component method, Maximum method, average method and weighted average method.
  • Step a2 reducing the grayscale image to a preset ratio to obtain the reduced image
  • the client reduces the grayscale image to a preset ratio to obtain the reduced image.
  • the preset ratio is set according to specific needs, such as when set to 8*8, indicating that the grayscale image is reduced to a scale of 8*8.
  • step a3 the reduced image is subjected to discrete cosine transform to obtain the preprocessed image.
  • the client After the client obtains the reduced image, the client performs discrete cosine transform on the reduced image to obtain the preprocessed image.
  • the discrete cosine transform is a transform associated with a Fourier transform that is similar to a discrete Fourier transform, but a discrete cosine transform uses only real numbers.
  • the discrete cosine transform is equivalent to a discrete Fourier transform of approximately twice the length. This discrete Fourier transform is performed on a real function (because the Fourier transform of a real function is still a real Even function), in some variants, you need to move the position of the input or output by half a unit.
  • Step b calculating a mean value of the pre-processed image pixels, and comparing the pixel values of the pre-processed image pixels to the average value.
  • step c if the pixel value of the pixel is greater than the average, the pixel value of the pixel is set to 1.
  • step d if the pixel value of the pixel is less than or equal to the average, the pixel value of the pixel is set to 0.
  • Step e generating a hash fingerprint of the image according to pixel points having pixel values of 1 and 0.
  • the client After the client obtains the pre-processed image, the client extracts pixel values of respective pixels in the pre-processed image, and divides the sum of pixel values of the respective pixel points by the image. The number of pixels is obtained as the average of the image pixels after preprocessing.
  • the client compares the pixel values of the respective pixels of the preprocessed image with the mean of the image pixels. When the pixel value of the image pixel is greater than the average of the image pixel, the client sets the pixel value of the image pixel to 1; when the pixel value of the image pixel is less than or equal to the image When the average of the pixels, the client sets the pixel value of the image pixel to 0.
  • the client generates a hash fingerprint of the image based on pixel points having pixel values of 1 and 0.
  • step S20 the identification information identifying the image is obtained, and the identification information and the hash fingerprint are spliced into an authentication identifier and added to the image.
  • the client When the client obtains a hash fingerprint of the image, the client acquires identification information for identifying the image, and the identifier information and the hash fingerprint are spliced into an authentication identifier, and the authentication is performed. An identification is added to the image. It can be understood that the identification information is an identifier that can uniquely represent the image.
  • the identification information includes a device name and a redundant character string for acquiring the image.
  • the redundant string can be freely set as needed, such as AABB_1122.
  • the client may distinguish the hash fingerprint, the device name, and the redundant character string by special characters.
  • the special characters include, but are not limited to, "#" and "/”.
  • img_footPrint is used to represent the hash fingerprint of the image
  • APP_name is used to represent the device name of the image
  • redundant_str the authentication identifier may be represented as APP_name#img_footPrint#redundant_str.
  • the order of arrangement of the hash fingerprint, the device name, and the redundant character string is not limited.
  • the authentication identifier may also be expressed as img_footPrint#APP_name#redundant_str, or expressed as img_footPrint. #redundant_str#APP_name.
  • Step S30 Send the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
  • the server After the client obtains the image containing the authentication identifier, the image containing the authentication identifier is sent to the server. After the server receives the image sent by the client, the server verifies the authenticity of the image according to the authentication identifier in the image. It can be understood that in the present application, the server can be a stand-alone server or a service platform that implements corresponding functions.
  • the step of the server for verifying the authenticity of the image according to the authentication identifier in the image includes:
  • Step f The server receives the image sent by the client, obtains an authentication identifier of the image, and determines whether the device name in the authentication identifier is consistent with a pre-stored device name.
  • Step g if the device name does not match the pre-stored device name, determining that the image is a forged image
  • Step h if the device name is consistent with the pre-stored device name, calculating a hash fingerprint of the image
  • the server When the identification information includes the device name and the redundant character string of the image, and the server receives the image sent by the client, the server acquires the authentication identifier in the image, Splitting the authentication identifier to obtain a device name, a redundant character string, and a hash fingerprint in the authentication identifier. Further, in the process of splitting the authentication identifier, the server may split the authentication identifier by using the special character.
  • the server determines whether the device name in the authentication identifier is consistent with the pre-stored device name.
  • the server determines that the image is not captured by the specified device, and is a forged image; when the device name in the authentication identifier is When the pre-stored device names are consistent, the server calculates a hash fingerprint of the image. It should be noted that the process of calculating the hash fingerprint of the image by the server and the hash value of the image pixel by the client to obtain the hash fingerprint of the image is the same, and details are not described herein again.
  • Step i if the calculated hash fingerprint is inconsistent with the hash fingerprint in the authentication identifier, determining that the image is a forged image;
  • Step j If the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determine whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string;
  • Step k if the redundant character string is inconsistent with the pre-stored redundant character string, determining that the image is a forged image
  • Step 1 If the redundant character string is consistent with the pre-stored redundant character string, determine that the image is a real image.
  • the server compares the calculated hash fingerprint with the hash fingerprint in the authentication identifier.
  • the server determines that the image is illegally falsified, is a forged image; when the calculated hash fingerprint and the authentication
  • the server determines whether the redundant character string in the authentication identifier is consistent with the pre-stored redundant character string.
  • the server determines that the image is a forged image; when the redundant character string in the authentication identifier and the pre-stored When the redundant strings are identical, the server determines that the image is a real image. It should be noted that the pre-stored device name and the pre-stored redundant character string are sent by the client to the server before sending the authentication identifier.
  • the server determines that the image is a real image
  • the server sends a message that the verification is successful to the client.
  • the client continues to perform the next operation, such as performing an account opening operation.
  • the server determines that the image is a forged image
  • the server sends a message that the verification fails to the client.
  • the client outputs a prompt message prompting the user to retake the image or re-upload the image.
  • the hash value of the pixel of the received image is calculated by the client, and the hash fingerprint of the image is obtained, and the obtained identification information and the hash fingerprint are spliced into an authentication identifier and added to the image, and Sending to the server, for the server to verify the authenticity of the image according to the authentication identifier in the image.
  • a hash fingerprint of the image is obtained by pixels of the image, and the image identification information is added to the hash fingerprint to uniquely identify the image, thereby identifying whether the image is falsified by an illegal molecule, and ensuring that the image is The authenticity of the image.
  • the step S20 includes:
  • Step S21 Obtain identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier.
  • Step S22 generating an encryption key by using a symmetric encryption algorithm
  • the client After the client obtains the identifier information that identifies the image, the client splices the identifier information and the hash fingerprint into an authentication identifier, and sends an authentication request to the server.
  • the server receives the authentication request, the server obtains a corresponding public key and a private key according to an asymmetric encryption algorithm, stores the private key, and sends the public key to the client.
  • the client receives the public key and generates an encryption key through a symmetric encryption algorithm.
  • the client may first send an authentication request to the server, and then generate an encryption key by using the symmetric encryption algorithm, or first generate an encryption key by using the symmetric encryption algorithm, and then send an authentication request to the server. Server.
  • the symmetric encryption algorithm includes but is not limited to DES (Data Encryption Standard, Data Encryption Standard), 3DES, IDEA (International Data Encryption) Algorithm) and AES (Advanced Encryption) Standard, Advanced Encryption Standard), including but not limited to RSA, Elgamal, and Elliptical Encryption Algorithm ECC.
  • Step S23 encrypting the authentication identifier by using the encryption key, and encrypting the encryption key by using a public key sent by the server;
  • Step S24 adding the encrypted authentication identifier and the encrypted encryption key to the image.
  • the server After the server obtains the encryption key, the server encrypts the authentication identifier by using the encryption key, and encrypts the encryption key by using a public key sent by the server to obtain an encrypted
  • the authentication identifier and the encrypted encryption key add the encrypted authentication identifier and the encrypted encryption key to the image.
  • the client adds the encrypted authentication identifier to the header file header attached to the image, Specifically added to the name in the Header Make Tag information.
  • the header area of the image and the data area are independent of each other, and therefore, after the authentication identifier is added to the image, the content of the image data area is not affected.
  • the client After adding the encrypted authentication identifier to the image, the client encrypts the encryption key using the public key, and adds the encrypted encryption key to the image attachment
  • the header file header is specifically added to the header in the header.
  • the tag information of the MODEL When the server obtains the image, it is named in the header of the image.
  • the encrypted authentication information is extracted from the tag information of the Make, and the encrypted encryption key is extracted from the Tag information named MODEL in the header of the image.
  • the server decrypts the encrypted encryption key by using a private key corresponding to the public key to obtain the encryption key, and obtains the encryption key.
  • the encryption key decrypts the authentication identifier extracted in the tag information of the Make, and obtains the decrypted authentication identifier.
  • the server splits the authentication identifier to obtain a device name, a redundant string, and a hash fingerprint in the authentication identifier.
  • the authentication identifier is encrypted by the encryption key, and the encryption for encrypting the authentication identifier is encrypted to prevent the image from being tampered with by illegal molecules, thereby ensuring the security of the image during transmission.
  • the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the present invention further provides an apparatus 100 for verifying the authenticity of an image.
  • FIG. 3 is a schematic diagram of functional modules of a device 100 for verifying the authenticity of an image according to a preferred embodiment of the present invention.
  • the block diagram shown in FIG. 3 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art surround the module of the apparatus 100 for verifying the authenticity of the image shown in FIG.
  • the new module can be easily supplemented; the name of each module is a custom name, and is used only to assist in understanding the various program function blocks of the device 100 for authenticating the verification image, and is not used to limit the technical solution of the present invention.
  • the functionality that each module that defines the name has to achieve.
  • the apparatus 100 for verifying the authenticity of an image includes:
  • the calculating module 10 is configured to calculate a hash value of the image pixel when the image is acquired, to obtain a hash fingerprint of the image.
  • the client calculates a hash value of the image by using the pixel value of the image, and obtains a hash fingerprint of the image according to the calculated hash value.
  • the image pixel-based fingerprint extraction algorithm is used to obtain the hash value of the image.
  • the image pixel-based fingerprint extraction algorithm in this embodiment can avoid a large change of the hash value of the image due to a small change.
  • the calculated stability of the image hash value is guaranteed.
  • the cryptographic hash function algorithm is extremely sensitive to the input source, and very subtle changes in the input can cause significant changes in the calculated hash value. But sometimes you need to do some harmless operations on the image, such as zooming in or out, but the actual content may not change, but the hash value of the cryptographic hash function output will change greatly, and based on image pixels.
  • the fingerprint extraction algorithm does not have this problem.
  • computing module 10 includes:
  • a pre-processing unit configured to: when the image is acquired, pre-process the image to obtain the pre-processed image.
  • the image needs to be pre-processed to obtain the pre-processed image.
  • the pre-processing unit is further configured to: when the image is acquired, perform grayscale processing on the image to obtain the grayscale image;
  • the specific process of the client pre-processing the image is: when the client acquires the image, the client performs graying on the image.
  • the image is processed to obtain the grayed out image.
  • the following four methods are used to grayscale the color image, respectively. For the component method, Maximum method, average method and weighted average method.
  • the pre-processing unit is further configured to reduce the grayscale image to a preset ratio to obtain the reduced image.
  • the client reduces the grayscale image to a preset ratio to obtain the reduced image.
  • the preset ratio is set according to specific needs, such as when set to 8*8, indicating that the grayscale image is reduced to a scale of 8*8.
  • the pre-processing unit is further configured to perform discrete cosine transform on the reduced image to obtain the pre-processed image.
  • the client After the client obtains the reduced image, the client performs discrete cosine transform on the reduced image to obtain the preprocessed image.
  • the discrete cosine transform is a transform associated with a Fourier transform that is similar to a discrete Fourier transform, but a discrete cosine transform uses only real numbers.
  • the discrete cosine transform is equivalent to a discrete Fourier transform of approximately twice the length. This discrete Fourier transform is performed on a real function (because the Fourier transform of a real function is still a real Even function), in some variants, you need to move the position of the input or output by half a unit.
  • a calculating unit configured to calculate a mean value of the pre-processed image pixels, and compare the pixel values of the pre-processed image pixels to the average value.
  • a setting unit configured to: if a pixel value of the pixel point is greater than the average value, set a pixel value of the pixel point to 1; if a pixel value of the pixel point is less than or equal to the average value, a pixel of the pixel point The value is set to 0.
  • a first generating unit configured to generate a hash fingerprint of the image according to pixel points with pixel values of 1 and 0.
  • the client After the client obtains the pre-processed image, the client extracts pixel values of respective pixels in the pre-processed image, and divides the sum of pixel values of the respective pixel points by the image. The number of pixels is obtained as the average of the image pixels after preprocessing.
  • the client compares the pixel values of the respective pixels of the preprocessed image with the mean of the image pixels. When the pixel value of the image pixel is greater than the average of the image pixel, the client sets the pixel value of the image pixel to 1; when the pixel value of the image pixel is less than or equal to the image When the average of the pixels, the client sets the pixel value of the image pixel to 0.
  • the client generates a hash fingerprint of the image based on pixel points having pixel values of 1 and 0.
  • the splicing module 20 is configured to obtain identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image.
  • the client When the client obtains a hash fingerprint of the image, the client acquires identification information for identifying the image, and the identifier information and the hash fingerprint are spliced into an authentication identifier, and the authentication is performed. An identification is added to the image. It can be understood that the identification information is an identifier that can uniquely represent the image.
  • the identification information includes a device name and a redundant character string for acquiring the image.
  • the redundant string can be freely set as needed, such as AABB_1122.
  • the client may distinguish the hash fingerprint, the device name, and the redundant character string by special characters.
  • the special characters include, but are not limited to, "#" and "/”.
  • img_footPrint is used to represent the hash fingerprint of the image
  • APP_name is used to represent the device name of the image
  • redundant_str the authentication identifier may be represented as APP_name#img_footPrint#redundant_str.
  • the order of arrangement of the hash fingerprint, the device name, and the redundant character string is not limited.
  • the authentication identifier may also be expressed as img_footPrint#APP_name#redundant_str, or expressed as img_footPrint. #redundant_str#APP_name.
  • the sending module 30 is configured to send the image that includes the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
  • the image containing the authentication identifier is sent to the server.
  • the server After the server receives the image sent by the client, the server verifies the authenticity of the image according to the authentication identifier in the image.
  • the sending module 30 is further configured to send the image to the server, where the server receives the And obtaining an authentication identifier of the image, determining whether the device name in the authentication identifier is consistent with the pre-stored device name; if the device name is different from the pre-stored device name, determining that the image is a forged image; If the device name is consistent with the pre-stored device name, the hash fingerprint of the image is calculated; if the calculated hash fingerprint is inconsistent with the hash fingerprint in the authentication identifier, determining that the image is a forged image And if the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determining whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string; if the redundant string and the Determining that the pre-stored redundant string is inconsistent, determining that the image is a forged image; if the redundant string is consistent with the pre-
  • the server When the identification information includes the device name and the redundant character string of the image, and the server receives the image sent by the client, the server acquires the authentication identifier in the image, Splitting the authentication identifier to obtain a device name, a redundant character string, and a hash fingerprint in the authentication identifier. Further, in the process of splitting the authentication identifier, the server may split the authentication identifier by using the special character.
  • the server determines whether the device name in the authentication identifier is consistent with the pre-stored device name.
  • the server determines that the image is not captured by the specified device, and is a forged image; when the device name in the authentication identifier is When the pre-stored device names are consistent, the server calculates a hash fingerprint of the image. It should be noted that the process of calculating the hash fingerprint of the image by the server and the hash value of the image pixel by the client to obtain the hash fingerprint of the image is the same, and details are not described herein again.
  • the server compares the calculated hash fingerprint with the hash fingerprint in the authentication identifier.
  • the server determines that the image is illegally falsified, is a forged image; when the calculated hash fingerprint and the authentication
  • the server determines whether the redundant character string in the authentication identifier is consistent with the pre-stored redundant character string.
  • the server determines that the image is a forged image; when the redundant character string in the authentication identifier and the pre-stored When the redundant strings are identical, the server determines that the image is a real image. It should be noted that the pre-stored device name and the pre-stored redundant character string are sent by the client to the server before sending the authentication identifier.
  • the server determines that the image is a real image
  • the server sends a message that the verification is successful to the client.
  • the client continues to perform the next operation, such as performing an account opening operation.
  • the server determines that the image is a forged image
  • the server sends a message that the verification fails to the client.
  • the client outputs a prompt message prompting the user to retake the image or re-upload the image.
  • the hash value of the pixel of the received image is calculated by the client, and the hash fingerprint of the image is obtained, and the obtained identification information and the hash fingerprint are spliced into an authentication identifier and added to the image, and Sending to the server, for the server to verify the authenticity of the image according to the authentication identifier in the image.
  • a hash fingerprint of the image is obtained by pixels of the image, and the image identification information is added to the hash fingerprint to uniquely identify the image, thereby identifying whether the image is falsified by an illegal molecule, and ensuring that the image is The authenticity of the image.
  • the splicing module 20 includes:
  • the splicing unit 21 is configured to acquire identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
  • a second generating unit 22 configured to generate an encryption key by using a symmetric encryption algorithm
  • the client After the client obtains the identifier information that identifies the image, the client splices the identifier information and the hash fingerprint into an authentication identifier, and sends an authentication request to the server.
  • the server receives the authentication request, the server obtains a corresponding public key and a private key according to an asymmetric encryption algorithm, stores the private key, and sends the public key to the client.
  • the client receives the public key and generates an encryption key through a symmetric encryption algorithm.
  • the client may first send an authentication request to the server, and then generate an encryption key by using the symmetric encryption algorithm, or first generate an encryption key by using the symmetric encryption algorithm, and then send an authentication request to the server. Server.
  • the symmetric encryption algorithm includes but is not limited to DES (Data Encryption Standard, Data Encryption Standard), 3DES, IDEA (International Data Encryption) Algorithm) and AES (Advanced Encryption) Standard, Advanced Encryption Standard), including but not limited to RSA, Elgamal, and Elliptical Encryption Algorithm ECC.
  • the encryption unit 23 is configured to encrypt the authentication identifier by using the encryption key, and encrypt the encryption key by using a public key sent by the server;
  • the adding unit 24 is configured to add the encrypted authentication identifier and the encrypted encryption key to the image.
  • the server After the server obtains the encryption key, the server encrypts the authentication identifier by using the encryption key, and encrypts the encryption key by using a public key sent by the server to obtain an encrypted
  • the authentication identifier and the encrypted encryption key add the encrypted authentication identifier and the encrypted encryption key to the image.
  • the client adds the encrypted authentication identifier to the header file header attached to the image, Specifically added to the name in the Header Make Tag information.
  • the header area of the image and the data area are independent of each other, and therefore, after the authentication identifier is added to the image, the content of the image data area is not affected.
  • the client After adding the encrypted authentication identifier to the image, the client encrypts the encryption key using the public key, and adds the encrypted encryption key to the image attachment
  • the header file header is specifically added to the header in the header.
  • the tag information of the MODEL When the server obtains the image, it is named in the header of the image.
  • the encrypted authentication information is extracted from the tag information of the Make, and the encrypted encryption key is extracted from the Tag information named MODEL in the header of the image.
  • the server decrypts the encrypted encryption key by using a private key corresponding to the public key to obtain the encryption key, and obtains the encryption key.
  • the encryption key decrypts the authentication identifier extracted in the tag information of the Make, and obtains the decrypted authentication identifier.
  • the server splits the authentication identifier to obtain a device name, a redundant string, and a hash fingerprint in the authentication identifier.
  • the authentication identifier is encrypted by the encryption key, and the encryption for encrypting the authentication identifier is encrypted to prevent the image from being tampered with by illegal molecules, thereby ensuring the security of the image during transmission.
  • the above computing module 10, the splicing module 20, the sending module 30, and the like may be embedded in or independent of the device for verifying the authenticity of the image in hardware, or may be stored in the verification image in software. The authenticity of the device's memory, so that the processor calls to perform the corresponding operations of the above modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • FIG. 5 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present invention.
  • the device for verifying the authenticity of the image in the embodiment of the present invention may be a PC, or may be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving). Picture Experts Group Audio Layer III, motion picture expert compresses standard audio layer 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3) terminal devices such as players and portable computers.
  • MP3 Motion Picture Experts Group Audio Layer III, motion picture expert compresses standard audio layer 3
  • MP4 Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3) terminal devices such as players and portable computers.
  • the device for verifying the authenticity of the image may include a processor 1001, such as a CPU, a network interface 1004, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the device for verifying the authenticity of the image may further include a user interface, a camera, and an RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • the user interface may include a display, an input unit such as a keyboard, and the optional user interface may also include a standard wired interface, a wireless interface.
  • the picture to be detected can be acquired by the camera.
  • the device structure for verifying the authenticity of the image shown in FIG. 5 does not constitute a limitation on the device for verifying the authenticity of the image, and may include more or less components than those illustrated, or may combine some Parts, or different parts.
  • an operating system As shown in FIG. 5, an operating system, a network communication module, and a verification image authenticity program may be included in the memory 1005 as a computer storage medium.
  • the operating system is a program that manages and controls the device hardware and software resources for verifying the authenticity of the image, and supports the verification of the image authenticity program and the operation of other software and/or programs.
  • the network communication module is used to implement communication between the memory 1005 and other hardware and software in the device that verifies the authenticity of the image.
  • the network interface 1004 is mainly used to connect to the server and perform data communication with the server; the processor 1001 is configured to execute the verification image authenticity program stored in the memory 1005. Implement the following steps:
  • the identifier information includes a device name and a redundant character string for acquiring the image
  • the step for the server to verify the authenticity of the image according to the authentication identifier in the image includes:
  • calculating a hash value of the image pixel, and obtaining a hash fingerprint of the image includes:
  • the image is preprocessed to obtain the preprocessed image
  • the pixel value of the pixel is set to 1;
  • the pixel value of the pixel is set to 0;
  • a hash fingerprint of the image is generated from pixel points having pixel values of 1 and 0.
  • preprocessing the image to obtain the preprocessed image includes:
  • the image is acquired, the image is subjected to grayscale processing to obtain the grayscale image;
  • the reduced cosine transform is performed on the reduced image to obtain the preprocessed image.
  • the step of acquiring the identification information that identifies the image, and the step of splicing the identification information and the hash fingerprint into an authentication identifier is added to the image, where
  • the encrypted authentication identifier and the encrypted encryption key are added to the image.
  • the embodiment of the device for verifying the authenticity of the image is basically the same as the embodiment of the method and device for verifying the authenticity of the image, and details are not described herein again.
  • the present invention provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following step:
  • the identifier information includes a device name and a redundant character string for acquiring the image
  • the step for the server to verify the authenticity of the image according to the authentication identifier in the image includes:
  • calculating a hash value of the image pixel, and obtaining a hash fingerprint of the image includes:
  • the image is preprocessed to obtain the preprocessed image
  • the pixel value of the pixel is set to 1;
  • the pixel value of the pixel is set to 0;
  • a hash fingerprint of the image is generated from pixel points having pixel values of 1 and 0.
  • preprocessing the image to obtain the preprocessed image includes:
  • the image is acquired, the image is subjected to grayscale processing to obtain the grayscale image;
  • the reduced cosine transform is performed on the reduced image to obtain the preprocessed image.
  • the step of acquiring the identification information that identifies the image, and the step of splicing the identification information and the hash fingerprint into an authentication identifier is added to the image, where
  • the encrypted authentication identifier and the encrypted encryption key are added to the image.
  • the embodiment of the computer readable storage medium of the present invention is substantially the same as the embodiment of the method and apparatus for verifying the authenticity of the image, and details are not described herein again.
  • the present invention further provides a server for verifying the authenticity of an image
  • the server is connected to a client, wherein the client calculates a hash value of the image pixel when acquiring an image.
  • the server is used to:
  • the embodiment of the present invention for verifying the authenticity of the image is basically the same as the method and the device for verifying the authenticity of the image, and details are not described herein again.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • a storage medium such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Storage Device Security (AREA)

Abstract

Disclosed is a method for verifying the authenticity of an image. The method comprises: when a client acquires an image, calculating a hash value of a pixel of the image so as to obtain a hash fingerprint of the image; acquiring identification information for identifying the image, splicing the identification information and the hash fingerprint into an authentication identification, and adding same into the image; and sending the image containing the authentication identification to a service end, so that the service end verifies the authenticity of the image according to the authentication identification in the image. Further disclosed are an apparatus and device for verifying the authenticity of an image, and a computer-readable storage medium. The present invention uniquely identifies an image by obtaining a hash fingerprint of the image by means of a pixel of the image and adding identification information about the image on the basis of the hash fingerprint, so as to recognize whether the image has been illegally tampered with, and thus guarantee the authenticity of the image.

Description

验证图像真伪的方法、装置、设备、存储介质及服务端  Method, device, device, storage medium and server for verifying the authenticity of an image
技术领域Technical field
本发明涉及图像技术领域,尤其涉及一种验证图像真伪的方法、装置、设备及计算机可读存储介质。The present invention relates to the field of image technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for verifying the authenticity of an image.
背景技术Background technique
现有很多的业务场景都需要用户提供各种证件进行身份认证,在通过证件进行身份认证过程中,除了验证原件外还需要对证件进行拍照,存储所拍摄的证件的图像,以备后续验证。但是很多非法分子为了获取不当利益,会恶意篡改证件的图像。Many existing business scenarios require the user to provide various certificates for identity authentication. In the process of identity authentication through the certificate, in addition to verifying the original, the document needs to be photographed, and the image of the captured document is stored for subsequent verification. However, many illegal elements will maliciously tamper with the image of the documents in order to obtain improper benefits.
为了识别被篡改后的图像,现有的方法一般都是在图像中添加水印,通过检测水印的完整性来确定图像是否被篡改。但是随着图像编辑技术的发展,非法分子在篡改图像后,可在图像中重新加入相同的水印,导致不能识别出被非法分子篡改后的图像,不能保证图像的真实性。In order to identify the falsified image, the existing method generally adds a watermark to the image, and determines whether the image has been tampered by detecting the integrity of the watermark. However, with the development of image editing technology, illegal molecules can re-add the same watermark in the image after tampering with the image, which makes it impossible to identify the image that has been tampered with by illegal molecules, and cannot guarantee the authenticity of the image.
发明内容Summary of the invention
本发明的主要目的在于提供一种验证图像真伪的方法、装置、设备及计算机可读存储介质,旨在解决现有的验证图像真伪的方法不能保证图像的真实性的技术问题。The main object of the present invention is to provide a method, device, device and computer readable storage medium for verifying the authenticity of an image, which aims to solve the technical problem that the method for verifying the authenticity of an image cannot guarantee the authenticity of the image.
为实现上述目的,本发明提供的一种验证图像真伪的方法,所述验证图像真伪的方法包括:To achieve the above object, the present invention provides a method for verifying the authenticity of an image, and the method for verifying the authenticity of an image includes:
当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the client obtains an image, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
此外,为实现上述目的,本发明还提供一种验证图像真伪的装置,所述验证图像真伪的装置包括:In addition, in order to achieve the above object, the present invention further provides an apparatus for verifying the authenticity of an image, and the apparatus for verifying the authenticity of the image includes:
计算模块,用于当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;a calculation module, configured to calculate a hash value of the image pixel when the image is acquired, to obtain a hash fingerprint of the image;
拼接模块,用于获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;a splicing module, configured to acquire identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
发送模块,用于将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。And a sending module, configured to send the image that includes the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
此外,为实现上述目的,本发明还提供一验证图像真伪的设备,所述验证图像真伪的设备包括处理器、网络接口、存储器及通信总线;In addition, in order to achieve the above object, the present invention further provides an apparatus for verifying the authenticity of an image, and the apparatus for verifying the authenticity of the image comprises a processor, a network interface, a memory, and a communication bus;
所述通信总线用于实现处理器、网络接口及存储器之间的连接通信;The communication bus is configured to implement connection communication between a processor, a network interface, and a memory;
所述网络接口用于连接服务端,与所述服务端进行数据通信;The network interface is configured to connect to a server, and perform data communication with the server;
所述处理器用于执行存储器中存储的验证图像真伪程序,以实现以下步骤:The processor is configured to execute a verification image authenticity program stored in the memory to implement the following steps:
当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the image is acquired, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:Moreover, in order to achieve the above object, the present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors To achieve the following steps:
当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the image is acquired, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
此外,为实现上述目的,本发明还提供一种用于验证图像真伪的服务端,所述服务端与一客户端连接,其中,所述客户端在获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;将含有认证标识的所述图像发送给服端;In addition, in order to achieve the above object, the present invention further provides a server for verifying the authenticity of an image, the server is connected to a client, wherein the client calculates the image pixel when acquiring an image. a hash value, obtaining a hash fingerprint of the image; acquiring identification information identifying the image, stitching the identification information and the hash fingerprint into an authentication identifier, adding to the image; and including the authentication identifier Sending the image to the server;
所述服务端用于:The server is used to:
接收所述客户端发送的所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;Receiving the image sent by the client, obtaining an authentication identifier of the image, and determining whether the device name in the authentication identifier is consistent with a pre-stored device name;
若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;If the device name is inconsistent with the pre-stored device name, determining that the image is a forged image;
若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;If the device name is consistent with the pre-stored device name, calculating a hash fingerprint of the image;
若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;If the calculated hash fingerprint does not match the hash fingerprint in the authentication identifier, determining that the image is a forged image;
若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;If the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determine whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string;
若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;If the redundant character string is inconsistent with the pre-stored redundant character string, determining that the image is a forged image;
若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。And if the redundant character string is consistent with the pre-stored redundant character string, determining that the image is a real image.
本发明通过客户端计算所接收图像的像素的哈希值,得到所述图像的哈希指纹,将所获取的标识信息和所述哈希指纹拼接成认证标识添加至所述图像中,并发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。实现了通过图像的像素得到所述图像的哈希指纹,在哈希指纹的基础上加上所述图像的标识信息来唯一标识所述图像,从而识别所述图像是否被非法分子篡改,保证所述图像的真实性。The invention calculates a hash value of the pixel of the received image by the client, obtains a hash fingerprint of the image, and splices the obtained identification information and the hash fingerprint into an authentication identifier, adds the image to the image, and sends the identifier And the server is configured to verify, by the server, the authenticity of the image according to the authentication identifier in the image. A hash fingerprint of the image is obtained by pixels of the image, and the image identification information is added to the hash fingerprint to uniquely identify the image, thereby identifying whether the image is falsified by an illegal molecule, and ensuring that the image is The authenticity of the image.
附图说明DRAWINGS
图1为本发明验证图像真伪的方法的较佳实施例的流程示意图;1 is a schematic flow chart of a preferred embodiment of a method for verifying image authenticity according to the present invention;
图2为本发明实施例中获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中的一种流程示意图;2 is a schematic flowchart of obtaining identification information identifying the image in the embodiment of the present invention, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
图3为本发明验证图像真伪的装置的较佳实施例的功能模块示意图;3 is a schematic diagram of functional modules of a preferred embodiment of an apparatus for verifying image authenticity according to the present invention;
图4为本发明实施例中拼接模块的一种功能模块示意图;4 is a schematic diagram of a functional module of a splicing module according to an embodiment of the present invention;
图5是本发明实施例方案涉及的硬件运行环境的设备结构示意图。FIG. 5 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明提供一种验证图像真伪的方法。The present invention provides a method of verifying the authenticity of an image.
参照图1,图1为本发明验证图像真伪的方法较佳实施例的流程示意图。Referring to FIG. 1, FIG. 1 is a schematic flow chart of a method for verifying the authenticity of an image according to a preferred embodiment of the present invention.
在本实施例中,所述验证图像真伪的方法包括:In this embodiment, the method for verifying the authenticity of the image includes:
步骤S10,当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹。Step S10: When the client acquires an image, calculate a hash value of the image pixel to obtain a hash fingerprint of the image.
当客户端获取到图像时,所述客户端通过所述图像的像素值计算得到所述图像的哈希值,根据计算所得的哈希值得到所述图像的哈希指纹。需要说明的是,在本实施例中,是采用基于图像像素的指纹提取算法得到所述图像的哈希值。相比于通过加密散列函数算法计算所述图像的哈希值,本实施例中的基于图像像素的指纹提取算法,可以避免因极小的改变而导致图像的哈希值大幅度的改变,保证计算所得的所述图像哈希值的稳定性。所述加密散列函数算法对输入源极为敏感,输入中极为细微的变化都会引起计算出的哈希值的显著改变。但有时需要对图像做一些无害的操作,如将图像放大或者缩小,但实际内容可能并没有改变,但加密散列函数算法输出的哈希值就会发生极大变化,而基于图像像素的指纹提取算法则不会出现这种问题。When the client obtains the image, the client calculates a hash value of the image by using the pixel value of the image, and obtains a hash fingerprint of the image according to the calculated hash value. It should be noted that, in this embodiment, the image pixel-based fingerprint extraction algorithm is used to obtain the hash value of the image. Compared with calculating the hash value of the image by the cryptographic hash function algorithm, the image pixel-based fingerprint extraction algorithm in this embodiment can avoid a large change of the hash value of the image due to a small change. The calculated stability of the image hash value is guaranteed. The cryptographic hash function algorithm is extremely sensitive to the input source, and very subtle changes in the input can cause significant changes in the calculated hash value. But sometimes you need to do some harmless operations on the image, such as zooming in or out, but the actual content may not change, but the hash value of the cryptographic hash function output will change greatly, and based on image pixels. The fingerprint extraction algorithm does not have this problem.
进一步地,所述步骤S10包括:Further, the step S10 includes:
步骤a,当所述客户端获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像。Step a, when the client acquires the image, pre-process the image to obtain the pre-processed image.
当所述客户端得到所述图像,在计算所述图像的哈希指纹过程中,需要先对所述图像进行预处理,以得到预处理后的所述图像。When the client obtains the image, in calculating a hash fingerprint of the image, the image needs to be pre-processed to obtain the pre-processed image.
进一步地,所述步骤a包括:Further, the step a includes:
步骤a1,当所述客户端获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;Step a1, when the client acquires the image, performing grayscale processing on the image to obtain the grayscale image;
当所述客户端获取到所述图像时,所述客户端对所述图像进行预处理的具体过程为:当所述客户端获取到所述图像时,所述客户端对所述图像进行灰度化处理,得到灰度化后的所述图像。所述灰度化是在RGB模型中,如果R(红)=G(绿)=B(蓝)时,则彩色表示一种灰度颜色,其中R=G=B的值叫灰度值,因此,灰度图像每个像素只需一个字节存放灰度值(又称强度值、亮度值),灰度范围为0-255,一般有以下四种方法对彩色图像进行灰度化,分别为分量法, 最大值法,平均值法和加权平均法。When the client obtains the image, the specific process of the client pre-processing the image is: when the client acquires the image, the client performs graying on the image. The image is processed to obtain the grayed out image. The grayscale is in the RGB model, if R (red) = G (green) = B (blue), then the color represents a grayscale color, wherein the value of R = G = B is called the gray value, Therefore, each pixel of the grayscale image only needs one byte to store the gray value (also called the intensity value and the brightness value), and the gray scale range is 0-255. Generally, the following four methods are used to grayscale the color image, respectively. For the component method, Maximum method, average method and weighted average method.
步骤a2,将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;Step a2, reducing the grayscale image to a preset ratio to obtain the reduced image;
所述客户端将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像。需要说明的是,所述预设比例根据具体需要而设置,如当设置为8*8时,表示将灰度化后的所述图像缩小为8*8的尺度。The client reduces the grayscale image to a preset ratio to obtain the reduced image. It should be noted that the preset ratio is set according to specific needs, such as when set to 8*8, indicating that the grayscale image is reduced to a scale of 8*8.
步骤a3,对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。In step a3, the reduced image is subjected to discrete cosine transform to obtain the preprocessed image.
当所述客户端得到缩小后的所述图像后,所述客户端对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。所述离散余弦变换是与傅里叶变换相关的一种变换,它类似于离散傅里叶变换,但是离散余弦变换只使用实数。所述离散余弦变换相当于一个长度大概是它两倍的离散傅里叶变换,这个离散傅里叶变换是对一个实偶函数进行的(因为一个实偶函数的傅里叶变换仍然是一个实偶函数),在有些变形里面需要将输入或者输出的位置移动半个单位。After the client obtains the reduced image, the client performs discrete cosine transform on the reduced image to obtain the preprocessed image. The discrete cosine transform is a transform associated with a Fourier transform that is similar to a discrete Fourier transform, but a discrete cosine transform uses only real numbers. The discrete cosine transform is equivalent to a discrete Fourier transform of approximately twice the length. This discrete Fourier transform is performed on a real function (because the Fourier transform of a real function is still a real Even function), in some variants, you need to move the position of the input or output by half a unit.
步骤b,计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比。Step b, calculating a mean value of the pre-processed image pixels, and comparing the pixel values of the pre-processed image pixels to the average value.
步骤c,若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1。In step c, if the pixel value of the pixel is greater than the average, the pixel value of the pixel is set to 1.
步骤d,若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0。In step d, if the pixel value of the pixel is less than or equal to the average, the pixel value of the pixel is set to 0.
步骤e,根据像素值为1和0的像素点生成所述图像的哈希指纹。Step e, generating a hash fingerprint of the image according to pixel points having pixel values of 1 and 0.
当所述客户端得到预处理后的所述图像后,所述客户端提取预处理后的所述图像中各个像素点的像素值,将各个像素点的像素值之和除以所述图像中像素点的数量,得到预处理后的所述图像像素的均值。所述客户端将预处理后的所述图像各个像素点的像素值与所述图像像素的均值进行对比。当所述图像像素点的像素值大于所述图像像素的均值时,所述客户端将所述图像像素点的像素值设置为1;当所述图像像素点的像素值小于或者等于所述图像像素的均值时,所述客户端将所述图像像素点的像素值设置为0。所述客户端根据像素值为1和0的像素点生成所述图像的哈希指纹。After the client obtains the pre-processed image, the client extracts pixel values of respective pixels in the pre-processed image, and divides the sum of pixel values of the respective pixel points by the image. The number of pixels is obtained as the average of the image pixels after preprocessing. The client compares the pixel values of the respective pixels of the preprocessed image with the mean of the image pixels. When the pixel value of the image pixel is greater than the average of the image pixel, the client sets the pixel value of the image pixel to 1; when the pixel value of the image pixel is less than or equal to the image When the average of the pixels, the client sets the pixel value of the image pixel to 0. The client generates a hash fingerprint of the image based on pixel points having pixel values of 1 and 0.
步骤S20,获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中。In step S20, the identification information identifying the image is obtained, and the identification information and the hash fingerprint are spliced into an authentication identifier and added to the image.
当所述客户端得到所述图像的哈希指纹时,所述客户端获取用于标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识,将所述认证标识添加至所述图像中。可以理解的是,所述标识信息是可唯一表示所述图像的标识。When the client obtains a hash fingerprint of the image, the client acquires identification information for identifying the image, and the identifier information and the hash fingerprint are spliced into an authentication identifier, and the authentication is performed. An identification is added to the image. It can be understood that the identification information is an identifier that can uniquely represent the image.
进一步地,所述标识信息包括获取所述图像的设备名称和冗余字符串。所述冗余字符串可根据需要自由设置,如可设置为AABB_1122。所述客户端在将所述标识信息和所述哈希指纹拼接成认证标识得过程中,可以通过特殊字符来间隔区分所述哈希指纹、设备名称和冗余字符串。所述特殊字符包括但不限于“#”和“/”。如当用img_footPrint表示所述图像的哈希指纹,用APP_name表示获取所述图像的设备名称,用redundant_str表示所述冗余字符串时,所述认证标识可表示为APP_name#img_footPrint#redundant_str。需要说明的是,在所述认证标识中,所述哈希指纹、设备名称和冗余字符串的排列顺序没有限制,如所述认证标识也可以表示为img_footPrint#APP_name#redundant_str,或者表示为img_footPrint#redundant_str#APP_name。Further, the identification information includes a device name and a redundant character string for acquiring the image. The redundant string can be freely set as needed, such as AABB_1122. In the process of splicing the identification information and the hash fingerprint into an authentication identifier, the client may distinguish the hash fingerprint, the device name, and the redundant character string by special characters. The special characters include, but are not limited to, "#" and "/". For example, when img_footPrint is used to represent the hash fingerprint of the image, APP_name is used to represent the device name of the image, and when the redundant string is represented by redundant_str, the authentication identifier may be represented as APP_name#img_footPrint#redundant_str. It should be noted that, in the authentication identifier, the order of arrangement of the hash fingerprint, the device name, and the redundant character string is not limited. For example, the authentication identifier may also be expressed as img_footPrint#APP_name#redundant_str, or expressed as img_footPrint. #redundant_str#APP_name.
步骤S30,将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Step S30: Send the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
当所述客户端得到含有认证标识的所述图像后,将含有认证标识的所述图像发送给服务端。当所述服务端接收到所述客户端发送的所述图像后,所述服务端根据所述图像中的认证标识验证所述图像的真伪。可以理解,在本申请中,服务端可以为一独立的服务器,也可以为实现相应功能的服务平台。After the client obtains the image containing the authentication identifier, the image containing the authentication identifier is sent to the server. After the server receives the image sent by the client, the server verifies the authenticity of the image according to the authentication identifier in the image. It can be understood that in the present application, the server can be a stand-alone server or a service platform that implements corresponding functions.
进一步地,当所述标识信息包括获取所述图像的设备名称和冗余字符串时,所述以供所述服务端根据所述图像中的认证标识验证所述图像的真伪的步骤包括:Further, when the identifier information includes the device name and the redundant character string of the image, the step of the server for verifying the authenticity of the image according to the authentication identifier in the image includes:
步骤f,由所述服务端接收所述客户端发送的所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;Step f: The server receives the image sent by the client, obtains an authentication identifier of the image, and determines whether the device name in the authentication identifier is consistent with a pre-stored device name.
步骤g,若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;Step g, if the device name does not match the pre-stored device name, determining that the image is a forged image;
步骤h,若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;Step h, if the device name is consistent with the pre-stored device name, calculating a hash fingerprint of the image;
当所述标识信息包括获取所述图像的设备名称和冗余字符串,且所述服务端接收到所述客户端发送的所述图像时,所述服务端获取所述图像中的认证标识,拆分所述认证标识,得到所述认证标识中的设备名称、冗余字符串和哈希指纹。进一步地,所述服务端在拆分所述认证标识过程中,可通过所述特殊字符来拆分所述认证标识。When the identification information includes the device name and the redundant character string of the image, and the server receives the image sent by the client, the server acquires the authentication identifier in the image, Splitting the authentication identifier to obtain a device name, a redundant character string, and a hash fingerprint in the authentication identifier. Further, in the process of splitting the authentication identifier, the server may split the authentication identifier by using the special character.
当所述服务端得到所述认证标识中的设备名称、冗余字符串和哈希指纹时,所述服务端判断所述认证标识中的设备名称是否与其预存设备名称一致。当所述认证标识中的设备名称与所述预存设备名称不一致时,所述服务端确定所述图像不是由指定的设备所拍摄的,为伪造的图像;当所述认证标识中的设备名称与所述预存设备名称一致时,所述服务端计算所述图像的哈希指纹。需要说明的是,所述服务端计算所述图像的哈希指纹与所述客户端计算所述图像像素的哈希值,得到所述图像的哈希指纹的过程相同,在此不再赘述。When the server obtains the device name, the redundancy string, and the hash fingerprint in the authentication identifier, the server determines whether the device name in the authentication identifier is consistent with the pre-stored device name. When the device name in the authentication identifier is inconsistent with the pre-stored device name, the server determines that the image is not captured by the specified device, and is a forged image; when the device name in the authentication identifier is When the pre-stored device names are consistent, the server calculates a hash fingerprint of the image. It should be noted that the process of calculating the hash fingerprint of the image by the server and the hash value of the image pixel by the client to obtain the hash fingerprint of the image is the same, and details are not described herein again.
步骤i,若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;Step i: if the calculated hash fingerprint is inconsistent with the hash fingerprint in the authentication identifier, determining that the image is a forged image;
步骤j,若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;Step j: If the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determine whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string;
步骤k,若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;Step k, if the redundant character string is inconsistent with the pre-stored redundant character string, determining that the image is a forged image;
步骤l,若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。Step 1. If the redundant character string is consistent with the pre-stored redundant character string, determine that the image is a real image.
当所述服务端计算得到所述图像的哈希指纹时,所述服务端将计算所得的哈希指纹与所述认证标识中的哈希指纹进行比较。当计算所得的哈希指纹与所述认证标识中的哈希指纹不一致时,所述服务端确定所述图像为已被非法篡改,是伪造的图像;当计算所得的哈希指纹与所述认证标识中的哈希指纹一致时,所述服务端判断所述认证标识中的冗余字符串是否与预存冗余字符串一致。当所述认证标识中的冗余字符串与所述预存冗余字符串不一致时,所述服务端确定所述图像为伪造的图像;当所述认证标识中的冗余字符串与所述预存冗余字符串一致时,所述服务端确定所述图像为真实的图像。需要说明的是,所述预存设备名称和所述预存冗余字符串是所述客户端在发送所述认证标识之前,发送给所述服务端的。When the server calculates a hash fingerprint of the image, the server compares the calculated hash fingerprint with the hash fingerprint in the authentication identifier. When the calculated hash fingerprint is inconsistent with the hash fingerprint in the authentication identifier, the server determines that the image is illegally falsified, is a forged image; when the calculated hash fingerprint and the authentication When the hash fingerprints in the identifiers are consistent, the server determines whether the redundant character string in the authentication identifier is consistent with the pre-stored redundant character string. When the redundant character string in the authentication identifier is inconsistent with the pre-stored redundant character string, the server determines that the image is a forged image; when the redundant character string in the authentication identifier and the pre-stored When the redundant strings are identical, the server determines that the image is a real image. It should be noted that the pre-stored device name and the pre-stored redundant character string are sent by the client to the server before sending the authentication identifier.
进一步地,当所述服务端确定所述图像为真实的图像时,所述服务端发送验证成功的消息给所述客户端。当所述客户端接收到验证成功的消息后,所述客户端继续执行下一操作,如执行开户操作。当所述服务端确定所述图像为伪造的图像时,所述服务端发送验证失败的消息给所述客户端。当所述客户端接收到验证失败的消息后,所述客户端输出提示信息,提示用户重新拍摄所述图像或者重新上传所述图像。Further, when the server determines that the image is a real image, the server sends a message that the verification is successful to the client. After the client receives the message that the verification is successful, the client continues to perform the next operation, such as performing an account opening operation. When the server determines that the image is a forged image, the server sends a message that the verification fails to the client. After the client receives the message that the verification fails, the client outputs a prompt message prompting the user to retake the image or re-upload the image.
本实施例通过客户端计算所接收图像的像素的哈希值,得到所述图像的哈希指纹,将所获取的标识信息和所述哈希指纹拼接成认证标识添加至所述图像中,并发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。实现了通过图像的像素得到所述图像的哈希指纹,在哈希指纹的基础上加上所述图像的标识信息来唯一标识所述图像,从而识别所述图像是否被非法分子篡改,保证所述图像的真实性。In this embodiment, the hash value of the pixel of the received image is calculated by the client, and the hash fingerprint of the image is obtained, and the obtained identification information and the hash fingerprint are spliced into an authentication identifier and added to the image, and Sending to the server, for the server to verify the authenticity of the image according to the authentication identifier in the image. A hash fingerprint of the image is obtained by pixels of the image, and the image identification information is added to the hash fingerprint to uniquely identify the image, thereby identifying whether the image is falsified by an illegal molecule, and ensuring that the image is The authenticity of the image.
进一步地,基于本发明验证图像真伪的方法的较佳实施例提出本发明的另一实施例,参照图2,在本实施例中,所述步骤S20包括:Further, a preferred embodiment of the method for verifying the authenticity of an image according to the present invention provides another embodiment of the present invention. Referring to FIG. 2, in the embodiment, the step S20 includes:
步骤S21,获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;Step S21: Obtain identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier.
步骤S22,通过对称加密算法生成加密密钥;Step S22, generating an encryption key by using a symmetric encryption algorithm;
当所述客户端获取到标识所述图像的标识信息后,所述客户端将所述标识信息和所述哈希指纹拼接成认证标识,并发送认证请求给所述服务端。当所述服务端接收到所述认证请求时,所述服务端根据非对称加密算法得到对应的公钥和私钥,存储所述私钥,将所述公钥发送给所述客户端。所述客户端接收所述公钥,并通过对称加密算法生成加密密钥。所述客户端可以先发送认证请求给所述服务端,然后再通过所述对称加密算法生成加密密钥,也可以先通过所述对称加密算法生成加密密钥,然后再发送认证请求给所述服务端。需要说明的是,所述对称加密算法包括但不限于DES(Data Encryption Standard,数据加密标准)、3DES、IDEA(International Data Encryption Algorithm)和AES(Advanced Encryption Standard,高级加密标准),所述非对称加密算法包括但不限于RSA、Elgamal和椭圆加密算法ECC。After the client obtains the identifier information that identifies the image, the client splices the identifier information and the hash fingerprint into an authentication identifier, and sends an authentication request to the server. When the server receives the authentication request, the server obtains a corresponding public key and a private key according to an asymmetric encryption algorithm, stores the private key, and sends the public key to the client. The client receives the public key and generates an encryption key through a symmetric encryption algorithm. The client may first send an authentication request to the server, and then generate an encryption key by using the symmetric encryption algorithm, or first generate an encryption key by using the symmetric encryption algorithm, and then send an authentication request to the server. Server. It should be noted that the symmetric encryption algorithm includes but is not limited to DES (Data Encryption Standard, Data Encryption Standard), 3DES, IDEA (International Data Encryption) Algorithm) and AES (Advanced Encryption) Standard, Advanced Encryption Standard), including but not limited to RSA, Elgamal, and Elliptical Encryption Algorithm ECC.
步骤S23,通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;Step S23, encrypting the authentication identifier by using the encryption key, and encrypting the encryption key by using a public key sent by the server;
步骤S24,将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。Step S24, adding the encrypted authentication identifier and the encrypted encryption key to the image.
当所述服务端得到所述加密密钥后,所述服务端通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥,得到加密后的所述认证标识和加密后的所述加密密钥,将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。After the server obtains the encryption key, the server encrypts the authentication identifier by using the encryption key, and encrypts the encryption key by using a public key sent by the server to obtain an encrypted The authentication identifier and the encrypted encryption key add the encrypted authentication identifier and the encrypted encryption key to the image.
进一步地,所述客户端将加密后的所述认证标识添加至所述图像中的具体过程为:所述客户端将加密后的所述认证标识添加至所述图像附属的头文件Header中,具体添加至所述Header中名为 Make的Tag信息中。需要说明的是,所述图像的header区域与数据区域相互独立,因此在将所述认证标识添加至所述图像中后,不影响所述图像数据区域的内容。在将所述加密后的所述认证标识添加至所述图像中后,所述客户端使用所述公钥加密所述加密密钥,将加密后的所述加密密钥添加至所述图像附属的头文件Header中,具体添加至所述Header中名为 MODEL的Tag信息中。当所述服务端得到所述图像后,在所述图像的Header中名为 Make的Tag信息中提取加密后的所述认证标识,在所述图像的Header中名为MODEL的Tag信息中提取加密后的所述加密密钥。当所述服务端得到加密后的所述加密密钥后,所述服务端通过与所述公钥对应的私钥解密加密后的所述加密密钥,得到所述加密密钥,通过解密所得的所述加密密钥解密在所述Make的Tag信息中提取的所述认证标识,得到解密后的所述认证标识。所述服务端拆分所述认证标识,得到所述认证标识中的设备名称、冗余字符串和哈希指纹。Further, the specific process of the client adding the encrypted authentication identifier to the image is: the client adds the encrypted authentication identifier to the header file header attached to the image, Specifically added to the name in the Header Make Tag information. It should be noted that the header area of the image and the data area are independent of each other, and therefore, after the authentication identifier is added to the image, the content of the image data area is not affected. After adding the encrypted authentication identifier to the image, the client encrypts the encryption key using the public key, and adds the encrypted encryption key to the image attachment The header file header is specifically added to the header in the header. The tag information of the MODEL. When the server obtains the image, it is named in the header of the image. The encrypted authentication information is extracted from the tag information of the Make, and the encrypted encryption key is extracted from the Tag information named MODEL in the header of the image. After the server obtains the encrypted encryption key, the server decrypts the encrypted encryption key by using a private key corresponding to the public key to obtain the encryption key, and obtains the encryption key. The encryption key decrypts the authentication identifier extracted in the tag information of the Make, and obtains the decrypted authentication identifier. The server splits the authentication identifier to obtain a device name, a redundant string, and a hash fingerprint in the authentication identifier.
本实施例通过加密密钥对认证标识进行加密,并对加密所述认证标识的加密进行加密,防止所述图像被非法分子篡改,保证了所述图像在传输过程中的安全性。In this embodiment, the authentication identifier is encrypted by the encryption key, and the encryption for encrypting the authentication identifier is encrypted to prevent the image from being tampered with by illegal molecules, thereby ensuring the security of the image during transmission.
需要说明的是,本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable state. In the storage medium, the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
本发明进一步提供一种验证图像真伪的装置100。The present invention further provides an apparatus 100 for verifying the authenticity of an image.
参照图3,图3为本发明验证图像真伪的装置100较佳实施例的功能模块示意图。Referring to FIG. 3, FIG. 3 is a schematic diagram of functional modules of a device 100 for verifying the authenticity of an image according to a preferred embodiment of the present invention.
需要强调的是,对本领域的技术人员来说,图3所示模块图仅仅是一个较佳实施例的示例图,本领域的技术人员围绕图3所示的验证图像真伪的装置100的模块,可轻易进行新的模块的补充;各模块的名称是自定义名称,仅用于辅助理解该验证图像真伪的装置100的各个程序功能块,不用于限定本发明的技术方案,本发明技术方案的核心是,各自定义名称的模块所要达成的功能。It should be emphasized that, for those skilled in the art, the block diagram shown in FIG. 3 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art surround the module of the apparatus 100 for verifying the authenticity of the image shown in FIG. The new module can be easily supplemented; the name of each module is a custom name, and is used only to assist in understanding the various program function blocks of the device 100 for authenticating the verification image, and is not used to limit the technical solution of the present invention. At the heart of the solution is the functionality that each module that defines the name has to achieve.
在本实施例中,所述验证图像真伪的装置100包括:In this embodiment, the apparatus 100 for verifying the authenticity of an image includes:
计算模块10,用于当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹。The calculating module 10 is configured to calculate a hash value of the image pixel when the image is acquired, to obtain a hash fingerprint of the image.
当客户端获取到图像时,所述客户端通过所述图像的像素值计算得到所述图像的哈希值,根据计算所得的哈希值得到所述图像的哈希指纹。需要说明的是,在本实施例中,是采用基于图像像素的指纹提取算法得到所述图像的哈希值。相比于通过加密散列函数算法计算所述图像的哈希值,本实施例中的基于图像像素的指纹提取算法,可以避免因极小的改变而导致图像的哈希值大幅度的改变,保证计算所得的所述图像哈希值的稳定性。所述加密散列函数算法对输入源极为敏感,输入中极为细微的变化都会引起计算出的哈希值的显著改变。但有时需要对图像做一些无害的操作,如将图像放大或者缩小,但实际内容可能并没有改变,但加密散列函数算法输出的哈希值就会发生极大变化,而基于图像像素的指纹提取算法则不会出现这种问题。When the client obtains the image, the client calculates a hash value of the image by using the pixel value of the image, and obtains a hash fingerprint of the image according to the calculated hash value. It should be noted that, in this embodiment, the image pixel-based fingerprint extraction algorithm is used to obtain the hash value of the image. Compared with calculating the hash value of the image by the cryptographic hash function algorithm, the image pixel-based fingerprint extraction algorithm in this embodiment can avoid a large change of the hash value of the image due to a small change. The calculated stability of the image hash value is guaranteed. The cryptographic hash function algorithm is extremely sensitive to the input source, and very subtle changes in the input can cause significant changes in the calculated hash value. But sometimes you need to do some harmless operations on the image, such as zooming in or out, but the actual content may not change, but the hash value of the cryptographic hash function output will change greatly, and based on image pixels. The fingerprint extraction algorithm does not have this problem.
进一步地,所述计算模块10包括:Further, the computing module 10 includes:
预处理单元,用于当获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像。And a pre-processing unit, configured to: when the image is acquired, pre-process the image to obtain the pre-processed image.
当所述客户端得到所述图像,在计算所述图像的哈希指纹过程中,需要先对所述图像进行预处理,以得到预处理后的所述图像。When the client obtains the image, in calculating a hash fingerprint of the image, the image needs to be pre-processed to obtain the pre-processed image.
进一步地,所述预处理单元还用于当获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;Further, the pre-processing unit is further configured to: when the image is acquired, perform grayscale processing on the image to obtain the grayscale image;
当所述客户端获取到所述图像时,所述客户端对所述图像进行预处理的具体过程为:当所述客户端获取到所述图像时,所述客户端对所述图像进行灰度化处理,得到灰度化后的所述图像。所述灰度化是在RGB模型中,如果R(红)=G(绿)=B(蓝)时,则彩色表示一种灰度颜色,其中R=G=B的值叫灰度值,因此,灰度图像每个像素只需一个字节存放灰度值(又称强度值、亮度值),灰度范围为0-255,一般有以下四种方法对彩色图像进行灰度化,分别为分量法, 最大值法,平均值法和加权平均法。When the client obtains the image, the specific process of the client pre-processing the image is: when the client acquires the image, the client performs graying on the image. The image is processed to obtain the grayed out image. The grayscale is in the RGB model, if R (red) = G (green) = B (blue), then the color represents a grayscale color, wherein the value of R = G = B is called the gray value, Therefore, each pixel of the grayscale image only needs one byte to store the gray value (also called the intensity value and the brightness value), and the gray scale range is 0-255. Generally, the following four methods are used to grayscale the color image, respectively. For the component method, Maximum method, average method and weighted average method.
所述预处理单元还用于将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;The pre-processing unit is further configured to reduce the grayscale image to a preset ratio to obtain the reduced image.
所述客户端将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像。需要说明的是,所述预设比例根据具体需要而设置,如当设置为8*8时,表示将灰度化后的所述图像缩小为8*8的尺度。The client reduces the grayscale image to a preset ratio to obtain the reduced image. It should be noted that the preset ratio is set according to specific needs, such as when set to 8*8, indicating that the grayscale image is reduced to a scale of 8*8.
所述预处理单元还用于对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。The pre-processing unit is further configured to perform discrete cosine transform on the reduced image to obtain the pre-processed image.
当所述客户端得到缩小后的所述图像后,所述客户端对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。所述离散余弦变换是与傅里叶变换相关的一种变换,它类似于离散傅里叶变换,但是离散余弦变换只使用实数。所述离散余弦变换相当于一个长度大概是它两倍的离散傅里叶变换,这个离散傅里叶变换是对一个实偶函数进行的(因为一个实偶函数的傅里叶变换仍然是一个实偶函数),在有些变形里面需要将输入或者输出的位置移动半个单位。After the client obtains the reduced image, the client performs discrete cosine transform on the reduced image to obtain the preprocessed image. The discrete cosine transform is a transform associated with a Fourier transform that is similar to a discrete Fourier transform, but a discrete cosine transform uses only real numbers. The discrete cosine transform is equivalent to a discrete Fourier transform of approximately twice the length. This discrete Fourier transform is performed on a real function (because the Fourier transform of a real function is still a real Even function), in some variants, you need to move the position of the input or output by half a unit.
计算单元,用于计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比。And a calculating unit, configured to calculate a mean value of the pre-processed image pixels, and compare the pixel values of the pre-processed image pixels to the average value.
设置单元,用于若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1;若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0。a setting unit, configured to: if a pixel value of the pixel point is greater than the average value, set a pixel value of the pixel point to 1; if a pixel value of the pixel point is less than or equal to the average value, a pixel of the pixel point The value is set to 0.
第一生成单元,用于根据像素值为1和0的像素点生成所述图像的哈希指纹。a first generating unit, configured to generate a hash fingerprint of the image according to pixel points with pixel values of 1 and 0.
当所述客户端得到预处理后的所述图像后,所述客户端提取预处理后的所述图像中各个像素点的像素值,将各个像素点的像素值之和除以所述图像中像素点的数量,得到预处理后的所述图像像素的均值。所述客户端将预处理后的所述图像各个像素点的像素值与所述图像像素的均值进行对比。当所述图像像素点的像素值大于所述图像像素的均值时,所述客户端将所述图像像素点的像素值设置为1;当所述图像像素点的像素值小于或者等于所述图像像素的均值时,所述客户端将所述图像像素点的像素值设置为0。所述客户端根据像素值为1和0的像素点生成所述图像的哈希指纹。After the client obtains the pre-processed image, the client extracts pixel values of respective pixels in the pre-processed image, and divides the sum of pixel values of the respective pixel points by the image. The number of pixels is obtained as the average of the image pixels after preprocessing. The client compares the pixel values of the respective pixels of the preprocessed image with the mean of the image pixels. When the pixel value of the image pixel is greater than the average of the image pixel, the client sets the pixel value of the image pixel to 1; when the pixel value of the image pixel is less than or equal to the image When the average of the pixels, the client sets the pixel value of the image pixel to 0. The client generates a hash fingerprint of the image based on pixel points having pixel values of 1 and 0.
拼接模块20,用于获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中。The splicing module 20 is configured to obtain identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image.
当所述客户端得到所述图像的哈希指纹时,所述客户端获取用于标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识,将所述认证标识添加至所述图像中。可以理解的是,所述标识信息是可唯一表示所述图像的标识。When the client obtains a hash fingerprint of the image, the client acquires identification information for identifying the image, and the identifier information and the hash fingerprint are spliced into an authentication identifier, and the authentication is performed. An identification is added to the image. It can be understood that the identification information is an identifier that can uniquely represent the image.
进一步地,所述标识信息包括获取所述图像的设备名称和冗余字符串。所述冗余字符串可根据需要自由设置,如可设置为AABB_1122。所述客户端在将所述标识信息和所述哈希指纹拼接成认证标识得过程中,可以通过特殊字符来间隔区分所述哈希指纹、设备名称和冗余字符串。所述特殊字符包括但不限于“#”和“/”。如当用img_footPrint表示所述图像的哈希指纹,用APP_name表示获取所述图像的设备名称,用redundant_str表示所述冗余字符串时,所述认证标识可表示为APP_name#img_footPrint#redundant_str。需要说明的是,在所述认证标识中,所述哈希指纹、设备名称和冗余字符串的排列顺序没有限制,如所述认证标识也可以表示为img_footPrint#APP_name#redundant_str,或者表示为img_footPrint#redundant_str#APP_name。Further, the identification information includes a device name and a redundant character string for acquiring the image. The redundant string can be freely set as needed, such as AABB_1122. In the process of splicing the identification information and the hash fingerprint into an authentication identifier, the client may distinguish the hash fingerprint, the device name, and the redundant character string by special characters. The special characters include, but are not limited to, "#" and "/". For example, when img_footPrint is used to represent the hash fingerprint of the image, APP_name is used to represent the device name of the image, and when the redundant string is represented by redundant_str, the authentication identifier may be represented as APP_name#img_footPrint#redundant_str. It should be noted that, in the authentication identifier, the order of arrangement of the hash fingerprint, the device name, and the redundant character string is not limited. For example, the authentication identifier may also be expressed as img_footPrint#APP_name#redundant_str, or expressed as img_footPrint. #redundant_str#APP_name.
发送模块30,用于将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。The sending module 30 is configured to send the image that includes the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
当所述客户端得到含有认证标识的所述图像后,将含有认证标识的所述图像发送给服务端。当所述服务端接收到所述客户端发送的所述图像后,所述服务端根据所述图像中的认证标识验证所述图像的真伪。After the client obtains the image containing the authentication identifier, the image containing the authentication identifier is sent to the server. After the server receives the image sent by the client, the server verifies the authenticity of the image according to the authentication identifier in the image.
进一步地,当所述标识信息包括获取所述图像的设备名称和冗余字符串时;所述发送模块30还用于将所述图像发送给所述服务端,由所述服务端接收所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。Further, when the identifier information includes a device name and a redundant character string for acquiring the image, the sending module 30 is further configured to send the image to the server, where the server receives the And obtaining an authentication identifier of the image, determining whether the device name in the authentication identifier is consistent with the pre-stored device name; if the device name is different from the pre-stored device name, determining that the image is a forged image; If the device name is consistent with the pre-stored device name, the hash fingerprint of the image is calculated; if the calculated hash fingerprint is inconsistent with the hash fingerprint in the authentication identifier, determining that the image is a forged image And if the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determining whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string; if the redundant string and the Determining that the pre-stored redundant string is inconsistent, determining that the image is a forged image; if the redundant string is consistent with the pre-stored redundant string, determining the map As a real image.
当所述标识信息包括获取所述图像的设备名称和冗余字符串,且所述服务端接收到所述客户端发送的所述图像时,所述服务端获取所述图像中的认证标识,拆分所述认证标识,得到所述认证标识中的设备名称、冗余字符串和哈希指纹。进一步地,所述服务端在拆分所述认证标识过程中,可通过所述特殊字符来拆分所述认证标识。When the identification information includes the device name and the redundant character string of the image, and the server receives the image sent by the client, the server acquires the authentication identifier in the image, Splitting the authentication identifier to obtain a device name, a redundant character string, and a hash fingerprint in the authentication identifier. Further, in the process of splitting the authentication identifier, the server may split the authentication identifier by using the special character.
当所述服务端得到所述认证标识中的设备名称、冗余字符串和哈希指纹时,所述服务端判断所述认证标识中的设备名称是否与其预存设备名称一致。当所述认证标识中的设备名称与所述预存设备名称不一致时,所述服务端确定所述图像不是由指定的设备所拍摄的,为伪造的图像;当所述认证标识中的设备名称与所述预存设备名称一致时,所述服务端计算所述图像的哈希指纹。需要说明的是,所述服务端计算所述图像的哈希指纹与所述客户端计算所述图像像素的哈希值,得到所述图像的哈希指纹的过程相同,在此不再赘述。When the server obtains the device name, the redundancy string, and the hash fingerprint in the authentication identifier, the server determines whether the device name in the authentication identifier is consistent with the pre-stored device name. When the device name in the authentication identifier is inconsistent with the pre-stored device name, the server determines that the image is not captured by the specified device, and is a forged image; when the device name in the authentication identifier is When the pre-stored device names are consistent, the server calculates a hash fingerprint of the image. It should be noted that the process of calculating the hash fingerprint of the image by the server and the hash value of the image pixel by the client to obtain the hash fingerprint of the image is the same, and details are not described herein again.
当所述服务端计算得到所述图像的哈希指纹时,所述服务端将计算所得的哈希指纹与所述认证标识中的哈希指纹进行比较。当计算所得的哈希指纹与所述认证标识中的哈希指纹不一致时,所述服务端确定所述图像为已被非法篡改,是伪造的图像;当计算所得的哈希指纹与所述认证标识中的哈希指纹一致时,所述服务端判断所述认证标识中的冗余字符串是否与预存冗余字符串一致。当所述认证标识中的冗余字符串与所述预存冗余字符串不一致时,所述服务端确定所述图像为伪造的图像;当所述认证标识中的冗余字符串与所述预存冗余字符串一致时,所述服务端确定所述图像为真实的图像。需要说明的是,所述预存设备名称和所述预存冗余字符串是所述客户端在发送所述认证标识之前,发送给所述服务端的。When the server calculates a hash fingerprint of the image, the server compares the calculated hash fingerprint with the hash fingerprint in the authentication identifier. When the calculated hash fingerprint is inconsistent with the hash fingerprint in the authentication identifier, the server determines that the image is illegally falsified, is a forged image; when the calculated hash fingerprint and the authentication When the hash fingerprints in the identifiers are consistent, the server determines whether the redundant character string in the authentication identifier is consistent with the pre-stored redundant character string. When the redundant character string in the authentication identifier is inconsistent with the pre-stored redundant character string, the server determines that the image is a forged image; when the redundant character string in the authentication identifier and the pre-stored When the redundant strings are identical, the server determines that the image is a real image. It should be noted that the pre-stored device name and the pre-stored redundant character string are sent by the client to the server before sending the authentication identifier.
进一步地,当所述服务端确定所述图像为真实的图像时,所述服务端发送验证成功的消息给所述客户端。当所述客户端接收到验证成功的消息后,所述客户端继续执行下一操作,如执行开户操作。当所述服务端确定所述图像为伪造的图像时,所述服务端发送验证失败的消息给所述客户端。当所述客户端接收到验证失败的消息后,所述客户端输出提示信息,提示用户重新拍摄所述图像或者重新上传所述图像。Further, when the server determines that the image is a real image, the server sends a message that the verification is successful to the client. After the client receives the message that the verification is successful, the client continues to perform the next operation, such as performing an account opening operation. When the server determines that the image is a forged image, the server sends a message that the verification fails to the client. After the client receives the message that the verification fails, the client outputs a prompt message prompting the user to retake the image or re-upload the image.
本实施例通过客户端计算所接收图像的像素的哈希值,得到所述图像的哈希指纹,将所获取的标识信息和所述哈希指纹拼接成认证标识添加至所述图像中,并发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。实现了通过图像的像素得到所述图像的哈希指纹,在哈希指纹的基础上加上所述图像的标识信息来唯一标识所述图像,从而识别所述图像是否被非法分子篡改,保证所述图像的真实性。In this embodiment, the hash value of the pixel of the received image is calculated by the client, and the hash fingerprint of the image is obtained, and the obtained identification information and the hash fingerprint are spliced into an authentication identifier and added to the image, and Sending to the server, for the server to verify the authenticity of the image according to the authentication identifier in the image. A hash fingerprint of the image is obtained by pixels of the image, and the image identification information is added to the hash fingerprint to uniquely identify the image, thereby identifying whether the image is falsified by an illegal molecule, and ensuring that the image is The authenticity of the image.
进一步地,基于本发明验证图像真伪的装置100的较佳实施例提出本发明的另一实施例,参照图4,在本实施例中,所述拼接模块20包括:Further, a preferred embodiment of the apparatus 100 for verifying the authenticity of an image according to the present invention provides another embodiment of the present invention. Referring to FIG. 4, in the embodiment, the splicing module 20 includes:
拼接单元21,用于获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;The splicing unit 21 is configured to acquire identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
第二生成单元22,用于通过对称加密算法生成加密密钥;a second generating unit 22, configured to generate an encryption key by using a symmetric encryption algorithm;
当所述客户端获取到标识所述图像的标识信息后,所述客户端将所述标识信息和所述哈希指纹拼接成认证标识,并发送认证请求给所述服务端。当所述服务端接收到所述认证请求时,所述服务端根据非对称加密算法得到对应的公钥和私钥,存储所述私钥,将所述公钥发送给所述客户端。所述客户端接收所述公钥,并通过对称加密算法生成加密密钥。所述客户端可以先发送认证请求给所述服务端,然后再通过所述对称加密算法生成加密密钥,也可以先通过所述对称加密算法生成加密密钥,然后再发送认证请求给所述服务端。需要说明的是,所述对称加密算法包括但不限于DES(Data Encryption Standard,数据加密标准)、3DES、IDEA(International Data Encryption Algorithm)和AES(Advanced Encryption Standard,高级加密标准),所述非对称加密算法包括但不限于RSA、Elgamal和椭圆加密算法ECC。After the client obtains the identifier information that identifies the image, the client splices the identifier information and the hash fingerprint into an authentication identifier, and sends an authentication request to the server. When the server receives the authentication request, the server obtains a corresponding public key and a private key according to an asymmetric encryption algorithm, stores the private key, and sends the public key to the client. The client receives the public key and generates an encryption key through a symmetric encryption algorithm. The client may first send an authentication request to the server, and then generate an encryption key by using the symmetric encryption algorithm, or first generate an encryption key by using the symmetric encryption algorithm, and then send an authentication request to the server. Server. It should be noted that the symmetric encryption algorithm includes but is not limited to DES (Data Encryption Standard, Data Encryption Standard), 3DES, IDEA (International Data Encryption) Algorithm) and AES (Advanced Encryption) Standard, Advanced Encryption Standard), including but not limited to RSA, Elgamal, and Elliptical Encryption Algorithm ECC.
加密单元23,用于通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;The encryption unit 23 is configured to encrypt the authentication identifier by using the encryption key, and encrypt the encryption key by using a public key sent by the server;
添加单元24,用于将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。The adding unit 24 is configured to add the encrypted authentication identifier and the encrypted encryption key to the image.
当所述服务端得到所述加密密钥后,所述服务端通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥,得到加密后的所述认证标识和加密后的所述加密密钥,将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。After the server obtains the encryption key, the server encrypts the authentication identifier by using the encryption key, and encrypts the encryption key by using a public key sent by the server to obtain an encrypted The authentication identifier and the encrypted encryption key add the encrypted authentication identifier and the encrypted encryption key to the image.
进一步地,所述客户端将加密后的所述认证标识添加至所述图像中的具体过程为:所述客户端将加密后的所述认证标识添加至所述图像附属的头文件Header中,具体添加至所述Header中名为 Make的Tag信息中。需要说明的是,所述图像的header区域与数据区域相互独立,因此在将所述认证标识添加至所述图像中后,不影响所述图像数据区域的内容。在将所述加密后的所述认证标识添加至所述图像中后,所述客户端使用所述公钥加密所述加密密钥,将加密后的所述加密密钥添加至所述图像附属的头文件Header中,具体添加至所述Header中名为 MODEL的Tag信息中。当所述服务端得到所述图像后,在所述图像的Header中名为 Make的Tag信息中提取加密后的所述认证标识,在所述图像的Header中名为MODEL的Tag信息中提取加密后的所述加密密钥。当所述服务端得到加密后的所述加密密钥后,所述服务端通过与所述公钥对应的私钥解密加密后的所述加密密钥,得到所述加密密钥,通过解密所得的所述加密密钥解密在所述Make的Tag信息中提取的所述认证标识,得到解密后的所述认证标识。所述服务端拆分所述认证标识,得到所述认证标识中的设备名称、冗余字符串和哈希指纹。Further, the specific process of the client adding the encrypted authentication identifier to the image is: the client adds the encrypted authentication identifier to the header file header attached to the image, Specifically added to the name in the Header Make Tag information. It should be noted that the header area of the image and the data area are independent of each other, and therefore, after the authentication identifier is added to the image, the content of the image data area is not affected. After adding the encrypted authentication identifier to the image, the client encrypts the encryption key using the public key, and adds the encrypted encryption key to the image attachment The header file header is specifically added to the header in the header. The tag information of the MODEL. When the server obtains the image, it is named in the header of the image. The encrypted authentication information is extracted from the tag information of the Make, and the encrypted encryption key is extracted from the Tag information named MODEL in the header of the image. After the server obtains the encrypted encryption key, the server decrypts the encrypted encryption key by using a private key corresponding to the public key to obtain the encryption key, and obtains the encryption key. The encryption key decrypts the authentication identifier extracted in the tag information of the Make, and obtains the decrypted authentication identifier. The server splits the authentication identifier to obtain a device name, a redundant string, and a hash fingerprint in the authentication identifier.
本实施例通过加密密钥对认证标识进行加密,并对加密所述认证标识的加密进行加密,防止所述图像被非法分子篡改,保证了所述图像在传输过程中的安全性。In this embodiment, the authentication identifier is encrypted by the encryption key, and the encryption for encrypting the authentication identifier is encrypted to prevent the image from being tampered with by illegal molecules, thereby ensuring the security of the image during transmission.
需要说明的是,在硬件实现上,以上计算模块10、拼接模块20以及发送模块30等可以以硬件形式内嵌于或独立于验证图像真伪的装置中,也可以以软件形式存储于验证图像真伪的装置的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。It should be noted that, in hardware implementation, the above computing module 10, the splicing module 20, the sending module 30, and the like may be embedded in or independent of the device for verifying the authenticity of the image in hardware, or may be stored in the verification image in software. The authenticity of the device's memory, so that the processor calls to perform the corresponding operations of the above modules. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
参照图5,图5是本发明实施例方案涉及的硬件运行环境的设备结构示意图。Referring to FIG. 5, FIG. 5 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present invention.
本发明实施例验证图像真伪的设备可以是PC,也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、便携计算机等终端设备。The device for verifying the authenticity of the image in the embodiment of the present invention may be a PC, or may be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving). Picture Experts Group Audio Layer III, motion picture expert compresses standard audio layer 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 3) terminal devices such as players and portable computers.
如图5所示,该验证图像真伪的设备可以包括:处理器1001,例如CPU,网络接口1004,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 5, the device for verifying the authenticity of the image may include a processor 1001, such as a CPU, a network interface 1004, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection communication between these components. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage. The memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
可选地,该验证图像真伪的设备还可以包括用户接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口还可以包括标准的有线接口、无线接口。在本实施例中,可通过摄像头获取待检测图片。Optionally, the device for verifying the authenticity of the image may further include a user interface, a camera, and an RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more. The user interface may include a display, an input unit such as a keyboard, and the optional user interface may also include a standard wired interface, a wireless interface. In this embodiment, the picture to be detected can be acquired by the camera.
本领域技术人员可以理解,图5中示出的验证图像真伪的设备结构并不构成对验证图像真伪的设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the device structure for verifying the authenticity of the image shown in FIG. 5 does not constitute a limitation on the device for verifying the authenticity of the image, and may include more or less components than those illustrated, or may combine some Parts, or different parts.
如图5所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块以及验证图像真伪程序。其中,操作系统是管理和控制验证图像真伪的设备硬件和软件资源的程序,支持验证图像真伪程序以及其它软件和/或程序的运行。网络通信模块用于实现存储器1005与验证图像真伪的设备中其它硬件和软件之间的通信。As shown in FIG. 5, an operating system, a network communication module, and a verification image authenticity program may be included in the memory 1005 as a computer storage medium. Among them, the operating system is a program that manages and controls the device hardware and software resources for verifying the authenticity of the image, and supports the verification of the image authenticity program and the operation of other software and/or programs. The network communication module is used to implement communication between the memory 1005 and other hardware and software in the device that verifies the authenticity of the image.
在图5所示的验证图像真伪的设备中,网络接口1004主要用于连接服务端,与所述服务端进行数据通信;处理器1001用于执行存储器1005中存储的验证图像真伪程序,实现以下步骤:In the device for verifying the authenticity of the image shown in FIG. 5, the network interface 1004 is mainly used to connect to the server and perform data communication with the server; the processor 1001 is configured to execute the verification image authenticity program stored in the memory 1005. Implement the following steps:
当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the image is acquired, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
进一步地,所述标识信息包括获取所述图像的设备名称和冗余字符串,所述以供所述服务端根据所述图像中的认证标识验证所述图像的真伪的步骤包括:Further, the identifier information includes a device name and a redundant character string for acquiring the image, and the step for the server to verify the authenticity of the image according to the authentication identifier in the image includes:
将所述图像发送给所述服务端,由所述服务端接收所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。Sending the image to the server, receiving the image by the server, acquiring an authentication identifier of the image, determining whether the device name in the authentication identifier is consistent with a pre-stored device name; If the name of the pre-stored device is inconsistent, the image is determined to be a forged image; if the device name is consistent with the pre-stored device name, the hash fingerprint of the image is calculated; if the calculated hash fingerprint and the image are Determining that the hash fingerprint in the authentication identifier is inconsistent, determining that the image is a forged image; and if the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determining a redundant character in the authentication identifier Whether the string is consistent with the pre-stored redundant string; if the redundant string is inconsistent with the pre-stored redundant string, determining that the image is a forged image; if the redundant string and the pre-stored redundancy If the strings are consistent, then the image is determined to be a real image.
进一步地,所述当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹的步骤包括:Further, when the client obtains an image, calculating a hash value of the image pixel, and obtaining a hash fingerprint of the image includes:
当获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像;When the image is acquired, the image is preprocessed to obtain the preprocessed image;
计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比;Calculating a mean value of the image pixels after preprocessing, and comparing pixel values of respective pixels of the preprocessed image with the average value;
若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1;If the pixel value of the pixel is greater than the average, the pixel value of the pixel is set to 1;
若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0;If the pixel value of the pixel is less than or equal to the average, the pixel value of the pixel is set to 0;
根据像素值为1和0的像素点生成所述图像的哈希指纹。A hash fingerprint of the image is generated from pixel points having pixel values of 1 and 0.
进一步地,所述当所述客户端获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像的步骤包括:Further, when the client obtains the image, preprocessing the image to obtain the preprocessed image includes:
当获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;When the image is acquired, the image is subjected to grayscale processing to obtain the grayscale image;
将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;Shrinking the grayscale image to a preset ratio to obtain the reduced image;
对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。The reduced cosine transform is performed on the reduced image to obtain the preprocessed image.
进一步地,所述获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中的步骤包括:Further, the step of acquiring the identification information that identifies the image, and the step of splicing the identification information and the hash fingerprint into an authentication identifier is added to the image, where
获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
通过对称加密算法生成加密密钥;Generating an encryption key by a symmetric encryption algorithm;
通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;Encrypting the authentication identifier by using the encryption key, and encrypting the encryption key by using a public key sent by the server;
将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。The encrypted authentication identifier and the encrypted encryption key are added to the image.
本发明验证图像真伪的设备具体实施方式与上述验证图像真伪的方法和装置各实施例基本相同,在此不再赘述。The embodiment of the device for verifying the authenticity of the image is basically the same as the embodiment of the method and device for verifying the authenticity of the image, and details are not described herein again.
进一步地,本发明提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:Further, the present invention provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following step:
当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the image is acquired, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
进一步地,所述标识信息包括获取所述图像的设备名称和冗余字符串,所述以供所述服务端根据所述图像中的认证标识验证所述图像的真伪的步骤包括:Further, the identifier information includes a device name and a redundant character string for acquiring the image, and the step for the server to verify the authenticity of the image according to the authentication identifier in the image includes:
将所述图像发送给所述服务端,由所述服务端接收所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。Sending the image to the server, receiving the image by the server, acquiring an authentication identifier of the image, determining whether the device name in the authentication identifier is consistent with a pre-stored device name; If the name of the pre-stored device is inconsistent, the image is determined to be a forged image; if the device name is consistent with the pre-stored device name, the hash fingerprint of the image is calculated; if the calculated hash fingerprint and the image are Determining that the hash fingerprint in the authentication identifier is inconsistent, determining that the image is a forged image; and if the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determining a redundant character in the authentication identifier Whether the string is consistent with the pre-stored redundant string; if the redundant string is inconsistent with the pre-stored redundant string, determining that the image is a forged image; if the redundant string and the pre-stored redundancy If the strings are consistent, then the image is determined to be a real image.
进一步地,所述当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹的步骤包括:Further, when the client obtains an image, calculating a hash value of the image pixel, and obtaining a hash fingerprint of the image includes:
当获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像;When the image is acquired, the image is preprocessed to obtain the preprocessed image;
计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比;Calculating a mean value of the image pixels after preprocessing, and comparing pixel values of respective pixels of the preprocessed image with the average value;
若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1;If the pixel value of the pixel is greater than the average, the pixel value of the pixel is set to 1;
若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0;If the pixel value of the pixel is less than or equal to the average, the pixel value of the pixel is set to 0;
根据像素值为1和0的像素点生成所述图像的哈希指纹。A hash fingerprint of the image is generated from pixel points having pixel values of 1 and 0.
进一步地,所述当所述客户端获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像的步骤包括:Further, when the client obtains the image, preprocessing the image to obtain the preprocessed image includes:
当获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;When the image is acquired, the image is subjected to grayscale processing to obtain the grayscale image;
将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;Shrinking the grayscale image to a preset ratio to obtain the reduced image;
对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。The reduced cosine transform is performed on the reduced image to obtain the preprocessed image.
进一步地,所述获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中的步骤包括:Further, the step of acquiring the identification information that identifies the image, and the step of splicing the identification information and the hash fingerprint into an authentication identifier is added to the image, where
获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
通过对称加密算法生成加密密钥;Generating an encryption key by a symmetric encryption algorithm;
通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;Encrypting the authentication identifier by using the encryption key, and encrypting the encryption key by using a public key sent by the server;
将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。The encrypted authentication identifier and the encrypted encryption key are added to the image.
本发明计算机可读存储介质具体实施方式与上述验证图像真伪的方法和装置各实施例基本相同,在此不再赘述。The embodiment of the computer readable storage medium of the present invention is substantially the same as the embodiment of the method and apparatus for verifying the authenticity of the image, and details are not described herein again.
进一步地,本发明还提供一种用于验证图像真伪的服务端,所述服务端与一客户端连接,其中,所述客户端在获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;将含有认证标识的所述图像发送给服端;Further, the present invention further provides a server for verifying the authenticity of an image, the server is connected to a client, wherein the client calculates a hash value of the image pixel when acquiring an image. Obtaining a hash fingerprint of the image; acquiring identification information identifying the image, and splicing the identification information and the hash fingerprint into an authentication identifier, adding the image to the image; and sending the image containing the authentication identifier Give the server
所述服务端用于:The server is used to:
接收所述客户端发送的所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;Receiving the image sent by the client, obtaining an authentication identifier of the image, and determining whether the device name in the authentication identifier is consistent with a pre-stored device name;
若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;If the device name is inconsistent with the pre-stored device name, determining that the image is a forged image;
若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;If the device name is consistent with the pre-stored device name, calculating a hash fingerprint of the image;
若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;If the calculated hash fingerprint does not match the hash fingerprint in the authentication identifier, determining that the image is a forged image;
若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;If the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determine whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string;
若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;If the redundant character string is inconsistent with the pre-stored redundant character string, determining that the image is a forged image;
若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。And if the redundant character string is consistent with the pre-stored redundant character string, determining that the image is a real image.
本发明用于验证图像真伪的服务端具体实施方式与上述验证图像真伪的方法和装置各实施例基本相同,在此不再赘述。The embodiment of the present invention for verifying the authenticity of the image is basically the same as the method and the device for verifying the authenticity of the image, and details are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其它变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or system that comprises a plurality of elements includes not only those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, item, or system. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in a process, method, article, or system that includes the element, without further limitation.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments. Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括 在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. Same as the same Within the scope of the patent protection of the present invention.

Claims (21)

  1. 一种验证图像真伪的方法,其特征在于,所述验证图像真伪的方法包括: A method for verifying the authenticity of an image, wherein the method for verifying the authenticity of an image comprises:
    当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the client obtains an image, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
    获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
    将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
  2. 如权利要求1所述的验证图像真伪的方法,其特征在于,所述标识信息包括获取所述图像的设备名称和冗余字符串,所述以供所述服务端根据所述图像中的认证标识验证所述图像的真伪的步骤包括:The method for verifying the authenticity of an image according to claim 1, wherein the identification information comprises a device name and a redundant character string for acquiring the image, wherein the server is configured to be based on the image. The steps of verifying the authenticity of the image by the authentication identifier include:
    由所述服务端接收所述客户端发送的所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;Receiving, by the server, the image sent by the client, acquiring an authentication identifier of the image, and determining whether the device name in the authentication identifier is consistent with a pre-stored device name;
    若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;If the device name is inconsistent with the pre-stored device name, determining that the image is a forged image;
    若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;If the device name is consistent with the pre-stored device name, calculating a hash fingerprint of the image;
    若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;If the calculated hash fingerprint does not match the hash fingerprint in the authentication identifier, determining that the image is a forged image;
    若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;If the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determine whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string;
    若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;If the redundant character string is inconsistent with the pre-stored redundant character string, determining that the image is a forged image;
    若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。And if the redundant character string is consistent with the pre-stored redundant character string, determining that the image is a real image.
  3. 如权利要求1所述的验证图像真伪的方法,其特征在于,所述当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹的步骤包括:The method for verifying the authenticity of an image according to claim 1, wherein the step of calculating a hash value of the image pixel when the client acquires the image, and obtaining the hash fingerprint of the image comprises:
    当所述客户端获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像;When the client obtains the image, pre-processing the image to obtain the pre-processed image;
    计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比;Calculating a mean value of the image pixels after preprocessing, and comparing pixel values of respective pixels of the preprocessed image with the average value;
    若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1;If the pixel value of the pixel is greater than the average, the pixel value of the pixel is set to 1;
    若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0;If the pixel value of the pixel is less than or equal to the average, the pixel value of the pixel is set to 0;
    根据像素值为1和0的像素点生成所述图像的哈希指纹。A hash fingerprint of the image is generated from pixel points having pixel values of 1 and 0.
  4. 如权利要求3所述的验证图像真伪的方法,其特征在于,所述当所述客户端获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像的步骤包括:The method for verifying the authenticity of an image according to claim 3, wherein the step of pre-processing the image to obtain the pre-processed image when the client acquires the image include:
    当所述客户端获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;When the client acquires the image, performing grayscale processing on the image to obtain the grayscale image;
    将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;Shrinking the grayscale image to a preset ratio to obtain the reduced image;
    对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。The reduced cosine transform is performed on the reduced image to obtain the preprocessed image.
  5. 如权利要求1所述的验证图像真伪的方法,其特征在于,所述获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中的步骤包括:The method for verifying the authenticity of an image according to claim 1, wherein the acquiring identification information identifying the image, and splicing the identification information and the hash fingerprint into an authentication identifier is added to the image The steps include:
    获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
    通过对称加密算法生成加密密钥;Generating an encryption key by a symmetric encryption algorithm;
    通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;Encrypting the authentication identifier by using the encryption key, and encrypting the encryption key by using a public key sent by the server;
    将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。The encrypted authentication identifier and the encrypted encryption key are added to the image.
  6. 一种验证图像真伪的装置,其特征在于,所述验证图像真伪的装置包括:The device for verifying the authenticity of an image, wherein the device for verifying the authenticity of the image comprises:
    计算模块,用于当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;a calculation module, configured to calculate a hash value of the image pixel when the image is acquired, to obtain a hash fingerprint of the image;
    拼接模块,用于获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;a splicing module, configured to acquire identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
    发送模块,用于将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。And a sending module, configured to send the image that includes the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
  7. 如权利要求6所述的验证图像真伪的装置,其特征在于,所述标识信息包括获取所述图像的设备名称和冗余字符串;The device for verifying the authenticity of an image according to claim 6, wherein the identification information comprises a device name and a redundant character string for acquiring the image;
    所述发送模块还用于将所述图像发送给所述服务端,由所述服务端接收所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。The sending module is further configured to send the image to the server, and the server receives the image, obtains an authentication identifier of the image, and determines whether the device name in the authentication identifier is a pre-stored device name. If the device name is inconsistent with the pre-stored device name, determining that the image is a forged image; if the device name is consistent with the pre-stored device name, calculating a hash fingerprint of the image; If the obtained hash fingerprint is inconsistent with the hash fingerprint in the authentication identifier, determining that the image is a forged image; if the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determining the Whether the redundant character string in the authentication identifier is consistent with the pre-stored redundant character string; if the redundant character string is inconsistent with the pre-stored redundant character string, determining that the image is a forged image; if the redundant character The string is consistent with the pre-stored redundant string, and the image is determined to be a real image.
  8. 如权利要求6所述的验证图像真伪的装置,其特征在于,所述计算模块包括:The device for verifying the authenticity of an image according to claim 6, wherein the calculation module comprises:
    预处理单元,用于当获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像;a pre-processing unit, configured to pre-process the image when the image is acquired, to obtain the pre-processed image;
    计算单元,用于计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比;a calculating unit, configured to calculate a mean value of the pre-processed image pixels, and compare pixel values of respective pixels of the pre-processed image with the average value;
    设置单元,用于若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1;若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0;a setting unit, configured to: if a pixel value of the pixel point is greater than the average value, set a pixel value of the pixel point to 1; if a pixel value of the pixel point is less than or equal to the average value, a pixel of the pixel point The value is set to 0;
    第一生成单元,用于根据像素值为1和0的像素点生成所述图像的哈希指纹。a first generating unit, configured to generate a hash fingerprint of the image according to pixel points with pixel values of 1 and 0.
  9. 如权利要求8所述的验证图像真伪的装置,其特征在于,所述预处理单元还用于当获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。The device for verifying the authenticity of an image according to claim 8, wherein the pre-processing unit is further configured to perform grayscale processing on the image when the image is acquired, to obtain a grayscaled image. The image is reduced to the preset ratio by the grayscale image to obtain the reduced image, and the reduced image is subjected to discrete cosine transform to obtain the preprocessed image.
  10. 如权利要求6所述的验证图像真伪的装置,其特征在于,所述拼接模块包括:The device for verifying the authenticity of an image according to claim 6, wherein the splicing module comprises:
    拼接单元,用于获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;a splicing unit, configured to obtain identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
    第二生成单元,用于通过对称加密算法生成加密密钥;a second generating unit, configured to generate an encryption key by using a symmetric encryption algorithm;
    加密单元,用于通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;An encryption unit, configured to encrypt the authentication identifier by using the encryption key, and encrypt the encryption key by using a public key sent by the server;
    添加单元,用于将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。And an adding unit, configured to add the encrypted authentication identifier and the encrypted encryption key to the image.
  11. 一种验证图像真伪的设备,其特征在于,所述验证图像真伪的设备包括处理器、网络接口、存储器及通信总线;An apparatus for verifying the authenticity of an image, wherein the device for verifying the authenticity of the image comprises a processor, a network interface, a memory, and a communication bus;
    所述通信总线用于实现处理器、网络接口及存储器之间的连接通信;The communication bus is configured to implement connection communication between a processor, a network interface, and a memory;
    所述网络接口用于连接服务端,与所述服务端进行数据通信;The network interface is configured to connect to a server, and perform data communication with the server;
    所述处理器用于执行存储器中存储的验证图像真伪程序,以实现以下步骤:The processor is configured to execute a verification image authenticity program stored in the memory to implement the following steps:
    当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the image is acquired, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
    获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
    将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
  12. 如权利要求11所述的验证图像真伪的设备,其特征在于,所述标识信息包括获取所述图像的设备名称和冗余字符串,所述以供所述服务端根据所述图像中的认证标识验证所述图像的真伪的步骤包括:The device for verifying the authenticity of an image according to claim 11, wherein the identification information comprises a device name and a redundant character string for acquiring the image, wherein the server is configured to be based on the image The steps of verifying the authenticity of the image by the authentication identifier include:
    将所述图像发送给所述服务端,由所述服务端接收所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。Sending the image to the server, receiving the image by the server, acquiring an authentication identifier of the image, determining whether the device name in the authentication identifier is consistent with a pre-stored device name; If the name of the pre-stored device is inconsistent, the image is determined to be a forged image; if the device name is consistent with the pre-stored device name, the hash fingerprint of the image is calculated; if the calculated hash fingerprint and the image are Determining that the hash fingerprint in the authentication identifier is inconsistent, determining that the image is a forged image; and if the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determining a redundant character in the authentication identifier Whether the string is consistent with the pre-stored redundant string; if the redundant string is inconsistent with the pre-stored redundant string, determining that the image is a forged image; if the redundant string and the pre-stored redundancy If the strings are consistent, then the image is determined to be a real image.
  13. 如权利要求11所述的验证图像真伪的设备,其特征在于,所述当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹的步骤包括:The device for verifying the authenticity of an image according to claim 11, wherein when the client acquires an image, calculating a hash value of the image pixel, and obtaining a hash fingerprint of the image includes:
    当获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像;When the image is acquired, the image is preprocessed to obtain the preprocessed image;
    计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比;Calculating a mean value of the image pixels after preprocessing, and comparing pixel values of respective pixels of the preprocessed image with the average value;
    若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1;If the pixel value of the pixel is greater than the average, the pixel value of the pixel is set to 1;
    若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0;If the pixel value of the pixel is less than or equal to the average, the pixel value of the pixel is set to 0;
    根据像素值为1和0的像素点生成所述图像的哈希指纹。A hash fingerprint of the image is generated from pixel points having pixel values of 1 and 0.
  14. 如权利要求13所述的验证图像真伪的设备,其特征在于,所述当所述客户端获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像的步骤包括:The device for verifying the authenticity of an image according to claim 13, wherein the step of pre-processing the image to obtain the pre-processed image when the client acquires the image include:
    当获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;When the image is acquired, the image is subjected to grayscale processing to obtain the grayscale image;
    将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;Shrinking the grayscale image to a preset ratio to obtain the reduced image;
    对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。The reduced cosine transform is performed on the reduced image to obtain the preprocessed image.
  15. 如权利要求11所述的验证图像真伪的设备,其特征在于,所述获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中的步骤包括:The device for verifying the authenticity of an image according to claim 11, wherein the acquiring identification information identifying the image, and splicing the identification information and the hash fingerprint into an authentication identifier is added to the image The steps include:
    获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
    通过对称加密算法生成加密密钥;Generating an encryption key by a symmetric encryption algorithm;
    通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;Encrypting the authentication identifier by using the encryption key, and encrypting the encryption key by using a public key sent by the server;
    将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。The encrypted authentication identifier and the encrypted encryption key are added to the image.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现以下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
    当获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;When the image is acquired, calculating a hash value of the image pixel to obtain a hash fingerprint of the image;
    获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier to be added to the image;
    将含有认证标识的所述图像发送给服务端,以供所述服务端根据所述图像中的认证标识验证所述图像的真伪。Sending the image containing the authentication identifier to the server, so that the server verifies the authenticity of the image according to the authentication identifier in the image.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述标识信息包括获取所述图像的设备名称和冗余字符串,所述以供所述服务端根据所述图像中的认证标识验证所述图像的真伪的步骤包括:The computer readable storage medium according to claim 16, wherein said identification information comprises a device name and a redundant character string for acquiring said image, said server for said server to authenticate according to said image The steps of identifying the authenticity of the image include:
    将所述图像发送给所述服务端,由所述服务端接收所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。Sending the image to the server, receiving the image by the server, acquiring an authentication identifier of the image, determining whether the device name in the authentication identifier is consistent with a pre-stored device name; If the name of the pre-stored device is inconsistent, the image is determined to be a forged image; if the device name is consistent with the pre-stored device name, the hash fingerprint of the image is calculated; if the calculated hash fingerprint and the image are Determining that the hash fingerprint in the authentication identifier is inconsistent, determining that the image is a forged image; and if the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determining a redundant character in the authentication identifier Whether the string is consistent with the pre-stored redundant string; if the redundant string is inconsistent with the pre-stored redundant string, determining that the image is a forged image; if the redundant string and the pre-stored redundancy If the strings are consistent, then the image is determined to be a real image.
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述当客户端获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹的步骤包括:The computer readable storage medium according to claim 16, wherein when the client obtains an image, calculating a hash value of the image pixel, and obtaining a hash fingerprint of the image comprises:
    当获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像;When the image is acquired, the image is preprocessed to obtain the preprocessed image;
    计算预处理后的所述图像像素的均值,将预处理后的所述图像各个像素点的像素值与所述均值进行对比;Calculating a mean value of the image pixels after preprocessing, and comparing pixel values of respective pixels of the preprocessed image with the average value;
    若像素点的像素值大于所述均值,则将所述像素点的像素值设置为1;If the pixel value of the pixel is greater than the average, the pixel value of the pixel is set to 1;
    若像素点的像素值小于或者等于所述均值,则将所述像素点的像素值设置为0;If the pixel value of the pixel is less than or equal to the average, the pixel value of the pixel is set to 0;
    根据像素值为1和0的像素点生成所述图像的哈希指纹。A hash fingerprint of the image is generated from pixel points having pixel values of 1 and 0.
  19. 如权利要求18所述的计算机可读存储介质,其特征在于,所述当所述客户端获取到所述图像时,对所述图像进行预处理,得到预处理后的所述图像的步骤包括:The computer readable storage medium according to claim 18, wherein said step of preprocessing said image when said client obtains said image comprises obtaining said preprocessed image comprising: :
    当获取到所述图像时,对所述图像进行灰度化处理,得到灰度化后的所述图像;When the image is acquired, the image is subjected to grayscale processing to obtain the grayscale image;
    将灰度化后的所述图像缩小至预设比例,得到缩小后的所述图像;Shrinking the grayscale image to a preset ratio to obtain the reduced image;
    对缩小后的所述图像进行离散余弦变换,得到预处理后的所述图像。The reduced cosine transform is performed on the reduced image to obtain the preprocessed image.
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,所述获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中的步骤包括:The computer readable storage medium according to claim 16, wherein the obtaining identification information identifying the image, splicing the identification information and the hash fingerprint into an authentication identifier is added to the image The steps include:
    获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识;Obtaining identification information that identifies the image, and splicing the identification information and the hash fingerprint into an authentication identifier;
    通过对称加密算法生成加密密钥;Generating an encryption key by a symmetric encryption algorithm;
    通过所述加密密钥加密所述认证标识,并通过所述服务端发送的公钥加密所述加密密钥;Encrypting the authentication identifier by using the encryption key, and encrypting the encryption key by using a public key sent by the server;
    将加密后的所述认证标识和加密后的所述加密密钥添加至所述图像中。The encrypted authentication identifier and the encrypted encryption key are added to the image.
  21. 一种用于验证图像真伪的服务端,其特征在于,所述服务端与一客户端连接,其中,所述客户端在获取到图像时,计算所述图像像素的哈希值,得到所述图像的哈希指纹;获取标识所述图像的标识信息,将所述标识信息和所述哈希指纹拼接成认证标识添加至所述图像中;将含有认证标识的所述图像发送给服端;A server for verifying the authenticity of an image, wherein the server is connected to a client, wherein the client calculates a hash value of the image pixel when acquiring an image, and obtains a a hash fingerprint of the image; obtaining identification information identifying the image, splicing the identification information and the hash fingerprint into an authentication identifier, and adding the image containing the authentication identifier to the server ;
    所述服务端用于:The server is used to:
    接收所述客户端发送的所述图像,获取所述图像的认证标识,判断所述认证标识中的设备名称是否与预存设备名称一致;Receiving the image sent by the client, obtaining an authentication identifier of the image, and determining whether the device name in the authentication identifier is consistent with a pre-stored device name;
    若所述设备名称与所述预存设备名称不一致,则确定所述图像为伪造的图像;If the device name is inconsistent with the pre-stored device name, determining that the image is a forged image;
    若所述设备名称与所述预存设备名称一致,则计算所述图像的哈希指纹;If the device name is consistent with the pre-stored device name, calculating a hash fingerprint of the image;
    若计算所得的哈希指纹与所述认证标识中的哈希指纹不一致,则确定所述图像为伪造的图像;If the calculated hash fingerprint does not match the hash fingerprint in the authentication identifier, determining that the image is a forged image;
    若计算所得的哈希指纹与所述认证标识中的哈希指纹一致,则判断所述认证标识中的冗余字符串是否与预存冗余字符串一致;If the calculated hash fingerprint is consistent with the hash fingerprint in the authentication identifier, determine whether the redundant string in the authentication identifier is consistent with the pre-stored redundant string;
    若所述冗余字符串与所述预存冗余字符串不一致,则确定所述图像为伪造的图像;If the redundant character string is inconsistent with the pre-stored redundant character string, determining that the image is a forged image;
    若所述冗余字符串与所述预存冗余字符串一致,则确定所述图像为真实的图像。And if the redundant character string is consistent with the pre-stored redundant character string, determining that the image is a real image.
PCT/CN2017/078001 2016-12-28 2017-03-24 Method, apparatus and device for verifying authenticity of image, and storage medium and service end WO2018120459A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611240329.0 2016-12-28
CN201611240329.0A CN106709963B (en) 2016-12-28 2016-12-28 The method and apparatus of the authentication image true and false

Publications (1)

Publication Number Publication Date
WO2018120459A1 true WO2018120459A1 (en) 2018-07-05

Family

ID=58903020

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/078001 WO2018120459A1 (en) 2016-12-28 2017-03-24 Method, apparatus and device for verifying authenticity of image, and storage medium and service end

Country Status (2)

Country Link
CN (1) CN106709963B (en)
WO (1) WO2018120459A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110706145A (en) * 2019-09-25 2020-01-17 中国人民解放军61646部队 Reversible remote sensing image information hiding method and device
US20210319136A1 (en) * 2020-04-02 2021-10-14 UST Global (Singapore) Pte. Ltd. Verifying authenticity of content of electronic documents
CN113742611A (en) * 2021-01-06 2021-12-03 北京沃东天骏信息技术有限公司 Data request processing method and device
CN116012937A (en) * 2022-12-14 2023-04-25 杭州电子科技大学信息工程学院 Traffic police gesture recognition method

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612877B (en) * 2017-07-20 2020-06-30 阿里巴巴集团控股有限公司 Method, device and system for verifying legality of multimedia file
CN107944339B (en) 2017-10-20 2020-01-21 阿里巴巴集团控股有限公司 Certificate verification and identity verification method and device
CN108153809A (en) * 2017-11-23 2018-06-12 努比亚技术有限公司 Picture identification method, recognition methods, terminal and computer readable storage medium
CN110032970A (en) * 2019-04-11 2019-07-19 深圳市华付信息技术有限公司 Biopsy method, device, computer equipment and the storage medium of high-accuracy
CN111881425A (en) * 2020-07-28 2020-11-03 平安科技(深圳)有限公司 Picture copyright authentication method and device and storage medium
CN116070286B (en) * 2022-12-02 2023-09-29 国网数字科技控股有限公司 Data forgery detection method, device and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100496094C (en) * 2005-12-31 2009-06-03 北京华旗数码影像技术研究院有限责任公司 Digital camera and its system for watermark information acquisition via the external device
CN104935783A (en) * 2015-06-15 2015-09-23 北京邮电大学 Safe and active image tampering detection method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103353990A (en) * 2013-06-19 2013-10-16 海南大学 Intelligent-texture anti-counterfeiting method based on perceptual hashing
CN105117920B (en) * 2015-08-25 2017-03-08 福建博思软件股份有限公司 A kind of method for anti-counterfeit of Pictures Electronics voucher and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100496094C (en) * 2005-12-31 2009-06-03 北京华旗数码影像技术研究院有限责任公司 Digital camera and its system for watermark information acquisition via the external device
CN104935783A (en) * 2015-06-15 2015-09-23 北京邮电大学 Safe and active image tampering detection method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110706145A (en) * 2019-09-25 2020-01-17 中国人民解放军61646部队 Reversible remote sensing image information hiding method and device
CN110706145B (en) * 2019-09-25 2023-06-02 中国人民解放军61646部队 Reversible remote sensing image information hiding processing method and device
US20210319136A1 (en) * 2020-04-02 2021-10-14 UST Global (Singapore) Pte. Ltd. Verifying authenticity of content of electronic documents
CN113742611A (en) * 2021-01-06 2021-12-03 北京沃东天骏信息技术有限公司 Data request processing method and device
CN116012937A (en) * 2022-12-14 2023-04-25 杭州电子科技大学信息工程学院 Traffic police gesture recognition method

Also Published As

Publication number Publication date
CN106709963B (en) 2018-01-02
CN106709963A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
WO2018120459A1 (en) Method, apparatus and device for verifying authenticity of image, and storage medium and service end
WO2018086515A1 (en) Verification construction method and device capable of offline verification of safety information tag
WO2019231252A1 (en) Electronic device for authenticating user and operating method thereof
WO2019041406A1 (en) Indecent picture recognition method, terminal and device, and computer-readable storage medium
WO2019051899A1 (en) Terminal control method and device, and storage medium
WO2019019378A1 (en) Service processing method and apparatus, adapter and computer-readable storage medium
WO2018135919A1 (en) Apparatus and method for providing and managing security information in communication system
WO2019051908A1 (en) Terminal control method and device, and computer readable storage medium
WO2017035695A1 (en) Information transmission method and mobile device
WO2015061941A1 (en) Key configuration method and apparatus
WO2015061992A1 (en) Key configuration method, system and apparatus
WO2019056752A1 (en) Household appliance network configuration method, device and system, and computer readable storage medium
WO2019001110A1 (en) Authority authentication method, system, and device, and computer-readable storage medium
WO2014007571A1 (en) Method and apparatus for processing digital service signals
WO2017119769A1 (en) Apparatus and method for detecting counterfeit advertiser in wireless communication system
WO2015108283A1 (en) Application error detection method for cloud streaming service, and apparatus and system therefor
WO2019019376A1 (en) Service process management method, apparatus, and device, and computer readable storage medium
WO2018166236A1 (en) Claim settlement bill recognition method, apparatus and device, and computer-readable storage medium
WO2019051895A1 (en) Terminal control method and device, and storage medium
EP3520363A1 (en) Apparatus and method for providing and managing security information in communication system
WO2016126052A2 (en) Authentication method and system
WO2018058919A1 (en) Identification information generating method, apparatus, device, and computer readable storage medium
WO2019051890A1 (en) Terminal control method and device, and computer-readable storage medium
WO2019100531A1 (en) Digital signature generation method and device thereof, verification method and device thereof, and storage medium
WO2018233367A1 (en) Case registration method and apparatus, terminal, and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17887455

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.09.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17887455

Country of ref document: EP

Kind code of ref document: A1