Video tamper-proof method and video verification method

文档序号:260168 发布日期:2021-11-16 浏览:24次 中文

阅读说明:本技术 视频防篡改方法及视频验证方法 (Video tamper-proof method and video verification method ) 是由 陈立敬 于 2017-11-23 设计创作,主要内容包括:本发明公开了一种视频防篡改方法及视频验证方法,该视频防篡改方法包括:判断至少一帧压缩图像的尺寸是否大于一阈值,若判断结果为是,则执行下列步骤:对所述至少一帧压缩图像进行处理,获取所述至少一帧压缩图像的特征数据;对所述特征数据进行加密,产生校验和;生成附加增强信息,所述附加增强信息包括所述校验和;以及,将所述附加增强信息与所述至少一帧压缩图像一同传输和/或保存,以利用所述附加增强信息验证所述至少一帧压缩图像的真实性。通过上述方式,本发明能够鉴定视频资料的真实性。(The invention discloses a video tamper-proofing method and a video verification method, wherein the video tamper-proofing method comprises the following steps: judging whether the size of at least one frame of compressed image is larger than a threshold value, if so, executing the following steps: processing the at least one frame of compressed image to obtain the characteristic data of the at least one frame of compressed image; encrypting the characteristic data to generate a checksum; generating additional enhancement information, the additional enhancement information including the checksum; and transmitting and/or storing the additional enhancement information together with the at least one frame of compressed image to verify authenticity of the at least one frame of compressed image using the additional enhancement information. Through the mode, the authenticity of the video data can be identified.)

1. A video tamper-proofing method, comprising:

judging whether the size of at least one frame of compressed image is larger than a threshold value, if so, executing the following steps:

processing the at least one frame of compressed image to obtain the characteristic data of the at least one frame of compressed image;

encrypting the characteristic data to generate a checksum;

generating additional enhancement information, the additional enhancement information including the checksum; and

transmitting and/or saving the additional enhancement information together with the at least one frame of compressed image to verify authenticity of the at least one frame of compressed image using the additional enhancement information.

2. The method according to claim 1, wherein the processing at least one frame of compressed image, and the obtaining the feature data of the at least one frame of compressed image comprises:

performing segmentation processing on at least one frame of compressed image to obtain at least two sub image blocks; and

and respectively extracting characteristic data from the at least two sub-image blocks.

3. The method according to claim 2, wherein the performing segmentation processing on the at least one frame of compressed image to obtain at least two sub image blocks comprises:

randomly generating an offset; and

utilizing the offset to carry out segmentation processing on the at least one frame of compressed image to obtain at least two sub image blocks;

wherein the at least two sub image blocks include a first sub image block and a second sub image block, and the first sub image block is larger than the second sub image block in size by a predetermined amount of the offset.

4. The method of claim 3, wherein the additional enhancement information further comprises the offset.

5. The method according to claim 2, wherein the extracting feature data for the at least two sub image blocks respectively comprises:

respectively extracting the feature data of the at least two sub-image blocks to obtain at least first feature data and second feature data;

the encrypting the feature data and generating a checksum comprises:

encrypting the at least first characteristic data and the second characteristic data respectively to generate at least two corresponding check codes; and

and synthesizing the checksum by using the at least two check codes.

6. The method of claim 1, further comprising:

adding a watermark in a manner of increasing low frequency ripples in at least one frame of image; and

and compressing the at least one frame of image added with the watermark to obtain the at least one frame of compressed image.

7. The method of claim 6, wherein the watermark includes an identification of a video capture device and/or a time parameter.

8. The method of claim 7, wherein the time parameter comprises higher data and lower data, the higher data being the same as a time stamp of the watermark, the lower data increasing continuously.

9. A video authentication method, comprising:

acquiring a plurality of frames of compressed images and corresponding additional enhancement information, wherein the additional enhancement information comprises a checksum;

calculating a checksum corresponding to the feature data of the compressed image;

judging whether the calculated checksum is equal to the checksum in the additional enhancement information or not so as to detect whether the additional enhancement information meets a preset condition or not; and

if the additional enhancement information meets the preset condition, determining that the compressed image corresponding to the additional enhancement information is real;

before calculating the checksum corresponding to the feature data of the compressed image, the method includes:

and judging whether the size of the compressed image is larger than a threshold value, if not, not executing the step of calculating the checksum corresponding to the feature data of the compressed image, and directly judging that the additional enhancement information meets the preset condition.

Technical Field

The invention relates to the field of video processing, in particular to a video tamper-proofing method and a video verification method.

Background

Nowadays, security surveillance videos can be submitted to a court as evidence, but video data shot by many security surveillance products are only simply compressed and stored, so that the video data are very easy to be tampered or forged, and the authenticity of the video data cannot be identified through the video data due to the fact that the video data are only simply processed, so that the reliability of the video data as legal evidence is greatly reduced.

Disclosure of Invention

The invention mainly solves the technical problem of providing a video tamper-proofing method and a video verification method, and can solve the problem that the authenticity of video data cannot be identified in the prior art.

In order to solve the technical problems, the invention adopts a technical scheme that: there is provided a video tamper-proofing method comprising: judging whether the size of at least one frame of compressed image is larger than a threshold value, if so, executing the following steps: processing the at least one frame of compressed image to obtain the characteristic data of the at least one frame of compressed image; encrypting the characteristic data to generate a checksum; generating additional enhancement information, the additional enhancement information including the checksum; and transmitting and/or storing the additional enhancement information together with the at least one frame of compressed image to verify authenticity of the at least one frame of compressed image using the additional enhancement information.

In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a video authentication method comprising: acquiring a plurality of frames of compressed images and corresponding additional enhancement information, wherein the additional enhancement information comprises a checksum; calculating a checksum corresponding to the feature data of the compressed image; judging whether the calculated checksum is equal to the checksum in the additional enhancement information or not so as to detect whether the additional enhancement information meets a preset condition or not; and if the additional enhancement information meets the preset condition, determining that the compressed image corresponding to the additional enhancement information is real. Before calculating the checksum corresponding to the feature data of the compressed image, the method includes: and judging whether the size of the compressed image is larger than a threshold value, if not, not executing the step of calculating the checksum corresponding to the feature data of the compressed image, and directly judging that the additional enhancement information meets the preset condition.

The invention has the beneficial effects that: different from the situation of the prior art, in the embodiment of the present invention, before calculating the checksum of at least one frame of compressed image, it is determined whether the size of the at least one frame of compressed image is not greater than a threshold, if the determination result is not greater than the threshold, the size of the at least one frame of compressed image is small, that is, the size of the compressed image is small, that is, the redundant data in the compressed image is small, and the probability of malicious alteration of the picture is small, at this time, if the step of calculating the checksum is still performed, since the data amount of the data is small, there is a great risk that the calculation method of the checksum is leaked, but it is not beneficial to identify the authenticity of the video data, therefore, if the size of the at least one frame of compressed image is not greater than the threshold, the step of calculating the checksum is not performed, so as to avoid the calculation method of the checksum being leaked.

Drawings

FIG. 1 is a schematic flow chart of a first embodiment of a video tamper-proofing method according to the present invention;

FIG. 2 is a flow chart of a second embodiment of the video tamper-proofing method of the present invention;

FIG. 3 is a flow chart of a third embodiment of the video tamper-proofing method of the present invention;

FIG. 4 is a schematic diagram of the compressed image divided by the offset in step S1112 in FIG. 3;

FIG. 5 is a flow chart of a fourth embodiment of the video tamper-proofing method of the present invention;

FIG. 6 is a flow chart of a fifth embodiment of the video tamper-proofing method of the present invention;

FIG. 7 is a diagram illustrating the selection of sub image blocks in step S1120 in FIG. 6;

FIG. 8 is a flowchart illustrating a sixth embodiment of a video tamper-proofing method according to the present invention;

FIG. 9 is a schematic structural diagram of additional enhancement information in a sixth embodiment of the video anti-tampering method according to the present invention;

FIG. 10 is a flow chart of a seventh embodiment of the video tamper-proofing method of the present invention;

FIG. 11 is a flow chart of an eighth embodiment of the video tamper-proofing method of the present invention;

fig. 12 is a schematic configuration diagram of a first embodiment of the video camera device of the present invention;

fig. 13 is a schematic configuration diagram of a second embodiment of the video camera device of the present invention;

fig. 14 is a schematic configuration diagram of a third embodiment of the video camera device of the present invention;

fig. 15 is a schematic configuration diagram of a fourth embodiment of the video camera device of the present invention;

fig. 16 is a flowchart illustrating a first embodiment of a video authentication method according to the present invention;

fig. 17 is a flowchart illustrating a second embodiment of the video verification method according to the present invention;

fig. 18 is a flowchart illustrating a video authentication method according to a third embodiment of the present invention;

fig. 19 is a flowchart illustrating a fourth embodiment of the video verification method according to the present invention;

fig. 20 is a flowchart illustrating a fifth embodiment of the video authentication method according to the present invention;

fig. 21 is a schematic structural diagram of an embodiment of a video authentication device of the present invention;

FIG. 22 is a schematic structural diagram of a first embodiment of the apparatus with memory function of the present invention;

fig. 23 is a schematic structural diagram of a second embodiment of the apparatus with a storage function of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.

As shown in fig. 1, a first embodiment of a video tamper-proofing method according to the present invention includes:

s11: and processing the at least one frame of compressed image to obtain the characteristic data of the at least one frame of compressed image.

The compressed image is image data after being encoded and compressed, and a specific encoding algorithm can adopt a method specified by an h.264 or h.265 protocol. In other embodiments, other methods specified by the protocol may be used, and are not specifically limited herein.

Specifically, in an application example, the video capturing apparatus captures a frame of image, the encoder performs encoding compression on the frame of image, divides the frame of compressed image, obtains a plurality of sub-images, for example, 4 sub-images with the same size, and then performs feature extraction on each sub-image, for example, extracts pixel values of a partial region in each sub-image, to obtain feature data of the frame of compressed image. The frame of compressed image may be divided into equal parts or divided into unequal parts, which is not limited specifically herein. In other application examples, feature data at different positions may also be directly extracted from one frame of compressed image, or multiple frames of compressed image data may be processed to extract feature data at different positions in each frame of compressed image, or extract associated feature data between different compressed images, which is not specifically limited herein.

S12: the signature data is encrypted to generate a checksum.

The encryption algorithm used for encrypting the feature data may be a hash algorithm or other types of symmetric/asymmetric algorithms, which is not limited herein.

Specifically, in the above application example, after the feature data of each sub-image of one frame of compressed image is acquired, each feature data may be encrypted respectively, for example, by using a hash algorithm, each feature data generates a hash value, and the generated hash values are arranged in sequence, so as to generate the checksum. Of course, in other application examples, the generated hash values may be arranged out of order or in a preset order, which is not specifically limited herein.

S13: additional enhancement information is generated, the additional enhancement information including at least a time parameter and the checksum.

Wherein the time parameter is a count value of a counter in the video capture device, the count value being continuously incremented. The time parameter is the order and time (seconds) in which each frame captured by the video capture device is recorded, and is independent of the sequence number (sequence) of each frame data packet (packet) or the time stamp (video time stamp) of the video capture device, and is not modified by the conventional video processing procedure.

Specifically, in one application example, the time parameter is incremented as the number of frames of images captured by the video capture device increases, for example, every time an image is captured, the count value of the counter is incremented by one, so that the time parameter is continuously incremented in adjacent frames of compressed images. The count value may also be incremented by a predetermined value, for example, 2 or 3 each time.

In this embodiment, the time parameter and the encrypted checksum of the compressed image feature data are used to generate the additional enhancement information, for example, the additional enhancement information is sequentially arranged and synthesized, or the time parameter and the checksum are encrypted together, and then the encrypted data is used as the additional enhancement information.

Of course, in other embodiments, the additional Enhancement Information may further include version Information for identifying an encryption algorithm type and an additional Enhancement Information (SEI) data format, and other data such as a client identity, where the client identity may be set according to a client requirement, and is not specifically limited herein.

S14: additional enhancement information is transmitted and/or stored with the at least one frame of compressed image to verify authenticity of the at least one frame of compressed image using the additional enhancement information.

Specifically, when one frame of compressed image or a plurality of frames of compressed images generate an additional enhancement information, the additional enhancement information is transmitted and/or stored together with the transmission and/or storage of the compressed image data, for example, a packet of one frame of compressed image is followed by a packet of the additional enhancement information in the transmitted data stream.

When the authenticity of the compressed image needs to be identified, a receiving end can acquire multi-frame compressed image data and the additional enhancement information, and acquire a time parameter and a checksum from the additional enhancement information, because the time parameter is a count value from a counter, is continuously incremented, but not the display time of the shooting device, and cannot be adjusted by setting the display time of the shooting device, that is, the time parameter cannot be tampered, if the time parameter is continuously incremented, for example, continuously incremented according to the number of frames of the image, it indicates that the multi-frame image is a continuously shot image; and meanwhile, extracting the characteristic data of the received compressed image by adopting the same method as the transmitting end, calculating the checksum of the characteristic data, and if the calculated checksum is consistent with the checksum in the additional enhancement information, indicating that the authenticity of the received compressed image is higher.

In other embodiments, the additional enhancement information may further include size information of the at least one frame of compressed image, the size information being a storage space that the at least one frame of compressed image needs to occupy, and an identification of the video capture device, which may be an identification code for distinguishing different capture devices, such as a chip ID. When the authenticity of the compressed image is identified, whether the size of the received compressed image is consistent with the size information of the at least one frame of compressed image can be judged, and if the size of the received compressed image is inconsistent with the size information of the at least one frame of compressed image, data loss or image tampering can exist; and the video shooting equipment for shooting the video data can be traced through the acquired identification of the video shooting equipment.

In the embodiment, at least one frame of compressed image is processed to obtain the characteristic data of at least one frame of compressed image; encrypting the characteristic data to generate a checksum; generating additional enhancement information, the additional enhancement information including at least a time parameter and the checksum; transmitting and/or storing additional enhancement information together with the at least one frame of compressed image to verify authenticity of the at least one frame of compressed image using the additional enhancement information; the time parameter is the counting value of a counter in the video shooting device, and the counting value is continuously increased, so that the video appraiser can appraise the authenticity of the video material by verifying the checksum and the time parameter in the additional enhancement information.

As shown in fig. 2, the second embodiment of the video tamper-proofing method of the present invention is based on the first embodiment of the video tamper-proofing method of the present invention, and the step S11 further includes:

s111: and performing segmentation processing on at least one frame of compressed image to obtain at least two sub image blocks.

Specifically, in an application example, a frame of compressed image may be divided into equal parts, for example, a frame of compressed image is divided into 4 sub image blocks with the same size, where the size refers to a storage space, such as 128 bytes, that needs to be occupied by image data. One frame of compressed image is a segment of data code stream, the size of the one frame of compressed image is the storage space required by the segment of data code stream, and each sub image block is a part of the segment of data code stream. In this application example, the first byte of a frame of compressed image may be used as a starting segmentation point, and the frame of compressed image is uniformly divided into a plurality of (e.g., 4) sub image blocks, so that the size of each sub image block is one fourth of the size of the frame of compressed image.

Of course, in other application examples, the last byte of a frame of compressed image may be used as the starting segmentation point for segmentation, or the frame of compressed image may be subjected to non-equal segmentation, for example, an offset is increased/decreased based on the equal division size, or the multi-frame compressed image may be regarded as a whole for equal or non-equal segmentation, which is not limited herein.

S112: and respectively extracting characteristic data from the at least two sub-image blocks.

In the above application example, after a frame of compressed image is divided to obtain 4 sub image blocks, feature extraction is performed on each sub image block, for example, one of the continuous data code streams is extracted, or a plurality of discrete data points are extracted, so as to obtain feature data of each sub image block, that is, feature data of the frame of compressed image. The feature extraction method may also adopt a method of extracting a plurality of data code streams dispersed therein, and each sub image block may adopt the same feature extraction method or different feature extraction methods, which is not specifically limited herein.

Of course, in other application examples, the data of a plurality of sub image blocks may be compared or synthesized to generate associated feature data.

As shown in fig. 3, a third embodiment of the video tamper-proofing method of the present invention is based on the second embodiment of the video tamper-proofing method of the present invention, and step S111 further includes:

s1111: an offset is randomly generated.

The offset may be generated by a random function rand () or a random number generator, and is not limited in this respect.

S1112: and performing segmentation processing on at least one frame of compressed image by using the offset to obtain at least two sub image blocks.

Wherein the at least two sub image blocks include a first sub image block and a second sub image block, the first sub image block being larger in size than the second sub image block by a predetermined amount of offset.

Specifically, as shown in fig. 4, in an application example, after a frame of a compressed image is divided into 4 base blocks (bank size) of the same size, a first byte (pCFDStart) of the frame of the compressed image is used as a starting point, and a first sub image block 401 and a second sub image block 402 are divided at intervals on the basis of the base blocks, wherein the offset is smaller than the size of the base block bank size, the size of the first sub image block 401 is increased by an offset (offset) for the base block, and the size of the second sub image block 402 is decreased by an offset for the base block. Of course, in this application example, the division may be performed with the last byte (pCFDEnd) of the frame of the compressed image as a starting point, the size of the first sub image block 401 may be the size of the base block bank size increased by a plurality of offsets, and the size of the second sub image block 402 may be the size of the base block bank size decreased by a plurality of offsets, which is not specifically limited herein.

The additional enhancement information SEI may further include the offset. When the authenticity of the compressed image needs to be identified, after the compressed image is received, the compressed image can be divided by using the offset, and the dividing method is the same as that of the sending end, so as to obtain the feature data of the divided sub-image blocks.

Of course, in other embodiments, the multi-frame compressed image may be divided as a whole, and the dividing method may be the same as the dividing method of the one-frame compressed image, and is not limited specifically here.

In this embodiment, the position of the compressed image can be made random by using the randomly generated offset.

As shown in fig. 5, a fourth embodiment of the video tamper-proofing method of the present invention is based on the second embodiment of the video tamper-proofing method of the present invention, and step S112 further includes:

s1121: and respectively extracting the feature data of the at least two sub image blocks to obtain at least first feature data and second feature data.

The feature data is partial data in the sub image block, such as a partial continuous data code stream of a specific area, or partial discrete data points at several specific positions, or randomly selected partial data, and the specific extraction method may be determined according to actual requirements, and is not specifically limited herein.

Specifically, as shown in fig. 4, in an application example, after a frame of compressed image is divided into 4 sub image blocks, that is, 2 first sub image blocks 401 and 2 second sub image blocks 402, feature data is respectively extracted for each sub image block, so as to obtain 4 feature data; the feature extraction method of each sub-image block may be the same or different, and is not limited specifically here.

In other embodiments, the multi-frame compressed image may also be regarded as a whole and divided to obtain a plurality of sub image blocks, and then feature extraction is performed on each sub image block to obtain feature data, where the feature data may also be associated feature data of the plurality of sub image blocks.

Optionally, step S113 further includes:

s1131: and encrypting the at least first characteristic data and the second characteristic data respectively to generate at least two corresponding check codes.

The Algorithm for encrypting the feature data may adopt an MD5 Algorithm (Message Digest Algorithm 5), that is, a hash Algorithm, or may adopt other types of algorithms, which is not specifically limited herein.

Specifically, as shown in fig. 4, in the above application example, after 4 pieces of feature data are obtained, the MD5 algorithm may be used to encrypt the 4 pieces of feature data, and 4 hash values, that is, 4 check codes CS1 to CS4, may be obtained, where CS1 and CS4 correspond to the feature data of the first sub image block 401, and CS2 and CS3 correspond to the feature data of the second sub image block 402. Here, the tamper resistance can be further improved by adopting a sub-order correspondence manner rather than a conventional order correspondence manner.

Of course, in other application examples, CS1 and CS4 may also correspond to the second sub image block, CS2 and CS3 may correspond to the first sub image block, CS1 and CS2 may also correspond to the second sub image block, CS3 and CS4 may correspond to the first sub image block, and the like, which is not limited herein.

S1132: and synthesizing a checksum by using the at least two check codes.

Specifically, in the above application example, the acquired 4 check codes CS1 to CS4 may be sequentially arranged to synthesize one checksum, that is, the checksum of the at least one frame of compressed image. Of course, in other application examples, the plurality of check codes may also be arranged in a non-sequential manner, and are not limited herein.

When it is desired to authenticate the authenticity of the at least one frame of compressed image, the received compressed image may be tampered with if one of the check codes is wrong, for example, by calculating the checksum of the received compressed image and comparing it with the checksum in the additional enhancement information, for example, comparing each of the check codes CS 1-CS 4, if CS 1-CS 4 are identical, the authenticity of the received compressed image is higher.

In other embodiments, a specific sub image block may be selected from the sub image blocks divided from the multi-frame compressed image for feature extraction.

Specifically, as shown in fig. 6, the fifth embodiment of the video tamper-proofing method according to the present invention is based on the fourth embodiment of the video tamper-proofing method according to the present invention, and before step S1121, the method further includes:

s1120: at least two sub-image blocks from at least two frames of compressed images are selected.

Specifically, as shown in fig. 7, in an application example, the two frames of compressed images 501 and 502 are respectively divided into two sub image blocks, the division manner of each compressed image is the same, and specifically, reference may be made to step S1111 and step S1112, which is not repeated here. The first sub tile 5012 of the compressed image 501 and the second sub tile 5021 of the compressed image 502 are selected to perform feature extraction on the first sub tile 5012 and the second sub tile 5021, respectively, and the specific feature extraction method may refer to step S1131, which is not repeated here.

In other embodiments, three or even more frames of compressed images may be divided together to obtain a plurality of sub image blocks, and at least two sub image blocks are selected from the plurality of sub image blocks, where the at least two sub image blocks may be from different frames of compressed images respectively, or may be partially from the same frame of compressed images, and this is not limited specifically here.

As shown in fig. 8, a sixth embodiment of the video tamper-proofing method of the present invention is based on the first embodiment of the video tamper-proofing method of the present invention, and the step S13 further includes:

s131: and encrypting the time parameter and the checksum to generate a ciphertext.

The Encryption method for the time parameter and the checksum may adopt an MD5 algorithm, or may also adopt symmetric or asymmetric algorithms such as DES (Data Encryption Standard), RSA, and the like, and the Encryption method may be the same as or different from the Encryption method for generating the checksum, and is not limited specifically herein.

S132: additional enhancement information is generated, the additional enhancement information including the ciphertext.

Specifically, in an application example, the time parameter may be obtained by obtaining a count value of a counter in the video shooting device, where the counter starts counting when the video shooting device is turned on, and the count value is incremented every time an image is shot, that is, the count value is continuously incremented, and the counting is not stopped until the video shooting device is turned off.

The time parameter is a number, e.g. 20, when the checksum corresponds to one frame of compressed image, and a series or a set, e.g. 20,21, etc., when the checksum corresponds to a plurality of frames of compressed images, e.g. 2 frames of compressed images.

And encrypting the time parameter and the checksum by adopting an encryption algorithm to generate an encrypted ciphertext, wherein the ciphertext is the additional enhancement information.

Of course, in other embodiments, the additional enhancement information SEI may further include other information, such as version information and client identifier, and the other information may also be encrypted to generate the SEI together, which is not limited herein.

For example, as shown in fig. 9, the additional enhancement information may include, in addition to the time parameter ts (timestamp) and the checksum, version information v (version), a client identifier cid (customer id), size information cfds (compressed Frame Data size) of at least one corresponding Frame of compressed image, an offset bso (bank size offset), and an identity uid (unique id) of the video capturing device, where the checksum includes a plurality of check codes cs (checksum). The version information V needs to occupy a storage space of 3 bits, the BSO needs to occupy a storage space of 5 bits, the CFDS needs to occupy a storage space of 3 bytes, the TS needs to occupy a storage space of 4 bytes, each of CS1 to CS4 needs to occupy a storage space of 6 bytes, and the UID and the CID respectively need to occupy a storage space of 6 bytes, so that it can be known that the entire SEI needs to occupy a storage space of 44 bytes, if one SEI is calculated per frame, the SEI is calculated at a frame rate of 30fps and a video rate of 512Kbps, an overhead generated by the SEI is 44 × 8 × 30/512000 — 2%, and the overhead is small, that is, the additional enhancement information does not cause a large burden on video transmission or playing.

Of course, in other embodiments, the storage space occupied by the additional enhancement information may be a practical adjustment, and is not limited in detail here.

This embodiment can also be combined with any one of the second to fifth embodiments of the video anti-tampering method of the present invention or a non-conflicting combination thereof.

As shown in fig. 10, the seventh embodiment of the video tamper-proofing method according to the present invention is based on the first embodiment of the video tamper-proofing method according to the present invention, before step S11, further includes:

s101: a watermark is added to at least one frame of the image.

Wherein the watermark includes an identification of the video capture device and a time parameter, the time parameter is a count value of a counter in the video capture device, and the count value is continuously incremented. The time parameter is the order and time (seconds) in which each frame captured by the video capture device is recorded, and is independent of the sequence number (sequence) of each frame data packet (packet) or the time stamp (video time stamp) of the video capture device, and is not modified by the conventional video processing procedure.

Specifically, in an application example, each time a video shooting device shoots a frame of image, that is, a watermark is added to the frame of image, wherein the identity of the video shooting device and the time parameter can be embedded into the frame of image in a manner of adding low-frequency ripples to the frame of image, so that the additional enhancement information is lost in the frame of image processed in manners of copying, transcoding and the like, but the watermark still exists, and further the source of the video image can be traced back through the identity of the video shooting device in the watermark.

Wherein, for compatibility with watermarking technology, the time parameter comprises high-order data and low-order data, the high-order data has the same time stamp with the watermark, and the low-order data is continuously increased. For example, the time parameter includes 4 bytes of data, wherein the first 2 bytes of data are the same as the time stamp of the watermark, the second 2 bytes of data are continuously incremented, and when the upper bits are increased by 1, the lower bits are continuously incremented from 0.

The time parameter in the watermark can also assist in identifying whether the video image has been tampered with to some extent. If the time parameter obtained from the watermark is not continuous with the time parameter obtained from the watermark of the previous frame of image, for example, the time parameter of the next frame of image is smaller than the time parameter of the previous frame of image, it can be determined that the frame of image has been tampered, such as spliced or covered; if the time parameter of the next frame image is greater than the time parameter of the previous frame image and the difference between the two is greater than a preset threshold (e.g., 50), it may be determined that the two frames of images may be clipped, and if the difference between the two is less than the preset threshold, the data loss between the two frames of images may be caused by poor network environment.

In other embodiments, a frame of image may be randomly selected from a plurality of frames of images to increase the watermark, or a preset frame of image may be selected to increase the watermark, which is not specifically limited herein.

S102: and compressing the at least one frame of image added with the watermark to obtain the at least one frame of compressed image.

Specifically, in an application example, the at least one frame of image after the watermark is added is subjected to encoding compression, wherein the encoding compression method may adopt a method specified by an h.264 or h.265 protocol, so as to form the encoded at least one frame of compressed image, so that subsequent processing generates additional enhancement information. Of course, in other embodiments, the encoding compression method may also adopt other methods according to actual requirements, and is not limited specifically herein.

This embodiment may also be combined with any of the second to sixth embodiments of the video anti-tampering method of the present invention or a non-conflicting combination thereof.

As shown in fig. 11, the eighth embodiment of the video tamper-proofing method according to the present invention is based on the first embodiment of the video tamper-proofing method according to the present invention, before step S11, further includes:

s103: and judging whether the size of the at least one frame of compressed image is larger than a first threshold value or judging whether the size of the at least one frame of compressed image is not larger than a second threshold value.

S104: and if so, not executing the step of processing at least one frame of compressed image.

Wherein the first threshold is a preset maximum size of the compressed image not triggering step S11, and the second threshold is a preset minimum size of the compressed image not triggering step S11; the specific values of the first threshold and the second threshold may be set according to actual requirements, and are not specifically limited herein.

Specifically, in an application example, before calculating the checksum of at least one frame of compressed image, it is determined whether the size of the at least one frame of compressed image, that is, the storage space occupied by the at least one frame of compressed image, is greater than a first threshold, if the CFDS is greater than or equal to 0 xffffffff, if the determination result is that the CFDS is greater than the first threshold, the compressed image is large, and if the subsequent step of calculating the checksum is still performed at this time, the calculation process is slow, which greatly affects the processing efficiency of the device, and this situation is few, so if the size of the at least one frame of compressed image is greater than the first threshold, the subsequent step of calculating the checksum is not performed, that is, step S11 is not performed.

In another application example, before calculating the checksum of at least one frame of compressed image, it is determined whether the size of the at least one frame of compressed image, that is, the storage space occupied by the at least one frame of compressed image, is not greater than a second threshold, if the CFDS is not greater than or equal to 32, if the determination result is not greater than the second threshold, the compressed image is very small, that is, the redundant data in the compressed image is less, and the probability of malicious alteration of the picture is very small, at this time, if the subsequent checksum calculation step is still performed, since the data amount of the data is less, there is a greater risk of revealing the checksum calculation method, but it is not favorable for identifying the authenticity of the video material, and therefore, if the size of the at least one frame of compressed image is not greater than the second threshold, the subsequent checksum calculation step is not performed, that is step S11.

When the authenticity of the compressed image is identified, if the size of the at least one frame of compressed image is larger than a first threshold value or the size of the at least one frame of compressed image is not larger than a second threshold value, the step of verifying the checksum is not carried out subsequently, and the checksum of the at least one frame of compressed image is directly determined to be correct.

This embodiment may also be combined with any of the second to seventh embodiments of the video anti-tampering method of the present invention or a non-conflicting combination thereof.

As shown in fig. 12, the first embodiment of the video camera of the present invention includes:

a processor 801 and a counter 802, the counter 802 being connected to the processor 801.

The processor 801 controls the operation of the video photographing apparatus, and the processor 801 may also be referred to as a CPU (Central Processing Unit). The processor 801 may be an integrated circuit chip having signal processing capabilities. The processor 801 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

The processor 801 is configured to process at least one frame of compressed image, obtain feature data of the at least one frame of compressed image, encrypt the feature data, generate a checksum, and generate additional enhancement information, where the additional enhancement information at least includes a time parameter and the checksum, and transmit and/or store the additional enhancement information together with the at least one frame of compressed image, so as to verify authenticity of the at least one frame of compressed image using the additional enhancement information.

Wherein the time parameter is a count value of the counter 802, and the count value is continuously incremented. The time parameter is the order and time (seconds) in which each frame captured by the video capture device is recorded, and is independent of the sequence number (sequence) of each frame data packet (packet) or the time stamp (video time stamp) of the video capture device, and is not modified by the conventional video processing procedure.

Specifically, in one application example, the time parameter is incremented as the number of frames of images captured by the video capture device increases, for example, every time an image is captured, the count value of the counter 802 is incremented by one, so that the time parameter is continuously incremented in adjacent frames of compressed images. The count value may also be incremented by a predetermined value, for example, 2 or 3 each time.

The processor 801 divides at least one frame of compressed image, extracts feature data, encrypts and generates a checksum, acquires a count value of the counter 802, that is, acquires the time parameter, and then uses the data obtained by sequentially arranging the checksum and the time parameter or synthesizing the checksum and the time parameter according to a preset format as additional enhancement information, or uses a ciphertext obtained by encrypting the checksum and the time parameter together as the additional enhancement information.

In other embodiments, the additional enhancement information may further include size information of at least one frame of the compressed image, an identity identifier of the video capturing device, a client identifier, and other data, and specifically refer to the structure of the additional enhancement information in fig. 9, and the process of identifying the authenticity of the compressed image using the additional enhancement information may specifically refer to the content in the first embodiment of the video anti-tampering method of the present invention, which is not repeated here.

The specific processes of the processor 801 for processing the compressed image and generating the additional enhancement information may refer to the methods provided in any one of the first to eighth embodiments of the video anti-tampering method of the present invention or their non-conflicting combinations, and reference is not repeated here.

In other embodiments, the video capturing apparatus may further include a memory 803, and the memory 803 stores data or instructions that need to be executed by the processor 801, such as the checksum and the time parameter, which may be stored in the memory 803.

The Memory 803 may include a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a hard disk, an optical disk, and the like.

The video shooting device may be an Internet Protocol Camera (IPCAM), or may be a general camera, such as a mobile phone, a monitoring camera, or may be a part of a component integrated in the video shooting device, such as a video processing chip.

In other embodiments, the video capture device may further include a communication circuit through which the video capture device may transmit the compressed image and the additional enhancement information.

In this embodiment, the video capture device processes at least one frame of compressed image through the processor, obtains feature data of the at least one frame of compressed image, encrypts the feature data, generates a checksum, generates additional enhancement information, the additional enhancement information at least comprises a time parameter and the checksum, and finally transmits and/or stores the additional enhancement information together with the at least one frame of compressed image so as to verify the authenticity of the at least one frame of compressed image by using the additional enhancement information, wherein the time parameter is a counter value of a counter in the video capture device, and the counter value is continuously incremented, so that a video identifier can identify the authenticity of the video material by verifying the checksum and the time parameter in the additional enhancement information.

As shown in fig. 13, the second embodiment of the video camera of the present invention is based on the first embodiment of the video camera, and further comprises: a watermark device 804, the watermark device 804 is connected to the processor 801 for adding a watermark to at least one frame of image, the watermark includes the identification of the video capture device and the count value of the counter 802.

Specifically, in an application example, the watermarking device 804 adds a watermark to a frame of image after each frame of image is captured by the video capturing device, for example, adds data points to some preset positions of the image, or changes pixel values of some preset positions, or adds low-frequency ripples to the image, and embeds the identification of the video capturing device and the count value of the counter 802 into the image as watermark data, so that the subsequent processor 801 processes the compressed image to generate additional enhancement information.

The specific working process and action of the watermarking device 804 and the format of the time parameter may also refer to the seventh embodiment of the video anti-tampering method of the present invention, and the specific working process of the processor 801 and the counter 802 may refer to the first embodiment of the video capturing apparatus of the present invention, which is not repeated here.

In other embodiments, the video capture device may further include a memory 803, and the memory 803 may also be used to store an identification of the video capture device.

As shown in fig. 14, the third embodiment of the video camera of the present invention is based on the first embodiment of the video camera, and further comprises: the random number generator 805 is connected to the processor 801 and configured to randomly generate an offset, so that the processor 801 processes at least one frame of the compressed image by using the offset.

Specifically, in an application example, the random number generator 805 may generate a random number by using a random function rand (), and select the lower 5 bits of data of the random number as the offset. The processor 801 may segment at least one frame of the compressed image using the offset and generate additional enhancement information along with the time parameter, checksum, and offset. Of course, in other application examples, the number of bits of the random number may be other values, for example, 6 bits, and the random number generator 805 may also adopt other manners, for example, the last bit value of the measured values, such as atmospheric noise or temperature, is used as the random number, and is not limited herein.

The specific working processes of the processor 801 and the counter 802 can refer to the first embodiment of the video shooting device of the present invention, and are not repeated here.

In other embodiments, the video capturing device may further include a memory 803, the memory 803 may be further configured to store the random offset, and the video capturing device may further include a watermarking device, which may refer to the watermarking device of the second embodiment of the video capturing device of the present invention, and will not be repeated here.

As shown in fig. 15, the fourth embodiment of the video camera of the present invention is based on the second embodiment of the video camera, and further comprises: the encoder 806, coupled to the processor 801, is configured to perform compression encoding on the image to generate a compressed image.

The encoder 806 is further connected to the watermarking device 804, and after the watermarking device 804 adds a watermark to an image, the encoder 806 performs encoding compression on the image with the added watermark to generate a compressed image, and transmits the compressed image to the processor 801. The processor 801 processes the compressed image to generate additional enhancement information.

The encoding method adopted by the encoder 806 may be a method specified in h.264 and h.265 protocols, or may adopt other methods according to actual situations, and is not limited specifically here.

The specific working processes of the processor 801 and the counter 802 may refer to the first embodiment of the video capture device of the present invention, and the specific working processes of the watermark device 804 may refer to the third embodiment of the video capture device of the present invention, which are not repeated here.

The video photographing apparatus may further include a random number generator, which may refer to the random number generator of the fourth embodiment of the video photographing apparatus of the present invention, and will not be repeated here

In other embodiments, the video capturing device may further include other components such as a display screen and keys, which are not specifically limited herein.

As shown in fig. 16, the first embodiment of the video verification method of the present invention includes:

s21: acquiring a plurality of frames of compressed images and corresponding additional enhancement information.

Wherein the additional enhancement information comprises a time parameter and a checksum generated after the corresponding compressed image is encrypted, the time parameter is a count value of a counter in the video shooting device, and the count value is continuously increased.

The time parameter is the order and time (seconds) in which each frame captured by the video capture device is recorded, and is independent of the sequence number (sequence) of each frame data packet (packet) or the time stamp (video time stamp) of the video capture device, and is not modified by the conventional video processing procedure.

S22: and detecting whether the additional enhancement information meets a preset condition.

Wherein the preset condition is a preset value or condition of a time parameter and a checksum in the accessory enhancement information. For example, the time parameters of the two frames before and after are continuous, and the budget checksum, etc.

In other embodiments, the preset condition may also be added with other values or conditions according to the data in the additional enhancement information, and is not limited herein.

S23: and if the additional enhancement information meets the preset condition, determining that the compressed image corresponding to the additional enhancement information is real.

Specifically, in an application example, a frame of compressed image corresponds to an additional enhancement information, and after acquiring a plurality of frames of compressed images and corresponding additional enhancement information, the video verification device checks whether time parameters corresponding to two frames of compressed images before and after are continuous, and if so, the two frames of compressed images before and after are continuously shot; if the difference between the time parameters is not continuous and is greater than a preset threshold (e.g. 50), it indicates that the two previous and next frames of images may be pruned, and if the difference between the time parameters is less than the preset threshold, it may be due to data loss between the two previous and next frames of images caused by poor network environment.

In the above application example, if the time parameter corresponding to the two frames of compressed images is continuous, the checksum of each frame of compressed image may be continuously checked, for example, the checksum of each frame of received compressed image is calculated, where the checksum includes 4 check codes, and if all the 4 check codes are consistent with the check code in the additional enhancement information, the frame of compressed image is determined to be true; if the check codes are inconsistent, the frame of compressed image may be tampered.

In other embodiments, the multi-frame compressed image may also correspond to an additional enhancement information, and the additional enhancement information may also include other data such as version information, which is not specifically limited herein.

In the embodiment, the authenticity of the compressed image can be verified by utilizing the compressed image and the additional enhancement information, and the use value of the video data or the image is improved.

As shown in fig. 17, the second embodiment of the video verification method of the present invention is based on the first embodiment of the video verification method of the present invention, and the step S22 further includes:

s221: and acquiring time parameters in the additional enhancement information of the two adjacent frames of compressed images to respectively obtain a first time and a second time.

S222: and calculating the difference between the first time and the second time to obtain the time difference.

S223: and judging whether the time difference is equal to a preset value or not.

The preset value is a difference value between time parameters of two adjacent frames of compressed images, and a specific value of the preset value can be set according to actual requirements, which is not specifically limited herein.

Specifically, in an application example, each frame of compressed image corresponds to one piece of additional enhancement information, the first time is a time parameter in the additional enhancement information of the previous frame of compressed image, and the second time is a time parameter in the additional enhancement information of the next frame of compressed image, since the time parameter is continuously increased, for example, the time parameters corresponding to two adjacent frames of compressed images are continuous, the time parameter of the next frame of compressed image in the two adjacent frames of compressed images is one more than the time parameter of the previous frame of compressed image, that is, the difference between the first time and the second time is 1, which indicates that there is no missing data between the two adjacent frames of compressed images received, or the two frames of images may not be tampered.

In other application examples, the time difference between two adjacent frames of images may also be other values, such as 2 or 4.

S224: and if the time difference is equal to a preset value, calculating a checksum corresponding to the characteristic data of the compressed image.

S225: it is determined whether the calculated checksum is equal to the checksum in the additional enhancement information.

S226: if the judgment result is yes, the additional enhancement information is judged to meet the preset condition.

Specifically, in the application example, when the time difference is equal to 1, taking a first byte of the received compressed image as a starting point, wherein a last byte of the received compressed image may also be used as a starting point, segmenting the compressed image according to a preset segmentation method, that is, a method the same as the segmentation method of the shooting device, extracting the feature data, and calculating a checksum corresponding to the feature data, where the checksum includes 4 check codes, comparing the 4 check codes with 4 check codes in the additional enhancement information, and if the 4 check codes are uniform, determining that the additional enhancement information meets a preset condition; if there is a check code inconsistency, the compressed image may be tampered.

As shown in fig. 18, the third embodiment of the video verification method of the present invention is based on the second embodiment of the video verification method of the present invention, where the additional enhancement information further includes size information of a corresponding compressed image, and before step S224, the method further includes:

s227: and judging whether the size of the compressed image is larger than a first threshold value or not, or judging whether the size of the compressed image is not larger than a second threshold value or not.

Wherein the first threshold is the preset maximum size of the compressed image not triggering step S224, and the second threshold is the preset minimum size of the compressed image not triggering step S224; the specific values of the first threshold and the second threshold may be set according to actual requirements, and are not specifically limited herein.

S228: if the judgment result is yes, the step of calculating the checksum corresponding to the feature data of the compressed image is not executed, and the additional enhancement information is directly judged to meet the preset condition.

