Image anti-counterfeiting method and device and readable medium

Through blockchain and zero-knowledge proof technology, the legality and rationality of original images and editing operations are verified, and the problem that existing technology cannot resist malicious editing and ensure the credibility of editing is solved, and the anti-counterfeiting effect of image anti-counterfeiting technology is achieved throughout the life cycle.

CN120074824APending Publication Date: 2025-05-30ZTE CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311614639.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Existing image anti-counterfeiting technology cannot effectively resist malicious editing, and cannot ensure the credibility of editing throughout the entire life cycle of the editing image.

Method used

By combining blockchain technology and zero-knowledge proof technology, basic information of the original image is received and uploaded to the blockchain, and the first zero-knowledge proof is generated to verify the legitimacy of the image; at the same time, a composite proof circuit is generated based on the editing operation, and the rationality of the editing operation is verified through the second zero-knowledge proof.

Benefits of technology

Trusted verification of the original image and its editing operations is achieved, ensuring the anti-counterfeiting of the edited image throughout the life cycle, and users do not need to have pre-test knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120074824A_ABST
    Figure CN120074824A_ABST
Patent Text Reader

Abstract

The invention provides an image anti-counterfeiting method, which is applied to an image anti-counterfeiting device, and comprises the following steps: receiving a first image sent by first equipment, obtaining first basic information of the first image, and uploading the first basic information to a block chain; under the condition that a second image is obtained, first basic information is obtained from the block chain, a first zero-knowledge proof is generated according to the first basic information, the third image and an original proof circuit of the image anti-counterfeiting device, and the second image is an image obtained by editing the third image; a composite proof circuit obtained according to the editing operation is obtained, a second zero-knowledge proof is generated according to the second image, the composite proof circuit and the first image, the first zero-knowledge proof is used for verifying the legality of the first image, and the second zero-knowledge proof is used for verifying the rationality of the editing operation; anti-counterfeiting verification can be carried out on the edited image in the whole life cycle, the scheme is easy to implement, and the application range is wide. The invention further provides an image anti-counterfeiting device and a readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and particularly to an image anti-counterfeiting method, apparatus, and readable medium. Background Art

[0002] Currently, relatively mature image anti-counterfeiting technologies already exist, such as watermarking technology, encryption technology, digital signature technology, and so on. The watermarking technology embeds specific information into an image to achieve image authentication and traceability. To a certain extent, the watermark can achieve image anti-counterfeiting. However, for the current increasingly advanced PS (Photoshop) technology, malicious operators can completely remove the watermark or save the watermark for editing other image segments. Therefore, the watermark cannot resist malicious editing. Encryption and digital signature technologies essentially complete image verification through encryption and decryption methods. Therefore, under the condition that the encryption technology is trusted, anti-counterfeiting authentication of images can be achieved during the interaction process.

[0003] However, the above image anti-counterfeiting technologies have limitations. In reality, assume such a scenario: the original image needs to be edited and then displayed. For example, in news reports of bloody scenes such as car accidents and wars, in principle, mosaics must be applied to some images in advance, or for NFTs (non-fungible tokens), the original private image information does not want to be directly exposed, and only the edited image is displayed and it is ensured that the original image cannot be restored. There are many such image anti-counterfeiting scenarios. Their commonality is that they allow the publisher to edit, but it must be ensured that the editing is completed based on the original image and the editing operation is trustworthy, which is called the trustworthiness of the image life cycle.

[0004] Therefore, there is an urgent need for an anti-counterfeiting solution for the entire life cycle of edited images. Summary of the Invention

[0005] The present disclosure provides an image anti-counterfeiting method, apparatus, and readable medium.

[0006] In a first aspect, an embodiment of the present disclosure provides an image anti-counterfeiting method, which is applied to an image anti-counterfeiting apparatus and includes:

[0007] Receiving a first image sent by a first device, obtaining first basic information of the first image, and uploading the first basic information to a blockchain;

[0008] Obtaining a second image, where the second image is an image obtained by performing an editing operation on a third image;

[0009] Obtaining the first basic information from the blockchain, and generating a first zero-knowledge proof according to the first basic information, the third image, and an original proof circuit of the image anti-counterfeiting apparatus, where the first zero-knowledge proof is used to verify the legality of the first image;

[0010] Obtain a composite proof circuit, where the composite proof circuit is obtained according to the editing operation; generate a second zero-knowledge proof according to the second image, the composite proof circuit, and the first image, and the second zero-knowledge proof is used to verify the rationality of the editing operation.

[0011] In another aspect, an embodiment of the present disclosure further provides an image anti-counterfeiting device, including: one or more processors; a memory storing one or more programs thereon; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the image anti-counterfeiting method as described above; at least one I / O interface connected between the processor and the memory and configured to implement information interaction between the processor and the memory.

[0012] In another aspect, an embodiment of the present disclosure further provides a computer-readable medium storing a computer program thereon, where the program, when executed, implements the image anti-counterfeiting method as described above.

[0013] The image anti-counterfeiting method provided by the embodiment of the present disclosure is applied to an image anti-counterfeiting device and includes: receiving a first image sent by a first device, obtaining first basic information of the first image, and uploading the first basic information to a blockchain; when the second image is obtained, obtaining the first basic information from the blockchain, generating a first zero-knowledge proof according to the first basic information, a third image, and an original proof circuit of the image anti-counterfeiting device, where the second image is an image obtained by performing an editing operation on the third image; obtaining a composite proof circuit, where the composite proof circuit is obtained according to the editing operation; generating a second zero-knowledge proof according to the second image, the composite proof circuit, and the first image, where the first zero-knowledge proof is used to verify the legality of the first image, and the second zero-knowledge proof is used to verify the rationality of the editing operation; the embodiment of the present disclosure combines blockchain technology and zero-knowledge proof technology, which can not only verify the basic information of the original image itself, but also verify the rationality of the editing operation of the edited image, realizing anti-counterfeiting verification throughout the entire life cycle of the edited image; the image anti-counterfeiting method can be implemented without requiring any prior knowledge of the user, the solution is easy to implement, and the application range is wide. Description of the Drawings

[0014] Figure 1 Schematic diagram of the image anti-counterfeiting process provided by the embodiment of the present disclosure Figure 1 ;

[0015] Figure 2 Schematic diagram of the process of generating a composite proof circuit during the editing of the second image provided by the embodiment of the present disclosure;

[0016] Figure 3 Schematic diagram of the principle of generating a composite proof circuit during the editing of the second image provided by the embodiment of the present disclosure;

[0017] Figure 4 Schematic diagram of the principle for generating a composite proof circuit in the initialization stage provided by an embodiment of the present disclosure;

[0018] Figure 5 Schematic diagram of the principle for generating a composite proof circuit provided by an embodiment of the present disclosure;

[0019] Figure 6 Schematic diagram of the process for generating a first zero - knowledge proof provided by an embodiment of the present disclosure;

[0020] Figure 7 Schematic diagram of the principle for generating a first zero - knowledge proof provided by an embodiment of the present disclosure;

[0021] Figure 8 Schematic diagram of the process for generating a second zero - knowledge proof provided by an embodiment of the present disclosure;

[0022] Figure 9 Schematic diagram of the principle for generating a second zero - knowledge proof provided by an embodiment of the present disclosure;

[0023] Figure 10 Schematic diagram of the image anti - counterfeiting process provided by an embodiment of the present disclosure Figure 2 ;

[0024] Figure 11 Schematic diagram of the principle for performing image anti - counterfeiting verification using a zero - knowledge engine provided by an embodiment of the present disclosure;

[0025] Figure 12 Schematic diagram of the principle for performing image anti - counterfeiting verification using a blockchain provided by an embodiment of the present disclosure;

[0026] Figure 13 Schematic diagram of the overall process for image anti - counterfeiting verification provided by a specific example of the present disclosure;

[0027] Figure 14 Schematic diagram of the structure of the image anti - counterfeiting device provided by an embodiment of the present disclosure Figure 1 ;

[0028] Figure 15 Schematic diagram of the structure of the image anti - counterfeiting device provided by an embodiment of the present disclosure Figure 2 。 Detailed implementation manners

[0029] Hereinafter, example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art.

[0030] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0031] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms unless the context clearly dictates otherwise. It will also be understood that when the terms "comprises" and / or "comprising" are used in this specification, they specify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0032] The embodiments described herein may be described with reference to plan views and / or cross-sectional views by means of idealized schematic diagrams of the present disclosure. Accordingly, the example illustrations may be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to the embodiments shown in the figures, but include modifications of configurations formed based on manufacturing processes. Accordingly, the regions illustrated in the figures have schematic attributes, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.

[0033] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0034] Image anti-counterfeiting technology refers to preventing the forgery and tampering of original images through technical means such as image processing, computer vision, and cryptography. Blockchain technology is a decentralized, tamper-proof, secure and reliable database technology with broad application prospects, including but not limited to digital currency, smart contracts, supply chain management, digital identity authentication, etc. Privacy computing technology is a new computing model that can protect user privacy and enable data sharing. It mainly uses technical means such as data encryption, data desensitization, differential privacy, and zero-knowledge proof to keep the data encrypted during the computing process, ensuring that the data will not be directly exposed, so as to achieve the purpose of protecting user privacy. Applying blockchain and privacy computing technologies to image anti-counterfeiting is an important direction in the research of image anti-counterfeiting technology.

[0035] Embodiments of the present disclosure provide an image anti-counterfeiting method based on the above inventive concept. The method is applied to an image anti-counterfeiting device, as Figure 1 shown, and the image anti-counterfeiting method includes the following steps:

[0036] Step S11: Receive the first image sent by the first device, obtain the first basic information of the first image, and upload the first basic information to the blockchain.

[0037] The first device can be the terminal device of the user who uploads the image. In this step, the first device captures the first image (i.e., the original image) and uploads the first image to the image anti-counterfeiting device. After the image anti-counterfeiting device obtains the first basic information of the first image, it uploads the first basic information to the blockchain. The first basic information can only be uploaded to the blockchain through the image anti-counterfeiting device, which can ensure the credibility of the basic information of the original image stored on the blockchain. It should be noted that, in order to ensure privacy security, the image anti-counterfeiting device does not save the first image but discards it.

[0038] In some embodiments, the first basic information may include, but is not limited to, one or any combination of the following: hash value, shooting time, shooting location, shooting device, shooter, etc.

[0039] In some embodiments, the first image is obtained by the first device using a preset image acquisition tool, and the image acquisition tool is provided by the image anti-counterfeiting device. In the embodiments of the present disclosure, the image acquisition tool refers to a shooting software. That is to say, the first device can use the shooting software specified or provided by the image anti-counterfeiting device to capture the first image, which can prevent the original image from being polluted by shooting algorithms such as beauty filters at the shooting source.

[0040] Step S12: Obtain a second image, where the second image is an image obtained by performing an editing operation on a third image.

[0041] In some embodiments, the obtaining of the second image may include the following steps: Receive the third image sent by the first device and obtain the editing operation on the third image, and determine the editing parameters corresponding to the editing operation; Perform an editing operation on the third image according to the editing parameters to obtain the second image. The user who uploads the image sends the third image to the image anti-counterfeiting device through the first device and performs an editing operation on the third image on the image anti-counterfeiting device to obtain the second image.

[0042] Step S13: Obtain the first basic information from the blockchain, and generate a first zero-knowledge proof according to the first basic information, the third image, and the original proof circuit of the image anti-counterfeiting device. The first zero-knowledge proof is used to verify the legality of the first image.

[0043] Zero - knowledge proof means that the prover (i.e., the image sender) can make the verifier (i.e., the image receiver) believe that a certain assertion is correct without providing any useful information to the verifier. Substantially, zero - knowledge proof is a protocol involving two or more parties, that is, a series of steps required for two or more parties to complete a task. The prover proves to the verifier and makes the verifier believe that he knows or has a certain message, but the proof process cannot disclose any information about the message being proved to the verifier.

[0044] In this step, the image anti - counterfeiting device obtains the first basic information from the blockchain, and uses the proof circuit in the image anti - counterfeiting device to generate the first zero - knowledge proof for the first image according to the first basic information and the third image.

[0045] Step S14: Obtain a composite proof circuit, which is obtained according to the editing operation; generate a second zero - knowledge proof based on the second image, the composite proof circuit, and the first image, and the second zero - knowledge proof is used to verify the rationality of the editing operation.

[0046] The composite proof circuit can be generated during the process of editing the third image or during the initialization stage of the image anti - counterfeiting device, and the composite proof circuit is obtained according to the editing operation. In this step, the image anti - counterfeiting device uses the composite proof circuit to generate the second zero - knowledge proof for the editing operation according to the first image and the second image.

[0047] In the embodiments of the present disclosure, verifying the rationality of the editing operation on the third image includes, but is not limited to: verifying whether the second image is an image generated by editing the first image. If the verification result indicates that the first image is illegal and / or the editing operation for generating the second image is unreasonable, the image anti - counterfeiting verification fails; if the verification result indicates that the first image is legal and the editing operation for generating the second image is reasonable, the image anti - counterfeiting verification passes. If the image anti - counterfeiting verification passes, it means that the third image is the first image, that is, the second image (i.e., the edited image) is the image obtained after performing the above - mentioned editing operation on the first image (the original image).

[0048] The image anti-counterfeiting method provided by the embodiments of the present disclosure is applied to an image anti-counterfeiting device, and includes: receiving a first image sent by a first device, obtaining first basic information of the first image, and uploading the first basic information to a blockchain; in the case of obtaining a second image, obtaining the first basic information from the blockchain, generating a first zero-knowledge proof according to the first basic information, a third image, and the original proof circuit of the image anti-counterfeiting device, where the second image is an image obtained by performing an editing operation on the third image; obtaining a composite proof circuit, where the composite proof circuit is obtained according to the editing operation, generating a second zero-knowledge proof according to the second image, the composite proof circuit, and the first image, where the first zero-knowledge proof is used to verify the legality of the first image, and the second zero-knowledge proof is used to verify the rationality of the editing operation; the embodiments of the present disclosure combine blockchain technology and zero-knowledge proof technology, which can not only verify the basic information of the original image itself, but also verify the rationality of the editing operation of the edited image, realizing anti-counterfeiting verification throughout the entire life cycle of the edited image; the image anti-counterfeiting method can be implemented without requiring any prior knowledge of the user, the solution is easy to implement, and the application range is wide.

[0049] The embodiments of the present disclosure support hybrid editing operations of multiple image algorithms. For such unstable and flexible algorithm logics, the current mainstream direction is to use zkenv to generate circuits based on smart contract compilation. However, this method has great limitations. First, it is relatively complex to implement circuits with smart contracts. Second, zkenv is still in its infancy and is not yet mature in application. Therefore, the embodiments of the present disclosure complete the generation of the composite proof circuit in the following manner: implementing a prefabricated basic image algorithm based on a mainstream language, completing the writing of the corresponding image basic circuit, and using the image basic circuit as the image basic circuit template in the basic circuit library, where the basic circuit library can be denoted as (ε 1 , ε 2 , ε 3 , … ε n ), where ε 1 , ε 2 , ε 3 , … ε n are each image basic circuit. The implementation principle of the image basic circuit is to convert the image basic algorithm code into a QAP (quadratic arithmetic problem) and describe it in a zero-knowledge language, and the described code is called a circuit.

[0050] In some embodiments, the composite proof circuit can be generated during the process of editing the third image. Correspondingly, as Figure 2 shown, the obtaining of the composite proof circuit (i.e., step S14) may include the following steps:

[0051] Step S141: According to each editing operation, select an image basic operator corresponding to the editing operation from a preset set of image basic operators, and for each image basic operator, generate an image basic circuit corresponding to the image basic operator.

[0052] As Figure 3 shown, an image anti-counterfeiting device is pre-set with a set of image basic operators and a basic circuit library. The preset set of image basic operators includes various image basic operators, such as, for example, a grayscale operator, a cropping operator, a convolution operator, a Gaussian filtering operator, a threshold filtering operator, etc. Each image basic operator corresponds to a different editing operation. Exemplarily, the grayscale operator corresponds to image grayscaling processing, and the cropping operator corresponds to image cropping processing. The preset basic circuit library includes various image basic circuits, such as, for example, a grayscale circuit, a cropping circuit, a convolution circuit, a Gaussian filtering circuit, a threshold filtering circuit, etc. Each image basic circuit corresponds to a corresponding type of image basic operator.

[0053] Step S142: Combine the image basic circuits to generate a composite proof circuit.

[0054] The image anti-counterfeiting device can use a hybrid image algorithm to combine each image basic circuit to generate a composite proof circuit. Taking the editing operations on the third image as grayscale operation and cropping operation as an example, as Figure 3 shown, the uploading user selects the grayscale operation and the cropping operation on the editing page of the image anti-counterfeiting device. The image anti-counterfeiting device selects the grayscale operator and the cropping operator from the set of image basic operators, and generates a grayscale circuit ε 1 for the grayscale operator, and generates a cropping circuit ε 2 for the cropping operator; combine the grayscale circuit ε 1 and the cropping circuit ε 2 to generate a composite proof circuit ε 1 +ε 2 .

[0055] In some embodiments, the composite proof circuit can be generated during the initialization process of the image anti-counterfeiting device. Correspondingly, the obtaining of the composite proof circuit (i.e., step S14) can include the following steps: According to each editing operation, select a complete circuit corresponding to each editing operation from a preset complete circuit library as the composite proof circuit; wherein, during the initialization stage of the image anti-counterfeiting device, at least two image basic circuits are combined to generate a complete circuit, and the at least two image basic circuits respectively correspond to each image basic operator corresponding to each editing operation.

[0056] As Figure 4As shown, an image anti-counterfeiting device is pre-set with an image basic operator set and a basic circuit library. The pre-set image basic operator set includes a variety of image basic operators. For example, grayscale operators, cropping operators, convolution operators, Gaussian filtering operators, threshold filtering operators, etc. Each image basic operator corresponds to a different editing operation. Exemplarily, the grayscale operator corresponds to image grayscaling processing, and the cropping operator corresponds to image cropping processing. The pre-set basic circuit library includes a variety of image basic circuits. For example, grayscale circuits, cropping circuits, convolution circuits, Gaussian filtering circuits, threshold filtering circuits, etc. The image basic circuits are circuit templates of different types, and each image basic circuit corresponds to the corresponding type of image basic operator.

[0057] During the initialization process of the image anti-counterfeiting device, common editing operations are selected and combined to obtain multiple groups of editing operations. For each editing operation in each group of editing operations, an image basic operator corresponding to the editing operation is selected from the pre-set image basic operator set, and for the image basic operator, a corresponding image basic circuit is generated. The various image basic circuits in the group of editing operations are combined to generate a complete circuit corresponding to the group of editing operations, and multiple complete circuits form a complete circuit library. Exemplarily, in the initialization stage, the image anti-counterfeiting device combines the grayscale circuit ε 1 and the convolution circuit ε 3 to generate a convolutional neural network circuit and stores the convolutional neural network circuit in the complete circuit library for standby. During the process of performing an editing operation on the third image, the convolutional neural network circuit can be directly selected from the complete circuit library as a composite proof circuit.

[0058] In some embodiments, each image basic circuit includes at least an input module and an output module. A composite proof circuit can be generated through the following steps: According to the order of each editing operation, the parameters output by the output module of the image basic circuit corresponding to the previous editing operation are input into the input module of the image basic circuit corresponding to the next editing operation to generate a composite proof circuit.

[0059] The generation principle of the composite circuit is as follows: Assume that two image basic circuits form a composite proof circuit, that is, the first image basic circuit and the second image basic circuit. The composite proof circuit only cares about the junction point of the two image basic circuits. It only needs to adapt the output of the first image basic circuit as the input of the second image basic circuit through a script, and then the generation of the composite proof circuit can be completed.

[0060] The two image basic circuits include an input module, a constraint module, and an output module. The constraints are generated by circuit characteristics and do not change. When generating a composite proof circuit, it is necessary to re-integrate the compiler, common library, etc., convert the output of the first image basic circuit and the input of the second image basic circuit into variables, and assign the output of the first image basic circuit to the input of the second image basic circuit, thereby completing the combination of the two image basic circuits. The principle of generating a composite proof circuit by combining multiple circuits is the same.

[0061] Taking the example of first performing a grayscale operation on the third image and then a filtering operation, as Figure 5 shown, the grayscale circuit and the Gaussian filtering circuit respectively include an input module, a constraint module, and an output module. The parameters output by the output module of the grayscale circuit corresponding to the grayscale operation are input into the input module of the Gaussian filtering circuit corresponding to the filtering operation, and finally it becomes input --> grayscale circuit constraint --> Gaussian filtering circuit constraint --> output. The resulting grayscale & Gaussian filtering synthesis circuit is used as a composite proof circuit. Among them, the input module in the grayscale circuit serves as the input module of the composite proof circuit, and its input parameters are the first image and the second image. The output module of the Gaussian filtering circuit serves as the output module of the composite proof circuit, and its output parameter is the second zero-knowledge proof.

[0062] In some embodiments, as Figure 6 shown, generating the first zero-knowledge proof according to the first basic information, the third image, and the original proof circuit of the image anti-counterfeiting device (i.e., step S13) includes the following steps:

[0063] Step S131, obtain the second basic information of the third image.

[0064] In some embodiments, the second basic information may include, but is not limited to, one or any combination of the following: hash value, shooting time, shooting location, shooting device, shooter, etc.

[0065] Step S132, generate input information according to the first basic information and the second basic information.

[0066] Step S133, input the input information into the original proof circuit to obtain the first zero-knowledge proof.

[0067] The input of the original proof circuit is the input information generated in step 132, and the output of the original proof circuit is the first zero-knowledge proof.

[0068] The following combines Figure 7 , and details the process of generating the first zero-knowledge proof. As Figure 7As shown, the second basic information of the third image is obtained, and the hash algorithm is used to generate the private input information input(private) from the second basic information. The image anti-counterfeiting device searches for the first basic information of the first image on the blockchain through the transaction serial number, and generates the public input information input(public) based on the first basic information. The image anti-counterfeiting device splices the private input information input(private) and the public input information input(public) to generate the input information input.json. input.json is an input file in json format. The input information input.json is input into the original proof circuit, and the original proof circuit generates and outputs the first zero-knowledge proof (pkey1).

[0069] In some embodiments, as Figure 8 shown, the generating of the second zero-knowledge proof (i.e., step S14) based on the second image, the composite proof circuit, and the first image includes the following steps:

[0070] Step S141, generating first input information according to the first pixel point of the first image, where the first pixel point is obtained after receiving the first image;

[0071] Step S142, obtaining the second pixel point of the second image and generating second input information according to the second pixel point;

[0072] Step S143, inputting the first input information and the second input information into the composite proof circuit to obtain the second zero-knowledge proof.

[0073] The following combines Figure 9 , and details the process of generating the second zero-knowledge proof. As Figure 9As shown, after receiving the first image sent by the first device, the first pixel point of the first image is extracted and converted into the first input information input1.json in json format. In order to prove that the image seen by the image receiver is the editing operation completed on the image anti-counterfeiting device rather than forged, and without exposing the information of the original image (i.e., the first image), the image uploader uses the first pixel point of the first image as the private input information. It should be noted that after extracting the first pixel point of the first image and obtaining the first basic information of the first image, the first image is discarded to avoid leakage of the original image and ensure privacy security. After generating the second image, the second pixel point of the second image is extracted and converted into the second input information input2.json in json format. The first input information input1.json and the second input information input2.json are input into the composite proof circuit to generate the second zero-knowledge proof (pkey2). The composite proof circuit is generated during the process of editing the third image to generate the second image. Specifically, according to the editing operation, image basic operators are selected from the set of image basic operators and the image basic circuits corresponding to the image basic operators are generated, and the composite proof circuit is generated by combining the image basic circuits using the hybrid image algorithm.

[0074] The image receiver user can select the image anti-counterfeiting verification method. Exemplarily, the image anti-counterfeiting verification method can be an online verification implemented by the image anti-counterfeiting device or an offline verification implemented by a third-party device selected by the image receiver. In the online verification method, the zero-knowledge engine or the blockchain can be used for image anti-counterfeiting verification. The L2 blockchain layer commonly uses the blockchain verification method for image anti-counterfeiting verification, which has a high degree of credibility and a simple verification process, and is suitable for relatively fixed contract verification. Using the zero-knowledge engine for image anti-counterfeiting verification is suitable for flexible circuits and has a shorter verification time. In the offline verification method, the image receiver user can download the second image through the second device and build a zero-knowledge verification environment by himself to complete the verification. In the embodiments of the present disclosure, the online verification by the image anti-counterfeiting device is taken as an example for description.

[0075] In some embodiments, as Figure 10 shown, after generating the second zero-knowledge proof (i.e., step S14) according to the second image, the composite proof circuit and the first image, the image anti-counterfeiting method may further include the following steps:

[0076] Step S21, sending the first zero-knowledge proof and the second zero-knowledge proof to the second device.

[0077] The image anti-counterfeiting device sends the generated first zero-knowledge proof, second zero-knowledge proof, and serialized ID to the second device of the image receiving party user for the image receiving party user to select an image anti-counterfeiting verification method. The serialized ID is used to identify the current editing operation. It should be noted that the image anti-counterfeiting device can also send a second image to the second device.

[0078] Step S22: Receive the image anti-counterfeiting verification request sent by the second device, and obtain the zero-knowledge proof to be verified carried in the image anti-counterfeiting verification request.

[0079] In the case where the image receiving party user selects the image anti-counterfeiting verification by the image anti-counterfeiting device, the image receiving party user sends an image anti-counterfeiting verification request to the image anti-counterfeiting device through the second device. The image anti-counterfeiting verification request carries a zero-knowledge proof and may also carry the serialized ID. The zero-knowledge proof to be verified includes the first zero-knowledge proof to be verified and the second zero-knowledge proof to be verified.

[0080] Step S23: According to the zero-knowledge proof to be verified, the first zero-knowledge proof, and the second zero-knowledge proof, verify the legality of the first image and the rationality of the editing operation on the third image to obtain a verification result.

[0081] The legality of the first image and the rationality of the editing operation on the third image can be verified by using a zero-knowledge engine or using the blockchain according to the zero-knowledge proof to be verified, the first zero-knowledge proof, and the second zero-knowledge proof.

[0082] Step S24: Send the verification result to the second device.

[0083] The following will respectively combine Figure 11 and Figure 12 to elaborate on the above two online verification methods in detail. Figure 11 It is a schematic diagram of the principle of using a zero-knowledge engine for image anti-counterfeiting verification provided by an embodiment of the present disclosure. Figure 12 It is a schematic diagram of the principle of using a blockchain for image anti-counterfeiting verification provided by an embodiment of the present disclosure.

[0084] If a hybrid image algorithm is used to generate a composite proof circuit, it is shown that the composite proof circuit may change in real time. It is not recommended to use an on-chain smart contract for image anti-counterfeiting verification, but to use a zero-knowledge engine for image anti-counterfeiting verification. As Figure 11As shown, the zero-knowledge engine in the image anti-counterfeiting device issues a zkey, which is used to generate a first verification secret key (pkey) and a second verification secret key (vkey). The first verification secret key (pkey) and the second verification secret key (vkey) can be stored in the proof management module. The first verification secret key (pkey) includes a first zero-knowledge proof and a second zero-knowledge proof, and the second verification secret key (vkey) is the verification secret key of the image recipient. The image anti-counterfeiting device not only needs to provide the ability to generate zero-knowledge proofs, but also needs to provide the ability of trusted setup and verification of zero-knowledge proofs. All zero-knowledge proofs will be managed locally to simplify the verification process. After the image anti-counterfeiting device receives an image anti-counterfeiting verification request sent by the second device, the zero-knowledge engine queries the corresponding first verification secret key (pkey) and second verification secret key (vkey) in the proof management module according to the serialized ID carried therein, and compares the queried first verification secret key (pkey) and second verification secret key (vkey) with the first zero-knowledge proof to be verified, the second zero-knowledge proof to be verified, and the second verification secret key (vkey) to be verified carried in the image anti-counterfeiting verification request to implement image anti-counterfeiting verification. After the verification is completed, the zero-knowledge engine returns the verification result to the second device. Since image anti-counterfeiting verification is widely used in the field of traffic peaks and has high requirements for verification time, the Groth16 protocol under the Zk_Snark system can be used to implement the verification. This protocol has a small proof and an extremely short verification time, meeting the requirements of image anti-counterfeiting.

[0085] Since the zero-knowledge proof of the original image is absolutely fixed, the circuit can be written in advance and the smart contract can be exported and deployed on the blockchain to utilize the blockchain for image anti-counterfeiting verification. As Figure 12 As shown, the zero-knowledge engine in the image anti-counterfeiting device issues a zkey, which is used to generate a first verification secret key (pkey) and a second verification secret key (vkey). The first verification secret key (pkey) and the second verification secret key (vkey) can be stored in the proof management module. The first verification secret key (pkey) includes a first zero-knowledge proof and a second zero-knowledge proof, and the second verification secret key (vkey) is the verification secret key of the image recipient. After the image anti-counterfeiting device receives an image anti-counterfeiting verification request sent by the second device, the first verification secret key (pkey) to be verified and the second verification secret key (vkey) to be verified carried in the image anti-counterfeiting verification request are uploaded to the blockchain, and the blockchain implements image anti-counterfeiting verification. After the verification is completed, the blockchain returns the verification result to the second device. The immutability of the blockchain ensures the credibility of the basic information of the original image. Since the basic information and the contract of the original image are public, the credibility of the original image is strictly guaranteed.

[0086] To clearly illustrate the solution of the embodiments of the present disclosure, the following describes the image anti-counterfeiting verification process of the embodiments of the present disclosure with a specific example. AsFigure 13 As shown in the figure, the image anti-counterfeiting verification process includes the following steps:

[0087] Step 1: Initialize the image anti-counterfeiting device. The following operations are performed in the initialization stage:

[0088] (1) Pre-configure the image basic operator set and the basic circuit library;

[0089] (2) Generate a complete circuit according to the image basic circuit, generate a complete circuit library according to the complete circuit, and configure the complete circuit library in the image anti-counterfeiting device;

[0090] (3) Pre-configure the original proof circuit;

[0091] (4) Use compilation tools such as snarkjs to generate a smart contract and deploy the smart contract to the blockchain;

[0092] (5) The image uploader and the image receiver perform user registration on the image anti-counterfeiting device.

[0093] Step 2: The image uploader uses the shooting software in the first device to shoot a first image and uploads the first image to the image anti-counterfeiting device, and the image anti-counterfeiting device provides the shooting software.

[0094] Step 3: The image anti-counterfeiting device uploads the first basic information of the first image to the blockchain.

[0095] Step 4: The image uploader uploads a third image to the image anti-counterfeiting device through the first device and edits the third image on the image anti-counterfeiting device to obtain a second image.

[0096] Steps 5-6: The image anti-counterfeiting device generates a first zero-knowledge proof and a second zero-knowledge proof in sequence.

[0097] Step 7: The image anti-counterfeiting device sends the first zero-knowledge proof, the second zero-knowledge proof, the serialized ID, and the second image to the second device of the image receiver.

[0098] Step 8: The second device of the image receiver sends an image anti-counterfeiting verification request to the image anti-counterfeiting device, and uploads the serialized ID, the first zero-knowledge proof to be verified, and the second zero-knowledge proof to be verified to the zero-knowledge engine or the blockchain for image anti-counterfeiting verification.

[0099] Currently, Web3.0 has entered a stage of rapid development, and privacy protection has been widely concerned by the country and society. The image anti-counterfeiting method provided by the embodiments of the present disclosure can solve the problem of trustworthy verification of the original image under editing.

[0100] Embodiments of the present disclosure analyze most of the current mainstream image basic operators that support zero - knowledge proof, and complete the construction of a basic circuit library. Using the application provided by the image anti - counterfeiting device to capture the original image, and uploading the basic information of the original image to the chain through a unique entry. The image anti - counterfeiting device queries the basic information on the chain and generates a credible proof of the original image (the first zero - knowledge proof). Since the original proof circuit is absolutely fixed, image anti - counterfeiting verification can be completed through a blockchain smart contract. Using the image basic operators provided by the image anti - counterfeiting device to flexibly fuse and edit the image to obtain an edited image, and generating a zero - knowledge proof for the editing operation (the second zero - knowledge proof). Finally, the user triggers image anti - counterfeiting verification to obtain a conclusion on whether the first image has been tampered with during its life cycle.

[0101] In the image anti - counterfeiting device of the embodiments of the present disclosure, a variety of image basic operators and corresponding image basic circuits are preset, supporting multi - algorithm fusion. Based on a variety of image basic circuits, a composite proof circuit can be automatically generated when flexibly editing an image on the image anti - counterfeiting device. By uploading a credible identity authentication to the blockchain, the entry to the chain is restricted to be unique. The original image is captured based on the software provided by the image anti - counterfeiting device. Without strong dependence on C2PA (Coalition for Content Provenance and Authenticity) hardware, the basic information of the original image is uploaded to the chain, and the first zero - knowledge proof of the original image is generated according to the hash algorithm. On the premise that the basic information of the original image is credible, a second zero - knowledge proof is generated according to the composite proof circuit to verify whether the editing operation is credible. The composite proof circuit is a proof circuit obtained by performing an image editing operation based on one or several image algorithms.

[0102] The embodiments of the present disclosure can be applied to a very wide range of scenarios, such as:

[0103] (1) New media field: It can prevent some rumor - mongering editors from confusing the time and space of images, presenting events that occurred long before the news was uploaded, and misleading the audience.

[0104] (2) E - commerce field: Malicious buyers engage in false promotion, uploading images of clothing and food that have been maliciously PS'd or overly beautified, resulting in buyers being deceived and suffering economic losses.

[0105] (3) Web3.0 field: Digital collection image verification, obtaining some collection information in advance.

[0106] The applications in the above fields are mainly complex image anti - counterfeiting scenarios. However, due to the characteristic of zero - knowledge not exposing privacy data, it can also be applied in the field of privacy data ownership verification.

[0107] Research shows that: the example of rumor spread is 100 times that of real information, and the spread speed is 6 times that of real information. Currently, software users have no objective judgment on the false images on the application and completely rely on their own life experience and cognition for identification. In the embodiments of the present disclosure, blockchain technology is combined with zero-knowledge proof technology, so that users can not only verify the legality of important information of the image itself, such as shooting time, location, shooter, etc., but also verify the rationality of image editing operations. This allows users to trust the images provided on the application without any prior knowledge, reducing the losses and public opinion costs brought by false images to individuals and enterprises, and enabling society to develop towards mutual trust.

[0108] The embodiments of the present disclosure also provide an image anti-counterfeiting device, as Figure 14 shown. The image anti-counterfeiting device is longitudinally divided into an application layer, a management layer, and an infrastructure layer, and can also be horizontally divided into a core business layer and a support business layer according to the importance of the business. The application layer is the entrance of the image anti-counterfeiting device. The core business of the application layer is used to realize the interaction with users, including image-related operations (image shooting, image publishing, image editing, image verification) and general blockchain logic; the support business of the application layer can realize functions such as user registration on the chain and blockchain query. The management layer is the key component of the image anti-counterfeiting device. The core business of the management layer is used to manage image basic operators (image operator management module) and their corresponding basic circuit libraries (zero-knowledge circuit management module), and to manage and verify zero-knowledge proofs (proof management module); the support business of the management layer can realize functions such as blockchain management and user management. The infrastructure layer provides basic service capabilities, including zero-knowledge proof computing capabilities (zero-knowledge engine) and blockchain-related functions (blockchain engine).

[0109] As Figure 15 shown, the embodiments of the present disclosure also provide an image anti-counterfeiting device, and the image anti-counterfeiting device includes:

[0110] At least one processor 1501;

[0111] A memory 1502, on which at least one program is stored. When the at least one program is executed by the at least one processor, the at least one processor implements the image anti-counterfeiting method as described above;

[0112] At least one I / O interface 1503, connected between the processor and the memory, configured to realize the information interaction between the processor and the memory.

[0113] Among them, the processor 1501 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 1502 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically such as SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read / write interface) 1503 is connected between the processor 1501 and the memory 1502, and can realize the information interaction between the processor 1501 and the memory 1502, including but not limited to a data bus (Bus), etc.

[0114] In some embodiments, the processor 1501, the memory 1502, and the I / O interface 1503 are interconnected through a bus, and further connected to other components of the computing device.

[0115] The embodiments of the present disclosure also provide a computer-readable medium, on which a computer program is stored, wherein when the computer program is executed, the image anti-counterfeiting method provided in the foregoing embodiments is implemented.

[0116] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the devices, can be implemented as software, firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be executed by several physical components in cooperation. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or be implemented as hardware, or be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes but is not limited to RAM, ROM, EEPROM, flash memory, or other memory technologies, CD-ROM, digital versatile disk (DVD), or other optical disk storage, magnetic cassette, tape, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0117] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.

Claims

1. An image anti-counterfeiting method, characterized in that, the method is applied to an image anti-counterfeiting device, including: Receiving a first image sent by a first device, obtaining first basic information of the first image, and uploading the first basic information to a blockchain; Obtaining a second image, where the second image is an image obtained by performing an editing operation on a third image; Obtaining the first basic information from the blockchain, and generating a first zero-knowledge proof according to the first basic information, the third image, and the original proof circuit of the image anti-counterfeiting device, where the first zero-knowledge proof is used to verify the legality of the first image; Obtaining a composite proof circuit, where the composite proof circuit is obtained according to the editing operation; generating a second zero-knowledge proof according to the second image, the composite proof circuit, and the first image, where the second zero-knowledge proof is used to verify the rationality of the editing operation.

2. The method according to claim 1, characterized in that, the obtaining of the composite proof circuit includes: According to each of the editing operations, selecting an image basic operator corresponding to the editing operation from a preset image basic operator set, and generating an image basic circuit corresponding to the image basic operator for each of the image basic operators; Combining each of the image basic circuits to generate a composite proof circuit.

3. The method according to claim 1, characterized in that, the obtaining of the composite proof circuit includes: According to each of the editing operations, selecting a complete circuit corresponding to each of the editing operations from a preset complete circuit library as the composite proof circuit; where, in the initialization stage of the image anti-counterfeiting device, the complete circuit is generated by combining at least two image basic circuits, and the at least two image basic circuits respectively correspond to each image basic operator corresponding to each of the editing operations.

4. The method according to claim 2 or 3, characterized in that, each of the image basic circuits at least includes an input module and an output module, and the composite proof circuit is generated by combining through the following steps: In the order of each of the editing operations, inputting the parameters output by the output module of the image basic circuit corresponding to the previous editing operation into the input module of the image basic circuit corresponding to the next editing operation to combine and generate the composite proof circuit.

5. The method according to claim 1, characterized in that, the generating of the first zero-knowledge proof according to the first basic information, the third image, and the original proof circuit of the image anti-counterfeiting device includes: Obtaining second basic information of the third image; Generating input information according to the first basic information and the second basic information; Inputting the input information into the original proof circuit to obtain a first zero-knowledge proof.

6. The method according to claim 1, characterized in that, the generating of the second zero-knowledge proof according to the second image, the composite proof circuit, and the first image includes: Generating first input information according to a first pixel point of the first image, where the first pixel point is obtained after receiving the first image; Obtaining a second pixel point of the second image, and generating second input information according to the second pixel point; Input the first input information and the second input information into the composite proof circuit to obtain a second zero-knowledge proof.

7. The method according to claim 1, wherein, the first image is obtained by the first device using a preset image acquisition tool, and the image acquisition tool is provided by the image anti-counterfeiting device.

8. The method according to any one of claims 1-3, 5-7, wherein, after generating the second zero-knowledge proof according to the second image, the composite proof circuit and the first image, the method further includes: sending the first zero-knowledge proof and the second zero-knowledge proof to a second device; receiving an image anti-counterfeiting verification request sent by the second device, and obtaining the zero-knowledge proof to be verified carried in the image anti-counterfeiting verification request; verifying the legality of the first image and the reasonableness of the editing operation on the third image according to the zero-knowledge proof to be verified, the first zero-knowledge proof and the second zero-knowledge proof, to obtain a verification result; sending the verification result to the second device.

9. The method according to claim 8, wherein, the verifying the legality of the first image and the reasonableness of the editing operation on the third image according to the zero-knowledge proof, the first zero-knowledge proof and the second zero-knowledge proof includes: using a zero-knowledge engine or using the blockchain to verify the legality of the first image and the reasonableness of the editing operation on the third image according to the zero-knowledge proof, the first zero-knowledge proof and the second zero-knowledge proof.

10. An image anti-counterfeiting device, wherein, it includes: one or more processors; a memory storing one or more programs thereon; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the image anti-counterfeiting method according to any one of claims 1-9; at least one I / O interface connected between the processor and the memory and configured to implement information interaction between the processor and the memory.

11. A computer-readable medium storing a computer program thereon, wherein, the program, when executed, implements the image anti-counterfeiting method according to any one of claims 1-9.

Citation Information

Cited By

  • APP data trusted storage and sharing method based on block chain

    CN121125123A