CN114339256A - Real-time video encryption method and device based on OpenCL, electronic equipment and storage medium - Google Patents
Real-time video encryption method and device based on OpenCL, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114339256A CN114339256A CN202210018330.8A CN202210018330A CN114339256A CN 114339256 A CN114339256 A CN 114339256A CN 202210018330 A CN202210018330 A CN 202210018330A CN 114339256 A CN114339256 A CN 114339256A
- Authority
- CN
- China
- Prior art keywords
- image
- opencl
- video
- frame image
- host
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000007781 pre-processing Methods 0.000 claims abstract description 23
- 238000012545 processing Methods 0.000 claims description 19
- 238000006243 chemical reaction Methods 0.000 claims description 9
- 230000006835 compression Effects 0.000 claims description 8
- 238000007906 compression Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 5
- 238000004422 calculation algorithm Methods 0.000 description 19
- 238000004364 calculation method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 239000008186 active pharmaceutical agent Substances 0.000 description 2
- 230000004888 barrier function Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000000739 chaotic effect Effects 0.000 description 2
- 235000019800 disodium phosphate Nutrition 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention relates to a real-time video encryption method and device based on OpenCL, electronic equipment and a storage medium. The invention relates to a program of a real-time video encryption method based on OpenCL, which comprises a host end and a device end, wherein the method comprises the following steps: reading a current frame image of a video to be encrypted at the host side; at the host end, preprocessing the current frame image, and sending the preprocessed current video frame to the equipment end; at the equipment end, encrypting and decrypting the current frame image; and at the host end, reading the encrypted and decrypted image from the equipment end and displaying the image. The real-time video encryption method based on the OpenCL is composed of a host end and a connected device end, devices supported by the OpenCL are divided into a plurality of working groups, the plurality of working groups can process the whole image in parallel, and the requirements of resolution and real-time performance can be met at the same time.
Description
Technical Field
The present invention relates to the field of video security, and in particular, to a real-time video encryption method and apparatus based on OpenCL, an electronic device, and a storage medium.
Background
With the rapid development of networks, data such as images and videos are more convenient to share, but some potential safety hazards are brought. Since a large amount of image information may be contained in a video, which may involve personal privacy, it is very important to protect the information. The chaotic encryption method is applied to protect image or video information. Li Jun et al proposed a video encryption camera system based on DM6446, which included image acquisition, compression and encryption; you et al mention that some algorithms are implemented on a CPU and are difficult to meet the real-time communication requirements, so how to increase the speed of the image encryption process becomes an important issue. GR Inampidi et al use OpenCL to implement the AES algorithm, which compares with the sequential encryption algorithm to find that it is faster to implement the encryption algorithm in parallel on the GPU. In addition to improvements in the algorithm itself, the idea of parallel programming is also used to improve the efficiency of the operation of the algorithm. Lin's team proposed a parallel image encryption algorithm named HCMO and used OpenCL to accelerate the algorithm. Juan P.D' Amato et al proposes a secure managed transport channel that efficiently and dynamically encrypts or encodes images and video. OpenCL is used to write parallel code on demand. OpenCL has different applications in other fields, and some researches use OpenCL to realize different algorithm accelerations, for example, Xiao et al uses OpenCL to accelerate a parallel algorithm of image weighted average filtering, and t.sanda teams use OpenCL to realize Sobel algorithm.
At present, the system scheme of real-time video encryption using OpenCL is few, and sometimes it is difficult for an image or video encryption scheme to simultaneously meet the requirements of resolution and real-time performance.
Disclosure of Invention
Based on this, the present invention provides a real-time video encryption method, apparatus, electronic device and storage medium based on OpenCL, which comprises a host end and a connected device end, where the OpenCL-supported device is divided into a plurality of work groups, and the plurality of work groups can perform parallel processing on the whole image, so as to simultaneously meet the requirements of resolution and real-time performance.
In a first aspect, the present invention provides a real-time video encryption method based on OpenCL, where a program of the method includes a host end and a device end, and includes the following steps:
reading a current frame image of a video to be encrypted at the host side;
at the host end, preprocessing the current frame image, and sending the preprocessed current video frame to the equipment end;
at the equipment end, encrypting and decrypting the current frame image;
and at the host end, reading the encrypted and decrypted image from the equipment end and displaying the image.
Further, the sending of the preprocessed current video frame to the device side includes:
calling the equipment terminal according to the grouping condition of the OpenCL initialization statement;
and distributing the preprocessed current video frame into a plurality of working groups, wherein each working group is used for carrying out pixel scrambling and pixel exclusive OR operation on the image of the current video frame.
Further, after sending the preprocessed current video frame to the device side, the method further includes:
and after the preset time delay, reading the next video frame image of the video to be encrypted at the host end.
Further, the preprocessing the current frame image includes:
compressing the previous frame image according to a preset compression format;
and carrying out gray level conversion on the current frame image.
Further, when the execution platform of the encryption method is an embedded platform, the method includes:
reading a current frame image of a video to be encrypted at the host side;
at the host end, preprocessing and pixel scrambling the current frame image to obtain a frame image subjected to pixel scrambling;
sending the frame image subjected to pixel scrambling to the equipment end;
at the equipment end, carrying out XOR processing on the current video frame, and transmitting the video frame image subjected to XOR processing back to the host end;
at the host end, recovering the video frame data to obtain a decrypted image;
and the host end reads and displays the encrypted and decrypted image.
Further, the method further comprises:
the host end reads the encrypted and decrypted image and displays the image, and a preset variable flag in a program is set to be 1;
and reading a current frame image of the video to be encrypted at the host side, preprocessing the current frame image, and making the variable flag be 0.
Further, the method further comprises:
and when the variable flag is 0, the host end starts to set parameters transmitted to the equipment end, and pixel scrambling operation is carried out on the current frame image.
In a second aspect, the present invention further provides an OpenCL-based real-time video encryption apparatus, including:
the image reading module is used for reading a current frame image of a video to be encrypted at the host end;
the preprocessing module is used for preprocessing the current frame image at the host end and sending the preprocessed current video frame to the equipment end;
the encryption and decryption module is used for encrypting and decrypting the current frame image at the equipment end;
and the display module is used for reading the encrypted and decrypted image from the equipment end and displaying the image at the host end.
In a third aspect, the present invention provides an electronic device, including:
at least one memory and at least one processor;
the memory for storing one or more programs;
when executed by the at least one processor, the one or more programs cause the at least one processor to implement the steps of an OpenCL-based real-time video encryption method according to any one of the first aspects of the present invention.
In a fourth aspect, the present invention also provides a computer-readable storage medium, characterized in that:
the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of an OpenCL-based real-time video encryption method according to any one of the first aspects of the present invention.
The real-time video encryption method, device, electronic equipment and storage medium based on OpenCL provided by the invention can realize video encryption application on both a computer and an embedded system under the condition of less change of programs. Aiming at the problem that the real-time encryption effect is not ideal enough under the condition of only using a CPU, the OpenCL and the OpenMP are used for improvement, so that the requirements of higher resolution and real-time performance can be met on a computer platform, and the real-time video encryption application under low resolution can be realized on an embedded platform.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
Fig. 1 is a schematic block diagram of a hardware system used in an OpenCL-based real-time video encryption method according to the present invention;
fig. 2 is a schematic flowchart of a real-time video encryption method based on OpenCL according to the present invention;
fig. 3 is a schematic structural diagram of an OpenCL-based real-time video encryption device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In general, embodiments of the present application provide a real-time video encryption method based on OpenCL, which mainly divides an execution process of an encryption and decryption algorithm into a host end (for program initialization, reading, and calculating a chaotic sequence, displaying, etc.) and a device end (mainly responsible for encryption and decryption operations). In some specific embodiments, the host end may be a computer CPU or an ARM, and the device end may be a graphics card or a DSP.
OpenCL is a working standard for writing programs by a heterogeneous parallel computing platform, and the heterogeneous computing can be mapped to computing devices such as CPUs, GPUs, DSPs and FPGAs. OpenCL provides an abstract model of the underlying hardware structure, aiming to provide a generic, developed API. Developers can write general purpose computing programs that run on the GPU without mapping their algorithms onto APIs of 3D graphics in OpenGL or DirectX.
The OpenCL programs include host-side programs and device-side kernel (kernel) programs. The host-side program runs on a host processor, the host-side program submits the kernel program from the host to the OpenCL device in a command manner, and the OpenCL device performs computations on the processing unit. The kernel is executed on the OpenCL device to complete the specific work of the OpenCL application, the kernel is usually some functions with large calculation amount and simple logic, and the OpenCL device outputs the input data to the host after scattering the input data through the kernel.
To solve the problems in the background art, an embodiment of the present application provides an OpenCL-based real-time video encryption method, as shown in fig. 1, where fig. 1 is a schematic block diagram of a hardware system required for operating the method, an execution device of the encryption method includes a host end and a device end connected to the host end, and as shown in fig. 2, the method includes the following steps:
s01: and reading the current frame image of the video to be encrypted at the host side.
Preferably, OpenMP is used to divide the whole algorithm flow into two threads: a read thread and a process thread. The device side is responsible for processing threads, namely encrypting and decrypting data of the current frame according to grouping conditions initialized by OpenCL.
In the video frame data, a frame is a single image picture of the minimum unit in the image animation, one frame is a static picture, and each video frame data refers to an image corresponding to the current frame.
S02: and at the host end, preprocessing the current frame image and sending the preprocessed current video frame to the equipment end.
Specifically, the preprocessing the current frame data includes:
s021: and compressing the previous frame image according to a preset compression format.
S022: and carrying out gray scale conversion on the previous frame image.
Sending the preprocessed current video frame to the device side, including:
s023: calling the equipment terminal according to the grouping condition of the OpenCL initialization statement;
s024: and distributing the preprocessed current video frame into a plurality of working groups, wherein each working group is used for carrying out pixel scrambling and pixel exclusive OR operation on the image of the current video frame.
Scrambling means that the information sequence of an image is scrambled and converted into an image which is indiscernible and is difficult to recognize. The scrambling is actually the encryption of the image, and different from the encryption for ensuring the security, the scrambled image is taken as secret information and then hidden, so that the robustness of the hidden carrier can be improved to a great extent. Image scrambling is a very common technique in information hiding.
Exclusive or (xor) is a mathematical operator. It is applied to logical operations. The mathematical sign of XOR isThe computer symbol is "xor". The algorithm is as follows:
and if the two values of a and b are not the same, the XOR result is 1. If the values of a and b are the same, the XOR result is 0.
XOR is also called half-add, which is equivalent to binary addition without carry: if 1 represents true and 0 represents false in binary system, the algorithm of exclusive or is:(same as 0, different as 1), these rules are the same as addition, except that there is no carry, so exclusive or is often considered as a no-carry addition.
Video xor encryption has two ideas: firstly, the generated video file is encrypted integrally, for example, a test.avi file is encrypted; and secondly, the video stream and the audio stream are encrypted in the process of generating the video file, so that the generated avi file is directly an encrypted file.
S03: and at the equipment end, encrypting and decrypting the current frame image.
As described above, the plurality of working groups perform pixel scrambling and pixel exclusive or operations on the image, thereby encrypting and decrypting the video frame.
Preferably, after sending the preprocessed current video frame to the device side, the method further includes:
s031: and after the preset time delay, reading the video frame image of the video to be encrypted at the host side.
In a specific embodiment, in order to avoid the conflict of variables between threads, a certain delay time needs to be set after the current frame data enters the processing thread, and the reading thread reads the next frame for gray scale conversion. Since barrier () is called in the device side program and clFinish () is used in the main program, this makes it possible to read and display the encryption map and the decryption map after all workgroups have completed their jobs.
S04: and at the host end, reading the encrypted and decrypted image from the equipment end and displaying the image.
In a preferred embodiment, on a computer, the algorithmic flow is described as follows: reading current frame data from a USB camera, sending the compressed and gray-scale converted image to a processing thread, calling a device end according to the grouping condition of OpenCL initialization statements (namely, dividing the image into a plurality of working groups), encrypting and decrypting the current frame, namely, distributing each frame to the plurality of working groups, and carrying out pixel scrambling and pixel exclusive OR operation on the image by the working groups. In order to avoid the conflict of variables between threads, a certain time delay needs to be set after the data of the current frame enters the processing thread, and the reading thread reads the next frame for gray level conversion. Since barrier () is called in the device side program and clFinish () is used in the main program, this makes it possible to read and display the encryption map and the decryption map after all workgroups have completed their jobs.
In other embodiments, the OpenCL-based real-time video encryption method provided by the present invention can also be applied to an embedded platform. On two different platforms, some necessary steps are basically the same, including creating a context, setting parameters, setting a workgroup, and the like. In order to realize encryption and decryption of a real-time scene and guarantee the real-time performance of a system, image compression and gray level conversion need to be performed on read frame data, and the operations are all realized by OpenCV. In addition to this, OpenCV is used for reading camera data, setting resolution, displaying, and the like. To facilitate experimental testing and speed up initialization, a scrambling sequence is generated using Matlab and read by the system, while an xor sequence is generated by the program.
In a specific embodiment, when the execution platform of the encryption method is an embedded platform, the method includes:
s11: and reading the current frame image of the video to be encrypted at the host side.
S12: and at the host end, preprocessing and pixel scrambling are carried out on the current frame image to obtain a frame image subjected to pixel scrambling.
S13: and sending the frame image subjected to pixel scrambling to the equipment terminal.
S14: and at the equipment end, carrying out XOR processing on the current video frame, and transmitting the video frame image subjected to XOR processing back to the host end.
S15: and at the host end, recovering the video frame data to obtain a decrypted image.
S16: and the host end reads and displays the encrypted and decrypted image.
In order to coordinate the main thread and the read thread, preferably, a variable flag is set in the program, and the method further includes:
s17: the host end reads the encrypted and decrypted image and displays the image, and a preset variable flag in a program is set to be 1;
s18: and reading a current frame image of the video to be encrypted at the host side, preprocessing the current frame image, and making the variable flag be 0.
In a preferred embodiment, the method further comprises:
s19: and when the variable flag is 0, the host end starts to set parameters transmitted to the equipment end, and pixel scrambling operation is carried out on the current frame image.
In a preferred embodiment, on the embedded platform, OpenCL initialization, reading video frames from the camera, image compression, and other steps are also required. But if the same algorithm flow as the computer platform is executed in an embedded system based on AM5728, no satisfactory result can be obtained. Therefore, the algorithm flow on the embedded system needs to be changed:
1) in the kernel function, when each workgroup runs, the pixel information, the exclusive-or sequence and the scrambling sequence in the global memory need to be copied to the local memory according to the setting of the workgroup, so that all workgroups can use the data in the local memory for calculation.
2) Because each workgroup can only read partial data stored in a local memory with a fixed size, the scrambling of the whole image cannot be carried out in groups. Therefore, the host side (ARM) needs to handle pixel scrambling of the whole image. For example: at this time, to operate the pixel data stored in a working group, the pixel value img (0,1) of the current frame needs to be exchanged with the pixel value img (3,6), but the working group does not contain the value img (3,6), so that the scrambling operation fails. To solve the problem, the pixel scrambling processing of the whole frame needs to be performed at the host end, then the scrambled frame is transmitted to the device end, the device end performs the exclusive or processing, then the scrambled frame is transmitted back to the host end, and the host end recovers the scrambled frame to obtain the decrypted image.
3) The main thread is responsible for the task of displaying images. After the necessary changes, the specific algorithm flow is described as follows: reading current frame data from a USB camera, carrying out gray scale conversion and pixel scrambling at a host end to obtain a frame subjected to pixel scrambling, and calling equipment by a main thread to carry out XOR processing (only XOR calculation is carried out, and the pixel scrambling is completed in the previous step). After the current frame data enters the processing thread, the reading thread reads the frame to be encrypted for preprocessing after a certain time delay, so as to coordinate the main thread and the reading thread. In the device side, the image frames after the XOR processing are required to be recovered in the main thread. Because a variable flag is set in a program, a main thread needs to judge whether the flag is 0, the main thread performs scrambling operation only after the flag is 0, the flag is set to 1 after the work of the main thread is completed, and the flag is set to 0 only after a read thread is processed, so that the main thread and the read thread can be coordinated.
An embodiment of the present application further provides an OpenCL-based real-time video encryption device, and as shown in fig. 3, the OpenCL-based dual-platform real-time video encryption device 400 includes:
a data reading module 401, configured to read, at the host end, a current frame image of a video to be encrypted;
a preprocessing module 402, configured to preprocess, at the host end, the current frame image, and send the preprocessed current video frame to the device end;
an encryption/decryption module 403, configured to encrypt and decrypt the current frame image at the device side;
a display module 404, configured to read and display the encrypted and decrypted image from the device side at the host side.
Preferably, the preprocessing module comprises:
the device side calling unit is used for calling the device side according to the grouping condition of the OpenCL initialization statements;
the distribution unit is used for distributing the preprocessed current video frame to a plurality of working groups, and each working group is used for carrying out pixel scrambling and pixel exclusive OR operation on the image of the current video frame.
Preferably, the preprocessing module further comprises:
and the time delay unit is used for reading the next video frame image of the video to be encrypted at the host end after the time delay of the preset threshold value.
Preferably, the preprocessing module further comprises:
the compression unit is used for compressing the previous frame image according to a preset compression format;
and the gray conversion unit is used for carrying out gray conversion on the previous frame image.
Preferably, when the execution platform of the encryption method is an embedded platform, the apparatus includes:
the data reading module is used for reading a current frame image of a video to be encrypted at the host side;
the scrambling module is used for preprocessing and pixel scrambling the current frame image at the host end to obtain a frame image subjected to pixel scrambling;
the data sending module is used for sending the frame image subjected to pixel scrambling to the equipment end;
the exclusive-or module is used for carrying out exclusive-or processing on the current video frame at the equipment end and transmitting the video frame image subjected to exclusive-or processing back to the host end;
the recovery module is used for recovering the video frame data at the host end to obtain a decrypted image;
and the display module is used for reading and displaying the encrypted and decrypted image at the host end.
Preferably, the apparatus further comprises:
the first variable instruction module is used for enabling the host side to read a current frame image of a video to be encrypted and then enabling a preset variable flag in a program to be 1;
and the second variable instruction module is used for restoring the video frame image at the host end to obtain a decrypted image and then enabling the variable flag to be 0.
Preferably, the apparatus further comprises:
and the third variable instruction module is used for reading the next video frame image of the video to be encrypted by the host side when the variable flag is 0.
An embodiment of the present application further provides an electronic device, including:
at least one memory and at least one processor;
the memory for storing one or more programs;
when executed by the at least one processor, the one or more programs cause the at least one processor to implement the steps of an OpenCL-based real-time video encryption method as described above.
Embodiments of the present application also provide a computer-readable storage medium,
the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of an OpenCL based real-time video encryption method as described above.
The real-time video encryption method, device, electronic equipment and storage medium based on OpenCL provided by the invention can realize video encryption application on both a computer and an embedded system under the condition of less change of programs. Aiming at the problem that the real-time encryption effect is not ideal enough under the condition of only using a CPU, the OpenCL and the OpenMP are used for improvement, so that the requirements of higher resolution and real-time performance can be met on a computer platform, and the real-time video encryption application under low resolution can be realized on an embedded platform.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.
Claims (10)
1. A real-time video encryption method based on OpenCL is characterized in that a program of the method comprises a host end and a device end, and the method comprises the following steps:
reading a current frame image of a video to be encrypted at the host side;
at the host end, preprocessing the current frame image, and sending the preprocessed current video frame to the equipment end;
at the equipment end, encrypting and decrypting the current frame image;
and at the host end, reading the encrypted and decrypted image from the equipment end and displaying the image.
2. The OpenCL-based real-time video encryption method according to claim 1, wherein sending the preprocessed current video frame to the device side includes:
calling the equipment terminal according to the grouping condition of the OpenCL initialization statement;
and distributing the preprocessed current video frame into a plurality of working groups, wherein each working group is used for carrying out pixel scrambling and pixel exclusive OR operation on the image of the current video frame.
3. The OpenCL-based real-time video encryption method according to claim 2, wherein after sending the preprocessed current video frame to the device side, the method further comprises:
and after the preset time delay, reading the next video frame image of the video to be encrypted at the host end.
4. The OpenCL-based real-time video encryption method according to claim 1, wherein preprocessing the current frame image includes:
compressing the previous frame image according to a preset compression format;
and carrying out gray level conversion on the current frame image.
5. The OpenCL-based real-time video encryption method according to claim 1, wherein when an execution platform of the encryption method is an embedded platform, the method includes:
reading a current frame image of a video to be encrypted at the host side;
at the host end, preprocessing and pixel scrambling the current frame image to obtain a frame image subjected to pixel scrambling;
sending the frame image subjected to pixel scrambling to the equipment end;
at the equipment end, carrying out XOR processing on the current video frame, and transmitting the video frame image subjected to XOR processing back to the host end;
at the host end, recovering the video frame data to obtain a decrypted image;
and the host end reads and displays the encrypted and decrypted image.
6. The OpenCL-based real-time video encryption method according to claim 5, wherein the method further comprises:
the host end reads the encrypted and decrypted image and displays the image, and a preset variable flag in a program is set to be 1;
and reading a current frame image of the video to be encrypted at the host side, preprocessing the current frame image, and making the variable flag be 0.
7. The OpenCL-based real-time video encryption method according to claim 6, wherein the method further comprises:
and when the variable flag is 0, the host end starts to set parameters transmitted to the equipment end, and pixel scrambling operation is carried out on the current frame image.
8. An OpenCL-based real-time video encryption apparatus, comprising:
the image reading module is used for reading a current frame image of a video to be encrypted at the host end;
the preprocessing module is used for preprocessing the current frame image at the host end and sending the preprocessed current video frame to the equipment end;
the encryption and decryption module is used for encrypting and decrypting the current frame image at the equipment end;
and the display module is used for reading the encrypted and decrypted image from the equipment end and displaying the image at the host end.
9. An electronic device, comprising:
at least one memory and at least one processor;
the memory for storing one or more programs;
when executed by the at least one processor, the one or more programs cause the at least one processor to perform the steps of an OpenCL-based real-time video encryption method as recited in any one of claims 1-7.
10. A computer-readable storage medium characterized by:
the computer readable storage medium stores a computer program which when executed by a processor implements the steps of an OpenCL based real-time video encryption method as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210018330.8A CN114339256B (en) | 2022-01-07 | 2022-01-07 | Real-time video encryption method and device based on OpenCL, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210018330.8A CN114339256B (en) | 2022-01-07 | 2022-01-07 | Real-time video encryption method and device based on OpenCL, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114339256A true CN114339256A (en) | 2022-04-12 |
CN114339256B CN114339256B (en) | 2023-11-07 |
Family
ID=81025093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210018330.8A Active CN114339256B (en) | 2022-01-07 | 2022-01-07 | Real-time video encryption method and device based on OpenCL, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114339256B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103973431A (en) * | 2014-04-16 | 2014-08-06 | 华南师范大学 | AES parallel implementation method based on OpenCL |
CN107566113A (en) * | 2017-09-29 | 2018-01-09 | 郑州云海信息技术有限公司 | The symmetrical encipher-decipher methods of 3DES, system and computer-readable recording medium |
US20190042304A1 (en) * | 2017-12-03 | 2019-02-07 | Intel Corporation | [ice] architecture and mechanisms to accelerate tuple-space search with intergrated gpu |
CN111093098A (en) * | 2019-12-30 | 2020-05-01 | 北京电子科技学院 | Logistic mapping-based chaotic encryption method |
US20200184369A1 (en) * | 2018-12-10 | 2020-06-11 | International Business Machines Corporation | Machine learning in heterogeneous processing systems |
CN112328401A (en) * | 2020-11-19 | 2021-02-05 | 江南大学 | 3DES acceleration method based on OpenCL and FPGA |
CN113132418A (en) * | 2021-06-17 | 2021-07-16 | 北京电信易通信息技术股份有限公司 | Variable-grade encryption method, system and device |
WO2021227349A1 (en) * | 2020-05-11 | 2021-11-18 | 华南理工大学 | Front-end facial image encryption and recognition method for biometric privacy protection |
-
2022
- 2022-01-07 CN CN202210018330.8A patent/CN114339256B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103973431A (en) * | 2014-04-16 | 2014-08-06 | 华南师范大学 | AES parallel implementation method based on OpenCL |
CN107566113A (en) * | 2017-09-29 | 2018-01-09 | 郑州云海信息技术有限公司 | The symmetrical encipher-decipher methods of 3DES, system and computer-readable recording medium |
US20190042304A1 (en) * | 2017-12-03 | 2019-02-07 | Intel Corporation | [ice] architecture and mechanisms to accelerate tuple-space search with intergrated gpu |
US20200184369A1 (en) * | 2018-12-10 | 2020-06-11 | International Business Machines Corporation | Machine learning in heterogeneous processing systems |
CN111093098A (en) * | 2019-12-30 | 2020-05-01 | 北京电子科技学院 | Logistic mapping-based chaotic encryption method |
WO2021227349A1 (en) * | 2020-05-11 | 2021-11-18 | 华南理工大学 | Front-end facial image encryption and recognition method for biometric privacy protection |
CN112328401A (en) * | 2020-11-19 | 2021-02-05 | 江南大学 | 3DES acceleration method based on OpenCL and FPGA |
CN113132418A (en) * | 2021-06-17 | 2021-07-16 | 北京电信易通信息技术股份有限公司 | Variable-grade encryption method, system and device |
Also Published As
Publication number | Publication date |
---|---|
CN114339256B (en) | 2023-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6504212B2 (en) | Device, method and system | |
US9799093B2 (en) | Secure rendering of display surfaces | |
US10607421B2 (en) | Secure rendering system that generates ray tracing samples with obfuscated position data | |
US20160117518A1 (en) | File Encryption/Decryption Device And File Encryption/Decryption Method | |
CN112949545B (en) | Method, apparatus, computing device and medium for recognizing face image | |
US11023596B2 (en) | Non-rasterized image streaming system that uses ray tracing samples | |
CN111754381B (en) | Graphics rendering method, apparatus, and computer-readable storage medium | |
US10963574B2 (en) | Video security and ray tracing samples compression system | |
CN111669646A (en) | Method, device, equipment and medium for playing transparent video | |
CN104463012A (en) | Virtual machine image file exporting and importing method and device | |
JP2014085672A (en) | Method and device for optimizing rendering of encrypted 3d graphical object | |
CN113012021A (en) | Image encryption and decryption method, computer and readable storage medium | |
CN111327947A (en) | Screen capture management method and device and mobile terminal | |
CN116383793B (en) | Face data processing method, device, electronic equipment and computer readable medium | |
CN114339256B (en) | Real-time video encryption method and device based on OpenCL, electronic equipment and storage medium | |
CN111666577A (en) | Data decryption method, device, equipment and storage medium | |
CN111260532A (en) | Private image encryption method and device, electronic equipment and computer readable storage medium | |
TW201637396A (en) | Devices and methods for encryption and decryption of graphical 3D objects | |
CN114254335A (en) | Encryption method and device based on GPU, encryption equipment and storage medium | |
CN112288757A (en) | Encrypted domain image segmentation optimization method based on data packaging technology | |
Mocanu et al. | Improved security based on combined encryption and steganography techniques | |
CN117974855A (en) | Three-dimensional visual lightweight engine system based on GIS and BIM | |
Pawar | Extended capabilities of feature-extraction for digital image sharing by diverse image media | |
CN115396222A (en) | Device instruction execution method, system, electronic device and readable storage medium | |
Soliman | Digital Rights Management of Images via LSB Embedding and Woodall Sequence |
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 |