Specifically, in an application example, before calculating the checksum of the compressed image, the size of the at least one frame of compressed image, that is, whether the storage space occupied by the at least one frame of compressed image is greater than a first threshold, if the CFDS is greater than or equal to 0 xffffffffff is determined, if the determination result is that the CFDS is greater than the first threshold, the compressed image is large, and if the subsequent step of calculating the checksum is still performed, the calculation process is slow, which greatly affects the processing efficiency of the device, and this situation is few, therefore, if the size of the at least one frame of compressed image is greater than the first threshold, the subsequent step of calculating the checksum is not performed, that is, step S224 is not performed, and it is directly determined that the additional enhancement information meets the preset condition.

In another application example, before calculating the checksum of at least one frame of compressed image, the size of the at least one frame of compressed image is determined, that is, if the storage space occupied by the at least one frame of compressed image is not greater than the second threshold, if it is determined that the CFDS is less than or equal to 32, if the determination result is not greater than the second threshold, the compressed image is very small, that is, the compressed image has less redundant data and less probability of malicious alteration of the image, if the subsequent step of calculating the checksum is still carried out, since the data amount of the data is small, the calculation method of the checksum with a greater risk of leakage is not beneficial to the identification of the authenticity of the video data, therefore, if the size of at least one frame of the compressed image is not greater than the second threshold, the subsequent step of calculating the checksum, that is, the step S224, is not performed, and it is directly determined that the additional enhancement information meets the preset condition.

In other embodiments, the additional enhancement information further includes other data, which may specifically refer to the structure shown in fig. 9, and the state of the video image may also be verified by using the additional enhancement information.

Specifically, as shown in fig. 19, the fourth embodiment of the video verification method according to the present invention is based on the third embodiment of the video verification method according to the present invention, and before step S227, the method further includes:

s229: it is determined whether the size of the compressed image is equal to the size information of the compressed image in the additional enhancement information.

S230: if the judgment result is yes, judging that the additional enhancement information meets the preset condition; otherwise, it is determined that there is data loss in the compressed image.

Specifically, the additional enhancement information includes size information of a corresponding compressed image, that is, a storage space that the compressed image needs to occupy, if the size of the received compressed image is consistent with the size information, a checksum of the compressed image may be calculated from a first byte of the compressed image as a starting point, and when the checksum is also consistent with the checksum in the additional enhancement information, it may be determined that the additional enhancement information meets a preset condition, and the compressed image is real. If the size of the received compressed image is not consistent with the size information but the checksum is consistent, the compressed image has data loss. And if the size and the checksum are not consistent, the compressed image is tampered.

As shown in fig. 20, the fifth embodiment of the video verification method of the present invention is based on the first embodiment of the video verification method of the present invention, and before step S22, the method further includes:

s210: it is determined whether the additional enhancement information exists.

S211: if the additional enhancement information does not exist, it is determined that the compressed image may be shifted.

Specifically, in an application example, at least one frame of compressed image corresponds to one piece of additional enhancement information, and since operations such as shift or copying are not implemented by a device provided with the additional enhancement information, the additional enhancement information is lost after the image is subjected to the shift or copying operation, and therefore, if the received data does not include the additional enhancement information corresponding to the compressed image, it can be determined that the compressed image is subjected to the shift or copying.

When multiple frames of images are authenticated, for example, multiple frames of images played, transmitted or photographed within one second are authenticated, if the time parameter of any one frame of image is determined to be discontinuous with the time parameter of the previous frame of image, the time of the video data within one second is discontinuous, and it is determined that the video data within one second may be tampered, for example, operations such as deleting, clipping, etc. In a multi-frame image, if one frame of image data is lost, the video data in one second has the condition of data loss; if the continuous multi-frame images are judged to be lack of data and the continuous checksums are inconsistent, the video data can be judged to be possibly tampered.

In other embodiments, the additional enhancement information may also include an identification of the video capture device and a customer identification. In the video data within one second, if the identity or the client identity of the video shooting device in the received additional enhancement information is inconsistent with the identity or the client identity of the video shooting device receiving the additional enhancement information in the multi-frame image, the received video data may be tampered.

As shown in fig. 21, an embodiment of the video verification apparatus of the present invention includes:

a processor 901 and a communication circuit 902 connected to each other.

The communication circuit 902 is used for communicating with an external device, and a plurality of frames of compressed images and corresponding additional enhancement information can be acquired by the communication circuit 902. The communication circuit 902 includes an antenna, a communication interface, a communication chip, or the like.

The processor 901 is configured to obtain a plurality of frames of compressed images and corresponding additional enhancement information through the communication circuit 902, and then detect whether the additional enhancement information meets a preset condition, and when the additional enhancement information meets the preset condition, determine that the compressed image corresponding to the additional enhancement information is real.

The specific working process of the processor 901 may refer to the method provided in any one of the first to fifth embodiments of the video verification method of the present invention or a non-conflicting combination thereof, and is not repeated here.

In other embodiments, the video verification device may further include a memory having stored therein data or instructions that need to be executed by the processor 801, for example, both the compressed image and additional enhancement information may be stored in the memory.

The video verification device may be a device such as a mobile phone, a computer, a tablet, or a server, or may be a component such as a chip, which is not specifically limited herein.

As shown in fig. 22, in the first embodiment of the apparatus with storage function of the present invention, the apparatus with storage function 60 internally stores a program 601, and the program 601 is executed to implement the method provided by any one of the first to eighth embodiments of the video anti-tampering method of the present invention or a non-conflicting combination thereof.

The device 60 with a storage function may be a portable storage medium such as a usb disk and an optical disk, or may be a terminal, a server, or a separate component which can be integrated in the terminal, such as a baseband chip.

As shown in fig. 23, in the second embodiment of the apparatus with storage function of the present invention, the apparatus with storage function 70 internally stores a program 701, and the program 701 is executed to implement the method provided by any one of the first to fifth embodiments of the video authentication method of the present invention or a non-conflicting combination thereof.

The device 70 with a storage function may be a portable storage medium such as a usb disk and an optical disk, or may be a terminal, a server, or a separate component which can be integrated in the terminal, such as a baseband chip.

The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种摄像机主控板、摄像设备及补光灯板适配方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类