CN108882029A - A kind of decryption of video method and apparatus - Google Patents

A kind of decryption of video method and apparatus Download PDF

Info

Publication number
CN108882029A
CN108882029A CN201810700092.2A CN201810700092A CN108882029A CN 108882029 A CN108882029 A CN 108882029A CN 201810700092 A CN201810700092 A CN 201810700092A CN 108882029 A CN108882029 A CN 108882029A
Authority
CN
China
Prior art keywords
image
array
offset
gray scale
decryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810700092.2A
Other languages
Chinese (zh)
Other versions
CN108882029B (en
Inventor
周大程
孟超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yinhe Technology (beijing) Co Ltd
Original Assignee
Yinhe Technology (beijing) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yinhe Technology (beijing) Co Ltd filed Critical Yinhe Technology (beijing) Co Ltd
Priority to CN201810700092.2A priority Critical patent/CN108882029B/en
Publication of CN108882029A publication Critical patent/CN108882029A/en
Application granted granted Critical
Publication of CN108882029B publication Critical patent/CN108882029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video stream decryption

Abstract

The invention discloses decryption of video method and apparatus, are related to field of computer technology.One specific embodiment of this method includes:Video file is received, the image of wherein each frame is extracted;The image for being in upper layer in each frame image is obtained, converts gray scale array for upper layer images;Wherein, each frame image is divided into upper layer and lower layer image, i.e. upper layer images are covered in lower image;The corresponding gray scale array of each frame image is decrypted, to obtain the offset array of each frame image according to the gray scale array after decryption;According to the image for being in lower layer in the mobile each frame image of the offset array of each frame image, new video file is generated with the lower image by each frame after movement.The embodiment is able to solve in the prior art the technical issues of without being decrypted for VR video.

Description

A kind of decryption of video method and apparatus
Technical field
The present invention relates to field of computer technology more particularly to a kind of decryption of video method and apparatus.
Background technique
Currently, more and more people watch VR video, VR video bring viewing effect is experienced.To be greatly facilitated Production, distribution and the popularization of VR video.Wherein, VR video refers to the VR camera function of people's profession by site environment truly The video recorded.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:At present in addition to common Outside the encryption of video, decryption scheme, there is no the technologies of special encryption and decryption for VR video.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of decryption of video method and apparatus, it is able to solve and does not have in the prior art There is the technical issues of being decrypted for VR video.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of decryption of video method is provided, including Video file is received, the image of wherein each frame is extracted;The image that upper layer is in each frame image is obtained, by upper layer figure As being converted into gray scale array;Wherein, each frame image is divided into upper layer and lower layer image, i.e. upper layer images are covered on lower image On;The corresponding gray scale array of each frame image is decrypted, to obtain each frame image according to the gray scale array after decryption Offset array;According to the image for being in lower layer in the mobile each frame image of the offset array of each frame image, moved with passing through The lower image of each frame after dynamic generates new video file.
Optionally, the image in each frame image in upper layer is rectangular image, and in each frame image In the rectangular image in upper layer be covered on the upper left of the image in lower layer.
Optionally, the image for being in upper layer in each frame image is obtained, converts gray scale array for upper layer images, is wrapped It includes:
The size of the rectangular image is n*1, then being stored as gray scale array then is n array value, and n array value is then Corresponding to the gray value on rectangular image length direction.
Optionally, the corresponding gray scale array of each frame image is decrypted, including:
Extract first array value of gray scale array;
According to first array value, second array value to the last one array value in gray scale array is solved It is close;
The array value obtained by decryption, the gray scale array after generating decryption.
Optionally, the offset array of each frame image is obtained according to the gray scale array after decryption, including:
Each of gray scale array after decryption array value is expressed as the entire of image after an offset and offset The percentage b of width;
According to percentage b=[(offset-maximum offset one of the entire width of image after offset and offset Half) half of/maximum offset] * constant, corresponding offset is calculated, the gray scale array after finally being decrypted is corresponding partially Shifting amount array.
In addition, according to an aspect of an embodiment of the present invention, a kind of decryption of video device is provided, including obtain module, For receiving video file, the image of wherein each frame is extracted;The image that upper layer is in each frame image is obtained, it will be upper Tomographic image is converted into gray scale array;Wherein, each frame image is divided into upper layer and lower layer image, i.e. upper layer images are covered on lower layer On image;Deciphering module, for the corresponding gray scale array of each frame image to be decrypted, according to the gray scale array after decryption Obtain the offset array of each frame image;Module is formed, for according to the mobile each frame of the offset array of each frame image It is in the image of lower layer in image, new video file is generated with the lower image by each frame after movement.
Optionally, the image in each frame image in upper layer is rectangular image, and in each frame image In the rectangular image in upper layer be covered on the upper left of the image in lower layer.
Optionally, the module that obtains obtains the image that upper layer is in each frame image, and upper layer images are converted For gray scale array, including:
The size of the rectangular image is n*1, then being stored as gray scale array then is n array value, and n array value is then Corresponding to the gray value on rectangular image length direction.
Optionally, the corresponding gray scale array of each frame image is decrypted in the deciphering module, including:
Extract first array value of gray scale array;
According to first array value, second array value to the last one array value in gray scale array is solved It is close;
The array value obtained by decryption, the gray scale array after generating decryption.
Optionally, the offset array for forming module and obtaining each frame image according to the gray scale array after decryption, packet It includes:
Each of gray scale array after decryption array value is expressed as the entire of image after an offset and offset The percentage b of width;
According to percentage b=[(offset-maximum offset one of the entire width of image after offset and offset Half) half of/maximum offset] * constant, corresponding offset is calculated, the gray scale array after finally being decrypted is corresponding partially Shifting amount array.
Other side according to an embodiment of the present invention additionally provides a kind of electronic equipment, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes method described in any of the above-described decryption of video embodiment.
Other side according to an embodiment of the present invention additionally provides a kind of computer-readable medium, is stored thereon with meter Calculation machine program realizes method described in any of the above-described decryption of video embodiment when described program is executed by processor.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the schematic diagram of the main flow of video encryption method according to an embodiment of the present invention;
Fig. 2 is the schematic diagram that can refer to the main flow of video encryption method of embodiment according to the present invention;
Fig. 3 is the schematic diagram of the main modular of video-encryption device according to an embodiment of the present invention;
Fig. 4 is the schematic diagram of the main flow of decryption of video method according to an embodiment of the present invention;
Fig. 5 is the schematic diagram that can refer to the main flow of decryption of video method of embodiment according to the present invention;
Fig. 6 is the schematic diagram of the main modular of decryption of video device according to an embodiment of the present invention;
Fig. 7 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 8 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the method for video-encryption according to an embodiment of the present invention, as shown in Figure 1, the video encryption method includes:
Step S101 receives video file, and the image for extracting a wherein frame is split to move line of demarcation, is deviated Image after measuring array and offset.
Wherein, the image after the offset is to experienced the image divided at least twice and finally obtained after mobile.
Step S102 obtains corresponding gray scale array according to offset array, to encrypt to the gradation data.
Preferably, obtaining at least two random numbers using random number generator and being added to preset prepared cipher key sets.So Afterwards in preparation cipher key sets, select a prepared key as formal key, by the formal key pair gray scale array into Row encryption.Further, random number generator is repeatedly utilized, at least two random numbers is obtained and is added to preset prepared key set It closes, to update the prepared cipher key sets.
Preferably, each prepared key is ranked up in preparation cipher key sets, each prepared key has its right The sequence number answered.
Further, when being encrypted to the gradation data, the sequence of the available preparation key as formal key Row number, by the foremost of the gray scale array of the sequence number setting of formal key after encryption.
Further, in preset time, sequence number corresponding to the preparation key in preparation cipher key sets is carried out more Newly.
Step S103 converts encrypted gray scale array on the image after image covers the offset, to generate New images.
Step S104 generates new video files when all frames of video file have corresponding new images.
Fig. 2 is the video encryption method that can refer to embodiment according to the present invention, as shown in Fig. 2, the video encryption method May include:
Step S201 receives video file, extracts the image of a wherein frame, described image is divided into two pieces, is then moved The line of demarcation of dynamic segmentation, records offset.
Step S202, repeat step S201, until obtain offset array [a1, a2, a3...], and save offset after Image.
In embodiment, offset array [a1, a2, a3...], wherein if a1<0, then it represents that be moved to the left or indicate It moves up;If a1>0, then it represents that move right or indicate to move down.
It is worth noting that just pre-setting the suitable of moving direction before video file is encrypted and decrypted Sequence, i.e., the direction successively moved in offset array.Such as:The sequence for presetting moving direction is:To the left, to the right, to Above, downwards, to the left, to the right ....
Also it is worth noting that, before video file is encrypted and decrypted, pre-set the side successively divided Formula, such as:Presetting the mode successively divided is:Among intermediate longitudinally split, right side longitudinal point among longitudinally split, left side It cuts, the segmentation ... of leftmost side intermediate lateral.
Preferably, a dividing number can be set, such as segmentation 15 times, that is, obtaining includes 15 several arrays.
Preferably, in order to store conveniently, the value of each data is between 0 to 62 in offset array.
Step S203 obtains corresponding gray scale array according to offset array.
As embodiment, after needing to calculate and save each deviated, the entire width of image after offset and offset Percentage b.So specific calculate can pass through following formula:
The percentage of the entire width of image=[(offset-maximum offset half)/maximum after offset and offset The half of offset] * constant
Wherein, the constant can be 20%.
Such as:The value of each data is between 0 to 62 in offset array, then offset with after offset image it is entire At this moment the percentage b=[(a-31)/31] * 20% of width 0 represents mobile -20% (to the left or moving up), 31 indicate not Become, 62 indicate to move 20% (to the right or moving down).
Further, movement each time can be indicated with a pixel, and the gray scale of this point has been meant that this time Mobile percentage b.Such as:Percentage b is between 0 to 62, and the gray value of a pixel can be expressed as one 0 to 62 Number, it is possible to embodied with a pixel offset and offset after image entire width percentage b.
Preferably, gradation data can be indicated with 64 grades of gray scales according to the different-format of video, 256 grades can also be used Gray scale indicates.
Step S204 obtains at least two random numbers and is added to preset prepared cipher key sets using random number generator.
Such as:64 random numbers can be generated.
Step S205 selects a prepared key as formal key, while obtaining the preparation in preparation cipher key sets The sequence number of key.
Wherein, it is sorted in preparation cipher key sets to each prepared key, i.e., each prepared key has it Corresponding sequence number.
Step S206 is encrypted by the formal key pair gray scale array.
For example, using AES encryption algorithm.Wherein, AES encryption algorithm is the Advanced Encryption Standard in cryptography (Advanced Encryption Standard, AES), also known as Rijndael enciphered method are the one of U.S. Federal Government use Kind block encryption standard.It is, of course, also possible to for example, by using DES algorithm, asymmetric arithmetic RSA etc..
The foremost of the gray scale array of the sequence number setting of formal key after encryption is then store as by step S207 One rectangular image.
It illustrates:The sequence number of formal key is 20 (the 20th), if the gray scale one at the rectangular image midpoint of setting 64 grades are shared, then the gray scale of the 1st point is exactly 20 (sequence numbers), the gray scale of the 2nd point is then gray scale array after encryption First gradation data, and so on, then rectangular image size is exactly 16x 1.
The rectangular image is covered the upper left of image after the offset by step S208, to generate new images.
It, can be by the first row picture of image upper end after the first row pixel overlay offset of rectangular image upper end as embodiment Element, and after first pixel overlay offset of rectangular image upper end first row image upper end first row first pixel.Example Such as:Rectangular image size is:30*1, then after overlay offset image upper end first row preceding 30 pixels.
Step S209 judges whether to encrypt all frames of video file, if then carrying out step S210, Otherwise return step S201.
Step S210 generates new video files and issues according to new images corresponding to each frame.
In embodiment, the image scaled of each frame of new video is distortion, can seriously affect viewing impression, especially exist When watching VR video, therefore play the role of good encryption to VR video.It is worth noting that video of the present invention adds Decryption method also can be applied to common video.
As another embodiment, step S204 and step S205 can be performed a plurality of times, to update in preparation cipher key sets Preparation key.Further, sequence number corresponding to the preparation key in preparation cipher key sets can also be updated, example Such as every 3 seconds one secondary keys of replacement, to prevent from being easy to be cracked using single key.
Fig. 3 is video-encryption device according to an embodiment of the present invention, as shown in figure 3, the video-encryption device 300 includes Divide module 301, encrypting module 302 and generation module 303.Wherein, segmentation module 301 receives video file, extracts wherein one The image of frame is split the image after obtaining offset array and offset to move line of demarcation.Encrypting module 302 is according to offset Array is measured, corresponding gray scale array is obtained, to encrypt to the gradation data;Figure is converted by encrypted gray scale array Picture covers on the image after the offset, to generate new images.Generation module 303 has to all frames of video file to be corresponded to New images when, generate new video files.
It should be noted that in the specific implementation content of video-encryption device of the present invention, video described above adds It has been described in detail in decryption method, therefore has no longer illustrated in this duplicate contents.
Fig. 4 is the method for decryption of video according to an embodiment of the present invention, as shown in figure 4, the decryption of video method includes:
Step S401 receives video file, extracts the image of wherein each frame.
Step S402 obtains the image for being in upper layer in each frame image, converts gray scale array for upper layer images.
Wherein, each frame image is divided into upper layer and lower layer image, i.e. upper layer images are covered in lower image.
The corresponding gray scale array of each frame image is decrypted in step S403, to be obtained according to the gray scale array after decryption Obtain the offset array of each frame image.
Step S404 moves the image that lower layer is in each frame image according to the offset array of each frame image, with New video file is generated by the lower image of each frame after movement.
Fig. 5 is the decryption of video method that can refer to embodiment according to the present invention, as shown in figure 5, the decryption of video method May include:
Step S501 receives video file, extracts the image of a wherein frame.
Step S502 obtains the rectangular image for being in upper layer in this frame image.
Preferably, the rectangular image in upper layer is covered on the upper left of the image in lower layer in this frame image.
The rectangular image is stored as gray scale array, extracts first array value of gray scale array by step S503.
As embodiment, the size of the rectangular image is n*1, then being stored as gray scale array then is n array value, and N array value then corresponds to the gray value on rectangular image length direction, so as to convert the rectangular image for ash Degree group.
Step S504, according to first array value, to second array value in gray scale array to the last one array Value is decrypted.
Preferably, same algorithm is decrypted when using with encryption using the first array value as key.For example, if Using aes algorithm when encryption, then being decrypted using aes algorithm.It is, of course, also possible to for example, by using DES algorithm, it is non-right Claim algorithm RSA etc..
Step S505, the array value obtained by decryption, the gray scale array after generating decryption.
As can be seen that the gray scale array after decryption is a few array value than the gray scale array before decryption, that is, lack First array value in gray scale array before decryption.
Step S506 obtains corresponding offset array according to the gray scale array after decryption.
In embodiment, as soon as encryption when movement each time can be indicated with pixel, this point gray scale table The percentage b of the entire width of image after the offset and offset this time moved is shown.Therefore, decryption when can directly by The percentage of the entire width of image after each of gray scale array after decryption array value is expressed as an offset and deviates Compare b.
Further, according to percentage the b=[(offset-peak excursion of the entire width of image after offset and offset The half of amount)/maximum offset half] * constant, calculate corresponding offset, finally decrypted after gray scale array pair The offset array answered.
Wherein, the constant can be 20%.And maximum offset is just decided when being encrypted.
Step S507, according to offset array, the mobile image for being in lower layer in this frame image.
In embodiment, offset array [a1, a2, a3...], wherein if a1<0, then it represents that be moved to the left or indicate It moves up;If a1>0, then it represents that move right or indicate to move down.
It is worth noting that just pre-setting the suitable of moving direction before video file is encrypted and decrypted Sequence, i.e., the direction successively moved in offset array.Such as:The sequence for presetting moving direction is:To the left, to the right, to Above, downwards, to the left, to the right ....
Also it is worth noting that, before video file is encrypted and decrypted, pre-set the side successively divided Formula, such as:Presetting the mode successively divided is:Among intermediate longitudinally split, right side longitudinal point among longitudinally split, left side It cuts, the segmentation ... of leftmost side intermediate lateral.
Step S508 judges whether to decrypt all frames of video file, if then carrying out step S509, Otherwise return step S501.
Step S509 generates new video file and publication according to the lower image of each frame after movement.
Fig. 6 is decryption of video device according to an embodiment of the present invention, as shown in fig. 6, the video-encryption device 600 includes It obtains module 601, deciphering module 602 and forms module 603.Wherein, obtaining module 601 can receive video file, extract it In each frame image, and obtain in each frame image be in upper layer image, convert gray scale array for upper layer images; Wherein, each frame image is divided into upper layer and lower layer image, i.e. upper layer images are covered in lower image.Later, deciphering module The corresponding gray scale array of 602 pairs of each frame images is decrypted, to obtain each frame image according to the gray scale array after decryption Offset array.Lower layer is according in the mobile each frame image of the offset array of each frame image finally, forming module 603 Image, new video file is generated with the lower image by each frame after mobile.
It should be noted that in the specific implementation content of decryption of video device of the present invention, video solution described above It has been described in detail in decryption method, therefore has no longer illustrated in this duplicate contents.
Fig. 7 is shown can be using the video encryption method of the embodiment of the present invention or the exemplary system of video-encryption device Framework 700.Or Fig. 7 shows the exemplary of the decryption of video method or decryption of video device that can apply the embodiment of the present invention System architecture 700.
As shown in fig. 7, system architecture 700 may include terminal device 701,702,703, network 704 and server 705. Network 704 between terminal device 701,702,703 and server 705 to provide the medium of communication link.Network 704 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 701,702,703 and be interacted by network 704 with server 705, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 701,702,703 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 701,702,703 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 705 can be to provide the server of various services, such as utilize terminal device 701,702,703 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter Breath -- merely illustrative) feed back to terminal device.
It should be noted that video encryption method provided by the embodiment of the present invention is generally executed by server 705, accordingly Ground, video-encryption device are generally positioned in server 705.
It should be understood that the number of terminal device, network and server in Fig. 7 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 8, it illustrates the computer systems 800 for the terminal device for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.Terminal device shown in Fig. 8 is only an example, function to the embodiment of the present invention and should not use model Shroud carrys out any restrictions.
As shown in figure 8, computer system 800 includes central processing unit (CPU) 801, it can be read-only according to being stored in Program in memory (ROM) 802 or be loaded into the program in random access storage device (RAM) 803 from storage section 808 and Execute various movements appropriate and processing.In RAM803, also it is stored with system 800 and operates required various programs and data. CPU801, ROM 802 and RAM803 is connected with each other by bus 804.Input/output (I/O) interface 805 is also connected to bus 804。
I/O interface 805 is connected to lower component:Importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.; And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon Computer program be mounted into storage section 808 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 809, and/or from can Medium 811 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 801, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more conducting wires, just Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as:A kind of processor packet Include segmentation module, encrypting module and generation module.It can be described as:A kind of processor includes obtaining module, deciphering module and shape At module.Wherein, the title of these modules does not constitute the restriction to the module itself under certain conditions.
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes:Video file is received, the image for extracting a wherein frame is split to move line of demarcation, obtains offset number Image after group and offset;According to offset array, corresponding gray scale array is obtained, to encrypt to the gradation data; It converts encrypted gray scale array on the image after image covers the offset, to generate new images;To video file All frames have corresponding new images when, generate new video files.
Alternatively, including:Video file is received, the image of wherein each frame is extracted;It obtains in each frame image in upper The image of layer, converts gray scale array for upper layer images;Wherein, each frame image is divided into upper layer and lower layer image, i.e., on Tomographic image is covered in lower image;The corresponding gray scale array of each frame image is decrypted, according to the gray scale after decryption Array obtains the offset array of each frame image;It is according in the mobile each frame image of the offset array of each frame image The image of lower layer generates new video file with the lower image by each frame after movement.
Technical solution according to an embodiment of the present invention, be able to solve in the prior art without for VR video carry out encryption or The technical issues of decryption.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (10)

1. a kind of decryption of video method, which is characterized in that including:
Video file is received, the image of wherein each frame is extracted;
The image for being in upper layer in each frame image is obtained, converts gray scale array for upper layer images;Wherein, described each Frame image is divided into upper layer and lower layer image, i.e. upper layer images are covered in lower image;
The corresponding gray scale array of each frame image is decrypted, to obtain each frame image according to the gray scale array after decryption Offset array;
According to the image for being in lower layer in the mobile each frame image of the offset array of each frame image, by every after movement The lower image of one frame generates new video file.
2. the method according to claim 1, wherein the image in each frame image in upper layer is square Shape image, and the rectangular image in each frame image in upper layer is covered on the upper left of the image in lower layer.
3. according to the method described in claim 2, it is characterized in that, obtain in each frame image be in upper layer image, with Gray scale array is converted by upper layer images, including:
The size of the rectangular image is n*1, then being stored as gray scale array then is n array value, and n array value then corresponds to Gray value on rectangular image length direction.
4. the method according to claim 1, wherein the corresponding gray scale array of each frame image is decrypted, Including:
Extract first array value of gray scale array;
According to first array value, second array value to the last one array value in gray scale array is decrypted;
The array value obtained by decryption, the gray scale array after generating decryption.
5. the method according to claim 1, wherein obtaining each frame image according to the gray scale array after decryption Offset array, including:
Each of gray scale array after decryption array value is expressed as to the entire width of image after an offset and offset Percentage b;
According to the percentage b=[(offset-maximum offset half)/most of the entire width of image after offset and offset The half of big offset] * constant, corresponding offset is calculated, the corresponding offset number of gray scale array after finally being decrypted Group.
6. a kind of decryption of video device, which is characterized in that including:
Module is obtained, for receiving video file, extracts the image of wherein each frame;It obtains and is in upper layer in each frame image Image, convert gray scale array for upper layer images;Wherein, each frame image is divided into upper layer and lower layer image, i.e. upper layer Image is covered in lower image;
Deciphering module, for the corresponding gray scale array of each frame image to be decrypted, to be obtained according to the gray scale array after decryption Obtain the offset array of each frame image;
Module is formed, for moving the image for being in lower layer in each frame image according to the offset array of each frame image, with New video file is generated by the lower image of each frame after movement.
7. device according to claim 6, which is characterized in that the image in each frame image in upper layer is square Shape image, and the rectangular image in each frame image in upper layer is covered on the upper left of the image in lower layer.
8. device according to claim 7, which is characterized in that the acquisition module obtains in each frame image in upper The image of layer, converts gray scale array for upper layer images, including:
The size of the rectangular image is n*1, then being stored as gray scale array then is n array value, and n array value then corresponds to Gray value on rectangular image length direction.
9. device according to claim 6, which is characterized in that the deciphering module is to the corresponding grey of each frame image Group is decrypted, including:
Extract first array value of gray scale array;
According to first array value, second array value to the last one array value in gray scale array is decrypted;
The array value obtained by decryption, the gray scale array after generating decryption.
10. device according to claim 6, which is characterized in that the formation module is obtained according to the gray scale array after decryption The offset array of each frame image is obtained, including:
Each of gray scale array after decryption array value is expressed as to the entire width of image after an offset and offset Percentage b;
According to the percentage b=[(offset-maximum offset half)/most of the entire width of image after offset and offset The half of big offset] * constant, corresponding offset is calculated, the corresponding offset number of gray scale array after finally being decrypted Group.
CN201810700092.2A 2018-06-29 2018-06-29 Video decryption method and device Active CN108882029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810700092.2A CN108882029B (en) 2018-06-29 2018-06-29 Video decryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810700092.2A CN108882029B (en) 2018-06-29 2018-06-29 Video decryption method and device

