CN110650321B - Block chain technology-based video content tamper-proof, loss-proof and recovery method - Google Patents

Block chain technology-based video content tamper-proof, loss-proof and recovery method Download PDF

Info

Publication number
CN110650321B
CN110650321B CN201911014379.0A CN201911014379A CN110650321B CN 110650321 B CN110650321 B CN 110650321B CN 201911014379 A CN201911014379 A CN 201911014379A CN 110650321 B CN110650321 B CN 110650321B
Authority
CN
China
Prior art keywords
video
block
data
camera
node
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.)
Active
Application number
CN201911014379.0A
Other languages
Chinese (zh)
Other versions
CN110650321A (en
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201911014379.0A priority Critical patent/CN110650321B/en
Publication of CN110650321A publication Critical patent/CN110650321A/en
Application granted granted Critical
Publication of CN110650321B publication Critical patent/CN110650321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a method for preventing abnormal situations such as video content tampering and video content loss by adopting a block chain technology and relying on a video monitoring P2P network and recovering the abnormal video contents. The invention can effectively prevent the video data from being distorted by designing a reasonable and efficient tamper-resistant data structure comprising a node type, a video frame data structure, a video block chain structure and the like, and by utilizing the original tamper-resistant design thought of the block chain and combining the tamper-resistant method designed by the invention, the tampered video data can be recovered by a synchronization method.

Description

Block chain technology-based video content tamper-proof, loss-proof and recovery method
Technical Field
The invention relates to the technical field of block chains, in particular to a method for preventing video content from being tampered, lost and restored by using a block chain technology.
Background
The block chain technology is a novel application mode which integrates computer technologies such as data distributed storage, a point-to-point transmission network, a consensus mechanism and an encryption algorithm.
In a narrow sense, a block chain is a chain data structure formed by connecting blocks consisting of data by a hash pointer sequence according to a time sequence, and simultaneously, the data in the blocks can not be falsified in a cryptographic mode, the chain data structure is independently stored in different nodes, and a consensus mechanism ensures the consistency and the unforgeability of the data stored in the different nodes.
In a broad sense, the block chain is a brand-new distributed infrastructure and a computing mode in which a block chain type data structure is used for verifying and storing data, a consensus mechanism is used for distributed nodes to generate data, the nodes independently verify and update the data, the data transmission and access safety is guaranteed in a cryptographic mode, and data is programmed and operated by an intelligent contract composed of automatic script codes.
The block chain is a bottom layer technology used by bit coins, and the most attractive of the block chain technology is a decentralization thought of the block chain technology, the block chain technology abandons the traditional mode of managing data by a single central mechanism, and maintains the data by all nodes of the whole network together, so that the data is safely stored, and the block chain has the characteristics of being unforgeable, being not tamperable, being traceable, being anonymous and the like. Therefore, the block chain is a distributed account book, each node independently maintains account book data, each account book data comprises all historical data, and the account books are connected through a hash pointer. Normally, the whole network maintains common blockchain data, and the data stored by a single node is consistent with the data maintained by other nodes of the whole network. The block chain consensus mechanism and cryptographic techniques ensure that an attacker does not succeed easily once he or she attempts to tamper with the data.
In recent years, children abuses such as children abuses in kindergartens occur in domestic continuous three-in-one, and children abuses occur even in private kindergartens with expensive charges in first-line cities with the best peace conditions. As is well known, video monitoring data is generally stored in a garden, when law enforcement departments and parents require to view video monitoring, related persons in charge always lose monitoring videos or lose some key pictures in the monitoring videos due to the damage of a camera, the damage of a hard disk stored in the videos and the like, so that the law enforcement departments cannot effectively obtain evidence, and further, the law enforcement departments cannot rapidly and effectively punish criminals. Therefore, the video data can be prevented from being tampered by using a decentralized technology, an encryption technology and a distributed storage technology of a block chain, and the video data loss detection and the video content recovery are realized, so that a powerful support is provided for later-stage investigation and evidence obtaining, and a powerful guarantee is provided for social supervision and supervision.
Disclosure of Invention
The invention provides a method for preventing abnormal situations such as video content tampering and video content loss by adopting a block chain technology and relying on a video monitoring P2P network and recovering the abnormal video contents.
In order to solve the technical problems, the invention adopts the following technical scheme:
the invention can effectively prevent the video data from being distorted by designing a reasonable and efficient tamper-resistant data structure comprising a node type, a video frame data structure, a video block chain structure and the like, and by utilizing the original tamper-resistant design thought of the block chain and combining the tamper-resistant method designed by the invention, the tampered video data can be recovered by a synchronization method.
The method is realized by the following steps:
designing a video monitoring P2P network:
the video surveillance P2P network contains two different types of nodes: the system comprises a data source node and a video block chain node, wherein the data source node consists of a camera and is mainly responsible for generating and transmitting video data; the latter is responsible for receiving, verifying and forwarding video blocks, competition for video block billing rights, and storage and update of video block chains.
Designing a tamper-resistant data type and structure, including the following:
1. a creating block containing all the IP information of the cameras;
2. the camera head block comprises the information of the created block hash value, the camera IP and the like;
3. combining the video data pairwise according to the time sequence to form a Merkel tree structure;
4. the video block comprises information such as a Merkel tree root, the total number of frames, a preorder block hash value, a camera IP and the like;
5. the video data comprises video frame data, a timestamp, a camera IP and other information;
6. forming a video block chain by the created block, the camera head block and the video block;
7. the video generated by each camera is separately corresponding to a video block chain, and the corresponding camera head block points to the same created area;
8. the video frame pool stores video frame data subjected to validity check, and the orphan pool stores video frame data which temporarily does not have the arrival of the preceding video frame data;
9. and various kinds of alarm information are stored in the alarm pool.
The video content tamper-proofing steps are as follows:
1. checking whether the IP address of the camera in the created block is falsified:
1.1) in each video block chain node, starting from a first created block and then following a camera head block, wherein the hash value of the created block stored in the head block points to the created block, and when the IP address of a camera in the created block is tampered, the hash value of the tampered created block is inconsistent with the hash value of the created block stored in the camera head block, so that the created block is tampered;
1.2) if a falsifier has the ability to falsify the created block hash value in the camera head block together, even if the hash values of the pre-sequences in all video blocks in the sequence of the camera head block are falsely modified together, only one of a plurality of video block chains hooked to the created block is falsely modified, and other video block chains still detect that the created block is falsely modified; the video block chain nodes form a main chain group by accessing chains of the same created block, and the chains are the longest as the main chain for butting the specific IP;
1.3) if a falsifier has the ability to falsifie the created block and all the video block chains contained in the created block, storing the hash value of the original created block into the limited memory area, regularly detecting whether the hash value of the created block stored in the video block chain node is consistent with the hash value stored in the limited memory area, and if the hash value is inconsistent with the hash value, indicating that the created block of the video block chain node is falsified;
2. preventing a tamperer from using fake video data to tamper with a chain of video blocks
2.1) a workload certification mechanism PoW used by bitcoin is adopted, each video block chain node fairly competes for the video block accounting right by comparing the power of calculation, and the power of calculation competition is almost equal to each node, so that a tamperer hardly continuously obtains the accounting right under normal conditions, and the tamperer is prevented from manufacturing the longest pseudo chain;
3. preventing a tamperer from using a strong effort to tamper with a chain of video blocks
3.1) counting the nodes which obtain the accounting weight of the video block each time, and generating an alarm if a certain node obtains more than fifty percent of the accounting weight in a period;
4. verifying the validity of video data frames, preventing dummy frames from being added to video block chains or video frame data from being lost
4.1) verifying whether the IP address of the camera stored in the video frame data is legal or not to prevent a false frame;
4.2) verifying the frame length stored by the video frame data and the actually received frame length to prevent loss;
5. verifying validity of video block and preventing counterfeit video block from being added into block chain
5.1) verifying whether the IP address of the camera stored in the video block is legal or not to prevent pseudo data;
5.2) verifying whether the video block accords with a workload certification algorithm;
5.3) verifying whether the hash value of the video root node of the video block is consistent with the hash value calculated by a Merkel tree of video data hooked below the video root node, and preventing the video data from being tampered;
5.4) verifying whether all video data in the video data Merkel tree are legal and valid;
6. recovery of video frame data
6.1) for video frame data with incomplete data or video frame data which is not received, the video frame data needs to be synchronized from other nodes, and the two types correspond to two conditions of bad frames and frame loss in an alarm pool, so that the IP, frame numbers and time stamps of cameras which the video frame data belong to can be obtained from alarm information, and accurate video data can be positioned from other video zone chain nodes according to the combination of the three parameters, thereby completing synchronization.
Compared with the prior art, the invention adopting the technical scheme has the following technical effects:
1. an effective and reasonable video monitoring P2P network is designed, and video contents are not mastered in the hands of a unique owner by virtue of the network;
2. the video content can be effectively prevented from being tampered;
3. the video content abnormity can be detected quickly, and the abnormal data can be recovered quickly.
Drawings
FIG. 1 is a schematic diagram of a video surveillance P2P network based on the blockchain technique;
FIG. 2 is a schematic diagram of a video block chain structure;
FIG. 3 is a schematic diagram of network connections for different node types;
FIG. 4 is a schematic diagram of a video blockchain created block;
FIG. 5 is a block data structure diagram of a camera head;
FIG. 6 is a diagram illustrating a video block header data structure;
FIG. 7 is a schematic diagram of a Merkel tree structure of video data;
FIG. 8 is a schematic diagram of a chain structure made up of video blocks;
FIG. 9 is a diagram illustrating a video data structure;
FIG. 10 is a diagram illustrating the relationship between a creative tile, a camera head tile, and a video tile;
FIG. 11 is a schematic diagram of a video frame pool and an orphan pool;
FIG. 12 is a schematic diagram of an alarm pool;
FIG. 13 is a schematic diagram of detecting camera IP addresses;
FIG. 14 is a diagram illustrating a method for tampering with a chain of video blocks;
FIG. 15 is a schematic diagram of a tamper resistant video block chain;
FIG. 16 is a schematic diagram of a method for comparing hash values of foundational blocks to prevent tampering;
FIG. 17 is a diagram illustrating a second method for tampering with a chain of video blocks;
FIG. 18 is a schematic illustration of a method of preventing brute force tampering;
FIG. 19 is a schematic view of a tamper-proof and loss-proof process for video frame data;
FIG. 20 is a schematic view of a data frame data recovery process;
fig. 21 is a schematic view of a video block structure assembled by video block chain nodes;
FIG. 22 is a flowchart illustrating a process for verifying video block validity;
Detailed Description
The technical scheme of the invention is further explained in detail by combining the attached drawings:
as shown in FIG. 1, assume that there are five independent, peer-to-peer nodes, node camera, node 1, node 2, node 3, and node 4, which together form a P2P video surveillance network. The video data source comes from the node camera, and the data generated by the camera in the node camera is sent to the nodes (node 1 and node 2) adjacent to the video data source in the P2P network and then forwarded to the nodes (node 3 and node 4) adjacent to the video data source, so that all the nodes except the node camera in the whole P2P network can receive the video data in a short time. After receiving video frame data each time, four nodes except the node camera firstly need to detect the integrity of the video frame data to prevent the video frame data from being lost or damaged, the passing video frame data is detected, the nodes can put the passing video frame data into a local video frame pool, and simultaneously can extract a plurality of video frames from the video frame pool according to the time sequence of video generation to construct a video block and wait for being recorded into a video block chain. In addition, the four nodes adopt a workload certification algorithm (PoW) used by the block chain to compete for the accounting right, the node which obtains the accounting right has the right to propose the video block constructed by the node to be written into the video block chain, meanwhile, the video block is broadcasted to other nodes, and the video block is synchronized to the local video block chain after being verified by other nodes, so that the synchronization of the video data of the whole network is realized.
The structure of the video block chain is shown in fig. 2, and is composed of a creation block, a camera head block and a plurality of video blocks, and the video blocks contain complete video frame data. The following describes the video block chain data structure model according to the present invention in detail:
1. in fig. 1, although the node camera belongs to a peer node in the P2P video surveillance network with other four nodes, the functions of the node camera and the other four nodes are different. The node camera is only responsible for generating video frame data, does not participate in the storage of the video frame data and does not participate in the competition of accounting rights of video blocks, so that the node does not store a video block chain and does not receive data blocks forwarded by other nodes; the other four nodes do not generate video frame data but participate in the video block accounting right competition while maintaining the local video block chain, so that the nodes belong to video block chain nodes. Therefore, the video monitoring P2P network designed by the invention comprises two different types of nodes, namely a data source node and a video blockchain node, which is completely different from the node concept of the blockchain. The different nodes camera need not establish a network connection since they are only responsible for transmitting video frame data, so they need to be connected to at least one video block chain node, as shown in fig. 3.
Assuming that the cameras in node camera in fig. 1 all capture video frame data of images in node 1, node camera and node 1, although geographically overlapping, belong to different peer nodes in the P2P network.
2. Before the camera video data is generated, a created block of a video block chain is generated, and the data structure is shown in fig. 4. The creating block is composed of IP addresses of all the cameras, namely IP1, IP … and IP N, and identifies IP information of the currently accessed camera. Creation of the founder block is successful and then synchronized to the nodes in the P2P network.
3. The first subsequent block after the created block is a camera head block, the video block chain designed by the invention not only comprises a main block chain, but also creates a video block chain belonging to each camera as the main block chain, which is different from the design concept that the bitcoin block chain only comprises a main block chain. And respectively creating corresponding video block chains according to different IP addresses of the cameras. The camera head block data structure is shown in fig. 5 and is composed of four parts:
(1) the invention adopts a double SHA256 of a cryptographic Hash algorithm used by bitcoin to calculate the Hash value of the created block, and ensures the data integrity of the created block by utilizing the unidirectionality of the cryptographic Hash algorithm, thereby obtaining the Hash value of the created block, namely Hash _ initblock ═ SHA256(SHA256(IP1| | IP2| | | |.
(2) The camera IP address camera _ IP is used for reflecting geographic position information, is used for identifying a camera for collecting video content and is also used for helping a subsequent video block to find a video block chain to which the subsequent video block belongs;
(3) the timestamp marks the time generated by the block, and the timestamp in the camera head block is 0;
after the camera head block is successfully created, the camera head block is automatically synchronized to each node through a P2P network, and the created block is pointed.
4. The subsequent block behind the camera head block is a video block, the video block is formed by a certain amount of video data generated by the camera, and the data structure of the video block is formed by a video block head data structure and a video data Merkel tree structure.
The video block header data structure is shown in fig. 6 and consists of six parts:
(1) a nonce for a workload attestation algorithm (PoW);
(2) preamble block hash value pre _ H: the hash pointer points to the preamble block, the preamble block of the first video block points to the camera head block, and the subsequent preamble blocks all point to the video blocks which are linked;
(3) IP address of camera: abbreviated as camera _ ip. The method comprises the steps of reflecting geographic position information, identifying a camera for collecting video data, and helping a subsequent video block to find a video block chain to which the subsequent video block belongs;
(4) time stamping: abbreviated as timestamp, time of video block generation;
(5) total number of frames: abbreviated as frameCount, identifying the total amount of video frame data hooked under the meikel tree of the video data in the video block;
(6) video tree root: the hash value points to a corresponding video data Merker tree, and the hash value can effectively detect whether the video data hung under the Merker tree is tampered;
the video data, the merkel tree, is shown in fig. 7. The method comprises the steps of respectively calculating hash values of a certain amount of video data by using a double SHA256 algorithm (represented by DHash ()), forming first-layer leaf nodes of a Merkel tree, then grouping the hash values in pairs, combining the two hash values in each group, carrying out hash calculation again, forming a leaf node of the upper layer by the calculation result, grouping the leaf nodes of the upper layer in pairs again, combining the two hash values of each group to carry out hash calculation, and so on until a single hash value, namely a tree root node, is obtained, wherein the tree structure is called the Merkel tree structure.
The complete data structure of the video blocks and their constituent chain structures are shown in fig. 8.
5. The video data structure contains, in addition to a frame of complete data, the camera IP address, the timestamp and the frame data length. As shown in fig. 9.
(1) The IP address of the camera is abbreviated as camera _ IP, the video data is identified to which camera is used for generating, and the video blocks generated by each camera in the subsequent process can be hung on the corresponding video block chain according to the IP address of the camera;
(2) a timestamp, abbreviated as timestamp, identifying the time of video data generation;
(3) frame data length, identifying video data size;
(4) frame data, identifying a frame of complete video data;
6. the relationship of the foundational block, the camera head block and the video block is shown in fig. 10. The invention designs that corresponding video block chains are respectively created according to different IP addresses of cameras, a plurality of video blocks are sequentially hung on the corresponding video block chains according to the time sequence, and each video block chain points to the same created block.
7. Video frame pool and orphan pool
Once the camera monitoring is started, the node camera continuously pushes video data to the video monitoring P2P network, and after the video data are received by the node, the video data are not immediately hung in a video block chain, but are put into a local video frame pool of the receiving node through tamper resistance and integrity detection, and are stored strictly according to the time stamp sequence. The video frame pool is a section of memory area for temporarily storing video data, and only a node which completes workload certification can hang a video block assembled by a plurality of video data extracted from the local video frame pool to a local video block chain, so that the work of updating the local video block chain is completed. In addition, the video chunk is broadcast to neighboring nodes until all nodes in the entire P2P network receive the video chunk, while leaving other nodes to verify and update their own local video chunk chains.
In addition, the P2P network may have a delay, which may cause that the video data in the subsequent time may arrive at the node first, then temporarily store the subsequent video data without the association of the preamble video data in the orphan pool, and extract and put into the video frame pool from the orphan pool after the preamble video data arrives at the node, so that the orphan pool is also a memory area for temporarily storing the video data, but compared with the video frame pool, the video data stored in the former is the video data linked according to the sequence of the timestamp, and the video data in the orphan pool is the data waiting for the arrival of the video data in the preamble time, once the preamble video data arrives at the node, the subsequent video data is extracted from the orphan pool and hung behind the preamble video data. The video frame pool and orphan pool are shown in fig. 11.
8. Warning pool
The alarm pool mainly stores alarm information sent by the node, for example, when the node receives video frame data containing bad frames or does not receive the video frame data within a certain time, the alarm information is written into the alarm pool. The alarm pool is also a segment of memory area, as shown in FIG. 12. The alarm information is shown in table 1.
TABLE 1 alarm information types and parameters
Figure GDA0002958663880000061
Where the frame number is the camera IP + timestamp, which is the time at which the frame data was generated.
The video content tamper-proof, loss-proof detection and recovery mechanism comprises the following steps:
1. it is possible for a tamperer to tamper with video content from the source of the video by replacing the camera directly with another camera, thus forging an entirely new chain of video blocks, thus requiring the IP address of the camera in the created block to be tampered with, assuming that the IP2 address in the created block is changed to the IP 2' address and a forged camera head block is created thereafter, so that subsequently forged video blocks can be smoothly hung on the chain. However, in the data structure of the camera head block described above, there is a field identified as the created block Hash value, and the field stores the created block Hash value Hash _ initblock, that is, the Hash value calculated by sha256(sha256(IP1| | IP2| |. | | IPN)), when a falsifier changes the IP2 address in the created block to an IP2 'address, the Hash value calculated by sha256(sha256(IP1| | IP 2' |. | | IPN)) is inevitably inconsistent with the Hash value stored in the field in the camera head block created before falsification, so that falsification behavior can be detected, as shown in fig. 13.
Although the hash value of the preamble block in the block helps us detect that the data of the preamble block is tampered, if a tamperer tampers the hash values of the preamble blocks in the following block together until the latest block of the video block chain is tampered, the tampering action of the created block cannot be detected. In fact, a tamperer can tamper with the locally stored video block chain in its entirety, as shown in fig. 14. Although the tamperer has the ability to tamper with the local data, the other nodes in the P2P network should agree and update the block chain synchronously, so that the data can be tampered with. Due to the PoW mechanism using Bingworth, as long as a tamperer has enough power to obtain the video block accounting right, the tamperer can continuously make a pseudo video block until the length of the video block chain generated by the original camera IP2 is exceeded, and other nodes can accept the longest chain as the main chain, that is, the video block chain generated by the original camera IP2 will not grow, because no field of the camera IP2 exists in the created block, the video generated by the IP2 address will not be hung on the original video block chain of the IP2, and as time goes by, the video block chain of the camera IP 2' will grow longer and other nodes can accept the pseudo chain, including the approved created block.
Aiming at the possible tampering mode, the invention uses a smart design, namely more than one video zone block chain is designed, each camera corresponds to one video zone block chain belonging to the camera, and the node not only recognizes the longest video zone block chain as a main chain, but also takes the most video zone block chains as a main chain group. As shown in fig. 15, assuming that three cameras 1, 2, and 3 form a set of video zone block chains, a falsifier changes camera 1 in the created block to camera 4 and generates a forged created block, and then generates the created video zone block chain of camera 4 on this basis, but the camera head blocks of cameras 2 and 3 can detect that the created block has been falsified, so the video zone block chains generated by cameras 2 and 3 are not hung on the forged created block, and therefore only the forged video zone block chain generated by camera 4 exists on the forged created block.
2. If the calculation power owned by a falsifier is enough to falsifie all video block chains linked below the created block, the mentioned method using the longest video block chain as the main chain and the largest video block chain as the main chain group is invalid. After the video block chain creation block is generated, a tamper-proof timer is set to detect the creation block of the video block chain at regular time, the Hash value of the creation block is recalculated to obtain Hash _ initblock ', the Hash _ initblock ' is compared with the Hash value stored in the limited access area, if the two Hash values fail to be compared, namely Hash _ initblock is not equal to Hash _ initblock ', the fact that the IP address of at least one camera in the creation block is tampered is indicated, and the node cannot recognize the creation block and the hooked video block chain thereof. And when the comparison of the created block hash values fails, generating alarm information. The flow is shown in FIG. 16.
3. All the above descriptions are that a tamperer tampers the IP address of the camera and then hooks the video data of the tampered camera. How does a tamperer not change the IP address of the camera, but still follow the previous IP address and simply replace the video captured by the camera with other pictures or video sources? In this case, the falsifier does not need to falsifie the created block, but only needs to re-create a pseudo video block chain from the falsification start time and make the pseudo video block chain as the main chain beyond the original video block chain, so that other nodes accept the pseudo chain according to the principle that the longest video block chain is the main chain, as shown in fig. 17. Aiming at the tampering, the method adopted by the invention is to follow the decentralized design idea in the block chain technology adopted by the bitcoin, namely the PoW mechanism, and each node competes for the video block accounting right through calculation, and the calculation competition is almost equal to each node, so that a tamperer can hardly obtain the accounting right continuously under normal conditions, and the longest pseudo chain is successfully manufactured.
But the falsifier can obtain the accounting right to the maximum extent in the shortest time by improving the self-calculation, so that the forged video block chain can be continuously extended to be the longest chain, theoretically, if the falsifier obtains the calculation power of more than 50% of the whole network, the falsifier can continuously obtain the accounting right and successfully realize the falsification. The block chain technology of the bitcoin can ensure that the difficulty in acquiring the accounting right is readjusted in the whole network at intervals, so that the acquisition time of the accounting right is kept about ten minutes. But a tamperer can continuously increase the calculation power to try to continuously obtain the accounting right, and then aiming at the tampering caused by the strong calculation power of the tamperer, the method adopted by the invention is as follows: and judging whether a certain node acquires the accounting right more than three times within one hour, and sending alarm information if the node acquires the accounting right more than three times. Because the billing right acquisition interval is 10 minutes, there are approximately 6 billing right opportunities in an hour, and if a node gets more than fifty percent of the billing opportunities, it is likely to be a tamperer. A set of flow for preventing the strong calculation power tampering is designed for the method, as shown in fig. 18, firstly, each node stores the node information of successful accounting right competition each time; then after accounting right generation for every 6 times, each node counts which node has more than 3 times of successful acquisition times; and if the number of successful acquisition times of any node exceeds 3, generating an alarm.
4. The video frame data generated by the node camera is transmitted to the video zone block chain node connected with the node camera through the P2P network, and after the node receives the video frame data, whether the data frame is a fake frame or not is firstly checked, so that fake video data is prevented from entering the video zone block chain; secondly, when video data is transmitted in a network, the situation that partial data in one frame of data is lost exists inevitably, and then errors occur when the video is restored through the video data at a later stage, so the integrity of the data frame needs to be checked, and the data partial loss is prevented. The video block chain node receiving the data firstly extracts the IP information of the camera in the video frame, checks whether the IP belongs to one of the IP groups of the camera stored in the created block, if not, the video frame is not generated by a legal camera, and then generates alarm information, and the frame data is discarded at the same time without forwarding, thereby avoiding network flooding; after the data length is checked by the data structure, whether the received data length is consistent with the frame data length in the data structure or not is judged, if the data length is inconsistent with the frame data length in the data structure, the frame data is incomplete and lost, the node records the bad frame information into a local alarm pool, simultaneously generates alarm information and broadcasts the alarm information to the neighbor nodes, discards the data and does not forward the data, and therefore network flooding is avoided. The flow of checking the data frame is shown in fig. 19.
The video frame data which passes the check can be placed in a local video frame pool by the receiving node, and sequentially placed in the queues of the IP of the same camera according to the sequence of the timestamps, and waiting for the subsequent assembly of the video blocks.
5. The time stamp field is designed in the video frame data structure, so that whether lost data exist can be detected in time, and the problem that the video cannot be recovered at the later stage, especially the key frame is lost, is prevented. Therefore, the video data which are arranged according to the sequence of the time stamps are stored in the video frame pool of the local node, and if the time stamps are not continuous, frame loss is indicated. Since there may be latency in the P2P network, it may happen that video data arrives first at a node in a later time, and temporarily put into an orphan pool if some video data does not arrive with preceding video data. The invention assumes that a certain period of time is waited, and if the preamble video data is not received after the period of time, the data frame is possible to be lost, and then the alarm information is broadcasted to the neighbor node.
Meanwhile, the timestamp can uniquely identify the video frame data by combining with the IP address of the camera, and the video frame data can be quickly positioned according to the identification.
6. The method for restoring the video frame data comprises the following steps: from the steps 4 and 5, it is known that the node sends the alarm information to the neighboring node when receiving the bad frame or the lost frame, the neighboring node locates the video data in the local video frame pool according to the timestamp and the ip address after receiving the alarm information, if the data is located in the pool, the node verifies that the validity and integrity detection of the video frame is passed, at this time, the video data is sent to the alarm node, and the alarm node restores the frame data again according to the data; if the video data is not located, there may be two reasons, that is, the node receives a bad frame and fails the node check, and that the video data has not yet arrived at the node. For the former, when a node receives a bad frame, the node also records the bad frame into an alarm pool, after receiving the alarm of a neighbor node, the node checks the alarm pool without finding video data in a local video frame pool, if the alarm pool exists, the node does not need to transmit the alarm information to other neighbor nodes again, but records the alarm node, and replies the alarm node at the same time: the video data is also a bad frame at the side of me, and the video data is forwarded to me after the me receives the correct frame; for the latter, the node will forward the alarm information to the neighbor node, and reply the alarm node: the video data is not received at me and forwarded to other nodes. As long as the nodes in the network store the video data, the video data can be transmitted to the alarm node. And after receiving the correct video data replied by other nodes, the alarm node detects the integrity again, and if the detection is passed, the alarm node deletes the alarm information from the alarm pool. It should be noted that the alarm node needs to receive data replied by multiple nodes, and basically confirms that recovered data is correct and reliable if the replied data of multiple nodes are consistent, so as to prevent a malicious node from replying an error frame. A video data recovery flow chart is shown in fig. 20.
And after the alarm node resynchronizes the video data, the alarm information is deleted from the alarm pool.
7. The video block chain node extracts a plurality of video frame data from the local video frame pool to assemble into a video block, and the video block chain node competes for the video block accounting right through a workload certification mechanism PoW, so that the node acquiring the accounting right can hang the block claimed by the node to the video block chain of the node, as shown in fig. 21. The node broadcasts the block claimed by the node to the neighbor nodes of the node through the P2P network, after the neighbor nodes check the video block, the neighbor nodes forward the video block to the neighbor nodes of the node, until all the nodes in the network receive the video block, each node can independently check the video block, and the checked video block is hung on a local video block chain, so that the data synchronization of each node and the high consistency of the data content are ensured.
After the neighbor node receives the video block, the first step of inspection is started, namely the validity of the received video block is verified, mainly whether the head of the block meets the requirement of workload certification or not is verified, and then whether the IP of a camera in the video data in the block is consistent with the IP of the camera in the head of the block or not is verified, whether the total number of frames is consistent or not, whether the timestamps of the contained video data are continuous or not is verified, whether the frame data are correct and complete or not is verified, and whether the frame data are data in a local video frame pool or not is verified.
And starting the second step of checking through the video blocks of the first step of validity check, namely checking whether the video block chain to which the video block belongs can be found, wherein the method comprises the following steps: and finding the corresponding block chain hanging chain through the camera IP in the block head data structure, and if the corresponding block chain is not found, discarding and generating alarm information to prompt that the system camera IP is possibly tampered.
And finally, hanging the verified block into a local video block chain, updating a video frame pool of the block, deleting the video data in which the chain is hung, and stopping the currently-performed workload proving calculation.
Through the video block inspection, the forged video block can be prevented from tampering the video block chain. The flow is shown in FIG. 22.
8. The invention designs a central process for centralized alarm processing, which can detect the alarm pool of each node at regular time, if all nodes in the whole network receive bad frames or no video data and continue for a period of time, the problem of the whole P2P network is shown.

Claims (1)

1. A method for preventing video content from being tampered, lost and recovered based on a block chain technology is characterized by comprising the following steps:
1. checking whether the IP address of the camera in the created block is falsified:
1.1, in each video block chain node, starting from a first created block, and then following a camera head block, wherein the created block is composed of IP addresses of cameras, namely IP1, … and IPN, and identifies the IP information of the camera accessed to the current network, the created block Hash value stored in the camera head block is a Hash value calculated by adopting a cryptographic Hash algorithm double sha256, namely Hash _ initblock ═ sha256(sha256(IP1| | IP2 |. | | | | IPN)), the Hash value points to the created block, and once the IP address of the camera in the created block is tampered, the Hash value recalculated by adopting the sha256 in the tampered created block is inconsistent with the created block Hash value stored in the camera head block, so that the created block is verified to be tampered;
1.2, the video block chain is a chain structure consisting of a created block, a camera head block and a video block, the video block chain nodes select the video block chains which point to the same created block and have the most chains as the chains forming the main chain group, the video block chains in the main chain group are in butt joint with different camera IPs, and the video block chain nodes select the video block chain with the longest chain length from the video block chains in butt joint with the same camera IP as the main chain for butt joint with the camera IP;
if the falsifier has the ability to falsifie the created block hash value in the camera head block, even the hash values of the pre-sequences in all video blocks subsequent to the camera head block are falsified together, but only one of the video block chains hooked by the created block is falsified, and other video block chains still detect that the created block is falsified;
1.3, if a falsifier has the ability to falsifie the created block and all video block chains contained in the created block, storing the hash value of the original created block into the limited memory area, regularly detecting whether the hash value of the created block stored in the video block chain node is consistent with the hash value stored in the limited memory area, and if the hash value is not consistent with the hash value stored in the limited memory area, indicating that the created block of the video block chain node is falsified;
2. preventing a tamperer from using fake video data to tamper with a chain of video blocks:
2.1, adopting a workload certification mechanism PoW used by bitcoin, wherein each video block chain node fairly competes for the video block accounting right through the specific calculation power;
3. tamperers are prevented from using a strong effort to tamper with the chain of video blocks:
3.1, counting the nodes which obtain the accounting weight of the video block each time, and generating an alarm if a certain node obtains more than fifty percent of the accounting weight in a period;
4. verifying the validity of the video data frame, and preventing a dummy frame from being added into a video block chain or video frame data from being lost:
4.1, verifying whether the IP address of the camera stored in the video frame data is legal or not, preventing a false frame, extracting the IP address of the camera from the received video frame data by the video block chain node, judging whether the IP address belongs to one of the IP groups of the cameras stored in the creation block or not, if so, indicating that the video data frame is legal, and if not, indicating that the video data frame is illegal;
4.2, verifying the frame length stored by the video frame data and the actually received frame length to prevent loss, extracting the frame data length from the received video frame data by the video block chain node, simultaneously calculating the length of the actually received video frame data, and comparing the two lengths, wherein if the two lengths are consistent, the video frame data is complete, and if the two lengths are inconsistent, the video frame data is incomplete;
5. verifying the validity of the video block, and preventing a fake video block from being added into a block chain:
5.1, verifying whether the IP address of the camera stored in the video block is legal or not, preventing pseudo data, extracting the IP address of the camera from the received video block by the video block chain node, judging whether the IP address belongs to one of the IP groups of the camera stored in the created block or not, if yes, indicating that the video block is not a pseudo block, and if not, indicating that the video block is a pseudo block;
5.2, verifying whether the video block conforms to a workload certification algorithm;
5.3, verifying whether the hash value of the video root node of the video block is consistent with the hash value calculated by a Merkel tree of video data hooked below the video root node, and preventing the video data from being tampered;
5.4, verifying whether all video data in the video data Merkel tree are legal and effective;
6. and (3) restoring video frame data:
6.1, for video frame data with incomplete data or video frame data which is not received, the video frame data is required to be synchronized from other nodes, the two types correspond to two conditions of bad frames and frame loss in an alarm pool, so that the IP, frame numbers and time stamps of cameras to which the video frame data belong are obtained from alarm information, and accurate video data are positioned from other video block chain nodes according to the three parameters, so that synchronization is completed.
CN201911014379.0A 2019-10-24 2019-10-24 Block chain technology-based video content tamper-proof, loss-proof and recovery method Active CN110650321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911014379.0A CN110650321B (en) 2019-10-24 2019-10-24 Block chain technology-based video content tamper-proof, loss-proof and recovery method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911014379.0A CN110650321B (en) 2019-10-24 2019-10-24 Block chain technology-based video content tamper-proof, loss-proof and recovery method

Publications (2)

Publication Number Publication Date
CN110650321A CN110650321A (en) 2020-01-03
CN110650321B true CN110650321B (en) 2021-05-04

Family

ID=69013389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911014379.0A Active CN110650321B (en) 2019-10-24 2019-10-24 Block chain technology-based video content tamper-proof, loss-proof and recovery method

Country Status (1)

Country Link
CN (1) CN110650321B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021190925A (en) 2020-06-02 2021-12-13 キヤノン株式会社 Processing apparatus, image pickup apparatus, and processing method
CN112055173B (en) * 2020-08-24 2023-04-18 深圳区块大陆科技有限公司 Method for preventing monitoring video from being tampered by using block chain
CN112243100A (en) * 2020-09-30 2021-01-19 重庆兴创巢科技发展有限责任公司 Video recording method for real-time recovery of mobile terminal
CN113411614B (en) * 2021-06-21 2022-02-18 环球数科集团有限公司 Video protection system based on block chain technology and computer storage medium
CN113840178A (en) * 2021-09-07 2021-12-24 武汉东智科技股份有限公司 Method for preventing timestamp in monitoring video stream from being tampered
CN115119070B (en) * 2022-06-08 2024-04-16 中国银行股份有限公司 Video signing method, device and system based on alliance chain
CN115499138B (en) * 2022-11-16 2023-03-24 成都同步新创科技股份有限公司 High-performance storage tamper-proof verification method and storage system combined with block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163750A (en) * 2018-04-10 2019-08-23 吉安英佳电子科技有限公司 A kind of electronic evidence certification and exchange method and system based on block chain
CN110210243A (en) * 2019-04-30 2019-09-06 江苏亿鸿信息工程有限公司 A kind of monitor video evidence-obtaining system and its evidence collecting method based on block chain
CN110248130A (en) * 2019-04-16 2019-09-17 山东冰链网络信息科技有限公司 Credible safeguards system, verification method and the storage medium of video data
CN110336773A (en) * 2019-04-16 2019-10-15 山东工商学院 Credible safeguards system, verification method and the storage medium of IoT device data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10637645B2 (en) * 2017-05-11 2020-04-28 Microsoft Technology Licensing, Llc Cryptlet identity

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163750A (en) * 2018-04-10 2019-08-23 吉安英佳电子科技有限公司 A kind of electronic evidence certification and exchange method and system based on block chain
CN110248130A (en) * 2019-04-16 2019-09-17 山东冰链网络信息科技有限公司 Credible safeguards system, verification method and the storage medium of video data
CN110336773A (en) * 2019-04-16 2019-10-15 山东工商学院 Credible safeguards system, verification method and the storage medium of IoT device data
CN110210243A (en) * 2019-04-30 2019-09-06 江苏亿鸿信息工程有限公司 A kind of monitor video evidence-obtaining system and its evidence collecting method based on block chain

Also Published As

Publication number Publication date
CN110650321A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
CN110650321B (en) Block chain technology-based video content tamper-proof, loss-proof and recovery method
CN108881169B (en) Time distribution and synchronization method and system based on block chain and data processing system
CN109104413B (en) Method for solving intersection of private data for secure multi-party computation and verification method
US11930113B2 (en) Blockchain hybrid consensus-based system for maintaining domain name information
CN108881166B (en) Virtual account block chain verification system with external fixed physical node
EP4209980A1 (en) Computer-implemented system and method for managing a large distributed memory pool in a blockchain network
CN109408108A (en) A kind of Software Version data management system and method for building up based on block chain
CN109543065B (en) Video active identification method combined with block chain
TW200849888A (en) Method and system for resilient packet traceback in wireless mesh and sensor networks
CN109086626A (en) The bookkeeping methods and system of block chain network
CN109101836A (en) The bookkeeping methods and system of block chain network
CN111209339B (en) Block synchronization method, device, computer and storage medium
US20230153806A1 (en) Method and device for preventing forking of blockchain
US11239999B1 (en) Blockchain network communications system
CN111752246A (en) Unmanned aerial vehicle bee colony cooperative work platform based on block chain and artificial intelligence drive
CN114372296B (en) Block chain-based user behavior data auditing method and system
CN113010903A (en) Catering industry oil smoke online monitoring method and system based on block chain
CN110830259A (en) Method and system for providing originality and integrity certification for multimedia data
Peterson et al. Towards detection of selfish mining using machine learning
US11831749B1 (en) Method and system for utilizing the infrastructure of a blockchain to enhance the degree of reliability of another blockchain
CN101754206A (en) Multi-dimensional en-route filtering method of wireless sensor network
CN112381599A (en) Shared charger rental system and method based on block chain technology
CN116614519A (en) Video and related information lightweight trusted uplink method based on optimization consensus algorithm
CN109167665B (en) Robot competition rule management system
Ma et al. A practical solution for blockchain-secured sharing of trustworthy traffic information in vehicular ad hoc networks

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
GR01 Patent grant
GR01 Patent grant