A video playing method and device, electronic equipment and storage medium

By generating personalized digital licenses from user data and device information, the lack of flexibility in encryption parameters in online video services is resolved, resulting in improved security and smoothness, and optimized device performance and user experience.

CN122120541APending Publication Date: 2026-05-29HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
Filing Date
2026-03-04
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, network video services lack flexible encryption parameters under high concurrency and multiple scenarios, resulting in insufficient security and seriously affecting user experience and device performance.

Method used

By acquiring user data and device information, personalized multi-dimensional attribute information is generated, digital licenses are generated based on preset policy templates, and DRM verification policies are dynamically adjusted to achieve intelligent decryption and playback of video content.

Benefits of technology

It improves the security and smoothness of video playback, reduces the waiting time for users when switching content, optimizes the utilization of device storage space, and adapts to the fast-paced and ever-changing consumption patterns of modern users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120541A_ABST
    Figure CN122120541A_ABST
Patent Text Reader

Abstract

The application provides a video playing method and device, electronic equipment and storage medium, the method comprises the following steps: in response to the user's playing operation on the target video, obtaining the user data of the user and the device information of the used client; obtaining multi-dimensional attribute information based on the user data and the device information; generating a digital license based on the multi-dimensional attribute information and a preset strategy template; decrypting the target video based on the digital license to obtain video data and playing. In the embodiment of the application, the corresponding video content is decrypted by the password corresponding to the different license, thereby improving the security and ensuring smooth playing in various environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video processing technology, and in particular to a video playback method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of the internet and streaming media technologies, online video has become a primary way for people to access information and entertainment. However, the ease with which digital video content can be copied makes copyright protection a difficult issue to resolve.

[0003] In practical applications, especially in modern network video services with high concurrency and multiple scenarios, using uniform encryption parameters for different types of video content (such as different bitrates and resolutions) during video playback lacks flexibility and thus affects security. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a video playback method, apparatus, electronic device, and storage medium to solve the security problems existing in the prior art.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] The first aspect illustrates a video playback method, the method comprising:

[0007] In response to a user's playback action on a target video, the system obtains the user's user data and the device information of the client being used.

[0008] Multidimensional attribute information is obtained based on the user data and device information;

[0009] A digital license is generated based on the multi-dimensional attribute information and the preset strategy template;

[0010] The target video is decrypted based on the digital license to obtain video data, which is then played.

[0011] Optionally, generating a digital license based on the multi-dimensional attribute information and a preset strategy template includes:

[0012] A preset permission prediction model is invoked to predict the multi-dimensional attributes and policy templates to obtain the user's personalized permission control scheme;

[0013] A corresponding digital license is generated based on the personalized access control scheme.

[0014] Optionally, before decrypting the target video based on the digital license to obtain the video data, the process further includes:

[0015] Obtain the current digital signature and content identifier of the target video;

[0016] The target video's metadata file is used to verify whether the digital signature and content identifier have been tampered with. The target video's metadata file is constructed based on the target video's encryption parameters, digital signature, and content identifier.

[0017] If the video has not been tampered with, proceed with the step of decrypting the target video based on the digital license to obtain the video data.

[0018] Optionally, the process of constructing the metadata file of the target video based on the encryption parameters, digital signature, and content identifier of the target video includes:

[0019] When the target video is uploaded, a multi-dimensional analysis is performed on the target video to obtain the corresponding metadata;

[0020] The metadata is processed by a pre-set processing model to obtain the encryption parameters of the target video;

[0021] The target video is encrypted using the encryption parameters, and the encryption key generated based on the encryption parameters is stored.

[0022] Set an encrypted digital signature for the target video and create a content identifier for the target video;

[0023] The target metadata file is generated based on the encryption parameters, the key encryption key, the digital signature, and the content unique identifier.

[0024] Optional, also includes:

[0025] Statistics on current video viewing data for each user for different videos;

[0026] The system uses a preset recognition model to identify popular video segments of different videos based on their viewing data.

[0027] The popular video clips are preloaded;

[0028] The popular video clips are stored based on their clip identifiers and the metadata of the videos to which they belong.

[0029] Optional, also includes:

[0030] Based on the user's historical viewing behavior and user profile, predict the viewing result at the next moment;

[0031] If the viewing result indicates that the next moment will switch to a popular video segment, and it is determined that the popular video segment has been loaded, the video data of the preset time period in the popular video segment and the corresponding license are obtained, so that the popular video segment can be played based on the video data of the preset time period in the popular video segment and the corresponding license.

