CN117793463A - Video sensitive data protection method, device, equipment and medium - Google Patents

Video sensitive data protection method, device, equipment and medium Download PDF

Info

Publication number
CN117793463A
CN117793463A CN202410021232.9A CN202410021232A CN117793463A CN 117793463 A CN117793463 A CN 117793463A CN 202410021232 A CN202410021232 A CN 202410021232A CN 117793463 A CN117793463 A CN 117793463A
Authority
CN
China
Prior art keywords
frame
video file
target
target video
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410021232.9A
Other languages
Chinese (zh)
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.)
Shandong Inspur Science Research Institute Co Ltd
Original Assignee
Shandong Inspur Science Research Institute 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 Shandong Inspur Science Research Institute Co Ltd filed Critical Shandong Inspur Science Research Institute Co Ltd
Priority to CN202410021232.9A priority Critical patent/CN117793463A/en
Publication of CN117793463A publication Critical patent/CN117793463A/en
Pending legal-status Critical Current

Links

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses a video sensitive data protection method, a device, equipment and a medium, which relate to the field of video processing and comprise the following steps: dividing sensitive data from a sensitive area contained in a key frame of an original video file to obtain a divided key frame; storing the encrypted sensitive data, the position information of the sensitive area in the key frame and the frame identification of the key frame into an annotation frame; replacing corresponding video frames in the original video file by utilizing the segmented key frames, and adding annotation frames to the replaced original video file to obtain a target video file; after a playing instruction is acquired and the key verification is passed, triggering a process of decrypting encrypted sensitive data contained in the annotation frame of the target video file by using the key and filling the decrypted data into the corresponding key frame based on the position information and the frame identification so as to play the target video file. The method and the device protect sensitive data in the video so as to display different users with different authorities.

Description

Video sensitive data protection method, device, equipment and medium
Technical Field
The present invention relates to the field of video processing, and in particular, to a method, apparatus, device, and medium for protecting video sensitive data.
Background
With the rapid development of internet technology, video is one of the main ways people acquire information and entertainment. However, a problem that follows is that content security of video is becoming a challenge to be addressed. In general, conventional video coding methods lack a finer granularity of rights control for sensitive data contained in video, typically after coding, either the user cannot see the sensitive content in the entire video or the user can see the full view of the video.
Disclosure of Invention
In view of the above, the present invention aims to provide a method, apparatus, device and medium for protecting video sensitive data, which can encrypt and protect sensitive data in key frames included in a video file to display different videos for different users with different rights, so as to realize finer-granularity rights control. The specific scheme is as follows:
in a first aspect, the present application provides a video sensitive data protection method, including:
dividing a plurality of groups of sensitive data from a plurality of sensitive areas contained in a key frame of an original video file to obtain a divided key frame;
Encrypting the plurality of groups of sensitive data to obtain a plurality of groups of encrypted data, and storing each group of encrypted data, the position information of each sensitive area in the corresponding key frame and the frame identification of the corresponding key frame into each annotation frame which is created in advance;
replacing corresponding video frames in the original video file by utilizing the segmented key frames, and adding the annotation frames to the replaced original video file to obtain a target video file;
after a video playing instruction is acquired and a target decryption key is verified, triggering a process of decrypting the encrypted data contained in the annotation frame of the target video file by using the target decryption key, and filling the decrypted data into the corresponding key frame based on the position information and the frame identifier so as to play the target video file.
Optionally, before storing each set of encrypted data, the location information of each sensitive area in the corresponding key frame and the frame identifier of the corresponding key frame in each pre-created annotation frame, the method further includes:
Creating an annotation frame based on the supplemental enhancement information and configuring an annotation type identifier for the annotation frame; wherein the annotation type identifier is used to characterize the annotation frame as a video frame that supplements the corresponding key frame with additional information.
Optionally, the replacing the corresponding video frame in the original video file with the segmented key frame includes:
filling the sensitive area in the segmented key frame by using an image filling technology to obtain a filled key frame, and replacing a corresponding video frame in the original video file by using the filled key frame to obtain a replaced original video file;
or directly replacing the corresponding video frames in the original video file by using the segmented key frames to obtain the replaced original video file.
Optionally, the adding the annotation frame to the replaced original video file to obtain a target video file includes:
determining a target key frame corresponding to a frame identifier in the annotation frame, and adding the annotation frame to a position adjacent to the target key frame in the replaced original video file to obtain a target video file;
Or directly adding the annotation frame to the beginning position or the ending position in the replaced original video file to obtain a target video file.
Optionally, the method further comprises:
encrypting a preset decryption key by using an information abstraction algorithm to obtain first encryption information, and adding the first encryption information into the target video file;
when the video playing instruction and the target decryption key are acquired, encrypting the target decryption key by utilizing the information abstraction algorithm to obtain second encrypted information;
and judging whether the second encryption information is consistent with the first encryption information contained in the target video file, and if so, judging that the target decryption key passes verification.
Optionally, the triggering a process of decrypting the encrypted data included in the annotation frame of the target video file by using the target decryption key and filling the decrypted data into the corresponding key frame based on the location information and the frame identifier, so as to play the target video file, including:
extracting a first target video frame in the target video file according to the sequence of the video frames, and judging whether the target video frame is extracted or not; the target video frame is a non-annotation frame;
If the target video frame is extracted, judging whether the type of the target video frame is a key frame or not;
if the type of the target video frame is a key frame, reading a plurality of target annotation frames corresponding to the target video frame from the target video file based on the frame identification of the target video frame;
decrypting the encrypted data respectively contained in the target annotation frames by using the target decryption key, and filling the corresponding decrypted data into the target video frames based on the position information respectively contained in the target annotation frames so as to decode and play the target video frames;
extracting the next target video frame in the target video file according to the sequence of the video frames, and jumping to the step of judging whether the target video frame is extracted or not until the target video frame is not extracted from the target video file, so as to finish playing the target video file.
Optionally, after the determining whether the type of the target video frame is a key frame, the method further includes:
if the type of the target video frame is a non-key frame, decoding the target video frame, displaying the decoded target video frame, extracting the next target video frame in the target video file according to the sequence of the video frames, and restarting the step of judging whether the target video frame is extracted or not until the target video frame is not extracted from the target video file, so as to finish playing the target video file.
In a second aspect, the present application provides a video sensitive data protection device, including:
the sensitive data segmentation module is used for segmenting a plurality of groups of sensitive data from a plurality of sensitive areas contained in the key frame of the original video file so as to obtain a segmented key frame;
the annotation frame determining module is used for encrypting the plurality of groups of sensitive data to obtain a plurality of groups of encrypted data, and storing the position information of each group of encrypted data and each sensitive area in the corresponding key frame and the frame identification of the corresponding key frame into each annotation frame which is created in advance;
the video file determining module is used for replacing corresponding video frames in the original video file by utilizing the segmented key frames, and adding the annotation frames to the replaced original video file to obtain a target video file;
and the video file playing module is used for triggering the process of decrypting the encrypted data contained in the annotation frame of the target video file by using the target decryption key after the video playing instruction is acquired and the target decryption key is verified, and filling the decrypted data into the corresponding key frame based on the position information and the frame identifier so as to play the target video file.
In a third aspect, the present application provides an electronic device, including:
a memory for storing a computer program;
and a processor for executing the computer program to implement the video sensitive data protection method.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the video sensitive data protection method described above.
In the application, a plurality of groups of sensitive data are segmented from a plurality of sensitive areas contained in a key frame of an original video file so as to obtain a segmented key frame; encrypting the plurality of groups of sensitive data to obtain a plurality of groups of encrypted data, and storing each group of encrypted data, the position information of each sensitive area in the corresponding key frame and the frame identification of the corresponding key frame into each annotation frame which is created in advance; replacing corresponding video frames in the original video file by utilizing the segmented key frames, and adding the annotation frames to the replaced original video file to obtain a target video file; after a video playing instruction is acquired and a target decryption key is verified, triggering a process of decrypting the encrypted data contained in the annotation frame of the target video file by using the target decryption key, and filling the decrypted data into the corresponding key frame based on the position information and the frame identifier so as to play the target video file. Therefore, the encryption protection of the sensitive data is realized by determining the sensitive area in the key frame contained in the original video file and encrypting the sensitive data segmented from the sensitive area, and then the encrypted sensitive data is stored in the annotation frame, so that in the subsequent video decoding and playing process, if the decryption key input by a user passes verification, the encrypted sensitive data in the annotation frame is decrypted by using the decryption key, and the decrypted data is filled back into the corresponding key frame, thereby realizing the playing of the video file; in this way, by verifying the decryption key, the user who passes the verification can see the complete video, and the user who does not pass the verification can only see the encrypted video, so that the users with different authorities can display videos with different states, and the authority control of the video file with finer granularity is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for protecting video sensitive data disclosed in the present application;
FIG. 2 is a flow chart of encryption of sensitive data in a video file disclosed in the present application;
FIG. 3 is a video decoding playback flow chart disclosed in the present application;
fig. 4 is a schematic structural diagram of a video sensitive data protection device disclosed in the present application;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Conventional video coding methods lack a finer granularity of rights control for sensitive data contained in the video, typically after coding, either the user cannot see the sensitive content in the entire video or the user can see the full view of the video. Therefore, the application provides a video sensitive data protection method, which is used for carrying out encryption protection on sensitive data in key frames contained in a video file so as to carry out different video display on different authority users and realize finer-granularity authority control.
Referring to fig. 1, an embodiment of the present invention discloses a video sensitive data protection method, including:
step S11, a plurality of groups of sensitive data are segmented from a plurality of sensitive areas contained in the key frame of the original video file, so as to obtain the segmented key frame.
In this embodiment, a key frame is extracted from an original video file, a plurality of sensitive areas containing sensitive data in the key frame are determined, and the sensitive data respectively contained in the plurality of sensitive areas are segmented to obtain a plurality of groups of sensitive data, that is, one sensitive area corresponds to one group of sensitive data; and meanwhile, after the sensitive data in the key frame are segmented, the corresponding segmented key frame can be obtained. Wherein each key frame may or may not contain one or more sensitive regions. It should be noted that, for extracting key frames in the original video file, all the key frames can be directly extracted from the original video file, and then each key frame is subjected to sensitive data segmentation; the key frames can be extracted from the original video file frame by frame according to the sequence of the video frames, and the sensitive data can be segmented frame by frame. Note that, the encoding of the original video file may be h.264 encoding, or other encoding methods may be used, which is not limited herein.
Step S12, encrypting the plurality of groups of sensitive data to obtain a plurality of groups of encrypted data, and storing the encrypted data, the position information of each sensitive area in the corresponding key frame and the frame identification of the corresponding key frame into each annotation frame which is created in advance.
In this embodiment, the frame encoder is annotated and the encryption key is used to encrypt several groups of sensitive data extracted from the key frame, so as to obtain several corresponding groups of encrypted data; it should be noted that, a set of sensitive data corresponds to a sensitive area, that is, a set of encrypted data corresponds to a sensitive area. And storing each group of encrypted data, the position information of each sensitive area in the corresponding key frame and the frame identification of the corresponding key frame into each pre-created annotation frame. The annotation frame comprises a group of encrypted data, the position information of a sensitive area corresponding to the group of encrypted data in a corresponding key frame and the frame identification of the key frame, and the position information, the position information and the frame identification have a corresponding relation. The location information for the sensitive region in the corresponding key frame includes the upper left and/or lower right corner coordinates of the sensitive region in the corresponding key frame, including but not limited to pixel coordinates, block coordinates, and the like. In addition, the annotation frame may further include an encryption and decryption algorithm name and a size of a sensitive area, where the encryption and decryption algorithm includes but is not limited to AES (Advanced Encryption Standard ), and the size of the sensitive area includes a width and a height of the sensitive area.
Further, for creation of the annotation frame, creating the annotation frame based on the supplemental enhancement information (SEI, supplemental Enhancement Information), and configuring an annotation type identifier for the annotation frame; the annotation type identifier is mainly used for characterizing the annotation frame as a video frame which supplements additional information for the corresponding key frame. In addition, annotation frames can be created by custom extension tags in the H.264 coding standard and an annotation type identifier can be configured for the annotation frame.
And S13, replacing corresponding video frames in the original video file by utilizing the segmented key frames, and adding the annotation frames to the replaced original video file to obtain a target video file.
In this embodiment, for the segmented keyframes, in a specific implementation manner, an image filling technology is used to fill a sensitive area in the segmented keyframes, for example, mosaic filling or surrounding background filling, so as to obtain filled keyframes, and then the filled keyframes are used to replace corresponding video frames in the original video file so as to obtain a replaced original video file; in this way, the aesthetics of the video can be improved. In another embodiment, the segmented key frames are directly used to replace corresponding video frames in the original video file, so as to obtain a replaced original video file.
In this embodiment, for adding an annotation frame, in a specific implementation manner, a target key frame corresponding to a frame identifier stored in the annotation frame is determined from the replaced original video file, and the annotation frame is added to a position adjacent to the target key frame in the replaced original video file, so as to obtain a target video file; the position adjacent to the target key frame may be either a position adjacent to the target key frame backward or a position adjacent to the target key frame forward. In another embodiment, the annotation frame is directly added to the beginning position or the ending position of the replaced original video file in a unified way, so as to obtain the target video file.
And step S14, after a video playing instruction is acquired and a target decryption key is verified, triggering a process of decrypting the encrypted data contained in the annotation frame of the target video file by using the target decryption key, and filling the decrypted data into the corresponding key frame based on the position information and the frame identifier so as to play the target video file.
In this embodiment, after a video playing instruction and a target decryption key for a target video file input by a user are acquired through a preset interface, the target decryption key is verified, if verification of the target decryption key fails, encrypted data in an annotation frame cannot be decrypted, that is, decoding and playing are directly performed on a non-annotation frame in the target video file, and at this time, the user cannot see sensitive content in the video. And if the verification of the target decryption key is passed, triggering a process of decrypting encrypted data contained in the annotation frame of the target video file by the annotation frame decoder and utilizing the target decryption key, and filling the decrypted data into the corresponding key frame based on the position information and the frame identification so as to play the target video file, wherein the user sees the complete video containing the sensitive content. It should be noted that, the encryption and decryption algorithm name, the encryption key and the decryption key are shared in advance by the video sender and the video receiver.
The verification process for the target decryption key specifically comprises the steps of encrypting a preset decryption key by using an information Digest Algorithm (MD 5) to obtain first encryption information, and adding the first encryption information into the target video file; the preset decryption key is a key corresponding to the encryption key. When a video playing instruction and a target decryption key input by a user are acquired, encrypting the target decryption key by using an information abstraction algorithm to obtain second encryption information; judging whether the second encryption information is consistent with the first encryption information contained in the target video file, and if so, judging that the target decryption key passes verification; if the target decryption keys are inconsistent, the verification of the target decryption keys is judged to be failed.
As shown in fig. 2, the encryption process of the sensitive data in the video file specifically obtains a sensitive data encryption selection instruction input by a user, judges whether to encrypt the sensitive data in the original video file based on the sensitive data encryption selection instruction, and directly outputs the original video file if not; if the key frames are encrypted, extracting the first key frame in the current original video file according to the sequence of the video frames, and judging whether the key frames are extracted or not. If the key frame is extracted, dividing a plurality of groups of sensitive data from a plurality of sensitive areas contained in the key frame to obtain a divided key frame, and encrypting the plurality of groups of sensitive data by utilizing an encryption key to obtain a plurality of groups of encrypted data; then creating annotation frames, and storing each group of encrypted data, the position information of each sensitive area in the key frame and the frame identification of the key frame into each annotation frame; filling sensitive areas in the segmented key frames by using an image filling technology to obtain filled key frames, replacing corresponding video frames in the current original video file by using the filled key frames to obtain a replaced current original video file, and adding annotation frames into the replaced current original video file to obtain a new current original video file; and then extracting the next key frame in the current original video file according to the sequence of the video frames, and re-jumping to the step of judging whether the key frame is extracted or not until the key frame is not extracted, so as to obtain the target video file based on the current original video file.
Therefore, the encryption protection of the sensitive data is realized by determining the sensitive area in the key frame contained in the original video file and encrypting the sensitive data segmented from the sensitive area, and then the encrypted sensitive data is stored in the annotation frame, so that in the subsequent video decoding and playing process, if the decryption key input by a user passes verification, the encrypted sensitive data in the annotation frame is decrypted by using the decryption key, and the decrypted data is filled back into the corresponding key frame, thereby realizing the playing of the video file; in this way, by verifying the decryption key, the user who passes the verification can see the complete video, and the user who does not pass the verification can only see the encrypted video, so that the users with different authorities can display videos with different states, and the authority control of the video file with finer granularity is realized.
Based on any one of the above embodiments, the present application will next describe in detail how to decode and play the target video file; referring to fig. 3, an embodiment of the present invention discloses a video decoding and playing process, including:
Acquiring a sensitive data decryption selection instruction input by a user, judging whether to decrypt encrypted sensitive data in a target video file based on the sensitive data decryption selection instruction, if not, discarding annotation frames in the target video file, and decoding and playing other video frames in the target video file by using a traditional flow; if decryption is needed, acquiring a target decryption key input by a user, verifying the target decryption key, extracting a first target video frame in a target video file according to the sequence of video frames after verification is successful, and judging whether the first target video frame is extracted; it should be noted that the target video frame is a non-annotated frame, that is, the target video frame includes a key frame and a difference frame. If the target video frame is extracted, the fact that the video frame is not the tail end of the target video file at present and the video frame which is not decoded and played still exists is indicated, and therefore whether the type of the target video frame is a key frame or not is continuously judged. If the type of the target video frame is a key frame, reading a plurality of target annotation frames corresponding to the target video frame from the target video file based on the frame identification of the target video frame; decrypting the encrypted data respectively contained in the target annotation frames by using the target decryption key which is successfully verified, filling the corresponding decrypted data into the target video frames based on the position information respectively contained in the target annotation frames, decoding and playing the target video frames according to the traditional flow, continuing to extract the next target video frame in the target video file according to the sequence of the video frames, and re-jumping to the step of judging whether the target video frame is extracted or not until the target video frame is not extracted from the target video file, namely, the current video frame is not at the end of the target video file, thereby completing playing the target video file.
Further, after judging whether the type of the target video frame is a key frame or not, if the type of the target video frame is a non-key frame, decoding the target video frame according to the traditional flow, displaying the decoded target video frame, extracting the next target video frame in the target video file according to the sequence of the video frames, and jumping to the step of judging whether to extract the target video frame or not again until the target video frame is not extracted from the target video file, namely, decoding all the video frames in the target video file is completed, thereby completing playing of the target video file.
Therefore, in the process of video decoding and playing, if the decryption key input by the user passes verification, the encrypted sensitive data in the annotation frame is decrypted by using the decryption key, and the decrypted data is filled back into the corresponding key frame, so that the playing of the video file is realized; in this way, by verifying the decryption key, the user who passes the verification can see the complete video, and the user who does not pass the verification can only see the encrypted video, so that the users with different authorities can display videos with different states, and the authority control of the video file with finer granularity is realized.
Referring to fig. 4, an embodiment of the present invention discloses a video sensitive data protection device, including:
the sensitive data segmentation module 11 is used for segmenting a plurality of groups of sensitive data from a plurality of sensitive areas contained in the key frames of the original video file to obtain segmented key frames;
the comment frame determining module 12 is configured to encrypt the plurality of sets of sensitive data to obtain a plurality of sets of encrypted data, and store each set of encrypted data, position information of each sensitive area in the corresponding key frame, and a frame identifier of the corresponding key frame into each comment frame created in advance;
a video file determining module 13, configured to replace a corresponding video frame in the original video file with the segmented key frame, and add the annotation frame to the replaced original video file, so as to obtain a target video file;
the video file playing module 14 is configured to trigger a process of decrypting the encrypted data included in the annotation frame of the target video file by using the target decryption key after the video playing instruction is acquired and the target decryption key is verified, and fill the decrypted data into the corresponding key frame based on the location information and the frame identifier, so as to play the target video file.
Therefore, the encryption protection of the sensitive data is realized by determining the sensitive area in the key frame contained in the original video file and encrypting the sensitive data segmented from the sensitive area, and then the encrypted sensitive data is stored in the annotation frame, so that in the subsequent video decoding and playing process, if the decryption key input by a user passes verification, the encrypted sensitive data in the annotation frame is decrypted by using the decryption key, and the decrypted data is filled back into the corresponding key frame, thereby realizing the playing of the video file; in this way, by verifying the decryption key, the user who passes the verification can see the complete video, and the user who does not pass the verification can only see the encrypted video, so that the users with different authorities can display videos with different states, and the authority control of the video file with finer granularity is realized.
In some embodiments, the video sensitive data protection device further comprises:
an annotation frame creation unit configured to create an annotation frame based on the supplemental enhancement information and configure an annotation type identifier for the annotation frame; wherein the annotation type identifier is used to characterize the annotation frame as a video frame that supplements the corresponding key frame with additional information.
In some embodiments, the video file determining module 13 includes:
a first video frame replacing unit, configured to fill the sensitive area in the segmented key frame by using an image filling technology, so as to obtain a filled key frame, and replace a corresponding video frame in the original video file by using the filled key frame, so as to obtain the replaced original video file;
and the second video frame replacing unit is used for directly replacing the corresponding video frames in the original video file by utilizing the segmented key frames so as to obtain the replaced original video file.
In some embodiments, the video file determining module 13 includes:
a first annotation frame adding unit, configured to determine a target key frame corresponding to a frame identifier in the annotation frame, and add the annotation frame to a position adjacent to the target key frame in the replaced original video file, so as to obtain a target video file;
and the second annotation frame adding unit is used for directly adding the annotation frame to the beginning position or the ending position in the replaced original video file so as to obtain a target video file.
In some embodiments, the video sensitive data protection device further comprises:
the encryption information adding unit is used for encrypting a preset decryption key by utilizing an information abstraction algorithm to obtain first encryption information, and adding the first encryption information into the target video file;
the decryption key encryption unit is used for encrypting the target decryption key by utilizing the information abstraction algorithm when the video playing instruction and the target decryption key are acquired, so as to obtain second encryption information;
and the encryption information judging unit is used for judging whether the second encryption information is consistent with the first encryption information contained in the target video file, and if so, judging that the target decryption key passes verification.
In some embodiments, the video file playing module 14 includes:
the video frame extraction unit is used for extracting a first target video frame in the target video file according to the sequence of the video frames and judging whether the target video frame is extracted or not; the target video frame is a non-annotation frame;
the key frame judging unit is used for judging whether the type of the target video frame is a key frame or not if the target video frame is extracted;
The annotation frame reading unit is used for reading a plurality of target annotation frames corresponding to the target video frames from the target video file based on the frame identification of the target video frames if the types of the target video frames are key frames;
the data decryption unit is used for decrypting the encrypted data respectively contained in the target annotation frames by utilizing the target decryption key, and filling the corresponding decrypted data into the target video frames based on the position information respectively contained in the target annotation frames so as to decode and play the target video frames;
and the step jump unit is used for extracting the next target video frame in the target video file according to the sequence of the video frames, and jumping to the step of judging whether the target video frame is extracted or not until the target video frame is not extracted from the target video file, so as to finish playing the target video file.
In some embodiments, the video file playing module 14 further includes:
and the video frame decoding unit is used for decoding the target video frame if the type of the target video frame is a non-key frame, displaying the decoded target video frame, extracting the next target video frame in the target video file according to the sequence of the video frames, and jumping to the step of judging whether the target video frame is extracted or not until the target video frame is not extracted from the target video file so as to finish playing the target video file.
Further, the embodiment of the present application further discloses an electronic device, and fig. 5 is a block diagram of the electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is configured to store a computer program that is loaded and executed by the processor 21 to implement the relevant steps in the video sensitive data protection method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further comprise a computer program capable of performing other specific tasks in addition to the computer program capable of performing the video sensitive data protection method performed by the electronic device 20 as disclosed in any of the previous embodiments.
Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the video sensitive data protection method disclosed previously. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined the detailed description of the preferred embodiment of the present application, and the detailed description of the principles and embodiments of the present application has been provided herein by way of example only to facilitate the understanding of the method and core concepts of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method for protecting video sensitive data, comprising:
dividing a plurality of groups of sensitive data from a plurality of sensitive areas contained in a key frame of an original video file to obtain a divided key frame;
encrypting the plurality of groups of sensitive data to obtain a plurality of groups of encrypted data, and storing each group of encrypted data, the position information of each sensitive area in the corresponding key frame and the frame identification of the corresponding key frame into each annotation frame which is created in advance;
replacing corresponding video frames in the original video file by utilizing the segmented key frames, and adding the annotation frames to the replaced original video file to obtain a target video file;
After a video playing instruction is acquired and a target decryption key is verified, triggering a process of decrypting the encrypted data contained in the annotation frame of the target video file by using the target decryption key, and filling the decrypted data into the corresponding key frame based on the position information and the frame identifier so as to play the target video file.
2. The method according to claim 1, wherein before storing each set of the encrypted data, the location information of each sensitive area in the corresponding key frame, and the frame identifier of the corresponding key frame in each annotation frame created in advance, further comprising:
creating an annotation frame based on the supplemental enhancement information and configuring an annotation type identifier for the annotation frame; wherein the annotation type identifier is used to characterize the annotation frame as a video frame that supplements the corresponding key frame with additional information.
3. The method according to claim 1, wherein replacing the corresponding video frame in the original video file with the segmented key frame comprises:
Filling the sensitive area in the segmented key frame by using an image filling technology to obtain a filled key frame, and replacing a corresponding video frame in the original video file by using the filled key frame to obtain a replaced original video file;
or directly replacing the corresponding video frames in the original video file by using the segmented key frames to obtain the replaced original video file.
4. The method according to claim 1, wherein adding the annotation frame to the original video file after replacement to obtain a target video file comprises:
determining a target key frame corresponding to a frame identifier in the annotation frame, and adding the annotation frame to a position adjacent to the target key frame in the replaced original video file to obtain a target video file;
or directly adding the annotation frame to the beginning position or the ending position in the replaced original video file to obtain a target video file.
5. The method of video sensitive data protection according to claim 1, further comprising:
Encrypting a preset decryption key by using an information abstraction algorithm to obtain first encryption information, and adding the first encryption information into the target video file;
when the video playing instruction and the target decryption key are acquired, encrypting the target decryption key by utilizing the information abstraction algorithm to obtain second encrypted information;
and judging whether the second encryption information is consistent with the first encryption information contained in the target video file, and if so, judging that the target decryption key passes verification.
6. The video sensitive data protection method according to any one of claims 1 to 5, wherein the triggering a process of decrypting the encrypted data contained in the annotation frame of the target video file using the target decryption key and filling the decrypted data into the corresponding key frame based on the location information and the frame identification to play the target video file includes:
extracting a first target video frame in the target video file according to the sequence of the video frames, and judging whether the target video frame is extracted or not; the target video frame is a non-annotation frame;
If the target video frame is extracted, judging whether the type of the target video frame is a key frame or not;
if the type of the target video frame is a key frame, reading a plurality of target annotation frames corresponding to the target video frame from the target video file based on the frame identification of the target video frame;
decrypting the encrypted data respectively contained in the target annotation frames by using the target decryption key, and filling the corresponding decrypted data into the target video frames based on the position information respectively contained in the target annotation frames so as to decode and play the target video frames;
extracting the next target video frame in the target video file according to the sequence of the video frames, and jumping to the step of judging whether the target video frame is extracted or not until the target video frame is not extracted from the target video file, so as to finish playing the target video file.
7. The method according to claim 6, wherein after determining whether the type of the target video frame is a key frame, further comprising:
If the type of the target video frame is a non-key frame, decoding the target video frame, displaying the decoded target video frame, extracting the next target video frame in the target video file according to the sequence of the video frames, and restarting the step of judging whether the target video frame is extracted or not until the target video frame is not extracted from the target video file, so as to finish playing the target video file.
8. A video sensitive data protection device, comprising:
the sensitive data segmentation module is used for segmenting a plurality of groups of sensitive data from a plurality of sensitive areas contained in the key frame of the original video file so as to obtain a segmented key frame;
the annotation frame determining module is used for encrypting the plurality of groups of sensitive data to obtain a plurality of groups of encrypted data, and storing the position information of each group of encrypted data and each sensitive area in the corresponding key frame and the frame identification of the corresponding key frame into each annotation frame which is created in advance;
the video file determining module is used for replacing corresponding video frames in the original video file by utilizing the segmented key frames, and adding the annotation frames to the replaced original video file to obtain a target video file;
And the video file playing module is used for triggering the process of decrypting the encrypted data contained in the annotation frame of the target video file by using the target decryption key after the video playing instruction is acquired and the target decryption key is verified, and filling the decrypted data into the corresponding key frame based on the position information and the frame identifier so as to play the target video file.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the video sensitive data protection method as claimed in any one of claims 1 to 7.
10. A computer readable storage medium for storing a computer program which when executed by a processor implements the video sensitive data protection method according to any one of claims 1 to 7.
CN202410021232.9A 2024-01-04 2024-01-04 Video sensitive data protection method, device, equipment and medium Pending CN117793463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410021232.9A CN117793463A (en) 2024-01-04 2024-01-04 Video sensitive data protection method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410021232.9A CN117793463A (en) 2024-01-04 2024-01-04 Video sensitive data protection method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117793463A true CN117793463A (en) 2024-03-29

Family

ID=90392755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410021232.9A Pending CN117793463A (en) 2024-01-04 2024-01-04 Video sensitive data protection method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117793463A (en)

Similar Documents

Publication Publication Date Title
CN1287249C (en) Access control for digital content
US7461406B2 (en) Access control for digital content
EP1503590B1 (en) Access control for digital video stream data
CN104680077B (en) Method for encrypting picture, method for viewing picture, system and terminal
EP2832102B1 (en) Methods and systems for cryptographic access control of video
EP2439672A2 (en) Information processing apparatus, information processing method, and program
JP2005533416A (en) How to securely present encrypted digital content
CN105577684A (en) Anti-crawling methods, server, client and system
US10162944B2 (en) Library style media DRM APIs in a hosted architecture
CN106998475B (en) Video transmission path tracking and device
US20050044045A1 (en) Access control for digital content
US20060107325A1 (en) Method for creating and processing data streams that contain encrypted and decrypted data
KR20090088432A (en) Method and system for a distribution of audiovisual data protected by transactional marking
CN101897182B (en) Method and system for the secure distribution of audiovisual data by transactional marking
CN114205587A (en) Image display method, device, system and equipment
CN117793463A (en) Video sensitive data protection method, device, equipment and medium
GB2404488A (en) Access control data for linear storage medium
JP2003078515A (en) Contents distributing system, decoding device, encrypting device, decoding program, and encrypting program
JP5350021B2 (en) File generation device, file reproduction device, and computer program
CN113014956B (en) Video playing method and device
CN103828385A (en) Media content rating management with pattern matching
CN112434327A (en) Information protection method and device and electronic equipment
CN115225935B (en) Method and device for cross-encrypting bytes of video stream and audio stream
CN111372023B (en) Code stream encryption and decryption method and device
CN117528149A (en) Key updating method, code stream encryption method, code stream decryption method and related devices

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