Secure video data transmission method based on selective encryption technology

By adopting selective encryption technology in video data transmission, only the important binary symbols of the video stream are encrypted by the CTR mode of the AES algorithm, the problem of difficulty in taking into account both security and real-time in the prior art is solved, and efficient, secure and reliable video data transmission is achieved.

CN120111281APending Publication Date: 2025-06-06BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510099098.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-06-06

Smart Images

  • Figure CN120111281A_ABST
    Figure CN120111281A_ABST
Patent Text Reader

Abstract

The invention discloses a secure video data transmission method based on a selective encryption technology, and belongs to the field of video data encryption transmission. The implementation method comprises the following steps of: performing discrete cosine transform on video frame image data, and converting a pixel value matrix in a video frame into a transformation coefficient TC matrix; carrying out binarization processing on the transformation coefficient through TRp; checking whether the transformation coefficient can be encrypted or not, and determining that the transformation coefficient at the current position does not influence the adjacent transformation coefficient at the current position; a CTR mode of an AES algorithm is adopted as a pseudo-random number generator, selected syntax elements are encrypted in a stream cipher form, it is ensured that the encrypted video stream can still be decoded by a standard decoder, and meanwhile the transmission data volume is not increased; the encrypted symbol is recovered by performing an XOR operation on the ciphertext and the same pseudo-random number generator output. According to the invention, secure video data transmission based on selective encryption can be realized, the transmission efficiency, security and reliability of video stream data can be improved, and the overhead of encryption calculation is significantly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a secure video data transmission method based on a selective encryption technology, belonging to the field of video data encryption transmission. Background Art

[0002] With the widespread application of video in the fields of communication, entertainment, and surveillance, the demand for video data transmission has increased significantly. Especially in high-definition video, ultra-high-definition video, and real-time video applications, the transmission bandwidth and stability requirements have become higher. The amount of video data is large, and the transmission process involves multiple network nodes, so security issues have become particularly important. Video data is vulnerable to various security threats during transmission, including eavesdropping, data tampering, and replay attacks. If appropriate encryption measures are not taken, sensitive video content such as conference videos, surveillance videos, and confidential data transmission may be obtained or tampered with by criminals, causing serious consequences. The security of video data includes confidentiality, integrity, and availability. Confidentiality refers to the ability to prevent unauthorized users from accessing; integrity refers to the ability to ensure that data has not been tampered with; and availability refers to ensuring that it can still be transmitted normally under network attacks.

[0003] At present, most of the methods for secure video data transmission use symmetric encryption and asymmetric encryption technology, that is, the sender uses a key to encrypt the data. When the data reaches the receiver, the receiver uses the key to decrypt the data. In symmetric encryption technology, the sender and the receiver use the same key, and in asymmetric encryption technology, the sender and the receiver use different keys. However, they both have shortcomings in terms of security and real-time performance:

[0004] (1) Symmetric encryption requires the encryption and decryption parties to use the same key. Therefore, the key must be securely distributed when the two communicating parties first establish contact. If the key distribution process is not secure, attackers can intercept the key and decrypt the communication content. Symmetric encryption algorithms rely on shared keys. In point-to-point, multi-point or dynamic networks, key distribution is very complex and vulnerable to attacks. At the same time, when there are multiple communicating entities in the system, each pair of entities requires a pair of independent keys. As the number of communicating parties increases, the complexity of key management also increases significantly. Once the key is intercepted or stolen, the entire encryption system will be completely ineffective.

[0005] (2) The encryption and decryption process of asymmetric encryption is more complicated than that of symmetric encryption. The complexity of asymmetric encryption algorithms is high, the amount of calculation is large, and the execution speed is slow. For application scenarios that require fast processing, such as real-time video communication, the performance of asymmetric encryption cannot meet the requirements. At the same time, the keys of asymmetric encryption usually need to be very long, which not only increases the burden of storage and transmission, but also further increases the computational overhead of encryption and decryption. When transmitting large amounts of data, the use of asymmetric encryption will cause serious performance problems.

[0006] The root cause of the above shortcomings is that symmetric encryption relies on both parties sharing the same key for encryption and decryption. Therefore, before the two parties establish secure communication, it is necessary to ensure that the key can be distributed through a secure channel. Due to the security threats such as interception and eavesdropping in open environments such as the Internet, key distribution is more complicated and risky, especially in distributed systems or dynamic networks. In symmetric encryption systems, keys are the only means to protect data. Therefore, the leakage of keys will cause the entire encryption system to fail. Whether in transmission or storage, the security of keys faces great challenges. Asymmetric encryption relies on the computational difficulty of complex mathematical problems to ensure security, such as large integer decomposition and discrete logarithm problems. These problems require a lot of calculations when decrypting, especially when the key is long, the computational complexity will increase dramatically.

[0007] In summary, currently in the field of video transmission and security, there is a lack of a selective encryption technology that can perform efficient encryption while ensuring data format compatibility and a constant bit rate. Summary of the invention

[0008] The purpose of the present invention is to provide a secure video data transmission method based on selective encryption technology. By using the counter (CTR, CounTeR) mode of the Advanced Encryption Standard (AES) algorithm, the encryption operation is limited to some important binary symbols, ensuring that the encrypted video stream can still be decoded by a standard decoder without increasing the amount of transmitted data. Encryption processing is performed at the context-adaptive binary arithmetic coding CABAC (Context-Adaptive Binary Arithmetic Coding) level in the encoding stage to avoid changing the bit rate or video data structure after encryption. The security of video data transmission is improved by selective encryption technology, and the video content is protected from illegal access or theft; at the same time, by encrypting only the necessary data parts, the overhead of encryption calculation is significantly reduced, so that the encryption operation will not affect the transmission rate and decoding performance of the video while maintaining high efficiency. The present invention can improve the transmission efficiency, security and reliability of video stream data and significantly reduce the overhead of encryption calculation.

[0009] In order to achieve the above object, the technical solution of the present invention is as follows:

[0010] The present invention discloses a method for transmitting secure video data based on selective encryption, comprising: 1) performing discrete cosine transform on video frame image data, and converting a pixel value matrix in the video frame into a transform coefficient TC (Transform Coeffcients) matrix; 2) processing the transform coefficient matrix in an anti-diagonal scanning order; 3) checking whether the transform coefficient can be encrypted and whether the transform coefficient at the current position affects the adjacent transform coefficient at the current position; 4) encrypting a binary sequence after binarization using an AES algorithm; and 5) restoring the encryption symbol by performing an XOR operation on the ciphertext and the output value of the same pseudo-random number generator.

[0011] The present invention discloses a method for transmitting secure video data based on selective encryption technology, comprising the following steps:

[0012] Step 1: Perform discrete cosine transform on the video frame image data to convert the pixel value matrix in the video frame into a transform coefficient TC matrix.

[0013] Step 2: Encode the transform coefficient TC matrix;

[0014] The transform coefficient matrix is ​​processed in an anti-diagonal scanning order. The transform coefficient matrix is ​​converted into a transform coefficient sequence in an anti-diagonal scanning order for the first time until the maximum binary symbol number limit is reached; the second encoding calculates the remainder abs_remainder according to the current transform coefficient value C, and performs a truncated Rice code with context p (TRp, Truncated Rice Code With Context p) binarization processing on the absolute value level value dec_abs_level of the remaining coefficient to obtain a binary sequence after binarization processing.

[0015] Step 2 specifically includes the following sub-steps:

[0016] Step 2.1, for the transform coefficient matrix (W b ×H b ) size sub-blocks are encoded for the first time, where W b and H b Indicates the size of the block. The sub-blocks of the transform coefficient matrix are traversed in anti-diagonal scanning order. The first step is to convert the transform coefficient matrix into a transform coefficient sequence in anti-diagonal scanning order until the maximum number of binary symbols is reached. The maximum number of binary symbols is When the maximum number of binary symbols is reached, the second step of processing starts with the remainder abs_remainder calculated from the current transform coefficient value C, as shown in equation (1):

[0017]

[0018] Step 2.2: The second step depends on the binarization of TRp. First, the absolute value level dec_abs_level of the remaining coefficients is calculated by formula (2).

[0019]

[0020] The constant V is generally 0. When a large transform coefficient value is mixed with a determined 0 transform coefficient value, the transform coefficient sequence has a smaller binarization result. The absolute value level dec_abs_level of the remaining coefficients is subjected to TRp binarization processing. First, the context p of the current transform coefficient value is determined. Then, the offset value is obtained according to the difference between the transform coefficient value and the context p. Then, the offset value is divided by the base to obtain the quotient and the remainder. The values ​​of the quotient and the remainder are converted into binary and spliced ​​together to form the result of the TRp binarization processing, that is, the binary sequence.

[0021] Step 3: After the TC binarization of the transform coefficient is completed, it is necessary to check whether the transform coefficient can be encrypted and whether the transform coefficient at the current position affects the adjacent transform coefficient at the current position. First, check whether the absolute value of the transform coefficient is zero. Only transform coefficients with non-zero values ​​can be encrypted. Then check whether encrypting the transform coefficient at the current video frame position will affect the saturated absolute sum and Rice parameters of the transform coefficients at the adjacent positions. Finally, if the saturated absolute sum and Rice parameters remain unchanged, the check stops, that is, the transform coefficient at the current position will not affect the transform coefficient at the adjacent position.

[0022] Step 3 specifically includes the following sub-steps:

[0023] Step 3.1 checks whether the transform coefficient TC sequence can be encrypted after binarization; encryption is possible only when the absolute value of the transform coefficient value in the transform coefficient sequence is not equal to 0.

[0024] Step 3.2 Check the current video frame position (X c ,Y c ) will affect its adjacent position (X p ,Y p )'s saturated absolute sum of the transform coefficients and the Rice parameter; specifically comprising the following sub-steps:

[0025] Step 3.2A Calculate the measured coordinates (X c ,Y c ) is the saturated absolute sum of the transform coefficients:

[0026]

[0027] Step 3.2B Calculate adjacent coordinates (X p ,Y p)’s Rice parameters:

[0028]

[0029] Where BaseLvl is equal to 4 when calculating the Rice parameter.

[0030] Step 3.2C checks whether the saturated absolute sum calculated in step 3.2A changes, and sets a flag NoSumChange to true if the saturated absolute sum remains unchanged under all possible test conditions.

[0031] Step 3.2D checks whether the Rice parameter calculated in step 3.2B changes, and sets a flag NoRiceParChange to true if the Rice parameter remains unchanged under all possible test conditions.

[0032] Step 3.2E Finally, when NoSumChange and NoRiceParChange are both equal to true, the check ends;

[0033] Step 4: Use the CTR mode of the AES algorithm as a pseudo-random number generator (PRNG) to encrypt the binary sequence after binarization. g The XOR operation is performed between them to generate the ciphertext C, as shown in formula (6).

[0034]

[0035] Step 5: After the video data is encrypted in step 4, it needs to be decrypted at the receiving end. The decoder at the receiving end must be completely synchronized with the encoder at the sending end. The received data is compared with the random value X generated by the same PRNG. g An XOR operation is performed to recover the encrypted data, thereby realizing secure video data transmission based on selective encryption.

[0036] Beneficial effects:

[0037] 1. The present invention discloses a secure video data transmission method based on selective encryption technology. The selective encryption technology is adopted. The selective encryption only encrypts important or sensitive information, rather than encrypting and decrypting the entire data set. When processing data, by using the CTR mode of the AES algorithm, the encryption operation is limited to some important binary symbols, ensuring that the encrypted video stream can still be decoded by a standard decoder without increasing the amount of transmitted data. The encryption processing is performed at the context-adaptive binary arithmetic coding CABAC level in the encoding stage to avoid changing the bit rate or video data structure after encryption. When processing data, the present invention only needs to perform encryption operations on specific parts, thereby significantly reducing computing time and resource consumption. In particular, when processing large files or real-time data streams, the present invention can greatly improve the response speed, ensuring that the system can quickly access and process data while ensuring security.

[0038] 2. The present invention discloses a secure video data transmission method based on selective encryption technology. Since selective encryption only involves a small amount of sensitive data, the unencrypted data remains available, significantly reducing the overall storage requirements of the encrypted data. The encrypted data is usually larger than the unencrypted data, but through selective encryption, the overall data volume is significantly reduced, thereby reducing storage costs. In addition, the unencrypted part can use more efficient storage solutions, such as indexing and search optimization, thereby further saving resources.

[0039] 3. The present invention discloses a secure video data transmission method based on selective encryption technology. Selective encryption can be combined with symmetric and asymmetric encryption technologies. Selective encryption can be integrated into an existing communication system without completely changing its security architecture. Traditional symmetric encryption methods can continue to be used to protect most of the data, while using selective encryption technology to process sensitive parts. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 The present invention relates to calculating the local absolute sum of the current coefficients in the yellow area;

[0041] Figure 2 The present invention involves calculating the local absolute sum of the transformation coefficients in the yellow area.

[0042] Figure 3 The present invention discloses a flow chart of a method for transmitting secure video data based on selective encryption technology. DETAILED DESCRIPTION

[0043] The present invention will be described in detail below in conjunction with the accompanying drawings and embodiments, and the technical problems solved by the technical solution of the present invention and the beneficial effects will be discussed. It should be noted that the described embodiments are intended to facilitate the understanding of the present invention and do not have any limiting effect on the present invention.

[0044] Example 1

[0045] like Figure 3 As shown, the present embodiment discloses a method for secure video data transmission based on selective encryption technology, and the specific implementation steps are as follows:

[0046] Step I: Perform discrete cosine transform on the video frame image data to convert the pixel value matrix in the video frame into a transform coefficient TC matrix. In this process, the original video frame image data, usually a two-dimensional pixel value matrix, is processed by discrete cosine transform to obtain a matrix containing the frequency components of the image. Each element in the matrix represents the intensity or coefficient of the image at a specific frequency.

[0047] Step II, encoding the transform coefficient TC matrix;

[0048] The transform coefficient matrix is ​​processed in an anti-diagonal scanning order. The transform coefficient matrix is ​​converted into a transform coefficient sequence in an anti-diagonal scanning order for the first time until the maximum binary symbol number limit is reached; the second encoding calculates the remainder abs_remainder according to the current transform coefficient value C, and performs a truncated Rice code with context p (TRp, Truncated Rice Code With Context p) binarization processing on the absolute value level value dec_abs_level of the remaining coefficient to obtain a binary sequence after binarization processing.

[0049] Step II specifically includes the following sub-steps:

[0050] Step II.1: For the transform coefficient matrix (W b ×H b ) size sub-blocks are encoded for the first time, where W b and H b Indicates the size of the block, and the general value is 4. The sub-blocks of the transform coefficient matrix are traversed in anti-diagonal scanning order. The first step is to convert the transform coefficient matrix into a transform coefficient sequence in anti-diagonal scanning order until the maximum number of binary symbols is reached. The maximum number of binary symbols is When the maximum number of binary symbols is reached, the second step of processing starts with the remainder abs_remainder calculated from the current transform coefficient value C, using equation (1).

[0051] Step II.2, the second step depends on the binarization of TRp. First, the absolute value level dec_abs_level of the remaining coefficients is calculated by formula (2), where the constant V is generally 0. When a large transform coefficient value is mixed with a determined 0 transform coefficient value, the transform coefficient sequence has a smaller binarization result; the absolute value level dec_abs_level of the remaining coefficients is subjected to TRp binarization, and the context p of the current transform coefficient value is first determined. Then, the offset value is obtained according to the difference between the transform coefficient value and the context p, and then the offset value is divided by the base to obtain the quotient and the remainder. The values ​​of the quotient and the remainder are converted into binary and spliced ​​together to form the result of the TRp binarization, that is, the binary sequence 0101110110100100.

[0052] Step III: After the transformation coefficient TC binarization is completed, it is necessary to check whether the transformation coefficient can be encrypted and whether the transformation coefficient at the current position affects the adjacent transformation coefficient at the current position. First, check whether the absolute value of the transformation coefficient is zero. Only the transformation coefficient with a non-zero value can be encrypted. Then check whether encrypting the transformation coefficient at the current video frame position will affect the saturated absolute sum and Rice parameters of the transformation coefficient at the adjacent position. Finally, if the saturated absolute sum and Rice parameters remain unchanged, the check stops, that is, the transformation coefficient at the current position will not affect the transformation coefficient at the adjacent position.

[0053] Step III specifically includes the following sub-steps:

[0054] Step III.1 checks whether the transform coefficient TC sequence can be encrypted after binarization; encryption is possible only when the absolute value of the transform coefficient value in the transform coefficient sequence is not equal to 0. Specifically, only when the absolute value of a transform coefficient in the transform coefficient sequence is not equal to zero, the coefficient can be encrypted. In other words, if the absolute value of a transform coefficient is zero, the coefficient will not have any effective effect in the encryption process and cannot be encrypted. The purpose of this step is to ensure that only transform coefficients with actual information (i.e., non-zero coefficients) are encrypted, thereby avoiding unnecessary calculations and processing, improving encryption efficiency, and ensuring that the encrypted data can recover valid information when decoded. Before the encryption operation, binarization helps to reduce redundant information and provide optimization for subsequent encryption and compression processes.

[0055] Step III.2 Check the current video frame position (X c ,Y c ) will affect its adjacent position (X p ,Y p )'s saturated absolute sum of the transform coefficients and the Rice parameter; specifically comprising the following sub-steps:

[0056] Step III.2A Calculate the measured coordinates (X) by formula (3) c ,Y c ) is to evaluate the possible impact of the transform coefficient at the coordinate in encryption or other processing operations. The saturated absolute sum refers to the accumulation of the absolute values ​​of the transform coefficients of the coordinate, and takes into account the possible saturation effect in the process. Specifically, the saturated absolute sum is not just a simple sum of the absolute values ​​of the transform coefficients, but also needs to consider whether the change of the transform coefficients will exceed its representation range after certain operations (such as encryption, quantization, etc.), resulting in numerical overflow or saturation. Therefore, the saturated absolute sum calculated by formula (3) can reflect the strength of the transform coefficients and the impact of their possible changes during image compression and encryption. Through this calculation, it can help to determine whether encryption can be performed safely without affecting other coefficients in adjacent positions, ensuring the effectiveness and stability of data processing.

[0057] Step III.2B Calculate the adjacent coordinates (X p ,Y p ) is to evaluate whether the encoding effect of adjacent positions will be affected when processing transform coefficients. Rice parameters play an important role in data compression, especially when using Rice coding, which determines how to convert integer transform coefficients into a more compact encoding form. Formula (4) provides a calculation method for dynamically calculating Rice parameters based on the characteristics of transform coefficients (such as numerical size and distribution).

[0058] Step III.2C checks whether the saturated absolute sum calculated in step 3.2A changes, and if the saturated absolute sum remains unchanged under all possible test conditions, sets a flag NoSumChange to true.

[0059] Step III.2D checks whether the Rice parameter calculated in step 3.2B changes. If the Rice parameter remains unchanged under all possible test conditions, a flag NoRiceParChange is set to true.

[0060] Step III.2E Finally, when NoSumChange and NoRiceParChange are both equal to true, the check ends;

[0061] Step IV: Using the CTR mode of the AES algorithm as a pseudo-random number generator PRNG to encrypt the binary sequence after binarization is a method of enhancing data security by combining encryption algorithms and random number generation technology. Specifically, the CTR mode uses the AES algorithm to generate a pseudo-random number stream as part of the key stream in the encryption process. The core idea of ​​this mode is to use an increasing counter combined with the encryption algorithm to generate a series of seemingly random key streams. This key stream is XORed with the binary data to generate the encrypted ciphertext.

[0062] In the encryption process, the original data, namely the binary sequence P, is first binarized to make it suitable for encryption. Then, the CTR mode of the AES algorithm is used to generate a pseudo-random number stream PRNG. The pseudo-random number stream is obtained by encrypting an initial vector and a counter. Each encryption operation generates a new pseudo-random value, ensuring that the generated key stream is highly unpredictable and random. Next, the binary sequence P is XORed with the pseudo-random number stream PRNG to obtain the final ciphertext C.

[0063] The advantage of this encryption method is that the CTR mode of the AES algorithm does not require complex padding of the original data, and generates a different key stream each time it is encrypted, which effectively resists common cryptographic attacks such as replay attacks. In addition, the CTR mode also supports parallel processing, making the encryption process more efficient. The ciphertext encrypted in this way has high security and can effectively protect the confidentiality of the data while maintaining high processing efficiency.

[0064] Step V. After the video data is encrypted in step IV, the receiving end needs to perform a decryption operation to restore the original data. In order to ensure the correctness of the decryption process, the decoder at the receiving end must be completely synchronized with the encoder at the sending end. This synchronization includes not only the transmission order and structure of the data, but also the state synchronization of the pseudo-random number generator PRNG. Specifically, the decryption process relies on the receiving end being able to generate the same pseudo-random number stream as the sending end.

[0065] First, the receiver needs to receive the encrypted ciphertext data. Then, the receiver starts the pseudo-random number generator PRNG by using the same initialization vector and counter. Since the sender and receiver use the same encryption algorithm, and the synchronized counter and initialization vector will generate the same pseudo-random number stream, the receiver can generate the same random value stream as the sender.

[0066] On this basis, the receiving end restores the original binary data by performing an XOR operation on the received ciphertext data and the generated pseudo-random number stream. Specifically, the ciphertext data C is XORed with the pseudo-random number stream PRNG, and the result will be the original data P before encryption.

[0067] At this point, the video security transmission method based on selective encryption ends.

[0068] This embodiment describes a video security transmission method based on selective encryption, which improves the current problems of low efficiency and high storage cost in symmetric encryption and asymmetric encryption. The present invention introduces the binarization and encoding process of video stream data, as well as the encoding steps of the transform coefficient TC. First, the redundant information is reduced and the encoding efficiency is improved by the binarization method, then the coefficients are processed and encoded in a specific order, and finally encrypted to ensure data security. The CTR mode of the AES algorithm is used for encryption, emphasizing the synchronization between the decoder and the encoder to reduce the risk of error propagation. The method of the present invention improves the transmission efficiency, security and reliability of video stream data.

