In video, embed method and the device that GPS information is guaranteed the true integrality of video
Technical field
The present invention relates to technical field of video processing, be specifically related to a kind of method and device that GPS information is guaranteed the true integrality of video that in video, embed.
Background technology
In recent years along with science and technology development; Technology such as video shearing have obtained development at full speed, and softwares such as video clipper, video combiner have obtained using the bigger post-production that has made things convenient for video widely; Reasonably use will be made contributions to people's life and technological progress on the one hand; Such as: video display company carries out the making in later stage to the video of prophase shoot, has enriched human culture life, and some natural phenomenas that exist are made up broadcast, observation of nature rule etc.; Yet from another point of view, the video fakement phenomena also grows thus, and video is faked and mainly to be divided into two aspects, the one, and piece together through each video segment and to form a new video, the 2nd, delete some important fragment datas in certain video; And the field that the true integrality of some videos is had relatively high expectations; Such as criminal monitoring, archaeology, exploration, judicial evidence collection and other fields that needs video to collect evidence, some lawless person propagandizes for individual interest or makes false evidence etc. like this, makes the video fakement phenomena also more and more; Such as: the play tricks appearance of other false videos of incident or the like of false UFO incident, outman's incident, court evidence; The one, damaged people's interests, injured the people masses' emotion, the 2nd, because the making of false evidence has directly influenced justice; Having violated national laws and regulations, is clearly to forbid in the state's laws rules; Prior art is directly to pass through eye-observation to this kind video one of way that phenomenon takes of playing tricks; Obviously there is the place of leaks such as divergence up and down in judgement some in video; Another kind is to analyze sound frequency, frequency spectrum etc. through special software; And the problem that these methods exist is to judge inaccurate, overlong time, the artificial subjective judgement of existence; And can not prevent some wrongful video fakement phenomenas from the source, and if can from the process of capture video, just can add some information specific, just can reduce or prevent the generation of video fakement phenomena; Therefore, the technology of solution and the fraud of judgement video is those skilled in the art's technical issues that need to address.
Summary of the invention
The technical problem that the present invention will solve provides a kind of method and device that GPS information is guaranteed the true integrality of video that in video, embed.
The present invention realizes through following technical scheme, in video, embeds the method that GPS information is guaranteed the true integrality of video, may further comprise the steps:
The first step, information are obtained the stage: frame information and the GPS locating information data and the preservation of obtaining said video;
Second step, safe handling stage: the numerical value that the frame information and the GPS locating information of the said video that obtains will be carried out after processing data information also will be handled is preserved;
The 3rd step, video playback Qualify Phase: play said video, and the numerical value of will be said preserving in second step carry out processing data information and with said second step in the data of preservation compare checking.
Concrete, the said second safe handling stage in step is specially: at first, the video data in the frame information of the said video that obtains, voice data, frame number and the GPS locating information data obtained are carried out the HASH algorithm, and each the frame HASH value that obtains; Secondly, the HASH value of each frame frame information in the video is carried out the HASH algorithm again, obtain the HASH value of total frame; Data after then the HASH value of total frame being carried out digital signature and obtained digital signature; Preserve each frame HASH value and total frame is carried out the data after the digital signature.
Concrete, said the 3rd step video playback Qualify Phase is specially: at first, in the time of displaying video, obtain video data, voice data and GPS locating information data in the frame information of video and carry out the HASH algorithm and draw each frame HASH value; Then, the HASH value with the HASH value of each above-mentioned frame and each frame of preserving in second step compares judgement; If the HASH value of each frame is different, judge directly that then there is untrue phenomenon in video; HASH value like each frame is identical, explains that then video is true, and the data that total frame HASH value of preserving in going on foot second is again carried out after the digital signature are deciphered the HASH value that draws the total frame in deciphering back; The HASH value of each frame of calculating in this step is carried out the HASH value that the HASH algorithm draws total frame; The HASH value of total frame and the HASH value of above-mentioned total frame after the above-mentioned deciphering are compared, equate that like numerical value then said video is true and complete, unequal like numerical value, then said video is true and imperfect.
Concrete, said HASH algorithm is the dateout of regular length for the input data conversion with random length.
Concrete, the safe handling stage in said second step whenever carried out once at a distance from one second.
Concrete, the video playback Qualify Phase in said the 3rd step whenever carried out once at a distance from one second.
The present invention also provides a kind of and is used for realizing above-mentionedly embedding the device that GPS information is guaranteed the method for the true integrality of video at video, comprising:
The information acquisition module obtains the frame information and the GPS locating information data of said video;
The safe handling module is preserved the numerical value that the frame information and the GPS locating information of the video that obtains will be carried out after processing data information also will be handled;
The video playback authentication module, displaying video and with the numerical value of preserving in the safe handling module carry out processing data information and with the safe handling module in the data of preserving compare checking.
Preferably, said information acquisition module comprises:
The video capture module is taken said video, and obtains the frame information data of video;
The GPS information acquisition module is gathered said GPS locator data information;
Preferably, said safe handling module comprises:
First information processing module; The frame information data of the video that said video capture module is taken and the GPS locating information data of GPS information acquisition module are carried out the HASH algorithm; Obtain the HASH value of each frame, and the HASH value of each frame is carried out the HASH algorithm again, obtain total frame HASH value;
The digital signature module is handled the total frame HASH value that obtains with said first information processing module and is carried out digital signature;
The HASH value of each frame that the frame information data of the video that video storage module, the GPS locating information data, first information processing module of storing frame information data, the GPS information acquisition module of the video that said video capture module takes are taken said video capture module and the GPS locating information data of GPS information acquisition module carry out obtaining behind the HASH algorithm and digital signature module total frame HASH that processing obtains to first information processing module carry out the numerical value after the digital signature;
Preferably, said video playback authentication module comprises:
The video verification module; From the video storage module, obtain frame information data, the GPS locating information data of corresponding video and carry out processing data information, and store in data after will handling and the video storage module handle by first information processing module after numerical value and compare by the numerical value behind the digital signature module data signature.
The video playback module is play said video according to the checking result of video verification module.
Preferably; Said video storage module comprises the first video storage module and the second video storage module, and the said first video storage module is used to store the frame information data of the video that said video capture module takes, the GPS locating information data of GPS information acquisition module; HASH value and the digital signature module that the said second video storage module is used to store each frame after first information processing module is handled carried out the data after the digital signature to total frame HASH value.
Preferably; Said video verification module comprises second message processing module, deciphering module, first comparison module and second comparison module; Said second message processing module is used for the frame information data, the GPS locating information data that obtain corresponding video from the first video storage module are carried out the HASH algorithm and drawn the HASH value of each frame, and the HASH value of each frame is carried out the HASH value that HASH calculates total frame again; Said deciphering module is used for the data behind the second video storage module stored numbers signature are deciphered, and said first comparison module is used for the HASH value of each frame after comparison second message processing module is handled and compares with the HASH value of each frame of the second video storage module stores; Said second comparison module is used for the HASH value of total frame of the numerical value after the deciphering module deciphering and second comparison module is compared.
The present invention has following beneficial effect:
If 1 can just can add some information specific from the process of capture video, promptly video and GPS locating information data are carried out combination, reduce or prevent the generation of video fakement phenomena, have guaranteed the true and integrality of video;
2, the present invention is novel, is prone to realize.
Description of drawings
In order to be easy to explanation, the present invention is done to describe in detail by following preferred embodiment and accompanying drawing.
The method sketch map that Fig. 1 realizes for the present invention;
Fig. 2 is the concrete realization figure of step S2 among Fig. 1 of the present invention;
Fig. 3 is the concrete realization figure of step S3 among Fig. 1 of the present invention;
The structure drawing of device that Fig. 4 realizes for the present invention;
Fig. 5 is the concrete sketch map of device of Fig. 4 of the present invention;
Fig. 6 is the concrete sketch map of video storage module of the present invention;
Fig. 7 is the concrete sketch map of video verification module of the present invention.
Embodiment
Shown in Fig. 1-3, the present invention provides a kind of method that GPS information is guaranteed the true integrality of video that in video, embeds, and the steps include:
The first step, information are obtained the stage: frame information and the GPS locating information data and the preservation of obtaining said video;
Second step, safe handling stage: the numerical value that the frame information and the GPS locating information of the said video that obtains will be carried out after processing data information also will be handled is preserved; That is: at first, the video data in the frame information of the said video that obtains, voice data, frame number and the GPS locating information data obtained are carried out the HASH algorithm, and each the frame HASH value that obtains; Secondly, the HASH value of each frame frame information in the video is carried out the HASH algorithm again, obtain the HASH value of total frame; Data after then the HASH value of total frame being carried out digital signature and obtained digital signature; Preserve each frame HASH value and total frame is carried out the data after the digital signature.
The HASH algorithm is to be that video data, voice data, frame number and the GPS locating information data obtained are with the byte form with the input data to random length; Pass through hashing algorithm; Be transformed into the dateout of regular length; Regular length is 20 bytes in present embodiment, and this output data value is the HASH value just.
The 3rd step, video playback Qualify Phase: play said video, and the numerical value of will be said preserving in second step carry out processing data information and with said second step in the data of preservation compare checking; That is: at first, in the time of displaying video, obtain video data, voice data and GPS locating information data in the frame information of video and carry out the HASH algorithm and draw each frame HASH value; Then, the HASH value with the HASH value of each above-mentioned frame and each frame of preserving in second step compares judgement; If the HASH value of each frame is different, judge directly that then there is untrue phenomenon in video; HASH value like each frame is identical, explains that then video is true, and the data that total frame HASH value of preserving in going on foot second is again carried out after the digital signature are deciphered the HASH value that draws the total frame in deciphering back; The HASH value of each frame of calculating in this step is carried out the HASH value that the HASH algorithm draws total frame; The HASH value of total frame and the HASH value of above-mentioned total frame after the above-mentioned deciphering are compared, equate that like numerical value then said video is true and complete, unequal like numerical value, then said video is true and imperfect.
In the present embodiment, the video playback Qualify Phase in the safe handling stage in said second step and the 3rd step whenever carried out once at a distance from one second.
Shown in Fig. 4-7, to above method, the present invention also provides a kind of and is used for realizing above-mentionedly embedding the device that GPS information is guaranteed the method for the true integrality of video at video, comprising:
Information acquisition module 1 obtains the frame information and the GPS locating information data of said video;
Safe handling module 2 is preserved the numerical value that the frame information and the GPS locating information of the video that obtains will be carried out after processing data information also will be handled;
Video playback authentication module 3, displaying video and with the numerical value of preserving in the safe handling module 2 carry out processing data information and with safe handling module 2 in the data of preserving compare checking.
Wherein, said information acquisition module 1 comprises:
Video capture module 11 is taken said video, and obtains the frame information data of video;
GPS information acquisition module 12 is gathered said GPS locator data information;
Wherein, said safe handling module 2 comprises:
First information processing module 21; The frame information data of the video that said video capture module 11 is taken and the GPS locating information data of GPS information acquisition module 12 are carried out the HASH algorithm; Obtain the HASH value of each frame; And the HASH value of each frame carried out the HASH algorithm again, obtain total frame HASH value;
Digital signature module 22 is handled the total frame HASH value that obtains with said first information processing module 21 and is carried out digital signature;
Video storage module 23 is stored the numerical value after the HASH value of each frame that the GPS locating information data of frame information data and the GPS information acquisition module 12 of the video that 21 pairs of said video capture modules 11 of frame information data, the GPS locating information data of GPS information acquisition module 12, first information processing module of the video that said video capture module 11 takes take carry out obtaining behind the HASH algorithm and total frame HASH that 21 processing of 22 pairs of first information processing modules of digital signature module obtain carry out digital signature.
Wherein, said video playback authentication module 3 comprises:
Video verification module 31; From video storage module 23, obtain frame information data, the GPS locating information data of corresponding video and carry out processing data information, and the numerical value after the handling by first information processing module 21 of storage and compare by the numerical value behind digital signature module 22 data signatures in data after will handling and the video storage module 23;
Video playback module 32 is play said video or is given corresponding prompt according to the checking result of video verification module 31.
Wherein, Said video storage module 23 comprises: the first video storage module 231 and the second video storage module, 232, the first video storage modules 231 are used for the frame information data of the video of store video taking module 11 shootings, the GPS locating information data of GPS information acquisition module 12; HASH value and 22 pairs of total frame HASH values of digital signature module that the second video storage module 232 is used to store each frame after first information processing module 21 is handled are carried out the data after the digital signature.
Wherein, Said video verification module 31 comprises: second message processing module 331, deciphering module 312, first comparison module 313 and second comparison module 314; Second message processing module 51 is used for the frame information data, the GPS locating information data that obtain corresponding video from the first video storage module 231 are carried out the HASH algorithm and drawn the HASH value of each frame, and the HASH value of each frame is carried out the HASH value that HASH calculates total frame again; Deciphering module 312 is used for the data behind the second video storage module, the 323 stored numbers signatures are deciphered, and said first comparison module 313 is used for the HASH value of each frame after comparison second message processing module 331 is handled and the HASH value of each frame of storing with the second video storage module 42 compares; Said second comparison module 314 is used for the HASH value of total frame of the numerical value after deciphering module 312 deciphering and second comparison module 314 is compared.
The embodiment of the above is a preferred embodiments of the present invention, is not to limit practical implementation scope of the present invention with this, and scope of the present invention comprises and is not limited to this embodiment.All shapes according to the present invention, the equivalence variation that structure is done all comprise in protection scope of the present invention.