Embedding GPS information guarantees method and the device of the true integrity of video in video
Technical field
The present invention relates to technical field of video processing, be specifically related to a kind of embedding GPS information in video and guarantee method and the device of the true integrity of video.
Background technology
Development recently as science and technology, the technology such as video shearing obtain development at full speed, the softwares such as video clipper, video integrator are widely used, the bigger post-production facilitating video, reasonably use on the one hand and will make contributions to people's life and technological progress, such as: the video of prophase shoot is carried out the making in later stage by video display company, enriches the culture life of the mankind, some natural phenomenas existed are combined broadcasting, observation of nature rule etc.;But on the other hand, video fakement phenomena also thus grows, video is faked and is broadly divided into two aspects, and one is pieced together by each video segment to form a new video, and two is delete some important fragment datas in certain video;And the field that the true integrity demands of some videos is higher, such as criminal monitoring, archaeology, explore, judicial evidence collection and other need the field that video collects evidence, so some lawless person carries out propagandizing or making false evidence etc. for individual interest, video fakement phenomena is also got more and more, such as: false UFO event, outman's event, court evidence is played tricks the appearance of other false videos of event etc., one is the interests compromising people, injure the emotion of the people masses, two is owing to the making of false evidence directly affects justice, violate the laws and regulations of country, it is that state's laws regulation is clearly forbidden;Prior art is either directly through eye-observation for this kind of video one of way that phenomenon takes of playing tricks, judge that in video some is clearly present the place of the leaks such as upper and lower divergence, another kind is to be analyzed sound frequency by special software, frequency spectrum etc., and these methods there is problems of judging inaccurate, overlong time, there is artificial subjective judgment, and some wrongful video fakement phenomenas can not be prevented from source, if and can from shooting video process just can add some specific information, just can reduce or prevent the generation of video fakement phenomena, therefore, solve and judge that the technology that video is faked is those skilled in the art's technical issues that need to address.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of embedding GPS information in video and guarantees method and the device of the true integrity of video.
The present invention is achieved through the following technical solutions, the method that embedding GPS information guarantees the true integrity of video in video, comprises the following steps:
The first step, information acquisition phase: the frame information and the GPS that obtain described video position information data and preserve;
Second step, safe handling stage: the information that the frame information of the video of described acquisition and GPS positioned carries out processing data information and preserved by the numerical value after processing;
3rd step, video playback Qualify Phase: play described video, and the numerical value preserved in described second step is carried out processing data information and carries out contrast verification with the data of preservation in described second step.
Concrete, particularly as follows: first the GPS of the video data in the frame information of the video of described acquisition, voice data, frame number and acquisition, is positioned information data and carries out HASH algorithm each frame HASH value obtained by the described second step safe handling stage;Secondly, the HASH value of frame frame information each in video is carried out HASH algorithm again, obtains the HASH value of total frame;Then the HASH value of total frame it is digitally signed and obtains the data after digital signature;Data after preserving each frame HASH value and total frame being digitally signed.
Concrete, particularly as follows: first described 3rd step video playback Qualify Phase, while playing video, obtains the video data in the frame information of video, voice data and GPS location information data and carries out HASH algorithm and draw each frame HASH value;Then, the HASH value of above-mentioned each frame is compared judgement with the HASH value of each frame of preservation in second step;If the HASH value of each frame is different, then directly judge that video exists untrue phenomenon;HASH value such as each frame is identical, then illustrate that video is true, then the data after the total frame HASH value preserved in second step is digitally signed are decrypted the HASH value drawing always frame after deciphering;The HASH value of each frame calculated in this step is carried out HASH algorithm and draws the HASH value of total frame;The HASH value of frame total after above-mentioned deciphering and the HASH value of above-mentioned total frame being compared, truly and completely, as numerical value is unequal, then described video is true and imperfect for then described video as equal in numerical value.
Concrete, described HASH algorithm is the output data that the input data of random length are converted into regular length.
Concrete, the safe handling stage of described second step carried out once every one second.
Concrete, the video playback Qualify Phase of described 3rd step carried out once every one second.
The present invention also provides for a kind of for realizing the device that above-mentioned embedding GPS information in video guarantees the method for the true integrity of video, including:
Data obtaining module, the frame information and the GPS that obtain described video position information data;
Secure processing module, the information that the frame information of the video of acquisition and GPS positioned carries out processing data information and is preserved by the numerical value after processing;
Video playback authentication module, plays video and the numerical value preserved in secure processing module carries out processing data information and carries out contrast verification with the data of preservation in secure processing module.
Preferably, described data obtaining module includes:
Video capture module, shoots described video, and obtains the frame information data of video;
GPS information acquisition module, gathers described GPS location data information;
Preferably, described secure processing module includes:
First information processing module, the GPS of the frame information data of the video of described video capture module photograph and GPS information acquisition module is positioned information data and carries out HASH algorithm, obtain the HASH value of each frame, and the HASH value of each frame is carried out HASH algorithm again, obtain total frame HASH value;
Digital Signature module, processes, by described first information processing module, the total frame HASH value obtained and is digitally signed;
Video storage modules, store the frame information data of the video of described video capture module photograph, the GPS of GPS information acquisition module positions information data, the GPS of the frame information data of the video of described video capture module photograph and GPS information acquisition module is positioned the HASH value of each frame obtained after information data carries out HASH algorithm by first information processing module and Digital Signature module total frame HASH that the process of first information processing module obtains is digitally signed after numerical value;
Preferably, described video playback authentication module includes:
Video verification module, obtain the frame information data of corresponding video from video storage modules, GPS positions information data and carries out processing data information, and by the numerical value after the data after processing and being processed by first information processing module of storage in video storage modules and compared by the numerical value after Digital Signature module data signature.
Video playback module, plays described video according to the result of video verification module.
Preferably, described video storage modules includes the first video storage modules and the second video storage modules, and described first video storage modules is for storing the GPS location information data of the frame information data of video of described video capture module photograph, GPS information acquisition module;Described second video storage modules for store the HASH value of each frame after first information processing module processes and Digital Signature module total frame HASH value is digitally signed after data.
Preferably, described video verification module includes the second message processing module, deciphering module, the first comparison module and the second comparison module, described second message processing module for by obtaining the frame information data of corresponding video from the first video storage modules, GPS positions information data and carries out HASH algorithm and draw the HASH value of each frame, and the HASH value of each frame is carried out HASH again calculates the HASH value of total frame;Described deciphering module is for being decrypted the data after the digital signature of storage in the second video storage modules, and described first comparison module compares for the HASH value comparing each frame after the second message processing module processes the HASH value of each frame that stores with the second video storage modules;Described second comparison module compares for the HASH value of the numerical value after being deciphered by deciphering module and the total frame in the second comparison module.
There is advantages that
If 1 just can add some specific information from the process of shooting video, namely video and GPS location information data carry out combination, reduce or prevent the generation of video fakement phenomena, it is ensured that the true and integrity of video;
2, present inventive concept is novel, easily realizes.
Accompanying drawing explanation
For ease of illustrating, the present invention is described in detail by following preferred embodiment and accompanying drawing.
Fig. 1 is the method schematic diagram that the present invention realizes;
Fig. 2 be in Fig. 1 of the present invention step S2 implement figure;
Fig. 3 be in Fig. 1 of the present invention step S3 implement figure;
Fig. 4 is the structure drawing of device that the present invention realizes;
Fig. 5 is the concrete schematic diagram of device of Fig. 4 of the present invention;
Fig. 6 is the concrete schematic diagram of the video storage modules of the present invention;
Fig. 7 is the concrete schematic diagram of the video verification module of the present invention.
Detailed description of the invention
Shown in Fig. 1-3, the present invention provides a kind of method that embedding GPS information in video guarantees the true integrity of video, the steps include:
The first step, information acquisition phase: the frame information and the GPS that obtain described video position information data and preserve;
Second step, safe handling stage: the information that the frame information of the video of described acquisition and GPS positioned carries out processing data information and preserved by the numerical value after processing;That is: first, the GPS of the video data in the frame information of the video of described acquisition, voice data, frame number and acquisition is positioned information data and carry out HASH algorithm each frame HASH value obtained;Secondly, the HASH value of frame frame information each in video is carried out HASH algorithm again, obtains the HASH value of total frame;Then the HASH value of total frame it is digitally signed and obtains the data after digital signature;Data after preserving each frame HASH value and total frame being digitally signed.
HASH algorithm is the input data of random length and the GPS of video data, voice data, frame number and acquisition will to be positioned information data with bytewise, pass through hashing algorithm, it is transformed into the output data of regular length, in the present embodiment, regular length is 20 bytes, this output data value i.e. HASH value.
3rd step, video playback Qualify Phase: play described video, and the numerical value preserved in described second step is carried out processing data information and carries out contrast verification with the data of preservation in described second step;That is:, first, while playing video, obtain the video data in the frame information of video, voice data and GPS location information data and carry out HASH algorithm and draw each frame HASH value;Then, the HASH value of above-mentioned each frame is compared judgement with the HASH value of each frame of preservation in second step;If the HASH value of each frame is different, then directly judge that video exists untrue phenomenon;HASH value such as each frame is identical, then illustrate that video is true, then the data after the total frame HASH value preserved in second step is digitally signed are decrypted the HASH value drawing always frame after deciphering;The HASH value of each frame calculated in this step is carried out HASH algorithm and draws the HASH value of total frame;The HASH value of frame total after above-mentioned deciphering and the HASH value of above-mentioned total frame being compared, truly and completely, as numerical value is unequal, then described video is true and imperfect for then described video as equal in numerical value.
In the present embodiment, the safe handling stage of described second step and the video playback Qualify Phase of the 3rd step carried out once every one second.
Shown in Fig. 4-7, for above method, the present invention also provides for a kind of for realizing the device that above-mentioned embedding GPS information in video guarantees the method for the true integrity of video, including:
Data obtaining module 1, the frame information and the GPS that obtain described video position information data;
Secure processing module 2, the information that the frame information of the video of acquisition and GPS positioned carries out processing data information and is preserved by the numerical value after processing;
Video playback authentication module 3, plays video and the numerical value preserved in secure processing module 2 carries out processing data information and carries out contrast verification with the data of preservation in secure processing module 2.
Wherein, described data obtaining module 1 includes:
Video capture module 11, shoots described video, and obtains the frame information data of video;
GPS information acquisition module 12, gathers described GPS location data information;
Wherein, described secure processing module 2 includes:
First information processing module 21, the frame information data of the video described video capture module 11 shot and the GPS of GPS information acquisition module 12 position information data and carry out HASH algorithm, obtain the HASH value of each frame, and the HASH value of each frame is carried out HASH algorithm again, obtain total frame HASH value;
Digital Signature module 22, processes, by described first information processing module 21, the total frame HASH value obtained and is digitally signed;
Video storage modules 23, store the frame information data of video of described video capture module 11 shooting, the GPS of GPS information acquisition module 12 positions information data, the GPS of the frame information data of the video that described video capture module 11 shoot and GPS information acquisition module 12 is positioned the HASH value of each frame obtained after information data carries out HASH algorithm by first information processing module 21 and Digital Signature module 22 total frame HASH that first information processing module 21 process obtains is digitally signed after numerical value.
Wherein, described video playback authentication module 3 includes:
Video verification module 31, obtain the frame information data of corresponding video from video storage modules 23, GPS positions information data and carries out processing data information, and by the numerical value after the data after processing and being processed by first information processing module 21 of storage in video storage modules 23 and compared by the numerical value after Digital Signature module 22 data signature;
Video playback module 32, plays described video according to the result of video verification module 31 or gives corresponding prompting.
Wherein, described video storage modules 23 includes: the first video storage modules 231 and the second video storage modules 232, and the first video storage modules 231 is for storing the GPS location information data of the frame information data of video of video capture module 11 shooting, GPS information acquisition module 12;Second video storage modules 232 for the HASH value and Digital Signature module 22 storing each frame after first information processing module 21 processes, total frame HASH value is digitally signed after data.
Wherein, described video verification module 31 includes: the second message processing module 331, deciphering module the 312, first comparison module 313 and the second comparison module 314, second message processing module 51 for by obtaining the frame information data of corresponding video from the first video storage modules 231, GPS positions information data and carries out HASH algorithm and draw the HASH value of each frame, and the HASH value of each frame carried out HASH again calculate the HASH value of total frame;Deciphering module 312 is for being decrypted the data after the digital signature of storage in the second video storage modules 323, and described first comparison module 313 compares for the HASH value comparing each frame after the second message processing module 331 processes the HASH value of each frame that stores with the second video storage modules 42;Described second comparison module 314 compares for the HASH value of the numerical value after being deciphered by deciphering module 312 and the total frame in the second comparison module 314.
The detailed description of the invention of the above is the better embodiment of the present invention, not limits specific embodiment of the invention scope with this, and the scope of the present invention includes being not limited to this detailed description of the invention.All equivalence changes made according to the shape of the present invention, structure all comprise in protection scope of the present invention.