[0069] The specific description above further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A secure video data transmission method based on selective encryption technology, characterized in that: The following steps are included: Step 1: Perform discrete cosine transform on the video frame image data to convert the pixel value matrix in the video frame into a transform coefficient TC (Transform Coeffcients) matrix; Step 2: Encode the transform coefficient TC matrix; The transform coefficient matrix is ​​processed in an anti-diagonal scanning order. The transform coefficient matrix is ​​converted into a transform coefficient sequence in an anti-diagonal scanning order for the first time until the maximum binary symbol number limit is reached; the remainder abs_remainder is calculated according to the current transform coefficient value C for the second encoding, and the absolute value level value dec_abs_level of the remaining coefficient is binarized TRp to obtain a binary sequence after binarization; Step 3: After the TC binarization of the transform coefficient is completed, it is necessary to check whether the transform coefficient can be encrypted and whether the transform coefficient at the current position affects the adjacent transform coefficient at the current position; first, check whether the absolute value of the transform coefficient is zero, and only the transform coefficient with a non-zero value can be encrypted; then check whether the encryption of the transform coefficient at the current video frame position will affect the saturated absolute sum and Rice parameter of the transform coefficient at the adjacent position; finally, if the saturated absolute sum and Rice parameter remain unchanged, the check stops, that is, the transform coefficient at the current position will not affect the transform coefficient at the adjacent position; Step 4: Use the CTR mode of the AES algorithm as the pseudo-random number generator PRNG to encrypt the binary sequence after binarization. g Perform XOR operation between them to generate ciphertext C; Step 5: After the video data is encrypted in step 4, it needs to be decrypted at the receiving end. The decoder at the receiving end is completely synchronized with the encoder at the sending end. The received data is compared with the random value X generated by the same PRNG. g An XOR operation is performed to recover the encrypted data, thereby realizing secure video data transmission based on selective encryption.

2. A method for transmitting secure video data based on selective encryption technology as claimed in claim 1, characterized in that: The specific implementation method of step 2 includes the following sub-steps: Step 2.1: For the transform coefficient matrix (W b ×H b ) size sub-blocks are encoded for the first time, where W b and H b Indicates the size of the block; traverse the sub-blocks of the transform coefficient matrix in anti-diagonal scanning order. The first step is to convert the transform coefficient matrix into a transform coefficient sequence in anti-diagonal scanning order until the maximum number of binary symbols is reached. The maximum number of binary symbols is When the maximum number of binary symbols is reached, the second step of processing starts with the remainder abs_remainder calculated from the current transform coefficient value C, as shown in equation (1): Step 2.2: The second step relies on the binarization of the Truncated Rice code with context p (TRp). First, the absolute value level dec_abs_level of the remaining coefficients is calculated by formula (2). Among them, V is a constant; the absolute value level dec_abs_level of the remaining coefficients is subjected to TRp binarization processing, and the context p of the current transform coefficient value is first determined; then the offset value is obtained according to the difference between the transform coefficient value and the context p, and then the offset value is divided by the base to obtain the quotient and the remainder. The values ​​of the quotient and the remainder are converted into binary and spliced ​​together to form the result of the TRp binarization processing, that is, the binary sequence.

3. A method for transmitting secure video data based on selective encryption technology as claimed in claim 2, characterized in that: The specific implementation method of step 3 includes the following sub-steps: Step 3.1: Check whether the transform coefficient TC sequence can be encrypted after binarization; encryption is possible only when the absolute value of the transform coefficient value in the transform coefficient sequence is not equal to 0; Step 3.2 Check the current video frame position (X c ,Y c ) will affect its adjacent position (X p ,Y p )'s saturated absolute sum of the transform coefficients and the Rice parameter; specifically comprising the following sub-steps: Step 3.2A Calculate the measured coordinates (X c ,Y c ) is the saturated absolute sum of the transform coefficients: Step 3.2B Calculate adjacent coordinates (X p ,Y p )’s Rice parameters: Where BaseLvl is equal to 4 when calculating Rice parameters; Step 3.2C checks whether the saturated absolute sum calculated in step 3.2A changes. If the saturated absolute sum remains unchanged under all possible test conditions, a flag NoSumChange is set to true; Step 3.2D checks whether the Rice parameter calculated in step 3.2B changes. If the Rice parameter remains unchanged under all possible test conditions, a flag NoRiceParChange is set to true; Step 3.2E When both NoSumChange and NoRiceParChange are equal to true, the check ends.

4. A method for transmitting secure video data based on selective encryption technology as claimed in claim 3, characterized in that: The ciphertext C in step 4 is shown in formula (6):