A video privacy protection method, a video decryption method and related devices

By encrypting and encoding video frames to generate privacy-protected videos, the problem of irreversibly restoring the original video in existing technologies is solved, thus achieving reversibility of video privacy protection and information security.

CN119449966BActive Publication Date: 2026-05-05E SURFING VISION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
E SURFING VISION TECHNOLOGY CO LTD
Filing Date
2024-11-18
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies cannot achieve reversibility in video privacy protection, resulting in the inability to accurately restore the original surveillance video, which affects the viewing by those with video permissions and the investigation and evidence collection by law enforcement agencies.

Method used

The video frames are encrypted using an initialization vector and an encryption key to generate a privacy-protected video. The video is then encoded using a lossless compression algorithm, and the encoded video data carries encrypted parameter data. Authorized users can decrypt and restore the original video using a preset password.

Benefits of technology

It achieves reversibility in video privacy protection, ensuring that unauthorized attackers cannot restore the original video, while legitimate authorized users can accurately restore it, thus meeting the needs of legal viewing and judicial evidence collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449966B_ABST
    Figure CN119449966B_ABST
Patent Text Reader

Abstract

This application provides a video privacy protection method, a video decryption method, and related apparatus. The video encryption device uses an initialization vector and an encryption key to encrypt video frames containing privacy information in the original video, thereby achieving privacy protection. During the compression encoding of the privacy-protected video, the video encryption device uses a preset password to encrypt the initialization vector and / or the encryption key, and writes the encrypted parameter data into the video encoded data. On the one hand, for unauthorized attackers who do not know the preset password, they cannot accurately reconstruct the original video, thus further ensuring information security. On the other hand, for authorized users with the preset password, they can utilize the complete reversibility of encryption and decryption to accurately decrypt the lossless compressed encoded data, accurately reconstructing the original video, achieving reversible video privacy protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a video privacy protection method, a video decryption method, and related apparatus. Background Technology

[0002] With the development and widespread adoption of video surveillance technology, video surveillance systems have provided excellent security for both public and private locations. Video surveillance systems installed in public places such as stations, shopping malls, and streets can monitor and record suspicious behavior in real time. Video surveillance systems installed in private locations can monitor the real-time situation within the premises and issue alarms when abnormal activity or unexpected events are detected.

[0003] To enable real-time video streaming and AI (Artificial Intelligence) analysis, video surveillance systems typically upload the collected surveillance videos to cloud servers. This imposes privacy protection requirements on privacy subjects (such as faces and license plates) and private locations (such as bedrooms and bathrooms) involved in the surveillance videos.

[0004] Currently, existing technologies primarily achieve video privacy protection through two methods. The first is to blur the privacy regions of video frames using Gaussian blur and mosaic algorithms, thus obtaining a privacy-protected video. The second is to use generative adversarial networks (GANs) to generatively replace the privacy regions of video frames with other image content, thereby obtaining a privacy-protected video. While both methods achieve privacy protection in terms of visual effects, the irreversibility of these operations means that other devices cannot accurately reconstruct the original video from the privacy-protected video. This prevents authorized users from viewing the original video and hinders law enforcement agencies from conducting investigations and collecting evidence.

[0005] Therefore, there is an urgent need to provide a reversible video privacy protection solution. Summary of the Invention

[0006] The purpose of this application is to at least address one of the aforementioned technical deficiencies, particularly the technical deficiency in the prior art that makes it impossible to accurately reconstruct the original surveillance video from privacy-protected videos.

[0007] In a first aspect, embodiments of this application provide a video privacy protection method, applied to a video encryption device, comprising:

[0008] Obtain the original video, initialization vector, and encryption key;

[0009] Based on the initialization vector and the encryption key, the video frames to be encrypted in the original video are encrypted to obtain a privacy-protected video; wherein, the video frames to be encrypted are video frames that include privacy information;

[0010] The initialization vector and / or the encryption key are encrypted using a preset password to obtain encrypted parameter data;

[0011] Based on the encrypted parameter data, a lossless compression encoding algorithm is used to compress and encode the privacy-protected video to obtain video encoded data; wherein, the video encoded data includes multiple NAL unit data, at least one of the NAL unit data is SEI data, and the first SEI data records the encrypted parameter data.

[0012] In some embodiments, encrypting the video frame to be encrypted in the original video according to the initialization vector and the encryption key includes:

[0013] Determine the privacy region of the target video frame; the target video frame is any of the video frames to be encrypted, and the privacy region is the image region corresponding to the privacy information;

[0014] The image data corresponding to the privacy region is encrypted according to the initialization vector and the encryption key.

[0015] In some embodiments, encrypting the image data corresponding to the privacy region according to the initialization vector and the encryption key includes:

[0016] Based on the initialization vector and the encryption key, the first target vector, the second target vector, the third target vector, the first target key, the second target key, and the third target key are determined respectively;

[0017] The channel value of each target pixel in the first image channel is obtained to obtain the first channel value array; wherein, each target pixel is a pixel located in the privacy region;

[0018] Using the first target vector and the first target key, the first channel value array is encrypted, and the first encrypted array is obtained based on the encryption calculation result of the first channel value array.

[0019] Obtain the channel value of each target pixel in the second image channel to obtain the second channel value array;

[0020] Using the second target vector and the second target key, the second channel value array is encrypted, and the second encrypted array is obtained based on the encryption calculation result of the second channel value array.

[0021] Obtain the channel value of each target pixel in the third image channel to obtain the third channel value array;

[0022] The third target vector and the third target key are used to perform encryption calculation on the third channel value array, and the third encrypted array is obtained based on the encryption calculation result of the third channel value array;

[0023] Based on the first encryption array, the second encryption array, and the third encryption array, the encrypted pixel value of each target pixel is determined;

[0024] The actual pixel value of each target pixel is modified to the encrypted pixel value of that target pixel.

[0025] In some embodiments, determining the first target vector, the second target vector, the third target vector, the first target key, the second target key, and the third target key based on the initialization vector and the encryption key includes:

[0026] A first hash value is obtained by performing a hash calculation on the initialization vector, the encryption key, and the preset first channel identifier using a preset hash algorithm.

[0027] Using a preset partitioning rule, the first hash value is divided into the first target vector and the first target key;

