Authentication method of video code stream, computer device and storage medium

By acquiring and processing the configuration authentication information of video streams, the problem of the single authentication method in existing technologies is solved, and the flexibility and applicability of video stream authentication are enhanced.

CN117640958BActive Publication Date: 2026-11-27ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311361259.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-18
Publication Date
2026-11-27
Estimated Expiration
2043-10-18

AI Technical Summary

Technical Problem

Existing video stream authentication methods suffer from limitations such as limited verification methods and weak applicability.

Method used

By obtaining the configuration authentication information of the video stream, including the target authentication object and the target authentication method, the authentication data is processed and then encapsulated with the video stream to obtain the target stream data, which is used by the decoding end for authentication during the decoding process.

Benefits of technology

It improves the flexibility of video stream authentication, adapts to authentication needs in various scenarios, and enhances its applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117640958B_ABST
    Figure CN117640958B_ABST
Patent Text Reader

Abstract

The application discloses a video code stream authentication method, a computer device and a storage medium. The method comprises the following steps: obtaining configuration authentication information of a video code stream, wherein the configuration authentication information comprises at least one of a target authentication object and a target authentication mode, the target authentication object comprises a target frame that needs to be authenticated, and the target authentication mode is an authentication mode corresponding to the target frame; processing the video code stream according to the configuration authentication information to obtain authentication data; and encapsulating the configuration authentication information, the authentication data and the video code stream to obtain target code stream data; wherein the authentication data and the configuration authentication information are used for authenticating the video code stream in a decoding process of the target code stream data at a decoding end. The above scheme can improve the flexibility of video code stream authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video encoding and decoding technology, and in particular to a video stream authentication method, computer device, and computer-readable storage medium. Background Technology

[0002] Because video image data is relatively large, it usually needs to be encoded and compressed. The compressed video image data is called a video stream. The video stream can be transmitted to the user's end via wired or wireless network for decoding and viewing. The entire video encoding and compression process can include prediction, transformation, quantization, and encoding.

[0003] For the security of video stream transmission, the video stream is authenticated. In the specific authentication process, the video stream is signed during the encoding and compression of the video image. Then, the signature is verified after transmission to the user's end to authenticate the video stream.

[0004] However, existing video stream authentication methods suffer from problems such as limited verification methods and weak applicability. Summary of the Invention

[0005] The main technical problem addressed by this application is to provide a video stream authentication method, computer equipment, and storage medium that can improve the flexibility of video stream authentication.

[0006] To address the aforementioned issues, the first aspect of this application provides a video stream authentication method. This method includes: obtaining configuration authentication information for the video stream, wherein the configuration authentication information includes at least one of a target authentication object and a target authentication method, the target authentication object containing a target frame to be authenticated, and the target authentication method being the authentication method corresponding to the target frame; processing the video stream according to the configuration authentication information to obtain authentication data; and encapsulating the configuration authentication information, authentication data, and video stream to obtain target stream data; wherein the authentication data and configuration authentication information are used by the decoding end to authenticate the video stream during the decoding process of the target stream data.

[0007] To address the aforementioned issues, a second aspect of this application provides a video stream authentication method. The method includes: receiving target stream data, wherein the target stream data is obtained by an encoding end using the aforementioned video stream authentication method; decoding the target stream data to obtain a video stream, authentication data, and configuration authentication information; and authenticating the video stream using the authentication data and configuration authentication information.

[0008] To address the aforementioned issues, the second aspect of this application provides three computer devices, each comprising a memory and a processor coupled to each other. The memory stores program data, and the processor executes the program data to implement any step of the aforementioned video stream authentication method.

[0009] To address the aforementioned problems, a fourth aspect of this application provides a computer-readable storage medium storing program data executable by a processor, the program data being used to implement any step of the aforementioned video stream authentication method.

[0010] The above scheme obtains the configuration authentication information of the video stream. This configuration authentication information includes at least one of a target authentication object and a target authentication method. The target authentication object contains the target frame to be authenticated, and the target authentication method is the authentication method corresponding to the target frame. The video stream is processed according to the configuration authentication information to obtain authentication data. The configuration authentication information, authentication data, and video stream are then encapsulated to obtain target stream data. The authentication data and configuration authentication information are used by the decoding end to authenticate the video stream during the decoding process. This scheme allows for flexible configuration of the target authentication object and target authentication method, i.e., flexible configuration of the target frame to be authenticated and the corresponding authentication method, thus adapting to the authentication needs of video streams in various scenarios. It has strong applicability and improves the flexibility of video stream authentication.

[0011] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

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

[0013] Figure 1 This is a schematic diagram of the structure of an embodiment of the video encoding and decoding system of this application;

[0014] Figure 2 This is a flowchart illustrating an embodiment of the encryption and decryption of the video encoding and decoding system of this application;

[0015] Figure 3 This is a flowchart illustrating an embodiment of the video encoding / decoding system for signature verification in this application;

[0016] Figure 4 This is a schematic diagram of an embodiment of the tree-structured summary of this application;

[0017] Figure 5 This is an example schematic diagram of an embodiment of the frame reference relationship and knowledge image of this application;

[0018] Figure 6 This is a schematic diagram illustrating another embodiment of the frame reference relationship and knowledge image of this application;

[0019] Figure 7 This is a flowchart illustrating the first embodiment of the video stream authentication method of this application;

[0020] Figure 8 This is a flowchart illustrating an embodiment of step S11 of this application;

[0021] Figure 9 This is a flowchart illustrating another embodiment of step S11 of this application;

[0022] Figure 10 This is a flowchart illustrating an embodiment of the authentication sequence for encryption and signature processing in this application;

[0023] Figure 11 This is a flowchart illustrating another embodiment of the authentication sequence for encryption and signature processing in this application;

[0024] Figure 12 This is a flowchart illustrating the second embodiment of the video stream authentication method of this application;

[0025] Figure 13 This is a schematic diagram of the structure of an embodiment of the encoding end of this application;

[0026] Figure 14 This is a schematic diagram of the structure of an embodiment of the decoding end of this application;

[0027] Figure 15 This is a schematic diagram of the structure of an embodiment of the computer device of this application;

[0028] Figure 16 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

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

[0030] The terms "first" and "second" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0031] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0032] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0033] This application provides the following embodiments, and each embodiment will be described in detail below.

[0034] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of an embodiment of the video encoding and decoding system of this application.

[0035] The video encoding / decoding system 100 includes an encoding end 101 and a decoding end 102. The encoding end 101 and the decoding end 102 can be computer equipment, electronic equipment, etc., and can be any device with processing capabilities, such as a computer, server, mobile phone, tablet, etc. This application does not impose any limitations on this. The encoding end 101 and the decoding end 102 can communicate with each other and can be used to perform encoding and / or decoding operations on images / videos.

[0036] Encoding end 101 can be used to perform image / video encoding and compression steps, as well as signature, encryption, and other processing to obtain target bitstream data. Encoding end 101 can transmit the target bitstream data to decoding end 102. Decoding end 102 can receive the target bitstream data from encoding end 101 and perform decoding, decryption, verification, and other related steps containing the target bitstream data. It can also include steps related to backend vision tasks, such as image processing and classification.

[0037] In some implementations, to ensure the security of video stream transmission between the encoding end 101 and the decoding end 102, authentication processing of the video stream is typically required to prevent tampering during transmission. In some application scenarios, encryption processing can also be applied to the video stream to further enhance its security during transmission.

[0038] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the encryption and decryption of the video encoding / decoding system of this application. In this embodiment, the video encoding / decoding system can use encryption / decryption authentication technology to process the video stream.

[0039] In some implementations, the encryption process of the video stream at the encoding end may include the following steps:

[0040] (1) The encoding end periodically generates a random key, such as a 128-bit VEK (Video Encryption Key). VEK is the encryption key for the video stream. The encoding end can randomly generate a symmetric key that changes according to a certain pattern to encrypt the video stream content and achieve plaintext protection.

[0041] (2) Read the NAL data of the encoded bitstream of the video to be encrypted, which can also be called the raw NAL.

[0042] For example, reading the RBSP (Raw Byte Sequence Payload) data from the NAL (Network Abstraction Layer) of the AVS2 video coding standard. NAL is responsible for formatting the data and providing header information to ensure the data is suitable for transmission on various channels and storage media. RBSP data is the raw data byte stream of the AVS2 video coding standard.

[0043] (3) If the following conditions are met simultaneously: the RBSP is the first coded slice data at the beginning of the GOP (Group of Pictures), and a new VEK is available, the current VEK is discarded and a new VEK is activated. Otherwise, the current VEK continues to be used.

[0044] During video compression, the video sequence is first divided into several group of images (GOPs), and compression is performed on a GOP-by-GOP basis. A GOP is a group of images in the video, representing the interval between two keyframes (I-frames).

[0045] (4) The encoding end randomly generates a 128-bit IV. The IV is the initialization vector used in the OFB (Output Feed Back) encryption mode of the block cipher. OFB encryption mode is one of the four modes of block ciphers. In OFB encryption mode, the output of the cryptographic algorithm is fed back to the input of the cryptographic algorithm.

[0046] (5) The OFB mode of the agreed block cipher algorithm is used to generate the encrypted stream key using VEK and IV.

[0047] (6) The encrypted stream key and the RBSP data to be encrypted are aligned bit by bit and XORed to obtain the encrypted RBSP data, which is also the encrypted NAL.

[0048] (7) Encapsulate this encrypted NAL. This can be achieved by using the code field encryption_idc=1 in the syntax.

[0049] (8) When a new VEK is activated or a new IV is used, the security extension information NAL can be encapsulated and the NAL output can be encrypted beforehand.

[0050] In some implementations, during the encryption process described above, the KMS (Key Management Service) key management system can obtain the VKEK version and then the VKEK (VideoVey Encryption Key), which is used to encrypt the VEK key to obtain the EVEK key parameter. The KMS key management system can generate and distribute symmetric keys to front-end devices with security features, which change according to a certain pattern and are used to encrypt the video key, thereby protecting the confidentiality of its transmission.

[0051] Next, the EVEK and VKEK versions of the key parameters are written into the security parameter set, encapsulated with the video bitstream (such as the encrypted NAL of the video bitstream) to obtain the target bitstream data, and the target bitstream data is transmitted to the decoding end.

[0052] In some implementations, the decryption process of the video stream at the decoding end may include the following steps:

[0053] (1) Receive the target code stream data, obtain the ciphertext of IV and VEK from the security parameter set, denoted as E(VEK), and decrypt E(VEK) with VKEK to obtain VEK.

[0054] In the above process, the KMS key management system can obtain the VKEK based on the VKEK version of the security parameter set. This VKEK is then transmitted to the decoding end for decryption of the E(VEK).

[0055] (2) Read the RBSP data of the target bitstream data to be decrypted.

[0056] (3) The following conditions must be met simultaneously: if this RBSP is the first coded slice data at the start of the GOP, and if a new VEK is available, the current VEK is invalidated and a new VEK is activated; otherwise, the current VEK continues to be used.

[0057] (4) Use the OFB mode of the agreed block encryption algorithm and generate the decryption stream key using VEK and IV.

[0058] (5) Align the decrypted stream key and the RBSP data to be decrypted bit by bit, and perform an XOR operation to obtain the decrypted RBSP data, which is the original NAL.

[0059] Please see Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of the video encoding / decoding system for signature verification according to this application. In this embodiment, the video encoding / decoding system can use signature verification authentication technology to process the video stream.

[0060] In some implementations, the signature process for the video bitstream at the encoding end may include the following steps:

[0061] (1) Read one or more NAL unit data of the video stream to be authenticated.

[0062] (2) Perform hash calculations on the NAL cells according to the algorithms and methods agreed upon in the security parameter set to generate primary or secondary hash values. Hash calculations are similar to tree digest calculations.

[0063] (3) Using the device private key, sign the tree-top hash (e.g., SM3) results of one or more images according to the algorithm and method agreed upon by the signature_type field of the security parameter set syntax, and generate authentication data for the video stream.

[0064] (4) Encapsulate the authentication data of the video stream into an authentication data unit, and encapsulate it in the form of an independent NAL.

[0065] In the above process, the security parameter set, the NAL of the video stream, and the authentication data can be encapsulated to obtain the target video encoding. The target video encoding can then be transmitted to the decoding end.

[0066] In some implementations, the signature verification process of the video bitstream at the decoding end may include the following steps:

[0067] (1) Obtain the source device information from the security parameter set NAL and find the public key of the corresponding source device;

[0068] (2) Using the signature algorithm specified in the signature_type field of the syntax, decrypt the authentication data with the public key of the source device and generate a verification hash value.

[0069] (3) Locate the first authentication NAL unit of the image corresponding to the authentication data in the video stream.

[0070] (4) Perform initial hash calculation or treetop hash calculation (SM3) on one or more groups of certified NAL units starting from the first certified NAL unit according to the algorithm and method agreed upon in the security parameter set, and use the calculation result as the comparison hash value.

[0071] (5) Compare the verification hash value and the comparison hash value. If they are completely the same, the image corresponding to the video authentication data passes the verification, that is, it passes the authentication; otherwise, it fails the authentication.

[0072] In some implementations, the syntax of the aforementioned security parameter set is specifically as follows:

[0073] Table 1. Syntax Table of Security Parameter Set

[0074]

[0075]

[0076] Specifically, the semantics of the syntax of the security parameter set are as follows:

[0077] (1) Encryption flag encryption_flag

[0078] The encryption flag `encryption_flag` is a binary variable. A value of '1' indicates that encryption is supported for displayed image code slices, or displayed image sequence parameter sets, or displayed image parameter sets, or non-display knowledge image code slices, or displayed knowledge image code slices, or knowledge image sequence parameter sets, or knowledge image parameter sets, or extended data units; that is, RBSPs in NAL units may be encrypted. A value of '0' indicates that encryption of RBSPs in NAL units is not supported.

[0079] (2) Authentication flag

[0080] The authentication flag `authentication_flag` is a binary variable. A value of '1' indicates support for authentication of access units for the entire image frame. The NAL units for authentication include the coded slices of the displayed or knowledge image, as well as the sequence parameter set, image parameter set, security parameter set, and extended data units transmitted in the frame. When authentication of the above data content is supported, the encoded bitstream must carry absolute time extension information, and the authentication data carried in the encoded bitstream should be Base64 encoded. Authentication data is transmitted through NAL units where `nal_unit_type` equals 10.

[0081] If an image contains encoded slices of a display image or knowledge image with authentication_idc equal to 1, sequence parameter sets of a display image or knowledge image, image parameter sets of a display image or knowledge image, security parameter sets, extended data units, etc., the NAL units with authentication_idc equal to 1 in an image are arranged in decoding order and then authenticated to generate the image's digest data. authentication_flag equal to 0 indicates that image authentication is not supported, and the encoded bitstream should not contain NAL units with nal_unit_type equal to 10.

[0082] (3) Encryption type encryption_type

[0083] The encryption type, encryption_type, is a 4-bit unsigned integer. It indicates the encryption algorithm used, and the specific correspondence is shown in Table 2 below.

[0084] Table 2. Correspondence between encryption types and specific encryption algorithms

[0085]

[0086] (4) Video encryption key flag vek_flag

[0087] The video encryption key flag vek_flag is a binary variable. A value of '1' indicates that vek is included, and a value of '0' indicates that vkek is not included.

[0088] (5) Initial vector flag iv_flag

[0089] The initialization vector flag iv_flag is a binary variable. A value of '1' indicates that iv is carried, and a value of '0' indicates that iv is not carried.

[0090] (6) Video encryption key encryption type vek_encryption_type

[0091] This is a 4-bit unsigned integer. It indicates the encryption type of the video encryption key; see 0 for specific correspondences.

[0092] (7) Length of the encryption key for the encrypted video: evek_length_minus1

[0093] This is an 8-bit unsigned integer. It can be used to indicate the length of the encrypted video encryption key, in bytes.

[0094] (8) Encryption key for encrypted video: evek

[0095] This is an n-bit unsigned integer. It represents the encryption key for the encrypted video, used for encryption calculations, and its length is evek_length_minus1 plus 1 byte.

[0096] (9) Video encryption key version number and length vkek_version length_minus1

[0097] An 8-bit unsigned integer. Indicates the length of the video encryption key version number, in bytes.

[0098] (10) Video encryption key version number vkek_version

[0099] It is an n-bit unsigned integer. It can be used to indicate the video encryption key version number, with a length of vkek_version_length_minus1 plus 1 byte.

[0100] (11) Initial vector length iv_length_minus1

[0101] An 8-bit unsigned integer. Indicates the length of the initial vector, in bytes.

[0102] (12) Initial vector iv

[0103] This is an n-bit unsigned integer. It indicates the initialization vector used for block encryption, with a length of iv_length_minus1 plus 1 byte.

[0104] (13) Hash type hash_type

[0105] This is a 2-bit unsigned integer. It indicates the algorithm used for authentication, and the specific correspondence can be represented by the table below.

[0106] Table 3. Correspondence between hash types and specific algorithms

[0107] The value of hash_type Authentication Algorithm Summary data length (bytes) 0 SM3 32 1~3 reserve reserve

[0108] (14) Knowledge Image Hash Authentication Flag hash_discard_library_pictures_flag

[0109] A binary variable. A value of '1' indicates that the knowledge image is not authenticated; a value of 0 indicates that the knowledge image is authenticated. If hash_discard_library_pictures is not in the bitstream, its default value is 1. In images that are not authenticated, the authentication_idc value of each NAL unit should be equal to 0.

[0110] (15) P / B frame hash authentication flag hash_discard_pb_pictures_flag

[0111] A binary variable. A value of '1' indicates that no authentication is performed on images other than random access point images and knowledge images; a value of '0' indicates that authentication is performed on images other than random access point images and knowledge images. If hash_discard_pb_pictures is not in the bitstream, its default value is 1. The authentication_idc value for each NAL unit in an image that is not authenticated should be equal to 0.

[0112] (16) Successful authentication image frame count: successful_hash_pictures_minus1

[0113] An 8-bit unsigned integer. Represents the number of consecutively displayed images or knowledge image slices for digital signing in decoding order, and these consecutively displayed images or knowledge image slices are limited to a single random access image or RLI frame interval. The value of `successive_hash_pictures_minus1` should be between 0 and 255.

[0114] Among them, SuccessiveHashPictures=successive_hash_pictures_minus1+1.

[0115] If successful_hash_pictures_minus1 equals 0, digitally sign the summary data of each certified display image or knowledge image slice.

[0116] If `successive_hash_pictures_minus1` is greater than 0, first, a tree-structured summary is generated from the summary data of `SuccessiveHashPictures` consecutive display image or knowledge image slices in decoding order, and then a digital signature is applied to the top-level summary data. Please refer to [link to relevant documentation]. Figure 4 The treetop summary data of n images is the summary data generated by arranging the treetop summary data of the first n-1 images and the summary data of the nth image according to the method shown by hash_type.

[0117] After the security parameter set is activated, the first image to be authenticated can be the first of a consecutive `SuccessiveHashPictures` display image or knowledge image slice. The first slice of a random access image, RL image, or knowledge image (IDR image) should be the first of a consecutive `SuccessiveHashPictures` images. If the number of images to be authenticated in a random access image or RL / IDR image interval is less than `SuccessiveHashPictures`, the digest data corresponding to the signature data is the digest data of all images contained in the previous random access image or RL / IDR image interval. For a specific description of RL / IDR images, please refer to the following embodiments; further details are omitted here.

[0118] (17) Digital signature type signature_type

[0119] A 2-bit unsigned integer. This can be used to indicate the algorithm used to digitally sign the image's summary data, as shown in the table below.

[0120] Table 4. Correspondence between digital signature types and specific encryption algorithms

[0121] The value of signature_type Signature Algorithm 0 SM2 1~3 reserve

[0122] (18) Camera ID (camera_id)

[0123] A 152-bit string. The camera ID indicating the source of the image.

[0124] The above embodiments do not restrict the use of customizable or default authentication methods such as algorithms and hashing methods by users for retaining certain parts.

[0125] In some implementations, the syntax of the NAL unit of the encoded slice of the video stream described above is specifically as follows:

[0126] Table 5. Syntax Table of Security Parameter Set

[0127]

[0128] Specifically, the semantics of the NAL unit syntax for the encoded slice are as follows:

[0129] (1) Encryption flag encryption_idc

[0130] A binary variable. It indicates whether the NAL cell is encrypted. A value of '0' indicates that the RBSP in the NAL cell is not encrypted, and a value of '1' indicates that the RBSP in the NAL cell is encrypted using the encryption method specified in the security parameter set, and the last byte of the RBSP is not encrypted.

[0131] (2) Authentication mark authentication_idc

[0132] A binary variable. It indicates whether the NAL unit is authenticated. A value of '0' indicates that the NAL unit is not authenticated, and a value of '1' indicates that the NAL unit is authenticated using the authentication method specified in the security parameter set, and the encoded bitstream must carry absolute time extension information to identify the authentication time.

[0133] In some implementations, the syntax of the NAL unit of the authentication data of the video stream described above is specifically as follows:

[0134] Table 6 Syntax Table of Authentication Data

[0135]

[0136] Specifically, the semantics of the NAL syntax for authentication data are as follows:

[0137] (1) Knowledge Image Authentication Data Flag is_library_flag

[0138] A binary variable. A value of "1" indicates that the authentication data is the signature data of a CRR image; a value of "0" indicates that the authentication data is the signature data of a display image. If spactial_el_flag does not exist in the bitstream, its default value is 0.

[0139] (2) Image frame_num containing authentication data

[0140] An 8-bit unsigned integer. This image is the nearest display image or knowledge image whose frame_num is the same as the frame_num of the authentication data before the NAL unit of the authentication data. When successive_hash_pictures_minus1 equals 0, frame_num indicates the display image and knowledge image corresponding to the authentication data; when it is greater than 0, frame_num indicates the last of all slices of consecutive SuccessiveHashPictures display images or knowledge images. When the scope of the authentication data is a knowledge image, frame_num indicates the patch_idx of the last slice of consecutive SuccessiveHashPictures knowledge image slices.

[0141] (3) Authentication knowledge image index: authentication_library_picture_index

[0142] n-bit unsigned integer. Indicates the index of the knowledge image corresponding to the knowledge bitstream from which the current authentication data applies; the value ranges from 0 to 511. If `authentication_library_picture_index` does not exist in the bitstream, its default value is 0.

[0143] (4) The length of the signature data: authentication_data_length_minus1

[0144] An 8-bit unsigned integer. Adding 1 indicates the length of the signature data in bytes, and the value should be between 0 and 255.

[0145] (5) Number of bytes in the signature data: authentication_data[i]

[0146] An 8-bit unsigned integer. The i-th byte of a signature data set. The signature data should be Base64 encoded. Base64 encoding is a common method for storing and transmitting binary data over a network. One byte of Base64 can only represent 64 possibilities, and the first two bits of each byte in the encoding format can only be 0, using the remaining 6 bits to represent the content.

[0147] In some implementations, the concept of a knowledge picture (Library Picture) is introduced in the SVAC3 video codec standard described above. A knowledge picture can be a CRR frame or an LTR frame. A CRR frame represents a knowledge picture that is not displayed. A knowledge picture that is transmitted as a complete frame before the RL frame without interleaving fragments with the preceding P frames and is displayed normally is called an LTR frame (Long-Term Reference).

[0148] A knowledge image is a long-term reference frame encoded using I-frames. It serves only as a reference frame and may not be used for display. Knowledge images are identified by their knowledge image index (IDX), rather than the POC (Pic_order_cn) or DOI (Decodeorderindex) of other frames in the bitstream.

[0149] In the above process, RL (reference library) frames are also introduced. RL frames refer to P frames or B frames that only reference knowledge images.

[0150] In some implementations, regarding the structure of knowledge images in the bitstream: knowledge images are usually encoded using I-frame encoding. However, since the bitrate of encoded knowledge images is generally low, the encoding is slow, and the bitrate is generally high, interleaving an entire frame of knowledge image bitstream into the bitstream can cause large bitrate spikes and jitter during decoding. Therefore, the patch mechanism in the existing SVAC3 standard can be used to divide the knowledge image into multiple patches and interleave them with multiple display images. Only one patch is encoded at a time and added to the bitstream, ultimately resulting in an encoded output bitstream that interleaves the knowledge base patch bitstream with the display image bitstream.

[0151] As an example, please refer to Figure 5 With the video stream frame type configured as "IPPP", the knowledge image L is divided into two pieces (patch0, patch1), according to... Figure 5 The positional relationships of each frame and knowledge image in the bitstream can be determined, such as RL, P, P, P... The frame reference relationships between frames can be obtained, such as a P frame following an RL frame referencing an RL frame.

[0152] As an example, please refer to Figure 6 With the video stream frame type configured as "IPPP", the knowledge image L0 is divided into 4 slices (L0patch0, L0patch1, L0patch2, L0patch3). Alternatively, the knowledge image L1 can be divided into 4 slices (L1patch0, L1patch1, L1patch2, L1patch3), which can be distributed among the P frames. Figure 6 The positional relationships of each frame and knowledge image in the bitstream can be represented as RL(poc0), P(poc1), P(poc2), ..., P(poc7), RL(poc8), P(poc9) ... . The frame reference relationships between frames can be obtained, such as frame P(poc1) referencing frame RL(poc0).

[0153] In some embodiments, this application provides a video stream authentication method, and the various embodiments of the video stream authentication method are described in detail below.

[0154] Please see Figure 7 , Figure 7 This is a flowchart illustrating the first embodiment of the video stream authentication method of this application. The specific steps of the video stream authentication method in this embodiment can be executed using the aforementioned encoding end. The method may include the following steps:

[0155] S11: Obtain the configuration authentication information of the video stream. The configuration authentication information includes at least one of the target authentication object and the target authentication method. The target authentication object contains the target frame that needs to be authenticated, and the target authentication method is the authentication method corresponding to the target frame.

[0156] The encoding end can encode the video to be compressed, obtaining a video stream. It can also obtain the configuration authentication information of the video stream. This configuration authentication information can include at least one of a target authentication object and a target authentication method. The target authentication object can include the target frame to be authenticated, such as an I-frame or an IDR frame. The target authentication method is the authentication method corresponding to the target frame, such as a signature / verification method applied to the target frame. In other words, the configuration authentication information can be used to determine the authentication object and / or authentication method that the video stream needs to authenticate.

[0157] In some implementations, the aforementioned configuration authentication information can be obtained based on relevant information about the user's pre-configuration of video stream authentication, such as configuring the target authentication object and the target authentication method to be authenticated.

[0158] S12: Process the video stream according to the configured authentication information to obtain authentication data.

[0159] In some implementations, the authentication information configuration includes the target authentication object and the target authentication method. In this step, each target authentication object in the video stream can be processed separately according to the target authentication method to obtain the authentication data corresponding to the target authentication object.

[0160] In some implementations, when the authentication information includes the target authentication object (i.e., only the target authentication object is configured), the authentication method for obtaining the target authentication object from the aforementioned security parameter set can be used for subsequent processing. When the authentication information includes the target authentication method (i.e., only the target authentication method is configured), the object requiring authentication marked in the aforementioned security parameter set can be used for subsequent processing according to the target authentication method.

[0161] S13: Encapsulate the configuration authentication information, authentication data, and video stream to obtain the target stream data; wherein, the authentication data and configuration authentication information are used by the decoding end to authenticate the video stream during the decoding process of the target stream data.

[0162] The relevant configuration parameters (such as syntax elements) of the above-mentioned authentication information are written into the security parameter set. Then, the security parameter set, authentication data, and video stream are encapsulated to obtain the target stream data. In this embodiment, encapsulation refers to placing the security parameter set, video stream, and authentication data into the stream in that order to form the target stream data.

[0163] In some implementations, the authentication data may include authentication data corresponding to image frames within a group of pictures (GOP), such as authentication data for one or more image frames within a GOP. The authentication data corresponding to the current image group can be encapsulated with the corresponding video stream, or the authentication data corresponding to the current image group can be encapsulated with the video stream corresponding to a subsequent image group, where the subsequent image group is the image group following the current image group. That is, the authentication data for the current GOP can be transmitted with a delay of one GOP or several GOPs, or it can be transmitted within the current GOP. This application can determine its transmission method according to the specific application scenario.

[0164] Specifically, during the encapsulation of the security parameter set, authentication data, and video stream, or after obtaining the authentication data corresponding to the current image group, the authentication data for the current image group can be placed in the encapsulation position corresponding to the current image group, so that the authentication data for the current image group is transmitted during the transmission of the current image group; alternatively, the authentication data for the current image group can be placed in the encapsulation position corresponding to a subsequent image group, so that the authentication data for the current image group is transmitted during the transmission of the subsequent image group, which is the image group following the current image group. This method allows the authentication data to be transmitted either during the transmission of image frames in the current image group or during the transmission of image frames in the next image group after the authentication data is generated.

[0165] Authentication can be divided into signature processing and signature verification processing. Signature processing and signature verification processing require calculating the hash value of the same NAL for the same frame in the same way. That is, at the encoding end, the target authentication object can be signed according to the above target authentication method to obtain authentication data. After being transmitted to the decoding end, the decoding end can use the security parameter set to obtain the corresponding target authentication object and target authentication method, obtain verification data, compare the verification data with the authentication data, and obtain the authentication result of the video bitstream. If they match, the authentication is successful; otherwise, the authentication fails.

[0166] The above method obtains the configuration authentication information of the video stream. This configuration authentication information includes at least one of a target authentication object and a target authentication method. The target authentication object contains the target frame to be authenticated, and the target authentication method is the authentication method corresponding to the target frame. The video stream is processed according to the configuration authentication information to obtain authentication data. The configuration authentication information, authentication data, and video stream are then encapsulated to obtain target stream data. The authentication data and configuration authentication information are used by the decoding end to authenticate the video stream during the decoding process. This scheme allows for flexible configuration of the target authentication object and target authentication method, i.e., flexible configuration of the target frame to be authenticated and the corresponding authentication method, thus adapting to the authentication needs of video streams in various scenarios. It has strong applicability and improves the flexibility of video stream authentication.

[0167] In some embodiments, please refer to Figure 8 This embodiment can be further extended to step S11 of the above embodiment. When the configuration authentication information includes the target authentication object, obtaining the configuration authentication information of the video stream can include any of the following steps:

[0168] S111: From the various types of image frames contained in the video stream, determine the first type of image frame as the target authentication object, wherein the first type of target frame includes at least one of: random access frame, preset key frame, and knowledge image frame.

[0169] In determining the target authentication object, the first type of image frame can be identified from the various types of image frames contained in the video stream to obtain the target authentication object, i.e., the object to be authenticated. The first type of target frame includes at least one of: random access frames, preset keyframes, and knowledge image frames.

[0170] Encoded image frames can be of various types, such as P-frames, I-frames, B-frames, IDR frames, CRA frames, LTR frames, RL frames, BLA frames, and CRR frames. Among them, I-frames (Intra Picture, keyframes), also known as intra-coded frames, generally do not depend on preceding or following frames and can be decoded independently. P-frames (Predictive-frames, also known as forward predictive-coded frames), require preceding I-frames or P-frames for encoding and decoding, because generally, P-frames store the differences between the current frame and the previous frame (which could be either an I-frame or a P-frame). B-frames (Bi-directional Interpolated Prediction Frames), also known as bi-directional predictive interpolation coded frames, are special because they store the differences between the current frame and preceding and following frames; therefore, the decoding logic for videos containing B-frames is more complex. An IDR (Instantaneous Decoding Refresh) frame is a special type of I-frame, a concept introduced to facilitate encoding and decoding. The purpose of an IDR frame is to immediately refresh the image buffer, preventing error propagation. Encoding begins anew from the start of an IDR frame. When the decoder receives an IDR frame, it refreshes the reference image buffer; that is, frames after an IDR frame do not reference frames before it (as opposed to CAR). A GOP (Group of Pictures) refers to the interval between two I-frames, or more precisely, the interval between two IDR frames. CRA stands for Clean Random Access. In an open GOP, a CRA frame can be the first frame decoded, used to segment the GOP. It's important to note that even in an open GOP sequence, the first frame is always an IDR frame. BLA stands for Broken Link Access, a special type of CRA frame. When a bitstream needs to be switched, the CRA of the subsequent bitstream can be appended to the current bitstream. In this case, the CRA of the subsequent bitstream is called BLA. Based on the characteristics and scenarios of CRA, the processing of BLA is definitely different from that of CRA. Frames following a CRA can refer to the preceding frames, but frames following a BLA cannot refer to the preceding frames. LTR frames and CRR frames are knowledge image frames, LTR frames are display knowledge image frames, and CRR frames are non-display knowledge image frames. The descriptions of LTR, RL, and CRR frames in the above embodiments are provided and will not be repeated here. It is understood that the types of image frames described above in this application are only illustrative examples, and other types of image frames may also be included; this application does not limit this.

[0171] By identifying the type of encoded image frames in the video stream, the first type of target frame can be determined, and thus, the first type of target frame can be used as the target authentication object.

[0172] In some implementations, the target frame of the first type includes a random access frame, which is at least one of, for example, an IDR frame, a CRA frame, an LTR frame, an RL frame, a BLA frame, etc. Authentication can be configured to be performed only on random access frames.

[0173] In some implementations, the first type of target frame includes a preset keyframe, such as an IDR frame, which can be configured to be authenticated only for the preset keyframe.

[0174] In some implementations, the first type of target frame includes knowledge image frames, such as LTR frames, and it can be set that LTR frames must be authenticated.

[0175] In some implementations, considering the validity of authentication, it can be determined that frames of the first type must be authenticated, that is, IDR frames must be authenticated, random access frames, and knowledge image frames (such as LTR frames) must be authenticated.

[0176] S112: Use the first syntax element to obtain the second type of image frame in the video stream as the target authentication object. The first syntax element is used to mark whether a preset type frame needs authentication, and the second type of image frame is the preset type frame marked as needing authentication.

[0177] It allows for the authentication of image frames of any type, and uses syntactic elements to specify the image frame types that need to be authenticated for each application scenario. For example, users can pre-select the image frame types that need to be authenticated, thereby marking those image frame types.

[0178] For example, the first syntactic element can be used to mark whether a preset type frame needs to be authenticated, obtain the preset type frames in the video stream that need to be authenticated, that is, obtain the second type of image frame, as the target authentication object that needs to be authenticated.

[0179] In some implementations, the preset type frame includes any one of the following: image frames other than the first type of image frame, knowledge image frames, and third type of image frames; the third type of image frame is an image frame other than knowledge image frames and preset keyframes. It is understood that the preset type frame can be determined according to the frame type of the specific application scenario, and this application does not limit this.

[0180] For example, the first syntax element is used to mark whether image frames other than the first type of image frames need authentication, such as marking whether non-random access frames need authentication, or marking whether non-IDR frames need authentication.

[0181] For example, the first syntactic element can be used to mark whether a knowledge image frame requires authentication. Similarly, the first syntactic element can be used to mark whether a third type of image frame requires authentication, that is, whether a non-knowledge image frame and a non-IDR frame require authentication.

[0182] In some implementations, information such as the type and number of image frames to be authenticated can also be set. The first syntactic element described above is also used to mark at least one of the following: a preset number of preset type frames to be authenticated in each image group, and the authentication continuity of a preset number of preset type frames in the image group, wherein authentication continuity includes any one of continuous authentication, consecutive authentication frame count, and single frame authentication.

[0183] In some implementations, the aforementioned knowledge image frame may include a displayed knowledge image frame and / or a non-displayed knowledge image frame. The display and / or non-displayed knowledge image frames can be configured in the manner described above to determine whether authentication is required. For example, the first syntactic element may also be used to indicate whether authentication is required for the non-displayed knowledge image frame, the displayed knowledge image frame, or at least one of these requirements. Optionally, when the display knowledge image frame is configured to require authentication, the first syntactic element may also be used to indicate whether authentication is required for the non-displayed knowledge image frame.

[0184] The methods and syntactic elements described above for determining the target authentication object can be written into the security parameter set of the video stream.

[0185] The above method provides a way to determine the target authentication object of a video stream. It allows setting the type, number, and authentication continuity of the target frames, such as setting the frame types that must be authenticated, the frame types that can be authenticated, and providing the corresponding syntax element expressions. Users can flexibly configure the authentication object and improve the flexibility of video stream authentication.

[0186] To better understand the above implementation methods, this application provides several specific embodiments as examples for illustration.

[0187] Example 1

[0188] When the security parameter set supports authentication (i.e., authentication is required), all random access frames (e.g., IDR frames, CRA frames, LTR frames, RL frames, etc.) can be required to be authenticated. This is because if a random access frame is not authenticated, even if subsequent P-frames are authenticated, it may not guarantee that the bitstream has not been tampered with. It can be stipulated that if the security parameter set preceding a segment of the video bitstream supports authentication, then subsequent random access frames must be authenticated.

[0189] When the settings allow authentication for any image frame type, the syntax element hash_discard_p_pictures_flag is used to mark whether other frames besides randomly accessed frames need to be authenticated. 1 indicates that other frames are not authenticated, and 0 indicates that other frames are also authenticated.

[0190] Based on the marker that authentication of frames other than random access frames is required, the syntax element `total_picture_nums_minus2` is used to mark the number of image frames requiring authentication. The `total_picture_nums_minus2` syntax represents the number of image frames requiring authentication within an I-frame interval (i.e., a GOP group). For example, it can be the total number of authentication frames within an I-frame interval (i.e., a GOP group) minus 2 (where 2 can represent random access frames and other frames). The value range is 0 to 255. The default value is `total_picture_nums = 1`.

[0191] Based on the marking that authentication is required for frames other than the random access frames, the syntactic element successful_hash_pictures can be used to represent the authentication continuity of the total_picture_nums image frames that need to be authenticated within the GOP, that is, whether they are authenticated consecutively or one frame at a time.

[0192] The syntax related to centralized authentication of security parameters in this embodiment is as follows:

[0193]

[0194] The specific semantics of the syntactic elements of the security parameter set in this embodiment can be referred to the specific semantics of the above embodiments, and will not be repeated here.

[0195] Example 2

[0196] When the security parameter set supports authentication (i.e., authentication is required), all random access frames (e.g., IDR frames, CRA frames, LTR frames, RL frames, etc.) can be required to be authenticated. This is because if a random access frame is not authenticated, even if subsequent P-frames are authenticated, it may not guarantee that the bitstream has not been tampered with. It can be stipulated that if the security parameter set preceding a segment of the video bitstream supports authentication, then subsequent random access frames must be authenticated.

[0197] When the settings allow authentication for any image frame type, the syntax element hash_discard_p_pictures_flag is used to mark whether other frames besides randomly accessed frames need to be authenticated. 1 indicates that other frames are not authenticated, and 0 indicates that other frames are also authenticated.

[0198] Based on the marking that authentication is required for frames other than random access frames, the syntax element successful_hash_pictures is used to represent the number of consecutive authentication frames within a GOP. A value of 0 indicates that each frame is authenticated individually, and a value greater than 0 indicates that the number of consecutive authentication frames is reduced by one (e.g., the number of consecutive authentication frames is reduced by one when using the tree top hash method).

[0199] The syntax related to centralized authentication of security parameters in this embodiment is as follows:

[0200]

[0201] The specific semantics of the syntactic elements of the security parameter set in this embodiment can be referred to the specific semantics of the above embodiments, and will not be repeated here.

[0202] Example 3

[0203] The system is configured to authenticate only random access frames, while other frames are not authenticated. This means that only random access frames are used as the target for authentication, ensuring that key frames are not tampered with.

[0204] The syntax related to centralized authentication of security parameters in this embodiment is as follows:

[0205]

[0206] The specific semantics of the syntactic elements of the security parameter set in this embodiment can be referred to the specific semantics of the above embodiments, and will not be repeated here.

[0207] In some embodiments, please refer to Figure 9 This embodiment can be further extended to step S11 of the above embodiment. Obtaining the configuration authentication information of the video stream can include the following steps:

[0208] S113: Determine the corresponding target authentication method for each of the displayed knowledge image frames and the non-displayed knowledge image frames.

[0209] The configuration authentication information includes the target authentication object. In this embodiment, when the target authentication object is a knowledge image frame of at least one type, the authentication is explained in the special case of knowledge image frames.

[0210] In some implementations, at least one type of knowledge image frame includes displayed knowledge image frames and / or non-displayed knowledge image frames, such as LTR frames and CRR frames, where LTR frames are displayed knowledge image frames and CRR frames are non-displayed knowledge image frames. Knowledge image frames are identified by their knowledge image frame index number (IDX).

[0211] In some implementations, LTR frames and CRR frames may use the same authentication method or different authentication methods. The application does not limit whether LTR frames and CRR frames use the same authentication method.

[0212] In some implementations, LTR frames can be authenticated separately, and their authentication method can be the same as that of other frames, such as random access frames.

[0213] In some implementations, the settings of knowledge image frames can be authenticated individually or continuously. That is, the tags for displaying knowledge image frames and / or non-displaying knowledge image frames can be authenticated individually or continuously. In the case of individual authentication, LTR frames and CRR frames can only be authenticated individually. In the case of continuous authentication, LTR frames and CRR frames cannot be authenticated continuously with subsequent frames; continuous authentication can only start with an RL frame.

[0214] In some cases, the target authentication method can be determined separately for displayed knowledge image frames and non-displayed knowledge image frames. This means determining their respective target authentication methods, such as individual authentication, continuous authentication, hash value calculation, and signature methods. For example, the authentication method of LTR frames can be set to be the same as that of random access frames, or a separate authentication method can be set for LTR frames.

[0215] S114: Determine the same target authentication method for displayed knowledge image frames and non-displayed knowledge image frames, or determine the target authentication method for displayed knowledge image frames and / or non-displayed knowledge image frames as: the target authentication method corresponding to the first type of image frame.

[0216] In some cases, the same target authentication method can be determined for both displayed and non-displayed knowledge image frames. That is, LTR frames and CRR frames use the same target authentication method. Alternatively, the target authentication method for displayed and / or non-displayed knowledge image frames can be determined as the target authentication method corresponding to the first type of image frame. For example, LTR or CRR frames use the same authentication method as random access frames.

[0217] In some implementations, the target authentication method for LTR frames can be the same as that for random access frames.

[0218] In some implementations, since knowledge image frames are long-term reference frames, other frames may have reference relationships with frames in the knowledge graph during encoding or decoding processes. Knowledge image frames are identified by their knowledge image frame index number (IDX).

[0219] In some embodiments, when the target authentication object is a knowledge image frame, step S12 is extended. In the process of processing the video stream according to the configured authentication information to obtain authentication data, each target authentication object of the video stream can be processed separately according to the target authentication method to obtain the authentication data corresponding to the target authentication object.

[0220] Specifically, the knowledge image frame can be a display knowledge image frame (LTR frame) and / or a non-display knowledge image frame (CRR frame), and the authentication data belonging to the LTR frame and / or CRR frame can be marked in the authentication data.

[0221] In some implementations, a fourth syntactic element can be used to mark the type of the authentication data corresponding to the target authentication object, such as determining the type of knowledge image frame to which the authentication data belongs. The fourth syntactic element can be used to mark at least one of the following: whether it is authentication data of a knowledge image frame, whether it is authentication data of a displayed knowledge image frame, and whether it is authentication data of a non-displayed knowledge image frame.

[0222] Optionally, when it is necessary to distinguish the authentication data to which LTR frames and CRR frames belong, a fourth syntactic element can be used to mark whether the authentication data belongs to a knowledge image frame (LTR frame or CRR frame) and to determine the LTR frame or CRR frame to which the authentication data belongs.

[0223] Optionally, it is possible to distinguish whether the corresponding authentication data belongs to ordinary display image authentication data or knowledge image frame authentication data. Syntactic elements can be used to mark the index number of the knowledge image frame transmitting the authentication data or the index number of the knowledge image to be authenticated when the authentication data belongs to the knowledge image frame; otherwise, the image frame number transmitting the authentication data or the image frame number containing the authentication data is used.

[0224] Optionally, when authenticating LTR frames separately, in the same manner as CRR frames, the syntax element `is_library_flag` can be used to distinguish whether the authentication data NAL is ordinary display image authentication data or knowledge image frame authentication data. If it is a knowledge image frame, the index number of the authenticated knowledge image frame needs to be transmitted; otherwise, the sequence number of the image frame containing the authentication data is transmitted.

[0225] Optionally, when the LTR frame is authenticated in the same way as all random access frames, the syntax element is_crr_flag is used to distinguish whether the authentication data NAL is authentication data for a normal display image, a display knowledge image, or a non-display knowledge image frame. If it is a non-display knowledge image, the authentication knowledge image index number needs to be transmitted; otherwise, the image frame number containing the authentication data is transmitted.

[0226] For authentication configuration of CRR frames, LTR frames, and ordinary display images (such as image frames of other types besides CRR and LTR frames), you can set their corresponding individual authentication, continuous authentication, etc., and the corresponding flags for their authentication data are as follows: When CRR and LTR frames can only be authenticated individually, their authentication data can be represented by the syntax flag `is_library_flag` being set to 1. In the case of continuous authentication, they cannot be continuously authenticated with subsequent frames; continuous authentication starts with an RL frame, and its authentication data can be represented by the syntax flag `is_library_flag` being set to 0. For display images, they can be authenticated individually or continuously. In individual authentication, their authentication data is represented by the syntax element flag `is_library_flag` being set to 0. In continuous authentication, the random access frame is used as the starting frame, and its authentication data is represented by the syntax element flag `is_library_flag` being set to 0.

[0227] The above method provides an authentication method for different categories of knowledge image frames, especially for LTR frames. It can be authenticated individually or using the same authentication method as other frames. It also provides the expression of corresponding syntactic elements, which can set different authentication methods for different categories of knowledge image frames for different scenarios, thereby further improving the flexibility of video stream authentication.

[0228] The following provides several examples to illustrate the above implementation methods.

[0229] Example 4

[0230] LTR frames are authenticated separately, in the same way as CRR frames.

[0231] In this method, the syntactic element `is_library_flag` is used to distinguish whether the authentication data NAL is ordinary display image authentication data or knowledge image frame authentication data. If it is knowledge image frame authentication data, the knowledge image index of the authentication needs to be transmitted; otherwise, the image frame sequence number containing the authentication data is transmitted.

[0232] The specific methods for single-frame authentication and multi-frame continuous authentication under this approach are as follows:

[0233]

[0234] The specific syntax related to authentication in the authentication data corresponding to this embodiment is as follows:

[0235]

[0236]

[0237] The specific semantics of the above syntax are as follows:

[0238] (1) Knowledge Image Authentication Data Flag is_library_flag

[0239] A binary variable. A value of "1" indicates that the authentication data is the signature data of a knowledge image (LTR frame or CRR frame), i.e., authentication data; a value of "0" indicates that the authentication data is the signature data of a normal display image, i.e., authentication data.

[0240] (2) Authentication knowledge image index: authentication_library_picture_index

[0241] n-bit unsigned integer. Indicates the index of the knowledge image corresponding to the knowledge bitstream from which the current authentication data applies; the value ranges from 0 to 511. If `authentication_library_picture_index` does not exist in the bitstream, its default value is 0.

[0242] (3) Image frame_num containing authentication data

[0243] An 8-bit unsigned integer. This image is the display image whose nearest decoding order index (decode_order_index) before the authentication data NAL unit is the same as the frame_num of the authentication data. When successive_hash_pictures_minus1 equals 0, frame_num indicates the display image corresponding to the authentication data; when it is greater than 0, frame_num indicates the last of consecutive SuccessiveHashPictures display images.

[0244] (4) Temporal hierarchical independent authentication flag tsvc_is_independent_authentication

[0245] A binary variable. A value of "1" indicates that the data it authenticates can only contain information from the current time domain layer and its lower time domain layers; a value of "0" indicates that the data it authenticates contains information from all time domain layers. If tsvc_is_independent_authentication does not exist in the bitstream, its default value is 0.

[0246] (5) Temporal ID of the current authentication data

[0247] A 3-digit unsigned integer. Indicates the time-layer identifier of the current authentication data. The value range of the time-layer identifier is 0 to MAX_TEMPORAL_ID.

[0248] (6) The number of consecutively authenticated images in the time domain layer where the current authentication data is located: successive_hash_pictures_temporal

[0249] An 8-bit unsigned integer. When tsvc_is_independent_authentication is "1", it indicates the number of consecutively authenticated images in the time domain layer where the current authentication data is located. The value should be between 0 and 255.

[0250] (7) The length of the signature data: authentication_data_length_minus1

[0251] An 8-bit unsigned integer. Adding 1 indicates the length of the signature data, in bytes, and the value should be between 0 and 255.

[0252] (8) Number of bytes in the signature data: authentication_data[i]

[0253] An 8-bit unsigned integer. The i-th byte of a signature data set, which should be Base64 encoded.

[0254] Example 5

[0255] LTR frames are authenticated in the same way as all random access frames.

[0256] In this method, the syntactic element `is_non_output_library_flag` is used to distinguish whether the authentication data NAL is authentication data for a regular display image, a display knowledge image, or a non-display knowledge image frame. If it is a non-display knowledge image, the authentication knowledge image index needs to be transmitted; otherwise, the image frame sequence number containing the authentication data is transmitted.

[0257] The specific methods for single-frame authentication and multi-frame continuous authentication under this approach are as follows:

[0258]

[0259]

[0260] The specific syntax related to authentication in the authentication data corresponding to this embodiment is as follows:

[0261]

[0262] The specific semantics of the above syntax are as follows:

[0263] (1) Knowledge Image Authentication Data Flag is_non_output_library_flag

[0264] A binary variable. A value of "1" indicates that the authentication data is the signature data of a non-display knowledge image frame; a value of "0" indicates that the authentication data is the signature data of a normal display image or a display knowledge image frame.

[0265] (2) Authentication knowledge image index: authentication_library_picture_index

[0266] n-bit unsigned integer. Indicates the index of the knowledge image corresponding to the knowledge bitstream from which the current authentication data applies; the value ranges from 0 to 511. If `authentication_library_picture_index` does not exist in the bitstream, its default value is 0.

[0267] (3) Image frame_num containing authentication data

[0268] An 8-bit unsigned integer. This image is the display image or display knowledge image whose nearest decoding order index (decode_order_index) is the same as the frame_num of the authentication data before the NAL unit. When successive_hash_pictures_minus1 equals 0, frame_num indicates the display image and display knowledge image corresponding to the authentication data; when it is greater than 0, frame_num indicates the last of consecutive SuccessiveHashPictures display images or display knowledge images.

[0269] (4) Temporal hierarchical independent authentication flag tsvc_is_independent_authentication

[0270] A binary variable. A value of "1" indicates that the data it authenticates can only contain information from the current time domain layer and its lower time domain layers; a value of "0" indicates that the data it authenticates contains information from all time domain layers. If tsvc_is_independent_authentication does not exist in the bitstream, its default value is 0.

[0271] (5) Temporal ID of the current authentication data

[0272] A 3-digit unsigned integer. Indicates the time-layer identifier of the current authentication data. The value range of the time-layer identifier is 0 to MAX_TEMPORAL_ID.

[0273] (6) The number of consecutively authenticated images in the time domain layer where the current authentication data is located: successive_hash_pictures_temporal

[0274] An 8-bit unsigned integer. When tsvc_is_independent_authentication is "1", it indicates the number of consecutively authenticated images in the time domain layer where the current authentication data is located. The value should be between 0 and 255.

[0275] (7) The length of the signature data: authentication_data_length_minus1

[0276] An 8-bit unsigned integer. Adding 1 indicates the length of the signature data, in bytes, and the value should be between 0 and 255.

[0277] (8) Number of bytes in the signature data: authentication_data[i]

[0278] An 8-bit unsigned integer. The i-th byte of a signature data set, which should be Base64 encoded.

[0279] Example 6

[0280] LTR frames are authenticated separately, while sharing syntax with CRR frames.

[0281] The syntax element is_library_flag marks whether the current authentication data is knowledge image data. Knowledge images include two types: LTR displayed knowledge images and CRR fragmented transmission non-display knowledge images. When the syntax is 1, it means that the current authentication data NAL is knowledge image authentication data (LTR frame or CRR frame), and when it is 0, it means that the current authentication data NAL is not knowledge image authentication data.

[0282] When the syntax is_library_flag is 1, the index number of the knowledge image corresponding to the knowledge bitstream that the current authentication data is applied to is marked by authentication_library_picture_index. The range can be 0 to 511, and the default is 0.

[0283] The specific syntax related to authentication in the authentication data corresponding to this embodiment is as follows:

[0284]

[0285] The specific semantics of the syntactic elements of the authentication data in this embodiment can be referred to the specific semantics of the above embodiments, and will not be repeated here.

[0286] Example 7

[0287] LTR frames are authenticated separately, distinguishing them from CRR frames.

[0288] The syntax element `library_type_mode` marks whether the current authentication data is knowledge image data, and if it is knowledge image, whether it is LTR displayed knowledge image or CRR fragmented knowledge image. When the syntax is 1, it means that the current authentication data NAL is CRR authentication data; when the syntax is 2, it means that the current authentication data NAL is LTR authentication data; and when it is 0, it means that the current authentication data NAL is not knowledge image authentication data.

[0289] When library_type_mode is 1 or 2, authentication_library_picture_index marks the index of the knowledge image corresponding to the knowledge bitstream that the current authentication data is applied to, ranging from 0 to 511, with a default value of 0.

[0290] The library_type_mode value is 3, which is reserved.

[0291] The specific syntax related to authentication in the authentication data corresponding to this embodiment is as follows:

[0292]

[0293] The specific semantics of the syntactic elements of the authentication data in this embodiment can be referred to the specific semantics of the above embodiments, and will not be repeated here.

[0294] In some embodiments, step S11 of the above embodiment can be further extended. The configuration authentication information includes a target authentication method, which includes signature processing. By obtaining the configuration authentication information of the video stream, this embodiment can determine the target authentication method corresponding to the target authentication object or the object to be authenticated, and subsequently perform signature processing according to the target authentication method.

[0295] In some implementations, a second syntactic element can be used to determine the target authentication method corresponding to the target authentication object. This second syntactic element is used to configure a first preset signing method for each target frame of the target authentication object. The first preset signing method includes: performing a first hash process on multiple coded segments of the target frame, and obtaining the signed data of the target frame based on the obtained first hash result; or, performing a second hash process on the concatenation result of multiple coded segments of the target frame, obtaining a second hash result, and obtaining the signed data of the target frame based on the second hash result. This method can be adapted to target authentication objects that require individual or continuous authentication.

[0296] Specifically, a first hash process is performed on multiple coded segments of the target frame, such as hashing according to a tree structure. Based on the obtained first hash result, the top hash value (also called the root hash value) of the first hash result is signed to obtain the signed data of the target frame. For example, if the hash value of coded segment NAL1 is H1 and the hash value of coded segment NAL2 is H2, then hashing H1 of coded segment NAL1 and H2 of coded segment NAL2 yields hash value 12, which is the top hash value of coded segment NAL1 and coded segment NAL2. Following this method, for example, the top hash value of hashing H1 of coded segment NAL1 and Hn of coded segment NALn can be used as the signed data of the target frame.

[0297] The multiple coded segments (NALs) of the target frame are concatenated to obtain the concatenated result. Then, the concatenated result is subjected to a second hash process to obtain the second hash result. The second hash result is then signed to obtain the signed data of the frame.

[0298] In some implementations, the first preset signature method for multiple coded segments of the target frame can be preset, or the second syntactic element can be used to mark which first preset signature method is used.

[0299] In some embodiments, when the target authentication object contains multiple target frames, a second preset signing method may be adopted, which includes processing the multiple target frames to obtain signing data corresponding to the multiple target frames.

[0300] The second preset signing method includes: performing a third hash process on multiple target frames, and obtaining the signed data for the multiple target frames based on the obtained third hash result. For example, hashing multiple target frames according to a tree structure and signing the hash value at the top of the tree to obtain the signed data corresponding to the multiple target frames, which can be adapted to target authentication objects for continuous authentication. Alternatively, performing a fourth hash process on the concatenation result of multiple coded segments of multiple target frames to obtain a fourth hash result, and obtaining the signed data for the multiple target frames based on the fourth hash result. For example, concatenating all coded segments NAL of multiple target frames together, hashing the concatenation result, and signing the hash value to obtain the signed data corresponding to the multiple target frames, which can be adapted to target authentication objects for continuous authentication. Alternatively, performing a fifth hash process on multiple target frames to obtain the signed data for each target frame separately, that is, each target frame corresponds to a hash value and a signed data, which can be adapted to target authentication objects for individual authentication.

[0301] In some implementations, the second syntax element is also used to configure a second preset signature method for multiple target frames of the target authentication object. For example, the above-mentioned second preset signature method for multiple target frames can be preset, or the above-mentioned second syntax element can be used to indicate which of the above-mentioned second preset signature methods is used.

[0302] In some implementations, the signing process described above can be understood as hashing or signing. After obtaining the signed data, it can also be encoded to obtain the corresponding authentication data NAL.

[0303] The above methods can include authentication methods for multiple NALs in a single frame, authentication methods for multiple frames, and corresponding syntax element expression methods. They provide a variety of authentication methods, allow flexible configuration of authentication data generation methods, and can adapt to various application scenarios and situations, making them highly adaptable.

[0304] The above method is illustrated in Example 8 below.

[0305] Example 8

[0306] In the security parameter set, the syntax element once_hash_nals is set to indicate whether to perform hashing according to the tree structure. A value of 0 indicates that the hashing is performed according to the tree structure, while a value of 1 indicates that all data that needs to be authenticated in the NAL is concatenated together and hashed once.

[0307] In the security parameter set, the syntax element once_hash_pictures is set to indicate whether to perform hashing according to the tree structure. A value of 0 indicates that hashing is performed according to the tree structure, while a value of 1 indicates that the data that needs to be authenticated in all frames is concatenated together and hashed once.

[0308] The syntax related to centralized authentication of security parameters in this embodiment is as follows:

[0309]

[0310] The specific semantics of the syntactic elements of the security parameter set in this embodiment can be referred to the specific semantics of the above embodiments, and will not be repeated here.

[0311] In some embodiments, step S11 of the above embodiments can be further extended. The target authentication method includes signature processing and encryption processing; in this embodiment, authentication can be performed by combining the encryption and decryption processes.

[0312] In some implementations, a third syntactic element can be used to determine the authentication order of signature processing and encryption processing in the target authentication method corresponding to each target authentication object; wherein, the authentication order includes performing encryption processing first and then signature processing, or performing signature processing first and then encryption processing.

[0313] In one authentication sequence, where encryption precedes signing, after the target bitstream data is transmitted or stored, the decoding end can perform signature verification before decryption. Similarly, in another authentication sequence, where signing precedes encryption, after the target bitstream data is transmitted or stored, the decoding end can perform decryption before signature verification.

[0314] A third syntactic element can be added to the security parameter set to indicate the authentication order of signature processing and encryption processing. A value of 1 indicates that the bitstream is encrypted first and then signed, while a value of 0 indicates that the bitstream is signed first and then encrypted.

[0315] In some implementations, the authentication order of the signature and encryption processes can be preset, or a syntactic element can be added to the security parameter set to indicate which authentication order is used.

[0316] The above method will be illustrated with a specific example below.

[0317] Please see Figure 10 For the authentication process where encryption is performed first and then signature is performed, taking a single frame of coded data from a target frame as an example, it can contain SPS NAL, PPS NAL, patch NAL, and surveillance extended NAL. Encryption information such as the encryption key (iv) and VKEK version obtained during the encryption process can be written into the security parameter set. Then, the NAL header information and anti-contention bytes are removed from the coded data of the target frame. The target frame is then encrypted, anti-contention bytes are added, the NAL header information is modified, the authentication mark is encrypted, and the NAL header information is added to obtain the encrypted NAL of the target frame.

[0318] The NAL of the encrypted target frame is then signed, recording relevant configuration parameters such as the number of frames requiring authentication, authentication method, and whether continuous or individual authentication is required, into a security parameter set. The NAL of the encrypted target frame is then hashed according to the target authentication method, followed by signing. Finally, it is Base64 encoded to obtain the authentication data NAL of the target frame.

[0319] Next, the security parameter set, the authentication data NAL of the target frame, and the encrypted target frame NAL are encapsulated to obtain the target bitstream data.

[0320] Please see Figure 11The authentication process follows a sequence of signing followed by encryption. Taking a single encoded frame of a target frame as an example, it may contain SPS NAL, PPS NAL, patch NAL, and surveillance extended NAL. Signing can be performed first, recording configuration parameters such as the number of frames requiring authentication, authentication method, and whether continuous or individual authentication is required, into a security parameter set. The target frame's NAL is then hashed according to the target authentication method, followed by signing, and finally Base64 encoding to obtain the target frame's authentication data NAL.

[0321] Then, encryption is performed. The encryption key iv and VKEK version obtained during the encryption process are written into the security parameter set. The NAL header information and anti-contention byte are removed from the coded slice data of the target frame. The target frame is then encrypted, anti-contention byte is added, NAL header information is modified, authentication mark is encrypted, and NAL header information is added to obtain the NAL of the encrypted target frame.

[0322] Next, the security parameter set, the authentication data NAL of the target frame, and the encrypted target frame NAL are encapsulated to obtain the target bitstream data.

[0323] The above method, combined with encryption and decryption for authentication, can support the order of encryption / decryption and authentication under different encryption / decryption conditions. It can also add syntax to support two different orders at the same time, which can flexibly specify the order of authentication and encryption / decryption, thus increasing flexibility.

[0324] Please see Figure 12 , Figure 12 This is a flowchart illustrating a second embodiment of the video stream authentication method of this application. The specific steps of the video stream authentication method in this embodiment can be executed using the decoding end described above. The method may include the following steps:

[0325] S21: Receive target bitstream data, wherein the target bitstream data is obtained by the encoding end performing the above-mentioned video bitstream authentication method.

[0326] The encoding end can transmit the target bitstream data to the decoding end, enabling the decoding end to receive the target bitstream data. If the encoding end stores the target bitstream data, it can then be used as a decoding end to perform operations such as decoding, playback, or storage of the target bitstream data.

[0327] The specific implementation method of this step can be referred to the specific implementation process of the decoding end described above, and will not be repeated here.

[0328] S22: Decode the target bitstream data to obtain the video bitstream, authentication data, and configuration authentication information.

[0329] Parsing or decoding the target bitstream data can yield the encapsulated video bitstream, authentication data, and configuration authentication information (a set of security parameters).

[0330] S23: Use authentication data and configuration authentication information to authenticate the video stream.

[0331] Authentication can be divided into signature processing and signature verification processing. Both processes require calculating hash values ​​for the same NAL (Network Algorithm) of the same frame in the same way. The security parameter set records configuration authentication information, including the target authentication object and / or the target authentication method. The target authentication object of the video stream can be processed according to the recorded target authentication method to obtain the verification data corresponding to the target authentication object. Then, the verification data of the target authentication object corresponding to the video stream is compared with the authentication data to obtain the authentication result of the video stream. If the comparison and verification results are consistent, the authentication result of the video stream is successful; otherwise, the authentication fails.

[0332] Specifically, during the comparison and verification process, the authentication data can be decoded to obtain the signed data, which can also be called signature data. The signature data can be decrypted to obtain the hash value 1 corresponding to the video bitstream. The target authentication object is processed through the above target authentication method to obtain hash value 2 (verification data). The hash values ​​1 and 2 are compared to determine whether the verification data and authentication data are consistent based on the comparison consistency.

[0333] The specific implementation of this embodiment can be referred to the implementation process of the above embodiments, and will not be repeated here.

[0334] In accordance with the above embodiments, this application provides an encoding terminal for implementing the steps of the first embodiment of the video stream authentication method. Please refer to... Figure 13 , Figure 13 This is a schematic diagram of the structure of an embodiment of the encoding end of this application. The encoding end 30 includes an authentication module 31, a processing module 32, and an encapsulation module 33. The authentication module 31, processing module 32, and encapsulation module 33 are interconnected. The authentication module 31 is used to obtain configuration authentication information of the video stream, wherein the configuration authentication information includes at least one of a target authentication object and a target authentication method, the target authentication object containing the target frame to be authenticated, and the target authentication method being the authentication method corresponding to the target frame. The processing module 32 is used to process the video stream according to the configuration authentication information to obtain authentication data. The encapsulation module 33 is used to encapsulate the configuration authentication information, authentication data, and video stream to obtain target stream data; wherein the authentication data and configuration authentication information are used by the decoding end to authenticate the video stream during the decoding process of the target stream data. Specific implementation details of this embodiment can be found in the implementation process of the above embodiments, and will not be repeated here.

[0335] In accordance with the above embodiments, this application provides a decoding terminal, used to implement the steps of the second embodiment of the video stream authentication method described above. Please refer to... Figure 14 , Figure 14 This is a schematic diagram of the structure of an embodiment of the decoding end of this application. The decoding end 40 includes a receiving module 41, a decoding module 42, and a verification module 43. The receiving module 41, decoding module 42, and verification module 43 are interconnected. The receiving module 41 is used to receive target bitstream data, which is obtained by the encoding end using the video bitstream authentication method described above. The decoding module 42 is used to decode the target bitstream data to obtain the video bitstream, authentication data, and configuration authentication information. The verification module 43 is used to authenticate the video bitstream using the authentication data and configuration authentication information. Specific implementation details of this embodiment can be found in the implementation process of the above embodiments, and will not be repeated here.

[0336] Regarding the above embodiments, this application provides a computer device; please refer to [link / reference]. Figure 15 , Figure 15 This is a schematic diagram of the structure of a computer device according to an embodiment of the present application. The computer device 50 includes a memory 51 and a processor 52, wherein the memory 51 and the processor 52 are coupled to each other. The memory 51 stores program data, and the processor 52 is used to execute the program data to implement the steps of any embodiment of the video stream authentication method described above. The computer device 50 can serve as the encoding end and / or decoding end in the video encoding / decoding system of the above embodiments, executing the steps of any embodiment of the video stream authentication method described above.

[0337] In this embodiment, processor 52 can also be referred to as CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor can be a microprocessor, or processor 52 can be any conventional processor.

[0338] The methods described in the above embodiments can be implemented as computer programs; therefore, this application proposes a computer-readable storage medium. Please refer to [link to relevant documentation]. Figure 16 , Figure 16 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 60 stores program data 61 that can be executed by a processor. The program data 61 can be executed by the processor to implement the steps of any embodiment of the video stream authentication method described above.

[0339] In this embodiment, the computer-readable storage medium 60 can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a medium that can store program data 61. Alternatively, it can be a server that stores the program data 61. The server can send the stored program data 61 to other devices for execution, or it can run the stored program data 61 itself.

[0340] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0341] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0342] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0343] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application.

[0344] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, and thus stored in a computer-readable storage medium for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Therefore, this application is not limited to any particular hardware and software combination.

[0345] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for authenticating video streams, characterized in that, include: Obtain the configuration authentication information of the video stream, wherein the configuration authentication information includes a target authentication object and a target authentication method, the target authentication object contains the target frame to be authenticated, and the target authentication method is the authentication method corresponding to the target frame; The video stream is processed according to the configured authentication information to obtain authentication data; The configuration authentication information, authentication data, and video stream are encapsulated to obtain target stream data; wherein, the authentication data and configuration authentication information are used by the decoding end to authenticate the video stream during the decoding process of the target stream data; The step of obtaining the configuration authentication information of the video stream includes: determining a first type of image frame as the target authentication object from the multiple types of image frames contained in the video stream, wherein the first type of target frame includes at least one of: random access frame, preset key frame, and knowledge image frame. Wherein, the target authentication object is a knowledge image frame, which includes displayed knowledge image frames and non-displayed knowledge image frames; the acquisition of the configuration authentication information of the video stream further includes: determining the target authentication method corresponding to each of the displayed knowledge image frames and non-displayed knowledge image frames; or, determining the same target authentication method for the displayed knowledge image frames and non-displayed knowledge image frames; or, determining the target authentication method of at least one of the following image frames as the target authentication method corresponding to the first type of image frame: displayed knowledge image frame, non-displayed knowledge image frame; wherein, the target authentication method includes individual authentication or continuous authentication.

2. The method according to claim 1, characterized in that, The configuration authentication information includes the target authentication object; the configuration authentication information for obtaining the video stream includes: The first syntactic element is used to obtain the second type of image frame of the video stream, which is used as the target authentication object; wherein, the first syntactic element is used to mark whether a preset type frame needs to be authenticated, and the second type of image frame is a preset type frame marked as needing to be authenticated; the preset type frame includes any one of the following: image frames other than the first type of image frame, knowledge image frames, and third type of image frames; the third type of image frame is an image frame other than the knowledge image frame and the preset key frame.

3. The method according to claim 2, characterized in that, The first syntactic element is also used to mark at least one of the following: a preset number of preset type frames requiring authentication in each image group, and the authentication continuity of the preset number of preset type frames in the image group, wherein the authentication continuity includes any one of continuous authentication, consecutive authentication frame count, and single-frame authentication; and / or, The knowledge image frame includes a displayed knowledge image frame and / or a non-displayed knowledge image frame; the first syntactic element is also used to mark whether the non-displayed knowledge image frame needs authentication, whether the displayed knowledge image frame needs authentication, or whether the knowledge image frame needs authentication.

4. The method according to claim 1, characterized in that, The configuration authentication information includes a target authentication method, which includes signature processing; the configuration authentication information for obtaining the video stream includes: The target authentication method corresponding to the target authentication object is determined using the second syntactic element. The second syntax element is used to configure a first preset signing method for each target frame of the target authentication object. The first preset signing method includes: performing a first hash process on multiple coded segments of the target frame, and obtaining the signing data of the target frame based on the obtained first hash result; or, performing a second hash process on the concatenation result of multiple coded segments of the target frame, obtaining a second hash result, and obtaining the signing data of the target frame based on the second hash result.

5. The method according to claim 4, characterized in that, In the case where the target authentication object contains multiple target frames; the second syntax element is also used to configure a second preset signature method for the multiple target frames of the target authentication object; The second preset signature method includes: A third hash process is performed on multiple target frames, and the signature data of the multiple target frames is obtained based on the obtained third hash result; or, a fourth hash process is performed on the concatenation result of multiple coded segments of multiple target frames to obtain a fourth hash result, and the signature data of the multiple target frames is obtained based on the fourth hash result; or, a fifth hash process is performed on multiple target frames respectively to obtain the signature data of each target frame respectively.

6. The method according to claim 1, characterized in that, The target authentication method includes signature processing and encryption processing; the acquisition of the video stream configuration authentication information also includes: The third syntactic element is used to determine the authentication order of signature processing and encryption processing in the target authentication method corresponding to each target authentication object; wherein, the authentication order includes performing the encryption processing first and then the signature processing, or performing the signature processing first and then the encryption processing.

7. The method according to claim 1, characterized in that, The configuration authentication information includes the target authentication object and the target authentication method; the process of processing the video stream according to the configuration authentication information to obtain authentication data includes: According to the target authentication method, each target authentication object in the video stream is processed to obtain the authentication data corresponding to the target authentication object.

8. The method according to claim 7, characterized in that, When the target authentication object is a knowledge image frame, the type of the authentication data is marked by a fourth syntactic element in the authentication data corresponding to the target authentication object. The fourth syntactic element is used to mark at least one of the following: whether it is authentication data of a knowledge image frame, whether it is authentication data of a displayed knowledge image frame, and whether it is authentication data of a non-displayed knowledge image frame.

9. The method according to claim 8, characterized in that, The step of encapsulating the configuration authentication information, authentication data, and video bitstream to obtain target bitstream data includes: Write the relevant configuration parameters of the authentication information into the security parameter set; The security parameter set, the authentication data, and the video stream are encapsulated to obtain the target stream data.

10. The method according to claim 8, characterized in that, The authentication data includes authentication data corresponding to image frames within an image group; after processing each target authentication object of the video stream according to the target authentication method to obtain the authentication data corresponding to the target authentication object, the process includes: The authentication data corresponding to the current image group is placed in the encapsulation position corresponding to the current image group so that the authentication data corresponding to the current image group is transmitted when the current image group is transmitted; or, the authentication data corresponding to the current image group is placed in the encapsulation position corresponding to the subsequent image group so that the authentication data corresponding to the current image group is transmitted when the subsequent image group is transmitted, wherein the subsequent image group is the image group following the current image group.

11. A method for authenticating video streams, characterized in that, include: Receive target bitstream data, wherein the target bitstream data is obtained by the encoding end using the video bitstream authentication method according to any one of claims 1 to 10; The target bitstream data is decoded to obtain the video bitstream, authentication data, and configuration authentication information; The video stream is authenticated using the authentication data and configured authentication information.

12. The method according to claim 11, characterized in that, The configuration authentication information includes the target authentication object and the target authentication method; the authentication of the video stream using the authentication data and configuration authentication information includes: The target authentication object of the video stream is processed using the target authentication method to obtain verification data; The verification data is compared and verified with the authentication data to obtain the authentication result of the video stream.

13. A computer device, characterized in that, The method includes a memory and a processor coupled to each other, the memory storing program data, and the processor executing the program data to implement the steps of the method according to any one of claims 1 to 10, and / or to implement the steps of the method according to any one of claims 11 to 12.

14. A computer-readable storage medium, characterized in that, The system stores program data that can be executed by a processor, the processor being configured to execute the program data to implement the steps of the method according to any one of claims 1 to 10, and / or to implement the steps of the method according to any one of claims 11 to 12.

Citation Information

Patent Citations

  • Video signal source encryption and decryption system and method based on AVS2 entropy coding of block encryption

    CN112533001A

  • Method and apparatus for signing encoded video sequence

    CN116233568A