[0032] Optional, also includes:

[0033] When responding to a drag operation on a target video, obtain the sub-video segment at the position corresponding to the drag operation and the license of the sub-video segment;

[0034] Determine whether the sub-video segment at the position corresponding to the drag operation is a preloaded video;

[0035] If so, control the playback of the sub-video segment based on the license of the sub-video segment, and load subsequent unloaded sub-video segments according to the playback time;

[0036] If not, obtain the loaded sub-video segment adjacent to the sub-video segment at the position corresponding to the drag operation, so as to start loading the subsequent video from the adjacent loaded sub-video segment;

[0037] Once it is determined that the sub-video segment corresponding to the position of the drag operation has been loaded, the playback of the sub-video segment is controlled based on the license of the sub-video segment, and subsequent unloaded sub-video segments are loaded according to the playback time.

[0038] A second aspect discloses a video playback device, the device comprising:

[0039] The acquisition unit is used to respond to the user's playback operation on the target video, acquire the user's user data and the device information of the client being used; and acquire multi-dimensional attribute information based on the user data and device information.

[0040] The generation unit is used to generate a digital license based on the multi-dimensional attribute information and the preset strategy template;

[0041] The decryption unit is used to decrypt the target video based on the digital license, obtain video data, and play it.

[0042] The third aspect discloses an electronic device including a processor and a memory, the memory being used to store program code and data for data generation, and the processor being used to invoke program instructions in the memory to execute a video playback method as described in any of the first aspects.

[0043] The fourth aspect discloses a storage medium including a stored program, wherein, when the program is executed, it controls the device on which the storage medium resides to perform a video playback method as described in any of the first aspects.

[0044] Based on the above embodiments of the present invention, a video playback method, apparatus, electronic device, and storage medium are provided. The method includes: responding to a user's playback operation on a target video, obtaining the user's user data and the device information of the client being used; obtaining multi-dimensional attribute information based on the user data and device information; generating a digital license based on the multi-dimensional attribute information and a preset strategy template; decrypting the target video based on the digital license to obtain video data, and playing it. In these embodiments, different passwords corresponding to different licenses are used to decrypt the corresponding video content, thereby improving video security and ensuring smooth playback in various environments. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0046] Figure 1 This is a schematic diagram illustrating the interaction between the server and the client according to an embodiment of the present invention;

[0047] Figure 2 This is a flowchart illustrating a video playback method according to an embodiment of the present invention;

[0048] Figure 3 This is a schematic flowchart illustrating another video playback method according to an embodiment of the present invention;

[0049] Figure 4 This is a schematic diagram of the structure of a video playback device according to an embodiment of the present invention. Detailed Implementation

[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0052] It should be noted that the descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0053] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0054] As can be seen from the background technology, the following problems exist:

[0055] ① A strict authorization verification process (such as applying for a license from the server every time you play or switch content) will introduce significant delays, affecting the smoothness of video startup and channel switching, and harming the user experience.

[0056] ② Using uniform encryption parameters for different types of video content (such as different bitrates and resolutions) lacks flexibility and may lead to low encryption efficiency or waste of resources.

[0057] ③ The lack of intelligent management mechanism for client-cached licenses may lead to storage space being occupied by a large number of infrequently used or expired licenses, affecting device performance, and the cache cleanup strategy is not optimized enough.

[0058] ④ The authorization process is passive, occurring only when a user initiates a request. It cannot be predicted or optimized based on user behavior habits, making it difficult to adapt to the fast-paced and ever-changing consumption patterns of modern users.

[0059] See Figure 1 This is a schematic diagram illustrating the interaction between the server and the client in an embodiment of the present invention;

[0060] The server 10 is connected to the client 20;

[0061] The number of clients is multiple.

[0062] The server 10 responds to the user's playback operation on the target video through the client 20, obtains the user's user data and the device information of the client being used; obtains multi-dimensional attribute information based on the user data and device information; generates a digital license based on the multi-dimensional attribute information, a preset strategy template, and the content key of the target video; decrypts the target video based on the digital license to obtain video data, and plays it in the client 20.

[0063] Based on the server and client interaction process illustrated in the above embodiments of the present invention, the specific process of video playback is as follows: Figure 2 The diagram shown is a flowchart illustrating a video playback method according to an embodiment of the present invention. The method includes:

