[go: up one dir, main page]

CN110392261B - Video scrambling and descrambling method and system - Google Patents

Video scrambling and descrambling method and system Download PDF

Info

Publication number
CN110392261B
CN110392261B CN201810364788.2A CN201810364788A CN110392261B CN 110392261 B CN110392261 B CN 110392261B CN 201810364788 A CN201810364788 A CN 201810364788A CN 110392261 B CN110392261 B CN 110392261B
Authority
CN
China
Prior art keywords
video
scrambling
code stream
image
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810364788.2A
Other languages
Chinese (zh)
Other versions
CN110392261A (en
Inventor
吴参毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201810364788.2A priority Critical patent/CN110392261B/en
Publication of CN110392261A publication Critical patent/CN110392261A/en
Application granted granted Critical
Publication of CN110392261B publication Critical patent/CN110392261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption

Landscapes

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

Abstract

本发明提供了视频加解扰方法及系统,涉及视频加扰技术领域,包括:采用加扰控制参数对原始视频进行加扰控制,得到变换视频图像;将变换视频图像进行编码以及将加扰控制参数进行自定义,得到附属加扰参数单元的视频码流;将附属加扰参数单元的视频码流进行解码得到变换视频图像和加扰控制参数;根据加扰控制参数对变换视频图像进行解扰控制,得到重构视频。本发明可以提高加解扰的便捷性,并保证对加扰码流的解码和解扰性能。

Figure 201810364788

The present invention provides a video scrambling and descrambling method and system, and relates to the technical field of video scrambling, including: using scrambling control parameters to perform scrambling control on an original video to obtain a transformed video image; encoding the transformed video image and scrambling control The parameters are customized to obtain the video code stream of the attached scrambling parameter unit; the video code stream of the attached scrambling parameter unit is decoded to obtain the transformed video image and the scrambling control parameter; the transformed video image is descrambled according to the scrambling control parameter Control, get reconstructed video. The invention can improve the convenience of scrambling and descrambling, and ensure the decoding and descrambling performance of the scrambled code stream.

Figure 201810364788

Description

Video scrambling and descrambling method and system
Technical Field
The invention relates to the technical field of video scrambling, in particular to a video scrambling and descrambling method and system.
Background
At present, video monitoring systems have fewer safety considerations and frequently raise various safety problems. People install and build video monitoring systems, originally for safety, various safety problems such as video leakage and the like appear instead, so that people suspect the safety of the video monitoring systems.
For a video monitoring system, security has many levels of meanings, and one important security aspect is video security, which means that when a video stream is intercepted and a video file is copied, a clear video image cannot be viewed without obtaining a decryption key because the video file is encrypted.
At present, a scrambling mode is usually adopted to realize video encryption, reversible change is carried out on syntax elements in the process of H.264 or H.265 coding, and the standard compatibility of the syntax elements is kept at the same time, so that the purpose of video code stream scrambling is achieved. The prior scheme has the defects that the scrambling process of video content is built in a video encoder, and the descrambling process is built in a video decoder, so that the codec is not universal any more, and a special codec is required to achieve the scrambling and descrambling functions. Moreover, due to the complexity of decoding operations, and since video decoding generally uses a hardware accelerator (such as a graphics processor) for decoding, such transcoding can only be performed in the decoder memory using CPU instructions, which significantly reduces the decoding performance of the decoder.
Disclosure of Invention
In view of the above, the present invention provides a method and a system for scrambling and descrambling a video, so as to improve the convenience of scrambling and descrambling and ensure the decoding performance of a scrambled code stream.
In a first aspect, an embodiment of the present invention provides a video scrambling and descrambling method, where the method includes:
scrambling control is carried out on the original video by adopting scrambling control parameters to obtain a converted video image;
coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit;
decoding the video code stream of the auxiliary scrambling parameter unit to obtain the converted video image and the scrambling control parameter;
and performing descrambling control on the transformed video image according to the scrambling control parameter to obtain a reconstructed video.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where performing cluster scrambling processing on an original video by using a scrambling control parameter to obtain a transformed video image, where the implementing manner includes:
dividing an image of the original video into a plurality of areas according to an application scene, and dividing each area into three color channel plane areas according to a color space;
calculating to obtain a pixel average value in each color channel plane area by adopting a mean clustering method, wherein the scrambling control parameters comprise the area boundary of the area and the pixel average value;
shifting all pixel point values in each color channel plane area according to the pixel average value to obtain a pixel difference value plane area;
all pixel difference plane regions in all regions constitute the transformed video image.
With reference to the first possible implementation manner of the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where calculating an average value of pixels in each color channel plane region of each region by using a mean clustering method includes:
and acquiring all pixel point values in each color channel plane area of each area, and performing clustering calculation on all pixel point values by adopting the mean clustering method to obtain the pixel average value.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the encoding the transform video image and the customizing the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit includes:
coding the converted video image in a video coder to obtain a video code stream;
according to the form of video code stream standard of the video encoder, the scrambling control parameter is customized by a user to generate a scrambling parameter unit;
and attaching the scrambling parameter unit to the video code stream to obtain the video code stream of the attached scrambling parameter unit.
With reference to the third possible implementation manner of the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the video bitstream standard is h.264 or h.265.
In a second aspect, an embodiment of the present invention further provides a video scrambling/descrambling system, where the system includes:
the clustering video scrambling module is used for scrambling and controlling the original video by adopting scrambling control parameters to obtain a conversion video image;
the video coding module is used for coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit;
the video decoding module is used for decoding the video code stream of the auxiliary scrambling parameter unit to obtain the converted video image and the scrambling control parameter;
and the clustered video descrambling module is used for descrambling and controlling the transformed video image according to the scrambling control parameter to obtain a reconstructed video.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the clustered video scrambling module includes:
dividing an image of the original video into a plurality of areas according to an application scene, and dividing each area into three color channel plane areas according to a color space;
calculating to obtain a pixel average value in each color channel plane area by adopting a mean clustering method, wherein the scrambling control parameters comprise the area boundary of the area and the pixel average value;
shifting all pixel point values in each color channel plane area according to the pixel average value to obtain a pixel difference value plane area;
all pixel difference plane regions in all regions constitute the transformed video image.
With reference to the first possible implementation manner of the second aspect, an embodiment of the present invention provides a second possible implementation manner of the second aspect, where calculating an average value of pixels in each color channel plane region of each region by using a mean value clustering method includes:
and acquiring all pixel point values in each color channel plane area of each area, and performing clustering calculation on all pixel point values by adopting the mean clustering method to obtain the pixel average value.
With reference to the second aspect, an embodiment of the present invention provides a third possible implementation manner of the second aspect, where the video encoding module includes:
coding the converted video image in a video coder to obtain a video code stream;
according to the form of video code stream standard of the video encoder, the scrambling control parameter is customized by a user to generate a scrambling parameter unit;
and attaching the scrambling parameter unit to the video code stream to obtain the video code stream of the attached scrambling parameter unit.
With reference to the third possible implementation manner of the second aspect, an embodiment of the present invention provides a fourth possible implementation manner of the second aspect, where the video stream standard is h.264 or h.265.
The embodiment of the invention has the following beneficial effects:
the video scrambling and descrambling method and system provided by the invention comprise the following steps: scrambling control is carried out on the original video by adopting scrambling control parameters to obtain a converted video image; coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit; decoding the video code stream of the auxiliary scrambling parameter unit to obtain a converted video image and a scrambling control parameter; and performing descrambling control on the transformed video image according to the scrambling control parameter to obtain a reconstructed video. The invention can improve the convenience of scrambling and descrambling and ensure the decoding and descrambling performance of the scrambled code stream.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a video scrambling and descrambling method according to an embodiment of the present invention;
fig. 2 is a flowchart of a video scrambling and descrambling method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of clustering region division according to a second embodiment of the present invention;
fig. 4 is a flowchart of a video scrambling method according to a second embodiment of the present invention;
fig. 5 is a schematic view of a video descrambling operation according to the second embodiment of the present invention;
fig. 6 is a schematic diagram of a video scrambling and descrambling system provided by a third embodiment of the present invention.
Icon:
100-clustering video scrambling module; 200-a video encoding module; 300-a video decoding module; 400-clustering video descrambling module.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, a scrambling mode is often adopted to encrypt a video, reversible change is performed on syntax elements in the process of H.264 or H.265 coding, and standard compatibility of the syntax elements is maintained, so that the purpose of scrambling a video code stream is achieved. The prior scheme has the defects that the scrambling process of video content is built in a video encoder, and the descrambling process is built in a video decoder, so that the codec is not universal any more, and a special codec is required to achieve the scrambling and descrambling functions. Moreover, due to the complexity of decoding operations, and since video decoding generally uses a hardware accelerator (such as a graphics processor) for decoding, such transcoding can only be performed in the decoder memory using CPU instructions, which significantly reduces the decoding performance of the decoder.
Based on this, the video scrambling and descrambling method and system provided by the embodiment of the invention can improve the convenience of scrambling and descrambling and ensure the decoding performance of the scrambled code stream.
For the convenience of understanding the present embodiment, a detailed description will be first given of a video scrambling/descrambling method disclosed in the present embodiment.
The first embodiment is as follows:
fig. 1 is a schematic diagram of a video scrambling and descrambling method according to an embodiment of the present invention.
In this embodiment, a preprocessing step is added before the original video coding, the video coding is performed on the preprocessed converted video image, and meanwhile, a user-defined scrambling parameter Unit, such as h.265nalu (Network Abstract Layer Unit) or h.264nalu, is formed by using the preprocessed control parameters in a form that meets the video code stream standard, and the scrambling parameter Unit is attached to the video code stream. The code stream formed in the way can be decoded by a decoder compatible with H.264 or H.265 of a third party, and the third party decoder cannot decode due to the term user-defined by the additional scrambling parameter unit, only can obtain a converted video image, and cannot perform further decoding post-processing on the converted video image, so that the purpose of video scrambling under the unauthorized condition is achieved.
Referring to fig. 1, the encoding-side flow is as follows: a clustering video scrambling module is added before an H.264 or H.265 video encoder, and a transformed video image is obtained after the original video is subjected to clustering scrambling processing. Converting the video image and inputting the video image into a standard H.264 or H.265 encoder for encoding to obtain a code stream; and generating a user-defined scrambling parameter unit according to the scrambling control parameter required by the clustering video scrambling module and the requirement of H.264 or H.265, wherein the user-defined scrambling parameter unit is attached to the H.264 or H.265 code stream.
The decode side flow is as follows: decoding the code stream compatible with the standard in an H.264 or H.265 video decoder to obtain a converted video image, and simultaneously decoding and analyzing the additional scrambling parameter unit to obtain a scrambling control parameter; the converted video image and the scrambling control parameter are simultaneously input to a clustering video descrambling module, and reversible scrambling processing operation (namely descrambling processing operation) is carried out on the converted video image to obtain a reconstructed video. The reconstructed video is identical to the original video in image detail clarity.
By analyzing the above-mentioned principle of the encoding side and the decoding side, the video scrambling and descrambling method can be obtained, which includes the following contents, referring to fig. 2:
step S110, scrambling control is carried out on the original video by adopting scrambling control parameters to obtain a converted video image;
step S120, coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit;
the method specifically comprises the following steps: coding the converted video image in a video coder to obtain a video code stream; according to the form of video code stream standard conforming to the video encoder, the scrambling control parameter is customized by a user to generate a scrambling parameter unit; and attaching the scrambling parameter unit to the video code stream to obtain the video code stream of the attached scrambling parameter unit. Here, the video stream standard may be h.264 or h.265.
Step S130, decoding the video code stream of the auxiliary scrambling parameter unit to obtain a converted video image and a scrambling control parameter;
and step S140, descrambling control is carried out on the transformed video image according to the scrambling control parameter to obtain a reconstructed video.
Example two:
fig. 3 is a schematic diagram of clustering region partitioning according to a second embodiment of the present invention.
The video image is generally divided into a moving foreground and a stationary background as shown in fig. 3-a, while for the surveillance video image, the scene is fixed, but the surveillance scene is divided into a Region Of Interest (ROI) and a non-ROI Region as shown in fig. 3-B.
For both fig. 3-a and 3-B, there is an equal division into area 1 and area 2. According to different types of actual scenes, the area 1 may have multiple parts, which can be sequentially represented as an area 1-1, an area 1-2, an area 1-3 and the like, and the area 2 can be divided into an area 2-1, an area 2-2 and the like; for region X-Y, the letter "X" indicates the region type and the letter "Y" indicates the region number. For practical scenarios other than that shown in fig. 3, the number of region types is typically at least 2, and the number of regions of each type is typically at least one.
The original video to be coded has a color space of RGB (Red, Green, Bblue, Red, Green, blue), YUV (Brightness, chroma), or ICTCP(International Color Consortium, International Color Association). For the RGB color space, there are R color channel, G color channel, B color channel, respectively, that is, there are three color planes correspondingly: r color plane, G color plane, B color plane. For the YUV color space, there are a Y color channel, a U color channel, and a V color channel, i.e. there are three color planes correspondingly: y color plane, U color plane, V color plane. To ICTCPColor space, with I color channel, CTColor channel, CPColor channels, i.e. there are three color planes for each: i color plane, CTColor plane, CPA color plane.
For the region classification of the type of fig. 3-B, a total of K regions are assumed. And obtaining the average value of the pixel values of all the pixel points in each type of region in each color plane by using a mean value clustering method. And (3) using a mean clustering algorithm to obtain a mean value of all pixel values in each color plane of each region of the whole image. K mean values are obtained for each color plane, and K × 3 pixel mean values are obtained for all color planes. For the whole image, similar to performing the K-Means local clustering algorithm, where K denotes K regions. The whole flow is shown in fig. 4, and is divided into 8 steps:
step S210, dividing the image of the original video into K areas according to the application scene; i.e. dividing the image into K regions, each region denoted R, by foreground, background or ROI region, non-ROI regioniI is 0,1, …, K-1. According to the color space, each region RiDivided into three color channel plane regions Rij,j=0,1,2。
Step S220, judging whether the current region is the Kth region; and in the case of no, performing step S230; and, in case of yes, indicating that the repetition process of the entire image entire area has been completed, step S260 may be performed.
Step S230, determining whether the color channel is a third color channel plane area; and in the case of no, performs step S240; and, in the case of yes, the repetition process indicating the area of all color channel planes of the area is completed, and the calculation may be performed for the next area, i.e., step S220 is repeatedly performed.
Step S240, calculating by adopting a mean value clustering method to obtain a jth color channel plane region R of an ith regionijInner pixel mean value MijObtaining the planar area R of each color channelijInner pixel mean value Mij. Wherein the scrambling control parameters mainly include the region boundary of the region in step S210 and the pixel average value M of the stepij. First, each color channel plane region R of each region is acquiredijAll pixel point values P withinij_xyUsing mean value clustering method to calculate all pixel point values Pij_xyPerforming clustering calculation to obtain pixel average value Mij. Here, (x, y) is the coordinates of the pixel points in the area.
Step S250, in the jth color channel plane region R of the ith regionijIn accordance with the pixel average value MijFor all pixel point values Pij_xyShifting to obtain a pixel difference value plane area delta PijI.e. all pixel point values Pij_xyMinus its corresponding mean value Mij,ΔPij=Pij_xy-Mij
Step S260, obtainingTo the plane area delta P consisting of all pixel differences in the K areasijThe constituent transformed video images Δ Pic. In particular, three color planes Δ P per regioniTogether forming a transformed image region Δ RiAll K regions constitute a complete transformed video image Δ Pic. Although the color space of the Δ Pic is the same as that of the original image, due to the shift of the pixel value, the sharp details in the original video image cannot be seen by using the conventional image viewing software (for example, the transformed image in RGB color space is coded in the BMP format, and the picture content is viewed by using the picture viewer carried by the windows operating system), that is, the transformed video image obtained by such operation achieves the purpose of video scrambling.
Step S270, encoding the converted video image in a video encoder to obtain a video code stream;
step S280, the scrambling control parameter is customized by a user, a scrambling parameter unit is generated, and the scrambling parameter unit is attached to the video code stream.
The complete transformed video image delta Pic is used as input and is input to an H.264 or H.265 encoder for encoding, the generated H.264 or H.265 code stream is decoded by using a standard H.264 or H.265 decoder, the obtained reconstructed image is still scrambled, and the observed content color and detail are still different from the original image. Therefore, in order to restore the color and detail of the transformed video image to be the same as the original video image, it is necessary to attach control parameters in the form of a user-defined scrambling parameter unit compatible with the standard h.264 or h.265 to the h.264 or h.265 video code stream so as to be able to perform a descrambling operation on the transformed video image which is decoded and output. The scrambling control parameters mainly comprise region boundaries of K regions and pixel average values of color planes of each region, and the region boundaries are straight lines or dividing lines of curves.
The schemes provided by the embodiments are used for scrambling control of the video images in the monitoring system, the scrambling module is designed to consider the actual use scene of the video monitoring to divide the region types, so that the scrambling module is separated from the descrambling module, the video code stream can be decoded by a third-party decoder, and meanwhile, the video descrambling is presented as a post-processing module after the video images are decoded, so that the purpose of more convenient scrambling and descrambling is achieved.
The descrambling operation shown in fig. 5 is performed after the decoding of h.264/h.265, and belongs to the image processing link. The image processing stage in a typical decoder is prior to image rendering, and this step can be implemented using a hardware acceleration engine (such as a GPU). Meanwhile, the decoded image can be descrambled by directly using a hardware acceleration engine in a video memory. The processing flow remarkably ensures the performance of decoding and descrambling the scrambled code stream.
Example three:
fig. 6 is a schematic diagram of a video scrambling and descrambling system provided by a third embodiment of the present invention.
The video scrambling and descrambling system provided by the embodiment is used for realizing the video scrambling and descrambling method in the embodiment. Referring to fig. 6, the video scrambling/descrambling system includes the following modules:
the clustered video scrambling module 100 is configured to perform scrambling control on an original video by using a scrambling control parameter to obtain a transformed video image;
the video coding module 200 is used for coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit;
the video decoding module 300 is configured to decode the video code stream of the attached scrambling parameter unit to obtain a converted video image and a scrambling control parameter;
and the clustered video descrambling module 400 is used for performing descrambling control on the transformed video image according to the scrambling control parameter to obtain a reconstructed video.
Further, the clustered video scrambling module 100 includes:
dividing an image of an original video into a plurality of areas according to an application scene, and dividing each area into three color channel plane areas according to a color space;
calculating to obtain the pixel average value in each color channel plane area by adopting a mean clustering method, wherein the scrambling control parameters comprise the area boundary and the pixel average value of the area;
shifting all pixel point values in each color channel plane area according to the pixel average value to obtain a pixel difference value plane area;
all pixel difference plane regions in all regions constitute a transformed video image.
Further, calculating the average value of pixels in each color channel plane area of each area by using a mean clustering method, including:
and acquiring all pixel point values in each color channel plane area of each area, and performing clustering calculation on all pixel point values by adopting a mean clustering method to obtain a pixel average value.
Further, the video encoding module 200 includes:
coding the converted video image in a video coder to obtain a video code stream;
according to the form of video code stream standard conforming to the video encoder, the scrambling control parameter is customized by a user to generate a scrambling parameter unit;
and attaching the scrambling parameter unit to the video code stream to obtain the video code stream of the attached scrambling parameter unit.
Here, the video stream standard is h.264 or h.265.
The embodiment of the invention has the following beneficial effects:
the video scrambling and descrambling method and system provided by the invention comprise the following steps: scrambling control is carried out on the original video by adopting scrambling control parameters to obtain a converted video image; coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit; decoding the video code stream of the auxiliary scrambling parameter unit to obtain a converted video image and a scrambling control parameter; and performing descrambling control on the transformed video image according to the scrambling control parameter to obtain a reconstructed video. The invention can improve the convenience of scrambling and descrambling and ensure the decoding and descrambling performance of the scrambled code stream.
The embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that can be run on the processor, and the processor implements the steps of the video scrambling and descrambling method provided in the above embodiment when executing the computer program.
The embodiment of the invention also provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the video scrambling and descrambling method of the embodiment are executed.
The computer program product for performing a video scrambling and descrambling method provided in the embodiments of the present invention includes a computer-readable storage medium storing a nonvolatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for scrambling and descrambling video, comprising:
scrambling control is carried out on the original video by adopting scrambling control parameters to obtain a converted video image;
coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an auxiliary scrambling parameter unit, wherein the video code stream cannot be decoded by a third-party decoder;
decoding the video code stream of the auxiliary scrambling parameter unit to obtain the converted video image and the scrambling control parameter;
descrambling control is carried out on the transformed video image according to the scrambling control parameter to obtain a reconstructed video;
the method for clustering and scrambling the original video by adopting the scrambling control parameters to obtain a transformed video image comprises the following steps:
dividing the image of the original video into a plurality of regions according to a foreground, a background or an ROI region and a non-ROI region, and dividing each region into three color channel plane regions according to a color space;
calculating to obtain a pixel average value in each color channel plane area by adopting a mean clustering method, wherein the scrambling control parameters comprise the area boundary of the area and the pixel average value;
shifting all pixel point values in each color channel plane area according to the pixel average value to obtain a pixel difference value plane area;
all pixel difference plane regions in all regions constitute the transformed video image.
2. The method of claim 1, wherein computing the average of pixels in each color channel planar region of each region using mean clustering comprises:
and acquiring all pixel point values in each color channel plane area of each area, and performing clustering calculation on all pixel point values by adopting the mean clustering method to obtain the pixel average value.
3. The method of claim 1, wherein encoding the transformed video image and customizing the scrambling control parameter to obtain a video stream of an attached scrambling parameter unit comprises:
coding the converted video image in a video coder to obtain a video code stream;
according to the form of video code stream standard of the video encoder, the scrambling control parameter is customized by a user to generate a scrambling parameter unit;
and attaching the scrambling parameter unit to the video code stream to obtain the video code stream of the attached scrambling parameter unit.
4. The method of claim 3, wherein the video bitstream standard is H.264 or H.265.
5. A video scrambling and descrambling system, comprising:
the clustering video scrambling module is used for scrambling and controlling the original video by adopting scrambling control parameters to obtain a conversion video image;
the video coding module is used for coding the converted video image and self-defining the scrambling control parameter to obtain a video code stream of an attached scrambling parameter unit, and the video code stream cannot be decoded by a third-party decoder;
the video decoding module is used for decoding the video code stream of the auxiliary scrambling parameter unit to obtain the converted video image and the scrambling control parameter;
the cluster video descrambling module is used for descrambling and controlling the transformed video image according to the scrambling control parameter to obtain a reconstructed video;
the clustering video scrambling module is used for:
dividing the image of the original video into a plurality of regions according to a foreground, a background or an ROI region and a non-ROI region, and dividing each region into three color channel plane regions according to a color space;
calculating to obtain a pixel average value in each color channel plane area by adopting a mean clustering method, wherein the scrambling control parameters comprise the area boundary of the area and the pixel average value;
shifting all pixel point values in each color channel plane area according to the pixel average value to obtain a pixel difference value plane area;
all pixel difference plane regions in all regions constitute the transformed video image.
6. The system of claim 5, wherein the clustered video scrambling module is further configured to obtain all pixel point values in each color channel plane area of each area, and perform clustering calculation on all pixel point values by using the mean clustering method to obtain the pixel mean value.
7. The system of claim 6, wherein the video encoding module is configured to:
coding the converted video image in a video coder to obtain a video code stream;
according to the form of video code stream standard of the video encoder, the scrambling control parameter is customized by a user to generate a scrambling parameter unit;
and attaching the scrambling parameter unit to the video code stream to obtain the video code stream of the attached scrambling parameter unit.
8. The system of claim 7, wherein the video bitstream standard is h.264 or h.265.
CN201810364788.2A 2018-04-20 2018-04-20 Video scrambling and descrambling method and system Active CN110392261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810364788.2A CN110392261B (en) 2018-04-20 2018-04-20 Video scrambling and descrambling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810364788.2A CN110392261B (en) 2018-04-20 2018-04-20 Video scrambling and descrambling method and system

Publications (2)

Publication Number Publication Date
CN110392261A CN110392261A (en) 2019-10-29
CN110392261B true CN110392261B (en) 2022-02-01

Family

ID=68284434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810364788.2A Active CN110392261B (en) 2018-04-20 2018-04-20 Video scrambling and descrambling method and system

Country Status (1)

Country Link
CN (1) CN110392261B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1219325A (en) * 1996-05-29 1999-06-09 麦克罗维西恩公司 Method and apparatus for compression compatible video scrambling
CN1254150A (en) * 1998-11-13 2000-05-24 国际商业机器公司 Method for controlling digital data and its device
CN101087402A (en) * 2007-03-12 2007-12-12 深圳清华大学研究院 Digital TV encryption and authorization system and method based on IP stream
CN101317453A (en) * 2005-11-30 2008-12-03 韩国电子通信研究院 Conditional access device and method for providing terrestrial digital multimedia broadcasting service
CN104769936A (en) * 2013-03-28 2015-07-08 爱迪德技术有限公司 processing digital content

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4083302B2 (en) * 1998-08-12 2008-04-30 株式会社東芝 Video scrambling / descrambling device
CN106341664B (en) * 2016-09-29 2019-12-13 浙江宇视科技有限公司 A data processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1219325A (en) * 1996-05-29 1999-06-09 麦克罗维西恩公司 Method and apparatus for compression compatible video scrambling
CN1254150A (en) * 1998-11-13 2000-05-24 国际商业机器公司 Method for controlling digital data and its device
CN101317453A (en) * 2005-11-30 2008-12-03 韩国电子通信研究院 Conditional access device and method for providing terrestrial digital multimedia broadcasting service
CN101087402A (en) * 2007-03-12 2007-12-12 深圳清华大学研究院 Digital TV encryption and authorization system and method based on IP stream
CN104769936A (en) * 2013-03-28 2015-07-08 爱迪德技术有限公司 processing digital content

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A scalable frame scrambling algorithm for video encryption;Jitendra Rajpurohit等;《 2013 IEEE Conference on Information & Communication Technologies》;20130715;全文 *
一种基于DCT域MPEG2的透明加扰算法;王慈等;《上海交通大学学报》;20040530;全文 *

Also Published As

Publication number Publication date
CN110392261A (en) 2019-10-29

Similar Documents

Publication Publication Date Title
AU2020201708B2 (en) Techniques for encoding, decoding and representing high dynamic range images
EP3185558A1 (en) Method, apparatus and system for determining a luma value
US12190451B2 (en) Processing a point cloud
JP2018137730A (en) Encoding privacy masked images
US11265528B2 (en) Methods and systems for color smoothing for point cloud compression
JP7704531B2 (en) Point Cloud Processing
Minemura et al. A novel sketch attack for H. 264/AVC format-compliant encrypted video
Xing et al. A multi-embedding domain video steganography algorithm based on TU partitioning and intra prediction mode
CN110392261B (en) Video scrambling and descrambling method and system
Said Compression of compound images and video for enabling rich media in embedded systems
CN117011114A (en) Watermark embedding method and device for virtual desktop, electronic equipment and storage medium
US20230377204A1 (en) A method and an apparatus for reconstructing an occupancy map of a point cloud frame
US20250184491A1 (en) Motion-based hybrid chroma subsampling
EP3713241A1 (en) Processing a point cloud
US12192519B2 (en) Non-binary occupancy map for video based point cloud coding
US11683523B2 (en) Group of pictures based patch packing for video based point cloud coding
US11601665B2 (en) Embedding frame masks in a video stream
US20230040484A1 (en) Fast patch generation for video based point cloud coding
JP3589832B2 (en) Information multiplexing method and information extraction method
JP2006074336A (en) Coder, decoder, coding method, decoding method, and program for them
ER et al. Improved Video Steganography Using Inter Pixel Value Coding
HK40009290B (en) Methods for encoding and decoding high dynamic range images
HK40009915A (en) Techniques for encoding, decoding and representing high dynamic range images
HK40009290A (en) Methods for encoding and decoding high dynamic range images
HK40009915B (en) Techniques for encoding, decoding and representing high dynamic range images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant