Video signature method, video signature verification method and related equipment
By using quantum random numbers and blockchain technology to blindly watermark videos in video signatures, the problem of poor security of video signatures is solved, the immutability and forgery of videos is realized, and the security of signatures is improved. .
Patent Information
- Application Number
- CN202411295602.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-14
AI Technical Summary
In the prior art, the security of video signatures is poor and is easily tampered with and forged, especially due to the editability of video files, it is difficult to effectively protect watermarks.
Using the video signature method based on quantum random numbers, by obtaining the user's identity identification, quantum random numbers and quantum encryption numbers, the signature smart contract on the blockchain blindly watermarks the video frame, and the signature picture is used. Replace the original video frame, generate the signed video, and upload relevant information to the blockchain to ensure the integrity of the video.
Generate a unique blind watermark signature string through quantum random numbers to ensure the immutability and forgery of video signatures and improve the security of video signatures.
Smart Images

Figure CN119255061A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information security technology, and in particular relates to a video signing method, a video signature verification method and related equipment. Background Art
[0002] In order to protect information security, watermarks are usually triggered according to different business systems or different file sensitivity levels, and loaded into terminal screens, business web pages, documents or printed files, so that the terminal carries the watermark of identity information when accessing business systems, sensitive files and printed files. However, for video files, due to their special nature of being editable and croppable, the above method of adding watermarks to video files is easy to be tampered with and forged, resulting in poor security of video signatures. Summary of the invention
[0003] The embodiments of the present application provide a video signing method, a video signature verification method and related devices to solve the technical problem of poor security of video signing.
[0004] In a first aspect, an embodiment of the present application provides a video signing method, including:
[0005] Obtaining the identity of the first user, a quantum random number, and a quantum encryption number, and uploading them to the blockchain, wherein the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number;
[0006] By calling the signature smart contract on the blockchain, the n video frames in the first video are signed with the first watermark signature string to generate n signature images, each of which includes a blind watermark. The first watermark signature string is generated based on the identity, the quantum random number and the quantum encryption number, and n is a positive integer;
[0007] Replace n video frames in the first video with n signature images to obtain a second video, where the second video is the first video after the video signature is performed;
[0008] The number of the logo and signature images of the first video is uploaded to the blockchain.
[0009] In a second aspect, an embodiment of the present application provides a video signature verification method, including:
[0010] When a second video uploaded by a second user is obtained, k signature verification images are extracted from the second video, where the second video is a video after the first video is signed, and k is a positive integer;
[0011] By calling the signature verification smart contract on the blockchain, using the identifier of the first video, the number of signature images, the identity identifier of the first user, at least one of the quantum random number and the quantum encryption number, the k signature verification images are verified to obtain a signature verification result;
[0012] Among them, the identification of the first video, the number of signature images, the identity identification, the quantum random number and the quantum encryption number are pre-stored in the blockchain; the quantum encryption number is obtained based on the hash operation of the encrypted quantum random number; the signature image is generated by calling the signature smart contract on the blockchain and signing the n video frames in the first video with the first watermark signature string; the first watermark signature string is generated based on the identity identification, the quantum random number and the quantum encryption number, and n is a positive integer.
[0013] In a third aspect, an embodiment of the present application provides a video signing device, including:
[0014] An acquisition module, used to acquire the identity of the first user, a quantum random number and a quantum encryption number, and upload them to the blockchain, wherein the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number;
[0015] A signature module, used to sign n video frames in the first video using a first watermark signature string by calling a signature smart contract on the blockchain, and generate n signature images, each of which includes a blind watermark, and the first watermark signature string is generated based on an identity identifier, a quantum random number, and a quantum encryption number, where n is a positive integer;
[0016] A replacement module, used to replace n video frames in the first video with n signature images to obtain a second video, where the second video is the first video after the video signature is performed;
[0017] The upload module is used to upload the identification of the first video and the number of signature images to the blockchain.
[0018] In a fourth aspect, an embodiment of the present application provides a video signature verification device, including:
[0019] An extraction module, configured to extract k signature verification images from a second video uploaded by a second user when a second video is obtained, wherein the second video is a video after the first video is video-signed, and k is a positive integer;
[0020] A signature verification module, configured to verify k signature verification images by calling a signature verification smart contract on the blockchain, using the identifier of the first video, the number of signature images, the identity identifier of the first user, a quantum random number, and a quantum encryption number, to obtain a signature verification result;
[0021] Among them, the identification of the first video, the number of signature images, the identity identification, the quantum random number and the quantum encryption number are pre-stored in the blockchain; the quantum encryption number is obtained based on the hash operation of the encrypted quantum random number; the signature image is generated by calling the signature smart contract on the blockchain and signing the n video frames in the first video with the first watermark signature string; the first watermark signature string is generated based on the identity identification, the quantum random number and the quantum encryption number, and n is a positive integer.
[0022] In a fifth aspect, the embodiment of the present application provides a video signature system, including:
[0023] At least one of the video signature device of the third aspect and the video signature verification device of the fourth aspect.
[0024] In a sixth aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0025] A processor and a memory storing programs or instructions;
[0026] When the processor executes the program or instruction, the method of the first aspect or the second aspect is implemented.
[0027] In a seventh aspect, an embodiment of the present application provides a machine-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the method of the first aspect or the second aspect is implemented.
[0028] In an eighth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method of the first aspect or the second aspect.
[0029] The video signing method provided in the embodiment of the present application can obtain the identity, quantum random number and quantum encryption number of the first user, and upload them to the blockchain, wherein the quantum encryption number is obtained based on the hash operation of the encrypted quantum random number; by calling the signature smart contract on the blockchain, the n video frames in the first video are signed using the first watermark signature string to generate n signature images, each signature image includes a blind watermark, the first watermark signature string is generated based on the identity, the quantum random number and the quantum encryption number, and n is a positive integer; the n video frames in the first video are replaced with n signature images to obtain a second video, and the second video is the video after the first video is video signed; the identifier of the first video and the number of signature images are uploaded to the blockchain.
[0030] In this way, a video signature algorithm based on quantum random numbers is used to blindly watermark the video with quantum random number information, ensuring that the first watermark signature string corresponding to the blind watermark signature of each video is different, ensuring that the verification video cannot be tampered with or forged, and improving the security of the video signature. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 It is a flowchart of a video signing method provided by an embodiment of the present application;
[0033] Figure 2 This is a schematic diagram of the workflow of a video signature system provided by an embodiment of the present application;
[0034] Figure 3 This is a flowchart of a video signature verification method provided by an embodiment of the present application;
[0035] Figure 4 It is a structural diagram of a video signature device provided by an embodiment of the present application;
[0036] Figure 5 It is a structural diagram of a video signature verification device provided by an embodiment of the present application;
[0037] Figure 6 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0038] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0039] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0040] In addition, it should be noted that the acquisition, storage, use, and processing of data in the embodiments of this application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0041] In order to solve the problems in the prior art, the embodiments of the present application provide a video signature method, a video signature verification method and related devices. The video signature method provided by the embodiments of the present application is first introduced below.
[0042] Figure 1 FIG. 1 is a flow chart showing a video signature method according to an embodiment of the present application. Figure 1 As shown, the video signing method may include:
[0043] Step 101, obtain the identity of the first user, the quantum random number and the quantum encryption number, and upload them to the blockchain, wherein the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number.
[0044] In step 101, the first user can obtain the current quantum random number P on the quantum random number platform, and can encrypt the quantum random number P, and obtain a quantum encryption number based on a hash operation on the encrypted quantum random number.
[0045] For example, after obtaining the quantum random number P at the current moment, the first user A can encrypt the quantum random number P according to his own private key using the Advanced Encryption Standard (AES) encryption algorithm to obtain an encrypted quantum random number P1, and then obtain a quantum encryption number Q based on a hash operation on the encrypted quantum random number P1, where Q=sha256(P1).
[0046] The identity identifier, quantum random number and quantum encryption number of the first user may be obtained, and the identity identifier, quantum random number and quantum encryption number of the first user may be written into the blockchain. The identity identifier of the first user may be information used to characterize the identity of the first user, for example, the identity identifier may be the name of the first user.
[0047] Step 102, by calling the signature smart contract on the blockchain, the n video frames in the first video are signed using the first watermark signature string to generate n signature images, each signature image includes a blind watermark, and the first watermark signature string is generated based on the identity, quantum random number and quantum encryption number, and n is a positive integer.
[0048] In step 102, the signature video, that is, the first video, can be signed by calling the signature smart contract on the blockchain.
[0049] For example, a first video uploaded by a first user may be read, and n video frames in the first video may be extracted. The n video frames may be all video frames of the first video, or a certain number of video frames may be extracted from all video frames of the first video according to a preset extraction rule, which is not specifically limited here.
[0050] The first watermark signature string can be generated based on the identity of the first user, the quantum random number and the quantum encryption number. The generation method can be set according to actual needs and is not specifically limited here. The first watermark signature string can be used to sign n video frames to generate n signature images, and each signature image includes a blind watermark. Among them, the blind watermark can embed the watermark information into the digital media without affecting the original data. The method of adding a blind watermark to the video is to split the video into pictures, and then perform Fourier transform on the pictures, and then use a center-symmetrical method to mark the first watermark signature string.
[0051] In some examples, the video signature method can be applied to a video signature system, such as Figure 2 As shown, the video signature system can obtain the first video M uploaded by the first user A, and use the OpenCV library to read the first video M, and extract n video frames from the first video M to form an image array M j [n]. Call the quantum signature smart contract on the blockchain, use the first watermark signature string R to sign n video frames, and generate n signed images. For example, use the first watermark signature string R to sign the image array M j Each image in [n] is Fourier transformed and signed to generate a blind watermark signature image array S j [n].
[0052] Step 103, replace n video frames in the first video with n signature images to obtain a second video, where the second video is the first video after the video signature is performed.
[0053] In step 103, n video frames in the first video may be replaced with n signature images to obtain a signed second video. The first user may transmit the signed second video to the second user.
[0054] Step 104, upload the identification of the first video and the number of signature images to the blockchain.
[0055] In step 104, the identifier of the first video, such as the name of the first video, and the number n of signature images may be uploaded to the blockchain to facilitate subsequent verification of the integrity of the first video.
[0056] The video signing method provided in the embodiment of the present application can obtain the identity, quantum random number and quantum encryption number of the first user, and upload them to the blockchain, wherein the quantum encryption number is obtained based on the hash operation of the encrypted quantum random number; by calling the signature smart contract on the blockchain, the n video frames in the first video are signed using the first watermark signature string to generate n signature images, each signature image includes a blind watermark, the first watermark signature string is generated based on the identity, the quantum random number and the quantum encryption number, and n is a positive integer; the n video frames in the first video are replaced with n signature images to obtain a second video, and the second video is the video after the first video is video signed; the identifier of the first video and the number of signature images are uploaded to the blockchain.
[0057] In this way, a video signature algorithm based on quantum random numbers is used to blindly watermark the video with quantum random number information, ensuring that the first watermark signature string corresponding to the blind watermark signature of each video is different, ensuring that the verification video cannot be tampered with or forged, and improving the security of the video signature.
[0058] In some examples, by calling the signature smart contract on the blockchain, signing n video frames in the first video using the first watermark signature string, and before generating n signature images, the method may also include:
[0059] The first video uploaded by the first user is read to obtain m video frames, where m is a positive integer and m is greater than n; and n video frames are extracted from the m video frames according to a preset frame number interval.
[0060] In this example, the first video uploaded by the first user can be read to obtain m video frames, where the m video frames can be all video frames of the first video. n video frames can be extracted from the m video frames according to a preset frame number interval. The preset frame number interval can be set according to actual needs and is not specifically limited here.
[0061] Taking the preset frame interval of 10 frames as an example, one picture can be extracted every 10 frames, and n pictures can be extracted to form a picture array M j [n].
[0062] After subsequent signing, n signature images can be obtained to form the signature image array S j [n]. When generating the second video, you can use the signature image array S j The signature image in [n] replaces the corresponding frame in the first video M every 10 frames, and then uses the mmpeg library to synthesize all frames into the signed second video Ms.
[0063] In this way, it is not necessary to sign all video frames. Instead, n video frames can be extracted and signed according to the preset frame interval. This can meet the video integrity verification requirements while reducing the workload of blind watermark verification, saving computing power and improving video verification efficiency.
[0064] In some embodiments, by calling the signature smart contract on the blockchain, the n video frames in the first video are signed using the first watermark signature string, and after generating n signature images, the method further includes:
[0065] For each signature image, the signature smart contract calls the corner detection algorithm and feature descriptor algorithm to extract features and determine the first quantum eigenvalue corresponding to the signature image;
[0066] The signature image and the first quantum eigenvalue corresponding to the signature image are stored in association.
[0067] In this embodiment, for each signature image, the signature smart contract calls the corner detection algorithm and the feature descriptor algorithm to extract features and determine the first quantum eigenvalue corresponding to the signature image. Figure 2 As shown in the figure, the quantum signature smart contract on the blockchain can call the quantum signature calculation module, introduce the corner detection (Features from accelerated segment test, FAST) algorithm and feature descriptor (Binary Robust Independent Elementary Features, BRIEF) algorithm in the feature extraction (Oriented Fast and Rotated Brief, ORB) algorithm library, and perform a quantum signature calculation on the signature image array Sj For each signature image in [n], the first quantum eigenvalue F of each signature image is calculated according to the image-based quantum eigenvalue extraction algorithm. j Each signature image in [n] and its corresponding first quantum eigenvalue F are placed in the image library and stored in association.
[0068] In this way, the video can be blindly watermarked with quantum random number information, ensuring that the first watermark signature string corresponding to the blind watermark signature of each video is different. By comparing the quantum eigenvalues with the signature images stored in the image library, video verification is achieved, ensuring that the verification video cannot be tampered with or forged, thereby improving the security of the video signature.
[0069] In some embodiments, for each signature image, the signature smart contract calls a corner detection algorithm and a feature descriptor algorithm to perform feature extraction and determine the first quantum eigenvalue corresponding to the signature image, including:
[0070] Use corner detection algorithm to detect all key points of the signature image;
[0071] Use feature descriptor algorithm to determine the descriptor of each key point;
[0072] Perform hash operation on the sum of the descriptors of all key points to obtain the hash value;
[0073] The hash value is encrypted according to the first watermark signature character string to obtain a first quantum eigenvalue corresponding to the signature image.
[0074] In this embodiment, if Figure 2 As shown in the figure, for a certain signature image, the FAST algorithm can be used to detect all the key points of the signature image, and then the BRIEF algorithm is used to calculate the 128-bit descriptor of each key point. After all the descriptors are added together, the result is hashed, such as performing sha256 calculation on the sum of the descriptors of all key points to obtain a 256-bit hash value T.
[0075] The first watermark signature string R can be used as the AES key to encrypt the hash value T, obtain the first quantum eigenvalue F of the signature image B based on the image, and put it into the image library.
[0076] The image library is a collection that stores several signature images and their corresponding first quantum eigenvalues. Each signature image has a unique first quantum eigenvalue.
[0077] In some embodiments, by calling the signature smart contract on the blockchain, the n video frames in the first video are signed using the first watermark signature string, and before generating n signature images, the method further includes:
[0078] When the first user's identity, quantum random number, and quantum encryption number are uploaded to the target block on the blockchain, receiving the block height returned by the target block;
[0079] Generate the first watermark signature string based on the block height and quantum encryption number.
[0080] In this embodiment, the identity of the first user A, the quantum random number P, and the quantum encryption number Q can be written into the target block of the blockchain, and the block height Block_HeightQ returned by the target block can be received. The first watermark signature string R can be generated according to the block height and the quantum encryption number. Among them, the first watermark signature string R = string Block_HeightQ + "5GQRT" + string Q.
[0081] In this way, the three signature parameters of the first user can be stored in the blockchain, and then the first watermark signature string can be generated according to the block height and the quantum encryption number, which ensures the randomness and security of the first watermark signature string, reduces the possibility of others forging the watermark, and further ensures the security of the video signature.
[0082] The present application also provides a video signature verification method. Figure 3 As shown, the video signature verification method may include:
[0083] Step 301: when a second video uploaded by a second user is obtained, k signature verification images are extracted from the second video, where the second video is a video after the first video is video-signed, and k is a positive integer.
[0084] In step 301, the second video may be read, and k signature verification images may be extracted from the second video according to the same extraction rules as in the video signing method.
[0085] For example, Figure 2 As shown, the second user B can upload the second video Ms to the video signature system. The OpenCV library can be used to read the second video Ms, and k signature verification pictures can be extracted from the second video Ms. For example, as mentioned above, the same preset frame number interval can be used to extract pictures, one picture is extracted every 10 frames, and k pictures are extracted to form a picture array Ms[k].
[0086] Step 302, by calling the signature verification smart contract on the blockchain, using the identifier of the first video, the number of signature images, the identity identifier of the first user, at least one of the quantum random number and the quantum encryption number, to verify the k signature verification images and obtain a signature verification result;
[0087] Among them, the identification of the first video, the number of signature images, the identity identification, the quantum random number and the quantum encryption number are pre-stored in the blockchain; the quantum encryption number is obtained based on the hash operation of the encrypted quantum random number; the signature image is generated by calling the signature smart contract on the blockchain and signing the n video frames in the first video with the first watermark signature string; the first watermark signature string is generated based on the identity identification, the quantum random number and the quantum encryption number, and n is a positive integer.
[0088] In step 302, the verification smart contract on the blockchain can be called to verify whether the identification of the first video and the number of signature images are consistent with the identification of the second video and the number of verification images. It is also possible to verify whether the second watermark signature string parsed from the verification image matches the first watermark signature string based on the identity of the first user, the quantum random number, and the quantum encryption number, so as to verify whether the third video has been tampered with. The verification result may include a video that has not been signed by the platform, a video that has been signed by the first user, or a video with a tampered signature.
[0089] In this way, a video signature algorithm based on quantum random numbers is used to blindly watermark the video with quantum random number information, ensuring that the first watermark signature string corresponding to the blind watermark signature of each video is different, ensuring that the verification video cannot be tampered with or forged, and improving the security of the video signature.
[0090] In some embodiments, the k signature verification images are verified using at least one of the identifier of the first video, the number of signature images, the identity identifier of the first user, a quantum random number, and a quantum encryption number to obtain a signature verification result, including:
[0091] The identification of the second video is verified using the identification of the first video, and the number of signature images is verified using the number of signature verification images to determine the integrity of the second video.
[0092] In this embodiment, it is possible to verify whether the identification of the first video on the blockchain is consistent with the identification of the second video. In other words, it is possible to verify whether the name of the second video Ms exists on the blockchain. If so, the number n of signature images stored on the blockchain is compared with the number k of signature verification images to determine whether they are consistent, so as to determine the integrity of the second video.
[0093] If they are consistent, it can be considered that the second video is complete and has not been edited. If they are inconsistent, it can be considered that the second video may have been edited, and the signature verification result can be output as a video with a tampered signature.
[0094] In some embodiments, each signature verification image includes a blind watermark, the identifier of the second video is verified using the identifier of the first video, and the number of signature verification images is verified using the number of signature images. After determining the integrity of the second video, the method further includes:
[0095] When the identifier of the first video is consistent with the identifier of the second video and k is equal to n, the second watermark signature string of each signature verification image is extracted according to the blind watermark of each signature verification image by calling the signature verification smart contract on the blockchain;
[0096] According to the identity identifier, quantum random number and quantum encryption number of the first user, the second watermark signature character strings of the k signature verification images are signature verified to obtain a signature verification result.
[0097] In this embodiment, when the identifier of the first video is consistent with the identifier of the second video and k is equal to n, it can be considered that the integrity verification of the second video has passed. At this time, the signature verification smart contract on the blockchain can be called to extract the second watermark signature string of each signature verification image based on the blind watermark of each signature verification image, and perform signature verification on the second watermark signature strings of the k signature verification images based on the identity identifier, quantum random number, and quantum encryption number of the first user to obtain the signature verification result.
[0098] For example, Figure 2 As shown, for each signature verification image, the inverse Fourier transform can be used to extract the second watermark signature string RR. If the second watermark signature string RR cannot be extracted, it can be said that the second video has not been signed by the platform. In this case, the verification result can be output as a video that has not been signed by the platform.
[0099] For each signature verification image, the first watermark signature string generation formula "watermark signature string R = string Block_HeightQ + "5GQRT" + string Q" mentioned above can be used to parse the signature block height Block_HeightQ_RR and the quantum encryption number Q_RR of the signature verification image from the second watermark signature string RR, and find out whether the quantum encryption number Q_RR exists on the block with the block height Block_HeightQ_RR on the blockchain.
[0100] If the block at block height Block_HeightQ_RR has the quantum encryption number Q_RR, the name of the first user A on the block is obtained. If the block at block height Block_HeightQ_RR does not have the quantum encryption number Q_RR, it means that the signature verification result has failed, and the signature verification result can be output as a video of a tampered signature.
[0101] In some embodiments, after performing signature verification on the second watermark signature string of the k signature verification images according to the identity identifier, the quantum random number and the quantum encryption number, and obtaining the signature verification result, the method further includes:
[0102] If the signature verification result is passed, for each signature verification image, the signature verification smart contract calls the corner detection algorithm and feature descriptor algorithm to extract features and determine the second quantum eigenvalue corresponding to each signature verification image;
[0103] For each signature verification image, the second quantum eigenvalue corresponding to the signature verification image is matched with the first quantum eigenvalue corresponding to the n signature images to determine whether the target image exists in the n signature images, and obtain a verification result; wherein the first quantum eigenvalue corresponding to the target image is consistent with the second quantum eigenvalue corresponding to the signature verification image, and the first quantum eigenvalue is determined based on the signature smart contract calling the corner detection algorithm and the feature descriptor algorithm to extract features of each signature image.
[0104] In this embodiment, if the signature verification result passes, Figure 2 As shown, for each signature verification image, the second watermark signature string RR is used, and the second quantum eigenvalue FR is calculated through an image-based quantum eigenvalue extraction algorithm, such as a corner detection algorithm and a feature descriptor algorithm.
[0105] For each signature verification picture, according to its corresponding second quantum eigenvalue FR, search all pictures in the picture library and match them with the first quantum eigenvalues corresponding to the n signature pictures. If there is no target picture corresponding to the first quantum eigenvalue that is consistent with the second quantum eigenvalue corresponding to the signature verification picture, the verification result can be output as a video with a tampered signature. If there is a target picture corresponding to the first quantum eigenvalue that is consistent with the second quantum eigenvalue corresponding to the signature verification picture, the verification result can be output as a video signed by the first user A.
[0106] Based on the video signing method provided in the above embodiment, the present application also provides an embodiment of a video signing device.
[0107] Figure 4 A schematic diagram of the structure of a video signature device provided by another embodiment of the present application is shown. Figure 4 As shown, the video signing apparatus 400 may include:
[0108] An acquisition module 401 is used to acquire the identity of the first user, a quantum random number and a quantum encryption number, and upload them to the blockchain, wherein the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number;
[0109] The signature module 402 is used to sign n video frames in the first video using a first watermark signature string by calling a signature smart contract on the blockchain to generate n signature images, each of which includes a blind watermark, and the first watermark signature string is generated based on the identity, the quantum random number and the quantum encryption number, and n is a positive integer;
[0110] A replacement module 403 is used to replace n video frames in the first video with n signature images to obtain a second video, where the second video is the first video after the video signature is performed;
[0111] The upload module 404 is used to upload the identifier of the first video and the number of signature images to the blockchain.
[0112] In some embodiments, the video signing apparatus 400 may further include:
[0113] A determination module is used to sign n video frames in the first video using a first watermark signature string by calling a signature smart contract on the blockchain, and after generating n signature images, for each signature image, the signature smart contract calls a corner detection algorithm and a feature descriptor algorithm to extract features and determine a first quantum eigenvalue corresponding to the signature image;
[0114] The storage module is used to associate and store the signature image with the first quantum eigenvalue corresponding to the signature image.
[0115] In some embodiments, the determination module may also be used to:
[0116] Use corner detection algorithm to detect all key points of the signature image;
[0117] Use feature descriptor algorithm to determine the descriptor of each key point;
[0118] Perform hash operation on the sum of the descriptors of all key points to obtain the hash value;
[0119] The hash value is encrypted according to the first watermark signature character string to obtain a first quantum eigenvalue corresponding to the signature image.
[0120] In some embodiments, the video signing apparatus 400 may further include:
[0121] A receiving module is used to sign n video frames in the first video using a first watermark signature string by calling a signature smart contract on the blockchain, and before generating n signature images, when the identity identifier, quantum random number and quantum encryption number of the first user are uploaded to the target block on the blockchain, receive the block height returned by the target block;
[0122] The generation module is used to generate a first watermark signature string according to the block height and the quantum encryption number.
[0123] Based on the video signature verification method provided in the above embodiment, the present application also provides an embodiment of a video signature verification device.
[0124] Figure 5 FIG. 4 shows a schematic diagram of the structure of a video signature verification device provided by another embodiment of the present application. Figure 5 As shown, the video signature verification device 500 may include:
[0125] The extraction module 501 is used to extract k signature verification images from the second video when a second video uploaded by a second user is obtained, where the second video is a video after the first video is video-signed, and k is a positive integer;
[0126] The signature verification module 502 is used to verify the k signature verification images by calling the signature verification smart contract on the blockchain, using the identifier of the first video, the number of signature images, the identity identifier of the first user, the quantum random number, and the quantum encryption number to obtain a signature verification result;
[0127] Among them, the identification of the first video, the number of signature images, the identity identification, the quantum random number and the quantum encryption number are pre-stored in the blockchain; the quantum encryption number is obtained based on the hash operation of the encrypted quantum random number; the signature image is generated by calling the signature smart contract on the blockchain and signing the n video frames in the first video with the first watermark signature string; the first watermark signature string is generated based on the identity identification, the quantum random number and the quantum encryption number, and n is a positive integer.
[0128] In some embodiments, the signature verification module 502 may also be used to:
[0129] The identification of the second video is verified using the identification of the first video, and the number of signature images is verified using the number of signature verification images to determine the integrity of the second video.
[0130] In some embodiments, the signature verification module 502 may also be used to:
[0131] When the identifier of the first video is consistent with the identifier of the second video and k is equal to n, the second watermark signature string of each signature verification image is extracted according to the blind watermark of each signature verification image by calling the signature verification smart contract on the blockchain;
[0132] According to the identity identifier, quantum random number and quantum encryption number, the second watermark signature character string of k signature verification images is signature verified to obtain the signature verification result.
[0133] In some embodiments, the signature verification module 502 may also be used to:
[0134] If the signature verification result is passed, for each signature verification image, the signature verification smart contract calls the corner detection algorithm and feature descriptor algorithm to extract features and determine the second quantum eigenvalue corresponding to each signature verification image;
[0135] For each signature verification image, the second quantum eigenvalue corresponding to the signature verification image is matched with the first quantum eigenvalue corresponding to the n signature images to determine whether the target image exists in the n signature images, and obtain a verification result; wherein the first quantum eigenvalue corresponding to the target image is consistent with the second quantum eigenvalue corresponding to the signature verification image, and the first quantum eigenvalue is determined based on the signature smart contract calling the corner detection algorithm and the feature descriptor algorithm to extract features of each signature image.
[0136] The embodiment of the present application also provides a video signature system, including:
[0137] At least one of the above-mentioned video signing device and the above-mentioned video signature verification device.
[0138] It should be noted that the above-mentioned video signature system and the video signature method and video signature verification method of the method embodiment of the present application are based on the same concept. All implementation methods in the above-mentioned video signature method and video signature verification method embodiments are applicable to the embodiments of the system. Their specific functions and technical effects can be found in the system embodiment part and will not be repeated here.
[0139] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in yet another embodiment of the present application is shown.
[0140] The device may include a processor 601 and a memory 602 storing programs or instructions.
[0141] When the processor 601 executes the program, the steps in any of the above method embodiments are implemented.
[0142] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.
[0143] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0144] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.
[0145] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) machine-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0146] The processor 601 implements any one of the methods in the above embodiments by reading and executing the program or instruction stored in the memory 602 .
[0147] In one example, the electronic device may further include a communication interface 603 and a bus 604. The processor 601, the memory 602, and the communication interface 603 are connected via the bus 604 and communicate with each other.
[0148] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0149] Bus 604 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 604 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0150] In addition, in combination with the method in the above embodiment, the embodiment of the present application may provide a machine-readable storage medium for implementation. The machine-readable storage medium stores a program or instruction; when the program or instruction is executed by a processor, any one of the methods in the above embodiment is implemented. The machine-readable storage medium can be read by a machine such as a computer.
[0151] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0152] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0153] An embodiment of the present application provides a computer program product, which is stored in a machine-readable storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0154] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0155] The functional modules shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0156] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0157] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by a computer program or instruction. These programs or instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0158] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A video signing method, characterized in that: include: Obtaining the identity of the first user, a quantum random number, and a quantum encryption number, and uploading them to the blockchain, wherein the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number; By calling the signature smart contract on the blockchain, n video frames in the first video are signed using a first watermark signature string to generate n signature images, each signature image including a blind watermark, the first watermark signature string is generated based on the identity, the quantum random number and the quantum encryption number, and n is a positive integer; The n video frames in the first video are replaced with the n signature images to obtain a second video, where the second video is a video after the first video is video-signed; The identifier of the first video and the number of the signature images are uploaded to the blockchain.
2. The method according to claim 1, characterized in that After calling the signature smart contract on the blockchain to sign the n video frames in the first video using the first watermark signature string and generating n signature images, the method further includes: For each signature image, the signature smart contract calls the corner detection algorithm and the feature descriptor algorithm to extract features and determine the first quantum eigenvalue corresponding to the signature image; The signature image and the first quantum eigenvalue corresponding to the signature image are stored in association.
3. The method according to claim 2, characterized in that For each signature image, the signature smart contract calls a corner detection algorithm and a feature descriptor algorithm to extract features and determines the first quantum eigenvalue corresponding to the signature image, including: Using the corner point detection algorithm to detect all key points of the signature image; Use feature descriptor algorithm to determine the descriptor of each key point; Perform hash operation on the sum of the descriptors of all key points to obtain the hash value; The hash value is encrypted according to the first watermark signature character string to obtain a first quantum eigenvalue corresponding to the signature image.
4. The method according to claim 1, characterized in that Before calling the signature smart contract on the blockchain to sign the n video frames in the first video using the first watermark signature string and generating n signature images, the method further includes: When the identity of the first user, the quantum random number, and the quantum encryption number are uploaded to the target block on the blockchain, receiving the block height returned by the target block; The first watermark signature string is generated according to the block height and the quantum encryption number.
5. A video signature verification method, characterized in that: include: When a second video uploaded by a second user is obtained, k signature verification images are extracted from the second video, where the second video is a video after the first video is video-signed, and k is a positive integer; By calling the signature verification smart contract on the blockchain, the k signature verification images are verified using the identifier of the first video, the number of signature images, the identity identifier of the first user, the quantum random number, and the quantum encryption number to obtain a signature verification result; Among them, the identifier of the first video, the number of the signature images, the identity identifier, the quantum random number and the quantum encryption number are pre-stored in the blockchain; the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number; the signature image is generated by calling the signature smart contract on the blockchain and signing n video frames in the first video with a first watermark signature string; the first watermark signature string is generated based on the identity identifier, the quantum random number and the quantum encryption number, and n is a positive integer.
6. The method according to claim 5, characterized in that The step of using the identifier of the first video, the number of signature images, the identity identifier of the first user, at least one of a quantum random number and a quantum encryption number to verify the k signature verification images to obtain a signature verification result includes: The identification of the second video is verified using the identification of the first video, and the number of the signature images is verified using the number of the signature verification images to determine the integrity of the second video.
7. The method according to claim 6, characterized in that Each signature verification image includes a blind watermark, the identification of the second video is verified by using the identification of the first video, and the number of the signature images is verified by using the number of the signature images. After determining the integrity of the second video, the method further includes: When the identifier of the first video is consistent with the identifier of the second video and k is equal to n, extract the second watermark signature string of each signature verification image according to the blind watermark of each signature verification image by calling the signature verification smart contract on the blockchain; According to the identity identifier, the quantum random number and the quantum encryption number, the second watermark signature character strings of the k signature verification images are signature verified to obtain a signature verification result.
8. The method according to claim 7, characterized in that After performing signature verification on the second watermark signature character strings of the k signature verification images according to the identity identifier, the quantum random number and the quantum encryption number, and obtaining the signature verification result, the method further includes: When the signature verification result is passed, for each signature verification image, the signature verification smart contract calls the corner detection algorithm and the feature descriptor algorithm to extract features and determine the second quantum eigenvalue corresponding to each signature verification image; For each of the signature verification images, the second quantum eigenvalue corresponding to the signature verification image is matched with the first quantum eigenvalue corresponding to the n signature images to determine whether a target image exists in the n signature images, and obtain a verification result; wherein the first quantum eigenvalue corresponding to the target image is consistent with the second quantum eigenvalue corresponding to the signature verification image, and the first quantum eigenvalue is determined based on the signature smart contract calling the corner detection algorithm and the feature descriptor algorithm to perform feature extraction on each of the signature images.
9. A video signature device, characterized in that: include: An acquisition module, used to acquire the identity of the first user, a quantum random number and a quantum encryption number, and upload them to the blockchain, wherein the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number; A signature module, configured to sign n video frames in a first video using a first watermark signature string by calling a signature smart contract on the blockchain, and generate n signature images, each of which includes a blind watermark, wherein the first watermark signature string is generated based on the identity, the quantum random number, and the quantum encryption number, and n is a positive integer; A replacement module, used for replacing the n video frames in the first video with the n signature images to obtain a second video, where the second video is the first video after the video signature is performed; An uploading module is used to upload the identifier of the first video and the number of the signature images to the blockchain.
10. A video signature verification device, characterized in that: include: An extraction module, configured to extract k signature verification images from a second video uploaded by a second user when acquiring the second video, wherein the second video is a video after the first video is video-signed, and k is a positive integer; A signature verification module, configured to verify the k signature verification images by calling a signature verification smart contract on the blockchain, using at least one of the identifier of the first video, the number of signature images, the identity identifier of the first user, a quantum random number, and a quantum encryption number, to obtain a signature verification result; Among them, the identifier of the first video, the number of the signature images, the identity identifier, the quantum random number and the quantum encryption number are pre-stored in the blockchain; the quantum encryption number is obtained based on a hash operation on the encrypted quantum random number; the signature image is generated by calling the signature smart contract on the blockchain and signing n video frames in the first video with a first watermark signature string; the first watermark signature string is generated based on the identity identifier, the quantum random number and the quantum encryption number, and n is a positive integer.
11. A video signature system, characterized in that: include: At least one of the video signing device according to claim 9 and the video signature verification device according to claim 10.
12. An electronic device, characterized in that: The electronic device comprises: A processor and a memory storing programs or instructions; When the processor executes the program or the instruction, the method according to any one of claims 1 to 4 or the method according to any one of claims 5 to 8 is implemented.
13. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the method according to any one of claims 1 to 4 or the method according to any one of claims 5 to 8 is implemented.
14. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method according to any one of claims 1 to 4, or the method according to any one of claims 5 to 8.
Citation Information
Patent Citations
Ethereum intelligent contract electronic signature system and method based on block chain
CN111355592A
Electronic contract signature method based on block chain
CN114614990A
Tamper-proof electronic contract signing method based on block chain technology
CN116644479A
Blockchain-based system for analyzing and tracking work performance
US20200311646A1
Cited By
Quantum video anti-counterfeiting signature system, terminal, chip and method for real-time quantum random number stream
CN122027141A
