CN115248940A - Video evidence storing method, verification method and device based on block chain - Google Patents

Video evidence storing method, verification method and device based on block chain Download PDF

Info

Publication number
CN115248940A
CN115248940A CN202110468863.1A CN202110468863A CN115248940A CN 115248940 A CN115248940 A CN 115248940A CN 202110468863 A CN202110468863 A CN 202110468863A CN 115248940 A CN115248940 A CN 115248940A
Authority
CN
China
Prior art keywords
video
storing
data
block chain
hash
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
CN202110468863.1A
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.)
China Mobile Communications Group Co Ltd
China Mobile Financial Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Financial Technology Co Ltd
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 China Mobile Communications Group Co Ltd, China Mobile Financial Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110468863.1A priority Critical patent/CN115248940A/en
Publication of CN115248940A publication Critical patent/CN115248940A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a video evidence storing method, a verification method and a device based on a block chain, wherein the method comprises the steps of obtaining a video to be stored at preset time intervals; extracting key frames from the video to be stored with the certificate, and adding unique numbers to the key frames; carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time; and sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of a block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by node equipment of the block chain, key frame extraction is carried out on the video to be subjected to certificate storage, unique number and key frame uplink storage is carried out on the key frame, and uplink is carried out by extracting the key frame in the video code, so that real-time uplink and key data can be ensured not to be tampered, and the performance requirements of an uplink module on Internet of things equipment and the block chain are reduced.

Description

