CN116132715A - Method and device for video tracing and security verification - Google Patents

Method and device for video tracing and security verification Download PDF

Info

Publication number
CN116132715A
CN116132715A CN202310086417.3A CN202310086417A CN116132715A CN 116132715 A CN116132715 A CN 116132715A CN 202310086417 A CN202310086417 A CN 202310086417A CN 116132715 A CN116132715 A CN 116132715A
Authority
CN
China
Prior art keywords
video
metadata
blockchain network
tracing
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310086417.3A
Other languages
Chinese (zh)
Inventor
刘云霞
王永浩
赵红国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Normal University
Original Assignee
Zhengzhou Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Normal University filed Critical Zhengzhou Normal University
Priority to CN202310086417.3A priority Critical patent/CN116132715A/en
Publication of CN116132715A publication Critical patent/CN116132715A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • H04N21/2541Rights Management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4408Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4627Rights management associated to the content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/475End-user interface for inputting end-user data, e.g. personal identification number [PIN], preference data
    • H04N21/4751End-user interface for inputting end-user data, e.g. personal identification number [PIN], preference data for defining user accounts, e.g. accounts for children
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/60Digital content management, e.g. content distribution
    • H04L2209/603Digital right managament [DRM]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Child & Adolescent Psychology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a method and a device for video tracing and security verification, which belong to the technical field of video security, and the method comprises the following steps: encrypting the secret information of the target video to obtain encrypted secret information; embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video, and acquiring 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 tracing and safety verification on the target video based on the blockchain network. The method and the device for video tracing and security verification provided by the invention realize video metadata uplink by using the block chain technology, so as to improve the security performance of video steganography, which is not tamperable and not counterfeitable.

Description

Method and device for video tracing and security verification
Technical Field
The invention relates to the technical field of video security, in particular to a method and a device for video tracing and security verification.
Background
As the volume of online video applications becomes larger and larger, applications such as online class, online conference, online live broadcast, etc., have entered everyone's life. After adding huge video applications, video security issues are also becoming more important.
Among various video security processing technologies, the video steganography technology is certainly the most promising and high-security one-door technology, and can effectively solve the hot spot security problems of video copyright protection, video steganography, video tracking traceability and the like caused by illegal video propagation, piracy, video reprocessing, mixed cutting and the like.
However, the centralized service existing in the conventional video steganography may cause a single node attack problem, resulting in poor security verification and tracing effects.
Disclosure of Invention
The invention provides a method, a device, electronic equipment and a storage medium for video tracing and security verification, which are used for solving the defect of poor security verification and tracing effects in the prior art.
In a first aspect, the present invention provides a method for video tracing and security verification, comprising: encrypting the secret information of the target video to obtain encrypted secret information; embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video, and acquiring 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 tracing and safety verification on the target video based on the blockchain network. According to the method for video tracing and security verification provided by the invention, the video hash value of the carrier video is obtained, and the method comprises the following steps: and carrying out encryption hash operation on the carrier video by adopting an SHA256 algorithm to obtain the video hash value.
According to the method for video tracing and security verification provided by the invention, the video metadata is uploaded to a blockchain network, and tracing and security verification are performed on the target video based on the blockchain network, and the method comprises the following steps: uploading the video metadata to a blockchain network by using an uploading function of the intelligent contract to form video metadata on a chain; and acquiring the video metadata on the chain of the target video from the blockchain network by using an access function of the intelligent contract so as to trace the source and verify the safety of the target video.
According to the method for video tracing and security verification provided by the invention, after embedding the secret information into the target video by utilizing a video steganography technology, the method further comprises the following steps: extracting private information from the carrier video to serve as private information under a chain; acquiring on-chain video metadata of the target video from the blockchain network; and carrying out double security verification on the target video according to the under-link private information and the on-link video metadata.
According to the method for video tracing and security verification provided by the invention, the video metadata is uploaded to a blockchain network by using an uploading function of an intelligent contract to form on-chain video metadata, and the method comprises the following steps: acquiring the current account address balance of a current account for uploading video metadata; and executing the uploading function to upload the video metadata to the blockchain network to form the video metadata on the chain under the condition that the current account address balance supports uploading the uploaded video metadata to the blockchain network.
According to the method for video tracing and security verification provided by the invention, the on-chain video metadata of the target video is obtained from the blockchain network, and the method comprises the following steps: under the condition that the video metadata are uploaded by the current account, acquiring all the on-chain video metadata corresponding to the current account by using an access function; and determining the on-link video metadata of the target video from all the on-link video metadata according to the preset identification tag of the target video.
According to the method for video tracing and security verification provided by the invention, the on-chain video metadata of the target video is obtained from the blockchain network so as to trace the target video and verify the target video, and the method comprises the following steps: acquiring video copyright information of the target video from the video metadata on the chain so as to trace the source of the target video; acquiring a video hash value of the carrier video from the on-chain video metadata to carry out integrity check on the target video; and acquiring the encrypted secret information of the target video from the on-chain video metadata so as to perform security verification on the target video.
In a second aspect, the present invention further provides an apparatus for video tracing and security verification, including:
the first module is used for carrying out encryption operation on the secret information of the target video to obtain encrypted secret information;
the second module is used for embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video and acquiring a video hash value of the carrier video;
a third module, configured to construct video metadata according to the encrypted secret information, the video hash value, and video copyright information;
and the fourth module is used for uploading the video metadata to a blockchain network and tracing and verifying the source and the safety of the target video based on the blockchain network.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for video tracing and security verification as described in any one of the above when the program is executed.
In a fourth aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a method for video tracing and security verification as described in any of the above.
The method and the device for video tracing and security verification provided by the invention realize video metadata uplink by using the block chain technology, so as to improve the security performance of video steganography, which is not tamperable and not counterfeitable. Further, by utilizing the invocation execution of the video steganography under the chain, the cooperative operation under the chain and the chain improves the security protection of the secret information by the video steganography and the application scope of the existing blockchain technology.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for video tracing and security verification provided by the invention;
FIG. 2 is a flow chart of defining video metadata provided by the present invention;
FIG. 3 is a schematic diagram of a design of an interface for interacting data between an Express service node and a blockchain network provided by the present invention;
FIG. 4 is a flow chart of the video metadata uplink execution and query provided by the present invention;
FIG. 5 is a schematic flow diagram of the video steganography dual protection of the chain-up and chain-down call provided by the invention;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that in the description of embodiments of the present invention, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
With the rapid development of blockchain currencies such as "bitcoin", "ethernet", etc., the application of the decentric technique based on blockchain has been attracting more and more attention. Because the blockchain technology enhances network security to a certain extent, the privacy of a user is ensured by utilizing cryptography, the non-tamper property and traceability of transaction information are ensured by utilizing a mechanism of hash and time stamp, and the advantages of easy attack risk of a traditional server core node and the like are solved by utilizing a decentralization architecture. Therefore, the use of blockchain technology to improve traditional network security, especially video security, is of great research value.
The invention applies the video steganography technology which gradually tends to be mature to the blockchain system on the basis of the blockchain bottom technology, on one hand, the security performance of the existing blockchain technology that the blockchain data cannot be tampered and counterfeited can be further enhanced by adopting the mechanisms such as cryptography, hash, time stamp and the like. The method is combined with an information hiding technology, a more specific and accurate copyright protection function based on the blockchain digital video is provided, and security protection such as personal privacy data and secret communication is focused on a content view angle, and is not limited to traditional encryption security protection; on the other hand, the research depth and application scope of the existing video steganography network security technology can be perfected and expanded. The prior video steganography technology is not limited to conventional applications such as copyright privacy protection and secret communication of digital works on the traditional Internet and a centralized server by means of the blockchain front technology, and the research depth is further expanded to be effectively applicable to novel businesses such as finance, government and audit in various blockchain application scenes nowadays and in the future, so that the video steganography safety protection depth is enhanced, and the application layout of video steganography safety in the blockchain scene is expanded.
Based on this, the present invention provides a method and apparatus for video tracing and security verification, wherein the method includes but is not limited to the following steps:
step 1: and carrying out encryption operation on the secret information of the target video to obtain encrypted secret information. The secret information can be text in a common sense, or can be a small picture or video.
Since the data in the blockchain network is public and transparent, in order to ensure the security of the video secret information, the secret information needs to be encrypted in the definition part of the video metadata uplink. The encryption and decryption keys may be stored in a MongoDB database.
Step 2: embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video, and acquiring a video hash value of the carrier video.
To ensure the integrity and non-tamper-ability of the carrier video (i.e., the encrypted video), a hash operation is required on the encrypted video, with the hash being performed using SHA 256.
Step 3: and constructing video metadata according to the encrypted secret information, the video hash value and the video copyright information.
Step 4: uploading the video metadata to a blockchain network, and tracing and safety verification on the target video based on the blockchain network.
The invention realizes the video metadata uplink by using the blockchain technology to improve the security performance of video steganography, which is not tamperable and not falsified.
The following describes a method and apparatus for video tracing and security verification according to embodiments of the present invention with reference to fig. 1 to 6.
Fig. 1 is a schematic flow chart of video metadata uplink provided by the present invention, and the following describes the uplink operation steps of the video metadata in four parts with reference to fig. 1.
A first part: construction of video metadata to be uplinked
Based on the content in the above embodiments, the content of the video metadata includes, but is not limited to, encrypted secret information, video hash values, and video copyright information. The video copyright information includes, but is not limited to, the content of the introduction of the video author, the name of the work, the category of the work, the signature, the completion date, whether to release, the date and place, the completion form of the work, and the like.
Fig. 2 is a schematic flow chart of defining video metadata provided by the present invention, and referring to fig. 2, the definition of video metadata to be uplinked is mainly aimed at determining which data related to a target video needs to be solidified in a blockchain network, and since the volume of the own file of the target video is particularly huge, it is impractical to store all the target video in the blockchain network, so that the present invention needs to define the video metadata for subsequent verification and tracing in advance. It can be understood that the video metadata refers to key data for performing security verification and tracing on the target video, and generally includes data such as a video file name, a home author, a video hash value, secret information, and the like. The defined video metadata will be fully solidified in the blockchain network.
Therefore, the secret information is required to be ensured not to be read and known by malicious nodes; the hash operation on the carrier video is used for guaranteeing the integrity of the encrypted video and verifying whether the carrier video is changed or not.
Because the data in the blockchain network are all public and transparent, any node of the data in the blockchain network can be accessed, in order to ensure the security of the secret information of the target video, so that the secret information is prevented from being read and known by malicious nodes, and the secret information needs to be encrypted in the definition part of the video metadata uplink. Alternatively, the encryption and decryption keys may be stored in the MongoDB database.
Further, to ensure the integrity and tamper-proof of the encrypted video, a hash operation needs to be performed on the encrypted video, and the hash is performed by using SHA 256. The hash operation on the carrier video is used for guaranteeing the integrity of the encrypted video and verifying whether the encrypted video is changed or not.
After the hash is finished, the video hash value, the encrypted secret information, the name of the video file, the attribution author and other information are defined as video metadata to be uplinked.
Based on the foregoing embodiments, as an optional embodiment, the uploading the video metadata to a blockchain network, and tracing and security verifying the target video based on the blockchain network, includes: uploading the video metadata to a blockchain network by using an uploading function of the intelligent contract to form video metadata on a chain; and acquiring the video metadata on the chain of the target video from the blockchain network by using an access function of the intelligent contract so as to trace the source and verify the safety of the target video. The contents of the second and third portions are described below. It will be appreciated that the on-chain video metadata is video metadata obtained from the blockchain network.
A second part: intelligent contract compiling, compiling and deploying
The intelligent contract mainly comprises the following three functions: the structural definition of video metadata to be uplinked, uploading the video metadata to the blockchain network and querying the content of the video metadata in the blockchain network.
Because the user account exists in the form of an address in the blockchain network, and because one user can perform a linking operation on video metadata of a plurality of target videos, the association between the address and the plurality of target videos needs to be established; at the same time, a target video should contain data that is consistent with the definition of the first portion of video metadata previously described. Accordingly, the present invention defines a data structure of video metadata of a single target video as shown in the following formula 1:
Figure BDA0004068960570000081
the variable name, author, data, hashdata in formula (1) refers to the video name, the video author, the encrypted secret information, and the encrypted video hash value (i.e., the video hash value) defined in the first section, respectively.
It should be noted that if the service requirement is complex, the data structure of the video metadata of the single uplink may also be expanded with the corresponding member attribute, but it is considered that as the member attribute or the content volume increases, the token cost to be paid increases when uploading the blockchain network, so that a balance between the video metadata entry and the cost is required.
The association between a single user and multiple videos may be described by equation 2 below, where the member addr_videos represents the video group formed by the multiple videos with which the current user is associated.
Figure BDA0004068960570000091
The mapping between the user account and the uploaded video metadata may be described in equation 3, where mapping arrayvideo identifies the associations established between the user address and the uploaded plurality of videos.
mapping(address=>addr_video) arrayvideo; (3)
Uploading video metadata into the blockchain network is achieved by adding the uploaded video metadata to an array of video_definitions, which can be solidified in the blockchain network as a member attribute, equation 4 describes a generic video uplink function:
arrayvideo[address].arr_videos.push(name,author,data,hashdata);(4)
the invention acquires the video metadata uploaded into the blockchain network through the query function (i.e. access function) interface of the intelligent contract, and the query operation does not change the existing record in the blockchain network, so that any token is not spent, and the query operation is shown in the formula 5:
return(arrayvideo[address].addr_videos[num].name,...)(5)
where num identifies the video metadata of the ith target video of the current account.
The compiling and deploying of the intelligent contracts are realized by using a truffle tool, and the intelligent contracts written above are compiled, linked and deployed into a running blockchain network through a truffle framework. Wherein compiled, deployed run commands are truffle command and truffle migration.
Third section: operation of block chain network and design of block chain network data interaction interface
The operation of the blockchain network needs to take the Express server as a node to participate in the blockchain network, and the Ganache is selected as a blockchain network triggered by one key and started quickly in the invention. FIG. 3 is a schematic diagram of a design of an interface for interacting data between an Express service node and a blockchain network according to the present invention, and is described below with reference to FIG. 3.
The design of the data interaction interface between the Express service node and the blockchain network mainly comprises the following aspects: configuring Web3 interface network parameters, acquiring related attributes such as account addresses and balances in a blockchain network by utilizing a Web3 interface, acquiring abi byte codes and addresses of deployed uplink intelligent contracts, and calling an uplink intelligent contract related uploading and accessing function. Specifically, the method mainly comprises the following steps:
3.1 configuring Web3 interface network parameters
The purpose of configuring the network parameters of the Web3 interface is to establish data interactions between the Express service node and the underlying blockchain network in the programming space. The Web3 encapsulated network ID should be the same as the underlying running blockchain network ID in order to properly establish the association between the blockchain network and the serving node. For example, if the underlying blockchain network ID is http:// localhost 7545, then the Web3 configuration parameters should be set as follows:
let Web3=require("web3");
let web3=new Web3(new Web3.providers.HttpProvider("http://localhost:7545"));
3.2 acquiring blockchain network attributes Using Web3 interface
It is particularly important to obtain information such as the address, balance and the like of the current account in the blockchain network from the service node by using the Web3 interface. Because the addition of video metadata in the blockchain network by calling the intelligent contract-related function belongs to the modification of the data in the existing blockchain network, a certain amount of medal cost is required to be spent, and the fact that the called current account address has a sufficient amount of medal for paying the packing cost of miners is required to be ensured before the related uploading function is called; at the same time, it is also desirable to be able to obtain or change balance information for different account addresses to effect transfer of tokens.
Optionally, the uploading the video metadata to a blockchain network to form on-chain video metadata using an uploading function of the smart contract includes: acquiring the current account address balance of a current account for uploading video metadata; and executing the uploading function to upload the video metadata to the blockchain network to form the video metadata on the chain under the condition that the current account address balance supports uploading the uploaded video metadata to the blockchain network.
The current account address is obtained through the getAccount function in Web3, as follows:
const accounts=await web3.eth.getAccounts();
the getAccount function returns a list of accounts available in the current service node. The current account address balance is obtained mainly through a getBalance function, and the current account address balance is obtained through the following formula assuming that the current account address is account:
let balance=await web3.eth.getBalance(account);
in the process of transferring tokens, if the account address of the sender is sender, the account address of the receiver is receiver, and the amount of tokens transferred is value, the specific transferring process can be described by the following formula, wherein the transferring mainly uses sendtransfer function.
Figure BDA0004068960570000111
3.3 obtaining deployed Intelligent contracts abi bytecodes and addresses
The deployed uplink intelligent contract abi byte codes and addresses are acquired to achieve the purposes of changing and inquiring video metadata in the blockchain network through uplink intelligent contract related uploading and accessing function functions in the service node. The deployed plurality of smart contracts are differentiated in the service node by abi bytecode and deployment address. Firstly, we need to obtain the current compiled uplink intelligent contract json file by the treffle tool, and the file contains abi byte codes of the uplink intelligent contract. Assuming that the current compiled uplink smart contract is located in.//build/contacts/metadata/json, the compiled uplink smart contract json file may be obtained by:
var metasendArtifact = required ("/build/structures/metadata/json") after obtaining the compiled smart contract json file, the present invention needs to get the deployed smart contract address.
The acquisition of the deployment intelligent contract address firstly needs to obtain the ID of the current blockchain network through a web3 net module. Further, the deployed intelligent contract address is obtained through the uplink intelligent contract json file and the blockchain network ID. The acquisition of the entire deployed uplink intelligent contract abi bytecode and address can be obtained according to the following formula:
Figure BDA0004068960570000112
wherein the replaydNTNETWORK identifies the smart contract that has been deployed in the current blockchain network, its acquisition is primarily obtained through the blockchain network ID and the smart contract json file, as follows:
const networkId=await web3.eth.net.getId();
const deployedNetwork=metasendArtifact.networks[networdId];
3.4 design of upload function and Access function of Intelligent contract
The design of the uploading function and the accessing function of the intelligent contract is one of the key points of the invention, and the problem to be solved is how to make the call of the deployed intelligent contract related uploading and accessing interface function through the web3 interface in the service node, and finally realize the uploading and solidification of the video metadata in the blockchain network and the access of the video metadata in the existing blockchain.
The design of uploading function functions in the service node is realized by calling the function of uploading video metadata in the deployed intelligent contract, and the account address of the calling contract is required to be designated before the calling, which is assumed to be account. Assuming that the function of uploading video metadata is sendMetaData, the uploaded video metadata is transmitted in the form of parameters, wherein name represents video name, metadata represents video secret information, author represents video attribution author, hashdata represents video hash value, and the core module of the uploading function can be obtained by the following formula:
let result=await sendMetaData(account,name,author,
metadata,hashdata).send({from account,gas:3000000});
for the above formula, result is the return value of sendMetaData function, which contains contents such as transaction hash, block hash, packed block number, and the gas value is the token value of calling account predefined consumption for realizing the transaction. If the service node wants to obtain the transaction hash in the uploading function, the transaction hash can be obtained by using the transactionHash attribute of the return value result, and the block hash and the packed block number can be obtained by the attribute blockhash and the blockNumber of the result.
Similarly, the design of the access function for accessing the existing video metadata in the blockchain network is basically similar to that of uploading, the access function is realized by calling the function for accessing the video metadata in the deployed intelligent contract, and an account address for calling the contract function interface is required to be formulated before the call, and is assumed to be account. Assuming that the function of accessing the video metadata is getMetaData and the account address account is transferred in the form of parameters, the core module of accessing the function can be obtained by the following formula:
let result=await getMetaData(account).call()
In the formula, result is a return value of the getMetaData function, and contains the contents of the acquired video file name, attribution author, encryption secret information, video hash value and the like of the video metadata on the chain, wherein the list corresponds to the formula (5) in the intelligent contract design one by one.
Fourth part: execution and querying of video metadata uplink transactions
The execution and inquiry of the uplink transaction of the video metadata are mainly completed at the service node end, and the video and metadata transmission of the client end and the video and metadata encapsulation of the server end are included. Fig. 4 is a schematic flow chart of the uplink execution and query of video metadata provided by the present invention, and the flow chart is described below with reference to fig. 4.
The client video can select a customized local video or a pushed example video, and the resolution is different from 176x144 to 1920x 1080. The video metadata is transferred to the server in the form of a form, wherein the secret information can be text in the common sense, or small pictures or unequal videos. Besides the encrypted secret information, the video metadata can also comprise related video names, attribution author information and the like for video copyright protection, tracing and the like, and the design of the video metadata can be added or deleted according to the requirements of service functions. The target video and video metadata selected by the client are transmitted to the service node through the POST request.
As an optional embodiment, after a file of a custom selected video is transmitted from a client to a service node through a POST request, the present invention adopts SHA256 hash algorithm to perform a cryptographic hash operation on a carrier video of the custom local video; in the case of the selected sample video, since the sample video is stored on the service node, when the selection item information is transmitted to the service node, the SHA256 hash algorithm can be used to perform the cryptographic hash operation on the loaded video of the sample video. Assuming that the video file data stream is data, the video hash operation may be calculated as follows:
const crypto=require("crypto");
const fsHash=crypto.createHash("sha256");
fsHash.update(data);
const Hashdata=fsHash.digest("hex");
wherein Hashdata represents the hash value of the video file. The encapsulation of the video metadata refers to that data needing to be transferred, such as a video file name, a video attribution author, a video hash value, video secret information and the like, transmitted by a client side are packed into a video uplink object for the subsequent service node to upload the call of a function, wherein the video secret information is required to be encrypted in the service node in order to avoid the access of unauthorized nodes in a blockchain network, and is packed into the video uplink object in a ciphertext mode. The storage path of the video file, the classification of the video file stream, the video time length, the frame rate and other relevant information can be stored in a MongoDB database, so that the subsequent under-chain video steganography verification module is facilitated.
The transfer of the call and parameter of the uploading function and the accessing function in the service node is the key content of the design of the part. First, the compliance of the user's current account in the current service node needs to be checked.
Optionally, obtaining the on-chain video metadata of the target video from the blockchain network using the access function of the smart contract includes: under the condition that the video metadata are uploaded by the current account, acquiring all the on-chain video metadata corresponding to the current account by using an access function; and determining the on-link video metadata of the target video from all the on-link video metadata according to the preset identification tag of the target video.
It can be understood that the identification tag of the target video may be the sequence number of the target video, for example, the i-th target video, and the corresponding identification tag is i.
Specifically, if the video metadata is uploaded, it is necessary to ensure that the user account address exists in the blockchain network and has a full balance capable of paying for the current uplink operation, and it is noted that the larger the volume of the video metadata to be uplink, the larger the cost is; if the video metadata is queried, the invoked user account needs to be checked to determine whether the current account has uploaded the video metadata to the blockchain network. Assuming that the current user account is account, the pseudo code for implementing its logical function is as follows:
if (upload video metadata) {
Checking the address balance of the current account;
else (query video metadata) {
Checking whether the current account has uploaded video metadata;
}
after the compliance check of the current account is completed, the service node uploads the call and parameter transfer of the function and the query function (i.e., the access function) according to the following logic:
if the function is a call of the uploading function, assuming that the packaged video uplink object is an object and the uploading function is sendnetadata, the call is performed according to the following formula:
Figure BDA0004068960570000151
here result is a feedback result after uploading video metadata.
If the function is called, the number of times of uploading video metadata by the current account is required to be acquired, then the uploaded video metadata content is traversed in sequence, the current account address is account, the function is getMetaData, the result is the queried result, and the calling mode is as follows:
Figure BDA0004068960570000152
based on the foregoing embodiment, as an optional embodiment, the method for video tracing and security verification provided by the present invention further includes, after embedding the secret information into the target video by using a video steganography technique, constructing a carrier video: extracting private information from the carrier video to serve as private information under a chain; acquiring on-chain video metadata of the target video from the blockchain network; and carrying out double security verification on the target video according to the under-link private information and the on-link video metadata.
The realization method for invoking video steganography double protection on the chain up and down provided by the invention is a supplement to the video steganography and tracing method based on the block chain (namely the method for tracing video and verifying safety), and aims to synchronously utilize secret information embedded into carrier video to achieve the aim of double verification of secret information under the chain up of target video on the basis of application of tracing, copyright protection, video integrity verification and the like of uploading video metadata on the block chain.
It may be appreciated that obtaining the on-chain video metadata of the target video from the blockchain network to perform traceability and security verification on the target video includes: acquiring video copyright information of the target video from the video metadata on the chain so as to trace the source of the target video; acquiring a video hash value of the carrier video from the on-chain video metadata to carry out integrity check on the target video; and acquiring the encrypted secret information of the target video from the on-chain video metadata so as to perform security verification on the target video.
In addition, the invention can combine the secret information extracted from the carrier video to double-verify the target video. The following is a description with reference to fig. 5.
Fig. 5 is a schematic flow chart of the video steganography dual protection method for the chain up-link and down-link, and the flow chart of the dual verification is briefly described with reference to fig. 5.
The video steganography double protection method based on the block chain in the chain has more two modules of calling video steganography embedding and extracting programs and double verification in the chain in the Express server compared with the video steganography and tracing method based on the block chain. The embedding of calling the video steganography occurs before the intelligent contract related function is called, namely the video hash value in the video metadata is the hash value of the carrier video, and other processes are consistent with the previous, namely the defined video metadata is subjected to the uplink operation.
In the future scene of tracking and tracing video copyright information or video transmission, the invention can call the video steganography extraction module in the service node to extract the secret information of the corresponding carrier video on one hand; on the other hand, the encrypted secret information or copyright information such as attribution authors can be obtained from the blockchain network through the call of the intelligent contract access function, and the two copyright information can achieve the double verification effect of the video metadata under the chain, and the fact that a decryption key with the secret information is needed during the double verification under the chain is needed.
In summary, the invention discloses a method for video tracing and security verification, which comprises the steps of defining a standard data structure of video metadata uplink and writing, compiling and deploying related intelligent contracts; then, uploading the video metadata to a blockchain through calling a development interface (such as an RPC interface of an Ethernet), and solidifying the video metadata in a blockchain network to form a permanent, non-tamperable and traceable video metadata uplink mechanism; and finally, realizing video metadata uplink and metadata query on the link through the call of the intelligent contract function. In addition, the secret information is embedded and extracted, so that a double protection mechanism of the secret information is realized.
The technical scheme solves the problem of single node attack possibly caused by the centralized service in the traditional video steganography, and a trusted and untampered video steganography mode is realized through a decentralization mechanism.
Furthermore, the invention belongs to the realization of dual protection and decentralization mechanisms of video metadata by combining the blockchain technology and the video steganography technology for the first time, expands the scope of the prior blockchain application, has better metadata protection effect and video tracing function compared with the prior video steganography method and blockchain technology, and can provide realization ways for video integrity check scenes such as video copyright protection, tracing, video file similar check and reconstruction, video integrity check and video integrity check scene verification such as video modification or the like which are required by operations such as format conversion, editing, cutting and splicing, compression and rotation and the like.
Finally, the invention expands the research scope of the traditional video steganography and the scope of the blockchain application, solves the problems of single point failure, secret information loss caused by attack on carrier video files and the like of the traditional video steganography service, and also provides an implementation mechanism for deploying the video application on a blockchain network, and expands the application scope of the blockchain technology at home and abroad and the new thought of the development of the video steganography technology.
The invention also provides a device for video tracing and security verification, which comprises:
the first module is used for carrying out encryption operation on the secret information of the target video to obtain encrypted secret information;
the second module is used for embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video and acquiring a video hash value of the carrier video;
a third module, configured to construct video metadata according to the encrypted secret information, the video hash value, and video copyright information;
and the fourth module is used for uploading the video metadata to a blockchain network and tracing and verifying the source and the safety of the target video based on the blockchain network.
It should be noted that, when the device for video tracing and security verification provided by the embodiment of the present invention is specifically executed, the method for video tracing and security verification described in any one of the above embodiments may be executed, which is not described in detail in this embodiment.
Fig. 6 is a schematic structural diagram of an electronic device according to the present invention, and as shown in fig. 6, the electronic device may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a method for video tracing and security verification, the method comprising: encrypting the secret information of the target video to obtain encrypted secret information; embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video, and acquiring 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 tracing and safety verification on the target video based on the blockchain network.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the method for video tracing and security verification provided by the above embodiments, the method comprising: encrypting the secret information of the target video to obtain encrypted secret information; embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video, and acquiring 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 tracing and safety verification on the target video based on the blockchain network.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, is implemented to perform the method for video tracing and security verification provided in the above embodiments, the method comprising: encrypting the secret information of the target video to obtain encrypted secret information; embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video, and acquiring 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 tracing and safety verification on the target video based on the blockchain network.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for video tracing and security verification, comprising:
encrypting the secret information of the target video to obtain encrypted secret information;
embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video, and acquiring 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 tracing and safety verification on the target video based on the blockchain network.
2. The method for video tracing and security verification of claim 1, wherein obtaining a video hash value of said carrier video comprises:
And carrying out encryption hash operation on the carrier video by adopting an SHA256 algorithm to obtain the video hash value.
3. The method for video tracing and security verification of claim 1, wherein said uploading said video metadata to a blockchain network and tracing and security verification of said target video based on said blockchain network comprises:
uploading the video metadata to a blockchain network by using an uploading function of the intelligent contract to form video metadata on a chain;
and acquiring the video metadata on the chain of the target video from the blockchain network by using an access function of the intelligent contract so as to trace the source and verify the safety of the target video.
4. A method for video tracing and security verification according to claim 3, wherein after embedding said secret information into said target video using video steganography, constructing a carrier video, further comprising:
extracting private information from the carrier video to serve as private information under a chain;
acquiring on-chain video metadata of the target video from the blockchain network;
and carrying out double security verification on the target video according to the under-link private information and the on-link video metadata.
5. The method for video tracing and security verification of claim 3, wherein said uploading said video metadata to a blockchain network using an upload function of a smart contract to form on-chain video metadata comprises:
acquiring the current account address balance of a current account for uploading video metadata;
and executing the uploading function to upload the video metadata to the blockchain network to form the video metadata on the chain under the condition that the current account address balance supports uploading the uploaded video metadata to the blockchain network.
6. The method for video tracing and security verification of claim 5, wherein obtaining on-chain video metadata of said target video from said blockchain network comprises:
under the condition that the video metadata are uploaded by the current account, acquiring all the on-chain video metadata corresponding to the current account by using an access function;
and determining the on-link video metadata of the target video from all the on-link video metadata according to the preset identification tag of the target video.
7. The method for video tracing and security verification of claim 3, wherein obtaining on-chain video metadata of said target video from said blockchain network for tracing and security verification of said target video comprises:
Acquiring video copyright information of the target video from the video metadata on the chain so as to trace the source of the target video;
acquiring a video hash value of the carrier video from the on-chain video metadata to carry out integrity check on the target video;
and acquiring the encrypted secret information of the target video from the on-chain video metadata so as to perform security verification on the target video.
8. An apparatus for video tracing and security verification, comprising:
the first module is used for carrying out encryption operation on the secret information of the target video to obtain encrypted secret information;
the second module is used for embedding the secret information into the target video by utilizing a video steganography technology, constructing a carrier video and acquiring a video hash value of the carrier video;
a third module, configured to construct video metadata according to the encrypted secret information, the video hash value, and video copyright information;
and the fourth module is used for uploading the video metadata to a blockchain network and tracing and verifying the source and the safety of the target video based on the blockchain network.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for video tracing and security verification according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the method for video tracing and security verification of any one of claims 1 to 7.
CN202310086417.3A 2023-02-07 2023-02-07 Method and device for video tracing and security verification Pending CN116132715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310086417.3A CN116132715A (en) 2023-02-07 2023-02-07 Method and device for video tracing and security verification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310086417.3A CN116132715A (en) 2023-02-07 2023-02-07 Method and device for video tracing and security verification

Publications (1)

Publication Number Publication Date
CN116132715A true CN116132715A (en) 2023-05-16

Family

ID=86295297

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310086417.3A Pending CN116132715A (en) 2023-02-07 2023-02-07 Method and device for video tracing and security verification

Country Status (1)

Country Link
CN (1) CN116132715A (en)

Similar Documents

Publication Publication Date Title
CN109074433B (en) Method and system for verifying digital asset integrity using a distributed hash table and a peer-to-peer distributed ledger
US10891384B2 (en) Blockchain transaction device and method
JP6877448B2 (en) Methods and systems for guaranteeing computer software using distributed hash tables and blockchain
JP7019697B2 (en) Dynamic access control on the blockchain
JP2022078115A (en) Method and system for controlling performance of contract using distributed hash table and peer-to-peer distributed ledger
CN110214324A (en) Key vault surrounds area
CN112073807B (en) Video data processing method and device based on block chain
US8887290B1 (en) Method and system for content protection for a browser based content viewer
TWI552015B (en) Method,computer system and non-transitory computer readable storage medium for composite document
CN115208665B (en) Germplasm resource data safe sharing method and system based on blockchain
CN109040134A (en) A kind of design method and relevant apparatus of information encryption
CN116132715A (en) Method and device for video tracing and security verification
KR102153843B1 (en) Method and apparatus for publishing work in network
CN105790928B (en) A kind of file splitting method based on digital digest
Geethanjali et al. Ipfs-based image sharing using perceptual hash code with digital right management
CN115129275A (en) Digital file printing method and device, electronic equipment and storage medium
Zhao et al. An ethereum-based image copyright authentication scheme
US9998444B2 (en) Chaining of use case-specific entity identifiers
CN112069469B (en) Method and device for processing work data based on block chain
Chen et al. Research on Internet of Things information security based on blockchain
Gimenez-Aguilar et al. Malicious uses of blockchains by malware: from the analysis to Smart-Zephyrus
TWI713892B (en) Blockchain based article publishing method and system
CN115130148A (en) Data storage method and device, electronic equipment and storage medium
dos Santos DClaims: A Censorship-Resistant Web Annotations System
CN113723059A (en) Method and system for converting HTML (hypertext markup language) into PDF (Portable document Format) based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination