Method, device and equipment for protecting video content in webpage and storage medium

CN123020906APending Publication Date: 2026-10-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510550293.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种针对网页中视频内容的保护方法、装置、设备及存储介质,以解决网页中的视频内容破解难度低的问题

Benefits of technology

[0036]本申请实施例提供了一种针对网页中视频内容的保护方法、装置、设备及存储介质,该方法中,由于版本密钥是在构建视频播放组件的当前版本时,设置在视频播放组件中的,因此攻击者即使破解了某一版本中版本密钥的调用方式,也无法通过破解出的这一版本密钥继续使用下一个版本,攻击者需要不断地破解每个版本的版本密钥,这就可以避免攻击者对视频内容进行工具化快速破解,大大提升了破解的复杂度,进而有效提升视频内容的破解门槛和破解耗时,提高了视频内容的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020906A_ABST
    Figure CN123020906A_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and provides a protection method and device for video content in a webpage, equipment and a storage medium. The method comprises the following steps: when a playing request triggered by a client for video content in a target webpage is received, a version key carried in the playing request is acquired; wherein the version key represents a current version of a video playing component in the target webpage on the client, and the version key is set in the video playing component when the current version of the video playing component is constructed; validity verification is performed on the version key based on a reference key set preset for the video playing component; each reference key in the reference key set corresponds to a version of the video playing component; and when the verification is passed, playing data of the video content is returned to the client. Through the method, the cracking difficulty and cracking time of the video content can be increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and provides a method, apparatus, device, and storage medium for protecting video content on web pages. Background Technology

[0002] Protecting video content is a key focus and a major challenge for video platforms. When users watch video content on the World Wide Web (Web), they typically do so using the browser's software development kit (SDK). However, the browser's code is almost open source, and its accompanying packet capture and debugging tools are readily available. Therefore, attackers often use reverse engineering techniques to analyze and crack the SDK's operating mechanism, then impersonate a legitimate player to steal video content.

[0003] In related technologies, video content protection is usually achieved by obfuscating the code of the playback SDK. However, this method does not fundamentally change the code logic of the playback SDK. Therefore, attackers who are familiar with the development language and reverse engineering tools can still restore the function and process of the code through debugging and decompilation.

[0004] This shows that the relevant technologies still have the problem of low difficulty in cracking video content. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for protecting video content on web pages, in order to solve the problem that video content on web pages is easy to crack.

[0006] In a first aspect, embodiments of this application provide a method for protecting video content on a webpage, applied on a server side, including:

[0007] When a playback request triggered by a client for video content on a target webpage is received, the version key carried in the playback request is obtained; wherein, the version key represents the current version of the video playback component on the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is built;

[0008] Based on a preset reference key set corresponding to the video playback component, the validity of the version key is verified; each reference key in the reference key set corresponds to a version of the video playback component.

[0009] Upon successful verification, playback data of the video content is returned to the client.

[0010] In one possible implementation, if the verification fails, an error message is returned to the client to refuse to play the video content.

[0011] Secondly, embodiments of this application provide a method for protecting video content on a webpage, applied to a client, including:

[0012] In response to a playback operation triggered by video content on a target webpage, the version key in the video playback component of the target webpage is invoked, and a playback request carrying the version key is sent to the server so that the server can verify the version key; wherein, the version key represents the current version of the video playback component on the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed;

[0013] Upon receiving playback data of the video content returned by the server, the video content is played based on the playback data.

[0014] Thirdly, embodiments of this application also provide a protection device for video content on a webpage, applied on a server side, including:

[0015] The key acquisition unit is used to acquire the version key carried in the playback request when a playback request triggered by a client for video content in a target webpage is received; wherein, the version key represents the current version of the video playback component in the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed;

[0016] A key verification unit is used to verify the validity of the version key based on a preset reference key set corresponding to the video playback component; each reference key in the reference key set corresponds to a version of the video playback component.

[0017] The verification result feedback unit is used to return the playback data of the video content to the client when the verification is successful.

[0018] In one possible implementation, when the key verification unit verifies the validity of the version key based on a preset reference key set corresponding to the video playback component, it specifically performs the following: if the version key does not match any reference key in the reference key set, it determines that the verification fails; if the version key matches any reference key in the reference key set, it obtains the key validity information associated with the matched reference key; if the key validity information indicates that the key is valid, it determines that the verification passes; if the key validity information indicates that the key is invalid, it determines that the verification fails.

[0019] In one possible implementation, the device further includes: a key management unit, configured to acquire usage status information of each reference key in the reference key set; and for each reference key in the reference key set, to perform the following: when the usage status information of a reference key meets a preset status update condition, update the key validity information associated with the reference key.

[0020] In one possible implementation, the usage status information includes: usage amount; each usage amount describes the total number of clients using the version of the video playback component corresponding to the corresponding reference key; when the key management unit updates the key validity information associated with a reference key when the usage status information of a reference key meets the preset status update conditions, it is specifically used to: update the key validity information associated with the reference key to: key invalid when the usage amount of a reference key is not greater than a preset usage amount threshold.

[0021] In one possible implementation, the usage status information includes: the requisition time; each requisition time describes the time when the corresponding reference key is set in the corresponding version of the video playback component; when the key management unit updates the key validity information associated with a reference key when the usage status information of a reference key meets the preset status update conditions, it specifically performs the following: based on the requisition time of the reference key, it determines the usage duration of the reference key; when the usage duration reaches the preset validity period, it updates the key validity information associated with the reference key to: key invalid.

[0022] In one possible implementation, the usage status information includes a requisition status, each of which describes whether the corresponding reference key has been set in the corresponding version of the video playback component; when the key management unit updates the key validity information associated with a reference key when the usage status information of a reference key meets the preset status update conditions, it is specifically used to: when the requisition status of a reference key changes from pending requisition to requisitioned, update the key validity information associated with the reference key to: key valid.

[0023] In one possible implementation, the key management unit is further configured to: designate at least one reference key in the reference key set that is not set in the video playback component as a key to be claimed; and generate a new key to be claimed when the key to be claimed in the reference key set meets at least one of the following conditions: the total number of keys to be claimed is not greater than a preset key number threshold; and the time between the current time and the generation time of the latest key to be claimed is not less than a preset key generation period.

[0024] In one possible implementation, the verification result feedback unit is further configured to: return an error message to the client to refuse to play the video content when the verification fails.

[0025] Fourthly, embodiments of this application also provide a protection device for video content on a webpage, applied to a client side, including:

[0026] The key invocation unit is used to invoke the version key in the video playback component of the target webpage in response to a playback operation triggered by the video content in the target webpage.

[0027] A playback request sending unit is used to send a playback request carrying the version key to the server so that the server can verify the version key; wherein, the version key represents the current version of the video playback component in the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed;

[0028] The playback unit is used to play the video content based on the playback data returned by the server when it receives the playback data of the video content.

[0029] In one possible implementation, when the key invocation unit invokes the version key in the video playback component of the target webpage in response to a playback operation triggered by the video content in the target webpage, it is specifically used to: obtain the key invocation interface corresponding to the current version of the video playback component in response to the playback operation triggered by the video content in the target webpage; different versions of the video playback component correspond to different key invocation interfaces; the interface name of the key invocation interface is randomly generated when the current version of the video playback component is constructed; and invoke the version key in the video playback component through the key invocation interface.

[0030] In one possible implementation, the apparatus further includes: a version update unit, configured to update the video playback component to the latest version by refreshing the target webpage when receiving an error message from the server indicating a refusal to play the video content; the playback request sending unit, further configured to call the latest version key in the updated video playback component and send a playback request carrying the latest version key to the server, so that the server can verify the latest version key; and the playback unit, further configured to play the video content based on the playback data returned by the server when receiving playback data of the video content.

[0031] Fifthly, embodiments of this application also provide a computer device, including a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor performs the steps of the method for protecting video content on a webpage described in the first aspect, including: upon receiving a playback request triggered by a client for video content on a target webpage, obtaining a version key carried in the playback request; wherein the version key represents the current version of the video playback component on the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed; validating the version key based on a preset reference key set corresponding to the video playback component; each reference key in the reference key set corresponds to a version of the video playback component; and returning playback data of the video content to the client when the verification passes.

[0032] Alternatively, when the program code is executed by the processor, the processor performs the steps of the method for protecting video content on a webpage as described in the second aspect above, including: in response to a playback operation triggered for video content on a target webpage, calling a version key in the video playback component of the target webpage, and sending a playback request carrying the version key to the server, so that the server verifies the version key; wherein, the version key represents the current version of the video playback component on the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed; upon receiving playback data of the video content returned by the server, playing the video content based on the playback data.

[0033] Sixthly, embodiments of this application also provide a computer-readable storage medium including program code, which, when the program product is run on a computer device, is used to cause the computer device to perform the steps of the method for protecting video content on a webpage in the first aspect, or to cause the computer device to perform the steps of the method for protecting video content on a webpage in the second aspect.

[0034] In a seventh aspect, embodiments of this application also provide a computer program product, including computer instructions, which are executed by a processor to perform the steps of the method for protecting video content on a webpage in the first aspect, or to cause the computer device to perform the steps of the method for protecting video content on a webpage in the second aspect.

[0035] The beneficial effects of this application are as follows:

[0036] This application provides a method, apparatus, device, and storage medium for protecting video content on web pages. In this method, since the version key is set in the video playback component when the current version is built, even if an attacker cracks the calling method of the version key in a certain version, they cannot continue to use the cracked version key in the next version. The attacker needs to continuously crack the version key of each version, which can prevent attackers from quickly cracking video content using tools, greatly increasing the complexity of cracking, thereby effectively raising the threshold and time consumption for cracking video content, and improving the security of video content.

[0037] Furthermore, since different reference keys in the reference key set correspond to different versions of the video playback component, by adjusting the validity of the corresponding reference keys in the reference key set when updating the version of the video playback component, the version keys cracked by attackers can be rendered invalid, thereby increasing the complexity of cracking. Because this method is simple and effective, it also reduces the investment cost in protecting video content security.

[0038] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0039] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0040] Figure 1 This is a schematic diagram illustrating the process of cracking video content in the related technologies provided in the embodiments of this application;

[0041] Figure 2 This is an optional schematic diagram of an application scenario in the embodiments of this application;

[0042] Figure 3 A flowchart illustrating a method for protecting video content on a webpage, provided in an embodiment of this application;

[0043] Figure 4 This is a schematic diagram illustrating the key validity information update process provided in an embodiment of this application.

[0044] Figure 5 This is a schematic diagram of a key management page provided in an embodiment of this application;

[0045] Figure 6This is a schematic diagram of the key validity information modification page provided in an embodiment of this application;

[0046] Figure 7 An exemplary flowchart illustrating a method for protecting video content on a webpage, provided in an embodiment of this application;

[0047] Figure 8 These are schematic diagrams illustrating the structures of different versions of the video playback component provided in the embodiments of this application;

[0048] Figure 9 This is a schematic diagram illustrating the construction process of the video playback component provided in the embodiments of this application;

[0049] Figure 10 A flowchart illustrating an overall method for protecting video content on a webpage, as provided in this application embodiment;

[0050] Figure 11 A schematic diagram illustrating the overall process of a method for protecting video content on a webpage, provided in an embodiment of this application;

[0051] Figure 12 A schematic diagram of a device for protecting video content on a webpage, provided as an embodiment of this application;

[0052] Figure 13 A schematic diagram of a device for protecting video content on a webpage, provided as an embodiment of this application;

[0053] Figure 14 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application;

[0054] Figure 15 This is a schematic diagram of the hardware structure of another computer device that applies an embodiment of this application. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.

[0056] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0057] (1) Playback SDK (Software Development Kit): This is a set of tools and interfaces that help developers integrate audio and video playback functions into applications. It typically includes components such as a player, decoder, and network protocol support, and is suitable for various platforms and devices. It should be noted that the video playback component in this application embodiment is a playback SDK product, which can be simply referred to as the playback SDK.

[0058] (2) Broadcast Control Backend: This is a system used to manage and control the playback of audio and video content, typically deployed on a server. It is responsible for content management, scheduling, detection, and distribution, ensuring that video content is played as planned and monitoring playback status in real time. It should be noted that the server in this embodiment can function as a broadcast control backend.

[0059] (3) WASM: The full name is WebAssembly, which can be understood as a binary format library that runs in the browser environment. In this application embodiment, it can be encapsulated as a WASM module in the video playback component. It has the characteristics of high performance and difficulty in code reverse analysis.

[0060] (4) WASM hijacking: This is a method of malicious attack that utilizes WASM technology. Attackers modify or replace the WASM module to make it execute malicious code.

[0061] (5) Code reverse analysis: This is a technique for reverse disassembling and analyzing the structure, process, algorithm, code, etc. of software. It is mainly used in software cracking, vulnerability discovery, and malicious code analysis.

[0062] (6) Digital Rights Management (DRM): This refers to the technology for protecting the rights, controlling the use, and managing digital content (such as audio and video program content, documents, e-books, etc.) during production, dissemination, sale, and use. In this embodiment, the video content of the target webpage is a type of digital content protected by DRM.

[0063] (7) Virtual Machine Protect (VMP): This is a high-strength code hardening method. Taking a binary program as an example, after virtual machine protection, the machine instructions that originally represented the business logic were directly executed by the CPU, but instead the CPU executes the machine instructions of the virtual machine, and then the virtual machine completes the operation of reading, translating and executing the bytecode that represents the business logic.

[0064] The design concept of the embodiments of this application is briefly introduced below:

[0065] Protecting video content is a key focus and a major challenge for video platforms. When users watch video content on the World Wide Web (Web), they typically do so using the browser's software development kit (SDK). However, the browser's code is almost open source, and its accompanying packet capture and debugging tools are readily available. Therefore, attackers often use reverse engineering techniques to analyze and crack the SDK's operating mechanism, then impersonate a legitimate player to steal video content.

[0066] See Figure 1 This is a schematic diagram illustrating the process of cracking video content in the related technology provided in the embodiments of this application. For example... Figure 1 As shown, when a service object plays video content through a web page or H5 page, the playback SDK can send the video identity (VID) of the video content to the WASM module. This allows the WASM module to generate a corresponding video key in real time. The server then verifies this video key to confirm the legitimacy of the playback request. Upon successful verification, the playback SDK can play the video content. Figure 1 (Only the case where key verification is successful is shown in the image), where the video content can also be protected using DRM technology.

[0067] However, during this process, attackers can use code reverse engineering techniques to analyze the creation and calling logic of the WASM module in the playback SDK code to obtain the generation and calling methods of each key. Then, they can calculate the key locally according to the generation and calling methods of each key, and then use the key to pull the playback address of the corresponding video content through the video linking service of the video platform, thereby stealing the video content.

[0068] In related technologies, the following two methods are commonly used for video content protection:

[0069] One approach is to use code obfuscation techniques to protect the video content. Code obfuscation involves renaming variables in the playback SDK code that may contain sensitive information to meaningless strings or short characters (e.g., replacing username with 'a', password with 'b', etc.). This significantly increases the difficulty for attackers to read the playback SDK code, thereby increasing the difficulty of cracking the playback SDK. However, this method does not fundamentally change the playback SDK's code logic. Therefore, attackers familiar with programming languages ​​and reverse engineering tools can still debug and decompile the code to reconstruct its functionality and flow.

[0070] Secondly, video content is encrypted using DRM technology. This means that a corresponding certificate must be obtained before playing the video, and playback is only possible after the certificate verification is successful. In this case, even if an attacker steals the video content, they will be unable to play it because they cannot obtain the certificate. However, DRM has browser environment and cost requirements, and most browsers currently used by service users do not support DRM playback. This means that adopting this method will prevent most legitimate service users from playing the video content, thus affecting the user experience.

[0071] Therefore, relying on code obfuscation technology for video content protection has the problem of easy cracking. If the above two methods are combined, that is, a combination of code obfuscation technology and DRM technology for video content protection, although the cracking difficulty is increased, most service users will not be able to play the video content normally.

[0072] In view of this, embodiments of this application provide a method, apparatus, device, and storage medium for protecting video content on a webpage. In this method, a client can respond to a playback operation triggered by video content on a target webpage by calling the version key in the video playback component of the target webpage and sending a playback request carrying the version key to the server. The version key is set in the video playback component when the current version of the video playback component is constructed.

[0073] When the server receives a playback request from a client for video content on a target webpage, it retrieves the version key carried in the playback request and then verifies the validity of the version key based on the preset reference key set of the corresponding video playback component. If the verification passes, the server returns the video playback data to the client. The client can then play the video content based on the received playback data.

[0074] By using the above method, since the version key is set in the video playback component when the current version is built, even if an attacker cracks the way the version key is called in a certain version, they cannot continue to use the cracked version key in the next version. The attacker needs to continuously crack the version key of each version, which can prevent attackers from using tools to quickly crack the video content, greatly increasing the complexity of cracking, thereby effectively raising the threshold and time consumption for cracking the video content, and improving the security of the video content.

[0075] Furthermore, since different reference keys in the reference key set correspond to different versions of the video playback component, by adjusting the validity of the corresponding reference keys in the reference key set when updating the version of the video playback component, the version keys cracked by attackers can be rendered invalid, thereby increasing the complexity of cracking. Because this method is simple and effective, it also reduces the investment cost in protecting video content security.

[0076] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0077] Figure 2 One application scenario is shown, which includes a client 210 and a server 220. The client 210 establishes a communication connection with the server 220 through a wired network or a wireless network.

[0078] Client 210 can respond to a playback operation triggered by video content on the target webpage by calling the version key in the video playback component of the target webpage and sending a playback request carrying the version key to server 220, so that server 220 can verify the version key. The version key represents the current version of the video playback component on the target webpage on the client, and is set in the video playback component when the current version of the video playback component is built.

[0079] When server 220 receives a playback request from client 210, it obtains the version key carried in the playback request. Then, based on a preset reference key set for the corresponding video playback component, it verifies the validity of the version key. Each reference key in the reference key set corresponds to a version of the video playback component. Upon successful verification, server 220 returns playback data of the video content to client 210.

[0080] When client 210 receives playback data of the video content returned by the server, it can play the video content based on the playback data.

[0081] In this embodiment of the application, the client 210 can refer to a terminal device that can access the target webpage, such as a smartphone, tablet computer, laptop computer, desktop computer, smartwatch, etc., but is not limited to this.

[0082] The server 220 in this application embodiment can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. This application does not impose any restrictions on these services.

[0083] Furthermore, the client 210 can access the target webpage through any browser installed therein, or it can access the target webpage by calling the URL of the target webpage through system commands. This application does not limit the way the client 210 accesses the target webpage.

[0084] It should be noted that, Figure 2 The application scenarios shown are merely illustrative and are not intended to limit the scope of this application.

[0085] This application provides a method for protecting video content on web pages, which can be applied to... Figure 2 In server 220 shown. See also Figure 3 An exemplary flowchart of a method for protecting video content on a webpage, provided in an embodiment of this application, is shown. This method may include the following steps 301-303:

[0086] Step 301: When a playback request is received from the client for video content on the target webpage, obtain the version key carried in the playback request.

[0087] The target webpage can be any webpage used to play video content from a certain video platform. For example, suppose video platform A applies a method to protect video content on webpages, and the homepage of video platform A includes the covers and titles of movies 1, 2, and 3. Users can enter the corresponding movie's playback webpage by clicking on the title or cover of the movie they want to watch. If a user enters the playback webpage of movie 1 by clicking on the title of movie 1, then during the playback of movie 1, the playback webpage of movie 1 is the target webpage in this embodiment, and movie 1 is the video content on the target webpage.

[0088] In some embodiments, since different versions of the video playback component correspond to different version keys, the version key carried in the playback request can be used to indicate the current version of the video playback component in the target webpage opened on the client. The version key is set in the video playback component when the current version of the video playback component is built. For example, when building video playback component V1, key1 is set as the version key in the video playback component, and when building video playback component V2, key2 is set as the version key in the video playback component. Then, if the server recognizes that the version key carried in the playback request is key1, it can be said that the client sending the playback request has installed video playback component V1. Similarly, if the server recognizes that the version key carried in the playback request is key2, it can be said that the client sending the playback request has installed video playback component V2. Here, V in video playback component V1 represents the version, which will not be explained further in subsequent uses.

[0089] In one possible implementation, the version key can be set in the video playback component as follows: During the construction of the current version of the video playback component, a key to be claimed can be selected from the preset reference key set of the corresponding video playback component. Information that needs protection related to the selected key to be claimed (such as the decryption algorithm used by the key to be claimed, login information, etc.) is compiled into the current version of the video playback component, thereby binding the selected key to be claimed as the version key of the current version of the video playback component. Here, the key to be claimed refers to a reference key in the reference key set that has not been set in any version of the video playback component.

[0090] In one possible implementation, the video playback component can be updated periodically. For example, the update cycle could be 7 days, meaning a new version of the video playback component is built every 7 days and updated on the target webpage. Furthermore, each time a new version of the video playback component is built, a pending key can be obtained as a version key using the method described above and set into the video playback component. It should be noted that the update cycle can be set based on actual circumstances or experience; this application does not impose any limitations on it.

[0091] Step 302: Verify the validity of the version key based on the preset reference key set of the corresponding video playback component.

[0092] The server can determine the validity of the version key based on the expiration information of each reference key included in the reference key set. Different reference keys in the reference key set correspond to different versions of the video playback component.

[0093] In one possible implementation, when validating the version key, if the version key does not match any reference key in the reference key set, the verification can be directly determined to have failed. If the version key matches any reference key in the reference key set, the key validity information associated with the matched reference key can be obtained. If the key validity information indicates that the key is valid, the verification is determined to have passed; if the key validity information indicates that the key is invalid, the verification is determined to have failed.

[0094] Optionally, the key validity information can be represented in the form of an identifier. For example, when the reference key is valid, its associated key validity information can be 1, and when the reference key is invalid, its associated key validity information can be 0. The key validity information can also be represented in text form. For example, when the reference key is valid, the associated key validity information can be "available," and when the reference key is invalid, the associated key validity information can be "unavailable." It should be noted that this application does not limit the form in which the key validity information is represented.

[0095] In some embodiments, the reference key set can be stored on the server in the form of a key list. The key list may include individual reference keys and their status information. This status information describes the current state of the corresponding reference key and may include usage status, key expiration time, encryption algorithm information, application business information, etc. The server can manage the reference key set by managing the status information of each reference key in the key list.

[0096] The usage status information describes the current usage of the corresponding reference key, including usage amount, issuance time, and issuance status. The encryption algorithm information describes the encryption algorithm corresponding to the reference key; if an asymmetric encryption algorithm is used, the encryption algorithm information describes the private key information corresponding to the reference key. The application business information describes the business of the video platform to which the reference key is applied, such as sports, animation, or general video services. The validity period of the reference key may differ for different services.

[0097] In one possible implementation, to increase the time required to crack video content, when managing reference keys, the server can first obtain the usage status information of each reference key in the reference key set. Then, for each reference key in the reference key set, the server performs the following: when the usage status information of a reference key meets a preset status update condition, the key validity information associated with that reference key is updated. Since key validity information indicates whether a key is valid, updating the key validity information means changing the key validity information of the reference key from valid to invalid, or from invalid to valid.

[0098] In some embodiments, the preset state update condition can be one or more of the following conditions 1-4:

[0099] Condition 1: The amount of usage does not exceed the preset usage threshold.

[0100] The usage count describes the total number of clients using the version of the video playback component corresponding to the given reference key. For example, assuming key 1 corresponds to video playback component V1, and there are currently 100 clients using video playback component V1, then the usage count of key 1 is 100.

[0101] If the usage of a currently valid reference key is no greater than a preset usage threshold, it indicates that a new version of the video playback component already exists, and the reference key is being phased out with minimal impact on the service recipients. Therefore, the key validity information of the reference key can be updated to indicate that the key is invalid. It should be understood that the preset usage threshold can be set based on actual circumstances or experience, such as 100,000 or 500,000, and this application does not impose any limitations on it.

[0102] This condition allows for the updating of key expiration information while minimizing the impact on the service recipients. In other words, it can both maintain the user experience of the service recipients and increase the difficulty of cracking the video playback component.

[0103] Condition 2: Coverage rate is not greater than the preset coverage rate threshold.

[0104] Coverage rate describes the usage of a reference key as a percentage of the total usage of currently valid reference keys. For example, if the currently valid reference keys are key 1 and key 2, and key 1 has a usage of 10 and key 2 has a usage of 90, then the coverage rate of key 1 is 10 / (10+90) = 10%, and the coverage rate of key 2 is 90 / (10+90) = 90%.

[0105] Similar to condition 1, if the coverage of a currently valid reference key is not greater than a preset coverage threshold, it indicates that a new version of the video playback component already exists, and discarding the reference key has minimal impact on the service recipients. Therefore, the key validity information of the reference key can be updated to indicate that the key is invalid. It should be understood that the preset coverage threshold can be set based on actual conditions or experience, for example, it could be 10%, 15%, etc., and this application does not impose any limitations on it.

[0106] Condition 3: The usage time has reached the preset validity period.

[0107] The server can first determine the usage duration of a reference key based on its usage status information, specifically the issuance time. The issuance time describes when the reference key was set in the corresponding version of the video playback component. For example, if key 1 is the version key for video playback component V1, and key 1 was set in video playback component V1 on May 7, 2024, then the issuance time of key 1 is May 7, 2024. Assuming the current time is May 9, 2024, the server can determine the usage duration of the reference key as 2 days based on the time difference between the current time and the issuance time.

[0108] When the usage time of a currently valid reference key reaches a preset validity period, the reference key can be discarded, that is, the key validity information associated with the reference key can be updated to: key invalid. It should be noted that the issuance time can also be accurate to the hour or minute, and the preset validity period can be set according to actual conditions or experience, such as 7 days, 5 days, etc., which are not limited in this application.

[0109] Based on the above scheme, each key update means a version update of the video playback component. Each time the video playback component is updated, the attacker needs to crack it again. This allows the attacker to keep up with the key changes at a relatively low cost, increasing the difficulty of cracking the code and thus protecting the video content.

[0110] Furthermore, in related technologies, attackers typically create reverse engineering tools and then distribute or sell these tools downstream to form an industry for stealing video content. However, with the above solution, attackers need to re-crack the video playback component every time it is updated. This prevents attackers from continuously stealing video content using a single reverse engineering tool, as cracking even one video would take more than 8 hours. Consequently, it is impossible for attackers to further develop an industry, thus fundamentally reducing the number of attackers and contributing to the protection of video copyright.

[0111] Condition 4: The status of the application changes from pending application to applied application.

[0112] The "Receipt Status" describes whether the corresponding reference key has been set in the corresponding version of the video playback component. The receipt status of the reference key that has been set in the corresponding version of the video playback component is "Receipt," and the receipt status of the reference key that has not been set in the corresponding version of the video playback component is "Pending Receipt."

[0113] When the status of a reference key changes from pending to issued, the associated key validity information can be updated to "Key valid". After the update, if the validity of a version key matching the reference key is verified, the verification result will be successful.

[0114] See Figure 4 This is a schematic diagram of the key validity information update process provided in the embodiments of this application, such as... Figure 4As shown, for each currently valid reference key, its usage can be obtained, and it can be determined whether the usage does not exceed a preset usage threshold. If so, the key validity information is changed from valid to invalid. Its coverage can also be obtained, and it can be determined whether the coverage does not exceed a preset coverage threshold. If so, the key validity information is changed from valid to invalid. Furthermore, the issuance time can be obtained, and the used duration can be calculated based on the issuance time. It can be determined whether the used duration has reached a preset validity period. If so, the key validity information is changed from valid to invalid. Additionally, when the reference key's issuance status changes from pending issuance to issued issuance, the key validity information can be changed from invalid to valid.

[0115] In some alternative implementations, relevant personnel can also manually manage the individual reference keys in the reference key set through a web-based key management page. See also Figure 5 This is a schematic diagram of a key management page provided in an embodiment of this application. Figure 5 As shown, the key management page may include, but is not limited to, the following information columns: Key Number, Asymmetric Algorithm, Enabled, Issuance Time, Creation Time, and Operations. When using an asymmetric algorithm, the Key Number column can represent the reference key itself, i.e., the public key in the asymmetric algorithm, while the Asymmetric Algorithm column can represent the private key corresponding to the reference key. The Enabled column indicates whether the reference key is valid; "Yes" indicates the key is valid, and "No" indicates the key is invalid. The Issuance Time column indicates the time when the reference key was set in the corresponding version of the video playback component, and the Creation Time column indicates the time when the reference key was generated. The Operations column indicates the operations that can be performed on the reference key. Relevant personnel can click the "Modify" button to view the usage status information of the corresponding key and modify the key validity information based on the usage status information; relevant personnel can click the "Log" button to view the specific usage of the reference key.

[0116] See Figure 6 This is a schematic diagram of the key validity information modification page provided in an embodiment of this application. Figure 6 The image shows the page for modifying the key validity information of reference key 3. Relevant personnel can select "Yes" or "No" to change the key validity information to "Key Valid" or "Key Invalid." This page also displays usage status information for key 3, such as its usage volume in the past day, its coverage rate in the past day, and the date it was issued. Users can also click the "View" button to check the quality status of key 3. Furthermore, this page can display the coverage rate changes over a certain period in the form of a line graph.

[0117] Figure 6The data shows the coverage changes of key3 over the past 7 days, allowing relevant staff to more intuitively determine the current usage status of key3 and thus better judge whether the key expiration information needs to be modified. For example, if the coverage of key3 has dropped to 0.06% by May 7, 2024, and since it was issued on April 23, 2024, it has been used for 14 days, relevant staff can, through comprehensive judgment, select "No" for whether to enable it, thereby modifying the key3's key expiration information to: key invalid.

[0118] It should be noted that, Figure 5 and Figure 6 This is merely an example; in actual implementation, the content displayed on the page may be increased or decreased according to the actual situation or experience, and this application does not limit it in this regard.

[0119] In one possible implementation, to ensure that the latest version of the video playback component is built, a reference key can be obtained from the reference key set as the version key. When managing the reference key set, at least one reference key in the reference key set that is not set in the video playback component can be used as a key to be obtained. Then, a new key to be obtained is generated when the key to be obtained in the reference key set meets at least one of the following conditions:

[0120] Condition (1) The total number of keys to be claimed is not greater than the preset key quantity threshold.

[0121] For example, if the preset key quantity threshold is 5, and the total number of keys to be claimed in the current reference key set is 5, then since the total number is not greater than the preset key quantity threshold, it meets condition (1), and therefore one or more new keys to be claimed can be generated.

[0122] Condition (2) The current time is not less than the generation time of the latest key to be claimed, and is not less than the preset key generation period.

[0123] For example, assuming the key generation cycle is 7 days, the latest pending key was generated on March 3, and the current time is March 10, then it can be determined that the current time is 7 days away from the generation time of the latest pending key, which is not less than the preset key generation cycle, thus meeting condition (2). Therefore, one or more new pending keys can be generated.

[0124] It should be noted that the number of new keys to be claimed each time can be set according to the actual situation, such as 1, 2, 3, etc., and this application does not limit this.

[0125] In one possible implementation, in addition to validating the version key, the server can also authenticate the VID of the video content included in the playback request, as well as the login information, identity information, and other playback permission-related information of the service recipient, thereby determining whether the client has playback permissions for the video content. If authentication is successful and the version key validity verification is successful, step 303 can be executed.

[0126] Even if the version key validity check passes, the server can still return an error message to refuse playback of video content if authentication fails. For example, suppose the user is not logged in when playing video content through the target webpage. Therefore, the server can determine that authentication failed and the client does not have the permission to play the video content. In this case, the server can return an error message to refuse playback of the video content, and this error message can indicate that the user is not logged in. This allows the client to display a prompt to remind the user to log in, such as a pop-up window on the target webpage, which may include a message such as "You are not logged in."

[0127] Step 303: Upon successful verification, return the video playback data to the client.

[0128] The playback data of the video content returned by the server to the client may include the playback address of the video content. The playback address may be a Uniform Resource Locator (URL) address used to indicate the video content, so that the video playback component of the target webpage in the client can play the corresponding video content based on the playback address.

[0129] In some embodiments, the video content may also be DRM-encrypted video content. In this case, the playback data of the video content returned by the server to the client may include: DRM encryption information corresponding to the video content. The DRM encryption information may include: an encryption scheme (e.g., Widevine, FairPlay, PlayReady, etc.), the address of the DRM key authorization server, and the encryption certificate required by the client.

[0130] Based on the above solution, for content with high protection thresholds (such as advanced on-demand content or other paid content on video platforms), the protection method for video content on web pages provided in this application embodiment can be combined with DRM encryption technology. This can prevent attackers from using simple cracking tools to steal video content, increase the time required to crack the video content, and further increase the difficulty of cracking the video content.

[0131] For example, without the above solution, the web is a prime target for attackers to steal video content because the tools are convenient and the code is easy to crack. A series of videos can be cracked in about 9 minutes after it is released. However, with the above solution, attackers can only steal video content by means of screen recording, and the time spent stealing video content by screen recording can even exceed 12 hours. It can be seen that the above solution can greatly increase the difficulty of cracking videos.

[0132] In addition to the above, video playback data can also include playback control parameters corresponding to the video content: playback range limitation parameters, resolution parameters, multi-language support parameters, and advertising and interactive information parameters. The playback range limitation parameter can be used to restrict the viewing range of member-only video content for non-member users; for example, it can allow non-member users to preview 6 minutes of member-only video content. The resolution parameter can be a list of multi-resolution URLs, allowing users to manually switch resolutions. For example, the multi-resolution URL list can include URL addresses corresponding to each resolution: 480p for URL1, 720p for URL2, etc. When the video content supports multi-language audio or subtitles, the playback data can include multi-language support parameters, such as the addresses of Chinese subtitle files, English subtitle files, Chinese audio tracks, and English audio tracks. Advertising and interactive information parameters are used to limit the display of advertisements and other interactive content inserted in the video content, such as advertisement insertion time, advertisement material URL address, bullet comment trigger time, and voting trigger time. It should be noted that the playback data of video content may also include other information, such as extended information customized by the video platform, which is not limited in this application.

[0133] Optionally, if the version key validity verification passes, but after authenticating the playback request and determining that the client has partial playback permissions for the video content, the server can return playback data to the client for playing a portion of the video content. For example, assuming the video content is member-only content, but the target audience is not a member of the video platform, the playback data can include the video content's playback address and playback range restriction parameters, allowing the client to play a portion of the video content.

[0134] In one possible implementation, the server can return an error message to the client to refuse to play the video content if the version key fails to verify its validity.

[0135] The error message used to refuse to play video content can include the reason for the verification failure, so that the client can perform different actions depending on the reason for the verification failure.

[0136] In one example, the reason for the validity check failing could be that the version key does not exist in the reference key set. This situation may be because the version key carried in the playback request is a key that the attacker calculated locally. Therefore, when the client determines that the reason for the failure is that the version key does not exist in the reference key set, it can display information such as "playback failed" to indicate that it refuses to play the video content.

[0137] In another example, the validity check may fail because the version key has expired. This could be because the target webpage has not been refreshed for a long time, and the video playback component on the target webpage has not been updated to the latest version. Therefore, when the client's target webpage determines that the reason for the validity check failure is that the version key has expired, it can refresh the target webpage to update the video playback component to the latest version, and then send a playback request carrying the latest version key corresponding to the updated video playback component to the server again. The server can repeat steps 301-303 to play the video content on the client.

[0138] In another example, when the validity check fails because the version key has expired, it is also possible that the attacker has cracked the version key in a previous version of the video playback component. However, since the version key was calculated locally by the attacker, the video playback component cannot be updated by refreshing the page. Therefore, even if the reason for the failure of the validation is that the version key has expired, the client can still display information such as "playback failed" to indicate that the video content is refused to be played, even if the validation fails because the version key has expired, when the playback request is not triggered by the target webpage.

[0139] In one possible implementation, the error message used to refuse playback of video content may include error codes. For example, error codes can be Hypertext Transfer Protocol (HTTP) status codes, such as 403, 401, and 400, depending on the specific circumstances. 403 indicates reasons related to permissions or security policies, such as signature error, invalid token, request tampering, or the client lacking permission to access the resource. 401 indicates authentication failure (e.g., not logged in, expired or invalid login credentials). 400 indicates incorrect client request parameters (e.g., missing required fields, incorrect parameter format). It should be noted that error codes can also take other forms and can be set according to actual circumstances or experience. This application does not limit the form and content of error codes.

[0140] In addition, error codes corresponding to the reasons for the above two validity checks failing can be pre-configured, so that the client can identify the reason for the validity check failing by recognizing the error code and then perform the corresponding operation.

[0141] This application provides a method for protecting video content on web pages, which can be applied to... Figure 2 In client 210 shown. See also Figure 7 An exemplary flowchart of a method for protecting video content on a webpage, provided in an embodiment of this application, is included, which may include the following steps 701-702:

[0142] Step 701: In response to a playback operation triggered by the video content on the target webpage, call the version key in the video playback component of the target webpage.

[0143] The client can respond to the service object's action of clicking the play button on the video content on the target webpage and retrieve the version key from the video playback component of the target webpage.

[0144] In one possible implementation, step 701 can be specifically executed as follows: In response to a playback operation triggered by the video content on the target webpage, obtain the key call interface corresponding to the current version of the video playback component, and then call the version key in the video playback component through the obtained key call interface. Different versions of the video playback component correspond to different key call interfaces, and the interface name of the key call interface is randomly generated when the current version of the video playback component is constructed.

[0145] In some embodiments, the video playback component may include a playback module and a security module. The security module may include an environment obfuscation module and a key storage module. The environment obfuscation module is used to obfuscate the code of the video playback component, thereby protecting the security of the front-end code and preventing the code from being reverse engineered, modified, and pirated. The key storage module is used to store keys and can randomly generate the interface name of the key to call the interface through a random algorithm, so that the interface name corresponding to each version of the video playback component is different.

[0146] In one example, the environment obfuscation module could be a JS VMP module, and the key storage module could be a WASM module. See also Figure 8 These are schematic diagrams illustrating the structures of different versions of the video playback component provided in the embodiments of this application, such as... Figure 8 As shown, updating video playback component V1 results in video playback component V2. The version key for video playback component V1 is key100, which is stored in the WASM module. The interface name for the key call interface generated by the random algorithm can be "abc". Assuming the WASM module has three key call interfaces, they are API1_abc, API2_abc, and API3_abc. That is, the JS VMP module needs to use the interface name "abc" to call key100 in the WASM module.

[0147] When updating the version, the version key corresponding to the video playback component V2 is key200, which is stored in the WASM module. The interface name for calling the key generated by the random algorithm can be efg. So, assuming that the WASM module has three key calling interfaces, they are API1_efg, API2_efg, and API3_efg, respectively. That is, the JS VMP module in the video playback component V2 needs to use the interface name "efg" to call key200 in the WASM module.

[0148] It should be noted that the video playback component includes other modules such as the playback module used to implement other functions of the video playback component. Figure 8 Not shown in the image.

[0149] Because the interface name can be randomly generated during the update, the updated video playback component can no longer use the interface name of the previous version of the video playback component to call the version key, which greatly increases the difficulty for attackers to crack it.

[0150] In some implementations, see Figure 9 This is a schematic diagram illustrating the construction process of the video playback component provided in this application embodiment. Each version of the video playback component can be constructed through... Figure 9 The process shown is the one that was constructed. (As...) Figure 9 As shown, the build process can include a development phase and a compilation process. The development phase refers to the time when relevant personnel write the code for a new version of the video playback component. Then, the compilation process begins, where the written code is compiled. The compilation process can include steps such as code inspection, unit testing, compilation and packaging, and integration testing. Figure 9 (Not shown in the image). In addition to these general steps, the compilation process also includes a step of obtaining a version key. This step involves selecting a key to be obtained from the reference key set as the version key corresponding to the new version of the video playback component and storing it in the key storage module of the video playback component. After compilation, the new version of the video playback component is obtained, and thus, when the version update cycle is reached, the video playback component on the target webpage is updated.

[0151] For example, Figure 9The reference key set shown includes four reference keys: Key1, Key2, Key3, and Key4. Key1 is the version key for the old version of the video playback component, which is currently invalid. Key2 is also the version key for the old version of the video playback component, but it is not yet invalid to ensure a smooth transition between the old and new versions. Key2 can be invalidated if the usage of the old version of the video playback component does not exceed a preset usage threshold. Key3 is the version key for the current version of the video playback component. Key4 is a pending key that has not yet been set in the video playback component. In this construction process, Key4 can be selected as the version key to obtain the new version of the video playback component.

[0152] It should be noted that the aforementioned development cycle and version update cycle can be set based on the preset validity period of the reference key. For example, both the development cycle and version update cycle can be equal to the validity period of the reference key. Alternatively, the aforementioned development cycle and version update cycle can also be set according to actual circumstances or experience, and can be the same as or different from the validity period of the reference key. This application does not impose any limitations on this.

[0153] Step 702: Send a playback request carrying the version key to the server so that the server can verify the version key.

[0154] The client can generate a corresponding playback request based on the version key invoked in step 701 and send it to the server so that the server can verify the validity of the version key. For specific verification methods, please refer to [link to relevant documentation]. Figure 3 The relevant descriptions in the method embodiments shown are not repeated here.

[0155] In addition, the playback request sent to the server can also include the video content's VID, as well as the service recipient's login information, identity information, and other playback permission-related information on the target webpage, so that the server can authenticate this playback permission-related information. For specific authentication methods, please refer to [link to relevant documentation]. Figure 3 The relevant descriptions in the method embodiments shown are not repeated here.

[0156] Step 703: Upon receiving the playback data of the video content returned by the server, play the video content based on the playback data.

[0157] In one possible implementation, if the version key fails the server's validity check, the client may receive an error message from the server refusing to play the video content. In this case, the client can refresh the target webpage to update the video playback component to the latest version, then call the latest version key in the updated video playback component, and send a playback request carrying the latest version key to the server so that the server can verify the latest version key.

[0158] In this situation, it is usually because the client stays on the target webpage for a long time without updating the version of the video playback component, and the old version key has been expired. Therefore, after updating the video playback component to the latest version, the validity of the key can usually be verified, and the playback data of the video content returned by the server can be received. Then, the video content can be played based on the received playback data.

[0159] Based on the above scheme, by managing the validity of keys, attackers are required to continuously crack the version keys of new versions of the video playback component, reducing the possibility of quickly cracking video content through reverse engineering tools. This significantly increases the difficulty of cracking and thus improves the security of the video content. Furthermore, the web-based playback component updates exhibit rapid overwrite characteristics; a new version can achieve 97% coverage within three days of its release. In other words, refreshing the webpage updates the component to the latest version, and for users on the client side, the only noticeable change is a webpage refresh when switching videos. Therefore, while improving video content security, it does not negatively impact the user experience.

[0160] In some embodiments, if the verification still fails after refreshing the target webpage, the received error message can be displayed on the target webpage, and the video content can be refused to be played.

[0161] Below, in order to more clearly understand the solution proposed in the embodiments of this application, a method for protecting video content on web pages provided by this application will be introduced in conjunction with specific embodiments.

[0162] See Figure 10 The overall flowchart of a method for protecting video content on a webpage, provided for embodiments of this application, specifically includes:

[0163] Step 1001: Relevant staff periodically build new versions of the video playback component.

[0164] Each time a build is performed, a key from the reference key set is used as the version key. For details on how to build a new version of the video playback component, please refer to [link / reference]. Figure 9 The method embodiments shown will not be described in detail here.

[0165] Step 1002: The server manages the key validity information of the reference key.

[0166] The server can manage the validity of each reference key in the reference key set, and relevant personnel can also manage the validity of each reference key according to the actual situation. For specific management methods, please refer to [link / reference]. Figure 3The relevant descriptions in the method embodiments shown will not be repeated here.

[0167] Step 1003: Relevant staff update the version of the video playback component.

[0168] Relevant staff can periodically update the version of the video playback component.

[0169] Step 1004: The client calls the version key.

[0170] The client can respond to playback operations triggered by video content on the target webpage by calling the version key in the video playback component of the target webpage.

[0171] Step 1005: The client sends a playback request to the server.

[0172] The client sends a playback request carrying the version key to the server.

[0173] Step 1006: The server verifies the validity of the version key.

[0174] If the verification passes, proceed to step 1007A; if the verification fails, proceed to step 1007B. For detailed verification methods, please refer to [link to relevant documentation]. Figure 3 The relevant descriptions in the method embodiments shown will not be repeated here.

[0175] Step 1007A: The server returns playback data to the client.

[0176] Step 1008A: The client plays the video content.

[0177] If the client receives playback data, it will play the video content through the video playback component of the target webpage based on the playback data.

[0178] Step 1007B: The server returns an error message to the client.

[0179] Step 1008B: The client refreshes the target webpage.

[0180] If the client receives an error message, it can first try updating the video playback component version by refreshing the target webpage. After refreshing, it can return to steps 1004-1006 to re-verify the validity of the version key. If the verification passes this time, proceed to steps 1007A-1008A. If the verification still fails, the client can display the received error message on the target webpage and refuse to play the video content.

[0181] It should be noted that this application does not limit the execution order of steps 1001-1003 in the overall process.

[0182] See Figure 11 A schematic diagram illustrating the overall process of a method for protecting video content on a webpage, as provided in this application embodiment, is shown below. Figure 11 As shown, the server can periodically maintain the reference keys through the key management page, such as adding or retiring keys. When the client triggers a playback request carrying the version key through the target webpage, the server can authenticate the playback request and verify the validity of the version key, returning corresponding data based on the verification results. If the verification passes, playback data is returned, and the client plays the video content; if the verification fails, an error message is returned, and the client refreshes the target webpage to update the video playback component to the latest version, thus resolving the verification failure issue. Furthermore, the played video content can be further protected using DRM encryption.

[0183] Figure 11 The document also illustrates another scenario: when a client triggers a playback request carrying a version key through an abnormal website, the abnormal website's page includes a playback SDK that has been cracked by the attacker. This cracked playback SDK contains a forged security module created by the attacker. Since cracking takes a long time, the version key may have already expired by the time it is generated. This would result in the inability to obtain playback data for the video content, causing the client to refuse to play the video content, thus improving the security of the video content.

[0184] Based on the same inventive concept as the above-described method embodiments, this application also provides a protection device for video content on web pages. This device can be applied to a server-side application, such as... Figure 12 The protection device 1200 for video content on a webpage shown may include:

[0185] The key acquisition unit 1201 is used to acquire the version key carried in the playback request when a playback request triggered by a client for video content in a target webpage is received; wherein, the version key represents the current version of the video playback component in the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed;

[0186] The key verification unit 1202 is used to verify the validity of the version key based on a preset reference key set corresponding to the video playback component; each reference key in the reference key set corresponds to a version of the video playback component.

[0187] The verification result feedback unit 1203 is used to return the playback data of the video content to the client when the verification is successful.

[0188] In one possible implementation, when the key verification unit 1202 verifies the validity of the version key based on a preset reference key set corresponding to the video playback component, it is specifically configured to: determine that the verification fails when the version key does not match any reference key in the reference key set; obtain the key validity information associated with the matched reference key when the version key matches any reference key in the reference key set; determine that the verification passes when the key validity information indicates that the key is valid; and determine that the verification fails when the key validity information indicates that the key is invalid.

[0189] In one possible implementation, the device further includes: a key management unit 1204, configured to acquire usage status information of each reference key in the reference key set; and for each reference key in the reference key set, to perform the following: when the usage status information of a reference key meets a preset status update condition, update the key validity information associated with the reference key.

[0190] In one possible implementation, the usage status information includes: usage amount; each usage amount describes the total number of clients using the version of the video playback component corresponding to the corresponding reference key; when the key management unit 1204 updates the key validity information associated with a reference key when the usage status information of a reference key meets the preset status update conditions, it is specifically used to: when the usage amount of a reference key is not greater than the preset usage amount threshold, update the key validity information associated with the reference key to: key invalid.

[0191] In one possible implementation, the usage status information includes: the requisition time; each requisition time describes the time when the corresponding reference key is set in the corresponding version of the video playback component; when the key management unit 1204 updates the key validity information associated with a reference key when the usage status information of a reference key meets the preset status update conditions, it is specifically used to: determine the usage duration of the reference key based on the requisition time of the reference key; when the usage duration reaches the preset validity period, update the key validity information associated with the reference key to: key invalid.

[0192] In one possible implementation, the usage status information includes a requisition status, each of which describes whether the corresponding reference key has been set in the corresponding version of the video playback component; when the key management unit 1204 updates the key validity information associated with a reference key when the usage status information of a reference key meets the preset status update conditions, it is specifically used to: when the requisition status of a reference key changes from pending requisition to requisitioned, update the key validity information associated with the reference key to: key valid.

[0193] In one possible implementation, the key management unit 1204 is further configured to: designate at least one reference key in the reference key set that is not set in the video playback component as a key to be claimed; and generate a new key to be claimed when the key to be claimed in the reference key set meets at least one of the following conditions: the total number of keys to be claimed is not greater than a preset key number threshold; and the time between the current time and the generation time of the latest key to be claimed is not less than a preset key generation period.

[0194] In one possible implementation, the verification result feedback unit 1203 is further configured to: return error information to the client to refuse to play the video content when the verification fails.

[0195] Based on the same inventive concept as the above-described method embodiments, this application also provides another protection device for video content on web pages. This device can be applied to client-side applications, such as... Figure 13 The protection device 1300 for video content on a webpage shown may include:

[0196] The key invocation unit 1301 is used to invoke the version key in the video playback component of the target webpage in response to a playback operation triggered for video content in the target webpage.

[0197] The playback request sending unit 1302 is used to send a playback request carrying the version key to the server so that the server can verify the version key; wherein, the version key represents the current version of the video playback component in the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed;

[0198] The playback unit 1303 is used to play the video content based on the playback data returned by the server when it receives the playback data of the video content.

[0199] In one possible implementation, when the key invocation unit 1301 invokes the version key in the video playback component of the target webpage in response to a playback operation triggered by the video content in the target webpage, it is specifically used to: obtain the key invocation interface corresponding to the current version of the video playback component in response to a playback operation triggered by the video content in the target webpage; different versions of the video playback component correspond to different key invocation interfaces; the interface name of the key invocation interface is randomly generated when constructing the current version of the video playback component; and invoke the version key in the video playback component through the key invocation interface.

[0200] In one possible implementation, the apparatus further includes: a version update unit 1304, configured to update the video playback component to the latest version by refreshing the target webpage when receiving an error message from the server indicating a refusal to play the video content; the playback request sending unit 1302, further configured to call the latest version key in the updated video playback component and send a playback request carrying the latest version key to the server, so that the server can verify the latest version key; and the playback unit 1303, further configured to play the video content based on the playback data returned by the server when receiving playback data of the video content.

[0201] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program with a predetermined function, which works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functions of that module or unit.

[0202] Having described the method and apparatus for protecting video content on web pages according to exemplary embodiments of this application, we will now describe a computer device according to another exemplary embodiment of this application.

[0203] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0204] Based on the same inventive concept as the above-described method embodiments, this application also provides a computer device. In one embodiment, the computer device may be a server, such as... Figure 2 The server 220 is shown. In this embodiment, the computer device 1400 has the following structure: Figure 14 As shown, it may include at least a memory 1401, a communication module 1403, and at least one processor 1402.

[0205] The memory 1401 is used to store computer programs executed by the processor 1402. The memory 1401 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0206] Memory 1401 may be volatile memory, such as random-access memory (RAM); memory 1401 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1401 may be any other medium capable of carrying or storing a desired computer program having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1401 may be a combination of the above-described memories.

[0207] Processor 1402 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 1402 is configured to, when calling a computer program stored in memory 1401, obtain a version key carried in a playback request triggered by a client for video content on a target webpage; wherein the version key represents the current version of the video playback component on the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed; perform validity verification on the version key based on a preset reference key set corresponding to the video playback component; each reference key in the reference key set corresponds to a version of the video playback component; and return playback data of the video content to the client when the verification passes.

[0208] The communication module 1403 is used to communicate with terminal devices and other servers.

[0209] This application embodiment does not limit the specific connection medium between the memory 1401, communication module 1403, and processor 1402. This application embodiment... Figure 14 The memory 1401 and the processor 1402 are connected via a bus 1404, and the bus 1404 is in Figure 14 The diagram uses thick lines to describe the connections between other components; these are for illustrative purposes only and should not be considered limiting. The 1404 bus can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 14 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.

[0210] The memory 1401 stores a computer storage medium, which stores computer-executable instructions for implementing the method for protecting video content on a webpage according to embodiments of this application. The processor 1402 is used to execute the aforementioned method for protecting video content on a webpage, such as... Figure 3 As shown.

[0211] In another embodiment, the computer device can also be other computer devices, such as... Figure 2 The client 210 is shown. In this embodiment, the computer device can be structured as follows: Figure 15 As shown, it includes components such as: communication component 1510, memory 1520, display unit 1530, camera 1540, sensor 1550, audio circuit 1560, Bluetooth module 1570, processor 1580, etc.

[0212] The communication component 1510 is used to communicate with the server. In some embodiments, it may include a Wireless Fidelity (WiFi) module, which is a short-range wireless transmission technology, and the electronic device can send and receive information through the WiFi module.

[0213] The memory 1520 can be used to store software programs and data. The processor 1580 executes various functions of the client 210 and performs data processing by running the software programs or data stored in the memory 1520. The memory 1520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The memory 1520 stores an operating system that enables the client 210 to run. In this application, the memory 1520 may store the operating system and various applications, and may also store a computer program that executes the method for protecting video content on a webpage according to the embodiments of this application.

[0214] The display unit 1530 can also be used to display information input by the object or information provided to the object, as well as a graphical user interface (GUI) for various menus of the client 210. Specifically, the display unit 1530 may include a display screen 1532 disposed on the front of the client 210. The display screen 1532 may be configured as a liquid crystal display, a light-emitting diode, or the like.

[0215] The display unit 1530 can also be used to receive input numerical or character information and generate signal inputs related to object settings and function control of the client 210. Specifically, the display unit 1530 may include a touch screen 1531 disposed on the front of the client 210, which can collect touch operations on or near the object, such as clicking a button, dragging a scroll box, etc.

[0216] The touchscreen 1531 can be placed on top of the display screen 1532, or the touchscreen 1531 and the display screen 1532 can be integrated to realize the input and output functions of the client 210. After integration, it can be referred to as a touch display screen. In this application, the display unit 1530 can display the application and the corresponding operation steps.

[0217] Camera 1540 can be used to capture still images, and objects can publish images captured by camera 1540 through an application. There can be one or multiple cameras 1540. An optical image of an object is generated through a lens and projected onto a photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to processor 1580 to be converted into a digital image signal.

[0218] The terminal device may also include at least one sensor 1550, such as an accelerometer 1551, a proximity sensor 1552, a fingerprint sensor 1553, and a temperature sensor 1554. The terminal device may also be equipped with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, and motion sensor.

[0219] Audio circuitry 1560, speaker 1561, and microphone 1562 provide an audio interface between the client and the target device 210. Audio circuitry 1560 converts received audio data into electrical signals, which are then transmitted to speaker 1561, where they are converted into sound signals for output. Client 210 can also be configured with volume buttons to adjust the volume of the sound signal. Conversely, microphone 1562 converts collected sound signals into electrical signals, which are then received by audio circuitry 1560, converted back into audio data, and output to communication component 1510 for transmission to, for example, another client 210, or to memory 1520 for further processing.

[0220] The Bluetooth module 1570 is used to interact with other Bluetooth devices that also have a Bluetooth module via the Bluetooth protocol. For example, a terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smartwatch) that also has a Bluetooth module through the Bluetooth module 1570, thereby exchanging data.

[0221] The processor 1580 is the control center of the terminal device, connecting various parts of the terminal through various interfaces and lines. It executes various functions and processes data by running or executing software programs stored in the memory 1520 and calling data stored in the memory 1520. In some embodiments, the processor 1580 may include one or more processing units; the processor 1580 may also integrate an application processor and a baseband processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the baseband processor mainly handles wireless communication. It is understood that the baseband processor may not be integrated into the processor 1580. In this application, the processor 1580 can run an operating system, applications, user interface display and touch response, as well as the method for protecting video content on web pages according to embodiments of this application. Furthermore, the processor 1580 is coupled to the display unit 1530.

[0222] Furthermore, it should be noted that in the specific embodiments of this application, object data related to the protection of video content on web pages is involved. When the above embodiments of this application are applied to specific products or technologies, permission or consent from the object is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0223] In some possible implementations, various aspects of the method for protecting video content on web pages provided in this application can also be implemented as a program product, comprising a computer program. When the program product is run on a computer device, the computer program causes the computer device to perform the steps in the method for protecting video content on web pages according to the various exemplary embodiments of this application described above. For example, the computer device can perform actions such as... Figure 3 The steps are shown in the figure.

[0224] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0225] The program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include a computer program, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with a command execution system, apparatus, or device.

[0226] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a readable computer program. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with a command execution system, apparatus, or device.

[0227] Computer programs contained on readable media may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0228] Computer programs for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The computer program can execute entirely on the user's computer device, partially on the user's computer device, as a standalone software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device. In cases involving remote computer devices, the remote computer device can be connected to the user's computer device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer device (e.g., via the Internet using an Internet service provider).

[0229] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0230] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0231] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing a computer-usable computer program.

[0232] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce a mechanism for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0233] These computer program commands may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the commands stored in the computer-readable storage medium produce an article of manufacture including command means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0234] These computer program commands can also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing the commands executed on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0235] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0236] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for protecting video content on a webpage, characterized in that, Applied to the server side, the method includes: When a playback request triggered by a client for video content on a target webpage is received, the version key carried in the playback request is obtained; wherein, the version key represents the current version of the video playback component on the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is built; The version key is validated based on a preset reference key set corresponding to the video playback component; different reference keys in the reference key set correspond to different versions of the video playback component. Upon successful verification, playback data of the video content is returned to the client.

2. The method according to claim 1, characterized in that, The step of validating the version key based on a preset reference key set corresponding to the video playback component includes: If the version key does not match any of the reference keys in the reference key set, the verification is determined to fail. When the version key matches any reference key in the reference key set, obtain the key validity information associated with the matched reference key; When the key validity information indicates that the key is valid, the verification is deemed successful; When the key expiration information indicates that the key is invalid, the verification is determined to fail.

3. The method according to claim 2, characterized in that, The method further includes: Obtain the usage status information of each reference key in the reference key set; For each reference key in the reference key set, perform the following: When the usage status information of a reference key meets the preset status update conditions, the key validity information associated with the reference key is updated.

4. The method according to claim 3, characterized in that, The usage status information includes: usage amount; each usage amount describes the total number of clients using the version of the video playback component corresponding to the corresponding reference key; When the usage status information of a reference key meets the preset status update conditions, the key validity information associated with the reference key is updated, including: When the usage of a reference key is not greater than a preset usage threshold, the key validity information associated with the reference key is updated to: key invalid.

5. The method according to claim 3, characterized in that, The usage status information includes: the time of requisition; each of the requisition times describes the time when the corresponding reference key was set in the corresponding version of the video playback component; When the usage status information of a reference key meets the preset status update conditions, the key validity information associated with the reference key is updated, including: Based on the time when the reference key was issued, the duration of use of the reference key is determined. When the used time reaches the preset validity period, the key validity information associated with the reference key is updated to: key invalid.

6. The method according to claim 3, characterized in that, The usage status information includes the requisition status, and each requisition status is used to describe whether the corresponding reference key has been set in the corresponding version of the video playback component; When the usage status information of a reference key meets the preset status update conditions, the key validity information associated with the reference key is updated, including: When the status of a reference key changes from pending to issued, the key validity information associated with the reference key is updated to: key valid.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: At least one reference key that is not set in the video playback component from the reference key set shall be used as the key to be claimed; A new key to be claimed is generated when the keys to be claimed in the reference key set meet at least one of the following conditions: The total number of keys to be claimed shall not exceed the preset key quantity threshold; The current time is no less than the time since the generation of the latest key to be claimed, and is not less than the preset key generation period.

8. A method for protecting video content on a webpage, characterized in that, Applied to a client, the method includes: In response to a playback operation triggered by video content on a target webpage, the version key in the video playback component of the target webpage is invoked; wherein, the version key represents the current version of the video playback component on the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed; Send a playback request carrying the version key to the server so that the server can verify the version key; Upon receiving playback data of the video content returned by the server, the video content is played based on the playback data.

9. The method according to claim 8, characterized in that, The step of responding to a playback operation triggered by video content on a target webpage by calling the version key in the video playback component of the target webpage includes: In response to a playback operation triggered by video content on a target webpage, the key call interface corresponding to the current version of the video playback component is obtained; different versions of the video playback component correspond to different key call interfaces; the interface name of the key call interface is randomly generated when the current version of the video playback component is constructed. The version key in the video playback component is invoked through the key invocation interface.

10. The method according to claim 8 or 9, characterized in that, The method further includes: Upon receiving an error message from the server indicating that playback of the video content is refused, the video playback component is updated to the latest version by refreshing the target webpage. The latest version key in the updated video playback component is invoked, and a playback request carrying the latest version key is sent to the server so that the server can verify the latest version key. Upon receiving playback data of the video content returned by the server, the video content is played based on the playback data.

11. A protection device for video content on a webpage, characterized in that, Applied to the server side, the device includes: The key acquisition unit is used to acquire the version key carried in the playback request when a playback request triggered by a client for video content in a target webpage is received; wherein, the version key represents the current version of the video playback component in the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed; A key verification unit is used to verify the validity of the version key based on a preset reference key set corresponding to the video playback component; each reference key in the reference key set corresponds to a version of the video playback component. The verification result feedback unit is used to return the playback data of the video content to the client when the verification is successful.

12. A protection device for video content on a webpage, characterized in that, Applied to a client, the device includes: The key invocation unit is used to invoke the version key in the video playback component of the target webpage in response to a playback operation triggered by the video content in the target webpage. A playback request sending unit is used to send a playback request carrying the version key to the server so that the server can verify the version key; wherein, the version key represents the current version of the video playback component in the target webpage on the client, and the version key is set in the video playback component when the current version of the video playback component is constructed; The playback unit is used to play the video content based on the playback data returned by the server when it receives the playback data of the video content.

13. A computer device, characterized in that, It includes a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1-7, or to perform the steps of the method according to any one of claims 8-10.

14. A computer-readable storage medium, characterized in that, It includes program code that, when run on a computer device, causes the computer device to perform the steps of the method according to any one of claims 1-7, or to perform the steps of the method according to any one of claims 8-10.

15. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-7, or implement the steps of the method according to any one of claims 8-10.