Publications (2)

Publication Number Publication Date
CN108882029A true CN108882029A (en) 2018-11-23
CN108882029B CN108882029B (en) 2020-07-31

Family

ID=64297264

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810700092.2A Active CN108882029B (en) 2018-06-29 2018-06-29 Video decryption method and device

Country Status (1)

Country Link
CN (1) CN108882029B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660866A (en) * 2018-12-28 2019-04-19 杭州当虹科技股份有限公司 A kind of decryption of video method based on H5

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060258A1 (en) * 2007-08-31 2009-03-05 Xerox Corporation System and Method for the Generation of Multiple Angle Correlation-Based Digital Watermarks
CN103077498A (en) * 2013-01-04 2013-05-01 东北林业大学 Image encryption algorithm based on shift transformation
CN104077739A (en) * 2014-07-03 2014-10-01 苏州大学应用技术学院 Color image quick encryption method
CN104537600A (en) * 2014-12-16 2015-04-22 陕西科技大学 Secondary image encrypting and decrypting methods and watermark information tamper area positioning method
CN105208404A (en) * 2015-08-26 2015-12-30 北京新东方迅程网络科技有限公司 Video encryption and decryption method and device
CN105243635A (en) * 2015-08-21 2016-01-13 南昌大学 Image encryption method based on two-dimensional compression perception and chaotic system
CN105830134A (en) * 2013-12-16 2016-08-03 来特荣国际有限公司 Method and device for compressing and expanding image intended for encrypted communication, program, and storage medium
CN106341638A (en) * 2016-07-01 2017-01-18 四川秘无痕信息安全技术有限责任公司 Method for adding watermarks to video for Android equipment production
CN108173640A (en) * 2017-12-11 2018-06-15 上海高顿教育培训有限公司 The character string symmetric cryptography and decryption method of a kind of high security

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060258A1 (en) * 2007-08-31 2009-03-05 Xerox Corporation System and Method for the Generation of Multiple Angle Correlation-Based Digital Watermarks
CN103077498A (en) * 2013-01-04 2013-05-01 东北林业大学 Image encryption algorithm based on shift transformation
CN105830134A (en) * 2013-12-16 2016-08-03 来特荣国际有限公司 Method and device for compressing and expanding image intended for encrypted communication, program, and storage medium
CN104077739A (en) * 2014-07-03 2014-10-01 苏州大学应用技术学院 Color image quick encryption method
CN104537600A (en) * 2014-12-16 2015-04-22 陕西科技大学 Secondary image encrypting and decrypting methods and watermark information tamper area positioning method
CN105243635A (en) * 2015-08-21 2016-01-13 南昌大学 Image encryption method based on two-dimensional compression perception and chaotic system
CN105208404A (en) * 2015-08-26 2015-12-30 北京新东方迅程网络科技有限公司 Video encryption and decryption method and device
CN106341638A (en) * 2016-07-01 2017-01-18 四川秘无痕信息安全技术有限责任公司 Method for adding watermarks to video for Android equipment production
CN108173640A (en) * 2017-12-11 2018-06-15 上海高顿教育培训有限公司 The character string symmetric cryptography and decryption method of a kind of high security

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660866A (en) * 2018-12-28 2019-04-19 杭州当虹科技股份有限公司 A kind of decryption of video method based on H5

