Video encryption and pirate tracing method and device, electronic equipment and storage medium

By encrypting the RGB values ​​of the I-frame images in the video stream and embedding user information and software names, the problem of piracy in video copyright protection is solved, achieving covert protection and traceability capabilities, and improving user experience and platform efficiency.

CN121603699APending Publication Date: 2026-03-03MIGU DIGITAL MEDIA CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511618803.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing video copyright protection technologies cannot effectively prevent video piracy, and user experience and platform operation efficiency are affected. Explicit watermarks interfere with the viewing experience, and download restrictions affect convenience.

Method used

The video stream is converted to RGBA format, I-frame images are extracted as keyframes to be encrypted, relevant fields are collected and RGB values ​​are encrypted, encryption parameters are stored, and user information and software names are concealed in the video stream. The source of piracy is identified by reverse deduction.

Benefits of technology

It achieves covert protection of video copyright, prevents the spread of piracy, and can effectively trace the source of piracy, thereby improving user experience and platform operation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603699A_ABST
    Figure CN121603699A_ABST
Patent Text Reader

Abstract

The invention provides a video encryption and pirate tracing method and device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence and data processing, and the method comprises the steps: responding to a playing request of a user for a target video stream, converting the target video stream into an RGBA format, and then extracting an I-frame image in the RGBA format as a to-be-encrypted key frame; relevant fields corresponding to the to-be-encrypted key frame are collected, RGB value encryption processing is conducted on the to-be-encrypted key frame according to the relevant fields, encryption parameters generated in the encryption process are stored, and the relevant fields at least comprise user relevant information corresponding to a user and the name of current playing software; after the to-be-encrypted key frame is encrypted, obtaining an encrypted video stream, and providing a playing service of the encrypted video stream for a user; and extracting a to-be-traced key frame corresponding to the to-be-encrypted key frame in the pirate video stream, and reversely deriving traceability information consistent with the related field from the to-be-traced key frame in combination with the encryption parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and data processing technology, and in particular to a video encryption and piracy tracing method, device, electronic device and storage medium. Background Technology

[0002] In the current field of video copyright protection, mainstream technical solutions mainly include two categories: explicit watermarking technology and download permission control. Explicit watermarking technology embeds visible watermarks (such as platform logos or copyright notices) into the video frame, allowing viewers to identify the video's source. However, watermarks have obvious visual characteristics, and pirates can easily remove them using image restoration or watermark removal techniques, increasing the difficulty of tracing video copyright and failing to effectively protect copyright.

[0003] Another type of solution is download permission control technology. This solution prevents users from illegally downloading or distributing video content by restricting video download permissions or playback time limits. Some solutions also combine this with account authentication mechanisms, authorizing only specific users to access videos. Although this type of technology can reduce the risk of piracy, it cannot effectively prevent users from recording videos using screen recording tools. Recorded videos often lack watermarks or copyright information, making it difficult for platforms to trace the source of the leak.

[0004] The shortcomings of existing technologies are mainly reflected in two aspects: First, explicit watermarks can interfere with the user's viewing experience, especially during full-screen playback, potentially obscuring important content; second, excessive download restrictions can affect user convenience, thereby impacting user retention and satisfaction on the platform. Therefore, how to protect copyright while simultaneously considering user experience and platform operational efficiency has become a pressing issue for video copyright protection technology. Summary of the Invention

[0005] This application aims to at least partially address one of the technical problems in the related art.

[0006] Therefore, one objective of this application is to propose a video encryption and piracy tracing method, comprising: responding to a user's playback request for a target video stream, converting the target video stream into RGBA format and extracting I-frame images from it as keyframes to be encrypted; collecting relevant fields corresponding to the keyframes to be encrypted, and performing RGB value encryption processing on the keyframes to be encrypted based on the relevant fields, and storing the encryption parameters generated during the encryption process, wherein the relevant fields include at least user-related information corresponding to the user and the name of the current playback software; obtaining an encrypted video stream after the keyframes to be encrypted are encrypted, and providing playback services of the encrypted video stream to the user; extracting the keyframes to be traced from the pirated video stream that correspond to the keyframes to be encrypted, and reverse-engineering the tracing information consistent with the relevant fields from the keyframes to be traced based on the encryption parameters.

[0007] The second objective of this application is to propose a video encryption and piracy tracing device.

[0008] The third objective of this application is to propose an electronic device.

[0009] The fourth objective of this application is to provide a non-transitory computer-readable storage medium.

[0010] The fifth objective of this application is to provide a computer program product.

[0011] To achieve the above objectives, the first aspect of this application proposes a video encryption and piracy tracing method, comprising: responding to a user's playback request for a target video stream, converting the target video stream into RGBA format and extracting I-frame images as keyframes to be encrypted; collecting relevant fields corresponding to the keyframes to be encrypted, and performing RGB value encryption processing on the keyframes to be encrypted based on the relevant fields, and storing the encryption parameters generated during the encryption process, wherein the relevant fields include at least user-related information corresponding to the user and the name of the current playback software; obtaining an encrypted video stream after the keyframes to be encrypted are encrypted, and providing playback services of the encrypted video stream to the user; extracting the keyframes to be traced from the pirated video stream that correspond to the keyframes to be encrypted, and reverse-engineering the tracing information consistent with the relevant fields from the keyframes to be traced based on the encryption parameters.

[0012] In this application, by encrypting the RGB values ​​of the keyframes to be encrypted, the relevant fields are encrypted and stored within the RGB values ​​of the keyframes. This makes the copyright identifier of the video concealed and tamper-proof, effectively preventing video piracy and providing support for subsequent traceability. Specifically, the relevant fields at least include user information and the name of the currently playing software. If a user records the video stream and causes piracy, the source information consistent with the original fields can be deduced from the keyframes by combining the encryption parameters, thereby identifying the piracy user and determining the source of the leaked pirated video software.

[0013] According to one embodiment of this application, RGB value encryption processing is performed on the keyframe to be encrypted based on relevant fields, including: encrypting the relevant fields using a preset encryption key based on a preset encryption algorithm to obtain ciphertext corresponding to the keyframe to be encrypted, the ciphertext being presented in Base64 encoded form; determining multiple characters in the ciphertext, and determining the target pixel group corresponding to each character in the keyframe to be encrypted; for each character, obtaining the decimal value corresponding to the character in the ASCII table, and performing RGB value offset processing on the target pixels in the target pixel group corresponding to the character in the keyframe to be encrypted based on the decimal value.

[0014] According to one embodiment of this application, determining the target pixel group corresponding to each character in the keyframe to be encrypted includes: determining the position code corresponding to each character according to the arrangement order of the characters; determining the target pixel group corresponding to each position code in the keyframe to be encrypted, and taking the target pixel group corresponding to the position code as the target pixel group corresponding to the character corresponding to the position code in the keyframe to be encrypted.

[0015] According to one embodiment of this application, determining the target pixel group corresponding to each position code in the keyframe to be encrypted includes: determining the region to be encrypted in the keyframe to be encrypted based on a large model; and determining N first pixel groups in the region to be encrypted, where N is the number of position codes in the ciphertext, and the position codes correspond one-to-one with the first pixel groups; determining N pixels in the keyframe to be encrypted, and forming N second pixel groups based on the adjacent pixels corresponding to each of the N pixels, with the position codes corresponding one-to-one with the second pixel groups; and using the first pixel group and / or the second pixel group corresponding to each position code as the target pixel group corresponding to each position code.

[0016] According to one embodiment of this application, determining the region to be encrypted in a keyframe to be encrypted based on a large model includes: inputting the keyframe to be encrypted and preset region extraction keywords into the large model to obtain multiple candidate regions output by the large model, wherein the color value difference of the pixels in the candidate regions is within a preset difference range; and selecting the region to be encrypted from the candidate regions according to the importance of the candidate regions.

[0017] According to one embodiment of this application, based on decimal values, RGB value offset processing is performed on the target pixels within the target pixel group corresponding to the character in the keyframe to be encrypted, including: obtaining the value of each digit in the decimal value, including the ones place, tens place, and hundreds place; determining the offset correspondence between each digit and the R, G, and B values ​​in the RGB values; and performing RGB value offset processing on the target pixels within the target pixel group corresponding to the character in the keyframe to be encrypted, based on the value of each digit and the offset correspondence.

[0018] According to one embodiment of this application, after converting the target video stream to RGBA format and extracting the I-frame image therein as the key frame to be encrypted, the method further includes: determining fixed verification pixels in the key frame to be encrypted; and performing RGB value offset processing on the fixed verification pixels according to the RGB value offset rules corresponding to the fixed verification pixels.

[0019] According to one embodiment of this application, the encryption parameters include the following information: first-level encryption parameters, which include the position information of the fixed verification pixel, the RGB value offset rule corresponding to the fixed verification pixel, and the original RGB value of the fixed verification pixel; second-level encryption parameters, which include the algorithm name of the encryption algorithm, the encryption key, the correspondence between the target pixel group and the position code, the offset correspondence, the position information of each target pixel in the target pixel group, and the original RGB value of each target pixel.

[0020] According to one embodiment of this application, the method of extracting the source-tracing keyframe corresponding to the keyframe to be encrypted from the pirated video stream, and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframe in combination with encryption parameters, includes: obtaining a suspected pirated video stream, extracting the suspected source-tracing keyframe corresponding to the keyframe to be encrypted from the suspected pirated video stream; performing a first-level judgment on the suspected source-tracing keyframe based on the first-level encryption parameters; when the result of the first-level judgment indicates that the suspected pirated video stream is a pirated video stream, determining the suspected source-tracing keyframe as the source-tracing keyframe, and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframe in combination with the second-level encryption parameters.

[0021] To achieve the above objectives, a second aspect of this application proposes a video encryption and piracy tracing device, comprising: a conversion and extraction module, configured to, in response to a user's playback request for a target video stream, convert the target video stream into RGBA format and extract I-frame images therefrom as keyframes to be encrypted; an encryption processing module, configured to collect relevant fields corresponding to the keyframes to be encrypted, perform RGB value encryption processing on the keyframes to be encrypted based on the relevant fields, and store the encryption parameters generated during the encryption process, wherein the relevant fields include at least user-related information corresponding to the user and the name of the current playback software; a video playback module, configured to obtain an encrypted video stream after the keyframes to be encrypted are encrypted, and provide playback services of the encrypted video stream to the user; and a piracy tracing module, configured to extract the keyframes to be traced from the pirated video stream that correspond to the keyframes to be encrypted, and, in conjunction with the encryption parameters, reverse-engineer the tracing information consistent with the relevant fields from the keyframes to be traced. According to one embodiment of this application, the encryption processing module is further configured to: encrypt relevant fields using a preset encryption key based on a preset encryption algorithm to obtain ciphertext corresponding to the keyframe to be encrypted, wherein the ciphertext is presented in Base64 encoded form; determine multiple characters in the ciphertext, and determine the target pixel group corresponding to each character in the keyframe to be encrypted; for each character, obtain the decimal value corresponding to the character in the ASCII table, and perform RGB value offset processing on the target pixel in the target pixel group corresponding to the character in the keyframe to be encrypted based on the decimal value.

[0022] According to one embodiment of this application, the encryption processing module is further configured to: determine the position code corresponding to each character according to the order of the characters; determine the target pixel group corresponding to each position code in the key frame to be encrypted, and use the target pixel group corresponding to the position code as the target pixel group corresponding to the character corresponding to the position code in the key frame to be encrypted.

[0023] According to one embodiment of this application, the encryption processing module is further configured to: determine the region to be encrypted in the keyframe to be encrypted based on a large model, and determine N first pixel point groups in the region to be encrypted, wherein N is the number of position codes of the ciphertext, and the position codes correspond one-to-one with the first pixel point groups; determine N pixels in the keyframe to be encrypted, and form N second pixel point groups based on the adjacent pixels corresponding to each of the N pixels, and the position codes correspond one-to-one with the second pixel point groups; and use the first pixel point groups and / or the second pixel groups corresponding to each position code as the target pixel point groups corresponding to each position code.

[0024] According to one embodiment of this application, the encryption processing module is further configured to: input the keyframe to be encrypted and the preset region extraction keywords into a large model to obtain multiple candidate regions output by the large model, wherein the color value difference of the pixels in the candidate regions is within a preset difference range; and select the region to be encrypted from the candidate regions according to the importance of the candidate regions.

[0025] According to one embodiment of this application, the encryption processing module is further configured to: obtain the value of each digit in the decimal value, the digits including the ones place, tens place and hundreds place; determine the offset correspondence between each digit and the R value, G value and B value in the RGB value; and based on the value of each digit and combined with the offset correspondence, perform RGB value offset processing on the target pixel point in the target pixel point group corresponding to the character in the keyframe to be encrypted.

[0026] According to one embodiment of this application, the encryption processing module is further configured to: determine fixed verification pixels in the keyframe to be encrypted; and perform RGB value offset processing on the fixed verification pixels according to the RGB value offset rules corresponding to the fixed verification pixels.

[0027] According to one embodiment of this application, the encryption parameters include the following information: first-level encryption parameters, which include the position information of the fixed verification pixel, the RGB value offset rule corresponding to the fixed verification pixel, and the original RGB value of the fixed verification pixel; second-level encryption parameters, which include the algorithm name of the encryption algorithm, the encryption key, the correspondence between the target pixel group and the position code, the offset correspondence, the position information of each target pixel in the target pixel group, and the original RGB value of each target pixel.

[0028] According to one embodiment of this application, the piracy tracing module is further configured to: acquire a suspected pirated video stream; extract suspected key frames to be traced that correspond to key frames to be encrypted from the suspected pirated video stream; perform a first-level judgment on the suspected key frames to be traced based on the first-level encryption parameters; when the result of the first-level judgment indicates that the suspected pirated video stream is a pirated video stream, determine the suspected key frames to be traced as key frames to be traced, and reverse-derive tracing information consistent with relevant fields from the key frames to be traced in combination with the second-level encryption parameters.

[0029] To achieve the above objectives, a third aspect of this application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to implement the video encryption and piracy tracing method as described in the first aspect of this application.

[0030] To achieve the above objectives, a fourth aspect of this application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to implement the video encryption and piracy tracing method as described in the first aspect of this application.

[0031] To achieve the above objectives, a fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the video encryption and piracy tracing method described in the first aspect of this application. Attached Figure Description

[0032] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method according to one embodiment of this application.

[0033] Figure 2 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method according to one embodiment of this application.

[0034] Figure 3 This is an exemplary schematic diagram illustrating multiple candidate regions in a keyframe to be encrypted, as shown in one embodiment of this application.

[0035] Figure 4 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method according to one embodiment of this application.

[0036] Figure 5This is an exemplary schematic diagram illustrating an embodiment of the present application, showing how the RGB value offset processing is performed on the target pixel points within the target pixel point group corresponding to the character in the keyframe to be encrypted.

[0037] Figure 6 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method according to one embodiment of this application.

[0038] Figure 7 This is an exemplary schematic diagram of a video encryption and piracy tracing device according to one embodiment of this application.

[0039] Figure 8 This is a schematic diagram of an electronic device according to one embodiment of this application. Detailed Implementation

[0040] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0041] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0042] Figure 1 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method shown in this application, such as... Figure 1 As shown, this video encryption and piracy tracing method includes the following steps: S101, in response to the user's request to play the target video stream, converts the target video stream to RGBA format and extracts the I-frame image from it as the keyframe to be encrypted.

[0043] Since the subsequent encryption process for keyframes is primarily achieved through the offset of pixel RGB values, this application, upon receiving a user's playback request for the target video stream, first converts the target video stream to RGBA format. After conversion to RGBA format, video frame data is obtained where each pixel contains four color channels: R (red), G (green), B (blue), and A (transparency). This ensures that the color values ​​of each pixel can be accurately read, modified, and stored subsequently.

[0044] In some embodiments, the industry-standard FFMpeg tool can be used as the core tool for video stream parsing and format conversion, which can achieve compatible processing of multiple video formats. Specifically, when converting the target video stream to RGBA format, the audio stream can be removed first, then the video plane data can be extracted, and finally the video stream can be encoded into an uncompressed format and encapsulated in a nut container for output, resulting in the target video stream converted to RGBA format.

[0045] In related technologies, frames in a video stream can be divided into I-frames (Intra Frames) and P-frames (Predictive Frames). I-frames can independently present a complete image without relying on other frames, possessing the attribute of a "single image," while P-frames require adjacent frames to display their content completely. In this solution, after converting the target video stream to RGBA format, one or more I-frames are extracted as keyframes to be encrypted.

[0046] S102, collect the relevant fields corresponding to the key frame to be encrypted, perform RGB value encryption processing on the key frame to be encrypted according to the relevant fields, and store the encryption parameters generated during the encryption process. The relevant fields include at least the user-related information corresponding to the user and the name of the current playback software.

[0047] The first feasible approach involves the following fields corresponding to the keyframe to be encrypted: user-related information, which may include user account identifier (the user account identifier is the unique business identifier for the user to log in to the current playback software) and the name of the current playback software (the name of the terminal application for which the user requests to play the target video stream).

[0048] The second feasible method involves using fields corresponding to the keyframe to be encrypted, including the user account identifier, the name of the current playback software, the video stream name (a unique business identifier for the target video stream), and the keyframe timestamp (the playback progress corresponding to the keyframe to be encrypted, which can be set to mmss format accurate to minutes and seconds). For example, if a user with the account identifier Zhou123456 requests to play the movie "Kung Fu" in the current playback software A, and the timestamp of one of the keyframes to be encrypted is 0316 (i.e., 03 minutes and 16 seconds), then concatenating these fields will yield the relevant fields corresponding to that keyframe to be encrypted as "Zhou123456-ruanjianA-gongfu-0316".

[0049] It is not difficult to understand that if multiple I-frames are selected as keyframes to be encrypted, since the keyframe timestamps corresponding to each keyframe to be encrypted are different, that is, in the second implementation method above, the relevant fields corresponding to each keyframe to be encrypted are different.

[0050] For any keyframe to be encrypted, after determining the relevant fields corresponding to the keyframe to be encrypted, the keyframe to be encrypted is encrypted with RGB values ​​according to the relevant fields, so as to store the relevant fields in the keyframe to be encrypted, and store the encryption parameters generated during the encryption process for subsequent piracy tracing.

[0051] S103: After the keyframe to be encrypted is encrypted, an encrypted video stream is obtained, and the encrypted video stream playback service is provided to the user.

[0052] S104: Extract the source-tracing keyframes from the pirated video stream that correspond to the keyframes to be encrypted, and deduce the source-tracing information consistent with the relevant fields from the source-tracing keyframes in reverse by combining the encryption parameters.

[0053] It is easy to understand that users may spread pirated resources by means of screen recording, which would harm the interests of legitimate users. In this application, after obtaining a pirated video stream, in order to trace the source of the spread of the pirated video stream, the source-tracing key frame corresponding to the key frame to be encrypted in the pirated video stream can be extracted, and the source-tracing information consistent with the relevant fields can be reversed from the source-tracing key frame in combination with the encryption parameters.

[0054] This application proposes a video encryption and piracy tracing method, comprising: responding to a user's playback request for a target video stream, converting the target video stream to RGBA format and extracting I-frame images as keyframes to be encrypted; collecting relevant fields corresponding to the keyframes to be encrypted, and performing RGB value encryption processing on the keyframes to be encrypted based on the relevant fields, and storing the encryption parameters generated during the encryption process, wherein the relevant fields include at least user-related information and the name of the current playback software; obtaining an encrypted video stream after the keyframes to be encrypted are encrypted, and providing playback services for the encrypted video stream to the user; extracting the tracing keyframes corresponding to the keyframes to be encrypted from the pirated video stream, and reverse-engineering the tracing information consistent with the relevant fields from the tracing keyframes based on the encryption parameters. In this application, by performing RGB value encryption processing on the keyframes to be encrypted and encrypting and storing the relevant fields in the RGB values ​​of the keyframes to be encrypted, the copyright identifier of the video is made concealed and tamper-proof, which can effectively prevent video piracy and provide support for subsequent tracing. Specifically, the relevant fields include at least the user's information and the name of the currently playing software. If the user recorded the video stream and caused piracy, the source information consistent with the original fields can be reverse-engineered from the keyframes by combining the encryption parameters, thereby identifying the pirated user and determining the source of the leaked pirated video software.

[0055] Figure 2 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method shown in this application, such as... Figure 2 As shown, this video encryption and piracy tracing method includes the following steps: S201, in response to the user's request to play the target video stream, converts the target video stream to RGBA format and extracts the I-frame images from it as keyframes to be encrypted.

[0056] S202, Collect the relevant fields corresponding to the key frame to be encrypted. The relevant fields shall include at least the user-related information and the name of the current playback software.

[0057] For details on the specific implementation of steps S201 to S202, please refer to the relevant parts of the above embodiments, which will not be repeated here.

[0058] S203, determine the fixed verification pixel in the key frame to be encrypted, and perform RGB value offset processing on the fixed verification pixel according to the RGB value offset rule corresponding to the fixed verification pixel.

[0059] In this application, the fixed verification pixel can be set to one or more.

[0060] The RGB value offset rule corresponding to the fixed verification pixel can be set according to the actual situation.

[0061] In some implementations, the B value in the RGB value of a fixed verification pixel can be set to be shifted one position to the right. In this way, the change of that pixel on the screen is basically imperceptible to the human eye, and therefore will not affect the user's viewing experience.

[0062] For example, the pixel at the top left corner (10,10) of the keyframe to be encrypted can be selected as the fixed verification pixel. Assuming that the original RGB value of the pixel at (10,10) is (20,20,20), the RGB value of the pixel at (10,10) can be changed from the original RGB value (20,20,20) to (20,20,21) based on the RGB value offset rule corresponding to the fixed verification pixel described above.

[0063] In this application, the setting of fixed verification pixels is mainly to enable first-level fast screening based on fixed verification pixels during subsequent source tracing to determine whether the pirated video was leaked from the current video software provider. Once it is determined that the pirated video was leaked from the current video software provider, the subsequent source tracing process is then executed to reduce the amount of computation.

[0064] S204, based on a preset encryption algorithm, uses a preset encryption key to encrypt the relevant fields to obtain the ciphertext corresponding to the keyframe to be encrypted, and the ciphertext is presented in Base64 encoded form.

[0065] In some embodiments, the encryption algorithm may be AES encryption algorithm, and the encryption key may be set according to the actual situation, for example, it may be set to "1234".

[0066] For example, assuming that the relevant fields are encrypted using a preset encryption key, the ciphertext corresponding to the keyframe to be encrypted is presented in Base64 encoded form as follows: U2FsdGVkX19fgq6tI8j / d9JkhvFXMLR8AlFQD2Tn1q8R4LCWwM0oRZ / u5F88+8B0ScmTtUM2rVxA9odSOx3GRw== The ciphertext has two main characteristics: First, the individual characters in the ciphertext cover the range of 0-255 in ASCII decimal, which can perfectly match the numerical range of RGB color values ​​(0-255 for each channel), meeting the needs of subsequent pixel storage; second, the length of the ciphertext can be flexibly adjusted (88 bits in the example), and can be dynamically adapted according to the number of fields of the collected information and the encryption algorithm parameters.

[0067] S205, determine multiple characters in the ciphertext, and determine the position code corresponding to each character according to the order of the characters.

[0068] Taking the above ciphertext as an example with a length of 88 bits, that is, the multiple characters in the ciphertext are "U", "2", "F", etc., a total of 88 characters.

[0069] In order to reconstruct complete and accurate tracing information during subsequent piracy investigations, it is necessary to determine the positional code corresponding to each character according to the order of the characters. For example, the positional code corresponding to the first character "U" in the above ciphertext is 1, the positional code corresponding to the second character "2" in the above ciphertext is 2, and so on.

[0070] S206, Based on the large model, determine the region to be encrypted in the key frame to be encrypted, and determine N first pixel point groups in the region to be encrypted, where N is the number of ciphertext position codes, and the position codes correspond one-to-one with the first pixel point groups.

[0071] The purpose of this step is mainly to determine the first pixel group corresponding to each location encoding. In this embodiment, the keyframe to be encrypted and the keywords extracted from the preset region are input into the large model to obtain multiple candidate regions output by the large model. Among them, the color value difference of the pixels in the candidate regions is within a preset difference range (for example, the color value difference ≤ 5, each candidate region can be understood as a region with a large number of pixels with similar colors). The region to be encrypted is selected from the candidate regions according to the importance of the candidate regions.

[0072] Here, N represents the number of position codes in the ciphertext, with each position code corresponding one-to-one with a first pixel group. That is, each character in the ciphertext determined above can be assigned its corresponding first pixel group according to its position code, and all N first pixel groups are located within the area to be encrypted. Continuing with the example of an 88-bit ciphertext, this step determines 88 first pixel groups.

[0073] The preset region extraction keywords can be set to "receive the input keyframe to be encrypted, identify pixel regions in the image with large areas of similar colors (color value difference ≤ 5), and return the name, top left corner coordinates, top right corner coordinates, bottom left corner coordinates, and bottom right corner coordinates of each region".

[0074] Figure 3 This is an exemplary schematic diagram of multiple candidate regions in a keyframe to be encrypted, as shown in this application. Figure 3 As shown, the large model can finally output three candidate regions and four coordinates (up, down, left, right) for each candidate region, namely candidate regions A, B, and C, and the four coordinates (up, down, left, right) for each candidate region A, B, and C.

[0075] In this process, after the large model outputs multiple candidate regions, the regions to be encrypted are selected from the candidate regions based on their importance. For example, the main content areas of the video (such as people, dialogue subtitles, and key scenes) are excluded, and non-critical content areas (such as solid color backgrounds, static borders, and meaningless areas at the edges of the screen) are selected as the regions to be encrypted.

[0076] S207, take the first pixel group corresponding to each position code as the target pixel group corresponding to each position code, and take the target pixel group corresponding to the position code as the target pixel group corresponding to the character corresponding to the position code in the key frame to be encrypted.

[0077] S208: For each character, obtain the decimal value corresponding to the character in the ASCII table, and based on the decimal value, perform RGB value offset processing on the target pixel point in the target pixel point group corresponding to the character in the keyframe to be encrypted.

[0078] In this application, based on decimal values, RGB value offset processing is performed on the target pixels within the target pixel group corresponding to the character in the keyframe to be encrypted, including: obtaining the value of each digit in the decimal value, including the ones place, tens place, and hundreds place; determining the offset correspondence between each digit and the R, G, and B values ​​in the RGB values; and performing RGB value offset processing on the target pixels within the target pixel group corresponding to the character in the keyframe to be encrypted, based on the value of each digit and the offset correspondence.

[0079] In some embodiments, since the ASCII code range corresponding to the ciphertext character is 0-255 (requiring 3 decimal digits for representation, such as "U" corresponding to ASCII decimal 85, i.e. "085"), and the range of each channel of the RGB color value is 0-255, the allocation rule of "R channel color value corresponds to the percentile of the ASCII code, G channel corresponds to the tenths place, and B channel corresponds to the units place" is set. One ciphertext character needs to be stored in 9 pixels (3 channels × 3 pixel positions), that is, each first pixel point group can contain 9 pixels.

[0080] Taking the first character "U" of the ciphertext as an example, first look up the ASCII decimal value of "U" to find 85 (i.e., 0 in the hundredths place, 8 in the tenths place, and 5 in the units place). Then, determine the 9 pixels in the target pixel group corresponding to the first character "U". Assume that the original RGB values ​​of these 9 pixels are all (3,4,6). Then, adjust the pixel color values ​​according to the offset correspondence between each digit and the R, G, and B values ​​in the RGB values: for the tenths place "8", adjust the G channel color value of 8 pixels from 4 to 5; for the units place "5", adjust the B channel color value of 5 pixels from 6 to 7. The final sequence of 9 pixels is (3,4,6)×1 + (3,5,6)×3 + (3,5,7)×5. By combining the color values ​​of this sequence, the ASCII decimal value "85" is hidden in it. Since the color value of each pixel changes by only 1 unit (e.g., the color value of the G channel shifts from 4 to 5), the change is far below the threshold of color value difference that can be perceived by the naked eye (usually ≥10), so it will not affect the consistency of the video picture and the viewing experience.

[0081] S209, storing encryption parameters generated during the encryption process.

[0082] The encryption parameters include primary encryption parameters and secondary encryption parameters.

[0083] The first-level encryption parameters include the position information of the fixed verification pixel, the RGB value offset rule corresponding to the fixed verification pixel, and the original RGB value of the fixed verification pixel.

[0084] The secondary encryption parameters include the encryption algorithm name, encryption key, correspondence between target pixel group and position code, offset correspondence between each digit and the R, G and B values ​​in RGB values, point information of each target pixel in the target pixel group, and the original RGB value of each target pixel.

[0085] S210 obtains the encrypted video stream after the keyframe to be encrypted is encrypted, and provides the user with the playback service of the encrypted video stream.

[0086] S211, extract the source-tracing keyframes corresponding to the keyframes to be encrypted from the pirated video stream, and deduce the source-tracing information consistent with the relevant fields from the source-tracing keyframes in reverse by combining the encryption parameters.

[0087] In some embodiments, the process of extracting the source-tracing keyframes corresponding to the keyframes to be encrypted from the pirated video stream, and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframes in combination with encryption parameters, includes: obtaining a suspected pirated video stream, extracting the suspected source-tracing keyframes corresponding to the keyframes to be encrypted from the suspected pirated video stream; performing a first-level judgment on the suspected source-tracing keyframes based on the first-level encryption parameters; when the result of the first-level judgment indicates that the suspected pirated video stream is a pirated video stream, determining the suspected source-tracing keyframe as a source-tracing keyframe (that is, inferring from the first-level encryption parameters that the current suspected pirated video stream is a pirated video stream leaked by our video software), and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframes in combination with the second-level encryption parameters.

[0088] For example, if the derived source information is “Zhou123456-ruanjianA-gongfu-0316”, it can be determined that the name of the current pirated video stream is “Kungfu”, which was leaked by user Zhou123456 on software A.

[0089] In this embodiment, by encrypting the RGB values ​​of the keyframe to be encrypted, the relevant fields are encrypted and stored in the RGB values ​​of the keyframe. This makes the copyright identifier of the video concealed and tamper-proof, effectively preventing video piracy and providing support for subsequent tracing. Specifically, the relevant fields at least include user information and the name of the current playback software. If a user records the video stream and causes piracy, the source information consistent with the original fields can be deduced from the keyframe by combining the encryption parameters, thereby identifying the user and playback software that spread the piracy. In addition, the color value of each pixel changes by only one unit, which is far below the threshold of color value difference that can be perceived by the naked eye, so it will not affect the consistency of the video and the viewing experience.

[0090] Figure 4 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method shown in this application, such as... Figure 4 As shown, this video encryption and piracy tracing method includes the following steps: S401, in response to the user's request to play the target video stream, converts the target video stream to RGBA format and extracts the I-frame images from it as keyframes to be encrypted.

[0091] S402, Collect the relevant fields corresponding to the key frame to be encrypted. The relevant fields include at least the user-related information and the name of the current playback software.

[0092] S403, determine the fixed verification pixel in the keyframe to be encrypted, and perform RGB value offset processing on the fixed verification pixel according to the RGB value offset rule corresponding to the fixed verification pixel.

[0093] S404, based on a preset encryption algorithm, uses a preset encryption key to encrypt the relevant fields to obtain the ciphertext corresponding to the keyframe to be encrypted, which is presented in Base64 encoded form.

[0094] S405, determine multiple characters in the ciphertext, and determine the position code corresponding to each character according to the order of the characters.

[0095] For details on the specific implementation of steps S401 to S405, please refer to the relevant parts of the above embodiments, which will not be repeated here.

[0096] S406, determine N pixels in the keyframe to be encrypted, and form N second pixel groups based on the adjacent pixels corresponding to each of the N pixels. N is the number of position codes of the ciphertext, and the position codes correspond one-to-one with the second pixel groups.

[0097] Continuing with the example of 88 characters in the ciphertext, we directly determine 88 pixels from the keyframe to be encrypted (these 88 pixels are not adjacent and are preferably some distance apart). Then, we determine the adjacent pixels corresponding to each of these 88 pixels (for example, for any pixel in the 88 pixels, we can select the pixels above, below, and to the left of that pixel as its adjacent pixels). We then form a second pixel group from these adjacent pixels, resulting in a total of 88 second pixel groups, each containing 3 pixels. These 88 second pixel groups correspond one-to-one with the positional encoding of the 88 characters in the ciphertext.

[0098] S407, take the second pixel group corresponding to each position code as the target pixel group corresponding to each position code, and take the target pixel group corresponding to the position code as the target pixel group corresponding to the character corresponding to the position code in the key frame to be encrypted.

[0099] S408: For each character, obtain the decimal value corresponding to the character in the ASCII table, and based on the decimal value, perform RGB value offset processing on the target pixel point in the target pixel point group corresponding to the character in the keyframe to be encrypted.

[0100] In this application, based on decimal values, RGB value offset processing is performed on the target pixels within the target pixel group corresponding to the character in the keyframe to be encrypted, including: obtaining the value of each digit in the decimal value, including the ones place, tens place, and hundreds place; determining the offset correspondence between each digit and the R, G, and B values ​​in the RGB values; and performing RGB value offset processing on the target pixels within the target pixel group corresponding to the character in the keyframe to be encrypted, based on the value of each digit and the offset correspondence.

[0101] In some embodiments, since the ASCII code range corresponding to the ciphertext character is 0-255 (requiring 3 decimal digits for representation, such as "U" corresponding to ASCII decimal 85, i.e., "085"), and the range of each RGB color value channel is 0-255, an allocation rule is set where "R channel color value corresponds to the hundredths digit of the ASCII code, G channel corresponds to the tenths digit, and B channel corresponds to the units digit." One ciphertext character needs to be stored across 3 pixels. That is, the offset correspondence between each digit and the R, G, and B values ​​in the RGB values ​​is set as follows: offset the R channel color value of the first pixel from the hundredths digit of the ASCII decimal value; offset the G channel color value of the second pixel from the tenths digit of the ASCII decimal value; and offset the B channel color value of the third pixel from the units digit of the ASCII decimal value.

[0102] Figure 5 This is an exemplary schematic diagram illustrating how, in this embodiment of the application, RGB value offset processing is performed on the target pixel points within the target pixel point group corresponding to the character in the keyframe to be encrypted. Figure 5 As shown, taking the first character "U" of the ciphertext as an example, we first look up the ASCII decimal value of "U" to find 85 (0 percentile, 8 tenths, 5 units). Assume the three pixels in the target pixel group corresponding to the first character "U" are A (99, 200, 23), B (98, 190, 22), and C (99, 198, 24). After offsetting the RGB values ​​of these three pixels according to the aforementioned offset correspondence between each digit and the R, G, and B values ​​in the RGB values, we get A (99, 200, 23), B (98, 198, 22), and C (99, 198, 29). That is, the R channel color value of pixel A is offset by 0, the G channel color value of pixel B is offset by 8, and the B channel color value of pixel C is offset by 5. This hides the ASCII decimal value "85" within the ciphertext. Since the color value of each pixel can change by a maximum of 9 units, the change is far below the threshold of color value difference that the naked eye can perceive (usually ≥10), so it will not affect the consistency of the video and the viewing experience.

[0103] S409 stores the encryption parameters generated during the encryption process.

[0104] The encryption parameters include primary encryption parameters and secondary encryption parameters.

[0105] The first-level encryption parameters include the position information of the fixed verification pixel, the RGB value offset rule corresponding to the fixed verification pixel, and the original RGB value of the fixed verification pixel.

[0106] The secondary encryption parameters include the encryption algorithm name, encryption key, correspondence between target pixel group and position code, offset correspondence between each digit and the R, G and B values ​​in RGB values, point information of each target pixel in the target pixel group, and the original RGB value of each target pixel.

[0107] S410 obtains the encrypted video stream after the keyframe to be encrypted is encrypted, and provides the user with the playback service of the encrypted video stream.

[0108] S411 Extract the source-tracing keyframe corresponding to the keyframe to be encrypted from the pirated video stream, and deduce the source-tracing information consistent with the relevant fields from the source-tracing keyframe by combining the encryption parameters.

[0109] In some embodiments, the process of extracting the source-tracing keyframes corresponding to the keyframes to be encrypted from the pirated video stream, and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframes in combination with encryption parameters, includes: obtaining a suspected pirated video stream, extracting the suspected source-tracing keyframes corresponding to the keyframes to be encrypted from the suspected pirated video stream; performing a first-level judgment on the suspected source-tracing keyframes based on the first-level encryption parameters; when the result of the first-level judgment indicates that the suspected pirated video stream is a pirated video stream, determining the suspected source-tracing keyframe as a source-tracing keyframe (that is, inferring from the first-level encryption parameters that the current suspected pirated video stream is a pirated video stream leaked by our video software), and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframes in combination with the second-level encryption parameters.

[0110] For example, if the derived source information is “Zhou123456-ruanjianA-gongfu-0316”, it can be determined that the name of the current pirated video stream is “Kungfu”, which was leaked by user Zhou123456 on software A.

[0111] In this embodiment, by encrypting the RGB values ​​of the keyframe to be encrypted, the relevant fields are encrypted and stored in the RGB values ​​of the keyframe. This makes the copyright identifier of the video concealed and tamper-proof, effectively preventing video piracy and providing support for subsequent tracing. Specifically, the relevant fields at least include user information and the name of the current playback software. If a user records the video stream and causes piracy, the source information consistent with the original fields can be deduced from the keyframe by combining the encryption parameters, thereby identifying the user and playback software that spread the piracy. In addition, the color value of each pixel changes by a maximum of 9 units, which is far below the threshold of color value difference that can be perceived by the naked eye, so it will not affect the consistency of the video and the viewing experience.

[0112] Figure 6 This is a schematic diagram illustrating an exemplary implementation of a video encryption and piracy tracing method shown in this application, such as... Figure 6 As shown, this video encryption and piracy tracing method includes the following steps: S601, in response to the user's request to play the target video stream, converts the target video stream to RGBA format and extracts the I-frame images from it as keyframes to be encrypted.

[0113] S602, collect the relevant fields corresponding to the key frame to be encrypted. The relevant fields include at least the user-related information and the name of the current playback software.

[0114] S603, determine the fixed verification pixel in the keyframe to be encrypted, and perform RGB value offset processing on the fixed verification pixel according to the RGB value offset rule corresponding to the fixed verification pixel.

[0115] S604, based on a preset encryption algorithm, uses a preset encryption key to encrypt the relevant fields to obtain the ciphertext corresponding to the keyframe to be encrypted, and the ciphertext is presented in Base64 encoded form.

[0116] S605, determine multiple characters in the ciphertext, and determine the position code corresponding to each character according to the order of the characters.

[0117] For details on the specific implementation of steps S601 to S605, please refer to the relevant parts of the above embodiments, which will not be repeated here.

[0118] S606, Based on the large model, determine the region to be encrypted in the key frame to be encrypted, and determine N first pixel point groups in the region to be encrypted, where N is the number of ciphertext position codes, and the position codes correspond one-to-one with the first pixel point groups.

[0119] Among them, the above Figure 2The specific implementation of determining the N first pixel group in the region to be encrypted has been described in detail in step S206, and will not be repeated here.

[0120] S607, determine N pixels in the keyframe to be encrypted, and form N second pixel groups based on the adjacent pixels corresponding to each of the N pixels. N is the number of position codes of the ciphertext, and the position codes correspond one-to-one with the second pixel groups.

[0121] Among them, the above Figure 4 The specific implementation of forming N groups of second pixels has been described in detail in step S406, and will not be repeated here.

[0122] S608, the first pixel group and the second pixel group corresponding to each position code are respectively used as the target pixel group corresponding to each position code, and the target pixel group corresponding to the position code is used as the target pixel group corresponding to the character corresponding to the position code in the key frame to be encrypted.

[0123] With the above Figure 2 , Figure 4 The difference between the described embodiments is that, Figure 2 and Figure 4 Each of the above describes an encryption method for a keyframe to be encrypted. In this embodiment, a method is combined with the above. Figure 2 , Figure 4 The method in the described embodiments uses the first pixel group and the second pixel group corresponding to each position code as the target pixel group corresponding to each position code. That is, in this embodiment, for the same keyframe to be encrypted, two sets of ciphertext will be encrypted using two different algorithms to achieve redundancy in the encryption process and avoid failure in subsequent piracy tracing due to possible changes in some pixels.

[0124] S609: For each character, obtain the decimal value corresponding to the character in the ASCII table, and based on the decimal value, perform RGB value offset processing on the target pixel point in the target pixel point group corresponding to the character in the keyframe to be encrypted.

[0125] The embodiments of this application are equivalent to the above-mentioned Figure 2 The implementation methods described are Figure 4 The described implementation methods are combined to achieve double encryption of the keyframes to be encrypted. For each layer of encryption, please refer to the specific description of the relevant parts in the above embodiments, which will not be repeated here.

[0126] S610 stores the encryption parameters generated during the encryption process.

[0127] The encryption parameters include primary encryption parameters and secondary encryption parameters.

[0128] The first-level encryption parameters include the position information of the fixed verification pixel, the RGB value offset rule corresponding to the fixed verification pixel, and the original RGB value of the fixed verification pixel.

[0129] The secondary encryption parameters include the encryption algorithm name, encryption key, correspondence between target pixel group and position code, offset correspondence between each digit and the R, G and B values ​​in RGB values, point information of each target pixel in the target pixel group, and the original RGB value of each target pixel.

[0130] In this embodiment, since it employs dual encryption, the correspondence between the target pixel group and the position code, the offset correspondence between each digit and the R, G, and B values ​​in the RGB values, the point information of each target pixel within the target pixel group, and the original RGB values ​​of each target pixel can be further subdivided into: the correspondence between the first pixel group and the position code, the offset correspondence between each digit of the first pixel group and the R, G, and B values ​​in the RGB values, the point information of each target pixel within the first pixel group, and the original RGB values ​​of each target pixel; and the correspondence between the second pixel group and the position code, the offset correspondence between each digit of the second pixel group and the R, G, and B values ​​in the RGB values, the point information of each target pixel within the second pixel group, and the original RGB values ​​of each target pixel.

[0131] S611 obtains the encrypted video stream after the keyframe to be encrypted is encrypted, and provides the user with the playback service of the encrypted video stream.

[0132] S612, extract the source-tracing keyframes corresponding to the keyframes to be encrypted from the pirated video stream, and deduce the source-tracing information consistent with the relevant fields from the source-tracing keyframes in reverse by combining the encryption parameters.

[0133] In some embodiments, the process of extracting the source-tracing keyframes corresponding to the keyframes to be encrypted from the pirated video stream, and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframes in combination with encryption parameters, includes: obtaining a suspected pirated video stream, extracting the suspected source-tracing keyframes corresponding to the keyframes to be encrypted from the suspected pirated video stream; performing a first-level judgment on the suspected source-tracing keyframes based on the first-level encryption parameters; when the result of the first-level judgment indicates that the suspected pirated video stream is a pirated video stream, determining the suspected source-tracing keyframe as a source-tracing keyframe (that is, inferring from the first-level encryption parameters that the current suspected pirated video stream is a pirated video stream leaked by our video software), and reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframes in combination with the second-level encryption parameters.

[0134] For example, if the derived source information is “Zhou123456-ruanjianA-gongfu-0316”, it can be determined that the name of the current pirated video stream is “Kungfu”, which was leaked by user Zhou123456 on software A.

[0135] In this embodiment, by encrypting the RGB values ​​of the keyframe to be encrypted, the relevant fields are encrypted and stored in the RGB values ​​of the keyframe. This makes the copyright identifier of the video concealed and tamper-proof, effectively preventing video piracy and providing support for subsequent tracing. Specifically, the relevant fields at least include user information and the name of the current playback software. If a user records the video stream and causes piracy, the tracing information consistent with the original fields can be deduced from the keyframe by combining the encryption parameters. By implementing double encryption on the keyframe to be encrypted, redundancy in the encryption process is achieved, avoiding tracing failure due to possible changes in some pixels during subsequent piracy tracing.

[0136] Figure 7 This is an exemplary schematic diagram of a video encryption and piracy tracing device shown in this application, such as... Figure 7 As shown, the video encryption and piracy tracing device 700 includes a conversion and extraction module 701, an encryption processing module 702, a video playback module 703, and a piracy tracing module 704, wherein: The conversion and extraction module 701 is used to respond to the user's playback request for the target video stream, convert the target video stream into RGBA format, and extract the I-frame images as keyframes to be encrypted. The encryption processing module 702 is used to collect the relevant fields corresponding to the key frame to be encrypted, perform RGB value encryption processing on the key frame to be encrypted according to the relevant fields, and store the encryption parameters generated during the encryption process. The relevant fields include at least the user-related information corresponding to the user and the name of the current playback software. The video playback module 703 is used to obtain an encrypted video stream after the keyframe to be encrypted is encrypted, and to provide the user with playback services for the encrypted video stream; The piracy tracing module 704 is used to extract the traceable keyframes in the pirated video stream that correspond to the keyframes to be encrypted, and to reverse-engineer the traceability information consistent with the relevant fields from the traceable keyframes in combination with the encryption parameters. In this device, by encrypting the RGB values ​​of the keyframes to be encrypted, the relevant fields are encrypted and stored within the RGB values ​​of the keyframes. This makes the copyright information of the video concealed and tamper-proof, effectively preventing video piracy and providing support for subsequent traceability. Specifically, the relevant fields at least include user information and the name of the currently playing software. If a user recorded the video stream and caused piracy, the source information consistent with the original fields can be deduced from the keyframes by combining the encryption parameters, thereby identifying the piracy user and determining the source of the leaked pirated video software.

[0137] Furthermore, the encryption processing module 702 is also used to: encrypt the relevant fields using a preset encryption key based on a preset encryption algorithm to obtain the ciphertext corresponding to the keyframe to be encrypted, the ciphertext being presented in Base64 encoded form; determine multiple characters in the ciphertext, and determine the target pixel group corresponding to each character in the keyframe to be encrypted; for each character, obtain the decimal value corresponding to the character in the ASCII table, and perform RGB value offset processing on the target pixel in the target pixel group corresponding to the character in the keyframe to be encrypted based on the decimal value.

[0138] Furthermore, the encryption processing module 702 is also used to: determine the position code corresponding to each character according to the order of the characters; determine the target pixel group corresponding to each position code in the key frame to be encrypted, and use the target pixel group corresponding to the position code as the target pixel group corresponding to the character corresponding to the position code in the key frame to be encrypted.

[0139] Furthermore, the encryption processing module 702 is also used to: determine the region to be encrypted in the keyframe to be encrypted based on the large model, and determine N first pixel point groups in the region to be encrypted, where N is the number of ciphertext position codes, and the position codes correspond one-to-one with the first pixel point groups; determine N pixels in the keyframe to be encrypted, and based on the adjacent pixels corresponding to each of the N pixels, form N second pixel point groups, and the position codes correspond one-to-one with the second pixel point groups; and use the first pixel point groups and / or second pixel point groups corresponding to each position code as the target pixel point groups corresponding to each position code.

[0140] Furthermore, the encryption processing module 702 is also used to: input the key frame to be encrypted and the keywords extracted from the preset region into the large model to obtain multiple candidate regions output by the large model, wherein the color value difference of the pixels in the candidate regions is within the preset difference range; and select the region to be encrypted from the candidate regions according to the importance of the candidate regions.

[0141] Furthermore, the encryption processing module 702 is also used to: obtain the value of each digit in the decimal value, including the ones place, tens place and hundreds place; determine the offset correspondence between each digit and the R value, G value and B value in the RGB value; and based on the value of each digit and combined with the offset correspondence, perform RGB value offset processing on the target pixel point in the target pixel point group corresponding to the character in the keyframe to be encrypted.

[0142] Furthermore, the encryption processing module 702 is also used to: determine the fixed verification pixel in the key frame to be encrypted; and perform RGB value offset processing on the fixed verification pixel according to the RGB value offset rule corresponding to the fixed verification pixel.

[0143] Furthermore, the encryption parameters include the following information: Level 1 encryption parameters, which include the position information of the fixed check pixel, the RGB value offset rule corresponding to the fixed check pixel, and the original RGB value of the fixed check pixel; Level 2 encryption parameters, which include the algorithm name of the encryption algorithm, the encryption key, the correspondence between the target pixel group and the position code, the offset correspondence, the position information of each target pixel in the target pixel group, and the original RGB value of each target pixel.

[0144] Furthermore, the piracy tracing module 704 is also used to: acquire suspected pirated video streams, extract suspected keyframes to be traced that correspond to the keyframes to be encrypted in the suspected pirated video streams; perform a first-level judgment on the suspected keyframes to be traced based on the first-level encryption parameters; when the result of the first-level judgment indicates that the suspected pirated video stream is a pirated video stream, determine the suspected keyframes to be traced as keyframes to be traced, and, in conjunction with the second-level encryption parameters, reverse-engineer the tracing information consistent with the relevant fields from the keyframes to be traced.

[0145] To implement the above embodiments, this application also proposes an electronic device 800, such as... Figure 8 As shown, the electronic device 800 includes a processor 801 and a memory 802 communicatively connected to the processor. The memory 802 stores instructions that can be executed by at least one processor. The instructions are executed by at least one processor 801 to implement the video encryption and piracy tracing method as shown in the above embodiment.

[0146] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to implement the video encryption and piracy tracing method shown in the above embodiments.

[0147] To implement the above embodiments, this application also proposes a computer program product, including a computer program that, when executed by a processor, implements the video encryption and piracy tracing method shown in the above embodiments.

[0148] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0149] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0150] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0151] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for video encryption and piracy tracing, characterized in that, include: In response to a user's request to play the target video stream, the target video stream is converted into RGBA format and then I-frame images are extracted as keyframes to be encrypted. Collect relevant fields corresponding to the key frame to be encrypted, and perform RGB value encryption processing on the key frame to be encrypted according to the relevant fields, and store the encryption parameters generated during the encryption process. The relevant fields include at least the user-related information corresponding to the user and the name of the current playback software. After the keyframe to be encrypted is encrypted, an encrypted video stream is obtained, and the user is provided with playback service for the encrypted video stream; Extract the source-tracing keyframes from the pirated video stream that correspond to the keyframes to be encrypted, and deduce the source-tracing information consistent with the relevant fields from the source-tracing keyframes in combination with the encryption parameters.

2. The method according to claim 1, characterized in that, The step of encrypting the keyframe to be encrypted with RGB values ​​based on the relevant fields includes: Based on a preset encryption algorithm, the relevant fields are encrypted using a preset encryption key to obtain the ciphertext corresponding to the keyframe to be encrypted, and the ciphertext is presented in Base64 encoded form. Determine multiple characters in the ciphertext, and determine the target pixel group corresponding to each character in the keyframe to be encrypted; For each character, obtain the decimal value corresponding to the character in the ASCII table, and based on the decimal value, perform RGB value offset processing on the target pixel point in the target pixel point group corresponding to the character in the keyframe to be encrypted.

3. The method according to claim 2, characterized in that, Determining the target pixel group corresponding to each character in the keyframe to be encrypted includes: The position code corresponding to each character is determined according to the order in which the characters are arranged; Each of the position codes is determined to correspond to a target pixel group in the keyframe to be encrypted, and the target pixel group corresponding to the position code is taken as the target pixel group corresponding to the character corresponding to the position code in the keyframe to be encrypted.

4. The method according to claim 3, characterized in that, Determining the target pixel group corresponding to each of the position codes in the keyframe to be encrypted includes: Based on the large model, the region to be encrypted in the keyframe to be encrypted is determined, and N first pixel point groups in the region to be encrypted are determined, where N is the number of position codes of the ciphertext, and the position codes correspond one-to-one with the first pixel point groups. N pixels in the keyframe to be encrypted are determined, and N second pixel groups are formed based on the adjacent pixels corresponding to each of the N pixels. The position code corresponds one-to-one with the second pixel group. The first pixel group and / or the second pixel group corresponding to each of the position codes are respectively used as the target pixel group corresponding to each of the position codes.

5. The method according to claim 4, characterized in that, The step of determining the region to be encrypted in the keyframe to be encrypted based on the large model includes: The keyframe to be encrypted and the preset region extraction keywords are input into the large model to obtain multiple candidate regions output by the large model, wherein the color value difference of the pixels in the candidate regions is within a preset difference range. The region to be encrypted is selected from the candidate regions based on their importance.

6. The method according to any one of claims 3-5, characterized in that, The step of performing RGB value offset processing on the target pixel points within the target pixel point group corresponding to the character in the keyframe to be encrypted, based on the decimal value, includes: Obtain the value of each digit in the decimal number, where the digits include the ones place, tens place, and hundreds place; Determine the offset correspondence between each of the digits and the R, G, and B values ​​in the RGB values; Based on the numerical values ​​of each digit and in conjunction with the offset correspondence, the RGB value offset processing is performed on the target pixel points within the target pixel point group corresponding to the character in the keyframe to be encrypted.

7. The method according to claim 6, characterized in that, After converting the target video stream to RGBA format and extracting the I-frame images therein as keyframes to be encrypted, the method further includes: Determine the fixed verification pixels in the keyframe to be encrypted; According to the RGB value offset rule corresponding to the fixed verification pixel, the fixed verification pixel is subjected to RGB value offset processing.

8. The method according to claim 7, characterized in that, The encryption parameters include the following information: The first-level encryption parameters include the position information of the fixed verification pixel, the RGB value offset rule corresponding to the fixed verification pixel, and the original RGB value of the fixed verification pixel. The secondary encryption parameters include the algorithm name of the encryption algorithm, the encryption key, the correspondence between the target pixel group and the position code, the offset correspondence, the point information of each target pixel in the target pixel group, and the original RGB value of each target pixel.

9. The method according to claim 8, characterized in that, The step of extracting the source-tracing keyframe corresponding to the keyframe to be encrypted from the pirated video stream, and then reverse-engineering the source-tracing information consistent with the relevant fields from the source-tracing keyframe in combination with the encryption parameters, includes: Obtain a suspected pirated video stream, and extract the suspected source-tracing keyframes in the suspected pirated video stream that correspond to the keyframes to be encrypted; Based on the first-level encryption parameters, a first-level judgment is made on the suspected keyframes to be traced. When the result of the first-level judgment indicates that the suspected pirated video stream is a pirated video stream, the suspected key frame to be traced is determined to be a key frame to be traced, and the traceability information consistent with the relevant fields is deduced from the key frame to be traced in reverse by combining the second-level encryption parameters.

10. A video encryption and piracy tracing device, characterized in that, include: The conversion and extraction module is used to respond to the user's playback request for the target video stream, convert the target video stream into RGBA format, and extract the I-frame images as keyframes to be encrypted. The encryption processing module is used to collect relevant fields corresponding to the key frame to be encrypted, perform RGB value encryption processing on the key frame to be encrypted according to the relevant fields, and store the encryption parameters generated during the encryption process. The relevant fields include at least the user-related information corresponding to the user and the name of the current playback software. The video playback module is used to obtain an encrypted video stream after the keyframe to be encrypted is encrypted, and to provide the user with playback services for the encrypted video stream; The piracy tracing module is used to extract the source-tracing key frame corresponding to the key frame to be encrypted from the pirated video stream, and to reverse deduce the source-tracing information consistent with the relevant fields from the source-tracing key frame in combination with the encryption parameters.

11. An electronic device, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.

13. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-9.