[0028] The preset hash algorithm is used to perform hash calculations on the initialization vector, the encryption key, and the preset second channel identifier to obtain a second hash value; wherein the second channel identifier is different from the first channel identifier;

[0029] Using the preset partitioning rule, the second hash value is divided into the second target vector and the second target key;

[0030] The preset hash algorithm is used to perform hash calculations on the initialization vector, the encryption key, and the preset third channel identifier to obtain a third hash value; wherein the third channel identifier is different from both the first channel identifier and the second channel identifier.

[0031] Using the preset partitioning rule, the third hash value is divided into the third target vector and the third target key.

[0032] In some embodiments, the plurality of NAL unit data includes N encrypted video data and N custom SEI data, wherein the N encrypted video data and the N custom SEI data correspond one-to-one;

[0033] In the video encoding data, any of the custom SEI data is adjacent to the corresponding target encrypted video data, and any of the custom SEI data records the location information of the privacy area corresponding to the target encrypted video data;

[0034] The encrypted video data is NAL unit data used to record encrypted video frames, the encrypted video frames are obtained by encrypting the video frames to be encrypted, and N is the total number of video frames to be encrypted in the original video.

[0035] In some embodiments, the encryption parameter data is data obtained by encrypting the encryption key using the preset password information; the first SEI data record contains the initialization vector and the encryption parameter data.

[0036] Secondly, embodiments of this application provide a video decryption method, applied to a video decryption device, comprising:

[0037] Acquire video encoding data; wherein, the video encoding data is generated by the video privacy protection method described in any of the above embodiments;

[0038] Read the first SEI data of the video encoded data, and extract the encrypted parameter data from the first SEI data;

[0039] The encrypted parameter data is decrypted using a preset password, and an initialization vector and encryption key are obtained based on the decryption result;

[0040] Using the initialization vector and the encryption key, multiple NAL unit data of the video encoded data are decrypted to obtain the decrypted video.

[0041] In some embodiments, the video file of the decrypted video includes N custom SEI data, where N is a positive integer;

[0042] After obtaining the decrypted video, the process also includes:

[0043] Delete N custom SEI data entries from the video file of the decrypted video;

[0044] The encrypted parameter data is deleted from the first SEI data.

[0045] Thirdly, embodiments of this application provide a video privacy protection device, applied to a video encryption device, comprising:

[0046] The data acquisition module is used to acquire the original video, initialization vector, and encryption key;

[0047] A privacy protection module is used to encrypt the video frames to be encrypted in the original video according to the initialization vector and the encryption key, and obtain a privacy-protected video; wherein the video frames to be encrypted are video frames that include privacy information.

[0048] The parameter encryption module is used to encrypt the initialization vector and / or the encryption key using a preset password to obtain encrypted parameter data;

[0049] The compression encoding module is used to compress and encode the privacy-protected video using a lossless compression encoding algorithm based on the encrypted parameter data, and obtain video encoded data; wherein, the video encoded data includes multiple NAL unit data, at least one of the NAL unit data is SEI data, and the first SEI data records the encrypted parameter data.

[0050] Fourthly, embodiments of this application provide a video decryption apparatus, applied to a video decryption device, comprising:

[0051] The encoded data acquisition module is used to acquire video encoded data; wherein, the video encoded data is generated by the video privacy protection method described in any of the above embodiments;

[0052] The SEI reading module is used to read the first SEI data of the video encoded data and extract encrypted parameter data from the first SEI data.

[0053] The parameter decryption module is used to decrypt the encrypted parameter data using preset password information, and obtain the initialization vector and encryption key based on the decryption result;

[0054] The video decryption module is used to decrypt multiple NAL unit data of the video encoded data using the initialization vector and the encryption key, and obtain the decrypted video.

[0055] In some embodiments of this application, the video encryption device can use an initialization vector and an encryption key to encrypt video frames containing privacy information in the original video, thereby protecting the privacy subjects and privacy areas in the original video and realizing the privacy protection function.

[0056] During the compression and encoding of privacy-protected videos, the video encryption device can encrypt the initialization vector and / or encryption key using preset password information, and write the encrypted parameter data into the video encoding data. On the one hand, for unauthorized attackers who do not know the preset password information, they cannot accurately reconstruct the original video, thus further ensuring information security. On the other hand, for authorized users with the preset password information, they can utilize the complete reversibility of encryption and decryption to obtain the initialization vector and encryption key from the video encoding data, and use the initialization vector and encryption key to accurately decrypt the lossless compressed encoding data, thereby accurately reconstructing the original video and achieving reversible video privacy protection. Furthermore, this application can also perform privacy encryption protection on videos of any format. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is a diagram illustrating the application environment of the video privacy protection method and the video decryption method in one embodiment.

[0059] Figure 2 This is a schematic diagram of the frame of the original video frame in one embodiment;

[0060] Figure 3 This is a schematic diagram of a frame processed by an AI recognition algorithm in one embodiment;

[0061] Figure 4 This is a schematic diagram of the encrypted frame in one embodiment;

[0062] Figure 5 This is a schematic diagram of the decrypted frame in one embodiment;

[0063] Figure 6 This is a flowchart illustrating a video privacy protection method in one embodiment;

[0064] Figure 7 This is a flowchart illustrating a video decryption method in one embodiment;

[0065] Figure 8 This is a schematic diagram of the structure of a video privacy protection device in one embodiment;

[0066] Figure 9 This is a schematic diagram of the structure of a video decryption device in one embodiment;

[0067] Figure 10 This is a diagram of the internal structure of a computer device in one embodiment. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0069] In some embodiments, the video privacy protection method and video decryption method provided in this application can be applied to Figure 1 The application environment is shown. Here, "acquisition device" refers to a video acquisition device, which can be installed in public and / or private locations under legal and compliant conditions to acquire raw video. For example, the acquisition device can be a surveillance camera. It should be noted that the image / video acquisition, storage, use, processing, transmission, provision, and disclosure involved in this application all comply with relevant laws and regulations and do not violate public order and good morals.

[0070] Video encryption devices are used to encrypt original videos to generate privacy-protected videos. Video decryption devices are used to decrypt privacy-protected videos to generate the original videos. Cloud storage functionality can be achieved through cloud servers; that is, privacy-protected videos can be uploaded to cloud servers for storage.

[0071] It is understood that both the video encryption and decryption devices can be implemented using any device, and this document does not impose specific restrictions. In one example, the video encryption and decryption devices can be local computing devices or securely authenticated computing devices. In another example, the video encryption device and the acquisition device can be integrated into one unit, and the resulting acquisition device can have both video acquisition and video encryption functions. In yet another example, the video decryption device can be a video playback device, such as an authorized and authenticated electronic terminal.

[0072] Please see Figure 1 This application provides a fully reversible video privacy protection method and a video decryption method in some embodiments. The video privacy protection method may include steps such as privacy region identification, privacy region encryption, and encoding to form a privacy-protected video. The video decryption method includes steps such as decryption and restoration when the correct password is possessed.

[0073] Specifically, the acquisition device can acquire raw video and obtain video files. The raw video includes one or more video frames, and at least one video frame is a video frame to be encrypted containing privacy information. The video encryption device can use AI recognition algorithms to identify the privacy regions of the video frames to be encrypted, and perform encryption calculations on the image data corresponding to the privacy regions according to the encryption key and initialization vector to obtain the privacy-protected video. The video encryption device can upload the video encoding data corresponding to the privacy-protected video to a cloud server for cloud storage. In one example, the raw video frame can be as follows: Figure 2 As shown, the privacy areas identified by AI can be as follows: Figure 3 As shown in the rectangle, the encrypted video frame can be as follows: Figure 4 As shown.

[0074] Without knowing the encryption key and initialization vector, the video playback effect corresponding to the video encoded data can be as follows: Figure 4 As shown, this application effectively protects privacy and is applicable to the privacy protection of surveillance videos in both public and private locations. Even if the video is stored in the cloud, cloud storage administrators or malicious attackers can only view the privacy-protected video.

[0075] With the encryption key and initialization vector available, the video encoded data involved in the privacy-protected video can be decrypted using the encryption key and initialization vector, and the result can be obtained as follows: Figure 5 The original video is shown. It is evident that the key holder can utilize the complete reversibility of encryption to decrypt the encoded video data to obtain the accurate original video, and can then view the original, clear video, thus providing a technical solution for legitimate authorized video viewing or legal electronic forensics.

[0076] It should be noted that, Figure 2 , Figure 3 and Figure 5 The blurring of the face region is to meet the relevant regulations for patent examination. In practical applications, Figure 2 The original video frames shown Figure 3 The privacy area identification results shown are Figure 5 The decoded video frames shown are all clear, unblurred image frames, thus providing a technical solution for legitimate authorized users to view videos or for legal electronic evidence collection.

[0077] Therefore, the solutions provided by some embodiments of this application have at least one of the following advantages:

[0078] (1) It can effectively protect privacy and is applicable to the privacy protection of surveillance videos in public and private places. Even if the video is stored in the cloud, the cloud storage administrator or attacker can only see the privacy-protected video. Only the key owner can decrypt and watch the original clear video.

[0079] (2) Privacy areas can be flexibly specified. In practice, privacy areas that need to be encrypted can be provided based on AI or manual selection.

[0080] (3) When the video is encrypted for privacy protection, it is not limited to the original encoding format of the video (it can support encryption of any video format), and the decrypted video format can remain consistent with the original video.

[0081] (4) The encryption uses a secure national cryptographic algorithm. The algorithm has high security strength, and attackers without the key cannot recover the original video.

[0082] (5) The video is completely reversible. When necessary, the correct password can be used to decrypt the video and obtain a video that is completely consistent with the original video, which meets the needs of legally authorized users to view the video or in judicial electronic evidence collection scenarios.

[0083] The video privacy protection method provided in the embodiments of this application is described below.

[0084] In some embodiments, this application provides a video privacy protection method, and the following embodiments illustrate this method applied to a video encryption device. Figure 6 As shown, the video privacy protection method provided in this application includes the following steps:

[0085] S602: Obtain the original video, initialization vector, and encryption key.

[0086] The original video can be any video without privacy protection processing, such as raw surveillance video captured by the acquisition device. The Initialization Vector (IV) is the initialization vector in a block cipher used for video encryption. The encryption key is the key information used for video encryption.

[0087] It is understandable that the methods for obtaining the original video, initialization vector, and encryption key can be determined based on the actual situation, and this article does not impose specific limitations on them. In one example, to improve data security and enhance privacy protection, the encryption key and initialization vector can be randomly generated using a random algorithm. Furthermore, the data length of both the encryption key and initialization vector is greater than or equal to 128 bits to meet security strength requirements and further improve security.

[0088] S604: Based on the initialization vector and encryption key, encrypt the video frames to be encrypted in the original video to obtain a privacy-protected video.

[0089] The original video includes at least one video frame, and the video frame to be encrypted refers to the video frame in the original video that contains privacy information. It should be noted that the specific type of privacy information can be determined based on the actual situation, and this article does not impose specific restrictions on it. Figures 2-5 In some examples, privacy information could be a face and a license plate. In others, privacy information could be a specific location or area, such as a bedroom or bathroom.

[0090] In this step, the video encryption device can use an initialization vector and an encryption key to encrypt each video frame to be encrypted in the original video, thus obtaining a privacy-protected video. It can be understood that the privacy-protected video includes encrypted video frames and video frames that do not contain privacy information. Encrypted video frames refer to the video frame data obtained by encrypting the video frames to be encrypted in the original video.

[0091] For example, when the original video includes a first original video frame, a second original video frame, and a third original video frame, and the first original video frame does not contain privacy information, while the second and third original video frames both contain privacy information, the video encryption device can encrypt the second original video frame and the third original video frame respectively to obtain a second encrypted video frame and a third encrypted video frame. The first original video frame, the second encrypted video frame, and the third encrypted video frame constitute a privacy-protected video.

[0092] It should be noted that during the encryption process of a video frame, the video encryption device can encrypt the entire image region of the video frame or only a portion of it. Furthermore, the video encryption device can employ any encryption method, requiring only that it implements encryption based on the initialization vector and encryption key.

[0093] S606: Use preset password information to encrypt the initialization vector and / or encryption key, and obtain encrypted parameter data.

[0094] The preset password information can be obtained in advance and is used to encrypt the frame encryption information and obtain the encryption parameter data.

