CN115802049B - Video data coding and decoding method and device and video data transmission system - Google Patents

Video data coding and decoding method and device and video data transmission system Download PDF

Info

Publication number
CN115802049B
CN115802049B CN202310084535.0A CN202310084535A CN115802049B CN 115802049 B CN115802049 B CN 115802049B CN 202310084535 A CN202310084535 A CN 202310084535A CN 115802049 B CN115802049 B CN 115802049B
Authority
CN
China
Prior art keywords
unit
encrypted
nalu
video
coding
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
CN202310084535.0A
Other languages
Chinese (zh)
Other versions
CN115802049A (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.)
Shenliu Micro Intelligent Technology Shenzhen Co ltd
Original Assignee
Shenliu Micro Intelligent Technology Shenzhen 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 Shenliu Micro Intelligent Technology Shenzhen Co ltd filed Critical Shenliu Micro Intelligent Technology Shenzhen Co ltd
Priority to CN202310084535.0A priority Critical patent/CN115802049B/en
Publication of CN115802049A publication Critical patent/CN115802049A/en
Application granted granted Critical
Publication of CN115802049B publication Critical patent/CN115802049B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application provides a video data coding and decoding method, a video data coding and decoding device and a video data transmission system, wherein the video data coding method comprises the following steps: acquiring an original video to be processed; coding the original video based on the SVAC standard to obtain an SVAC code stream; analyzing an original byte sequence load of an NALU unit in an SVAC code stream to obtain coding block data corresponding to the NALU unit; and encrypting at least one of the coding head information and the coding data information in the coding block data to obtain an encrypted SVAC code stream corresponding to the original video. According to the method and the device, the original byte sequence load of the NALU unit in the SVAC code stream is analyzed to obtain the coded block data related to the video data content, so that the header information or the data information of the coded block can be conveniently encrypted according to actual requirements, and the existing requirement for accurately encrypting the important data part in the video information is met.

Description

Video data coding and decoding method and device and video data transmission system
Technical Field
The present application relates to the field of video processing technologies, and in particular, to a video data encoding and decoding method, apparatus, and video data transmission system.
Background
With the rapid development of network technology, the ratio of the video data volume to the whole network data volume is larger and larger nowadays, and video information covers many important places, involving a lot of security privacy problems. In contrast, in the field of video surveillance, the prior art proposes a digital video and Audio Coding and decoding technology standard, that is, a SVAC (singular video and Audio Coding) standard, which is specially applied to the field of security video surveillance technology.
However, although the SVAC standard supports secure encryption processing of video data, it cannot meet the existing requirement for precise encryption of important data portions of video information, thereby affecting the encryption effect of video data.
Disclosure of Invention
Therefore, it is necessary to provide a video data encoding and decoding method, device and video data transmission system for solving the problem that the prior art cannot meet the requirement of precise encryption of the important data part of the video information.
In a first aspect, the present application provides a video data encoding method, including:
acquiring an original video to be processed;
coding the original video based on an SVAC standard to obtain an SVAC code stream; the SVAC code stream at least comprises a plurality of NALU units;
analyzing the original byte sequence load in the NALU unit to obtain coding block data corresponding to the NALU unit; the coded block data at least comprises coded header information and coded data information;
and encrypting at least one of the coding header information and the coding data information to obtain an encrypted SVAC code stream corresponding to the original video.
As a possible embodiment of the present application, the parsing the original byte sequence payload in the NALU unit to obtain encoded block data corresponding to the NALU unit includes:
determining a target NALU unit related to the data content of the original video from the NALU units according to the unit structure type carried by the unit header in each NALU unit;
and analyzing the original byte sequence load in the target NALU unit to obtain coded block data.
As a possible embodiment of the present application, the encrypting at least one of the header information and the data information to obtain an encrypted SVAC code stream corresponding to the original video includes:
if the unit structure type corresponding to the NALU unit is a basic coding slice, encrypting coding data information in coding block data corresponding to the NALU unit to obtain a first encrypted NALU unit;
if the unit structure type corresponding to the NALU unit is an SVC enhanced coding slice, encrypting coding header information in coding block data corresponding to the NALU unit to obtain a second encrypted NALU unit;
and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit and the second encrypted NALU unit.
As a possible embodiment of the present application, the generating an encrypted SVAC bitstream corresponding to the original video based on the first encrypted NALU unit and the second encrypted NALU unit includes:
determining an extended NALU unit related to encryption parameters from the NALU units according to a unit structure type carried in a unit header in each NALU unit;
updating the security parameter set in the extended NALU unit according to the first encrypted NALU unit and the second encrypted NALU unit to obtain an updated extended NALU unit;
and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit, the second encrypted NALU unit and the updated extended NALU unit.
In a second aspect, the present application provides a video data decoding method, including:
acquiring a video code stream to be decoded; the video code stream is an encrypted SVAC code stream obtained by processing according to any one of the video data coding methods;
analyzing the original byte sequence load of the encrypted NALU unit in the video code stream to obtain an encrypted coding block;
decrypting the encrypted coding data information or the encrypted coding header information in the encrypted coding block to obtain a decrypted video code stream;
and decoding the decrypted video code stream based on the SVAC standard to obtain a monitoring video corresponding to the video code stream.
As a possible embodiment of the present application, before the step of parsing an original byte sequence payload of an encrypted NALU unit in the video stream to obtain an encrypted coding block, the method further includes:
and determining an encrypted NALU unit from the NALU unit in the video code stream according to the unit structure type carried by the unit head of each NALU unit in the video code stream.
As a possible embodiment of the present application, the decrypting the encrypted encoded data information or the encrypted encoding header information in the encrypted encoded block to obtain a decrypted video code stream includes:
acquiring the unit structure type of the encrypted NALU unit corresponding to each encrypted coding block;
if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is a basic coding piece, decrypting the encrypted coding data information in the encrypted coding block to obtain a first decrypted NALU unit;
if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is an SVC enhanced coding slice, decrypting the encrypted coding header information in the encrypted coding block to obtain a second decrypted NALU unit;
and generating a decrypted video code stream according to the first decrypted NALU unit and the second decrypted NALU unit.
In a third aspect, the present application further provides a video data encoding apparatus, including:
the first acquisition module is used for acquiring an original video to be processed;
the encoding module is used for encoding the original video based on the SVAC standard to obtain an SVAC code stream; the SVAC code stream at least comprises a plurality of NALU units;
the first analysis module is used for analyzing the original byte sequence load in the NALU unit to obtain coding block data corresponding to the NALU unit; the coded block data at least comprises coded header information and coded data information;
and the encryption module is used for encrypting at least one of the coding header information and the coding data information to obtain an encrypted SVAC code stream corresponding to the original video.
In a fourth aspect, the present application further provides a video data decoding apparatus, including:
the second acquisition module is used for acquiring a video code stream to be decoded; the video code stream is an encrypted SVAC code stream obtained by processing according to any one of the video data coding methods;
the second analysis module is used for analyzing the original byte sequence load of the encrypted NALU unit in the video code stream to obtain an encrypted coding block;
the decryption module is used for decrypting the encrypted coding data information or the encrypted coding header information in the encrypted coding block to obtain a decrypted video code stream;
and the decoding module is used for decoding the decrypted video code stream based on the SVAC standard to obtain the monitoring video corresponding to the video code stream.
In a fifth aspect, the present application further provides a video data transmission system, which includes a video encoding device and a video data decoding device;
the video coding device is used for processing an original monitoring video to be processed according to any one of the video data coding methods to generate an encrypted SVAC code stream after the original monitoring video to be processed is obtained, and transmitting the encrypted SVAC code stream to the video decoding device;
and the video decoding equipment is used for processing the encrypted SVAC code stream according to any one of the video data coding methods after receiving the encrypted SVAC code stream transmitted by the video coding equipment to generate an original monitoring video.
According to the video data coding and decoding method provided by the embodiment of the application, after the SVAC code stream obtained by coding the video based on the SVAC standard is obtained, the original byte sequence load in the NALU unit in the SVAC code stream is further analyzed to obtain the coded block data related to the video data content, so that at least one of the header information or the data information of the coded block can be conveniently encrypted according to the actual requirement in the follow-up process, the effect of encrypting at the data block level of the SVAC code stream is realized, the existing requirement of accurately encrypting the important data part in the video information is met, and the video encryption effect under the SVAC standard is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a bitstream obtained by processing a video based on the SVAC standard according to an embodiment of the present application;
fig. 2 is a flowchart illustrating steps of a video encoding method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a step of screening NALU units that need to be parsed based on unit structure types according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a step of encrypting an encoding block based on a unit structure type according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a step of updating a security parameter set in an SVAC code stream according to an embodiment of the present application;
fig. 6 is a flowchart illustrating steps of a video data decoding method according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a procedure of decrypting an encrypted encoded block based on a unit structure type according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus for encoding video data according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a video data decoding apparatus according to an embodiment of the present disclosure;
fig. 10 is a schematic diagram illustrating an interaction timing sequence of a video data transmission system according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a computer device that can be used as a video encoding device and a video decoding device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In the description of the present application, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In the description of the present application, the word "for example" is used to mean "serving as an example, instance, or illustration". Any embodiment described herein as "for example" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the invention. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known structures and processes are not shown in detail to avoid obscuring the description of the invention with unnecessary detail. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
To facilitate understanding of the video data encoding and decoding method, apparatus and video data transmission system provided in the embodiments of the present application, a description will be given to an implementation scenario of the video data encoding and decoding method.
In order to promote the development of video data transmission in the video monitoring field, the prior art proposes a digital video and Audio Coding and decoding technology standard, SVAC (singular video and Audio Coding) standard, which is specially applied to the technical field of security video monitoring. In particular, a code stream obtained by processing Video based on the SVAC standard is composed of NALUs (network abstraction Layer units) which are sequentially ordered, each NALU Unit is composed of a NALU header, i.e., a Unit header, and an RBSP (Raw Byte Sequence Payload), the RBSP in different NALU units carries different data information, one part of the NALU Unit is a VCL (Video Coding Layer) related to Video data content, such as an IDR (instant decoding Refresh) coded slice of an image, an SVC (Scalable Video Coding) enhanced slice of an IDR image, a basic coded slice of a non-IDR image, and the other part is a coded parameter set which is not related to Video data content, but is related to Video data content, such as a supplemental Video Coding parameter set, and the like. Specifically, fig. 1 described below shows a schematic structural diagram of a code stream obtained by processing a video based on the SVAC standard.
On the basis of the SVAC standard, although the SVAC2.0 standard supports the encryption operation on the bitstream, it only encrypts RBSP information of each NALU unit in the SVAC video bitstream, specifically, it encrypts RBSP information by using a Video Encryption Key (VEK), and other information such as an Encrypted Video Encryption Key (EVEK) formed by encrypting a cryptographic algorithm and a Video Encryption Key (VEK) by a video key encryption key (veke), and a video key encryption key (veke) version number is transmitted by a security parameter set. However, the above encryption process has a certain potential safety hazard, and cannot meet the requirement of safety precaution video monitoring, and it is difficult to accurately encrypt the most important data portion of video information, thereby affecting the encryption effect of video code streams.
In order to solve the above-mentioned problems, that is, to meet the requirement of the prior art for accurately encrypting the most important data portion of video information and improve the encryption effect of a video stream under the SVAC standard, an embodiment of the present application provides a video data encoding and decoding method, an apparatus, and a video data transmission system, wherein the video data encoding method and the video data decoding method are respectively installed in a video data encoding apparatus and a video data decoding apparatus in the form of computer programs, and the video data encoding apparatus and the video data decoding apparatus are respectively installed in a video data encoding (terminal) device and a video data decoding (terminal) device in the form of processors, and the video data encoding apparatus and the video data decoding apparatus jointly form the video data transmission system, after the video data encoding apparatus in the video data transmission system acquires monitored video data to be processed, the video data encoding apparatus executes the computer programs corresponding to the video data encoding method through the video data encoding apparatus to generate an SVAC added cipher stream, and after the SVAC encrypted code stream is transmitted to the video data decoding apparatus based on a network communication protocol, the video data decoding apparatus can execute the computer programs corresponding to perform the SVAC encrypted video data encoding method, thereby reducing the monitored video data into the original monitored video data. Therefore, even if the SVAC coded stream is maliciously intercepted by a person in the transmission process, the encrypted coded stream cannot be decoded and played, and the safety and privacy of video data are guaranteed.
Specifically, as shown in fig. 2, fig. 2 is a schematic flowchart illustrating a process of a video encoding method according to an embodiment of the present application, and specifically includes steps S201 to S204:
s201, obtaining an original video to be processed.
In view of that the video data encoding method provided by the embodiment of the present application is mainly used in the field of video monitoring, the original video to be processed obtained here generally refers to a surveillance video obtained by using a surveillance device, such as a camera, and compared with other types of videos, the surveillance video generally has the requirements of high transmission security requirement, small transmission code stream, and the like.
And S202, coding the original video based on the SVAC standard to obtain an SVAC code stream.
In the embodiment of the present application, the encoding processing of the original video based on the SVAC standard generally means that the original video is input into an encoder (or a chip) having the SVAC standard for processing, so that the encoder (or the chip) can automatically complete the encoding processing of the original video based on the set SVAC standard to form an SVAC code stream. Wherein, the SVAC code stream is composed of a plurality of NALU units which are arranged in series.
S203, analyzing the original byte sequence load in the NALU unit to obtain coding block data corresponding to the NALU unit; the encoded block data at least includes encoded header information and encoded data information.
In order to meet the requirement of accurate encryption of more important data parts in a video, the video encoding method provided in the embodiment of the present application may further parse an original byte sequence payload (RBSP) part of a NALU unit in an SVAC code stream obtained by encoding an original video according to an SVAC standard, and extract encoded block data obtained by encoding the video, where the encoded block data mainly includes two parts, one part is encoding header information related to encoding, and the other part is encoded data information related to video data.
Further, based on the structure diagram of the code stream obtained by processing the video based on the SVAC standard, it can be seen that the content of the original byte sequence payload carried in different NALU units is different, that is, the unit structure types of different NALU units are different, and therefore, in order to further improve the encryption effect on the video data, as another optional embodiment of the present application, a target NALU unit related to the data content of the original video, that is, the content related to the VCL portion, may be screened from all NALU units based on the unit structure types of the NALU units, and is parsed based on the NALU unit portion. Specifically, as shown in fig. 3, fig. 3 is a schematic flow chart of the step of screening NALU units that need to be analyzed based on unit structure types according to the embodiment of the present application, and specifically includes steps S301 to S302:
s301, according to the unit structure type carried by the unit head in each NALU unit, determining the target NALU unit related to the data content of the original video from the NALU units.
In the embodiment of the present application, considering that the NALUHeader, i.e. the unit header part, in the NALU unit required in the SVAC standard is recorded in a unit structure type (nal _ unit _ type) manner, the data content described in the original byte sequence payload (RBSP) part of the NALU unit is recorded, for example, nal _ unit _ type 1 represents that the original byte sequence payload (RBSP) part of the NALU unit is a coded slice of a non-IDR picture, nal _ unit _ type 2 represents that the original byte sequence payload (RBSP) part of the NALU unit is a coded slice of an IDR picture, nal _ unit _ type 3 represents that the original byte sequence payload (RBSP) part of the NALU unit is an SVC enhanced coded slice of a non-IDR picture, a nal _ unit _ type of 6 indicates that the original byte sequence payload (RBSP) portion of the NALU unit is supplemental enhancement information, and a nal _ unit _ type of 9 indicates that the original byte sequence payload (RBSP) portion of the NALU unit is a security parameter set, so that the video data encoding apparatus can determine a target NALU unit related to the data content of the original video from the NALU unit, that is, a NALU unit with a unit structure type of 1,2,3,4, according to the value of the unit structure type carried by the unit header in each NALU unit, and the original byte sequence payload (RBSP) portions of these NALU units are VCL data related to the video data content.
S302, analyzing the original byte sequence load in the target NALU unit to obtain encoded block data.
In the embodiment of the application, after an original byte sequence load (RBSP) part is screened out as a target NALU unit of VCL data related to video data content, a plurality of coded block data related to the video data content can be obtained by analyzing the original byte sequence load in the target NALU unit, wherein different coded block data correspond to data information of different areas in a video frame.
According to the scheme provided by the embodiment of the application, after the target NALU units related to the data content of the original video are screened out by utilizing the unit structure type carried by the unit heads in the NALU units, part of data in the target NALU units can be encrypted specifically by analyzing the original byte sequence loads of the part of target NALU units, and compared with the analysis of the original byte sequence loads in all the NALU units, the encryption of the important video data content can be completed with smaller calculation power, and the video encryption effect is further improved.
S204, encrypting at least one of the coding header information and the coding data information to obtain an encrypted SVAC code stream corresponding to the original video.
In the embodiment of the present application, after the parsing of the original byte sequence payload is completed to obtain encoded block data corresponding to different areas in the video, at least one of the encoding header information or the encoded data information in the encoded block data is encrypted in a targeted manner based on the importance of the encoded block data. Thereby obtaining the encrypted SVAC code stream corresponding to the original video. For example, as a feasible implementation scheme, based on the encoded block data corresponding to the important video content, it may be considered to encrypt the encoded data information related to the video information to ensure the security of data transmission and avoid leakage of the main video content, while for the encoded block data corresponding to the non-important video content, it may be considered to encrypt the encoded header data related to the encoding parameter, so as to complete encryption of the data at a low computational cost.
Further, considering that the importance degree of data carried by different types of original byte sequence payloads is also different, as another possible implementation scheme of the present application, the encoded block data may also be encrypted based on the unit structure type corresponding to the NALU unit. Specifically, as shown in fig. 4, fig. 4 is a schematic flowchart of a step of encrypting an encoding block based on a unit structure type according to an embodiment of the present application, and specifically includes steps S401 to S403:
s401, if the unit structure type corresponding to the NALU unit is a basic coded slice, the coded data information in the coded block data corresponding to the NALU unit is encrypted to obtain a first encrypted NALU unit.
In the embodiment of the present application, a basic coded slice is a low-resolution image that can recover video data independently, that is, leakage of a basic coded slice may cause leakage of video data content, and therefore, for a NALU unit whose unit structure type is a basic coded slice, encoded data information in encoded block data obtained by parsing an RBSP portion in the NALU unit needs to be encrypted, so as to obtain a first encrypted NALU unit with better encryption.
S402, if the unit structure type corresponding to the NALU unit is SVC enhanced coding slice, encrypting the coding head information in the coding block data corresponding to the NALU unit to obtain a second encrypted NALU unit.
In the embodiment of the present application, an SVC enhancement coded slice is a coded slice that can be decoded together with a base coded slice to recover coded data of a high resolution picture of video data based on the base coded slice, and therefore, for a NALU unit whose unit structure type is the SVC enhancement coded slice, coded header data in coded block data obtained by parsing an RBSP portion in the NALU unit can be encrypted to obtain a second encrypted NALU unit.
And S403, generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit and the second encrypted NALU unit.
In this embodiment of the present application, after obtaining different encrypted NALU units by encrypting for different NALU units as described above, the encrypted NALU units are ordered based on the NALU unit arrangement order in the SVAC code stream, and then the encrypted SVAC code stream corresponding to the original video can be obtained.
In addition, it should be noted that, in addition to completing the encryption of the encoded data information or the header information in the encoded block data based on the unit structure type, in fact, the encoded data information or the header information in the encoded block data may also be selected to be encrypted based on other manners, for example, the SVAC standard also relates to the definition of a region of interest (ROI), so that if a certain encoded block data corresponds to video information in a region of interest, the encoded data information of the encoded block may be encrypted, whereas if a certain encoded block data corresponds to video information in a region of non-interest, the encoded header information of the encoded block may be encrypted, which is not described herein again in this embodiment.
Further, in the process of encrypting the encoding header information or the encoding data information, in a general case, the encryption algorithm may be an SM1 algorithm or an SM4 algorithm supported in the SVAC standard, and certainly, after the video data encoding device and the video data decoding device reach an agreement, it is also feasible to select another type of algorithm, where the encryption algorithms used for encrypting the encoding header information and encrypting the encoding data information may be the same or different, and are not described herein again in this embodiment of the present application.
On the basis of the foregoing, in order to facilitate the subsequent video data decoding apparatus to decrypt and decode the encrypted SVAC code stream, the video data encoding apparatus may further update the security parameter set in the NALU unit, specifically, as shown in fig. 5, fig. 5 is a schematic flowchart of a step of updating the security parameter set in the SVAC code stream according to an embodiment of the present application, and specifically includes steps S501 to 503:
s501, determining an extended NALU unit related to encryption parameters from the NALU units according to the unit structure type carried in the unit head in each NALU unit.
In the embodiment of the present application, as can be seen from the foregoing description, the content of the RBSP part in each NALU unit can be determined based on the unit structure type carried by the NALU header part in the NALU unit, and therefore, an extended NALU unit related to the encryption parameters, that is, a NALU unit whose RBSP part is a security parameter set, can be screened out based on the unit structure type, and specifically, a NALU unit whose unit structure type, that is, a NALU _ unit _ type value is 9 can be extracted by taking the SVAC standard provided in the foregoing as an example, and the RBSP part in the NALU unit is a security parameter set related to the encryption parameters.
S502, updating the security parameter set in the extended NALU unit according to the first encrypted NALU unit and the second encrypted NALU unit, to obtain an updated extended NALU unit.
In the general SVAC standard, the security parameter set may describe the encryption of RBSP by the value of an encryption flag, e.g., an encryption flag of 0 indicates that no encryption of RBSP parts in NALU unit is supported, and an encryption flag of 1 indicates that encryption of RBSP parts in NALU unit, i.e., picture coded slices, or sequence parameter sets, or picture parameter sets, or extended data units, is supported. In the embodiment of the present application, recording of encoding header information or encoding data information may be completed by additionally expanding an encryption _ flag value of a security parameter set, for example, two encryption _ flag values may be newly added, where one value encrypts header information of a coding block, and the other value encrypts data of the coding block, specifically, an encryption _ flag value of 2 represents that encryption of encoding header information of the coding block is supported, and an encryption _ flag value of 3 represents that encryption of encoding data information of the coding block is supported.
Of course, in addition to the encryption flag encryption _ flag, the security parameter set may also include other contents, such as the type of encryption algorithm, but it is considered that the embodiment of the present application does not limit the encoding header information of the encoding block or the encryption algorithm of the encoded data information, and therefore, the embodiment of the present application does not describe any further contents in the security parameter set here.
And S503, generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit, the second encrypted NALU unit and the updated extended NALU unit.
In the embodiment of the application, after the updating of the security parameters in the extended NALU unit is completed, the first encrypted NALU unit, the second encrypted NALU unit, and the updated extended NALU unit are arranged in sequence, and then the encrypted SVAC code stream corresponding to the original video can be obtained.
According to the embodiment of the application, the security parameter set in the NALU unit is updated, and after the subsequent video data decoding device acquires the SVAC and the password stream, the encryption part in the SVAC code stream can be correspondingly decrypted based on the value of the encryption flag bit encryption _ flag in the security parameter set, so that the data decryption efficiency is improved, and the video data transmission efficiency is improved.
According to the video data coding and decoding method provided by the embodiment of the application, after the SVAC code stream obtained by coding the video based on the SVAC standard is obtained, the original byte sequence load in the NALU unit in the SVAC code stream is further analyzed to obtain the coded block data related to the video data content, so that at least one of the header information or the data information of the coded block can be conveniently encrypted according to the actual requirement subsequently, the effect of encrypting at the data block level of the SVAC code stream is realized, the existing requirement of accurately encrypting the important data part in the video information is met, and the video encryption effect under the SVAC standard is improved.
On the basis of the above video data encoding method, an embodiment of the present application further provides a video data decoding method, as shown in fig. 6, fig. 6 is a schematic flow chart illustrating steps of the video data decoding method provided in the embodiment of the present application, and specifically includes steps S601 to S604:
s601, obtaining a video code stream to be decoded.
In the embodiment of the present application, the video code stream to be decoded refers to an encrypted SVAC code stream obtained by the video data encoding method shown in fig. 2, and compared with the code stream obtained by conventional encoding and encryption based on the SVAC standard, the video code stream obtained in the embodiment of the present application is obtained by encrypting an RBSP portion in an NALU unit, but encrypting an encoded block obtained by analyzing an RBSP, that is, the encrypted portion in the video code stream is an encoded block, and needs to be obtained by analyzing the RBSP in each NALU unit in the obtained video code stream.
S602, analyzing the original byte sequence load of the encrypted NALU unit in the video code stream to obtain an encrypted coding block.
In this embodiment of the present application, after obtaining the video code stream to be decoded, the video data decoding apparatus may first determine the encrypted NALU units that need to be decrypted, and analyze the RBSP portions in the encrypted NALU units, so as to obtain the encrypted coding blocks that need to be decrypted.
Specifically, as a possible embodiment of the present application, it is considered that the video data encoding apparatus may use NALU units related to the data content of the original video as target NALU units based on the unit structure type carried in the unit header in the NALU units to complete the encryption of these NALU units, and therefore, the video data decoding apparatus may also select encrypted NALU units related to the video data content from NALU units in the video code stream according to the unit structure type carried by the unit header of each NALU unit in the video code stream, for example, if NALU units whose unit structure types are coded slices of non-IDR pictures, coded slices of IDR pictures, SVC enhanced coded slices of non-IDR pictures, etc. are processed during the encryption process, in the embodiment of the present application, the NALU units whose unit structure types are coded slices of non-IDR pictures, coded slices of IDR pictures, SVC enhanced coded slices of non-IDR pictures, etc. are also used as encrypted coded units to perform the subsequent decryption process, and the embodiment of the present application is not repeated here.
S603, carrying out decryption processing on the encrypted coding data information or the encrypted coding header information in the encrypted coding block to obtain a decrypted video code stream.
Specifically, in consideration of the fact that in the encryption process, the encryption of the encoded block data refers to the encryption of the encoding header information or the encoded data information in the encoded block data, and therefore, the decryption of the encrypted encoded block needs to decrypt the encrypted encoding header information or the encrypted encoded data information therein, specifically, the used decryption algorithm needs to correspond to the encryption algorithm, which is not described herein again, and after the decryption of the encrypted encoding header information or the encrypted encoded data information in the encrypted encoded block is completed, the video data decoding device can obtain the decrypted video code stream.
Further, considering that the encryption of the coded header information or the coded data information in the coded block data in the encryption process may be performed based on the unit structure type corresponding to the NALU unit, as a possible embodiment of the present application, the decryption of the coded block data may also be performed based on the unit structure type of the encrypted NALU unit, specifically, as shown in fig. 7, fig. 7 is a schematic flow chart of the steps for decrypting the encrypted coded block based on the unit structure type provided in the embodiment of the present application, and specifically, the steps include steps S701 to S704:
s701, acquiring the unit structure type of the encrypted NALU unit corresponding to each encrypted coding block.
In the embodiment of the present application, an encrypted NALU unit corresponding to an encrypted coding block refers to a NALU unit obtained by analyzing RBSP, and the unit structure type of the NALU unit is usually stored in a NALU Header portion of the encrypted NALU unit in a numerical value manner of nal _ unit _ type.
S702, if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is a basic coding slice, decrypting the encrypted coding data information in the encrypted coding block to obtain a first decrypted NALU unit.
In the embodiment of the present application, in consideration that, in an encryption process, for a NALU unit whose unit structure type is a basic coded slice, a video data encoding apparatus encrypts a coded data information portion in coded block data obtained by parsing the NALU unit to avoid loss of video data due to leakage of the basic coded slice, if the unit structure type of the encrypted NALU unit corresponding to the encrypted coded block is the basic coded slice, it is necessary to decrypt the encrypted coded data information in the encrypted coded block by using a decryption algorithm corresponding to the encryption algorithm, so as to obtain a first decrypted NALU unit.
And S703, if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is an SVC enhanced coding slice, decrypting the encrypted coding header information in the encrypted coding block to obtain a second decrypted NALU unit.
In the embodiment of the present application, in consideration of the fact that, in the encryption process, for a NALU unit whose unit structure type is an SVC enhancement coded slice, a video data coding apparatus encrypts header information in coded block data obtained by parsing the NALU unit, and therefore, if the unit structure type of the encrypted NALU unit corresponding to the encrypted coded block is the SVC enhancement coded slice, the encrypted coded header information in the encrypted coded block needs to be decrypted by a decryption algorithm corresponding to the encryption algorithm, so as to obtain a second decrypted NALU unit.
S704, generating a decrypted video code stream according to the first decrypted NALU unit and the second decrypted NALU unit.
And sequencing the first decryption NALU unit and the second decryption NALU unit based on the sequence of each corresponding NALU unit in the encrypted SVAC code stream to generate a decrypted video code stream.
Of course, in addition to the aforementioned decryption of the encrypted coding blocks based on the unit structure type, in fact, in consideration that the encryption operation on the coding blocks can be completed based on other information in the encryption process, for example, the encryption operation on the coding blocks is completed based on the definition of ROI (region of interest) in the SVAC standard, at this time, the decryption operation on the encrypted coding blocks can also be determined correspondingly by the ROI region, for example, if a certain encrypted coding block corresponds to video information in the region of interest, the encrypted coding data information in the encrypted coding block can be decrypted to obtain a decrypted NALU unit, whereas if a certain encrypted coding block corresponds to video information in the region of non-interest, the encrypted coding header information in the encrypted coding block can be decrypted to obtain a decrypted NALU unit, which is not described herein again in this embodiment of the present application.
In addition, if the video data encoding apparatus correspondingly updates the security parameter set in the extended NALU unit during the encryption process, in order to improve the decryption efficiency at this time, the video data decoding apparatus may also complete decryption of the corresponding encrypted NALU unit through the security parameter information in the extended NALU unit in the video stream to be decoded, for example, if the encryption flag encryption _ flag in the security parameter information is 2, it indicates that decryption needs to be performed on the encryption encoding head information in the encrypted coding block obtained by parsing the RBSP in the encrypted NALU unit, and conversely, if the encryption flag encryption _ flag in the security parameter information is 3, it indicates that decryption needs to be performed on the encryption encoded data information in the encrypted coding block obtained by parsing the RBSP in the encrypted NALU unit, which is not described herein again in this embodiment of the present application.
S604, decoding the decrypted video code stream based on the SVAC standard to obtain a monitoring video corresponding to the video code stream.
In the embodiment of the application, after the decryption of the encrypted part in the video code stream is completed to obtain the decrypted video code stream, the video code stream is input into a decoder (or a chip) with an SVAC standard, and the decoder (or the chip) can complete the decoding processing of the video code stream based on the SVAC standard, so that the corresponding original monitoring video is generated.
Specifically, in order to facilitate understanding of the video data encoding and decoding method provided in the embodiment of the present application, in addition to the video data encoding and decoding method, an embodiment of the present application further provides a video data encoding device and a video data decoding device, specifically, as shown in fig. 8, fig. 8 is a schematic structural diagram corresponding to the video data encoding device provided in the embodiment of the present application, and specifically, the video data encoding device 800 includes:
a first obtaining module 810, configured to obtain an original video to be processed;
the encoding module 820 is used for encoding the original video based on the SVAC standard to obtain an SVAC code stream; the SVAC code stream at least comprises a plurality of NALU units;
a first parsing module 830, configured to parse an original byte sequence load in the NALU unit to obtain encoded block data corresponding to the NALU unit; the coded block data at least comprises coded header information and coded data information;
an encrypting module 840, configured to encrypt at least one of the encoding header information and the encoding data information to obtain an encrypted SVAC code stream corresponding to the original video.
As a possible embodiment of the present application, the first parsing module is further configured to determine, from the NALU units, a target NALU unit related to the data content of the original video according to a unit structure type carried by a unit header in each NALU unit; and analyzing the original byte sequence load in the target NALU unit to obtain encoded block data.
As a possible embodiment of the present application, the encryption module is further configured to encrypt encoded data information in encoded block data corresponding to the NALU unit to obtain a first encrypted NALU unit if the unit structure type corresponding to the NALU unit is a basic coded slice; if the unit structure type corresponding to the NALU unit is an SVC enhanced coding slice, encrypting coding header information in coding block data corresponding to the NALU unit to obtain a second encrypted NALU unit; and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit and the second encrypted NALU unit.
As a possible embodiment of the present application, the encryption module is further configured to determine an extended NALU unit related to encryption parameters from the NALU units according to a unit structure type carried in a unit header in each NALU unit; updating the security parameter set in the extended NALU unit according to the first encrypted NALU unit and the second encrypted NALU unit to obtain an updated extended NALU unit; and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit, the second encrypted NALU unit and the updated extended NALU unit.
As shown in fig. 9, fig. 9 is a schematic structural diagram corresponding to a video data decoding apparatus according to an embodiment of the present application, specifically, the video data decoding apparatus 900 includes:
a second obtaining module 910, configured to obtain a video code stream to be decoded;
a second parsing module 920, configured to parse an original byte sequence load of an encrypted NALU unit in the video stream to obtain an encrypted coding block;
a decryption module 930, configured to decrypt the encrypted encoded data information or the encrypted encoding header information in the encrypted encoded block to obtain a decrypted video code stream;
and a decoding module 940, configured to decode the decrypted video code stream based on the SVAC standard to obtain a monitoring video corresponding to the video code stream.
As a possible embodiment of the present application, before the second parsing module is configured to parse an original byte sequence load of an encrypted NALU unit in the video stream to obtain an encrypted coding block, the second parsing module is further configured to determine an encrypted NALU unit from a NALU unit in the video stream according to a unit structure type carried by a unit header of each NALU unit in the video stream.
As a possible embodiment of the present application, the decryption module is further configured to obtain a unit structure type of an encrypted NALU unit corresponding to each encrypted coding block;
if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is a basic coding piece, decrypting the encrypted coding data information in the encrypted coding block to obtain a first decrypted NALU unit; if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is an SVC enhanced coding slice, decrypting the encrypted coding head information in the encrypted coding block to obtain a second decrypted NALU unit; and generating a decrypted video code stream according to the first decrypted NALU unit and the second decrypted NALU unit.
Specifically, to facilitate understanding of the video data encoding and decoding methods and the association relationship between the video data encoding and decoding apparatuses provided in the embodiments of the present application, an embodiment of the present application further provides a video data transmission system, specifically as shown in fig. 10, fig. 10 is an interaction timing diagram of a video data transmission system provided in the embodiments of the present application, the video data transmission system includes a video encoding device 1010 and a video decoding device 1020, where the content of the following description and the explanation of the interaction between the video data encoding device 800 in the video encoding device 1010 and the video data decoding device 900 in the video decoding device 1020 is referred to.
1) After acquiring an original monitoring video, a video data coding device in the video coding equipment inputs the original monitoring video into an SVAC standard coder for processing to obtain an SVAC video code stream;
2) The video data coding device screens out target NALU units related to the data content of the original video according to the unit structure type carried by the unit head of each NALU unit in the SVAC video code stream;
3) Analyzing the original byte sequence load in the target NALU unit to obtain coding block data;
4) Encrypting coding header information or coding data information of coding block data based on a unit structure type corresponding to the NALU unit to obtain an encrypted NALU unit and form an encrypted SVAC code stream;
5) Sending the encrypted SVAC code stream to video decoding equipment based on a network transmission protocol;
6) A video data decoding device in the video decoding equipment screens out encrypted NALU units according to the unit structure type carried by the unit head of each NALU unit in a video code stream;
7) Analyzing the original byte sequence load of the encrypted NALU unit to obtain an encrypted coding block;
8) Carrying out decryption processing on the encrypted coded data information or the encrypted coding header information in the encrypted coding block based on the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block to obtain a decrypted video code stream;
9) And inputting the decrypted video code stream into an SVAC standard decoder to process to obtain an original monitoring video for subsequent display.
Further, in some embodiments of the present application, the video encoding device 1010 and the video decoding device 1020 may be in the form of computer devices, and specifically, as shown in fig. 11, a schematic structural diagram of a computer device that can be used as a video encoding device and a video decoding device is provided for an embodiment of the present application. The memory of the computer device may store various program modules constituting the video data encoding apparatus 800 in the video encoding device, such as the first obtaining module 810, the encoding module 820, the first parsing module 830, and the encrypting module 840 shown in fig. 8, and may also store various program modules constituting the video data decoding apparatus 900 in the video decoding device, such as the second obtaining module 910, the second parsing module 920, the decrypting module 930, and the decoding module 940 shown in fig. 9, and a computer program constituted by the various program modules makes the processor execute the steps in the video data encoding method or the video data decoding method according to the embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 11 may perform step S201 by the first obtaining module 810 in the video data encoding apparatus 800 shown in fig. 8. The computer device may perform step S202 through the encoding module 820. The computer device may perform step S203 through the first parsing module 830. The computer device may perform step S204 through the encryption module 840, and the computer device shown in fig. 11 may further perform step S601 through the second obtaining module 910 in the video data decoding apparatus 900 shown in fig. 9. The computer device may perform step S602 through the second parsing module 920. The computer device may perform step S603 through the decryption module 930. The computer device may perform step S604 through the decoding module 940. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external computer device through a network connection. The computer program is executed by a processor to implement a video data encoding method or a video data decoding method.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In some embodiments of the present application, there is provided a computer device comprising one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the steps of:
acquiring an original video to be processed;
coding the original video based on an SVAC standard to obtain an SVAC code stream; the SVAC code stream at least comprises a plurality of NALU units;
analyzing the original byte sequence load in the NALU unit to obtain coding block data corresponding to the NALU unit; the coded block data at least comprises coded header information and coded data information;
and encrypting at least one of the encoding head information and the encoding data information to obtain an encrypted SVAC code stream corresponding to the original video.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: determining a target NALU unit related to the data content of the original video from the NALU units according to the unit structure type carried by a unit head in each NALU unit; and analyzing the original byte sequence load in the target NALU unit to obtain encoded block data.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: if the unit structure type corresponding to the NALU unit is a basic coding slice, encrypting coding data information in coding block data corresponding to the NALU unit to obtain a first encrypted NALU unit; if the unit structure type corresponding to the NALU unit is an SVC enhanced coding slice, encrypting coding header information in coding block data corresponding to the NALU unit to obtain a second encrypted NALU unit; and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit and the second encrypted NALU unit.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: determining an extended NALU unit from each NALU unit related to encryption parameters according to a unit structure type carried in a unit header in the NALU unit; updating the security parameter set in the extended NALU unit according to the first encrypted NALU unit and the second encrypted NALU unit to obtain an updated extended NALU unit; and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit, the second encrypted NALU unit and the updated extended NALU unit.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: acquiring a video code stream to be decoded; analyzing the original byte sequence load of the encrypted NALU unit in the video code stream to obtain an encrypted coding block; carrying out decryption processing on the encrypted coding data information or the encrypted coding header information in the encrypted coding block to obtain a decrypted video code stream; and decoding the decrypted video code stream based on the SVAC standard to obtain the monitoring video corresponding to the video code stream.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: and determining an encrypted NALU unit from the NALU unit in the video code stream according to the unit structure type carried by the unit head of each NALU unit in the video code stream.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: acquiring the unit structure type of the encrypted NALU unit corresponding to each encrypted coding block; if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is a basic coding piece, decrypting the encrypted coding data information in the encrypted coding block to obtain a first decrypted NALU unit; if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is an SVC enhanced coding slice, decrypting the encrypted coding head information in the encrypted coding block to obtain a second decrypted NALU unit; and generating a decrypted video code stream according to the first decrypted NALU unit and the second decrypted NALU unit.
In some embodiments of the application, a computer-readable storage medium is provided, storing a computer program, which is loaded by a processor, causing the processor to perform the steps of:
acquiring an original video to be processed;
coding the original video based on an SVAC standard to obtain an SVAC code stream; the SVAC code stream at least comprises a plurality of NALU units;
analyzing the original byte sequence load in the NALU unit to obtain coding block data corresponding to the NALU unit; the coded block data at least comprises coded header information and coded data information;
and encrypting at least one of the coding header information and the coding data information to obtain an encrypted SVAC code stream corresponding to the original video.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: determining a target NALU unit related to the data content of the original video from the NALU units according to the unit structure type carried by the unit header in each NALU unit; and analyzing the original byte sequence load in the target NALU unit to obtain coded block data.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: if the unit structure type corresponding to the NALU unit is a basic coding slice, encrypting coding data information in coding block data corresponding to the NALU unit to obtain a first encrypted NALU unit; if the unit structure type corresponding to the NALU unit is an SVC enhanced coding slice, encrypting coding header information in coding block data corresponding to the NALU unit to obtain a second encrypted NALU unit; and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit and the second encrypted NALU unit.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: determining an extended NALU unit related to encryption parameters from the NALU units according to a unit structure type carried in a unit header in each NALU unit; updating the security parameter set in the extended NALU unit according to the first encrypted NALU unit and the second encrypted NALU unit to obtain an updated extended NALU unit; and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit, the second encrypted NALU unit and the extended NALU unit.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: acquiring a video code stream to be decoded; analyzing the original byte sequence load of the encrypted NALU unit in the video code stream to obtain an encrypted coding block; decrypting the encrypted coding data information or the encrypted coding header information in the encrypted coding block to obtain a decrypted video code stream; and decoding the decrypted video code stream based on the SVAC standard to obtain the monitoring video corresponding to the video code stream.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: and determining an encrypted NALU unit from the NALU unit in the video code stream according to the unit structure type carried by the unit head of each NALU unit in the video code stream.
In some embodiments of the application, the processor when executing the computer program further performs the steps of: acquiring the unit structure type of the encrypted NALU unit corresponding to each encrypted coding block; if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is a basic coding piece, decrypting the encrypted coding data information in the encrypted coding block to obtain a first decrypted NALU unit; if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is an SVC enhanced coding slice, decrypting the encrypted coding head information in the encrypted coding block to obtain a second decrypted NALU unit; and generating a decrypted video code stream according to the first decrypted NALU unit and the second decrypted NALU unit.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The video data encoding and decoding method, device and video data transmission system provided by the embodiments of the present application are introduced in detail, and a specific example is applied in the present application to illustrate the principle and implementation manner of the present invention, and the description of the above embodiments is only used to help understanding the method and core ideas of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A method for encoding video data, comprising:
acquiring an original video to be processed;
coding the original video based on an SVAC standard to obtain an SVAC code stream; the SVAC code stream at least comprises a plurality of NALU units;
analyzing the original byte sequence load in the NALU unit to obtain coding block data corresponding to the NALU unit; the coded block data at least comprises coded header information and coded data information;
if the unit structure type corresponding to the NALU unit is a basic coding slice, encrypting coding data information in coding block data corresponding to the NALU unit to obtain a first encrypted NALU unit;
if the unit structure type corresponding to the NALU unit is an SVC enhanced coding slice, encrypting coding header information in coding block data corresponding to the NALU unit to obtain a second encrypted NALU unit;
determining an extended NALU unit from each NALU unit related to encryption parameters according to a unit structure type carried in a unit header in the NALU unit;
updating the security parameter set in the extended NALU unit according to the first encrypted NALU unit and the second encrypted NALU unit to obtain an updated extended NALU unit;
and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit, the second encrypted NALU unit and the updated extended NALU unit.
2. The method of claim 1, wherein parsing the original byte sequence payload in the NALU unit to obtain encoded block data corresponding to the NALU unit comprises:
determining a target NALU unit related to the data content of the original video from the NALU units according to the unit structure type carried by a unit head in each NALU unit;
and analyzing the original byte sequence load in the target NALU unit to obtain coded block data.
3. A method for decoding video data, comprising:
acquiring a video code stream to be decoded; the video code stream is an encrypted SVAC code stream obtained by processing through the video data coding method according to any one of claims 1 to 2;
analyzing the original byte sequence load of the encrypted NALU unit in the video code stream to obtain an encrypted coding block;
acquiring the unit structure type of the encrypted NALU unit corresponding to each encrypted coding block;
if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is a basic coding piece, decrypting the encrypted coding data information in the encrypted coding block to obtain a first decrypted NALU unit;
if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is an SVC enhanced coding slice, decrypting the encrypted coding header information in the encrypted coding block to obtain a second decrypted NALU unit;
generating a decrypted video code stream according to the first decrypted NALU unit and the second decrypted NALU unit;
and decoding the decrypted video code stream based on the SVAC standard to obtain the monitoring video corresponding to the video code stream.
4. The method of claim 3, wherein before the step of parsing the original byte sequence payload of the encrypted NALU unit in the video stream to obtain the encrypted encoded block, the method further comprises:
and determining an encrypted NALU unit from the NALU unit in the video code stream according to the unit structure type carried by the unit head of each NALU unit in the video code stream.
5. An apparatus for encoding video data, comprising:
the first acquisition module is used for acquiring an original video to be processed;
the encoding module is used for encoding the original video based on the SVAC standard to obtain an SVAC code stream; the SVAC code stream at least comprises a plurality of NALU units;
the first analysis module is used for analyzing the original byte sequence load in the NALU unit to obtain coding block data corresponding to the NALU unit; the coded block data at least comprises coded header information and coded data information;
the encryption module is used for encrypting the coded data information in the coded block data corresponding to the NALU unit to obtain a first encrypted NALU unit if the unit structure type corresponding to the NALU unit is a basic coded slice;
if the unit structure type corresponding to the NALU unit is an SVC enhanced coding slice, encrypting coding header information in coding block data corresponding to the NALU unit to obtain a second encrypted NALU unit;
determining an extended NALU unit related to encryption parameters from the NALU units according to a unit structure type carried in a unit header in each NALU unit;
updating the security parameter set in the extended NALU unit according to the first encrypted NALU unit and the second encrypted NALU unit to obtain an updated extended NALU unit;
and generating an encrypted SVAC code stream corresponding to the original video based on the first encrypted NALU unit, the second encrypted NALU unit and the updated extended NALU unit.
6. An apparatus for decoding video data, comprising:
the second acquisition module is used for acquiring a video code stream to be decoded; the video code stream is an encrypted SVAC code stream obtained by processing through the video data coding method according to any one of claims 1 to 2;
the second analysis module is used for analyzing the original byte sequence load of the encrypted NALU unit in the video code stream to obtain an encrypted coding block;
the decryption module is used for acquiring the unit structure type of the encrypted NALU unit corresponding to each encrypted coding block;
if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is a basic coding piece, decrypting the encrypted coding data information in the encrypted coding block to obtain a first decrypted NALU unit;
if the unit structure type of the encrypted NALU unit corresponding to the encrypted coding block is an SVC enhanced coding slice, decrypting the encrypted coding head information in the encrypted coding block to obtain a second decrypted NALU unit;
generating a decrypted video code stream according to the first decrypted NALU unit and the second decrypted NALU unit;
and the decoding module is used for decoding the decrypted video code stream based on the SVAC standard to obtain the monitoring video corresponding to the video code stream.
7. A video data transmission system comprising a video encoding device and a video decoding device;
the video coding device is used for processing an original monitoring video to be processed according to the video data coding method of any one of claims 1 to 2 to generate an encrypted SVAC code stream after the original monitoring video to be processed is obtained, and transmitting the encrypted SVAC code stream to the video decoding device;
the video decoding equipment is used for processing the encrypted SVAC code stream according to the video data decoding method of any one of claims 3 to 4 after receiving the encrypted SVAC code stream transmitted by the video coding equipment, so as to generate an original monitoring video.
CN202310084535.0A 2023-02-09 2023-02-09 Video data coding and decoding method and device and video data transmission system Active CN115802049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310084535.0A CN115802049B (en) 2023-02-09 2023-02-09 Video data coding and decoding method and device and video data transmission system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310084535.0A CN115802049B (en) 2023-02-09 2023-02-09 Video data coding and decoding method and device and video data transmission system

Publications (2)

Publication Number Publication Date
CN115802049A CN115802049A (en) 2023-03-14
CN115802049B true CN115802049B (en) 2023-04-14

Family

ID=85430552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310084535.0A Active CN115802049B (en) 2023-02-09 2023-02-09 Video data coding and decoding method and device and video data transmission system

Country Status (1)

Country Link
CN (1) CN115802049B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405711B (en) * 2023-06-08 2023-08-18 北京小鸟科技股份有限公司 System for encrypting and decrypting real-time audio and video stream and audio and video stream encryption method
CN116456100B (en) * 2023-06-16 2023-08-29 深流微智能科技(深圳)有限公司 Inter-frame coding tree unit division method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021072878A1 (en) * 2019-10-15 2021-04-22 平安科技(深圳)有限公司 Audio/video data encryption and decryption method and apparatus employing rtmp, and readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783793B (en) * 2009-01-14 2015-09-02 北京中星微电子有限公司 Improve the method, system and device of safety of monitoring data
EP2309745A1 (en) * 2009-09-09 2011-04-13 Alcatel-Lucent España, S.A. Encryption procedure and device for an audiovisual data stream
KR101775250B1 (en) * 2012-09-28 2017-09-05 노키아 테크놀로지스 오와이 An apparatus, a method and a computer program for video coding and decoding
US11210406B2 (en) * 2016-07-15 2021-12-28 Seagate Technology Llc Encrypting system level data structures
US11653007B2 (en) * 2018-07-15 2023-05-16 V-Nova International Limited Low complexity enhancement video coding
CN110446047A (en) * 2019-08-16 2019-11-12 苏州浪潮智能科技有限公司 The coding/decoding method and device of video code flow
CN111064717B (en) * 2019-12-06 2022-11-22 浙江大华技术股份有限公司 Data encoding method, data decoding method, related terminal and device
CN112104874A (en) * 2020-08-26 2020-12-18 西安万像电子科技有限公司 Data transmission method and system
CN112235607B (en) * 2020-09-16 2023-04-07 浙江大华技术股份有限公司 Data security protection method, device, equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021072878A1 (en) * 2019-10-15 2021-04-22 平安科技(深圳)有限公司 Audio/video data encryption and decryption method and apparatus employing rtmp, and readable storage medium

Also Published As

Publication number Publication date
CN115802049A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
CN115802049B (en) Video data coding and decoding method and device and video data transmission system
US10154014B2 (en) Method and system for efficient encryption, transmission, and decryption of video data
WO2010044146A1 (en) Encryption device and decoding device, and encryption method and decoding method
CN104349135B (en) Monitoring server, method for processing data of monitoring server and monitoring system
EP3668104B1 (en) Video scrambling method and device with adaptive mode selection, network camera and readable storage medium
WO2021072878A1 (en) Audio/video data encryption and decryption method and apparatus employing rtmp, and readable storage medium
CN113473138B (en) Video frame coding method, device, electronic equipment and storage medium
KR20210121281A (en) Systems and methods for protecting elementary bitstreams incorporating independently encoded tiles
US9485533B2 (en) Systems and methods for assembling and extracting command and control data
CN109495258A (en) Method and device for decrypting monitoring data, computer equipment and storage medium
CN111062045A (en) Information encryption and decryption method and device, electronic equipment and storage medium
CN111586442B (en) Stream media encryption method and device, computer equipment and storage medium
CN109886047B (en) File encryption processing method and device
CN114205587A (en) Image display method, device, system and equipment
Puteaux et al. Rebuttal: On the security of reversible data hiding in encrypted images by MSB prediction
WO2023093501A1 (en) Method and system for processing privacy content in video, and electronic device and medium
US20120250860A1 (en) Encryption procedure and device for an audiovisual data stream
CN102293006A (en) Portable terminal, video data repair method and program
WO2017035018A1 (en) Method and system for efficient encryption, transmission, and decryption of video data
CN115550691A (en) Video processing method, video transmission method, video viewing method and device
CN113672954A (en) Feature extraction method and device and electronic equipment
CN103533457A (en) Multimedia digital watermark embedding and separation methods and multimedia digital watermark embedding and separation devices
US10958989B2 (en) Framework for embedding data in encoded video
CN115225935B (en) Method and device for cross-encrypting bytes of video stream and audio stream
Chen et al. An efficient video encryption algorithm based on the pseudorandom number generator of zipf distribution

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