Video security protection method and system based on watermark embedding, and storage medium

By selectively encrypting the compressed video stream and embedding watermarks in specific syntax elements of the H.264 stream, the problem of insufficient watermark stability in existing technologies is solved, and efficient and stable video security protection is achieved in the cloud environment. It can effectively resist heavy compression attacks and track the source of leaks.

CN120658915APending Publication Date: 2025-09-16SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510687047.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

When embedding video watermarks in a cloud environment, existing technologies lack stability and cannot effectively resist heavy compression attacks. They are not suitable for encrypted videos and cannot efficiently embed watermarks without decrypting the video stream. In addition, watermark information extraction is unstable.

Method used

By selectively encrypting the codewords of the compressed video stream, using the AES or RC4 algorithm to generate a random binary sequence to perform XOR encryption on the video data, and embedding a watermark in the MVD, T1s and level syntax elements of the H.264 stream, the watermark is extracted using the sliding window method to enhance the robustness and stability of the watermark.

Benefits of technology

It achieves efficient watermark embedding without decrypting the video stream, enhances the robustness of the watermark, can effectively resist heavy compression attacks, and traces the source of leakage through the watermark to ensure video security and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658915A_ABST
    Figure CN120658915A_ABST
Patent Text Reader

Abstract

The invention relates to a video security protection method and system based on watermark embedding and a storage medium. The method comprises the following steps: a user side performs code word selective encryption on a compressed video code stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to a cloud server; the watermark authentication mechanism generates related watermarks according to the authorized user list and uploads the related watermarks to the cloud server; the cloud server stores the encrypted compressed domain video, and adds a related watermark for the encrypted compressed domain video by taking a syntax element as a watermark embedding channel when a user downloads the encrypted compressed domain video; when privacy leakage occurs, a watermark authentication mechanism extracts a watermark from a leaked video and tracks a leakage source. According to the method, the encrypted video code stream is directly operated, so that the scheme is safe and efficient. In addition, a syntax element irrelevant to a video encryption state is used as a watermark embedding channel to add a related watermark for the video, so that the robustness and the stability of the watermark are enhanced, and a recompression attack can be effectively resisted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video privacy security technology, and in particular to a video security protection method, system and storage medium based on watermark embedding. Background Art

[0002] With the prevalence of cloud computing and network storage, more and more companies are choosing to upload device-captured video data to the cloud for storage and management, and authorizing employees to access and download the data. However, this convenient storage method also introduces significant privacy risks. Cloud service providers may retain, analyze, or even extract sensitive user data for commercial or other purposes. Furthermore, the risk of data breaches stems not only from external attacks but also from malicious or negligent leaks by insiders. For example, Reuters reported that Tesla employees privately shared private videos captured by car cameras, and Amazon's Ring company once allowed employees to freely access every Ring camera worldwide and customer details. These cases expose privacy vulnerabilities in internal enterprise data security management. To ensure data security, video streams can be encrypted before upload, but this does not completely eliminate the risk of illegal data dissemination. To enhance data security management and trace internal leaks, an effective solution is to dynamically embed employee-related watermark information in the cloud when users download data. This watermark can contain key information such as employee ID and be closely tied to the video content. In the event of a data breach, security personnel can extract the watermark information from the leaked data and trace the source. However, the performance of data source devices in cloud environments varies greatly, and not all devices are capable of performing complex encryption operations. Therefore, selective encryption of the bitstream is an ideal choice for balancing security and efficiency. However, this poses a challenge for subsequent cloud-based watermark embedding. In the compressed domain, many video watermarking techniques require partial decoding of the bitstream, which not only increases computational complexity and affects user download speeds, but also, for encrypted videos, the decryption operation itself may destroy the effectiveness of the watermark. How to efficiently embed a watermark without decrypting the video bitstream, and ensure that the watermark is not affected by the video's encryption status, becomes a key issue. In addition, leaked video data is often intentionally or unintentionally recompressed during dissemination, such as when uploaded to social media platforms or video sharing websites, which may destroy the embedded watermark. Therefore, the watermark must be robust to resist recompression attacks. Existing encrypted video information hiding schemes often lack the stability of the extracted information when subjected to recompression attacks.

[0003] The prior art discloses a surveillance video leakage traceability method and storage medium based on random watermarks, comprising the following steps: after receiving a request from a user terminal, a backend server obtains user information, device information, and information about the required surveillance video, and performs uniqueness processing on the obtained information; a streaming media server obtains a video playback request and uniqueness information initiated by the user terminal, obtains a random watermark method from the backend server, and performs random watermark processing on the required surveillance video stream according to the random watermark method; different from the prior art, the present invention performs uniqueness processing on the required surveillance video and performs targeted watermarking (random frame, random number, random direction, random position, random size, random font) on the video played by each user terminal to ensure that the watermarked video played is not cleared, thereby achieving video leakage traceability and facilitating subsequent tracing of the source of the video leak. However, the watermark embedded in this method is not stable enough to resist heavy compression attacks. Summary of the Invention

[0004] Based on this, it is necessary to provide a video security protection method, system and storage medium based on watermark embedding with better stability to address the above technical problems.

[0005] S1: The user end selectively encrypts the compressed video stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server; the watermark certification agency generates relevant watermarks based on the authorized user list and uploads them to the cloud server;

[0006] S2: The cloud server stores the encrypted compressed domain video and adds relevant watermarks to the encrypted compressed domain video through syntax elements as watermark embedding channels when the user downloads it;

[0007] S3: When a privacy leak occurs, the watermark authentication agency extracts the watermark from the leaked video and traces the source of the leak.

[0008] Step S1: The user terminal selectively encrypts the compressed video stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server. Specifically:

[0009] S1.1: Compress the video stream into an H.264 stream, decapsulate the H.264 stream from EBSP into SODB, and parse the macroblock-level syntax elements and their corresponding codeword bit positions in the SODB.

[0010] S1.2: Generate a random binary sequence using the AES algorithm or the RC4 algorithm;

[0011] S1.3: Perform XOR encryption on the intra-frame prediction data, inter-frame prediction data, and residual data according to a random binary sequence to obtain an encrypted SODB;

[0012] S1.4: Encapsulate the encrypted SODB into an H.264 stream in EBSP format and upload it to the cloud server.

[0013] Furthermore, in step S1.2, the random binary sequence is generated by the AES algorithm as follows:

[0014] Select a key of appropriate length and prepare the key schedule required for encryption through the key expansion process, while setting an initial vector; use block encryption mode to encrypt the input data block each time to obtain a new ciphertext block; finally, convert the generated ciphertext or byte stream into binary format to obtain a random binary sequence based on the specified key.

[0015] Furthermore, in step S1.2, the random binary sequence is generated by the RC4 algorithm as follows:

[0016] The state vector is initialized through the key scheduling algorithm, and the byte stream is iteratively generated through the pseudo-random number generation algorithm; the generated ciphertext or byte stream is converted into binary format to obtain a random binary sequence based on the specified key.

[0017] Furthermore, in step S1, the watermark authentication agency generates relevant watermarks according to the authorized user list and uploads them to the cloud server; specifically, the watermark authentication agency generates a unique ID code for each authorized user; and sends the ID code and the user list to the cloud server.

[0018] Furthermore, step S2 specifically includes: adding relevant watermarks to the video by selecting three syntax elements, MVD, T1s and level, as watermark embedding channels when the user downloads the video.

[0019] Furthermore, step S2 is specifically as follows:

[0020] S2.1: Divide the downloading user's ID code into G segments, obtaining B(g), where 1 to G, and add a synchronization sequence to the end of each segment of the ID code to obtain W(g);

[0021] S2.2: Compress the video stream into an H.264 stream, decapsulate the H.264 stream from the EBSP into a SODB, select G GOPs from it, and parse the MVD, T1s, and level syntax elements of the last P frame in the GOP and the bit positions of their corresponding codewords.

[0022] S2.3: Each information bit W(g) is cyclically embedded into the T1s and levels of different frames, and the corresponding parity check code is embedded into the MVD. The embedding into the MVD and level is done by changing the group to which the codeword belongs, while the embedding into the T1s is done by bit replacement.

[0023] S2.4: Encapsulate the watermarked SODB into an H.264 stream in EBSP format and send it to the downloading user.

[0024] Furthermore, step S3 is specifically as follows:

[0025] S3.1: When a video is leaked, the watermark authentication agency obtains the leaked video, decapsulates the video stream, and parses the MVD, T1s, and level syntax elements embedded in the frame and the bit positions of their corresponding codewords;

[0026] S3.2: Based on the embedding method, reversely extract the bits embedded in MVD, T1s and level in each frame;

[0027] S3.3: Use the sliding window method to extract the most frequently occurring information bits W'(g)_level and W'(g)_T1s from the proposed bits, and use the majority voting method to obtain the parity check code Parity_g from the MVD proposed bits;

[0028] S3.4: Select the correct W'(g) from W'(g)_level and W'(g)_T1s based on Parity_g, remove the synchronization sequence to obtain B'(g), and splice all B'(g) in order to restore the embedded ID code, identify the leaker, and track the source of the leak.

[0029] In addition, the present invention also provides a video security protection system based on watermark embedding, comprising:

[0030] Encryption and watermark module: The user end selectively encrypts the compressed video stream to obtain the encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server; the watermark certification agency generates relevant watermarks based on the authorized user list and uploads them to the cloud server;

[0031] Watermark embedding module: The cloud server stores the encrypted compressed domain video and adds relevant watermarks to the encrypted compressed domain video through syntax elements as watermark embedding channels when the user downloads it;

[0032] Leakage tracking module: In addition, the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0033] The present invention operates directly on the encrypted video stream, making it secure and efficient. Furthermore, the present invention uses syntax elements unrelated to the video's encryption status as watermark embedding channels to add relevant watermarks to the video, enhancing the robustness and stability of the watermark and effectively resisting recompression attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 11 is a flow chart of a video security protection method based on watermark embedding in one embodiment;

[0035] Figure 2 A block diagram of a video security protection system based on watermark embedding in one embodiment;

[0036] Figure 3 A schematic diagram of selectively encrypting a compressed video stream in one embodiment;

[0037] Figure 4 FIG. 1 is a schematic diagram of bit embedding and extraction of MVD and level in one embodiment;

[0038] Figure 5 A schematic diagram of embedding and extracting a watermark from a compressed video stream in one embodiment; DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0040] Example 1:

[0041] This embodiment provides a Figure 1 The video security protection method based on watermark embedding shown includes:

[0042] S1: The user end selectively encrypts the compressed video stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server; the watermark certification agency generates relevant watermarks based on the authorized user list and uploads them to the cloud server;

[0043] S2: The cloud server stores the encrypted compressed domain video and adds relevant watermarks to the encrypted compressed domain video through syntax elements as watermark embedding channels when the user downloads it;

[0044] S3: When a privacy leak occurs, the watermark authentication agency extracts the watermark from the leaked video and traces the source of the leak.

[0045] This embodiment operates directly on the encrypted video stream, making it secure and efficient. Furthermore, this embodiment uses syntax elements unrelated to the video's encryption status as watermark embedding channels to add relevant watermarks to the video, enhancing the robustness and stability of the watermark and effectively resisting recompression attacks.

[0046] Example 2:

[0047] This embodiment further discloses the following on the basis of the first embodiment:

[0048] Step S1: The user terminal selectively encrypts the compressed video stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server. Specifically:

[0049] S1.1: Compress the video stream into an H.264 stream, decapsulate the H.264 stream from EBSP into SODB, and parse the macroblock-level syntax elements and their corresponding codeword bit positions in the SODB.

[0050] S1.2: Generate a random binary sequence using the AES algorithm or the RC4 algorithm;

[0051] S1.3: Perform XOR encryption on the intra-frame prediction data, inter-frame prediction data, and residual data according to a random binary sequence to obtain an encrypted SODB;

[0052] S1.4: Encapsulate the encrypted SODB into an H.264 stream in EBSP format and upload it to the cloud server.

[0053] Furthermore, in step S1.2, the random binary sequence is generated by the AES algorithm as follows:

[0054] Select a key of appropriate length and prepare the key schedule required for encryption through the key expansion process, while setting an initial vector; use block encryption mode to encrypt the input data block each time to obtain a new ciphertext block; finally, convert the generated ciphertext or byte stream into binary format to obtain a random binary sequence based on the specified key.

[0055] Furthermore, in step S1.2, the random binary sequence is generated by the RC4 algorithm as follows:

[0056] The state vector is initialized through the key scheduling algorithm, and the byte stream is iteratively generated through the pseudo-random number generation algorithm; the generated ciphertext or byte stream is converted into binary format to obtain a random binary sequence based on the specified key.

[0057] Furthermore, in step S1, the watermark authentication agency generates relevant watermarks according to the authorized user list and uploads them to the cloud server; specifically, the watermark authentication agency generates a unique ID code for each authorized user; and sends the ID code and the user list to the cloud server.

[0058] Furthermore, step S2 specifically includes: adding relevant watermarks to the video by selecting three syntax elements, MVD, T1s and level, as watermark embedding channels when the user downloads the video.

[0059] Furthermore, step S2 is specifically as follows:

[0060] S2.1: Divide the downloading user's ID code into G segments, obtaining B(g), where 1 to G, and add a synchronization sequence to the end of each segment of the ID code to obtain W(g);

[0061] S2.2: Compress the video stream into an H.264 stream, decapsulate the H.264 stream from the EBSP into a SODB, select G GOPs from it, and parse the MVD, T1s, and level syntax elements of the last P frame in the GOP and the bit positions of their corresponding codewords.

[0062] S2.3: Each information bit W(g) is cyclically embedded into the T1s and levels of different frames, and the corresponding parity check code is embedded into the MVD. The embedding into the MVD and level is done by changing the group to which the codeword belongs, while the embedding into the T1s is done by bit replacement.

[0063] S2.4: Encapsulate the watermarked SODB into an H.264 stream in EBSP format and send it to the downloading user.

[0064] Furthermore, step S3 is specifically as follows:

[0065] S3.1: When a video is leaked, the watermark authentication agency obtains the leaked video, decapsulates the video stream, and parses the MVD, T1s, and level syntax elements embedded in the frame and the bit positions of their corresponding codewords;

[0066] S3.2: Based on the embedding method, reversely extract the bits embedded in MVD, T1s and level in each frame;

[0067] S3.3: Use the sliding window method to extract the most frequently occurring information bits W'(g)_level and W'(g)_T1s from the proposed bits, and use the majority voting method to obtain the parity check code Parity_g from the MVD proposed bits;

[0068] S3.4: Select the correct W'(g) from W'(g)_level and W'(g)_T1s based on Parity_g, remove the synchronization sequence to obtain B'(g), and splice all B'(g) in order to restore the embedded ID code, identify the leaker, and track the source of the leak.

[0069] This embodiment operates directly on the encrypted video stream, making it secure and efficient. Furthermore, this embodiment uses syntax elements unrelated to the video's encryption status as watermark embedding channels to add relevant watermarks to the video, enhancing the robustness and stability of the watermark and effectively resisting recompression attacks.

[0070] Example 3:

[0071] This embodiment provides Figure 2 The video security protection system based on watermark embedding includes:

[0072] Encryption and watermark module: The user end selectively encrypts the compressed video stream to obtain the encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server; the watermark certification agency generates relevant watermarks based on the authorized user list and uploads them to the cloud server;

[0073] Watermark embedding module: The cloud server stores the encrypted compressed domain video and adds relevant watermarks to the encrypted compressed domain video through syntax elements as watermark embedding channels when the user downloads it;

[0074] Leakage Tracking Module: This embodiment directly operates on the encrypted video stream, making it secure and efficient. Furthermore, this embodiment uses syntax elements unrelated to the video's encryption status as watermark embedding channels to add relevant watermarks to the video, enhancing the robustness and stability of the watermark and effectively resisting recompression attacks.

[0075] Example 4:

[0076] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned method are implemented.

[0077] Embodiment 5:

[0078] Figure 3 The following is a schematic diagram of selective encryption of a compressed video stream in this embodiment. We encrypt specific syntax elements in the compressed video stream, such as intra-frame prediction mode and residual coefficients. First, these syntax elements are extracted from the original compressed video stream to form a bit stream. Then, a pseudo-random bit stream of the same length is generated by using a key and the AES algorithm, and an XOR operation is performed on the two bit streams. The result of the operation is used as a new bit stream to replace some syntax elements in the original compressed video stream, and finally an encrypted compressed video stream is formed. Since the compressed video stream is highly dependent on the relationship between inter-frame and intra-frame coding units when decoding, this selective encryption scheme can effectively ensure the security of the video content.

[0079] Figure 4This is a schematic diagram of the bit embedding and extraction of MVD and level in this embodiment. Since both MVD and level codewords use the Golomb coding rule, we divide codewords of the same length and similar representative values ​​into two different codeword spaces to represent binary 0 and 1 respectively. According to the bit requirements to be embedded, we modify the original codeword to the corresponding codeword in the corresponding codeword space, thereby achieving watermark embedding while maintaining low visual impact. In addition, the last bit of the Golomb coding is used to represent the sign of the codeword. We put codewords with opposite signs but the same value into the same space. This feature makes the watermark embedding and extraction process unaffected by the MVD and level symbol encryption, thereby achieving system compatibility.

[0080] Figure 5 The figure is a schematic diagram of watermark embedding and extraction from a compressed video stream in this embodiment. During the embedding process, the watermark is divided into G segments, and a synchronization sequence is added to generate W(g). G GOPs are selected from the H.264 stream, and the codeword positions of the MVD, T1s, and level of the last P frame in each GOP are parsed. Each segment of W(g) is then cyclically embedded into the T1s and levels of different frames, and the corresponding parity check code is embedded into the MVD. During the extraction process, the embedded MVD, T1s, and level bits are obtained from each frame. A sliding window method is used to find the most frequently occurring information bits W'(g)_level and W'(g)_T1s among the extracted bits, and a majority voting method is used to determine the parity check code from the bits extracted from the MVD. Based on the parity check code, the correct W'(g) is selected from W'(g)_level and W'(g)_T1s, and the synchronization sequence is removed to obtain B'(g). Finally, all B'(g) are concatenated in sequence to recover the embedded watermark.

[0081] The plaintext domain image is obtained by decompressing the original compressed video stream, the ciphertext domain image is obtained by decompressing the encrypted compressed domain video, and the plaintext watermark image is obtained by decompressing the compressed video stream embedded with the watermark. The visualization results show that the original video frame is severely scrambled after encryption, making the original content no longer visible. The decrypted watermark image is visually identical to the original plaintext domain image, demonstrating that the embedded watermark has minimal visual impact.

[0082] First, the robustness of the watermark against heavy compression of this embodiment was tested, and the performance was compared with existing video information embedding methods for bitstreams. The video data for the experiment came from the test video library. Table 1 reports the average bit error rate under different test videos and different QP conditions. The average watermark bit error rate of this embodiment for the five test videos was maintained below 1%, with an average bit error rate of 0.33%. Compared with the comparison scheme, the watermark bit error rate was significantly reduced (down 94.82%). This result proves that this embodiment effectively improves the performance of the bitstream watermark against heavy compression.

[0083] Table 1 Comparison of watermark anti-recompression performance for code streams

[0084]

[0085] Next, we tested the visual performance of the watermark in this embodiment. The experimental results, shown in Table 2, show that this embodiment maintains a high degree of consistency with the original bitstream in terms of the SSIM metric, with an average drop of only 0.001. Although the PSNR metric decreased slightly compared to the reference bitstream, the average drop was 0.168, which was within expectations. Considering that we embedded a watermark that is robust against recompression, this small sacrifice in visual quality is acceptable.

[0086] Table 2 Comparison of visual effects under different test videos

[0087]

[0088] This embodiment operates directly on the encrypted video stream, making it secure and efficient. Furthermore, this embodiment uses syntax elements unrelated to the video's encryption status as watermark embedding channels to add relevant watermarks to the video, enhancing the robustness and stability of the watermark and effectively resisting recompression attacks.

Claims

1. A video security protection method based on watermark embedding, characterized in that: include: S1: The user end selectively encrypts the compressed video stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server; The watermark certification agency generates relevant watermarks based on the authorized user list and uploads them to the cloud server; S2: The cloud server stores the encrypted compressed domain video and adds relevant watermarks to the encrypted compressed domain video through syntax elements as watermark embedding channels when the user downloads it; S3: When a privacy leak occurs, the watermark authentication agency extracts the watermark from the leaked video and traces the source of the leak.

2. The video security protection method based on watermark embedding according to claim 1 is characterized in that: Step S1: The user terminal selectively encrypts the compressed video stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server. Specifically: S1.1: Compress the video stream into an H.264 stream, decapsulate the H.264 stream from EBSP into SODB, and parse the macroblock-level syntax elements and their corresponding codeword bit positions in the SODB. S1.2: Generate a random binary sequence using the AES algorithm or the RC4 algorithm; S1.3: Perform XOR encryption on the intra-frame prediction data, inter-frame prediction data, and residual data according to a random binary sequence to obtain an encrypted SODB; S1.4: Encapsulate the encrypted SODB into an H.264 stream in EBSP format and upload it to the cloud server.

3. The video security protection method based on watermark embedding according to claim 2 is characterized in that: In step S1.2, the random binary sequence is generated by the AES algorithm as follows: Select a key of appropriate length and prepare the key schedule required for encryption through the key expansion process, while setting an initial vector; use block encryption mode to encrypt the input data block each time to obtain a new ciphertext block; finally, convert the generated ciphertext or byte stream into binary format to obtain a random binary sequence based on the specified key.

4. The video security protection method based on watermark embedding according to claim 2 is characterized in that: In step S1.2, the random binary sequence is generated by the RC4 algorithm as follows: The state vector is initialized through the key scheduling algorithm, and the byte stream is iteratively generated through the pseudo-random number generation algorithm; the generated ciphertext or byte stream is converted into binary format to obtain a random binary sequence based on the specified key.

5. The video security protection method based on watermark embedding according to claim 1 is characterized in that: In step S1, the watermark authentication agency generates relevant watermarks based on the authorized user list and uploads them to the cloud server. Specifically, the watermark authentication agency generates a unique ID code for each authorized user and sends the ID code and the user list to the cloud server.

6. The video security protection method based on watermark embedding according to claim 1 is characterized in that: Step S2 specifically includes: adding relevant watermarks to the video by selecting three syntax elements, MVD, T1s and level, as watermark embedding channels when the user downloads the video.

7. The video security protection method based on watermark embedding according to claim 1 is characterized in that: Step S2 is specifically as follows: S2.1: Divide the downloading user's ID code into G segments, obtaining B(g), where 1 to G, and add a synchronization sequence to the end of each segment of the ID code to obtain W(g); S2.2: Compress the video stream into an H.264 stream, decapsulate the H.264 stream from the EBSP into a SODB, select G GOPs from it, and parse the MVD, T1s, and level syntax elements of the last P frame in the GOP and the bit positions of their corresponding codewords. S2.3: Each information bit W(g) is cyclically embedded into the T1s and levels of different frames, and the corresponding parity check code is embedded into the MVD. The embedding into the MVD and level is done by changing the group to which the codeword belongs, while the embedding into the T1s is done by bit replacement. S2.4: Encapsulate the watermarked SODB into an H.264 stream in EBSP format and send it to the downloading user.

8. The video security protection method based on watermark embedding according to claim 1 is characterized in that: Step S3 is specifically as follows: S3.1: When a video is leaked, the watermark authentication agency obtains the leaked video, decapsulates the video stream, and parses the MVD, T1s, and level syntax elements embedded in the frame and the bit positions of their corresponding codewords; S3.2: Based on the embedding method, reversely extract the bits embedded in MVD, T1s and level in each frame; S3.3: Use the sliding window method to extract the most frequently occurring information bits W'(g)_level and W'(g)_T1s from the proposed bits, and use the majority voting method to obtain the parity check code Parity_g from the MVD proposed bits; S3.4: Select the correct W'(g) from W'(g)_level and W'(g)_T1s based on Parity_g, remove the synchronization sequence to obtain B'(g), and splice all B'(g) in order to restore the embedded ID code, identify the leaker, and track the source of the leak.

9. The video security protection system based on watermark embedding is characterized by: include: Encryption and watermark module: The user end selectively encrypts the compressed video stream to obtain an encrypted compressed domain video, and uploads the encrypted compressed domain video to the cloud server; The watermark certification agency generates relevant watermarks based on the authorized user list and uploads them to the cloud server; Watermark embedding module: The cloud server stores the encrypted compressed domain video and adds relevant watermarks to the encrypted compressed domain video through syntax elements as watermark embedding channels when the user downloads it; Leakage tracking module: When a privacy leak occurs, the watermark certification agency extracts the watermark from the leaked video and tracks the source of the leak.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.