[0064] Step S201: In response to the user's playback operation on the target video, obtain the user's user data and the device information of the client being used;

[0065] It should be noted that user data includes user tokens;

[0066] Device information includes the client's IP address and device fingerprint, among other things.

[0067] Optionally, when a user logs into the system through a client, the system verifies the user's credentials, such as whether the username and password are registered and correct; if they are registered and correct, a unique user token is generated, and the relationship between the user token and the user credentials is established and returned to the client.

[0068] In the specific implementation step S201, in response to the playback operation of the target video, the user token corresponding to the user credential of the user performing the playback operation is obtained; then, the client IP address of the client used by the user and the device fingerprint and other information are obtained.

[0069] Optionally, after performing step S201, the following steps are also included:

[0070] Based on the user token, determine whether the user verification is successful. After determining that the user verification is successful based on the user token, execute step S202:

[0071] Specifically, it is determined whether the user token is consistent with the user token stored in the server database. If they are consistent, it means that the user identity authentication is successful, and step S202 is executed. Otherwise, a playback failure message is displayed on the client.

[0072] Step S202: Obtain multi-dimensional attribute information based on the user data and device information;

[0073] In the specific implementation step S202, based on the user data and device information, the system searches the data for multi-dimensional attribute information stored in the data, such as the user level, subscription plan, registration time, geographical location; historical viewing behavior (e.g., frequently viewed content types, average viewing duration), device performance (e.g., device model, screen resolution), real-time network status (e.g., bandwidth); user credit score (based on historical compliance behavior, such as whether there is a piracy record); and device security status (e.g., whether it is jailbroken or rooted).

[0074] Step S203: Generate a digital license based on the multi-dimensional attribute information and the preset strategy template;

[0075] It should be noted that the specific implementation of step S203 includes the following steps.

[0076] Step S11: Call the preset permission prediction model to predict the multi-dimensional attributes and policy templates to obtain the user's personalized permission control scheme;

[0077] The strategy template is obtained based on preset rules.

[0078] In the specific implementation of step S203, firstly, the preset rules are converted into executable strategy templates.

[0079] Specifically, the preset rules uploaded by content providers (such as "VIP users can watch 4K") are transformed into structured "policy templates" that can be executed by the rule engine. For example, the rules are encoded in the format IF (user.tier-"VIP") THEN(maxResolution-"4K") and stored in the database.

[0080] Next, the strategy template and multi-dimensional attributes are input into a preset permission prediction model, which is then called to process the input strategy template and multi-dimensional attributes to predict the corresponding personalized permission control scheme.

[0081] Specifically, the preset permission prediction model performs hard matching of multi-dimensional attributes based on the IF-THEN rule; and analyzes the user's historical data in the multi-dimensional attributes to predict user preferences; maintains a permission profile for each user, groups users by K-means, and then applies group-level rules; and generates a personalized permission control scheme for the user.

[0082] When serving new users or users with limited behavioral data, directly matching personalized rules may not be accurate. In such cases, users are first grouped into a user group (e.g., "Premium Device VIP User Group") based on their known attributes, and then general rules (group-level rules) preset for that group are applied. This is equivalent to a degradation or default strategy, providing a relatively reasonable permission scheme when individual data is lacking, ensuring the robustness of the system.

[0083] Optionally, when a user logs into the system through a client, a user private key is generated based on the user's credentials; a weight factor is used based on the user private key to enhance personalized encryption. Specifically, the last digit of the user private key is extracted (as an integer from 0 to 9), and the corresponding weight R is calculated based on the last digit G of the private key in formula (1) to obtain the target weight R, which is used to dynamically adjust the encryption priority: when the target weight is greater than the preset weight, the national cryptographic algorithm SM4 is selected first for target video encryption; if the target weight is less than or equal to the preset weight, AES-128 is selected for target video encryption, and the block size is reduced when the weight is high to enhance security; this drives the system to complete the selection of encryption algorithm and adjustment of encryption parameters, and finally realizes "personalized encryption based on user private key", which not only ensures the user differentiation of encryption strategy, but also strengthens the overall encryption security through the uniqueness of the private key.

[0084] Formula (1):

[0085] R = (G mod 10) / 10.0

[0086] Step S12: Generate the corresponding digital license based on the personalized access control scheme.

[0087] In the specific implementation step S12, the personalized permission control scheme is written into the corresponding template to assemble the permission rules (such as playback time limit, number of times, output restrictions, etc.) in the personalized permission control scheme and the content key of the target video into a structured digital file, that is, to obtain the corresponding license. The content of the license is stored in XML or JSON format. Then, the server's own private key is used to digitally sign the license to ensure the integrity and source of the license. The signed digital license is then sent to the client.

[0088] Personalized access control schemes include access rules, content keys, content identifiers, and user / device identifiers, etc.

[0089] The content key is obtained by encrypting a preset key using the public key corresponding to the user (usually obtained from the user certificate);

[0090] The permission details refer to the specific operational permissions that users have for video content.

[0091] The content identifier indicates which video content(s) this scheme applies to.

[0092] The user / device identifier refers to the target user or device bound to this scheme.

[0093] Step S204: Decrypt the target video based on the digital license to obtain video data and play it.

[0094] In the specific implementation step S204, the decryption process is carried out in the secure area of ​​the server (such as the Trusted Execution Environment TEE); the player interacts with the decryption module through the Encrypted Media Extension (EME) API, uses the locally cached digital license to decrypt the CEK to decrypt the encrypted target video, and then decrypts the video data to obtain the video data, and finally performs the video data for secure rendering so that it can be played on the client's player.

[0095] Optionally, the client can be verified before playing the corresponding video;

[0096] Specifically, the client's legitimacy is verified. Verification includes checking the player's digital certificate, signature fingerprint, and the integrity of the operating environment; the server sends a random number, which the player must sign with its private key and return, and the server verifies the signature's validity to prevent unauthorized players from accessing the site.

[0097] Optional, also includes:

[0098] While the video data is playing, an invisible digital watermark is generated and injected in real time using frame-by-frame or frame-skipping technology. The watermark information includes the user ID, device identifier, and current timestamp, which can be used to trace the source in the event of content leakage.

[0099] Optional, also includes:

[0100] Logs are recorded for all key events, including the issuance time of digital licenses, the corresponding playback content, and permission changes. These logs are used for subsequent compliance audits and analyzed using machine learning algorithms to detect potential piracy patterns.

[0101] Optional, also includes:

[0102] For each digital license, obtain the remaining validity period T of the digital license. remaining And the access frequency F of the corresponding content within a certain period of time. access Based on the remaining validity period T of the digital license remaining And the access frequency F of the corresponding content within a certain period of time. access Substitute into formula (2) to calculate the corresponding comprehensive value score Score(L);

[0103] Formula (2):

[0104] Score(L) = α * (1 / T) remaining )+β*F access ;

[0105] Among them, α and β are preset weighting coefficients used to adjust the importance of remaining time and access frequency in the total score;

[0106] Next, the digital licenses are sorted from low to high according to their overall value score, and the digital licenses with the lowest scores are deleted first until enough storage space is freed up; for expired digital licenses, they are completely removed from the cache and storage media.

[0107] This application evaluates the value of locally cached digital licenses periodically; calculates a comprehensive score for each digital license; sorts them from low to high scores, prioritizes cleaning up low-scoring licenses, optimizes storage space, and completely removes expired digital licenses.

[0108] In this embodiment of the invention, in response to a user's playback operation on a target video, the system acquires the user's user data and the device information of the client being used; based on the user data and device information, it acquires multi-dimensional attribute information; based on the multi-dimensional attribute information, a preset policy template, and the content key of the target video, it generates a digital license; based on the digital license, it decrypts the target video to obtain video data and plays it. This significantly reduces the waiting time for users when switching content, achieving a near-seamless playback experience; it can dynamically adjust the DRM verification policy according to real-time network conditions and device performance, ensuring smooth playback in various environments.

[0109] Based on the video playback method shown in the above embodiments of the present invention, another video playback method is also shown, such as... Figure 3 As shown, the method includes:

[0110] Step S301: Respond to the user's playback operation on the target video, and obtain the user's user data and the device information of the client being used;

[0111] Step S302: Obtain multi-dimensional attribute information based on the user data and device information;

[0112] Step S303: Generate a digital license based on the multi-dimensional attribute information and the preset strategy template;

[0113] It should be noted that the specific implementation process of steps S301 to S303 is the same as the specific implementation process of steps S201 to S203 described above, and they can be referred to each other.

[0114] Step S304: Obtain the current digital signature and content identifier of the target video;

[0115] Step S305: Verify whether the digital signature and content identifier have been tampered with based on the metadata file of the target video. If they have not been tampered with, proceed to step S306. If they have been tampered with, display a playback failure message in the client's player.

[0116] The metadata file of the target video is constructed based on the encryption parameters, digital signature, and content identifier of the target video;

[0117] It should be noted that the process of constructing the metadata file of the target video based on its encryption parameters, digital signature, and content identifier is as follows: Figure 4 As shown, it includes:

[0118] Step S21: When the target video is uploaded, perform multi-dimensional analysis on the target video to obtain the corresponding metadata;

[0119] The metadata includes average bitrate, encoding format, duration information, peak bitrate, frame type, and keyframe density.

[0120] In the specific implementation step S21, the target video mentioned above by the user through the client is obtained. Then, the video stream of the target video is opened, and the video stream information of the target video is detected to extract container layer information such as the average bit rate, encoding format, and duration of the target video.

[0121] Then, data packets containing a frame or a frame slice of the target video are read from the media container; the information in the header of the data packets is analyzed, and the frame type, timestamp, and file offset of each video frame are determined by parsing the NAL Unit data format type;

[0122] The system then calculates the total size of data packets within a preset time window (e.g., 1 second); the maximum value within all time windows is then taken as the peak bitrate.

[0123] It should be noted that the data packet contains a Network Abstraction Layer header;

[0124] Frame types include I-frames (Intra-Coded Frames), P-frames (Predicted Frames), and B-frames (Bi-directional Predicted Frames).

[0125] Then, based on the type, timestamp of occurrence, and file offset of each frame, a distribution map of frame types is drawn, and the number of I-frames per unit time is calculated and used as the keyframe density.

[0126] Finally, the average bitrate, peak bitrate, frame type, and keyframe density are combined to obtain the corresponding metadata.

[0127] This application employs streaming processing for real-time analysis, utilizing FFmpeg's demultiplexing and decoder's low-latency mode. Simultaneously, for metadata extraction and frame type identification, only the packet header and syntax structure are parsed. For analysis requiring more precise content, only I-frames are thumbnail-decoded to conserve resources.

[0128] Step S22: Call the pre-set processing model to process the metadata to obtain the encryption parameters of the target video;

[0129] In the specific implementation step S22, a pre-set processing model is invoked to process the metadata of the target video in order to output the encryption parameters of the target video.

[0130] It should be noted that the processing model is trained based on metadata from different historical videos to predict encryption parameters. During the training process, regression analysis is used to predict the encryption block size based on bitrate fluctuations. If the bitrate fluctuations are large, the block size is reduced to maintain smoothness. Based on collaborative filtering, encryption parameters are recommended for similar video content.

[0131] During the encryption process, the system monitors encryption efficiency (such as CPU utilization) and decryption quality (such as playback latency) in real time and dynamically fine-tunes parameters; for example, if the network conditions are poor, the encryption strength is automatically reduced to ensure smooth playback.

[0132] For example, suppose a target video is a 4K HDR video with a bitrate of 20Mbps and dense keyframes; the system recognizes the high bitrate and high resolution characteristics.

[0133] Optionally, it also includes: during the encryption process, if insufficient device performance is detected, switching the algorithm corresponding to the encryption parameters for dynamic adjustment: for example: initially selecting the AES-256 algorithm and 32-byte block size; but real-time monitoring finds that insufficient device performance leads to high encryption latency; the system automatically switches to the AES-128 algorithm and adjusts to selective encryption (encrypting only I-frames); after adjustment, encryption efficiency is improved, while security matches the video characteristics.

[0134] Step S23: Encrypt the target video using the encryption parameters and store the encryption key generated based on the encryption parameters;

[0135] In the specific implementation step S23, the target video is directly encrypted using the content encryption key and the key encryption key generated according to the encryption algorithm corresponding to the encryption parameters; then, the content encryption key is encrypted using the key encryption key, and the encrypted content encryption key and the encrypted target video are stored separately, and the key root material is protected using a hardware security module (HSM) to ensure key security.

[0136] It should be noted that the key encryption key refers to the key used to further encrypt the key.

[0137] Step S24: Set the digital signature of the encrypted target video and create the content identifier of the target video;

[0138] In the specific implementation step S12, the SM3 hash algorithm and SM2 digital signature algorithm are called to generate a corresponding digital signature for the encrypted target video; and a unique identifier for the content of the target video is generated using a digital random generation algorithm.

[0139] It should be noted that the digital signature is a unique digital signature; it is used to ensure the integrity of the video content and that it cannot be tampered with.

[0140] Step S25: Generate a metadata file based on the encryption parameters, key encryption key, digital signature, and content unique identifier.

[0141] It should be noted that the metadata file refers to the Digital Rights Management (DRM) metadata file.

[0142] Step S306: Decrypt the target video based on the digital license to obtain video data and play it.

[0143] It should be noted that the specific implementation process of step S306 is the same as the specific implementation process of step S204 described above, and they can be referred to each other.

[0144] In this embodiment of the invention, after the player obtains the encrypted content, it verifies the digital signature and content identifier of the content and compares them with the original record in the DRM metadata. If the verification fails, it indicates that the content may have been tampered with, and the playback is interrupted. If the verification succeeds, the target video is decrypted based on the digital license to obtain the video data and then played.

[0145] The video playback method based on the above embodiments of the present invention further includes, after performing step S204:

[0146] Step S31: Calculate the video viewing data for each user for different videos;

[0147] In the specific implementation step S31, the video viewing data of each user for different videos is statistically analyzed. The video viewing data includes, but is not limited to, the number of plays, the replay rate, the user dwell time, and the interaction data (such as likes and comments) for each video.

[0148] Step S32: Call the preset recognition model to identify popular video segments of the corresponding videos based on the video viewing data of different videos;

[0149] It should be noted that different historical videos, historical video viewing data and corresponding historical popular video clips are used as sample sets, and deep learning or neural network models are trained based on the sample sets to obtain a preset recognition model.

[0150] The preset identification model can be a heat decay model or a collaborative filtering model;

[0151] There can be multiple popular video clips, such as the climax of a movie or TV series, key or difficult chapters of an instructional video, or highlights of a sports event.

[0152] Step S33: Divide the popular video clips into multiple sub-video clips;

[0153] In the specific implementation step S33, each popular video segment is evenly divided into multiple equal parts (e.g., 10 equal parts) to obtain multiple sub-video segments, and a license is set for each sub-video segment.

[0154] Step S34: Preload the popular video clips, or preload some sub-video clips according to the preloading priority;

[0155] In the specific implementation of step S34, each of the aforementioned popular video segments is preloaded, or some sub-video segments are preloaded according to the preloading priority.

[0156] It should be noted that the preloading priority can be based on interval loading. For example, according to the preloading priority, select a portion of the sub-video data for preloading (such as preloading the 1st, 3rd, 5th, 7th, and 9th sub-video data).

[0157] Optionally, it also includes storing the segment identifier based on the popular video segment and the metadata of the video to which the popular video segment belongs.

[0158] Specifically, a segment identifier is created for each popular video segment; that is, each identified popular segment is assigned a unique segment identifier. Then, the segment identifier of the popular video segment and the metadata of the video to which the popular video segment belongs are stored.

[0159] In this application, for long segments, the number of equal parts is increased to improve granularity. (In practical applications, users may not drag to the beginning of the segment to play it, but may drag to the middle of the segment. In this case, the original solution cannot perform the preloading function.) The hot segment is divided into multiple equal parts, and then the equal parts are selected intermittently for preloading. So that when the user drags to the segment in actual viewing, only the other unselected interval equal parts need to be loaded, thereby reducing the waiting time.

[0160] The video playback method based on the above embodiments of the present invention further includes, after performing step S34:

[0161] Step S41: Predict the viewing result at the next moment based on the user's historical viewing behavior and user profile;

[0162] In the specific implementation step S41, the user's historical viewing behavior and user profile are obtained, and a preloaded prediction model is called to infer the user's historical viewing behavior and user profile in order to determine the viewing result at the next moment.

[0163] It should be noted that the viewing results include the most likely channel or content to be switched to in the next moment, or the result of not switching at all.

[0164] The preload prediction model is trained based on the historical viewing behavior and user profiles of different users;

[0165] Step S42: Determine whether the next viewing result indicates switching to a video containing popular video clips, and whether the popular video clips have been pre-loaded. If the next viewing result indicates switching to a popular video clip, and it is determined that the popular video clips have been loaded, then execute step S43.

[0166] Optionally, when a user directly requests to load a video containing a popular video clip, it is determined whether the popular video clip has already been pre-loaded. If it is determined that the popular video clip has been loaded, then step S43 is executed.

[0167] Step S43: Obtain video data and corresponding licenses for a preset time period from the popular video clips, so as to play the popular video clips based on the video data and corresponding licenses for the preset time period from the popular video clips.

[0168] In the specific implementation step S43, when responding to the user's selection operation for a video containing popular segments, the adaptive licensing module will start an additional preloading thread. This thread, based on the original full-video loading scheme, prioritizes loading the identified popular video segments. To ensure resource efficiency, only the first small portion of the popular video segment, i.e., the video data for a preset time period and the corresponding license, is preloaded during loading. This allows the video containing the popular segment to be played based on the video data for the preset time period and the corresponding license. This data is the "segment header," and its loading priority is higher than the normal background preloading task but lower than the real-time loading stream of the content currently being viewed by the user.

[0169] It should be noted that the preset time period is set in advance based on multiple experiments or experience, for example, it can be the first 3-5 seconds of the popular video clip;

[0170] Optional, also includes:

[0171] Step S51: In response to a playback operation for a video, obtain the metadata of the video corresponding to the playback operation;

[0172] Step S52: Based on the metadata, determine whether the video segment header has been loaded. If it exists, control the playback of the segment header, and at the same time, control the remaining part to be loaded in parallel for subsequent playback.

[0173] In the specific implementation of steps S51 and S52, if the progress bar is dragged to the starting point of the segment and a video is started to play, the playback operation for the video is responded to, and the metadata of the video corresponding to the playback operation is obtained; and the video corresponding to the metadata is immediately checked to see if the segment header has been preloaded. If it has been loaded, the segment is started instantly, that is, the corresponding segment header is played; at the same time, a parallel loading request for the remaining part of the video is immediately initiated to ensure that the subsequent content is ready before the header content finishes playing, so as to achieve seamless playback.

[0174] Optionally, in response to a video skipping operation, i.e., if it is determined that the user has not chosen to watch the segment (e.g., skip or continue watching the original content), the preloaded popular video segments are automatically marked as low priority and included in the cache cleanup candidate after a short time (e.g., 30 seconds), thereby avoiding long-term excessive occupation of network bandwidth and storage resources.

[0175] The video playback method based on the above embodiments of the present invention further includes, after performing step S34:

[0176] Step S61: When responding to a drag operation on the target video, obtain the sub-video segment at the position corresponding to the drag operation and the license of the sub-video segment;

[0177] Step S62: Determine whether the sub-video segment corresponding to the drag operation position is a preloaded video; if yes, proceed to step S63; otherwise, proceed to steps S64 and S65.

[0178] Step S63: Control the playback of the sub-video segment based on the license of the sub-video segment, and load subsequent unloaded sub-video segments according to the playback time;

[0179] Step S64: Obtain the loaded sub-video segment adjacent to the sub-video segment corresponding to the drag operation position, so as to start loading the subsequent video from the adjacent loaded sub-video segment;

[0180] Step S65: After it is determined that the sub-video segment corresponding to the position of the drag operation has been loaded, the sub-video segment is played based on the license of the sub-video segment, and subsequent unloaded sub-video segments are loaded according to the playback time.

[0181] In the specific implementation of steps S64 and S65, the nearest preloaded equal-sized sub-video segment to the sub-video segment corresponding to the drag operation position is obtained, and the unpreloaded adjacent sub-video segments are loaded starting from the nearest preloaded equal-sized sub-video segment. When the sub-video segment corresponding to the drag operation position is loaded, the sub-video segment is controlled to play based on the license of the sub-video segment, and the subsequent sub-video segments are played in sequence; thus, only the unpreloaded adjacent equal-sized segments need to be loaded, thereby minimizing the switching delay.

[0182] It should be noted that the playback timestamp of the most recently preloaded equal sub-video segment is less than the playback timestamp of the sub-video segment at the position corresponding to the drag operation.

[0183] Based on the video playback method shown in the above embodiments of the present invention, correspondingly, the present invention also shows a video playback device, such as... Figure 4 As shown, the device includes:

[0184] The acquisition unit 401 is used to respond to the user's playback operation on the target video, acquire the user's user data and the device information of the client being used; and acquire multi-dimensional attribute information based on the user data and device information.

[0185] Generation unit 402 is used to generate a digital license based on the multi-dimensional attribute information and the preset strategy template;

[0186] The decryption unit 403 is used to decrypt the target video based on the digital license, obtain video data, and play it.

[0187] The specific principles and execution processes of each unit in the video playback device disclosed in the above embodiments of the present invention are the same as the corresponding contents in the video playback method provided in the above embodiments of the present invention. Please refer to the corresponding parts in the video playback method disclosed in the above embodiments of the present invention, and they will not be repeated here.

[0188] This application provides an electronic device, which includes a processor and a memory. The memory is used to store video playback program code and data, and the processor is used to call the program instructions in the memory to execute the steps shown in the video playback method in the above embodiments.

[0189] This invention provides a storage medium, namely a computer-readable storage medium, which includes the electronic device provided in the above-described embodiments of this application. The electronic device is used to execute the video playback method disclosed in the embodiments of this application.

[0190] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0191] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0192] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A video playback method, characterized in that, The method includes: In response to a user's playback action on a target video, the system obtains the user's user data and the device information of the client being used. Multidimensional attribute information is obtained based on the user data and device information; A digital license is generated based on the multi-dimensional attribute information and the preset strategy template; The target video is decrypted based on the digital license to obtain video data, which is then played.

2. The method according to claim 1, characterized in that, Based on the multi-dimensional attribute information and preset strategy template, a digital license is generated, including: A preset permission prediction model is invoked to predict the multi-dimensional attributes and policy templates to obtain the user's personalized permission control scheme; A corresponding digital license is generated based on the personalized access control scheme.

3. The method according to claim 1, characterized in that, Before decrypting the target video based on the digital license to obtain the video data, the process also includes: Obtain the current digital signature and content identifier of the target video; The target video's metadata file is used to verify whether the digital signature and content identifier have been tampered with. The target video's metadata file is constructed based on the target video's encryption parameters, digital signature, and content identifier. If the video has not been tampered with, proceed with the step of decrypting the target video based on the digital license to obtain the video data.

4. The method according to claim 3, characterized in that, The process of constructing the metadata file of the target video based on its encryption parameters, digital signature, and content identifier includes: When the target video is uploaded, a multi-dimensional analysis is performed on the target video to obtain the corresponding metadata; The metadata is processed by a pre-set processing model to obtain the encryption parameters of the target video; The target video is encrypted using the encryption parameters, and the encryption key generated based on the encryption parameters is stored. Set an encrypted digital signature for the target video and create a content identifier for the target video; The target metadata file is generated based on the encryption parameters, the key encryption key, the digital signature, and the content unique identifier.

5. The method according to claim 1, characterized in that, Also includes: Statistics on current video viewing data for each user for different videos; The system uses a preset recognition model to identify popular video segments of different videos based on their viewing data. The popular video clips are preloaded; The popular video clips are stored based on their clip identifiers and the metadata of the videos to which they belong.

6. The method according to claim 5, characterized in that, Also includes: Based on the user's historical viewing behavior and user profile, predict the viewing result at the next moment; If the viewing result indicates that the next moment will switch to a popular video segment, and it is determined that the popular video segment has been loaded, the video data of a preset time period in the popular video segment and the corresponding license are obtained, so that the popular video segment can be played based on the video data of the preset time period in the popular video segment and the corresponding license.

7. The method according to claim 1, characterized in that, Also includes: When responding to a drag operation on a target video, obtain the sub-video segment at the position corresponding to the drag operation and the license of the sub-video segment; Determine whether the sub-video segment at the position corresponding to the drag operation is a preloaded video; If so, control the playback of the sub-video segment based on the license of the sub-video segment, and load subsequent unloaded sub-video segments according to the playback time; If not, obtain the loaded sub-video segment adjacent to the sub-video segment at the position corresponding to the drag operation, so as to start loading the subsequent video from the adjacent loaded sub-video segment; Once it is determined that the sub-video segment corresponding to the position of the drag operation has been loaded, the playback of the sub-video segment is controlled based on the license of the sub-video segment, and subsequent unloaded sub-video segments are loaded according to the playback time.

8. A video playback device, characterized in that, The device includes: The acquisition unit is used to respond to the user's playback operation on the target video, acquire the user's user data and the device information of the client being used; and acquire multi-dimensional attribute information based on the user data and device information. The generation unit is used to generate a digital license based on the multi-dimensional attribute information and the preset strategy template; The decryption unit is used to decrypt the target video based on the digital license, obtain video data, and play it.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store program code and data for data generation, and the processor being used to call program instructions in the memory to execute the video playback method as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the video playback method as described in any one of claims 1-7.