[0095] Considering that initialization vectors and encryption keys are difficult to remember, a preset password can be used to encrypt the initialization vectors and / or encryption keys. This allows the initialization vectors and / or encryption keys to be recovered during decryption using the preset password, making them easier to remember. Furthermore, it enhances security and prevents the leakage of initialization vectors and / or encryption keys.

[0096] In this step, the video encryption device can encrypt the initialization vector using a preset password, or it can encrypt the encryption key using a preset password. Alternatively, it can encrypt both the initialization vector and the encryption key using preset passwords separately.

[0097] S608: Based on the encrypted parameter data, a lossless compression coding algorithm is used to compress and encode the privacy-protected video, and the video encoding data is obtained.

[0098] The video encoded data includes multiple NAL (Network Abstraction Layer) units, at least one of which is SEI (Search Engine Information Layer) data. The first SEI data records encrypted parameter data. NAL units encapsulate video data and related information, enabling video data to be transmitted in different network environments. SEI data provides supplementary and enhanced information.

[0099] In this step, lossless compression encoding can be used to encode the privacy-protected video, converting the video data into video encoded data that can be transmitted in different network environments. Simultaneously, lossless compression encoding preserves the complete encrypted image information, facilitating accurate decryption and reconstruction of the original video content during decryption.

[0100] Video encoded data may include multiple NAL unit data, which may include video data for recording video frame images and SEI data for recording supplemental enhancement information. The video encryption device may write encryption parameter data into the NAL unit data of the first SEI, so that the video encoded data carries frame encryption information for decryption.

[0101] Furthermore, in one example, the video encryption device can encrypt the encryption key using a preset password to obtain encrypted parameter data, and then write the encrypted parameter data and the plaintext data of the initialization vector into the first SEI data. In this way, during decryption, the initialization vector and encryption key can be obtained first, allowing for simultaneous data decryption and playback, thus improving video playback response efficiency.

[0102] In this application, the video encryption device can use an initialization vector and an encryption key to encrypt video frames containing privacy information in the original video, thereby protecting the privacy subjects and privacy areas in the original video and realizing the privacy protection function.

[0103] During the compression and encoding of privacy-protected videos, the video encryption device can encrypt the initialization vector and / or encryption key using preset password information, and write the encrypted parameter data into the video encoding data. On the one hand, for unauthorized attackers who do not know the preset password information, they cannot accurately reconstruct the original video, thus further ensuring information security. On the other hand, for authorized users with the preset password information, they can utilize the complete reversibility of encryption and decryption to obtain the initialization vector and encryption key from the video encoding data, and use the initialization vector and encryption key to accurately decrypt the lossless compressed encoding data, thereby accurately reconstructing the original video and achieving reversible video privacy protection. Furthermore, this application can also perform privacy encryption protection on videos of any format.

[0104] In some embodiments, encrypting the video frame to be encrypted from the original video according to the initialization vector and the encryption key includes:

[0105] Determine the privacy region of the target video frame; the target video frame is any video frame to be encrypted, and the privacy region is the image region corresponding to the privacy information;

[0106] The image data corresponding to the privacy region is encrypted based on the initialization vector and the encryption key.

[0107] Specifically, for each video frame to be encrypted in the original video, the video encryption device can first determine the target subject and target area in the video frame that need to be protected for privacy, and then determine the privacy area of ​​the target video frame.

[0108] In one example, a video encryption device can use an AI recognition algorithm to automatically identify privacy regions in a target video frame. Furthermore, the AI ​​recognition algorithm can be based on the YOLO model, which, once trained, can support the recognition of typical privacy targets, including faces and license plates. The recognition results can include the location coordinates of the target subject and the privacy region in each video frame.

[0109] In another example, the privacy zone can be manually selected by the user. Furthermore, manually specifying the privacy zone requires support from a specific video viewing front-end, allowing users to draw the privacy area using a mouse or gestures. For example, when filming through a fixed camera in the living room, the user can set the filming areas in the bathroom and bedroom as privacy zones.

[0110] For each video frame to be encrypted in the original video, if the privacy region of the video frame to be encrypted is determined, the video encryption device can encrypt the privacy region of the video frame to be encrypted according to the initialization vector and the encryption key. That is, the image data corresponding to the privacy region is encrypted and calculated to obtain the encrypted video frame.

[0111] In this way, the privacy subject and privacy area of ​​video frames can be encrypted as needed, and the privacy-protected video only blurs the specified video area, without affecting the video-based AI applications and data analysis capabilities (such as people counting analysis and vehicle counting analysis).

[0112] In some embodiments, the image data corresponding to the privacy region is encrypted according to the initialization vector and the encryption key, including:

[0113] Step A1: Based on the initialization vector and encryption key, determine the first target vector, the second target vector, the third target vector, the first target key, the second target key, and the third target key respectively;

[0114] Step A2: Obtain the channel value of each target pixel in the first image channel to obtain the first channel value array; where each target pixel is a pixel located in the privacy region;

[0115] Step A3: Using the first target vector and the first target key, perform encryption calculation on the first channel value array, and obtain the first encrypted array based on the encryption calculation result of the first channel value array;

[0116] Step A4: Obtain the channel value of each target pixel in the second image channel to obtain the second channel value array;

[0117] Step A5: Using the second target vector and the second target key, perform encryption calculation on the second channel value array, and obtain the second encrypted array based on the encryption calculation result of the second channel value array;

[0118] Step A6: Obtain the channel value of each target pixel in the third image channel to obtain the third channel value array;

[0119] Step A7: Using the third target vector and the third target key, perform encryption calculation on the third channel value array, and obtain the third encrypted array based on the encryption calculation result of the third channel value array;

[0120] Step A8: Based on the first encryption array, the second encryption array, and the third encryption array, determine the encrypted pixel value of each target pixel;

[0121] Step A9: Modify the actual pixel value of each target pixel to the encrypted pixel value of that target pixel.

[0122] In this embodiment, as Figure 4As shown, when encrypting the privacy region of a target video frame, the video encryption device can encrypt the plaintext value of each image channel and blur the privacy region based on the ciphertext value of each image channel. Thus, compared to existing Gaussian blur and mosaic algorithms, the encryption method provided in this embodiment can achieve a better blurring visual effect, thereby further improving information security and preventing privacy leaks.

[0123] It is understood that the first image channel, the second image channel, and the third image channel are three distinct image channels, and this document does not impose specific limitations on them. For example, the first image channel could be the H (hue) channel, the second image channel could be the S (saturation) channel, and the third image channel could be the V (brightness) channel. Alternatively, the first image channel could be the R (red) channel, the second image channel could be the G (green) channel, and the third image channel could be the B (blue) channel. For ease of description, some embodiments in this application will be illustrated using the RGB channel as an example.

[0124] The video encryption device can determine three target vectors and three target keys based on the initialization vector and the encryption key. The three target vectors and three target keys each correspond one-to-one with the three image channels.

[0125] A video encryption device can obtain the channel value of each pixel (i.e., each target pixel) located in the privacy region of a target video frame in the first image channel, and obtain an array of first channel values. For example, the video encryption device can calculate the total number of pixels num in the privacy region, and obtain the channel value of each target pixel in the R channel, to obtain the array of first channel values ​​R[num]. It can be understood that R[num] represents an array of length num composed of the R channel values ​​of each pixel in the privacy region of the target video frame.

[0126] After obtaining the first channel value array, the video encryption device can perform encryption calculations on the first channel value array using a first target vector and a first target key, and obtain a first encrypted array based on the encryption calculation result of the first channel value array. It can be understood that the first encrypted array is the ciphertext array corresponding to the first channel value array.

[0127] In one example, the video encryption device can use the OFB (Output Feedback) mode of the commercial cryptographic SM4 algorithm to generate a keystream of num bytes, and then XOR the keystream with the plaintext value to obtain the ciphertext value, i.e.:

[0128] CR[num]=SM4_OFB_Encrypt(R[num],key_1,IV_1)

[0129] In the formula, CR[num] is the first encryption array of length num, key_1 is the first target key, and IV_1 is the first target vector.

[0130] For the second and third image channels, the video encryption device can perform encryption calculations in a similar manner to that for the first image channel, obtaining a second encryption array and a third encryption array respectively. In one example, the second and third encryption arrays can be calculated using the following expressions:

[0131] CG[num]=SM4_OFB_Encrypt(G[num],key_2,IV_2)

[0132] CB[num]=SM4_OFB_Encrypt(B[num],key_3,IV_3)

[0133] In the formula, CG[num] is the second encryption array; G[num] is an array of length num consisting of the G channel values ​​of each pixel in the privacy region of the target video frame, i.e., the second channel value array; key_2 is the second target key; IV_2 is the second target vector; CB[num] is the third encryption array; B[num] is an array of length num consisting of the B channel values ​​of each pixel in the privacy region of the target video frame, i.e., the third channel value array; key_3 is the third target key; IV_3 is the third target vector.

[0134] After determining the encryption arrays corresponding to the three image channels, the video encryption device can encrypt the privacy region of the target video frame based on the ciphertext values ​​corresponding to the three image channels, and obtain, for example: Figure 4 The encrypted video frame shown is an example. In one example, the RGB ciphertext of each target pixel can be (CR[j], CG[j], CB[j]), j=0, 1,2,...,num-1.

[0135] In some embodiments, determining the first target vector, the second target vector, the third target vector, the first target key, the second target key, and the third target key based on the initialization vector and the encryption key includes:

[0136] Step A11: Using a preset hash algorithm, perform hash calculation on the initialization vector, encryption key, and preset first channel identifier to obtain the first hash value;

[0137] Step A12: Using a preset partitioning rule, divide the first hash value into a first target vector and a first target key;

[0138] Step A13: Using a preset hash algorithm, perform hash calculation on the initialization vector, encryption key, and preset second channel identifier to obtain a second hash value; wherein, the second channel identifier is different from the first channel identifier;

[0139] Step A14: Using a preset partitioning rule, divide the second hash value into a second target vector and a second target key;

[0140] Step A15: Using a preset hash algorithm, perform hash calculation on the initialization vector, encryption key, and preset third channel identifier to obtain the third hash value; wherein, the third channel identifier is different from both the first channel identifier and the second channel identifier;

[0141] Step A16: Using a preset partitioning rule, the third hash value is divided into a third target vector and a third target key.

[0142] In this embodiment, the target key corresponding to each image channel is different, and the target vector corresponding to each image channel is different. This can further improve the visual blurring effect and increase the difficulty of cracking, thereby improving information security.

[0143] Specifically, each image channel corresponds to a channel identifier, and the channel identifiers for each image channel are unique. For each image channel, the video encryption device can use a preset hash algorithm to perform hash calculations on the initialization vector, encryption key, and the channel identifier corresponding to that image channel, and according to preset partitioning rules, divide the hash value corresponding to that image channel into the target vector and target key corresponding to that image channel.

[0144] For example, the channel identifier for channel R can be 1, for channel G it can be 2, and for channel B it can be 3. The video encryption device can use the initialization vector and encryption key to derive the target key `key_i` and target vector `IV_i` for each image channel based on the commercial cryptographic SM3 hash algorithm. Specifically, `key_i||IV_i=SM3(i,key,IV)`, where `i=1,2,3`. That is, using the SM3 hash algorithm, a 256-bit hash value is obtained, with the first 128 bits used as `key_i` and the last 128 bits as `IV_i`.

[0145] In some embodiments, the multiple NAL unit data includes N encrypted video data and N custom SEI data, with each of the N encrypted video data and N custom SEI data corresponding one-to-one; wherein, the encrypted video data is NAL unit data used to record encrypted video frames, the encrypted video frames are obtained by encrypting the video frames to be encrypted, and N is the total number of video frames to be encrypted in the original video.

[0146] In the video encoding data, any custom SEI data is adjacent to the corresponding target encrypted video data, and any custom SEI data records the location information of the privacy region corresponding to the target encrypted video data. The target encrypted video data refers to the encrypted video data corresponding to the custom SEI data.

[0147] For example, multiple NAL unit data include first encrypted video data and second encrypted video data. Custom SEI data includes first custom SEI data and second custom SEI data, with the first encrypted video data corresponding to the first custom SEI data and the second encrypted video data corresponding to the second custom SEI data. In this example, the target encrypted video data for the first custom SEI data refers to the first encrypted video data, and the first custom SEI data is adjacent to the first encrypted video data. The target encrypted video data for the second custom SEI data refers to the second encrypted video data, and the second custom SEI data is adjacent to the second encrypted video data.

[0148] Specifically, privacy-protected videos may include encrypted video frames. During video encoding, the video encryption device can add a custom SEI data before and after the NAL unit data corresponding to each encrypted video frame, and record the location information of the privacy region corresponding to the encrypted video frame in this custom SEI data, thereby providing the location input for decryption. In one example, to improve decoding efficiency, this application can add a custom SEI data before the NAL unit data corresponding to each encrypted video frame.

[0149] Since the custom SEI data includes a fixed NAL start header (3 bytes) and privacy region location information (coordinates of each corner of the privacy region), the encoding method provided in this embodiment only requires adding a small number of bytes compared to a frame of image data.

[0150] The video decryption method provided in the embodiments of this application is described below.

[0151] In some embodiments, this application provides a video decryption method, and the following embodiments illustrate this method applied to a video decryption device. Figure 7 As shown, the video decryption method provided in this application includes the following steps:

[0152] S702: Obtain video encoding data; wherein the video encoding data is generated based on the video privacy protection method described in any of the above embodiments;

[0153] S704: Read the first SEI data of the video encoding data and extract the encrypted parameter data from the first SEI data;

[0154] S706: Decrypt the encrypted parameter data using a preset password and obtain the initialization vector and encryption key based on the decryption result;

[0155] S708: Using an initialization vector and an encryption key, the video encoded data is decrypted from multiple NAL unit data to obtain the decrypted video.

[0156] Specifically, with the correct password information, this application can achieve decryption and restoration based on the password information. During the decryption and restoration process, the video decryption device can first read the first SEI data of the video encoded data, and read the encrypted parameter data from the first SEI data. Then, it can use the preset password information to decrypt the encrypted parameter data to obtain the initialization vector and encryption key.

[0157] In one example, when the encryption parameter data is obtained by encrypting the encryption key with a preset password, and the first SEI data of the video encoding data includes the plaintext data of the initialization vector and the encryption parameter data, the video decryption device can read the initialization vector of the plaintext and the encryption key of the ciphertext (i.e., the encryption parameter data) from the first SEI data, and decrypt the encryption key of the ciphertext using the preset password information, thereby obtaining the encryption key of the plaintext.

[0158] With the initialization vector and encryption key obtained, the video decryption device can use the initialization vector and encryption key to decrypt the encrypted video frame, thereby obtaining the original video frame before encryption, and can perform subsequent processing (such as video playback).

[0159] In one example, when the video encoding data includes N encrypted video data and N custom SEI data, the video decryption device can sequentially read the privacy region location information in the N custom SEI data, and use the encryption key and initialization vector to derive the decryption key and decryption vector corresponding to the image channel. Then, based on the decryption key and decryption vector, the pixel points of the privacy region location information are decrypted to obtain the original RGB plaintext value of each pixel point.

[0160] The specific calculation process for the decryption key and decryption vector corresponding to each image channel can be found in the calculation process of the target key and target vector in the above embodiments, and will not be repeated here. The process of decrypting the pixels of the privacy region location information can be found in the following expression:

[0161] R[num]=SM4_OFB_Decrypt(CR[num],key_1,IV_1)

[0162] G[num]=SM4_OFB_Decrypt(CG[num],key_2,IV_2)

[0163] B[num]=SM4_OFB_Decrypt(CB[num],key_3,IV_3)

[0164] After decryption, to output a file completely identical to the original plaintext file, the information added during encryption needs to be removed. Therefore, in some embodiments, the decrypted video file includes N custom SEI data, where N is a positive integer. After obtaining the decrypted video, the following steps are also included:

[0165] Step B1: Delete N custom SEI data from the video file of the decrypted video;

[0166] Step B2: Remove the encryption parameter data from the first SEI data, for example, remove the ciphertext encryption key and the plaintext data of the initialization vector from the first SEI data.

[0167] After the data is deleted, the decrypted video file is completely identical to the original video file, thus achieving complete reversibility and meeting the legal requirements for electronic evidence data.

[0168] The video privacy protection device provided in the embodiments of this application is described below. The video privacy protection device described below can be referred to in correspondence with the video privacy protection method described above.

[0169] In some embodiments, such as Figure 8 As shown, this application provides a video privacy protection device 800, applied to a video encryption device, comprising:

[0170] Data acquisition module 802 is used to acquire the original video, initialization vector and encryption key;

[0171] The privacy protection module 804 is used to encrypt the video frames to be encrypted of the original video according to the initialization vector and the encryption key, and obtain a privacy-protected video; wherein the video frames to be encrypted are video frames that include privacy information.

[0172] The parameter encryption module 806 is used to encrypt the initialization vector and / or the encryption key using preset password information, and obtain encrypted parameter data;

[0173] The compression encoding module 808 is used to compress and encode the privacy-protected video using a lossless compression encoding algorithm based on the encryption parameter data, and obtain video encoded data; wherein, the video encoded data includes multiple NAL unit data, at least one of the NAL unit data is SEI data, and the first SEI data records the encryption parameter data.

[0174] In some embodiments, the privacy protection module 804 of this application includes:

[0175] A privacy region determination unit is used to determine the privacy region of a target video frame; the target video frame is any of the video frames to be encrypted, and the privacy region is the image region corresponding to the privacy information;

[0176] A frame encryption unit is used to encrypt the image data corresponding to the privacy region according to the initialization vector and the encryption key.

[0177] In some embodiments, the frame encryption unit of this application includes:

[0178] The key vector determination unit is used to determine a first target vector, a second target vector, a third target vector, a first target key, a second target key, and a third target key based on the initialization vector and the encryption key, respectively.

[0179] The first channel value acquisition unit is used to acquire the channel value of each target pixel in the first image channel to obtain a first channel value array; wherein, each target pixel is a pixel located in the privacy region;

[0180] The first channel value encryption unit is used to perform encryption calculation on the first channel value array using the first target vector and the first target key, and to obtain a first encrypted array based on the encryption calculation result of the first channel value array.

[0181] The second channel value acquisition unit is used to acquire the channel value of each target pixel in the second image channel to obtain a second channel value array;

[0182] The second channel value encryption unit is used to perform encryption calculation on the second channel value array using the second target vector and the second target key, and obtain the second encrypted array based on the encryption calculation result of the second channel value array;

[0183] The third channel value acquisition unit is used to acquire the channel value of each target pixel in the third image channel to obtain a third channel value array;

[0184] The third channel value encryption unit is used to perform encryption calculation on the third channel value array using the third target vector and the third target key, and to obtain the third encryption array based on the encryption calculation result of the third channel value array;

[0185] A pixel encryption unit is used to determine the encrypted pixel value of each target pixel based on the first encryption array, the second encryption array, and the third encryption array;

[0186] The pixel modification unit is used to modify the actual pixel value of each target pixel to the encrypted pixel value of that target pixel.

[0187] In some embodiments, the key vector determination unit of this application includes:

[0188] The first hash calculation unit is used to perform hash calculation on the initialization vector, the encryption key and the preset first channel identifier using a preset hash algorithm to obtain a first hash value;

[0189] The first partitioning unit is used to partition the first hash value into the first target vector and the first target key using a preset partitioning rule;

[0190] The second hash calculation unit is used to perform hash calculation on the initialization vector, the encryption key, and the preset second channel identifier using the preset hash algorithm to obtain a second hash value; wherein the second channel identifier is different from the first channel identifier;

[0191] The second partitioning unit is used to partition the second hash value into the second target vector and the second target key using the preset partitioning rule;

[0192] The third hash calculation unit is used to perform hash calculation on the initialization vector, the encryption key, and the preset third channel identifier using the preset hash algorithm to obtain a third hash value; wherein the third channel identifier is different from both the first channel identifier and the second channel identifier;

[0193] The third partitioning unit is used to partition the third hash value into the third target vector and the third target key using the preset partitioning rule.

[0194] In some embodiments, the NAL unit data includes N encrypted video data and N custom SEI data, wherein the N encrypted video data and the N custom SEI data correspond one-to-one;

[0195] In the video encoding data, any of the custom SEI data is adjacent to the corresponding target encrypted video data, and any of the custom SEI data records the location information of the privacy area corresponding to the target encrypted video data;

[0196] The encrypted video data is NAL unit data used to record encrypted video frames, the encrypted video frames are obtained by encrypting the video frames to be encrypted, and N is the total number of video frames to be encrypted in the original video.

[0197] In some embodiments, the encryption parameter data is data obtained by encrypting the encryption key using the preset password information; the first SEI data record contains the initialization vector and the encryption parameter data.

[0198] The following describes the partitioning unit provided in the embodiments of this application for the device. The partitioning unit described below for the device and the partitioning unit described above for the method can be referred to in correspondence with each other.

[0199] In some embodiments, such as Figure 9 As shown, this application provides a video decryption device 810, applied to a video decryption equipment, comprising:

[0200] The encoding data acquisition module 812 is used to acquire video encoding data; wherein, the video encoding data is generated based on the video privacy protection method described in any of the above embodiments;

[0201] SEI reading module 814 is used to read the first SEI data of the video encoded data and extract encrypted parameter data from the first SEI data;

[0202] The parameter decryption module 816 is used to decrypt the encrypted parameter data using preset password information, and obtain the initialization vector and encryption key based on the decryption result;

[0203] The video decryption module 818 is used to decrypt multiple NAL unit data of the video encoded data using the initialization vector and the encryption key, and obtain the decrypted video.

[0204] In some quantities, the video file of the decrypted video includes N custom SEI data, where N is a positive integer. The video decryption device 810 of this application also includes:

[0205] The first deletion unit is used to delete N custom SEI data from the video file of the decrypted video;

[0206] The second deletion unit is used to delete the encrypted parameter data from the first SEI data.

[0207] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the video privacy protection method as described in any embodiment, and / or perform the steps of the video decryption method as described in any embodiment.

[0208] In one embodiment, this application also provides a video encryption device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the video privacy protection method as described in any embodiment.

[0209] In one embodiment, this application also provides a video decryption device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the video decryption method as described in any embodiment.

[0210] In some embodiments, the video encryption device and / or video decryption device may be a computer device. Illustratively, Figure 10 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. In one example, the computer device can be a server. (Refer to...) Figure 10 The computer device 900 includes a processing component 902, which further includes one or more processors, and memory resources represented by memory 901 for storing instructions, such as application programs, that can be executed by the processing component 902. The application programs stored in memory 901 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 902 is configured to execute instructions to perform the steps of the methods described in any of the above embodiments.

[0211] The computer device 900 may also include a power supply component 903 configured to perform power management of the computer device 900, a wired or wireless network interface 904 configured to connect the computer device 900 to a network, and an input / output (I / O) interface 905. The computer device 900 may operate on an operating system stored in memory 901, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.

[0212] Those skilled in the art will understand that the internal structure of the computer device shown in this application is merely a block diagram of a portion of the structure related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0213] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the related listed items.

[0214] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0215] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A video privacy protection method, characterized in that, Applications in video encryption devices include: Obtain the original video, initialization vector, and encryption key; Based on the initialization vector and the encryption key, the video frames to be encrypted in the original video are encrypted to obtain a privacy-protected video; wherein, the video frames to be encrypted are video frames that include privacy information; The initialization vector and / or the encryption key are encrypted using a preset password to obtain encrypted parameter data; Based on the encrypted parameter data, a lossless compression coding algorithm is used to compress and encode the privacy-protected video to obtain video encoded data; wherein, the video encoded data includes multiple NAL unit data, at least one of the NAL unit data is SEI data, and the first SEI data records the encrypted parameter data; The step of encrypting the video frame to be encrypted in the original video according to the initialization vector and the encryption key includes: Determine the privacy region of the target video frame; the target video frame is any of the video frames to be encrypted, and the privacy region is the image region corresponding to the privacy information; A first hash value is obtained by performing a hash calculation on the initialization vector, the encryption key, and the preset first channel identifier using a preset hash algorithm. Using a preset partitioning rule, the first hash value is divided into a first target vector and a first target key; The preset hash algorithm is used to perform hash calculations on the initialization vector, the encryption key, and the preset second channel identifier to obtain a second hash value; wherein the second channel identifier is different from the first channel identifier; Using the preset partitioning rule, the second hash value is divided into a second target vector and a second target key; The preset hash algorithm is used to perform hash calculations on the initialization vector, the encryption key, and the preset third channel identifier to obtain a third hash value; wherein the third channel identifier is different from both the first channel identifier and the second channel identifier. Using the preset partitioning rule, the third hash value is divided into a third target vector and a third target key; The channel value of each target pixel in the first image channel is obtained to obtain the first channel value array; wherein, each target pixel is a pixel located in the privacy region; Using the first target vector and the first target key, the first channel value array is encrypted, and the first encrypted array is obtained based on the encryption calculation result of the first channel value array. Obtain the channel value of each target pixel in the second image channel to obtain the second channel value array; Using the second target vector and the second target key, the second channel value array is encrypted, and the second encrypted array is obtained based on the encryption calculation result of the second channel value array. Obtain the channel value of each target pixel in the third image channel to obtain the third channel value array; The third target vector and the third target key are used to perform encryption calculation on the third channel value array, and the third encrypted array is obtained based on the encryption calculation result of the third channel value array; Based on the first encryption array, the second encryption array, and the third encryption array, the encrypted pixel value of each target pixel is determined; The actual pixel value of each target pixel is modified to the encrypted pixel value of that target pixel.

2. The method according to claim 1, characterized in that, The NAL unit data includes N encrypted video data and N custom SEI data, with each of the N encrypted video data and the N custom SEI data corresponding one-to-one. In the video encoding data, any of the custom SEI data is adjacent to the corresponding target encrypted video data, and any of the custom SEI data records the location information of the privacy area corresponding to the target encrypted video data; The encrypted video data is NAL unit data used to record encrypted video frames, the encrypted video frames are obtained by encrypting the video frames to be encrypted, and N is the total number of video frames to be encrypted in the original video.

3. The method according to claim 1, characterized in that, The encryption parameter data is data obtained by encrypting the encryption key using the preset password information; the first SEI data record contains the initialization vector and the encryption parameter data.

4. A video decryption method, characterized in that, Applications in video decryption equipment include: Acquire video encoded data; wherein the video encoded data is generated based on the video privacy protection method according to any one of claims 1 to 3; Read the first SEI data of the video encoded data, and extract the encrypted parameter data from the first SEI data; The encrypted parameter data is decrypted using a preset password, and an initialization vector and encryption key are obtained based on the decryption result; Using the initialization vector and the encryption key, multiple NAL unit data of the video encoded data are decrypted to obtain the decrypted video.

5. The method according to claim 4, characterized in that, The video file of the decrypted video includes N custom SEI data, where N is a positive integer; After obtaining the decrypted video, the process also includes: Delete N custom SEI data entries from the video file of the decrypted video; The encrypted parameter data is deleted from the first SEI data.

6. A video privacy protection device, characterized in that, Applications in video encryption devices include: The data acquisition module is used to acquire the original video, initialization vector, and encryption key; A privacy protection module is used to encrypt the video frames to be encrypted in the original video according to the initialization vector and the encryption key, and obtain a privacy-protected video; wherein the video frames to be encrypted are video frames that include privacy information. The parameter encryption module is used to encrypt the initialization vector and / or the encryption key using a preset password to obtain encrypted parameter data; The compression encoding module is used to compress and encode the privacy-protected video using a lossless compression encoding algorithm based on the encrypted parameter data, and obtain video encoded data; wherein, the video encoded data includes multiple NAL unit data, at least one of the NAL unit data is SEI data, and the first SEI data records the encrypted parameter data; The privacy protection module includes: A privacy region determination unit is used to determine the privacy region of a target video frame; the target video frame is any of the video frames to be encrypted, and the privacy region is the image region corresponding to the privacy information; The first hash calculation unit is used to perform hash calculation on the initialization vector, the encryption key and the preset first channel identifier using a preset hash algorithm to obtain a first hash value; The first partitioning unit is used to partition the first hash value into a first target vector and a first target key using a preset partitioning rule; The second hash calculation unit is used to perform hash calculation on the initialization vector, the encryption key, and the preset second channel identifier using the preset hash algorithm to obtain a second hash value; wherein the second channel identifier is different from the first channel identifier; The second partitioning unit is used to partition the second hash value into a second target vector and a second target key using the preset partitioning rule; The third hash calculation unit is used to perform hash calculation on the initialization vector, the encryption key, and the preset third channel identifier using the preset hash algorithm to obtain a third hash value; wherein the third channel identifier is different from both the first channel identifier and the second channel identifier; The third partitioning unit is used to partition the third hash value into a third target vector and a third target key using the preset partitioning rules; The first channel value acquisition unit is used to acquire the channel value of each target pixel in the first image channel to obtain a first channel value array; wherein, each target pixel is a pixel located in the privacy region; The first channel value encryption unit is used to perform encryption calculation on the first channel value array using the first target vector and the first target key, and to obtain a first encrypted array based on the encryption calculation result of the first channel value array. The second channel value acquisition unit is used to acquire the channel value of each target pixel in the second image channel to obtain a second channel value array; The second channel value encryption unit is used to perform encryption calculation on the second channel value array using the second target vector and the second target key, and obtain the second encrypted array based on the encryption calculation result of the second channel value array; The third channel value acquisition unit is used to acquire the channel value of each target pixel in the third image channel to obtain a third channel value array; The third channel value encryption unit is used to perform encryption calculation on the third channel value array using the third target vector and the third target key, and to obtain the third encryption array based on the encryption calculation result of the third channel value array; A pixel encryption unit is used to determine the encrypted pixel value of each target pixel based on the first encryption array, the second encryption array, and the third encryption array; The pixel modification unit is used to modify the actual pixel value of each target pixel to the encrypted pixel value of that target pixel.

7. A video decryption device, characterized in that, Applications in video decryption equipment include: An encoding data acquisition module is used to acquire video encoding data; wherein the video encoding data is generated based on the video privacy protection method according to any one of claims 1 to 3; The SEI reading module is used to read the first SEI data of the video encoded data and extract encrypted parameter data from the first SEI data. The parameter decryption module is used to decrypt the encrypted parameter data using preset password information, and obtain the initialization vector and encryption key based on the decryption result; The video decryption module is used to decrypt multiple NAL unit data of the video encoded data using the initialization vector and the encryption key, and obtain the decrypted video.

Citation Information

Patent Citations

  • Processing method and device for image acquisition synchronous encryption privacy protection

    CN114390316A

  • Video processing method, video transmission method, video viewing method and device

    CN115550691A

  • Image encryption method and device, image decryption method and device, equipment and medium

    CN117857712A