A method and device for video traceability and security verification
By encrypting and hashing video metadata on the blockchain network, and combining smart contracts and off-chain video steganography technology, the single node attack problem of centralized services in traditional video steganography is solved, and the security and traceability of video are improved.
Patent Information
- Application Number
- CN202310086417.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-07
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-02-07
AI Technical Summary
Traditional video steganography technology has a single node attack problem caused by centralized services, resulting in poor security verification and traceability effects.
The video metadata is encrypted and hashed by blockchain technology, uploading the video metadata to the blockchain network through smart contracts, realizing video traceability and security verification, and combining off-chain video steganography technology for dual security verification.
It improves the security and immutability of video steganography, enhances video copyright protection and traceability capabilities, solves the single point of failure problem of centralized services, and realizes decentralized video security verification and traceability.
Smart Images

Figure CN116132715B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video security technology, and in particular to a method and device for video source tracing and security verification. Background Art
[0002] As online video applications, such as online classes, online meetings, and online live broadcasts, become increasingly common, video security becomes increasingly important.
[0003] Among various video security processing technologies, video steganography is undoubtedly the most promising and highly secure technology. It can effectively solve hot security issues such as video copyright protection, video secret communication, video tracking and tracing caused by illegal video dissemination, piracy, video reprocessing, and remixing.
[0004] However, the centralized services in traditional video steganography may lead to single-node attacks, resulting in poor security verification and traceability. Summary of the Invention
[0005] The present invention provides a method, device, electronic device and storage medium for video source tracing and security verification, which are used to solve the defects of poor security verification and source tracing effects in the prior art.
[0006] In a first aspect, the present invention provides a method for video traceability and security verification, comprising: encrypting secret information of a target video to obtain encrypted secret information; embedding the secret information into the target video using video steganography technology to construct a carrier video, and obtaining a video hash value of the carrier video; constructing video metadata based on the encrypted secret information, the video hash value, and video copyright information; uploading the video metadata to a blockchain network, and performing traceability and security verification on the target video based on the blockchain network. According to a method for video traceability and security verification provided by the present invention, obtaining the video hash value of the carrier video comprises: performing a cryptographic hash operation on the carrier video using the SHA256 algorithm to obtain the video hash value.
[0007] According to a method for video traceability and security verification provided by the present invention, the video metadata is uploaded to a blockchain network, and based on the blockchain network, the target video is traced and security verified, including: using the upload function of the smart contract to upload the video metadata to the blockchain network to form on-chain video metadata; using the access function of the smart contract to obtain the on-chain video metadata of the target video from the blockchain network to trace the target video and security verify the target video.
[0008] According to a method for video traceability and security verification provided by the present invention, after using video steganography technology to embed the secret information into the target video and construct a carrier video, the method also includes: extracting private information from the carrier video as off-chain private information; obtaining on-chain video metadata of the target video from the blockchain network; and performing double security verification on the target video based on the off-chain private information and the on-chain video metadata.
[0009] According to a method for video traceability and security verification provided by the present invention, the method utilizes an upload function of a smart contract to upload the video metadata to a blockchain network to form on-chain video metadata, including: obtaining the current account address balance of the current account uploading the video metadata; and executing the upload function to upload the video metadata to the blockchain network when the current account address balance supports uploading the uploaded video metadata to the blockchain network to form on-chain video metadata.
[0010] According to a method for video traceability and security verification provided by the present invention, the on-chain video metadata of the target video is obtained from the blockchain network, including: when it is determined that the current account has uploaded video metadata, using an access function to obtain all on-chain video metadata corresponding to the current account; and according to a pre-set identification tag of the target video, determining the on-chain video metadata of the target video from all on-chain video metadata.
[0011] According to a method for video tracing and security verification provided by the present invention, the on-chain video metadata of the target video is obtained from the blockchain network to trace the source and security verification of the target video, including: obtaining the video copyright information of the target video from the on-chain video metadata to trace the source of the target video; obtaining the video hash value of the carrier video from the on-chain video metadata to perform integrity verification on the target video; obtaining the encrypted secret information of the target video from the on-chain video metadata to perform security verification on the target video.
[0012] In a second aspect, the present invention further provides a device for video source tracing and security verification, comprising:
[0013] The first module is used to encrypt the secret information of the target video to obtain the encrypted secret information;
[0014] The second module is used to embed the secret information into the target video using video steganography technology, construct a carrier video, and obtain a video hash value of the carrier video;
[0015] A third module is used to construct video metadata according to the encrypted secret information, the video hash value and the video copyright information;
[0016] The fourth module is used to upload the video metadata to the blockchain network and trace the source and perform security verification on the target video based on the blockchain network.
[0017] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the steps of the method for video tracing and security verification as described in any one of the above are implemented.
[0018] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for video tracing and security verification.
[0019] The method and device for video traceability and security verification provided by this invention utilize blockchain technology to upload video metadata to the blockchain, thereby enhancing the tamper-proof and unforgeable security of video steganography. Furthermore, by utilizing off-chain video steganography calls and execution, on-chain and off-chain collaborative operations enhance the security protection of secret information through video steganography and expand the application scope of existing blockchain technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 Schematic diagram of the process of video source tracing and security verification provided by the present invention;
[0022] Figure 2 It is a schematic diagram of the process of defining video metadata provided by the present invention;
[0023] Figure 3 This is a schematic diagram of the design of the data interaction interface between the Express service node and the blockchain network provided by the present invention;
[0024] Figure 4 This is a flow chart of the on-chain execution and query of video metadata provided by the present invention;
[0025] Figure 5 This is a schematic diagram of the process of calling video steganography dual protection on-chain and off-chain provided by the present invention;
[0026] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0028] It should be noted that, in the description of the embodiments of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising 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 apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0029] With the rapid development of blockchain-based currencies like Bitcoin and Ethereum, decentralized applications based on blockchain technology are gaining increasing attention. Blockchain technology enhances network security by leveraging cryptography to ensure user privacy, hashing and timestamp mechanisms to ensure the immutability and traceability of transaction information, and a decentralized architecture to mitigate the vulnerability of traditional server core nodes to attacks. Therefore, utilizing blockchain technology to improve traditional network security, particularly video security, holds significant research value.
[0030] This invention, building on the foundation of blockchain technology, applies the increasingly mature video steganography technology to blockchain systems. This technology, while enhancing the existing blockchain technology's security features, uses cryptography, hashing, and timestamps to ensure that blockchain data is tamper-proof and unforgeable. Combined with information hiding techniques, this technology provides more specific and accurate copyright protection for blockchain-based digital videos, focusing on content-based security for personal privacy data and secret communications, rather than simply traditional encryption. Furthermore, it improves and expands the research depth and application scope of existing video steganography network security technologies. Leveraging cutting-edge blockchain technology, existing video steganography technology is no longer limited to conventional applications such as copyright privacy protection for digital works on the traditional internet and centralized servers, as well as secret communications. This technology further expands research depth and effectively applies it to a variety of current and future blockchain application scenarios, including finance, government, and auditing. This enhances the depth of video steganography security protection and expands its application scope in blockchain scenarios.
[0031] Based on this, the present invention provides a method and apparatus for video source tracing and security verification, wherein the method includes but is not limited to the following steps:
[0032] Step 1: Encrypt the secret information of the target video to obtain the encrypted secret information. The secret information can be ordinary text, or a small picture or video.
[0033] Since data in blockchain networks is open and transparent, to ensure the security of video secrets, the secret information needs to be encrypted when the video metadata is uploaded to the chain. The encryption and decryption keys can be stored in a MongoDB database.
[0034] Step 2: Use video steganography technology to embed the secret information into the target video, construct a carrier video, and obtain the video hash value of the carrier video.
[0035] In order to ensure the integrity and non-tamperability of the carrier video (i.e., the encrypted video), it is necessary to perform a hash operation on the encrypted video, and the hash is performed using SHA256.
[0036] Step 3: Construct video metadata based on the encrypted secret information, video hash value, and video copyright information.
[0037] Step 4: Upload the video metadata to the blockchain network, and perform source tracing and security verification on the target video based on the blockchain network.
[0038] The present invention utilizes blockchain technology to upload video metadata to the chain, thereby improving the security performance of video steganography, which cannot be tampered with or forged.
[0039] The following combination Figures 1-6 The present invention describes a method and apparatus for video source tracing and security verification provided by an embodiment of the present invention.
[0040] Figure 1 This is a flow chart of the video metadata upload process provided by the present invention. Figure 1 , which is divided into four parts to explain the steps of uploading video metadata to the chain.
[0041] Part 1: Construction of video metadata to be uploaded to the chain
[0042] Based on the content in the above embodiment, the content of video metadata includes but is not limited to encrypted secret information, video hash value, and video copyright information. The video copyright information includes but is not limited to the video author's profile, work title, work category, signature, completion date, whether it is published, date and location, and the form of completion of the work.
[0043] Figure 2 This is a flow chart of defining video metadata provided by the present invention, referring to Figure 2 As shown, the main purpose of defining the video metadata to be on the chain is to determine which data related to the target video needs to be solidified in the blockchain network. Since the target video file itself is extremely large, it is unrealistic to store all the target videos in the blockchain network. Therefore, the present invention needs to pre-define the video metadata for subsequent verification and traceability. It is understandable that video metadata refers to the key data used for security verification and traceability of the target video, generally including video file name, attribution author, video hash value, secret information and other data. The defined video metadata will all be solidified in the blockchain network.
[0044] Therefore, it is necessary to ensure that the secret information cannot be read and known by malicious nodes; the hash operation on the carrier video is to ensure the integrity of the confidential video and to verify whether the carrier video has been changed.
[0045] Since data in a blockchain network is public and transparent, any node in the network can access it. To ensure the security of the target video's secret information and prevent it from being read by malicious nodes, the secret information needs to be encrypted when the video metadata is uploaded to the chain. Optionally, the encryption and decryption keys can be stored in a MongoDB database.
[0046] Furthermore, to ensure the integrity and tamper-proof nature of the encrypted video, a hash operation is performed on the encrypted video using SHA256. The hashing of the carrier video is performed to ensure the integrity of the encrypted video and to verify whether the encrypted video has been altered.
[0047] After the hash is completed, the above video hash value, encrypted secret information, video file name and author information are defined as the video metadata to be uploaded to the chain.
[0048] Based on the content of the above embodiment, as an optional embodiment, the present invention uploads the video metadata to the blockchain network, and based on the blockchain network, traces the source and performs security verification on the target video, including: using the upload function of the smart contract to upload the video metadata to the blockchain network to form on-chain video metadata; using the access function of the smart contract to obtain the on-chain video metadata of the target video from the blockchain network to trace the source and perform security verification on the target video. The following is an explanation of the contents of the second and third parts. It can be understood that the on-chain video metadata is the video metadata obtained from the blockchain network.
[0049] Part 2: Writing, compiling and deploying smart contracts
[0050] The functions of the smart contract in this invention mainly include the following three functions: structural definition of video metadata to be uploaded to the blockchain, uploading video metadata to the blockchain network, and querying the content of video metadata in the blockchain network.
[0051] Since user accounts in the blockchain network exist in the form of addresses, and since a user may upload video metadata for multiple target videos, we need to establish an association between addresses and multiple target videos. At the same time, the data contained in a target video should be consistent with the definition of video metadata in the first part above. Therefore, this invention defines the data structure of video metadata for a single target video as shown in Formula 1:
[0052]
[0053] In formula (1), the variables name, author, data, and hashdata refer to the video name, video author, encrypted secret information, and encrypted video hash value (i.e., video hash value) defined in the first part, respectively.
[0054] It should be noted that if the business needs are complex, the data structure of the video metadata on a single chain can also be expanded with corresponding member attributes. However, it should be considered that as the member attributes or content volume increase, the token price required to be paid when uploading to the blockchain network will also increase. Therefore, a balance needs to be struck between the video metadata entries and the cost.
[0055] The association between a single user and multiple videos can be described by the following formula 2, where the member addr_videos represents the video group formed by multiple videos associated with the current user.
[0056]
[0057] The mapping between the user account and the uploaded video metadata can be described by Formula 3, where mappingarrayvideo identifies the association established between the user address and multiple uploaded videos.
[0058] mapping(address=>addr_video) arrayvideo; (3)
[0059] Uploading video metadata to the blockchain network is achieved by adding the uploaded video metadata to the array video_define. Since video_define is a member attribute, it can be solidified in the blockchain network. Formula 4 describes a general video chain function:
[0060] arrayvideo[address].arr_videos.push(name,author,data,hashdata);(4)
[0061] The present invention obtains the video metadata uploaded to the blockchain network through the query function (i.e., access function) interface of the smart contract. Since the query operation does not change the existing records in the blockchain network, it does not cost any tokens. The query operation is shown in Formula 5:
[0062] return(arrayvideo[address].addr_videos[num].name,...)(5)
[0063] Where num identifies the video metadata of the i-th target video of the current account.
[0064] Smart contracts are compiled and deployed using the Truffle tool. The Truffle framework compiles, links, and deploys the previously written smart contracts to the running blockchain network. The compilation and deployment commands are trufflecompile and trufflemigrate.
[0065] Part 3: Blockchain network operation and blockchain network data interaction interface design
[0066] The operation of the blockchain network requires the Express server to participate in the blockchain network as a node. In this invention, Ganache is selected as a blockchain network that can be triggered and started quickly with one click. Figure 3 This is a schematic diagram of the design of the Express service node and blockchain network data interaction interface provided by the present invention. Figure 3 Explain it.
[0067] The design of the data interaction interface between the Express service node and the blockchain network mainly includes the following aspects: configuring the Web3 interface network parameters, using the Web3 interface to obtain relevant attributes such as the account address and balance in the blockchain network, obtaining the ABI bytecode and address of the deployed on-chain smart contract, and calling the upload and access functions related to the on-chain smart contract. Specifically, the steps in this section are as follows:
[0068] 3.1. Configure Web3 interface network parameters
[0069] The purpose of configuring the network parameters of the Web3 interface is to establish data exchange between the Express service node and the underlying blockchain network in the programming space. The network ID of the Web3 package should be the same as the underlying blockchain network ID to correctly establish the association between the blockchain network and the service node. For example, if the underlying blockchain network ID is http: / / localhost:7545, then the Web3 configuration parameters should be set as follows:
[0070] let Web3 = require("web3");
[0071] let web3=new Web3(new Web3.providers.HttpProvider("http: / / localhost:7545"));
[0072] 3.2. Using the Web3 interface to obtain blockchain network attributes
[0073] It's particularly important to use the Web3 interface to obtain information such as the address and balance of the current account in the blockchain network from the service node. Because calling smart contract functions to add video metadata to the blockchain network modifies existing data in the blockchain network, it incurs a token fee. Before calling the relevant upload functions, you must ensure that the current account address has sufficient tokens to pay the miner's packaging fees. Furthermore, transferring tokens also requires the ability to obtain or change the balance information of different account addresses.
[0074] Optionally, the uploading function of the smart contract is used to upload the video metadata to the blockchain network to form on-chain video metadata, including: obtaining the current account address balance of the current account uploading the video metadata; when the current account address balance supports uploading the uploaded video metadata to the blockchain network, executing the upload function to upload the video metadata to the blockchain network to form on-chain video metadata.
[0075] The current account address is obtained through the getAccounts function in Web3, as shown below:
[0076] const accounts=await web3.eth.getAccounts();
[0077] The getAccounts function returns a list of accounts available in the current service node. The getBalance function is used to obtain the current account address balance. Assuming the current account address is account, the balance of the current account address is obtained using the following formula:
[0078] let balance=await web3.eth.getBalance(account);
[0079] In the token transfer process, if the sender's account address is sender, the receiver's account address is receiver, and the amount of tokens transferred is value, the specific transfer process can be described by the following formula, where the transfer mainly utilizes the sendTransaction function.
[0080]
[0081] 3.3. Get the deployed smart contract abi bytecode and address
[0082] The purpose of obtaining the ABI bytecode and address of the deployed on-chain smart contract is to enable the modification and query of video metadata in the blockchain network through the upload and access functions of the on-chain smart contract in the service node. Multiple deployed smart contracts are distinguished in the service node by their ABI bytecode and deployment address. First, we need to obtain the JSON file of the on-chain smart contract that has been compiled using the Truffle tool. It contains information such as the ABI bytecode of the on-chain smart contract. Assuming that the currently compiled on-chain smart contract is located in .. / .. / build / contracts / metadatasend.json, the compiled on-chain smart contract JSON file can be obtained using the following formula:
[0083] var metasendArtifact = require(".. / .. / build / contracts / metadatasend.json") After obtaining the compiled smart contract json file, the present invention needs to obtain the deployed smart contract address.
[0084] To obtain the address of a deployed smart contract, you first need to obtain the current blockchain network ID through the web3 net module. Furthermore, the address of the deployed smart contract can be obtained by combining the on-chain smart contract JSON file and the blockchain network ID. The ABI bytecode and address of the entire deployed on-chain smart contract can be obtained using the following formula:
[0085]
[0086] Among them, deployedNetwork identifies the smart contract that has been deployed in the current blockchain network. It is mainly obtained through the blockchain network ID and the smart contract json file, as shown below:
[0087] const networkId=await web3.eth.net.getId();
[0088] const deployedNetwork=metasendArtifact.networks[networdId];
[0089] 3.4. Design of upload and access functions of smart contracts
[0090] The design of the smart contract's upload and access functions is one of the core points of this invention. The problem it aims to solve is how to call the upload and access interface functions of the deployed smart contract through the web3 interface in the service node, ultimately realizing the upload and solidification of video metadata in the blockchain network and the access to video metadata already stored in the blockchain.
[0091] The upload function in the service node is designed to be implemented by calling the function for uploading video metadata in the deployed smart contract. Before calling, the account address of the calling contract needs to be specified, assuming it is account. Assuming the function for uploading video metadata is sendMetaData, the uploaded video metadata is passed in the form of parameters, where name represents the video name, metadata represents the video secret information, author represents the video author, and hashdata represents the video hash value. The core module of the upload function can be obtained by the following formula:
[0092] let result=await sendMetaData(account,name,author,
[0093] metadata,hashdata).send({from account,gas:3000000});
[0094] In the above formula, result is the return value of the sendMetaData function, which includes the transaction hash, block hash, and packaged block number. The gas value is the token value pre-defined by the calling account to implement the transaction. To obtain the transaction hash from the upload function in the service node, use the transactionHash property of the return value result. The block hash and packaged block number can be obtained through the blockHassh and blockNumber properties of result.
[0095] Similarly, the design of the function for accessing existing video metadata in the blockchain network is basically similar to that for uploading. It is also implemented by calling the function for accessing video metadata in the deployed smart contract. Before calling, it is necessary to specify the account address that calls this contract function interface, assuming it is account. Assuming that the function for accessing video metadata is getMetaData, and the account address account is passed as a parameter, the core module of the access function can be obtained by the following formula:
[0096] let result=await getMetaData(account).call()
[0097] In this formula, result is the return value of the getMetaData function, which includes the video file name, author, encrypted secret information, and video hash value of the obtained on-chain video metadata. Its list corresponds one-to-one with formula (5) in the previous smart contract design.
[0098] Part 4: Execution and query of video metadata on-chain transactions
[0099] The execution and query of video metadata on-chain transactions are mainly completed on the service node side, including the transmission of client-side video and its metadata, and the encapsulation of server-side video and video metadata. Figure 4 This is a flow chart of the video metadata chain execution and query provided by the present invention. Figure 4 Describe its process.
[0100] The client can select either a customized local video or a pushed sample video, with resolutions ranging from 176x144 to 1920x1080. Video metadata is uploaded to the server in the form of a form, where secret information can be ordinary text or small images or videos. In addition to encrypted secret information, video metadata can also include video names, author information, etc. for video copyright protection or traceability. The design of video metadata can be added or deleted according to business function requirements. The target video and video metadata selected by the client are transmitted to the service node via a POST request.
[0101] As an optional embodiment, after the custom selected video file is transmitted from the client to the service node via a POST request, the present invention uses the SHA256 hash algorithm to perform a cryptographic hash operation on the carrier video of the custom local video. If the selected sample video is a sample video, since the sample video is stored on the service node, the SHA256 hash algorithm can be used to perform a cryptographic hash operation on the loaded video of the sample video after the selection entry information is transmitted to the service node. Assuming that the video file data stream is data, the video hash operation can be calculated as follows:
[0102] const crypto=require("crypto");
[0103] const fsHash=crypto.createHash("sha256");
[0104] fsHash.update(data);
[0105] const Hashdata=fsHash.digest("hex");
[0106] Hashdata represents the hash value of the video file. Video metadata encapsulation involves packaging the required data, such as the video file name, video attribution, video hash value, and video secret information, sent by the client into a video on-chain object. This data is then used to call the upload function in the service node. To prevent access by unauthorized nodes in the blockchain network, the video secret information must be encrypted in the service node and packaged into the video on-chain object in ciphertext. Information such as the video file's storage path, video file stream classification, video duration, and frame rate can be stored in a MongoDB database to facilitate subsequent off-chain video steganographic verification modules.
[0107] The call and parameter passing of the upload and access functions in the service node are the key contents of this part of the design. First, it is necessary to check the compliance of the user's current account in the current service node.
[0108] Optionally, the on-chain video metadata of the target video is obtained from the blockchain network using the access function of the smart contract, including: when it is determined that the current account has uploaded video metadata, using the access function to obtain all on-chain video metadata corresponding to the current account; and determining the on-chain video metadata of the target video from all on-chain video metadata based on a pre-set identification tag of the target video.
[0109] It is understandable that the identification tag of the target video may be the serial number of the target video, such as the i-th target video, and the corresponding identification tag is i.
[0110] Specifically, if uploading video metadata, you must ensure that the user account address exists in the blockchain network and has sufficient balance to cover the current on-chain operation. It should be noted that the larger the volume of video metadata to be uploaded, the greater the cost. If querying video metadata, you need to check the calling user account to determine whether the current account has previously uploaded video metadata to the blockchain network. Assuming the current user account is account, the pseudo code that implements its logical function is as follows:
[0111] if (upload video metadata) {
[0112] Check the current account address balance;
[0113] }else(query video metadata){
[0114] Check whether the current account has uploaded video metadata;
[0115] }
[0116] After completing the compliance check for the current account, the upload function and query function (i.e., access function) in the service node are called and parameter passed according to the following logic:
[0117] If the upload function is called, assuming that the packaged video upload object is object and the upload function is sendmetadata, the call is performed as follows:
[0118]
[0119] The result here is the feedback result after uploading the video metadata.
[0120] If the query function is called, you need to first obtain the number of times the current account has uploaded video metadata, and then traverse the uploaded video metadata content in sequence. Assume that the number of times the current account has uploaded video metadata is count, the current account address is account, the query function is getMetaData, and result here is the query result. The call format is as follows:
[0121]
[0122] Based on the content of the above embodiment, as an optional embodiment, the method for video traceability and security verification provided by the present invention, after using video steganography technology to embed the secret information into the target video and construct a carrier video, also includes: extracting private information from the carrier video as off-chain private information; obtaining on-chain video metadata of the target video from the blockchain network; and performing double security verification on the target video based on the off-chain private information and the on-chain video metadata.
[0123] The method for implementing dual protection of on-chain and off-chain video steganography provided by the present invention is a supplement to the above-mentioned blockchain-based video steganography and traceability method (i.e., the above-mentioned method for video traceability and security verification). Its purpose is to upload video metadata on the blockchain for applications such as traceability, copyright protection, and video integrity verification, and to simultaneously use the secret information embedded in the carrier video to achieve the purpose of dual verification of private information of the target video on and off the chain.
[0124] It can be understood that obtaining the on-chain video metadata of the target video from the blockchain network to trace the source and security verification of the target video includes: obtaining the video copyright information of the target video from the on-chain video metadata to trace the source of the target video; obtaining the video hash value of the carrier video from the on-chain video metadata to perform integrity verification on the target video; obtaining the encrypted secret information of the target video from the on-chain video metadata to perform security verification on the target video.
[0125] In addition, the present invention can also combine the secret information extracted from the carrier video to perform double verification on the target video. Figure 5 Provide explanation.
[0126] Figure 5 This is a flowchart of the dual protection of video steganography on-chain and off-chain provided by the present invention. Figure 5 Briefly describe the two-factor authentication process.
[0127] Compared to the blockchain-based video steganography and traceability method described above, the dual protection of on-chain and off-chain video steganography adds two modules to the Express server: a video steganography embedding and extraction program, and on-chain and off-chain dual verification. Video steganography embedding occurs before calling the relevant smart contract functions. This means that the video hash value in the video metadata should be the hash value of the target video. The rest of the process is the same as described above, namely, uploading the defined video metadata to the chain.
[0128] In the future, when there is a need to track and trace the copyright information of videos or the dissemination of videos, the present invention can, on the one hand, call the video steganography extraction module inside the service node to extract the secret information of the corresponding carrier video; on the other hand, it can obtain the encrypted secret information or copyright information such as the author from the blockchain network through the call of the smart contract access function. The comparison between the two can achieve the dual verification effect of on-chain and off-chain video metadata. It should be noted that the decryption key of the secret information is required for the dual verification on-chain and off-chain.
[0129] In summary, the present invention discloses a method for video traceability and security verification. First, the standard data structure for video metadata on the chain and the writing, compilation, and deployment of related smart contracts are defined; then, the video metadata is uploaded to the blockchain by calling a development interface (such as Ethereum's RPC interface) and solidified in the blockchain network, forming a permanent, tamper-proof, and traceable video metadata on the chain mechanism; finally, the on-chain video metadata is uploaded to the chain and metadata query is realized by calling smart contract functions. In addition, combined with the embedding and extraction of secret information, a dual protection mechanism for private information is realized.
[0130] This technical solution solves the problem of single-node attacks that may be caused by centralized services in traditional video steganography, and realizes a trustworthy and tamper-proof video steganography mode through a decentralized mechanism.
[0131] Furthermore, the present invention is the first to combine blockchain technology and video steganography technology to achieve dual protection of video metadata and a decentralized mechanism, expanding the scope of existing blockchain applications. Compared with existing video steganography methods and blockchain technologies, it has better metadata protection effects and video traceability functions. It can provide an implementation path for video copyright protection, traceability tracking, and video integrity verification scenarios such as video similarity checking and verification of whether the video has been changed due to operations such as format conversion, editing, cropping, splicing, compression and rotation of video files.
[0132] Finally, this invention expands the research scope of traditional video steganography and the scope of blockchain application. It not only solves the problems of single point failure and loss of secret information caused by attacks on carrier video files in traditional video steganography services, but also proposes an implementation mechanism for deploying video applications on blockchain networks, expanding the application scope of blockchain technology at home and abroad and new ideas for the development of video steganography technology.
[0133] The present invention also provides a device for video source tracing and security verification, comprising:
[0134] The first module is used to perform an encryption operation on the secret information of the target video to obtain the encrypted secret information;
[0135] The second module is used to embed the secret information into the target video using video steganography technology, construct a carrier video, and obtain a video hash value of the carrier video;
[0136] A third module is used to construct video metadata according to the encrypted secret information, the video hash value and the video copyright information;
[0137] The fourth module is used to upload the video metadata to the blockchain network and trace the source and perform security verification on the target video based on the blockchain network.
[0138] It should be noted that the device for video tracing and security verification provided by the embodiment of the present invention can execute the method for video tracing and security verification described in any of the above embodiments during specific operation, which is not described in detail in this embodiment.
[0139] Figure 6 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call the logic instructions in the memory 630 to execute a method for video traceability and security verification, which includes: encrypting the secret information of the target video to obtain the encrypted secret information; embedding the secret information into the target video using video steganography technology, constructing a carrier video, and obtaining the video hash value of the carrier video; constructing video metadata based on the encrypted secret information, the video hash value and the video copyright information; uploading the video metadata to the blockchain network, and tracing and security verification of the target video based on the blockchain network.
[0140] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0141] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the method for video tracing and security verification provided by the above-mentioned embodiments, the method including: encrypting the secret information of the target video to obtain encrypted secret information; using video steganography technology to embed the secret information into the target video, construct a carrier video, and obtain the video hash value of the carrier video; constructing video metadata based on the encrypted secret information, the video hash value and video copyright information; uploading the video metadata to a blockchain network, and based on the blockchain network, tracing and security verification of the target video.
[0142] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the method for video tracing and security verification provided by the above-mentioned embodiments, the method comprising: encrypting the secret information of the target video to obtain encrypted secret information; using video steganography technology to embed the secret information into the target video, construct a carrier video, and obtain the video hash value of the carrier video; constructing video metadata based on the encrypted secret information, the video hash value and video copyright information; uploading the video metadata to a blockchain network, and based on the blockchain network, tracing and security verification of the target video.
[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for video source tracing and security verification, characterized in that: include: Performing encryption operation on the secret information of the target video to obtain the encrypted secret information; Embed the secret information into the target video using video steganography technology, construct a carrier video, and obtain a video hash value of the carrier video; Constructing video metadata according to the encrypted secret information, the video hash value, and the video copyright information; Uploading the video metadata to a blockchain network, and performing source tracing and security verification on the target video based on the blockchain network; After embedding the secret information into the target video using video steganography technology to construct a carrier video, the method further includes: Extracting private information from the carrier video as off-chain private information; Obtaining on-chain video metadata of the target video from the blockchain network; Performing double security verification on the target video based on the off-chain private information and the on-chain video metadata; The uploading of the video metadata to the blockchain network and the tracing and security verification of the target video based on the blockchain network include: Utilize the upload function of the smart contract to upload the video metadata to the blockchain network to form on-chain video metadata; Utilizing the access function of the smart contract, obtaining the on-chain video metadata of the target video from the blockchain network to perform source tracing and security verification on the target video; Obtaining on-chain video metadata of the target video from the blockchain network to trace the source and perform security verification on the target video, including: Obtaining the video copyright information of the target video from the on-chain video metadata to trace the source of the target video; Obtaining a video hash value of the carrier video from the on-chain video metadata to perform integrity check on the target video; The encrypted secret information of the target video is obtained from the on-chain video metadata to perform security verification on the target video.
2. The method for video source tracing and security verification according to claim 1, characterized in that: Obtaining the video hash value of the carrier video includes: The SHA256 algorithm is used to perform an encrypted hash operation on the carrier video to obtain the video hash value.
3. The method for video source tracing and security verification according to claim 1, characterized in that: The upload function of the smart contract is used to upload the video metadata to the blockchain network to form on-chain video metadata, including: Get the current account address balance of the current account that is uploading video metadata; When the current account address balance supports uploading the uploaded video metadata to the blockchain network, the upload function is executed to upload the video metadata to the blockchain network to form on-chain video metadata.
4. The method for video source tracing and security verification according to claim 3, characterized in that: Obtaining on-chain video metadata of the target video from the blockchain network, including: If it is determined that the current account has uploaded video metadata, use the access function to obtain all on-chain video metadata corresponding to the current account; According to the preset identification tag of the target video, the on-chain video metadata of the target video is determined from all on-chain video metadata.
5. A device for video tracing and security verification, characterized in that: include: The first module is used to perform an encryption operation on the secret information of the target video to obtain the encrypted secret information; The second module is used to embed the secret information into the target video using video steganography technology, construct a carrier video, and obtain a video hash value of the carrier video; A third module is used to construct video metadata according to the encrypted secret information, the video hash value and the video copyright information; The fourth module is used to upload the video metadata to the blockchain network and perform source tracing and security verification on the target video based on the blockchain network; After embedding the secret information into the target video using video steganography technology to construct a carrier video, the method further includes: Extracting private information from the carrier video as off-chain private information; Obtaining on-chain video metadata of the target video from the blockchain network; Performing double security verification on the target video based on the off-chain private information and the on-chain video metadata; The uploading of the video metadata to the blockchain network and the tracing and security verification of the target video based on the blockchain network include: Utilize the upload function of the smart contract to upload the video metadata to the blockchain network to form on-chain video metadata; Utilizing the access function of the smart contract, obtaining the on-chain video metadata of the target video from the blockchain network to perform source tracing and security verification on the target video; Obtaining on-chain video metadata of the target video from the blockchain network to trace the source and perform security verification on the target video, including: Obtaining the video copyright information of the target video from the on-chain video metadata to trace the source of the target video; Obtaining a video hash value of the carrier video from the on-chain video metadata to perform integrity check on the target video; The encrypted secret information of the target video is obtained from the on-chain video metadata to perform security verification on the target video.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for video tracing and security verification as described in any one of claims 1 to 4 are implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for video tracing and security verification as claimed in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Hidden information transmission system and method based on a block chain
CN113507467A
Video content traceability system and method based on block chain
CN114357396A