CN114422830B - Video encryption method, video display method, device and equipment - Google Patents

Video encryption method, video display method, device and equipment Download PDF

Info

Publication number
CN114422830B
CN114422830B CN202210327663.9A CN202210327663A CN114422830B CN 114422830 B CN114422830 B CN 114422830B CN 202210327663 A CN202210327663 A CN 202210327663A CN 114422830 B CN114422830 B CN 114422830B
Authority
CN
China
Prior art keywords
sub
video
encrypted
image data
block
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.)
Active
Application number
CN202210327663.9A
Other languages
Chinese (zh)
Other versions
CN114422830A (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.)
Shenzhen Haiqing Zhiyuan Technology Co ltd
Original Assignee
Shenzhen HQVT Technology 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 Shenzhen HQVT Technology Co Ltd filed Critical Shenzhen HQVT Technology Co Ltd
Priority to CN202210327663.9A priority Critical patent/CN114422830B/en
Publication of CN114422830A publication Critical patent/CN114422830A/en
Application granted granted Critical
Publication of CN114422830B publication Critical patent/CN114422830B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure provides a video encryption method, a video display method, a device and an apparatus, which relate to the image processing technology and include: acquiring an original video, wherein the original video comprises a plurality of frames of original images; identifying a sensitive region in the original image; according to a preset secret key, encrypting image data corresponding to the sensitive area to obtain encrypted image data; and replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image. According to the scheme, sensitive information in an original video can be encrypted through a preset secret key to generate an encrypted video; the original video can be recovered from the encrypted video only through the preset secret key; sensitive information cannot be leaked even if the encrypted video is exposed; and the preset secret key can be mastered by a manager authenticated by a real name, and the leaking person can be traced when video leakage occurs.

Description

Video encryption method, video display method, device and equipment
Technical Field
The present disclosure relates to image processing technologies, and in particular, to a video encryption method, a video display method, a video encryption device, and a video display device.
Background
At present, with the popularization of video monitoring, sensitive information such as faces, license plates, human bodies, numbers and the like can be related to various monitoring videos. As the video is exposed, sensitive information can be leaked. Therefore, to achieve the purpose of privacy protection, it is necessary to protect sensitive information in the video.
In the prior art, after an original video shot by a camera is obtained, sensitive information in the video can be shielded through an artificial mosaic technology.
However, in this way, if the original video shot by the camera is exposed, the leakage of sensitive information still cannot be avoided.
Disclosure of Invention
The disclosure provides a video encryption method, a video display method, a video encryption device, a video display device and video encryption equipment, which are used for solving the problem that sensitive information cannot be prevented from being leaked if an original video shot by a camera is exposed in the prior art.
According to a first aspect of the present disclosure, there is provided a video encryption method, including:
acquiring an original video, wherein the original video comprises a plurality of frames of original images;
identifying a sensitive region in the original image;
according to a preset secret key, encrypting the image data corresponding to the sensitive area to obtain encrypted image data;
and replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image.
According to a first aspect of the present disclosure, there is provided a video display method, including:
acquiring an encrypted video and a preset secret key, wherein the encrypted video comprises multi-frame encrypted image data and information of a sensitive area corresponding to the encrypted image data; the image data corresponding to the information of the sensitive area in the encrypted image data is encrypted image data;
decrypting the sensitive area in the encrypted image data according to the preset key and the information of the sensitive area to obtain an original image;
and displaying the original image.
According to a third aspect of the present disclosure, there is provided a video encryption apparatus comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an original video, and the original video comprises a plurality of frames of original images;
the identification unit is used for identifying a sensitive area in the original image;
the encryption unit is used for encrypting the image data corresponding to the sensitive area according to a preset secret key to obtain encrypted image data;
and the encryption unit is also used for replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image.
According to a fourth aspect of the present disclosure, there is provided a display device of a video, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an encrypted video and a preset secret key, and the encrypted video comprises multi-frame encrypted image data and information of a sensitive area corresponding to the encrypted image data; the image data corresponding to the information of the sensitive area in the encrypted image data is encrypted image data;
the decryption unit is used for decrypting the sensitive area in the encrypted image data according to the preset secret key and the information of the sensitive area to obtain an original image;
and the display unit is used for displaying the original image.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising a memory and a processor; wherein,
the memory for storing a computer program;
the processor is configured to read the computer program stored in the memory, and execute the method according to the first aspect or the second aspect according to the computer program in the memory.
According to a sixth aspect of the present disclosure, there is provided a computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement the method according to the first or second aspect.
According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the method according to the first or second aspect.
The video encryption method, the video display device and the video display equipment provided by the disclosure comprise the following steps: acquiring an original video, wherein the original video comprises a plurality of frames of original images; identifying a sensitive region in an original image; according to a preset secret key, encrypting image data corresponding to the sensitive area to obtain encrypted image data; and replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image. In the video encryption method, the video display device and the video display equipment, sensitive information in an original video can be encrypted through a preset key to generate an encrypted video; the original video can be recovered from the encrypted video only through the preset key; sensitive information cannot be leaked even if the encrypted video is exposed; and the preset key can be mastered by a manager authenticated by a real name, and the leaked personnel can be traced when video leakage occurs.
Drawings
Fig. 1 is a schematic flow chart diagram illustrating a video encryption method according to an exemplary embodiment of the present disclosure;
fig. 2 is a schematic flow chart diagram illustrating a video encryption method according to another exemplary embodiment of the present disclosure;
FIG. 3 is a diagram illustrating a raw image storage format according to an exemplary embodiment of the present disclosure;
fig. 4 is a schematic diagram illustrating a cyclic shift of sub-block data of each first sub-block according to an exemplary embodiment of the disclosure;
fig. 5 is a flowchart illustrating a video display method according to an exemplary embodiment of the disclosure;
fig. 6 is a block diagram of a video encryption apparatus according to an exemplary embodiment of the present disclosure;
fig. 7 is a block diagram of a video display device according to an exemplary embodiment of the present disclosure;
fig. 8 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure.
Detailed Description
At present, with the popularization of video monitoring, sensitive information such as faces, license plates, human bodies, numbers and the like can be related to various monitoring videos. As the video is exposed, sensitive information may be revealed. Therefore, for the purpose of privacy protection, it is necessary to protect sensitive information in the video. In the prior art, in order to achieve the purpose of privacy protection, monitoring equipment manufacturers, use units and the like adopt various methods to try to protect sensitive information in videos. For example, after an original video shot by a camera is acquired, operations such as blocking sensitive information in the video are performed through an artificial mosaic technology.
However, the manual method completely depends on moral constraints, many leaked videos are intentionally leaked by someone with great care, and if the original video shot by the camera is exposed, sensitive information leakage still cannot be avoided.
In order to solve the technical problem, in the scheme provided by the disclosure, sensitive information in an original video can be encrypted through a preset key to generate an encrypted video; the original video can be recovered from the encrypted video only through the preset key; sensitive information cannot be leaked even if the encrypted video is exposed; and the preset secret key can be mastered by a manager authenticated by a real name, and the leaking person can be traced when video leakage occurs.
Fig. 1 is a flowchart illustrating a video encryption method according to an exemplary embodiment of the present disclosure.
As shown in fig. 1, the video encryption method provided in this embodiment includes:
step 101, obtaining an original video, wherein the original video comprises a plurality of frames of original images.
The method provided by the disclosure can be executed by an embedded video device. Such as a video camera. The embedded video device is capable of acquiring the original video. The original video comprises a plurality of frames of original images.
The embedded video equipment consists of a photoreceptor, a controller and a video coding logic circuit. After the image information is sensed by the photoreceptor, the image information is coded into a video code stream with an H.264 or H.265 format through a video coding logic circuit, and the video code stream is sent to a monitoring person by a controller. The monitoring personnel can see the original image after decoding.
Among them, h.264 is a highly compressed digital video codec standard proposed by both the International Organization for Standardization (ISO) and the International Telecommunications Union (ITU). H.265 is a new video coding standard made following h.264.
In h.264 or h.265, the definition of different video frames may include a key frame, a change frame, and a user-defined frame.
Specifically, the original video may be a surveillance video. For example, surveillance videos in garages, in elevators, in communities, on both sides of roads, in banks.
Specifically, the raw video may be in a storage format with YUV as pixels. YUV, a color coding method. Often in individual video processing components. "Y" in YUV represents brightness (Luma) and gray scale value, and "U" and "V" represent Chrominance (Chroma) and saturation, which are used to describe the color and saturation of an image for specifying the color of a pixel.
Wherein, the ranges of the Y, the U and the V are all 0-255. The larger the value of "Y", the higher the luminance.
Step 102, identifying a sensitive area in an original image.
Specifically, with the popularization of video monitoring, sensitive information such as faces, license plates, human bodies, numbers and the like may be involved in various monitoring videos.
Specifically, the region of the original image related to the sensitive information is a sensitive region of the original image.
The content included in the sensitive information can be preset according to the actual situation.
Specifically, the positions of sensitive areas such as a face, a license plate, and a human body in each frame of an original image in an original video can be identified by an Artificial Intelligence (AI) technology, that is, by using a deep learning algorithm.
And 103, encrypting the image data corresponding to the sensitive area according to a preset key to obtain encrypted image data.
The preset key is a key preset according to actual conditions. The preset key can be used for encrypting the image data corresponding to the sensitive area to obtain the encrypted image data. Specifically, each pixel point in the sensitive area can be processed by using the key, so that the brightness of the encrypted image data is remarkably changed and has color cast, and only the outline of the image is reserved.
Further, at the video display end, the preset key may also be used to decrypt the encrypted image data to obtain the image data before encryption.
In particular, the preset key may be composed of a multi-bit number. For example, the preset key may be set to 2224.
And 104, replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image.
Specifically, the brightness of the image data of the sensitive information part in the encrypted video can be changed significantly and the color is biased, and only the outline of the image is kept.
Furthermore, the encrypted video can be encoded into a video code stream in an h.264 or h.265 format by a video encoding logic circuit in the embedded video device, and then sent to a video display terminal by a controller in the embedded video device. The transmitted data includes information of the sensitive area (for example, position information of the sensitive area in each frame of image). The video display end can obtain the video code stream sent by the embedded video equipment.
When the video equipment displays the encrypted video, if the video equipment does not decrypt the encrypted video, the sensitive area in the picture is encrypted, so that the picture displayed by the video equipment does not include sensitive information.
Furthermore, the display end of the video can decrypt the encrypted video according to the preset key and the information of the sensitive area to restore the original video.
Furthermore, under the condition that no preset key exists, the video display end can only display the encrypted video, and the encrypted video cannot reveal sensitive information in the video.
The video encryption method provided by the disclosure comprises the following steps: acquiring an original video, wherein the original video comprises a plurality of frames of original images; identifying a sensitive region in the original image; according to a preset secret key, carrying out encryption processing on image data corresponding to the sensitive area to obtain encrypted image data; and replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image. According to the method adopted in the disclosure, sensitive information in an original video can be encrypted through a preset key to generate an encrypted video; the original video can be recovered from the encrypted video only through the preset key; sensitive information cannot be leaked even if the encrypted video is exposed; and the preset secret key can be mastered by a manager authenticated by a real name, and the leaking person can be traced when video leakage occurs.
Fig. 2 is a flowchart illustrating a video encryption method according to another exemplary embodiment of the disclosure.
As shown in fig. 2, the video encryption method provided in this embodiment includes:
step 201, an original video is obtained, wherein the original video comprises a plurality of frames of original images.
Specifically, the principle and implementation of step 201 are similar to those of step 101, and are not described again.
Step 202, identifying a sensitive area in the original image.
Specifically, the principle and implementation of step 202 are similar to those of step 102, and are not described again.
Step 203, dividing the sensitive area into a plurality of first sub-blocks according to a preset key, and exchanging sub-block data of each first sub-block to obtain each updated first sub-block; wherein the sub-block data includes a plurality of pixel point data.
For example, as shown in fig. 3, a schematic diagram of a storage format of an original image according to an exemplary embodiment of the present disclosure is shown. Each pixel point data in the image has a 'Y' value, and each adjacent four pixel points share a 'U' value and a 'V' value. The identified sensitive areas are marked in fig. 3. The sensitive area may be encrypted using a preset key. Specifically, the sensitive region may be divided into a plurality of first sub-blocks according to a preset key, and sub-block data in each first sub-block may be exchanged according to a preset manner, so as to disturb the data storage sequence of the original image in the sensitive region, and obtain each updated first sub-block. Wherein the sub-block data includes a plurality of pixel point data.
Furthermore, because the sub-block data includes a plurality of pixel point data, and each pixel point data includes a "Y" value, a "U" value, and a "V" value, in the process of exchanging the sub-block data in each first sub-block, it is necessary to exchange the "Y" value, the "U" value, and the "V" value in each pixel point data.
In one implementation manner, the preset key includes a first key, and the first key includes a plurality of positive integers; the method comprises the steps of dividing a sensitive area into a plurality of first sub-blocks according to a plurality of positive integers included in a first key; wherein the sizes of the first sub-blocks are the same;
for example, the preset key is 2223, where the first two bits "2" and "2" may be the first key. As shown in fig. 3, assuming that the sensitive region has a width W and a height H, the sensitive region may be equally divided into 2 × 2 first sub-blocks according to the first key, where the first sub-blocks have the same size.
Further, if the width W or the height H of the sensitive area is not completely divided by the quotient of the integers included in the corresponding first key, the width W or the height H may be correspondingly complemented, and the size of the sensitive area may be slightly increased. For example, if W =51 and the integer included in the corresponding first key is 2, W may be extended to 52.
And circularly shifting the sub-block data of each first sub-block to obtain each updated first sub-block.
Specifically, the sub-block data in each first sub-block may be subjected to overall cyclic shift to obtain each updated first sub-block. For example, as shown in the left diagram of fig. 4, the sensitive region may be divided into four first sub-blocks of 1, 2, 3, and 4, and then sub-block data of the four first sub-blocks may be cyclically shifted, as shown in the right diagram of fig. 4, so that sub-block data of the 4 th first sub-block is placed at the 1 st first sub-block; sub-block data of the 3 rd block first sub-block is placed at the 2 nd block first sub-block; sub-block data of the 2 nd block first sub-block is placed at the 3 rd block first sub-block; the sub-block data of the 1 st block first sub-block is placed at the 4 th block first sub-block.
And 204, processing the pixel point data included in the updated first sub-block by using a preset key to obtain encrypted image data.
Specifically, the pixel point data included in the updated first sub-block may be exchanged according to a preset key and a preset manner, so as to obtain encrypted image data. According to the preset secret key, the image data in the sensitive area is exchanged twice, so that the image data in the sensitive area has stronger fuzziness and sensitive information is better protected.
In one implementation manner, the preset key further includes a second key, where the second key includes a plurality of positive integers; segmenting the updated first sub-block into a plurality of second sub-blocks according to the positive integers included in the second key; each second sub-block comprises the same number of pixel point data;
and exchanging the pixel point data in the adjacent second sub-blocks according to the positive integer included in the second key to obtain the encrypted image data.
For example, the preset key is 2223, where the last two bits "2" and "3" may be the second key. The updated first sub-block may be divided into 2 second sub-blocks according to the number "2", where the 2 second sub-blocks include the same number of pixel point data.
Further, according to the number "3", the pixel data in the 2 second sub-blocks are exchanged to obtain the encrypted image data.
Optionally, the second key includes an exchange value B for representing pixel point data exchange information; determining pixel point data to be exchanged in two adjacent second sub-blocks, wherein the pixel point data to be exchanged is the pixel point data from (NxB + 1) th to (N + 1) × B in the second sub-blocks, and N comprises 0 and even numbers;
and exchanging the pixel point data to be exchanged with the same position information in the two adjacent second sub-blocks to obtain the encrypted image data.
Specifically, for example, the preset key is 2223, where the last two bits "2" and "3" may be the second key. The last digit "3" in the second key may be used to characterize the exchange value B of the pixel point data exchange information, i.e. B = 3. Then, the pixel point data to be exchanged is the pixel point data of (3N + 1) th to 3 (N + 1) th in the second sub-block, where N includes 0 and an even number, i.e., (1, 2, 3), (7, 8, 9), (13, 14, 15).
Then, the pixel point data at (1, 2, 3), (7, 8, 9), (13, 14, 15.) in the 2 second sub-blocks are respectively exchanged, so as to obtain the encrypted image data.
And step 205, replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image.
Specifically, the principle and implementation of step 205 are similar to those of step 104, and are not described again.
Fig. 5 is a flowchart illustrating a video display method according to an exemplary embodiment of the present disclosure.
As shown in fig. 5, the method for displaying a video provided by this embodiment includes:
step 501, acquiring an encrypted video and a preset key, wherein the encrypted video comprises multi-frame encrypted image data and information of a sensitive area corresponding to the encrypted image data; and the image data corresponding to the information of the sensitive area in the encrypted image data is the encrypted image data.
The method provided by the embodiment can be executed by a video display terminal, such as a computer. The video display terminal can acquire an encrypted video from the embedded video equipment; a preset key input by the user may also be obtained.
The encrypted video comprises multi-frame encrypted image data and information of a sensitive area corresponding to the encrypted image data; and encrypting image data corresponding to the information of the sensitive area in the image data to be the image data obtained by encrypting the original image data by the embedded video equipment according to the preset key.
Wherein the information of the sensitive area includes position information of the sensitive area.
Step 502, according to the preset key and the information of the sensitive area, the sensitive area in the encrypted image data is decrypted to obtain the original image.
Specifically, the video display end may firstly decompress the encrypted video by using h.264 or h.265, so as to obtain the processed encrypted video.
And then, decrypting the sensitive area in the encrypted image data by using the preset key and the information of the sensitive area according to a preset mode opposite to the encryption method to obtain the original image.
Step 503, displaying the original image.
Specifically, the sensitive area in the encrypted image data is decrypted according to the preset key and the information of the sensitive area, and after the original image is obtained, the original image can be displayed by a display screen included in the video display terminal.
Specifically, if the key is not preset, the encrypted video may be displayed by a display screen included in the video display.
Fig. 6 is a block diagram illustrating a video encryption apparatus according to an exemplary embodiment of the present disclosure.
As shown in fig. 6, the present disclosure provides a video encryption apparatus 600, including:
an obtaining unit 610, configured to obtain an original video, where the original video includes multiple frames of original images;
an identifying unit 620, configured to identify a sensitive region in the original image;
an encrypting unit 630, configured to encrypt, according to a preset key, image data corresponding to the sensitive area to obtain encrypted image data;
the encrypting unit 630 is further configured to replace the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generate an encrypted video according to each encrypted image.
The encryption unit 630 is specifically configured to divide the sensitive region into a plurality of first sub-blocks according to the preset key, and exchange sub-block data of each first sub-block to obtain each updated first sub-block; wherein the sub-block data includes a plurality of pixel point data;
and processing the pixel point data included in the updated first sub-block by using a preset key to obtain encrypted image data.
The preset key comprises a first key, and the first key comprises a plurality of positive integers; an encrypting unit 630, specifically configured to divide the sensitive region into a plurality of first sub-blocks according to a plurality of positive integers included in the first key; wherein the sizes of the first sub-blocks are the same;
and circularly shifting the sub-block data of each first sub-block to obtain each updated first sub-block.
The preset secret key also comprises a second secret key, and the second secret key comprises a plurality of positive integers; an encrypting unit 630, specifically configured to split the updated first sub-block into a plurality of second sub-blocks according to the positive integer included in the second key; each second sub-block comprises the same number of pixel point data;
and exchanging the pixel point data in the adjacent second sub-blocks according to the positive integer included in the second key to obtain the encrypted image data.
The second key comprises an exchange value B used for representing pixel point data exchange information; the encrypting unit 630 is specifically configured to determine pixel point data to be exchanged in two adjacent second sub-blocks, where the pixel point data to be exchanged is pixel point data located from (N × B + 1) th to (N + 1) × B in the second sub-blocks, and N includes 0 and an even number;
and exchanging the pixel point data to be exchanged with the same position information in the two adjacent second sub-blocks to obtain the encrypted image data.
Fig. 7 is a block diagram of a video display apparatus according to an exemplary embodiment of the present disclosure.
As shown in fig. 7, the present disclosure provides a display device 700 for video, including:
an obtaining unit 710, configured to obtain an encrypted video and a preset key, where the encrypted video includes multi-frame encrypted image data and information of a sensitive area corresponding to the encrypted image data; the image data corresponding to the information of the sensitive area in the encrypted image data is encrypted image data;
a decryption unit 720, configured to decrypt the sensitive area in the encrypted image data according to the preset key and the information of the sensitive area, so as to obtain an original image;
and a display unit 730 for displaying the original image.
Fig. 8 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure.
As shown in fig. 8, the electronic device provided in this embodiment includes:
a memory 801;
a processor 802; and
a computer program;
wherein the computer program is stored in the memory 801 and configured to be executed by the processor 802 to implement any of the methods as described above.
The present embodiments also provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement any of the above methods.
The present embodiment also provides a computer program product comprising a computer program which, when executed by a processor, performs any of the methods described above.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.

Claims (7)

1. A method for video encryption, the method comprising:
acquiring an original video, wherein the original video comprises a plurality of frames of original images;
identifying a sensitive region in the original image;
dividing the sensitive area into a plurality of first sub-blocks according to a preset key, and exchanging sub-block data of each first sub-block to obtain each updated first sub-block; wherein the sub-block data includes a plurality of pixel point data;
segmenting the updated first sub-block into a plurality of second sub-blocks according to positive integers included in a second key in the preset key; each second sub-block comprises the same number of pixel point data; the preset key comprises a second key, and the second key comprises a plurality of positive integers;
according to the positive integer included in the second key, exchanging the pixel data in the adjacent second sub-block to obtain encrypted image data;
replacing the image data of the sensitive area in the original image with the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image;
the exchanging the pixel data in the adjacent second sub-block according to the positive integer included in the second key to obtain the encrypted image data includes:
determining pixel point data to be exchanged in two adjacent second sub-blocks, wherein the second key comprises an exchange value B for representing pixel point data exchange information; the pixel point data to be exchanged is pixel point data from (NxB + 1) th to (N + 1) × B in the second sub-block, wherein N comprises 0 and even number;
and exchanging the pixel point data to be exchanged with the same position information in the two adjacent second sub-blocks to obtain the encrypted image data.
2. The method of claim 1, wherein the preset key comprises a first key, and wherein the first key comprises a plurality of positive integers;
the dividing the sensitive area into a plurality of first sub-blocks according to the preset key, and performing exchange processing on sub-block data of each first sub-block to obtain each updated first sub-block includes:
segmenting the sensitive region into a plurality of first sub-blocks according to a plurality of positive integers included in a first key; wherein the sizes of the first sub-blocks are the same;
and circularly shifting the sub-block data of each first sub-block to obtain each updated first sub-block.
3. A method for displaying video, the method comprising:
acquiring an encrypted video and a preset key, wherein the encrypted video comprises multi-frame encrypted image data and information of a sensitive area corresponding to the encrypted image data; the image data corresponding to the information of the sensitive area in the encrypted image data is encrypted image data; wherein the encrypted video is generated by the method of any of the preceding claims 1-2;
decrypting the sensitive area in the encrypted image data according to the preset key and the information of the sensitive area to obtain an original image;
and displaying the original image.
4. A video encryption apparatus, characterized in that the apparatus comprises:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an original video, and the original video comprises a plurality of frames of original images;
the identification unit is used for identifying a sensitive area in the original image;
the encryption unit is used for dividing the sensitive area into a plurality of first sub-blocks according to a preset key and exchanging sub-block data of each first sub-block to obtain each updated first sub-block; wherein the sub-block data includes a plurality of pixel point data;
the encryption unit is further used for segmenting the updated first sub-block into a plurality of second sub-blocks according to positive integers included in a second key in the preset key; each second sub-block comprises the same number of pixel point data; the preset secret key comprises a second secret key, and the second secret key comprises a plurality of positive integers;
the encryption unit is further used for performing exchange processing on pixel point data in the adjacent second sub-block according to the positive integer included in the second key to obtain encrypted image data;
the encryption unit is also used for replacing the image data of the sensitive area in the original image by using the encrypted image data to obtain encrypted images, and generating an encrypted video according to each encrypted image;
the encryption unit is specifically configured to determine pixel point data to be exchanged in two adjacent second sub-blocks, where the second key includes an exchange value B used for representing pixel point data exchange information; the pixel point data to be exchanged is pixel point data from (NxB + 1) to (N + 1) xB in the second sub-block, wherein N comprises 0 and even numbers;
and exchanging the pixel point data to be exchanged with the same position information in the two adjacent second sub-blocks to obtain the encrypted image data.
5. A video display apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an encrypted video and a preset key, and the encrypted video comprises multi-frame encrypted image data and information of a sensitive area corresponding to the encrypted image data; the image data corresponding to the information of the sensitive area in the encrypted image data is encrypted image data; wherein the encrypted video is generated by the apparatus of claim 4;
the decryption unit is used for decrypting the sensitive area in the encrypted image data according to the preset key and the information of the sensitive area to obtain an original image;
and the display unit is used for displaying the original image.
6. An electronic device comprising a memory and a processor; wherein,
the memory for storing a computer program;
the processor is configured to read the computer program stored in the memory and execute the method of any one of claims 1-2 or 3 according to the computer program in the memory.
7. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any of claims 1-2 or 3.
CN202210327663.9A 2022-03-31 2022-03-31 Video encryption method, video display method, device and equipment Active CN114422830B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210327663.9A CN114422830B (en) 2022-03-31 2022-03-31 Video encryption method, video display method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210327663.9A CN114422830B (en) 2022-03-31 2022-03-31 Video encryption method, video display method, device and equipment

Publications (2)

Publication Number Publication Date
CN114422830A CN114422830A (en) 2022-04-29
CN114422830B true CN114422830B (en) 2022-07-15

Family

ID=81263279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210327663.9A Active CN114422830B (en) 2022-03-31 2022-03-31 Video encryption method, video display method, device and equipment

Country Status (1)

Country Link
CN (1) CN114422830B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174925A (en) * 2022-06-13 2022-10-11 深圳市豪恩汽车电子装备股份有限公司 Video sensitive information removing method and device and computer readable storage medium
CN115208649A (en) * 2022-07-05 2022-10-18 上海仪电(集团)有限公司中央研究院 Virtual machine remote security access method and system based on image recognition
CN115330580B (en) * 2022-08-04 2023-05-09 湖北微模式科技发展有限公司 Image content encryption algorithm based on data addition
CN115952481B (en) * 2023-03-13 2023-05-05 北京点聚信息技术有限公司 Method for realizing trusted real name authentication
CN116644476B (en) * 2023-07-21 2024-06-14 太平金融科技服务(上海)有限公司深圳分公司 Image shielding method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804931A (en) * 2018-05-24 2018-11-13 成都大象分形智能科技有限公司 It is related to the neural network model encryption protection system and method for domain transformation data encryption
CN108830092A (en) * 2018-05-29 2018-11-16 成都大象分形智能科技有限公司 It is related to the neural network model encryption protection system and method for data accidental enciphering

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8442221B2 (en) * 2005-09-30 2013-05-14 Konica Minolta Laboratory U.S.A., Inc. Method and apparatus for image encryption and embedding and related applications
US20080123848A1 (en) * 2006-11-24 2008-05-29 Vimicro Corporation System and method for data security, encryption apparatus and decryption apparatus
JP5309654B2 (en) * 2008-03-31 2013-10-09 富士通株式会社 Image encryption apparatus and image decryption apparatus
CN102724552B (en) * 2012-05-30 2014-12-17 华为技术有限公司 Image coding method, image decoding method and device
KR20150021280A (en) * 2013-08-20 2015-03-02 한국전자통신연구원 Image processor apparatus and the method
CN103440617B (en) * 2013-09-18 2016-02-24 黄良永 Improve the image processing method of safety of medical image
CN109271798A (en) * 2018-09-13 2019-01-25 深圳萨摩耶互联网金融服务有限公司 Sensitive data processing method and system
US11157646B2 (en) * 2018-09-27 2021-10-26 Intel Corporation Systems and methods for processing and handling privacy-sensitive image data
CN112954403B (en) * 2019-11-26 2023-02-17 深圳市雅阅科技有限公司 Video encryption method, device, equipment and storage medium
CN113630587A (en) * 2021-08-09 2021-11-09 北京朗达和顺科技有限公司 Real-time video sensitive information protection system and method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804931A (en) * 2018-05-24 2018-11-13 成都大象分形智能科技有限公司 It is related to the neural network model encryption protection system and method for domain transformation data encryption
CN108830092A (en) * 2018-05-29 2018-11-16 成都大象分形智能科技有限公司 It is related to the neural network model encryption protection system and method for data accidental enciphering

Also Published As

Publication number Publication date
CN114422830A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN114422830B (en) Video encryption method, video display method, device and equipment
CN101273367B (en) Covert and robust mark for media identification
US8649516B2 (en) Digital video protection for authenticity verification
JP5415446B2 (en) Method and apparatus for inserting removable watermark into image and method and apparatus for removing the watermark
Queluz Authentication of digital images and video: Generic models and a new contribution
Wu et al. Sudoku associated two dimensional bijections for image scrambling
Ren et al. Reversible data hiding in encrypted binary images by pixel prediction
KR20130114037A (en) Masking and recovering method of privacy region
Cheddad et al. Enhancing steganography in digital images
WO2012127578A1 (en) Image-processing device, image-processing method, and image-processing computer program
CN112035847B (en) Image encryption and decryption methods and devices, electronic equipment and storage medium
CN104980617A (en) Anti-photographing auditing method and device
Lin et al. Reversible Data Hiding in Encrypted Images Based on Bit-plane Block Embedding.
Durdu A new reversible low-distortion steganography method that hides images into RGB images with low loss
Mstafa Reversible video steganography using quick response codes and modified elgamal cryptosystem
CN107845055A (en) The image encryption method of anti-Facebook compressions
JP2001211310A (en) Image data operating method and recording medium having recorded processing program thereof
Pandey et al. Hiding secret image in video
WO2008005406A2 (en) Watermarking movies to easily recognize who is the owner
US6963655B1 (en) Alteration detection apparatus and method thereof
Alaa ‘Watermarking images for fact-checking and fake news inquiry
Kikuchi et al. A Reversible Data Hiding Method in Compressible Encrypted Domain for OpenEXR Images
CN115408664A (en) Wearable security image display method and device
CN115967805A (en) Encryption coding and decoding method and device
Sonkusare et al. Review of Digital Image Sharing By Diverse Image Media

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
CP01 Change in the name or title of a patent holder

Address after: 518000 Guangdong Shenzhen Baoan District Xixiang street, Wutong Development Zone, Taihua Indus Industrial Park 8, 3 floor.

Patentee after: Shenzhen Haiqing Zhiyuan Technology Co.,Ltd.

Address before: 518000 Guangdong Shenzhen Baoan District Xixiang street, Wutong Development Zone, Taihua Indus Industrial Park 8, 3 floor.

Patentee before: SHENZHEN HIVT TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder