CN111585744A - Video transmission method and system based on hardware codec - Google Patents
Video transmission method and system based on hardware codec Download PDFInfo
- Publication number
- CN111585744A CN111585744A CN202010453739.3A CN202010453739A CN111585744A CN 111585744 A CN111585744 A CN 111585744A CN 202010453739 A CN202010453739 A CN 202010453739A CN 111585744 A CN111585744 A CN 111585744A
- Authority
- CN
- China
- Prior art keywords
- video data
- variable
- encrypted
- decryption
- encryption
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/001—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
- H04N19/139—Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a video transmission method and a system based on a hardware codec, wherein the method comprises the following steps: the sending end encodes the received video data to be encrypted through a preset hardware encoder to generate H.264 video data, then performs chaotic encryption on key variables extracted from the H.264 video data to generate encrypted variables, and finally performs entropy encoding on the encrypted variables to generate H.264 encrypted video data and sends the H.264 encrypted video data to the receiving end; and the receiving end responds to the received H.264 encrypted video data, performs chaotic decryption on the encrypted variable extracted from the H.264 encrypted video data to generate H.264 decrypted video data, and finally decodes the H.264 decrypted video data through a preset hardware decoder to generate and display target video data. The method solves the technical problem that the video transmission method in the prior art cannot realize format compatibility while keeping high video transmission efficiency.
Description
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video transmission method and system based on a hardware codec.
Background
The video encryption technology is an important means for information security and privacy protection, and is widely applied to the fields of social media communication, remote video monitoring, commercial image property right protection and the like. The video media mainly exists in two forms of real-time video stream and static file, and generally has two encoding formats of h.264 and MPEG (Moving Picture Experts Group). A stream cipher system is generally adopted for encrypting a real-time video stream to reduce encryption time consumption so as to keep good real-time performance, such as chaotic stream cipher encryption; for video static files, block cipher system Encryption is generally adopted to increase Encryption strength and improve security performance, such as AES (Advanced Encryption Standard) Encryption.
The prior art method for encrypting h.264 video generally comprises: (1) the RGB image is encrypted and then coded; (2) h.264 video full encryption; (3) h.264 video partial encryption; (4) h.264 video selective encryption. The method (1) firstly carries out pixel encryption on an RGB image, and then carries out H.264 coding on the encrypted image; referring to fig. 1, the method (2) directly encrypts all h.264 video frames without difference to form a frame of unformatted encrypted stream; the method (3) reserves H.264 frame header and slice header formats, only encrypts slice body data, wherein slice is a strip divided by a picture in an encoding process, and the method enables the encrypted code stream to be recognized as the H.264 format but can not be decoded by a standard decoder; referring to fig. 2, the method (4) encrypts key variables in the encoding process, so that not only can a video scene be effectively encrypted, but also the h.264 standard format can be protected, and the encrypted video still maintains format compatibility.
However, as for the encryption methods (1), (2) and (3) using the h.264 hardware codec, in the method (1), the original definition cannot be restored after video decoding due to quantization lossy operation in the encoding and decoding process; the method (2) destroys the video format by using undifferentiated encryption operation, and the method (3) improves the method (2), although the H.264 video frame header and Slice header are kept unchanged, the encrypted Slice body cannot be correctly decoded, and the video format compatibility is not achieved; the method (4) can only be realized based on a software coding and decoding library, cannot realize real-time encryption, and has low video transmission efficiency.
Disclosure of Invention
The invention provides a video transmission method and a video transmission system based on a hardware codec, which solve the technical problem that the video transmission method in the prior art cannot realize format compatibility while keeping higher video transmission efficiency.
The invention provides a video transmission method based on hardware codec, which is applied to a sending end and a receiving end which are connected with each other, and comprises the following steps:
the sending end responds to the received video data to be encrypted, and encodes the video data to be encrypted through a preset hardware encoder to generate H.264 video data;
the sending end performs chaotic encryption on key variables extracted from the H.264 video data to generate encrypted variables;
the sending end entropy encodes the encryption variable to generate H.264 encrypted video data;
the sending end sends the H.264 encrypted video data to the receiving end;
the receiving end responds to the received H.264 encrypted video data and extracts the encryption variable;
the receiving end performs chaotic decryption on the extracted encryption variable to generate H.264 decrypted video data;
and the receiving end decodes the H.264 decrypted video data through a preset hardware decoder to generate and display target video data.
Optionally, the step of performing chaotic encryption on the key variable extracted from the h.264 video data by the sending end to generate an encrypted variable includes:
performing entropy decoding on the H.264 video data to obtain the key variable; the key variables comprise horizontal direction components and vertical direction components of macro block motion vector difference values and direct current components in a discrete cosine transform matrix;
and according to the received selection result, at least one of a horizontal direction component and a vertical direction component of the macro block motion vector difference value and a direct current component in a discrete cosine transform matrix is encrypted by adopting a preset encryption sequence to generate the encryption variable.
Optionally, the step of extracting, by the receiving end, the encryption variable in response to the received h.264 encrypted video data includes:
performing entropy decoding on the H.264 encrypted video data to obtain intermediate data;
extracting the encryption variable from the intermediate data.
Optionally, the step of performing chaotic decryption on the extracted encryption variable by the receiving end to generate h.264 decrypted video data includes:
decrypting the encrypted variable by adopting the preset decryption sequence to obtain the decryption variable;
and entropy coding the decryption variable to generate the H.264 decryption video data.
Optionally, before the step of entropy encoding the decryption variable to generate the h.264 decrypted video data, the method further includes:
comparing the decryption variable with the key variable;
if the decryption variable is the same as the key variable, prompting that the decryption is successful;
and if the decryption variable is different from the key variable, sending an indication of decryption failure to the sending end.
The invention also provides a video transmission system based on hardware codec, which comprises a sending end and a receiving end which are connected with each other, wherein the sending end comprises:
the hardware coding module is used for responding to the received video data to be encrypted, coding the video data to be encrypted through a preset hardware coder and generating H.264 video data;
the encryption variable generation module is used for performing chaotic encryption on key variables extracted from the H.264 video data to generate encryption variables;
the encrypted video data generation module is used for entropy coding the encrypted variable to generate H.264 encrypted video data;
the encrypted video data sending module is used for sending the H.264 encrypted video data to the receiving end;
the receiving end includes:
an encryption variable extraction module for extracting the encryption variable in response to the received H.264 encrypted video data;
the decrypted video data generation module is used for performing chaotic decryption on the extracted encryption variable to generate H.264 decrypted video data;
and the hardware decoding module is used for decoding the H.264 decrypted video data through a preset hardware decoder to generate and display target video data.
Optionally, the encryption variable generation module includes:
the first entropy decoding submodule is used for performing entropy decoding on the H.264 video data to obtain the key variable; the key variables comprise horizontal direction components and vertical direction components of macro block motion vector difference values and direct current components in a discrete cosine transform matrix;
and the encryption variable generation submodule is used for encrypting at least one of a horizontal direction component and a vertical direction component of the macro block motion vector difference value and a direct current component in a discrete cosine transform matrix by adopting a preset encryption sequence according to the received selection result to generate the encryption variable.
Optionally, the encryption variable extraction module includes:
the second entropy decoding submodule is used for performing entropy decoding on the H.264 encrypted video data to obtain intermediate data;
and the encryption variable extraction sub-module is used for extracting the encryption variable from the intermediate data.
Optionally, the decrypted video data generating module includes:
the decryption variable generation submodule is used for decrypting the encrypted variable by adopting the preset decryption sequence to obtain the decryption variable;
and the entropy coding sub-module is used for entropy coding the decryption variable to generate the H.264 decryption video data.
Optionally, the receiving end further includes:
the variable comparison module is used for comparing the decryption variable with the key variable;
the decryption success prompting module is used for prompting that the decryption is successful if the decryption variable is the same as the key variable;
and the decryption failure prompt module is used for sending an indication of decryption failure to the sending end if the decryption variable is different from the key variable.
According to the technical scheme, the invention has the following advantages:
drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating steps of an embodiment of a full H.264 video encryption method;
FIG. 2 is a flowchart illustrating steps of an embodiment of a method for selective encryption of H.264 video;
FIG. 3 is a flowchart illustrating steps of a hardware codec based video transmission method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps of an alternative embodiment of a hardware codec based video transmission method according to the present invention;
FIG. 5 is a diagram illustrating a structure of an H.264 video frame according to an embodiment of the present invention;
fig. 6 is a block diagram of a hardware codec-based video transmission system according to the present invention.
Detailed Description
The embodiment of the invention provides a video transmission method and a video transmission system based on a hardware codec, which are used for solving the technical problem that the video transmission method in the prior art cannot realize format compatibility while keeping higher video transmission efficiency.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below 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.
Referring to fig. 3, fig. 3 is a flowchart illustrating steps of a video transmission method based on a hardware codec according to an embodiment of the present invention.
The invention provides a video transmission method based on hardware codec, which is applied to a sending end and a receiving end which are connected with each other, and comprises the following steps:
step 301, in response to received video data to be encrypted, the sending end encodes the video data to be encrypted through a preset hardware encoder to generate h.264 video data;
step 302, the sending end performs chaotic encryption on key variables extracted from the H.264 video data to generate encrypted variables;
step 303, entropy coding is carried out on the encryption variable by the sending end to generate H.264 encrypted video data;
step 304, the sending end sends the H.264 encrypted video data to the receiving end;
step 305, the receiving end responds to the received H.264 encrypted video data and extracts the encryption variable;
step 306, the receiving end performs chaotic decryption on the extracted encryption variable to generate H.264 decrypted video data;
and 307, decoding the H.264 decrypted video data by the receiving end through a preset hardware decoder to generate and display target video data.
In the embodiment of the application, video data to be encrypted is received at a sending end and is encoded by a preset hardware encoder to generate H.264 video data; the format of the video data to be encrypted may be RGB, and the like, which is not limited in the embodiment of the present application. After generating H.264 video data, a transmitting end extracts key variables from the H.264 video data, and generates encryption variables after executing chaotic encryption; entropy coding is carried out on the encryption variable to generate H.264 encryption video data which is sent to a receiving end; after a receiving end receives H.264 encrypted video data, extracting an encryption variable in the H.264 encrypted video data, and performing chaotic decryption on the encryption variable to generate H.264 decrypted video data; and finally, decoding the H.264 decrypted video data through a preset hardware decoder of the receiving end to generate final target video data, and displaying through devices such as a display screen of the receiving end. Therefore, the encoding and decoding speed of the video data is improved through the hardware encoder and decoder, and meanwhile, the video data can still be correctly decoded by the standard decoder to obtain a video with an encryption effect in an undecrypted state by combining the chaos encryption and decryption, entropy coding and other modes, so that the encrypted video still maintains format compatibility.
Referring to fig. 4, fig. 4 is a flowchart illustrating steps of an alternative embodiment of a video transmission method based on a hardware codec according to the present invention, including:
step 401, in response to the received video data to be encrypted, the sending end encodes the video data to be encrypted through a preset hardware encoder to generate h.264 video data;
in a specific implementation, the video to be encrypted may be encoded by a preset hardware encoder at the sending end, so as to generate h.264 video data. And because the encoding capability of the hardware encoder is greatly improved compared with that of software encoding, the encoding process can greatly improve the encoding of video data to be encrypted into video data in an H.264 format, for example, encoding video image data in an RGB format into video data in the H.264 format.
Optionally, the step 102 may be replaced by the following steps 402-403:
step 402, performing entropy decoding on the H.264 video data to obtain the key variable; the key variables comprise horizontal direction components and vertical direction components of macro block motion vector difference values and direct current components in a discrete cosine transform matrix;
step 403, according to the received selection result, at least one of the horizontal direction component and the vertical direction component of the macroblock motion vector difference value and the direct current component in the discrete cosine transform matrix is encrypted by using a preset encryption sequence to generate the encryption variable.
Referring to fig. 5, the h.264 video frame is essentially a stream of formatted bit streams, where the Slice includes a header and a body, where the body data includes a number of macroblocks, which are 16 × 16 pixel matrices. The macro block format is divided into macro head and macro body, wherein the macro head includes horizontal component and vertical component of motion vector difference, and quantized parameter difference; the residual coefficients in the macro-volume include the luminance and chrominance discrete cosine transform DCT transform coefficient dc components. If the coded values of the key variables are directly encrypted, the H.264 standard format is destroyed, and the format is incompatible, so that the coded values of the key variables are decoded by using an entropy decoding function to obtain actual values, and at least one of the components is selected to be encrypted according to requirements, so that the encrypted variables are obtained.
For example, the encoding format of the h.264 bitstream can be effectively analyzed by using the entropy decoding code in the JM86 model, and the key variable is obtained. And calling the chaotic encryption function to acquire a plurality of preset encryption sequences and perform exclusive OR operation on the key variables to obtain encryption variables. The bit number of the encryption sequence can be selected according to actual conditions, and the larger the bit number of the preset encryption sequence is, the larger the capacity of the H.264 encrypted video frame is, and the better encryption effect is embodied.
The chaotic encryption constructs a corresponding cipher algorithm based on a 3-dimensional chaotic system, the encryption algorithm generates a preset encryption sequence through iteration, the encryption sequence and a key variable are subjected to XOR operation to obtain an encryption variable, and the mathematical expression of the chaotic encryption algorithm is
Wherein x, y and z are chaotic variables, aij(i, j ═ 1,2,3) is a key parameter, k ═ 1,2,3, …, and the expression of the encryption variable p (k) is:
wherein (c), (k) is a preset encryption sequence generated by the iteration of the encryption algorithm, and m (k) is a key variable.
Step 404, entropy coding is carried out on the encryption variable by the sending end to generate H.264 encryption video data;
the entropy coding is coding without losing any information according to the entropy principle in the coding process. Information entropy is the average amount of information (a measure of uncertainty) of a source. Common entropy coding methods are: shannon (Shannon) coding, Huffman (Huffman) coding and arithmetic coding (arithmetric coding). Entropy coding converts a series of element symbols representing a video sequence into a compressed code stream for transmission or storage.
In this embodiment of the present application, the sending end may perform entropy coding on the processed encrypted variable, and re-encode at least one of a horizontal component and a vertical component of the motion vector difference value of the encrypted macroblock, and a direct current component in the discrete cosine transform matrix into h.264 encrypted video data that can be transmitted.
Step 405, the sending end sends the h.264 encrypted video data to the receiving end;
step 406, the receiving end extracts the encryption variable in response to the received h.264 encrypted video data;
in the embodiment of the present application, after receiving the h.264 encrypted video data, the receiving end needs to decrypt the encrypted variables therein, so as to obtain correct video data.
Optionally, step 406 may include the following sub-steps 4061-4062:
substep 4061, performing entropy decoding on the h.264 encrypted video data to obtain intermediate data;
sub-step 4062, extracting said encryption variable from said intermediate data.
In another embodiment of the present application, in order to extract the encryption variable from the h.264 encrypted video data, entropy decoding may be performed on the h.264 encrypted video data to obtain intermediate data, and then the encryption variable may be extracted from the intermediate data to perform the next chaotic decryption process.
Step 407, the receiving end performs chaotic decryption on the extracted encryption variable to generate h.264 decrypted video data;
optionally, step 407 may include the following sub-steps 4071-4072:
substep 4071, decrypting the encrypted variable by using the preset decryption sequence to obtain the decrypted variable;
sub-step 4072, entropy encoding said decrypted variable to generate said h.264 decrypted video data.
In the embodiment of the application, the decryption operation is the inverse process of the encryption operation, the preset decryption sequence is generated after iterative computation is performed through the decryption algorithm, and exclusive or operation is performed on the preset decryption sequence and the encryption variable to obtain the decryption variable, and the mathematical expression of the chaotic decryption algorithm is
Wherein the ratio of x, y,z is a chaotic variable, aij(i, j is 1,2,3) is a key parameter, k is 1,2,3, …
where n (k) is a preset decryption sequence iteratively generated by the decryption algorithm, and p (k) is an encryption variable.
After the decryption variables are obtained, the decryption variables need to be entropy encoded again to generate h.264 decrypted video data which can be decoded by a hardware decoder.
Further, after the sub-step 4071 and before the sub-step 4072, the following steps S1-S3 may be further included:
step S1, comparing the decryption variable with the key variable;
step S2, if the decryption variable is the same as the key variable, the decryption is prompted to be successful;
step S3, if the decryption variable is different from the key variable, sending an indication of decryption failure to the sending end.
In the embodiment of the present application, if the encryption algorithm matches the key of the decryption algorithm (that is, the preset encryption sequence corresponds to the preset decryption sequence), the decryption variable is the same as the key variablePrompting that the decryption is successful, and indicating that the data transmission process is finished; if it isThe decryption failure is indicated, and a prompt of the decryption failure is sent to the sending end to inform the user of processing, such as retransmitting the video data to be encrypted.
And step 408, the receiving end decodes the H.264 decrypted video data through a preset hardware decoder to generate and display target video data.
In the embodiment of the application, the receiving end decrypts the h.264 encrypted video data to obtain the h.264 decrypted video data, and then decodes the h.264 decrypted video data through the preset hardware decoder to generate the target video data, and displays the target video data through a display device of the receiving end.
Optionally, before receiving the video data to be encrypted, the sending end and the receiving end may be respectively connected to a network, and then a connection request is initiated to the sending end by the receiving end, and after the sending end confirms the request, a TCP connection is established.
In the embodiment of the application, a sending end receives video data to be encrypted, the H.264 video data is generated for transmission after the video data to be encrypted is encoded through a preset hardware encoder, entropy decoding and chaotic encryption are sequentially carried out on the H.264 video data through the sending end, encryption variables are obtained, entropy encoding is carried out on the encryption variables, and the H.264 encrypted video data is generated and sent to a receiving end; and after receiving the H.264 encrypted video data, the receiving end performs chaotic decryption after entropy decoding on the H.264 encrypted video data to extract an encryption variable so as to generate H.264 decrypted video data, and finally decodes the H.264 decrypted video data through a preset hardware decoder of the receiving end so as to generate and display target video data. Therefore, the encryption of partial video data is realized by the chaotic encryption method, the video with the encryption effect can be correctly decoded and obtained even under the condition of not decrypting, and the format compatibility of the video is kept; meanwhile, a hardware encoder and a hardware decoder are respectively arranged at the sending end and the receiving end to encode and decode H.264 video data, so that the video transcoding efficiency is improved, and the overall transmission efficiency of the video is improved.
Referring to fig. 6, a hardware codec-based video transmission system according to an embodiment of the present application is shown, and includes a sending end 611 and a receiving end 612 that are connected to each other, where the sending end 611 includes:
the hardware coding module 601 is configured to respond to received video data to be encrypted, and code the video data to be encrypted through a preset hardware encoder to generate h.264 video data;
an encrypted variable generation module 602, configured to perform chaotic encryption on the key variable extracted from the h.264 video data to generate an encrypted variable;
an encrypted video data generating module 603, configured to perform entropy encoding on the encrypted variable to generate h.264 encrypted video data;
an encrypted video data sending module 604, configured to send the h.264 encrypted video data to the receiving end 612;
the receiving end 612 includes:
an encryption variable extraction module 605 for extracting the encryption variable in response to the received h.264 encrypted video data;
a decrypted video data generating module 606, configured to perform chaotic decryption on the extracted encrypted variable to generate h.264 decrypted video data;
and the hardware decoding module 607 is configured to decode the h.264 decrypted video data through a preset hardware decoder, generate target video data, and display the target video data.
Optionally, the encryption variable generation module 602 includes:
the first entropy decoding submodule is used for performing entropy decoding on the H.264 video data to obtain the key variable; the key variables comprise horizontal direction components and vertical direction components of macro block motion vector difference values and direct current components in a discrete cosine transform matrix;
and the encryption variable generation submodule is used for encrypting at least one of a horizontal direction component and a vertical direction component of the macro block motion vector difference value and a direct current component in a discrete cosine transform matrix by adopting a preset encryption sequence according to the received selection result to generate the encryption variable.
Optionally, the encryption variable extraction module 605 includes:
the second entropy decoding submodule is used for performing entropy decoding on the H.264 encrypted video data to obtain intermediate data;
and the encryption variable extraction sub-module is used for extracting the encryption variable from the intermediate data.
Optionally, the decrypted video data generating module 606 includes:
the decryption variable generation submodule is used for decrypting the encrypted variable by adopting the preset decryption sequence to obtain the decryption variable;
and the entropy coding sub-module is used for entropy coding the decryption variable to generate the H.264 decryption video data.
Optionally, the receiving end 612 further includes:
the variable comparison module is used for comparing the decryption variable with the key variable;
the decryption success prompting module is used for prompting that the decryption is successful if the decryption variable is the same as the key variable;
and a decryption failure prompt module, configured to send an instruction of decryption failure to the sending end 611 if the decryption variable is different from the key variable.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above described systems, systems and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, system and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A video transmission method based on hardware codec, which is applied to a transmitting end and a receiving end connected with each other, includes:
the sending end responds to the received video data to be encrypted, and encodes the video data to be encrypted through a preset hardware encoder to generate H.264 video data;
the sending end performs chaotic encryption on key variables extracted from the H.264 video data to generate encrypted variables;
the sending end entropy encodes the encryption variable to generate H.264 encrypted video data;
the sending end sends the H.264 encrypted video data to the receiving end;
the receiving end responds to the received H.264 encrypted video data and extracts the encryption variable;
the receiving end performs chaotic decryption on the extracted encryption variable to generate H.264 decrypted video data;
and the receiving end decodes the H.264 decrypted video data through a preset hardware decoder to generate and display target video data.
2. The method according to claim 1, wherein the step of the sending terminal performing chaotic encryption on key variables extracted from the h.264 video data to generate encrypted variables comprises:
performing entropy decoding on the H.264 video data to obtain the key variable; the key variables comprise horizontal direction components and vertical direction components of macro block motion vector difference values and direct current components in a discrete cosine transform matrix;
and according to the received selection result, at least one of a horizontal direction component and a vertical direction component of the macro block motion vector difference value and a direct current component in a discrete cosine transform matrix is encrypted by adopting a preset encryption sequence to generate the encryption variable.
3. The method according to claim 1, wherein the step of extracting the encryption variable by the receiving end in response to the received h.264 encrypted video data comprises:
performing entropy decoding on the H.264 encrypted video data to obtain intermediate data;
extracting the encryption variable from the intermediate data.
4. The method according to claim 1, wherein the step of the receiving end performing chaotic decryption on the extracted encryption variables to generate h.264 decrypted video data comprises:
decrypting the encrypted variable by adopting the preset decryption sequence to obtain the decryption variable;
and entropy coding the decryption variable to generate the H.264 decryption video data.
5. The method of claim 4, wherein prior to said step of entropy encoding said decryption variable to generate said H.264 decrypted video data, said method further comprises:
comparing the decryption variable with the key variable;
if the decryption variable is the same as the key variable, prompting that the decryption is successful;
and if the decryption variable is different from the key variable, sending an indication of decryption failure to the sending end.
6. A video transmission system based on hardware codec, comprising a transmitting end and a receiving end connected to each other, wherein the transmitting end comprises:
the hardware coding module is used for responding to the received video data to be encrypted, coding the video data to be encrypted through a preset hardware coder and generating H.264 video data;
the encryption variable generation module is used for performing chaotic encryption on key variables extracted from the H.264 video data to generate encryption variables;
the encrypted video data generation module is used for entropy coding the encrypted variable to generate H.264 encrypted video data;
the encrypted video data sending module is used for sending the H.264 encrypted video data to the receiving end;
the receiving end includes:
an encryption variable extraction module for extracting the encryption variable in response to the received H.264 encrypted video data;
the decrypted video data generation module is used for performing chaotic decryption on the extracted encryption variable to generate H.264 decrypted video data;
and the hardware decoding module is used for decoding the H.264 decrypted video data through a preset hardware decoder to generate and display target video data.
7. The system of claim 6, wherein the encryption variable generation module comprises:
the first entropy decoding submodule is used for performing entropy decoding on the H.264 video data to obtain the key variable; the key variables comprise horizontal direction components and vertical direction components of macro block motion vector difference values and direct current components in a discrete cosine transform matrix;
and the encryption variable generation submodule is used for encrypting at least one of a horizontal direction component and a vertical direction component of the macro block motion vector difference value and a direct current component in a discrete cosine transform matrix by adopting a preset encryption sequence according to the received selection result to generate the encryption variable.
8. The system of claim 6, wherein the encryption variable extraction module comprises:
the second entropy decoding submodule is used for performing entropy decoding on the H.264 encrypted video data to obtain intermediate data;
and the encryption variable extraction sub-module is used for extracting the encryption variable from the intermediate data.
9. The system of claim 6, wherein the decrypted video data generation module comprises:
the decryption variable generation submodule is used for decrypting the encrypted variable by adopting the preset decryption sequence to obtain the decryption variable;
and the entropy coding sub-module is used for entropy coding the decryption variable to generate the H.264 decryption video data.
10. The system of claim 9, wherein the receiving end further comprises:
the variable comparison module is used for comparing the decryption variable with the key variable;
the decryption success prompting module is used for prompting that the decryption is successful if the decryption variable is the same as the key variable;
and the decryption failure prompt module is used for sending an indication of decryption failure to the sending end if the decryption variable is different from the key variable.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010453739.3A CN111585744A (en) | 2020-05-26 | 2020-05-26 | Video transmission method and system based on hardware codec |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010453739.3A CN111585744A (en) | 2020-05-26 | 2020-05-26 | Video transmission method and system based on hardware codec |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111585744A true CN111585744A (en) | 2020-08-25 |
Family
ID=72111019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010453739.3A Pending CN111585744A (en) | 2020-05-26 | 2020-05-26 | Video transmission method and system based on hardware codec |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111585744A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114221786A (en) * | 2021-11-17 | 2022-03-22 | 西安空间无线电技术研究所 | Novel communication hardware encryption system and method based on pulse compression |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20070074487A (en) * | 2006-01-07 | 2007-07-12 | 한국전자통신연구원 | Method and apparatus for video data encoding and decoding |
US20090135901A1 (en) * | 2007-11-28 | 2009-05-28 | The Hong Kong University Of Science And Technology | Complexity adaptive video encoding using multiple reference frames |
CN105791853A (en) * | 2016-03-04 | 2016-07-20 | 广东工业大学 | Encrypted embedded video chaotic secret communication method after H.264 coding |
CN105871537A (en) * | 2016-06-16 | 2016-08-17 | 广东工业大学 | Video communication method and device based on chaotic encryption |
CN107396106A (en) * | 2017-06-26 | 2017-11-24 | 深圳市亿联智能有限公司 | A kind of Video Encryption Algorithm based on H.265 coding standard |
-
2020
- 2020-05-26 CN CN202010453739.3A patent/CN111585744A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20070074487A (en) * | 2006-01-07 | 2007-07-12 | 한국전자통신연구원 | Method and apparatus for video data encoding and decoding |
US20090135901A1 (en) * | 2007-11-28 | 2009-05-28 | The Hong Kong University Of Science And Technology | Complexity adaptive video encoding using multiple reference frames |
CN105791853A (en) * | 2016-03-04 | 2016-07-20 | 广东工业大学 | Encrypted embedded video chaotic secret communication method after H.264 coding |
CN105871537A (en) * | 2016-06-16 | 2016-08-17 | 广东工业大学 | Video communication method and device based on chaotic encryption |
CN107396106A (en) * | 2017-06-26 | 2017-11-24 | 深圳市亿联智能有限公司 | A kind of Video Encryption Algorithm based on H.265 coding standard |
Non-Patent Citations (2)
Title |
---|
XIAOYANG ZHANG ET AL.: ""design and arm-embedded implementation of a chaotic secure communication scheme based on H.264 selective encryption"", 《NONLINEAR DYNAMICS》 * |
陈平: ""多媒体混沌保密通信系统的设计与硬件实现技术研究"", 《中国优秀博硕士学位论文全文数据库(博士)基础科学A辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114221786A (en) * | 2021-11-17 | 2022-03-22 | 西安空间无线电技术研究所 | Novel communication hardware encryption system and method based on pulse compression |
CN114221786B (en) * | 2021-11-17 | 2024-03-26 | 西安空间无线电技术研究所 | Novel communication hardware encryption system and method based on pulse compression |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Long et al. | Separable reversible data hiding and encryption for HEVC video | |
US7295673B2 (en) | Method and system for securing compressed digital video | |
Xu et al. | Data hiding in encrypted H. 264/AVC video streams by codeword substitution | |
Van Droogenbroeck et al. | Techniques for a selective encryption of uncompressed and compressed images | |
Liu et al. | A survey of video encryption algorithms | |
Itier et al. | Recompression of JPEG crypto-compressed images without a key | |
CN1893350B (en) | Method and device for encryption and decryption of digital data | |
JP4128941B2 (en) | Multimedia data encryption compression method and apparatus | |
CN109168033B (en) | Video privacy data protection system and method | |
Lui et al. | Chaos-based selective encryption for H. 264/AVC | |
Suresh et al. | Image Encryption with Space-filling Curves. | |
CN101489123B (en) | Digital video content fast protection and deprotection method | |
CN111585744A (en) | Video transmission method and system based on hardware codec | |
US20040120517A1 (en) | Device for compression and encryption, and device for decompression and decryption | |
Van Rensburg et al. | The first draco 3D Object crypto-compression scheme | |
CN104301727B (en) | Quality controllable H.264 video-aware AES based on CABAC | |
El-Arsh et al. | A new light-weight jpeg2000 encryption technique based on arithmetic coding | |
Saleh et al. | Moving objects encryption of high efficiency video coding (HEVC) using AES algorithm | |
CN115278243A (en) | Real-time video encryption method and device for resisting deep learning face attack | |
WO2020223858A1 (en) | Privacy protection method for transmitting end and receiving end, electronic device and computer readable storage medium | |
Khlif et al. | A very efficient encryption scheme for the H. 264/AVC CODEC adopted in Intra prediction mode | |
Huang et al. | A video steganography scheme based on post-quantum cryptography | |
Mohamed et al. | Joint compression-encryption technique based on arithmetic coding for jpeg images | |
Itier et al. | How to recompress a JPEG crypto-compressed image? | |
Khlif et al. | Selective encryption of CAVLC for H. 264/AVC |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200825 |
|
RJ01 | Rejection of invention patent application after publication |