Video evidence storing method, verification method and device based on block chain
Technical Field
The invention relates to the technical field of data processing, in particular to a video evidence storing method, a video evidence verifying method and a video evidence storing device based on a block chain.
Background
The video monitoring can restore the real situation of the incident scene most intuitively, so the video monitoring is often used for real-time monitoring of important places and can be used as a key evidence for dispute mediation and judicial judgment. The source of the monitoring video is wide, and the monitoring video can be from various Internet of things monitoring camera equipment, such as police or civil security cameras, small wearable cameras, unmanned aerial vehicles and the like. In the process of screen acquisition, transmission and storage of the monitoring equipment of the Internet of things, the monitoring equipment of the Internet of things has the possibility of being tampered. At present, video modification and counterfeiting technologies are mature, and great impact is caused on the public credibility of video monitoring evidence.
Therefore, how to provide a video storage scheme that can reduce the performance requirement on the device while ensuring that the stored video data is not tampered is a technical problem to be urgently solved by those skilled in the art.
Disclosure of Invention
The invention provides a video evidence storing method, a video evidence verifying method and a video evidence storing device based on a block chain, which can reduce the performance requirements on equipment under the condition of ensuring that stored video data are not tampered.
In a first aspect, the present invention provides a video evidence storing method based on a block chain, including:
acquiring videos to be stored and certified at preset time intervals;
extracting key frames from the video to be stored with the certificate, and adding unique numbers to the key frames;
carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time;
and sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of a block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
In one embodiment, the extracting key frames from the video to be certified and attaching unique numbers to the key frames includes:
performing video coding on the video to be stored with the evidence to obtain an I frame, a P frame and a B frame, wherein the I frame is a key frame, and the P frame and the B frame depend on the I frame and are non-key frames;
determining all I frames as key frames, and generating different random codes for the key frames as unique numbers of the key frames;
and adding the unique number into the incidental data of the corresponding key frame to obtain video coding data.
In an embodiment, the performing the hash operation on the key frame to obtain the certified hash value and the hash time includes:
converting the key frame data into an ASCII character string;
and inputting the ASCII character string into a hash calculation module, and outputting a certificate-storing hash value and hash time.
In one embodiment, the sending the unique code and the corresponding certification hash value and the hash time as target certification data to a distributed database of a block chain, so that the target certification data is included in the distributed database of the block chain after being identified and verified by node devices of the block chain, includes:
taking the unique code as a key, and taking the certificate storage hash value and the certificate storage hash time as values to obtain target certificate storage data;
and sending the target evidence storing data to a distributed database of a block chain, so that the target evidence storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
In one embodiment, further comprising:
receiving adjustment input of a key frame occurrence frequency parameter by a user;
in response to the adjustment input, the number of key frames for uplink in the key frames of the video to be credited varies.
In a second aspect, the present invention provides a video verification method based on a blockchain, including:
acquiring video data to be verified;
extracting key frames and corresponding unique numbers from the video data to be verified;
searching a corresponding evidence-storing hash value in a block chain based on the unique code;
and comparing the certificate-storing hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
In one embodiment, the comparing the certified hash value with the hash value of the key frame to obtain the verification result of the video data to be verified includes:
performing hash value calculation on all key frames in the video data to be verified to obtain an actual hash value sequence;
searching corresponding evidence-storing hash values in a block chain according to the unique identifiers of all key frames in the video data to be verified to obtain an evidence-storing hash value sequence;
under the condition that the actual hash value sequence is completely consistent with the evidence-storing hash value sequence, determining the video data to be verified as credible data;
and under the condition that the actual hash value sequence is not completely consistent with the evidence-storing hash value sequence, determining that the video data to be verified is unreliable data.
In a third aspect, the present invention provides a video evidence storing device based on a block chain, including:
the video acquisition module is used for acquiring the video to be stored with the certificate at intervals of preset time;
the key numbering module is used for extracting key frames from the video to be stored with the evidence and attaching unique numbers to the key frames;
the Hash module is used for carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time;
and the uplink module is used for sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of the block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
In one embodiment, the key numbering module comprises:
the video coding unit is used for carrying out video coding on the video to be stored with evidence to obtain an I frame, a P frame and a B frame, wherein the I frame is a key frame, and the P frame and the B frame depend on the I frame and are non-key frames;
the key frame coding unit is used for determining all I frames as key frames and generating different random codes for the key frames as unique numbers of the key frames;
and the video coding unit is used for adding the unique number into the incidental data of the corresponding key frame to obtain video coded data.
In one embodiment, the hashing module comprises:
a character conversion unit for converting the key frame data into an ASCII character string;
and the Hash output unit is used for inputting the ASCII character string into the Hash calculation module and outputting the evidence storing Hash value and the Hash time.
In one embodiment, the winding module comprises:
the certificate storing data generating unit is used for obtaining target certificate storing data by taking the unique code as a key and taking the certificate storing hash value and the hash time as values;
and sending the target evidence storing data to a distributed database of a block chain, so that the target evidence storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
In one embodiment, further comprising:
the parameter input module is used for receiving the adjustment input of the key frame occurrence frequency parameter by a user;
a number response module, configured to respond to the adjustment input, where the number of key frames for uplink in the key frames of the video to be certified changes.
In a fourth aspect, the present invention provides a video verification apparatus based on a blockchain, including:
the data acquisition module is used for acquiring video data to be verified;
the number extraction module is used for extracting key frames and corresponding unique numbers from the video data to be verified;
the certificate storing hash searching module is used for searching a corresponding certificate storing hash value in the block chain based on the unique code;
and the hash comparison module is used for comparing the evidence-storing hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
In one embodiment, the hash alignment module comprises:
the actual hash unit is used for calculating hash values of all key frames in the video data to be verified to obtain an actual hash value sequence;
the certificate storage hash unit is used for searching a corresponding certificate storage hash value in the block chain according to the unique identification of all key frames in the video data to be verified to obtain a certificate storage hash value sequence;
the credibility determining unit is used for determining the video data to be verified as credible data under the condition that the actual hash value sequence is completely consistent with the evidence-storing hash value sequence;
and the untrusted determining unit is used for determining the video data to be verified as untrusted data under the condition that the actual hash value sequence is not completely consistent with the evidence storage hash value sequence.
In a fifth aspect, the present invention provides an electronic device, including a processor and a memory storing a computer program, where the processor implements the steps of the blockchain-based video authentication method according to the first aspect or implements the steps of the blockchain-based video authentication method according to the second aspect when executing the computer program.
In a sixth aspect, the present invention provides a processor-readable storage medium storing a computer program for causing a processor to execute the steps of the blockchain-based video authentication method according to the first aspect or to implement the steps of the blockchain-based video authentication method according to the second aspect.
The invention provides a video storage and verification method and device based on a block chain, which can ensure real-time chain loading and key data are not distorted and reduce the performance requirements of a chain loading module on Internet of things equipment and a block chain by extracting key frames from a video to be stored, uniquely numbering and carrying out chain loading storage on the key frames and utilizing the extracted key frames in video coding to carry out chain loading, so that the block chain system in the method can accommodate more Internet of things equipment and can be popularized to small-sized Internet of things equipment, and the performance requirements on the equipment are reduced under the condition of ensuring that the stored video data are not distorted.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a video evidence storing method based on a block chain according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a video verification method based on a blockchain according to the present invention;
fig. 3 is a schematic structural diagram of a video evidence storing device based on a block chain according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating a block chain-based video verification apparatus according to an embodiment of the present invention;
fig. 5 is an interaction diagram of a video evidence storing method and a video evidence verifying method based on a blockchain according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A video evidence storage method based on a block chain according to the present invention is described below with reference to fig. 1.
Fig. 1 is a schematic flowchart of a video evidence storage method based on a block chain according to an embodiment of the present invention.
In a specific implementation manner of the present invention, an embodiment of the present invention provides a video evidence storing method based on a block chain, including:
step 110: acquiring videos to be stored and certified at preset time intervals;
in the embodiment of the invention, the data source of the video to be stored with the evidence is wide, the video can come from various internet of things monitoring camera devices, such as police or civil security cameras, small wearable cameras, unmanned aerial vehicles, express delivery signing cameras and the like, and the video can be used as the video to be stored with the evidence if possible to use the video as the evidence in the following process. Specifically, since the video shot by the camera is generated far away from the beginning, the video data segment to be stored can be obtained at preset time intervals.
Step 120: extracting key frames from the video to be stored with the certificate, and adding unique numbers to the key frames;
after the video to be stored with the certificate is obtained, the key frames can be extracted, and different unique codes are respectively attached to the key frames, so that subsequent searching is facilitated. Specifically, video coding is carried out on the video to be stored with the certificate to obtain an I frame, a P frame and a B frame, wherein the I frame is a key frame, and the P frame and the B frame depend on the I frame and are non-key frames; determining all I frames as key frames, and generating different random codes for the key frames as unique numbers of the key frames; and adding the unique number into the incidental data of the corresponding key frame to obtain video coding data.
Specifically, in video compression coding, each frame represents a still image. In actual compression, various algorithms are adopted to reduce the data capacity, in short, the I frame is a key frame and belongs to intraframe compression, which is the same as that of AVI. P means forward search and B means bidirectional search. Both P-frames and B-frames compress data based on I-frames. I frame represents key frame, complete preservation of picture; when decoding, it only needs the frame data to complete (because it contains complete picture), the P frame represents the difference between this frame and the previous key frame (or P frame), when decoding, it needs the picture buffered before to overlap the difference defined by this frame, and generates the final picture. (i.e. difference frame, P frame has no complete picture data, only data different from the previous frame), B frame is bidirectional difference frame, i.e. B frame records the difference between the current frame and previous and next frames, in other words, to decode B frame, not only previous buffered picture but also decoded picture, and the final picture is obtained by superposition of previous and next pictures and current frame data.
Step 130: carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time;
after key frames are extracted from the video to be certified, hash operations can be performed on the key frames respectively, and particularly, the key frames which are subjected to hash operations simultaneously can be adjusted according to the strength of the operation function of the hash calculation module, for example, if the operation capability of the hash calculation module is weak, only one key frame is subjected to hash operations at a time, if the operation capability of the hash calculation module is strong, several key frames can be packaged into one data packet to perform a hash operation, and after the hash operations are performed, the certified hash value corresponding to the key frames and the hash time during the hash operations can be obtained.
Specifically, in one embodiment, the keyframe data may be converted to an ASCII string; and inputting the ASCII character string into a hash calculation module, and outputting a certificate-storing hash value and hash time.
Step 140: and sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of a block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
Specifically, the unique code is used as a key, and the certificate storage hash value and the hash time are used as values to obtain target certificate storage data; and sending the target evidence storing data to a distributed database of a block chain, so that the target evidence storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
In practice, of course, the hash chaining module may also obtain the key frame I and the unique number X from the encoding module, convert the video key frame into an ASCII character string as an input, and output the evidence storage data H with the hash time T. Assuming that the number on the chain of the monitoring equipment of the internet of things is M, the uplink operation is executed by taking M _ X as a key and taking H _ T as a value. The adoption of the key frame uplink reduces uplink frequency and simultaneously ensures that key data is not tampered.
On the basis of the above embodiments, in one embodiment, the number of key frames in the uplink may also be adjusted, and specifically, an adjustment input of a key frame occurrence frequency parameter by a user may be received; in response to the adjustment input, the number of key frames for uplink in the key frames of the video to be credited varies. That is, not all key frames need to be uplink, and the number of key frames uplink per unit time can be adjusted according to specific situations.
Referring to fig. 2, fig. 2 is a flowchart illustrating a video verification method based on a block chain according to the present invention.
In another specific implementation manner of the present invention, an embodiment of the present invention provides a video verification method based on a blockchain, including:
step 210: acquiring video data to be verified;
step 220: extracting key frames and corresponding unique numbers from the video data to be verified;
step 230: searching a corresponding evidence-storing hash value in a block chain based on the unique code;
step 240: and comparing the certificate-storing hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
Specifically, the block chain in the embodiment of the present invention may use alliance chain technologies such as superhedger Fabric, and is composed of various internet of things video monitoring operation and maintenance parties, public security institutions, courtrooms, inspection courtyards, and other judicial institutions, wherein the internet of things video monitoring operation and maintenance parties uplink monitoring video key frame evidence storage data, and the public security institutions, the courtrooms, and the inspection courtrooms are responsible for monitoring uplink processes, and call uplink data during case handling, mediation, and judgment.
When evidence obtaining and comparison are needed, obtaining video data to be verified which need to be obtained from local storage or remote storage of the Internet of things equipment, cloud storage equipment and the like, extracting key frames in the video data, obtaining additional unique number data X in the key frames for each key frame I, inquiring on a chain by taking the Internet of things equipment number M + key frame additional unique number data X associated with the video as a key to obtain H, and performing hash operation on the key frames I (without additional data) same as that of a chain loading module to obtain H'. And comparing the H with the H ', if the H is the same as the H ', the fact that the monitoring video is not tampered is proved, and if the H is different from the H ', the fact that the tampering is suspected is proved, and further investigation is needed.
In an embodiment, specifically, in order to compare the certified hash value with the hash value of the key frame to obtain the verification result of the video data to be verified, the following steps may be performed: performing hash value calculation on all key frames in the video data to be verified to obtain an actual hash value sequence; searching corresponding evidence-storing hash values in a block chain according to the unique identifiers of all key frames in the video data to be verified to obtain an evidence-storing hash value sequence; under the condition that the actual hash value sequence is completely consistent with the evidence-storing hash value sequence, determining the video data to be verified as credible data; and under the condition that the actual hash value sequence is not completely consistent with the evidence-storing hash value sequence, determining that the video data to be verified is untrusted data.
The following describes the video evidence storing device based on the block chain, and the video evidence storing device based on the block chain described below and the video evidence storing method based on the block chain described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a video evidence storage device based on a block chain according to an embodiment of the present invention.
In another embodiment of the present invention, the present invention provides a video evidence storing device 300 based on a block chain, including:
the video acquiring module 310 is configured to acquire a video to be stored at preset time intervals;
a key numbering module 320, configured to extract a key frame from the video to be certified, and add a unique number to the key frame;
the hash module 330 is configured to perform a hash operation on the key frame to obtain a certificate-storing hash value and a hash time;
and an uplink module 340, configured to send the unique code, the corresponding certificate-storing hash value, and the hash time to a distributed database of a block chain as target certificate-storing data, so that the target certificate-storing data is included in the distributed database of the block chain after being identified and verified by the node devices of the block chain.
In one embodiment, the key numbering module comprises:
the video coding unit is used for carrying out video coding on the video to be stored with evidence to obtain an I frame, a P frame and a B frame, wherein the I frame is a key frame, and the P frame and the B frame depend on the I frame and are non-key frames;
the key frame coding unit is used for determining all I frames as key frames and generating different random codes for the key frames as unique numbers of the key frames;
and the video coding unit is used for adding the unique number into the incidental data of the corresponding key frame to obtain video coded data.
In one embodiment, the hash module comprises:
a character conversion unit for converting the key frame data into an ASCII character string;
and the Hash output unit is used for inputting the ASCII character string into the Hash calculation module and outputting the evidence storing Hash value and the Hash time.
In one embodiment, the winding module comprises:
the certificate storing data generating unit is used for obtaining target certificate storing data by taking the unique code as a key and taking the certificate storing hash value and the hash time as values;
and sending the target evidence storing data to a distributed database of a block chain, so that the target evidence storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
In one embodiment, further comprising:
the parameter input module is used for receiving the adjustment input of the key frame occurrence frequency parameter by a user;
a number response module, configured to respond to the adjustment input, where the number of key frames for uplink in the key frames of the video to be certified changes.
The following describes the video verification apparatus based on blockchain provided by the present invention, and the video verification apparatus based on blockchain described below and the video verification method based on blockchain described above may be referred to in correspondence with each other.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a block chain-based video verification apparatus according to an embodiment of the present invention.
In a fourth aspect, the present invention provides a video verification apparatus 400 based on block chains, comprising:
a data obtaining module 410, configured to obtain video data to be verified;
a number extraction module 420, configured to extract a key frame and a corresponding unique number from the video data to be verified;
a certificate-storing hash searching module 430, configured to search a corresponding certificate-storing hash value in the block chain based on the unique code;
and a hash comparison module 440, configured to compare the certified hash value with the hash value of the key frame, so as to obtain a verification result of the video data to be verified.
In one embodiment, the hash alignment module comprises:
the actual hash unit is used for calculating hash values of all key frames in the video data to be verified to obtain an actual hash value sequence;
the certificate storage hash unit is used for searching a corresponding certificate storage hash value in the block chain according to the unique identification of all key frames in the video data to be verified to obtain a certificate storage hash value sequence;
the credibility determining unit is used for determining the video data to be verified as credible data under the condition that the actual hash value sequence is completely consistent with the evidence-storing hash value sequence;
and the untrusted determining unit is used for determining the video data to be verified as untrusted data under the condition that the actual hash value sequence is not completely consistent with the evidence-storing hash value sequence.
Referring to fig. 5, fig. 5 is an interaction diagram of a video evidence storing method and a video evidence verifying method based on a block chain according to an embodiment of the present invention.
Fig. 5 shows an improved overall architecture of a video verification method and a system architecture and a process of a video verification method based on a block chain.
Specifically, the video evidence storing device based on the block chain acquires frame data from the environment at a certain acquisition time interval and transmits the frame data to the encoding module for encoding. And coding the obtained frame data, and transmitting the coded data to a storage transmission module. After the data of the coding module is acquired, three options of local transmission, TCP reliable transmission and UDP unreliable transmission are available. And a Hash calculation module consisting of firmware which can execute a Hash algorithm and is provided with a chain SDK performs Hash calculation on the key frame. The block chain network uses alliance chain technologies such as HyperLegend Fabric and the like, and consists of various Internet of things video monitoring operation and maintenance parties, public security organs, courts, inspection yards and other judicial organs. And the video monitoring operation and maintenance party links up the key frame evidence storage data of the monitoring video, and the public security organs, the courts and the inspection courts are responsible for supervising the linking process and calling the data on the link during case handling, mediation and judgment. When evidence obtaining and comparison are needed, obtaining a video clip needing evidence obtaining from local storage or remote storage of the Internet of things equipment, comparing the video clip with the data on the link, if the video clip is the same as the data on the link, proving that no monitoring video is tampered, and if the video clip is different from the data on the link, proving that tampering is suspected and needing further investigation.
The specific implementation process is as follows:
1. frame data is acquired from the environment at certain acquisition time intervals and transmitted to the encoding module for encoding.
2. And generating a random number X which is different from each other for each I frame data as an identifier, adding the number into the incidental data of the I frame, and transmitting the incidental data to the storage transmission module.
In the video coding algorithm, a video is coded into three frames, namely an I frame, a P frame and a B frame, wherein the I frame is a key frame and retains all data, and the P, B frame depends on the I frame and only retains difference data with an adjacent I frame. The uplink frequency can be adjusted by adjusting the key frame occurrence frequency parameter.
In order to ensure real-time performance of the monitored data, the video-monitored frame data needs to be uplinked in real time. However, the frame rate of the monitoring camera is basically about 25fps at present, and in consideration of the performance of the internet of things equipment and the block chain, all uplink chains can cause great pressure on the internet of things equipment and the block chain. Therefore, according to the scheme, key frames in the extracted video codes are used for uplink, so that real-time uplink and key data are not tampered, the performance requirements of an uplink module on the Internet of things equipment and a block chain are reduced, the block chain system in the method can accommodate more Internet of things equipment, and the method can be popularized to small Internet of things equipment.
3. After the data of the coding module is acquired, three options of local transmission, TCP reliable transmission and UDP unreliable transmission are available. In this proposal, reliable transmission of key frame data is guaranteed, so TCP transmission is used for key frames and UDP or TCP transmission is used for other frames.
4. And acquiring the key frame I and the unique number X from the encoding module, converting the video key frame into an ASCII character string as input, and outputting evidence storage data H with the hash time T. Assuming that the number on the chain of the monitoring equipment of the internet of things is M, the uplink operation is executed by taking M _ X as a key and H _ T as a value. The adoption of the key frame uplink reduces uplink frequency and simultaneously ensures that key data is not tampered.
5. The block chain network uses alliance chain technologies such as HyperLegend Fabric and the like, and comprises various Internet of things video monitoring operation and maintenance parties, a public security agency, a court, an inspection institute and other judicial authorities, wherein the Internet of things video monitoring operation and maintenance parties uplink monitoring video key frame evidence storage data, the public security agency, the court and the inspection institute are responsible for monitoring uplink processes, and chain data are called during case handling, mediation and judgment.
6. Acquiring video clips needing evidence obtaining from local storage or remote storage of the Internet of things equipment, extracting key frames in the video clips, acquiring additional unique number data X in the key frames for each key frame I, inquiring on a chain by taking the Internet of things equipment number M + key frame additional unique number data X associated with the video as a key to obtain H, and performing hash operation on the key frames I (without additional data) same as that of the uplink module to obtain H'. And comparing the H with the H ', if the H is the same as the H ', the fact that the monitoring video is not tampered is proved, and if the H is different from the H ', the fact that the tampering is suspected is proved, and further investigation is needed.
The embodiment of the invention provides a video storage and verification method and device based on a block chain.
Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor) 610, a Communication Interface (Communication Interface) 620, a memory (memory) 630 and a Communication bus 640, wherein the processor 610, the Communication Interface 620 and the memory 630 complete Communication with each other through the Communication bus 640. The processor 610 may invoke computer programs in the memory 630 to perform the steps of the blockchain based video attestation method, including, for example:
the video evidence storing method based on the block chain is characterized by comprising the following steps:
acquiring videos to be stored and certified at preset time intervals;
extracting key frames from the video to be stored with the certificate, and adding unique numbers to the key frames;
carrying out hash operation on the key frame to obtain a certificate-storing hash value and hash time;
and sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of a block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
Or the steps of performing a blockchain-based video authentication method, for example, include:
acquiring video data to be verified;
extracting key frames and corresponding unique numbers from the video data to be verified;
searching a corresponding evidence-storing hash value in a block chain based on the unique code;
and comparing the certificate-storing hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In another aspect, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer being capable of executing the steps of the video evidence storage method based on block chains provided by the above methods, for example, including:
the video evidence storing method based on the block chain is characterized by comprising the following steps:
acquiring videos to be stored and certified at preset time intervals;
extracting key frames from the video to be stored with the certificate, and adding unique numbers to the key frames;
carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time;
and sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of a block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
Or the steps of the video verification method based on the blockchain, for example, include:
acquiring video data to be verified;
extracting key frames and corresponding unique numbers from the video data to be verified;
searching a corresponding evidence-storing hash value in a block chain based on the unique code;
and comparing the certificate-storing hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
On the other hand, an embodiment of the present application further provides a processor-readable storage medium, where the processor-readable storage medium stores a computer program, where the computer program is configured to cause the processor to execute the method provided in each of the foregoing embodiments, for example, the method includes:
the video evidence storing method based on the block chain comprises the following steps:
acquiring videos to be stored and certified at preset time intervals;
extracting key frames from the video to be stored with the certificate, and adding unique numbers to the key frames;
carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time;
and sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of a block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
Or the steps of the video verification method based on the blockchain, for example, include:
acquiring video data to be verified;
extracting key frames and corresponding unique numbers from the video data to be verified;
searching a corresponding evidence-storing hash value in a block chain based on the unique code;
and comparing the certificate-storing hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
The processor-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), solid State Disks (SSDs)), etc.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A video evidence storing method based on a block chain is characterized by comprising the following steps:
acquiring videos to be stored and certified at preset time intervals;
extracting key frames from the video to be stored with the certificate, and adding unique numbers to the key frames;
carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time;
and sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of a block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
2. The video evidence storing method based on the block chain as claimed in claim 1, wherein the extracting key frames from the video to be proved and appending unique numbers to the key frames comprises:
performing video coding on the video to be stored with the evidence to obtain an I frame, a P frame and a B frame, wherein the I frame is a key frame, and the P frame and the B frame depend on the I frame and are non-key frames;
determining all I frames as key frames, and generating different random codes for the key frames as unique numbers of the key frames;
and adding the unique number into the incidental data of the corresponding key frame to obtain video coding data.
3. The video evidence storing method based on the blockchain according to claim 1, wherein the performing the hash operation on the key frame to obtain the evidence storing hash value and the hash time comprises:
converting the key frame data into an ASCII character string;
and inputting the ASCII character string into a hash calculation module, and outputting a certificate-storing hash value and hash time.
4. The blockchain-based video evidence storing method according to claim 1, wherein the sending the unique code and the corresponding evidence storing hash value and the hash time as target evidence storing data to a distributed database of a blockchain, so that the target evidence storing data is included in the distributed database of the blockchain after being identified and verified by the node devices of the blockchain comprises:
taking the unique code as a key, and taking the certificate storage hash value and the certificate storage hash time as values to obtain target certificate storage data;
and sending the target evidence storing data to a distributed database of a block chain, so that the target evidence storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
5. The blockchain-based video evidence storing method according to any one of claims 1 to 4, further comprising:
receiving adjustment input of a key frame occurrence frequency parameter by a user;
in response to the adjustment input, the number of key frames for uplink in the key frames of the video to be credited varies.
6. A video verification method based on a block chain is characterized by comprising the following steps:
acquiring video data to be verified;
extracting key frames and corresponding unique numbers from the video data to be verified;
searching a corresponding evidence-storing hash value in a block chain based on the unique code;
and comparing the certificate-storing hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
7. The video verification method based on the blockchain according to claim 6, wherein the comparing the certified hash value with the hash value of the key frame to obtain the verification result of the video data to be verified comprises:
performing hash value calculation on all key frames in the video data to be verified to obtain an actual hash value sequence;
searching corresponding evidence-storing hash values in a block chain according to the unique identifiers of all key frames in the video data to be verified to obtain an evidence-storing hash value sequence;
under the condition that the actual hash value sequence is completely consistent with the evidence-storing hash value sequence, determining the video data to be verified as credible data;
and under the condition that the actual hash value sequence is not completely consistent with the evidence-storing hash value sequence, determining that the video data to be verified is untrusted data.
8. A video evidence storage device based on a block chain is characterized by comprising:
the video acquisition module is used for acquiring the video to be stored with the certificate at intervals of preset time;
the key numbering module is used for extracting key frames from the video to be stored with the evidence and attaching unique numbers to the key frames;
the Hash module is used for carrying out Hash operation on the key frame to obtain a certificate-storing Hash value and Hash time;
and the uplink module is used for sending the unique code, the corresponding certificate-storing hash value and the hash time as target certificate-storing data to a distributed database of the block chain, so that the target certificate-storing data is recorded in the distributed database of the block chain after being identified and verified by the node equipment of the block chain.
9. A blockchain-based video authentication apparatus, comprising:
the data acquisition module is used for acquiring video data to be verified;
the number extraction module is used for extracting key frames and corresponding unique numbers from the video data to be verified;
the certificate storing hash searching module is used for searching a corresponding certificate storing hash value in the block chain based on the unique code;
and the hash comparison module is used for comparing the evidence storage hash value with the hash value of the key frame to obtain a verification result of the video data to be verified.
10. An electronic device comprising a processor and a memory storing a computer program, wherein the processor when executing the computer program performs the steps of the blockchain based video authentication method according to any one of claims 1 to 5 or performs the steps of the blockchain based video authentication method according to any one of claims 6 to 7.
11. A processor-readable storage medium, characterized in that the processor-readable storage medium stores a computer program for causing the processor to perform the steps of the blockchain based video authentication method of any one of claims 1 to 5 or to implement the steps of the blockchain based video authentication method of any one of claims 6 to 7.
CN202110468863.1A 2021-04-28 2021-04-28 Video evidence storing method, verification method and device based on block chain Pending CN115248940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110468863.1A CN115248940A (en) 2021-04-28 2021-04-28 Video evidence storing method, verification method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110468863.1A CN115248940A (en) 2021-04-28 2021-04-28 Video evidence storing method, verification method and device based on block chain

Publications (1)

Publication Number Publication Date
CN115248940A true CN115248940A (en) 2022-10-28

Family

ID=83696834

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110468863.1A Pending CN115248940A (en) 2021-04-28 2021-04-28 Video evidence storing method, verification method and device based on block chain

Country Status (1)

Country Link
CN (1) CN115248940A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117395474A (en) * 2023-12-12 2024-01-12 法序(厦门)信息科技有限公司 Locally stored tamper-resistant video evidence obtaining and storing method and system
CN117472902A (en) * 2023-10-11 2024-01-30 广州新赫信息科技有限公司 Shadow library data link tracing method based on trusted chain
CN117979118A (en) * 2024-03-29 2024-05-03 杭州海康威视数字技术股份有限公司 Data stream recording method, device, recorder and recording system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472902A (en) * 2023-10-11 2024-01-30 广州新赫信息科技有限公司 Shadow library data link tracing method based on trusted chain
CN117395474A (en) * 2023-12-12 2024-01-12 法序(厦门)信息科技有限公司 Locally stored tamper-resistant video evidence obtaining and storing method and system
CN117395474B (en) * 2023-12-12 2024-02-27 法序(厦门)信息科技有限公司 Locally stored tamper-resistant video evidence obtaining and storing method and system
CN117979118A (en) * 2024-03-29 2024-05-03 杭州海康威视数字技术股份有限公司 Data stream recording method, device, recorder and recording system

Similar Documents

Publication Publication Date Title
CN115248940A (en) Video evidence storing method, verification method and device based on block chain
US11418677B2 (en) Method for preventing image modification, image capturing device and image verification method
CN107360393A (en) Utilize the safe intensifiers of the CCTV of hardware security module and its method
US20180176503A1 (en) Signature generation system, signature generation apparatus, and signature generation method
CN102932650B (en) Video data integrity protection and verification method, equipment and system
EP2779640A1 (en) Security system for tracking and surveilling an object determined as unrecognizable using a surveillance camera and method for providing security service using the system
CN110022355B (en) Storage method, verification method and equipment of environment data in specific scene
KR101951605B1 (en) Cctv image security system to prevent image leakage
WO2024012515A1 (en) Vehicle monitoring method and device, and storage medium
CN105447642A (en) Engineering digital photograph verification system based on two-dimension code and verification method
CN105518697A (en) Method implemented by computer for capturing evidentiary audiovisual and/or multimedia information and computer program
EP3659311A1 (en) Data stream integrity
CN108900910A (en) Monitor the method and system of IPTV service content legality
KR101338341B1 (en) Cctv media secure transmission system and method thereof
Mercan et al. Blockchain‐based video forensics and integrity verification framework for wireless Internet‐of‐Things devices
KR101331201B1 (en) Cctv media secure transmission system and method thereof
CN107911359B (en) Method for acquiring electronic data
US20210099772A1 (en) System and method for verification of video integrity based on blockchain
CN111600879B (en) Data output/acquisition method and device and electronic equipment
WO2015075578A1 (en) Authentication for an image or video
CN116756750A (en) Medical sensitive data acquisition desensitization method
CN112307875A (en) Face verification method and face verification system
CN110992219A (en) Intellectual property protection method and system based on block chain technology
CN107292133A (en) The obfuscation method and device of artificial intelligence
CN112966042A (en) Law enforcement recorder information processing method and system 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