Also Published As

Publication number Publication date
CN108882029B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
US10467427B2 (en) Method and apparatus for providing secure image encryption and decryption
US11194917B2 (en) Information encryption method and device
CN107113162B (en) The system and method for multivalue packing scheme for homomorphic cryptography
CN106209739A (en) Cloud storage method and system
CN111177801B (en) Signature method and device of electronic document, storage medium and electronic equipment
CN106533665A (en) Method, system and device for storing website private key plaintext
US11449820B2 (en) Electronic signing method and apparatus
CN108112060A (en) For obtaining the method and apparatus of wireless access point information
CN109309736A (en) The generation method and generating means of globally unique ID
CN111970304A (en) Message processing method and device
CN109257162A (en) The method and apparatus of Encryption Algorithm whitepack
CN110401677A (en) Acquisition methods, device, storage medium and the electronic equipment of digital publishing rights key
CN110149537A (en) A kind of advertisement machine split screen control method for playing back and its device
CN108882029A (en) A kind of decryption of video method and apparatus
CN113656713A (en) Network resource processing method, device and system
CN108881953A (en) A kind of video encryption method and device
CN110598427B (en) Data processing method, system and storage medium
JP6910824B2 (en) Information provision system and information provision method
CN109409111A (en) It is a kind of to search for method generally towards encrypted image
CN110492998B (en) Method for encrypting and decrypting data
CN114726611A (en) Multiparty privacy set intersection method, system and device
CN111131270B (en) Data encryption and decryption method and device, electronic equipment and storage medium
CN114726524A (en) Target data sorting method and device, electronic equipment and storage medium
CN114338710A (en) Data synchronization method and device, computer storage medium and related equipment
JP2015118619A (en) Web font distribution method and system therefor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant