Method and apparatus for obtaining a key of media content, electronic device, and storage medium

By judging the keys of adjacent media content segments in the key gateway at the playback end of the audio and video media content, and controlling the key gateway to issue keys during the playback process, the problem of high concurrent key request caused by dynamically changing keys is solved, and a more stable and reliable key acquisition process is achieved.

CN119011915BActive Publication Date: 2025-06-13CCTV INT NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411132176.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2025-06-13
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

During the playback of audio and video media content, due to dynamically changing keys, high concurrent requests are prone to occur during the key acquisition process, resulting in congestion in key acquisition and even unavailable.

Method used

By determining whether there is a key of adjacent media content segments in the key gateway that has a change in the key gateway, and determining the preset time range of the current media content segment during playback, the key gateway controls the key gateway to issue the corresponding key within this time range.

Benefits of technology

It slows down the high concurrency of key requests, improves the stability and reliability of key acquisition, reduces the occurrence of playback failures, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011915B_ABST
    Figure CN119011915B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and apparatus for obtaining a key of media content, an electronic device, and a storage medium, relating to the technical field of audio-visual media. The method includes: when starting to play target media content at a playback end, determining whether there is a key for a first preset media content segment in a key gateway; when there is a key for the first preset media content segment in the key gateway, controlling the key gateway to send the key for the start-play media content segment and the key for the first preset media content segment to the playback end; during the process of playing the target media content at the playback end, determining a preset time range of the current media content segment being played; when determining that the playback end requests the key for a second preset media content segment from the key gateway at any time point within the preset time range, controlling the key gateway to send the key for the second preset media content segment to the playback end. The present invention solves the technical problem in the related art that due to the easy occurrence of high-concurrency key requests, the key acquisition fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio-visual media, and in particular, to a method and apparatus for obtaining a key of media content, an electronic device, and a storage medium. Background Art

[0002] Currently, when providing audio-visual media content services, the audio-visual media industry generally uses DRM (Digital Rights Management) technology to encrypt and protect media content to prevent illegal rebroadcasting of media content. Before playing, the audio-visual media content is encrypted with an encryption key, and the playback end must obtain a decryption key paired with the encryption key and correctly decrypt the encrypted media content with the decryption key to play the media content normally.

[0003] For the same live channel and on-demand program, during the playback process, the key usually changes dynamically. For example, this is the case with the key scheme in the audio-visual DRM standard ChinaDRM. Compared with media content encrypted with a fixed key, media content encrypted with a changing key is more difficult to crack. However, for a dynamically changing key, when the key changes during the playback of media content by the playback end, the playback end must obtain a new key from the key gateway to continue decrypting and playing the media content. On the one hand, the playback end will only obtain the key from the key gateway when it learns that the key of the media content has changed, and the audio-visual content is about to be played here, making the time for the playback end to attempt to obtain the key and the time for exception handling in case of key acquisition failure not sufficient; on the other hand, for live media content, the playback time points of all users' playback ends for the live program are similar, and the time points for learning the key change of the live content are also similar. Therefore, the time points for obtaining the key from the key gateway are also similar. In this way, it is easy to cause a large number of requests from playback ends to obtain keys from the key gateway simultaneously in a short period of time, and such high concurrency may cause key acquisition congestion or even unavailability.

[0004] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] Embodiments of the present invention provide a method and apparatus for obtaining a key of media content, an electronic device, and a storage medium, so as to at least solve the technical problem in the related art that key acquisition fails due to easy occurrence of high-concurrency key requests.

[0006] According to one aspect of an embodiment of the present invention, there is provided a method for obtaining a key of media content, which is applied to a preset digital rights management system. The preset digital rights management system at least includes: a playback end and a key gateway, and the method includes: when the playback end starts playing target media content, determining whether there is a key of a first preset media content segment in the key gateway, where the first preset media content segment is a media content segment adjacent to the start-play media content segment and the key of this media content segment is inconsistent with the key of the start-play media content segment; when there is a key of the first preset media content segment in the key gateway, controlling the key gateway to send the key of the start-play media content segment and the key of the first preset media content segment to the playback end; during the process of the playback end playing the target media content, determining a preset time range of the currently playing current media content segment, where the preset time range is determined based on the start time of the current media content segment and a second preset media content segment, and the second preset media content segment is a media content segment adjacent to the current media content segment and the key of this media content segment is inconsistent with the key of the current media content segment; when it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range, controlling the key gateway to send the key of the second preset media content segment to the playback end.

[0007] Further, before determining whether there is a key of a first preset media content segment in the key gateway, it further includes: determining the start time of the start-play media content segment and the start time of the first preset media content segment, where the start time is the time when the playback end starts playing the target media content, and the playback types of the start play include at least one of the following: start playing, switching play, and jumping play; determining the time interval between the start time and the start time; when the time interval is less than a preset interval threshold, determining whether there is a key of the first preset media content segment in the key gateway.

[0008] Further, during the process of the playback end playing the target media content, the media content segment to be played is pre-loaded in advance, and the media content segment to be played carries key change information. The key acquisition method further includes: determining a sub-segment of the media content segment to be played adjacent to the start-play media content segment from the media content segment to be played; based on the key change information, determining the change time when the key changes in the sub-segment of the media content segment to be played; and determining the change time as the start time.

[0009] Further, the step of determining a preset time range of the currently playing current media content segment includes: determining a delay duration and an advance duration; determining a first specified time based on the start time of the current media content segment and the delay duration; determining a second specified time based on the start time of the second preset media content segment and the advance duration; and determining the time range between the first specified time and the second specified time as the preset time range.

[0010] Further, the preset time range is carried on a sub-segment of the media content between the start time of each media content segment and the first specified time.

[0011] Further, before controlling the key gateway to send the key of the second preset media content segment to the playback end, it further includes: controlling the key gateway to determine whether the request time point of the playback end is within the preset time range, where the request time point is the time point when the playback end sends a key distribution request to the key gateway, and the key distribution request carries an identifier of the media content segment to be decrypted; and in the case where the key gateway determines that the request time point is within the preset time range, controlling the key gateway to send the key of the media content segment to be decrypted indicated by the identifier of the media content segment to be decrypted to the playback end.

[0012] Further, the preset digital rights management system further includes: a key management server, a media content encryptor, and a content distribution end. The key acquisition method further includes: controlling the key management server to generate a key for each media content segment based on preset configuration information; controlling the media content encryptor to encrypt the media content segment based on the key of the media content segment to obtain an encrypted media content segment; in the case where the content distribution end receives a media content distribution request, controlling the content distribution end to send the encrypted media content segment to be played to the playback end, where the media content distribution request carries an identifier of the media content segment to be played, and the encrypted media content segment to be played is the encrypted media content segment indicated by the identifier of the media content segment to be played; and in the case where the key gateway receives a key distribution request, controlling the key gateway to send a preset key to the playback end, where the key distribution request carries an identifier of the media content segment to be decrypted, and the preset key is a key determined based on the identifier of the media content segment to be decrypted.

[0013] According to another aspect of the embodiments of the present invention, there is also provided a key acquisition device for media content, which is applied to a preset digital rights management system. The preset digital rights management system at least includes: a playback end and a key gateway, and includes: a judgment unit, configured to judge whether there is a key of a first preset media content segment in the key gateway when the playback end starts playing the target media content, where the first preset media content segment is a media content segment adjacent to the start-play media content segment and the key of this media content segment is inconsistent with the key of the start-play media content segment; a first distribution unit, configured to control the key gateway to distribute the key of the start-play media content segment and the key of the first preset media content segment to the playback end when there is a key of the first preset media content segment in the key gateway; a determination unit, configured to determine a preset time range of the currently playing current media content segment during the process of the playback end playing the target media content, where the preset time range is determined based on the start time of the current media content segment and a second preset media content segment, and the second preset media content segment is a media content segment adjacent to the current media content segment and the key of this media content segment is inconsistent with the key of the current media content segment; a second distribution unit, configured to control the key gateway to distribute the key of the second preset media content segment to the playback end when it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range.

[0014] Further, the key acquisition device further includes: a first determination module, configured to determine the start time of the start-play media content segment and the start time of the first preset media content segment before judging whether there is a key of the first preset media content segment in the key gateway, where the start time is the time when the playback end starts playing the target media content, and the playback types of starting playback include at least one of the following: starting playback, switching playback, and jumping playback; a second determination module, configured to determine the time interval between the start time and the start time; a first judgment module, configured to judge whether there is a key of the first preset media content segment in the key gateway when the time interval is less than a preset interval threshold.

[0015] Further, during the process of the playback end playing the target media content, the media content segments to be played are pre-loaded in advance, and the media content segments to be played carry key change information. The key acquisition device further includes: a third determination module, configured to determine a sub-segment of the media content segment to be played adjacent to the start-play media content segment from the media content segments to be played; a fourth determination module, configured to determine the change time when the key changes in the sub-segment of the media content segment to be played based on the key change information; a fifth determination module, configured to determine the change time as the start time.

[0016] Further, the determining unit includes: a sixth determining module, configured to determine a delay duration and an advance duration; a seventh determining module, configured to determine a first specified time based on the start time of the current media content segment and the delay duration; an eighth determining module, configured to determine a second specified time based on the start time of the second preset media content segment and the advance duration; a ninth determining module, configured to determine a time range between the first specified time and the second specified time as the preset time range.

[0017] Further, the preset time range is carried on a media content sub-segment between the start time of each media content segment and the first specified time.

[0018] Further, the key acquisition device further includes: a second determination module, configured to control the key gateway to determine whether a request time point of the playback end is within the preset time range before controlling the key gateway to send a key of the second preset media content segment to the playback end, where the request time point is a time point when the playback end sends a key distribution request to the key gateway, and the key distribution request carries an identifier of a media content segment to be decrypted; a first distribution module, configured to control the key gateway to send a key of the media content segment to be decrypted indicated by the identifier of the media content segment to be decrypted to the playback end when the key gateway determines that the request time point is within the preset time range.

[0019] Further, the preset digital rights management system further includes: a key management server, a media content encryptor, and a content distribution end. The key acquisition device further includes: a first generation module, configured to control the key management server to generate a key for each media content segment based on preset configuration information; a first encryption module, configured to control the media content encryptor to encrypt the media content segment based on the key of the media content segment to obtain an encrypted media content segment; a second distribution module, configured to control the content distribution end to send the encrypted media content segment to be played to the playback end when the content distribution end receives a media content distribution request, where the media content distribution request carries an identifier of a media content segment to be played, and the encrypted media content segment to be played is the encrypted media content segment indicated by the identifier of the media content segment to be played; a third distribution module, configured to control the key gateway to send a preset key to the playback end when the key gateway receives a key distribution request, where the key distribution request carries an identifier of a media content segment to be decrypted, and the preset key is a key determined based on the identifier of the media content segment to be decrypted.

[0020] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the key acquisition method for any one of the above media contents.

[0021] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors and a memory. The memory is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the key acquisition method for any one of the above media contents.

[0022] In the present invention, when the playback end starts playing the target media content, it is determined whether there is a key for the first preset media content segment in the key gateway. If there is a key for the first preset media content segment in the key gateway, the key gateway is controlled to send the key for the start-play media content segment and the key for the first preset media content segment to the playback end. During the process of the playback end playing the target media content, a preset time range of the currently playing current media content segment is determined. If it is determined that the playback end requests the key for the second preset media content segment from the key gateway at any time point within the preset time range, the key gateway is controlled to send the key for the second preset media content segment to the playback end.

[0023] In the present invention, when the playback end starts playing the target media content, first it is determined whether there is a key for the first preset media content segment that is adjacent to the start-play media content segment and whose key has changed in the key gateway. If there is, the key gateway returns the key for the first preset media content segment and the key for the start-play media content segment to the playback end. In this way, the burden on the preset digital rights management system can be reduced, and at the same time, the playback of the media content can be made more stable. And during the process of the playback end playing the target media content, if the playback end requests, at any time point within the preset time range of the currently playing media content segment, to obtain the key for the second preset media content segment that is adjacent to the currently playing media content segment and whose key has changed, the key gateway returns the key for the second preset media content segment to the playback end. In this way, the time of key requests can be dispersed, effectively slowing down the high concurrency of key requests, making key acquisition more stable and reliable, reducing the occurrence of playback failures, and thus solving the technical problem in the related art that due to the easy occurrence of high concurrency key requests, key acquisition fails. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0025] Figure 1 is a flowchart of an optional method for obtaining a key of media content according to an embodiment of the present invention;

[0026] Figure 2 is a schematic diagram of the structure of each functional module of an optional DRM according to an embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of an optional time interval on a timeline according to an embodiment of the present invention;

[0028] Figure 4 is a schematic diagram of an optional preset time range on a timeline according to an embodiment of the present invention;

[0029] Figure 5 is a schematic diagram of obtaining a key for digital copyright of media content according to an embodiment of the present invention;

[0030] Figure 6 is a schematic diagram of an optional device for obtaining a key of media content according to an embodiment of the present invention;

[0031] Figure 7 is a hardware structure block diagram of an electronic device (or mobile device) for a method of obtaining a key for media content according to an embodiment of the present invention. Detailed implementation manners

[0032] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0034] It should be noted that the encryption key and its paired decryption key in the present invention can be the same or different. For the sake of convenient description, the encryption key and the decryption key are collectively referred to as the key.

[0035] In the present invention, by requesting two keys at one time when starting to broadcast under preset conditions (that is, the start time point of the broadcast is relatively close to the start time of the next media content segment adjacent to the media content segment of the broadcast and with a key change), and dispersing the time of key requests during the playback process, the problem of high concurrency of key requests (especially in the live broadcast scenario) can be alleviated, making the key requests more stable and reliable, reducing the occurrence of playback failures, and improving the user experience.

[0036] The present invention will be described in detail below in conjunction with various embodiments.

[0037] Embodiment 1

[0038] According to an embodiment of the present invention, an embodiment of a method for obtaining a key of media content is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0039] Figure 1 is a flowchart of an optional method for obtaining a key of media content according to an embodiment of the present invention, as Figure 1 shown, the method includes the following steps:

[0040] Step S101, when the playback end starts playing the target media content, determine whether there is a key of the first preset media content segment in the key gateway, where the first preset media content segment is a media content segment adjacent to the media content segment of the start of the broadcast and the key of this media content segment is inconsistent with the key of the media content segment of the start of the broadcast.

[0041] Step S102, when there is a key of the first preset media content segment in the key gateway, control the key gateway to send the key of the media content segment of the start of the broadcast and the key of the first preset media content segment to the playback end.

[0042] Step S103, during the process of the playback end playing the target media content, determine the preset time range of the currently playing current media content segment, where the preset time range is determined based on the start time of the current media content segment and the second preset media content segment, and the second preset media content segment is a media content segment adjacent to the current media content segment and the key of this media content segment is inconsistent with the key of the current media content segment.

[0043] Step S104: When it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range, control the key gateway to send the key of the second preset media content segment to the playback end.

[0044] Through the above steps, when the playback end starts playing the target media content, it can be determined whether the key of the first preset media content segment exists in the key gateway. When the key of the first preset media content segment exists in the key gateway, control the key gateway to send the key of the startup media content segment and the key of the first preset media content segment to the playback end. During the process of the playback end playing the target media content, determine the preset time range of the currently playing current media content segment. When it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range, control the key gateway to send the key of the second preset media content segment to the playback end. In the embodiment of the present invention, when the playback end starts playing the target media content, first determine whether there is a key of the first preset media content segment adjacent to the startup media content segment and with a key change in the key gateway. If so, the key gateway returns the key of the first preset media content segment and the key of the startup media content segment to the playback end together. In this way, the burden on the preset digital rights management system can be reduced, and at the same time, the playback of media content can be made more stable. And, during the process of the playback end playing the target media content, if the playback end requests to obtain the key of the second preset media content segment adjacent to the currently playing media content segment and with a key change from the key gateway at any time point within the preset time range of the currently playing media content segment, the key gateway returns the key of the second preset media content segment to the playback end. In this way, the time of key requests can be dispersed, effectively slowing down the high concurrency of key requests, making key acquisition more stable and reliable, reducing the occurrence of playback failures, and thus solving the technical problem in the related art that due to the easy occurrence of high concurrency key requests, key acquisition fails.

[0045] The embodiments of the present invention will be described in detail below in combination with the above steps.

[0046] The following steps can be applied to a preset digital rights management system (i.e., DRM system). The preset digital rights management system includes: a playback end, a key gateway, a key management server, a media content encryption machine, and a content distribution end.

[0047] Figure 2 is a schematic diagram of an optional DRM functional module structure according to an embodiment of the present invention, as Figure 2As shown in the figure, the DRM system includes: a playback terminal, a key gateway, a key management server, a media content encryption machine, and a content distribution terminal. Among them, the content distribution terminal stores encrypted video and audio media content for the playback terminal to download and play. The key gateway stores the keys required to decrypt the media content for the playback terminal to decrypt the media content after downloading. The keys of the key gateway can be provided by the key management server. The key management server generates keys, provides the keys to the key gateway, and provides the keys to the media content encryption machine. The media content encryption machine is responsible for encrypting the video and audio media content and distributing the encrypted media content to the content distribution terminal. Then, the content distribution terminal distributes the encrypted media content to the playback terminal.

[0048] In some optional embodiments, the content distribution terminal includes: a Content Delivery Network (CDN) for distributing video and audio media content segments to the playback terminal.

[0049] Optionally, the preset digital rights management system further includes: a key management server, a media content encryption machine, and a content distribution terminal. The key acquisition method further includes: controlling the key management server to generate a key for each media content segment based on preset configuration information; controlling the media content encryption machine to encrypt the media content segment based on the key of the media content segment to obtain an encrypted media content segment; when the content distribution terminal receives a media content distribution request, controlling the content distribution terminal to distribute the encrypted media content segment to be played to the playback terminal, where the media content distribution request carries an identifier of the media content segment to be played, and the encrypted media content segment to be played is the encrypted media content segment indicated by the identifier of the media content segment to be played; when the key gateway receives a key distribution request, controlling the key gateway to distribute a preset key to the playback terminal, where the key distribution request carries an identifier of the media content segment to be decrypted, and the preset key is a key determined based on the identifier of the media content segment to be decrypted.

[0050] In the embodiments of the present invention, the key management server can generate a key for each media content segment (that is, the keys corresponding to each media content segment may be the same or different) according to preset configuration information (including: the length of the encrypted media content segment, the dynamic key generation rule (for example, when generating a key for each media content segment length, changing the combination, length, etc. of the next key), etc.), and provide the key to the key gateway and the media content encryption machine.

[0051] In the embodiments of the present invention, the media content encryption machine can use the key of the media content segment to encrypt the media content segment to obtain an encrypted media content segment, and send the encrypted media content segment to the content distribution terminal for storage.

[0052] In an embodiment of the present invention, if the content distribution end receives a media content distribution request (the media content distribution request carries an identifier of a media content segment to be played), the content distribution end may distribute to the playback end the encrypted media content segment to be played indicated by the identifier of the media content segment to be played.

[0053] In an embodiment of the present invention, if the key gateway receives a key distribution request (the key distribution request carries an identifier of a media content segment to be decrypted), the key gateway may distribute a preset key to the playback end, and the preset key is a key determined based on the identifier of the media content segment to be decrypted. For example, if the media content segment indicated by the identifier of the media content segment to be decrypted is a start media content segment, the preset key may be the key of the next media content segment (i.e., the first preset media content segment) adjacent to the start media content segment and with a changed key and the key of the start media content segment; if the media content segment indicated by the identifier of the media content segment to be decrypted is a media content segment to be played soon, the preset key may be the key of this media content segment.

[0054] In an embodiment of the present invention, the playback end can implement functions such as obtaining video and audio media content, requesting and obtaining keys, decrypting encrypted media content, and playing, and is located on terminal devices such as mobile phones, tablet computers, smart TVs, and computers.

[0055] Step S101, when the playback end starts playing the target media content, determine whether there is a key of the first preset media content segment in the key gateway, where the first preset media content segment is a media content segment adjacent to the start media content segment and the key of this media content segment is different from the key of the start media content segment.

[0056] In step S101, when the playback end starts playing the target media content (which can be live content or on-demand content), it can first determine whether there is a key of the next media content segment (i.e., the first preset media content segment, which is a media content segment adjacent to the start media content segment and the key of this media content segment is different from the key of the start media content segment) adjacent to the start media content segment and with a changed key in the key gateway.

[0057] In some optional embodiments, a media content segment refers to a continuous segment of media content with the same key.

[0058] In some optional embodiments, starting to play can be simply referred to as start playing. Start playing includes: playback scenarios such as the playback end starting to play a video, switching to play a video program, and selecting a certain time point to play from the progress bar.

[0059] Step S102, when there is a key of the first preset media content segment in the key gateway, control the key gateway to distribute the key of the start media content segment and the key of the first preset media content segment to the playback end.

[0060] In step S102, if the key of the first preset media content segment exists in the key gateway, the key gateway returns the key of the first preset media content segment and the key of the start media content segment to the playback end together; otherwise, the key gateway only returns the key of the start media content segment.

[0061] In the embodiment of the present invention, at the start of playback, the playback end makes a single key request and may obtain two keys (i.e., the key of the start media content segment and the key of the first preset media content segment). In this way, it is possible to avoid requesting the key of the next media content segment adjacent to the start media content segment and having a changed key after requesting the key of the start media content segment, effectively reducing the burden on the relevant server and making the playback of the media content more stable.

[0062] However, providing keys that are not immediately used to the playback end prematurely may have a certain impact on the security of the keys, especially in a live broadcast scenario. Therefore, this embodiment also needs to determine whether to return two keys to the playback end according to the time interval between the start time of the first preset media content segment and the start time of the start media content segment.

[0063] Optionally, before determining whether the key of the first preset media content segment exists in the key gateway, it further includes: determining the start time of the start media content segment and the start time of the first preset media content segment, where the start time is the time when the playback end starts playing the target media content, and the playback types for starting playback include at least one of the following: start playing, switching playback, and jumping playback; determining the time interval between the start time and the start time; and determining whether the key of the first preset media content segment exists in the key gateway when the time interval is less than a preset interval threshold.

[0064] In the embodiment of the present invention, when the key gateway determines whether to return the key of the next media content segment adjacent to the start media content segment and having a changed key and the key of the start media content segment to the playback end together, it can also perform the following operations: determining the time interval between the start time of the next media content segment adjacent to the start media content segment and having a changed key and the start time (i.e., the time when the playback end starts playing the target media content, and the playback types for starting playback include: start playing, switching playback, jumping playback, etc.), and determining whether the time interval (set as time interval T1) is less than a preset value (i.e., the preset interval threshold, which can be set according to actual situations). If so, the key gateway returns the key of the next media content segment adjacent to the start media content segment and having a changed key and the key of the start media content segment to the playback end together; otherwise, the key gateway only returns the key of the start media content segment.

[0065] Figure 3It is a schematic diagram of an optional time interval on the time axis according to an embodiment of the present invention. As Figure 3 shown, assume that the start time of the start media content segment (key 1) is t1, and the start time of the next media content segment (key 2) adjacent to the start media content segment and with a key change is t2. Then, the time interval T1 = t2 - t1. Among them, key 1 and key 2 are different.

[0066] In the embodiment of the present invention, the start time may be very close to the start time of the next media content segment adjacent to the start media content segment and with a key change. In this way, after the playback end requests the key of the start media content from the key gateway, it has to request the key of the next media content segment adjacent to the start media content segment and with a key change from the key gateway again in a very short time, which burdens the DRM system. Therefore, if the time interval T1 is short enough, there is no need to worry about the key security problem that may be caused by providing the key that is not immediately used to the playback end too early. At the same time, each time the playback end requests a key, there is a possibility of failure. And because the time is too short, if the key request fails, there may not be enough time for a retry request. Therefore, reducing the number of key requests can improve the success rate of the key request for the next media content segment adjacent to the start media content segment and with a key change.

[0067] Optionally, during the process of playing the target media content, the playback end preloads the media content segment to be played. The media content segment to be played carries key change information. The key acquisition method further includes: determining a sub-segment of the media content segment to be played adjacent to the start media content segment from the media content segment to be played; based on the key change information, determining the change time when the key changes in the sub-segment of the media content segment to be played; and determining the change time as the start time.

[0068] In the embodiment of the present invention, during the process of playing media content, the playback end usually preloads a part of the media content that will be played in the future (i.e., the media content segment to be played). In the DRM system, these buffered media contents or their index files (the index file can record the address where the media content is located) usually carry time information of key changes (that is, the media content segment to be played carries key change information (that is, the key changes at that moment)).

[0069] In the embodiment of the present invention, the time interval T1 can be determined by the preloaded media content or its index file. Specifically: taking the start time of the media content segment adjacent to the start media content segment and with a key change in the media content preloaded by the playback end as t2, that is, determining a sub-segment of the media content segment to be played adjacent to the start media content segment from the media content segment to be played, and then according to the key change information, determining the change time when the key changes in the sub-segment of the media content segment to be played, and determining the change time as the start time t2.

[0070] In step S103, during the process of playing the target media content at the playback end, determine the preset time range of the currently playing current media content segment, where the preset time range is determined based on the start time of the current media content segment and the start time of the second preset media content segment, and the second preset media content segment is a media content segment adjacent to the current media content segment and the key of this media content segment is inconsistent with the key of the current media content segment.

[0071] In step S103, during the media content playback process after the playback end starts playing, when playing to each media content segment, obtain the preset time range of the currently playing current media content segment.

[0072] In the embodiment of the present invention, the preset time range is a period of time from the start time of the currently playing media content segment to the start time of the next media content segment (i.e., the second preset media content segment, which is a media content segment adjacent to the current media content segment and the key of this media content segment is inconsistent with the key of the current media content segment) adjacent to the currently playing media content segment and having a key change (that is, the preset time range is determined based on the start time of the current media content segment and the start time of the second preset media content segment).

[0073] Optionally, the step of determining the preset time range of the currently playing current media content segment includes: determining the delay duration and the advance duration; determining the first specified time based on the start time of the current media content segment and the delay duration; determining the second specified time based on the start time of the second preset media content segment and the advance duration; and determining the time range between the first specified time and the second specified time as the preset time range.

[0074] In the embodiment of the present invention, the preset time range can be further restricted, that is, a period of time from a specified time (i.e., the first specified time, which is the start time of the current media content segment plus the delay duration) after the start time of the currently playing media content segment to a specified time (i.e., the second specified time, which is the start time of the second preset media content segment minus the advance duration) before the start time of the next media content segment adjacent to the currently playing media content segment and having a key change is determined as the preset time range. Among them, the delay duration and the advance duration can be determined in advance.

[0075] Figure 4 It is a schematic diagram of an optional preset time range on the time axis according to the embodiment of the present invention. As Figure 4 shown, the preset time range is as Figure 4As shown in the figure, time t3 is the start time of the currently playing media content segment (key 1), time t4 is a specified time after the start time of the currently playing media content segment (key 1), time t6 is the start time of the next media content segment (key 2) adjacent to the currently playing media content segment and with a key change, and time t5 is a specified time before the start time of the next media content segment (key 2) adjacent to the currently playing media content segment and with a key change. Among them, t4 - t3 >= 0, t6 - t5 >= 0, and the time period between time t4 and time t5 is the preset time range.

[0076] Optionally, a preset time range is carried on the media content sub-segment between the start time of each media content segment and the first specified time.

[0077] In the embodiment of the present invention, the preset time range exists in the media content segment file or its corresponding index file. Specifically, the preset time range exists in the media content segment file or its index file between time t3 (i.e., the start time) and time t4 (i.e., the first specified time) of each media content segment. In this way, when the playback end obtains the media content segment file or its index file, it can obtain the preset time range without requesting from a dedicated server.

[0078] Exemplarily, in the HLS (HTTP Live Streaming) protocol, the m3u8 file (i.e., a text file format used to organize multiple media files (such as audio or video) into a playlist) is the index file, and one or more adjacent ts files (i.e., Transport Stream files, which are encapsulation formats for video and audio data) belong to the same key, and they form a media content segment. One or more ts files in each media content segment can carry the preset time range.

[0079] Step S104, when it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range, control the key gateway to send the key of the second preset media content segment to the playback end.

[0080] In step S104, the playback end can request from the key gateway to obtain the key of the next media content segment adjacent to the currently playing media content segment and with a key change at any time point within the preset time range of the currently playing media content segment.

[0081] Optionally, before the control key gateway sends the key of the second preset media content segment to the playback end, it further includes: the control key gateway determines whether the request time point of the playback end is within a preset time range, where the request time point is the time point when the playback end sends a key delivery request to the key gateway, and the key delivery request carries the identifier of the media content segment to be decrypted; when the key gateway determines that the request time point is within the preset time range, the control key gateway sends the key of the media content segment to be decrypted indicated by the identifier of the media content segment to be decrypted to the playback end.

[0082] In the embodiment of the present invention, when the key gateway responds to a key request from the playback end for the next media content segment that is adjacent to the currently playing media content segment and has a changed key, it determines whether the request moment (i.e., the request time point, which is the time point when the playback end sends a key delivery request to the key gateway, and the key delivery request carries the identifier of the media content segment to be decrypted) is within a preset time range. If so, it provides the key to the playback end (i.e., when the key gateway determines that the request time point is within the preset time range, the control key gateway sends the key of the media content segment to be decrypted indicated by the identifier of the media content segment to be decrypted to the playback end), otherwise it does not provide it. In this way, the security of the key can be ensured. Especially in the live broadcast scenario, providing the key to the playback end too early may have a certain impact on the security of the key.

[0083] In some optional embodiments, the time point at any time within the preset time range of the currently playing media content segment by the playback end is random.

[0084] In Figure 4 By reserving a time interval between time point t3 and time point t4, it can ensure that the key of the next media content segment that is adjacent to the currently playing media content segment and has a changed key can be obtained. Because if the key request is too early, it may not be possible to obtain it from the key gateway, and since a small number of users may exit the playback, the key requested in advance may not be used. Reserving this time interval can reduce the occurrence of this situation.

[0085] In Figure 4 By reserving a time interval between time point t5 and time point t6, it can ensure sufficient request time for the key and possible retry time after the request fails. If the key request time is too late, when the playback end plays the next media content segment that is adjacent to the currently playing media content segment and has a changed key, it may fail to play because the key cannot be requested.

[0086] The following will be described in detail in combination with another optional specific implementation manner.

[0087] Figure 5It is a schematic diagram of obtaining a key for digital copyright of media content according to an embodiment of the present invention. As Figure 5 shown, it includes the following processes:

[0088] (1) The playback end starts playing.

[0089] (2) The playback end obtains encrypted video and audio media content from the content distribution end and requests to obtain a key from the key gateway.

[0090] (3) Determine whether there is a key for the next media content segment adjacent to the media content segment at the start of playback and with a changed key in the key gateway. If so, the key gateway returns the key for the next media content segment adjacent to the media content segment at the start of playback and with a changed key together with the key for the media content segment at the start of playback to the playback end. Otherwise, the key gateway only returns the key for the media content segment at the start of playback.

[0091] (4) During the playback of the media content after the playback end starts playing, when playing to each media content segment, obtain a preset time range.

[0092] (5) The playback end requests to obtain the key for the next media content segment adjacent to the currently playing media content segment and with a changed key from the key gateway at a specified time point within the preset time range of the currently playing media content segment.

[0093] In the embodiment of the present invention, by requesting two keys at one time under certain conditions at the start of playback and dispersing the time of key requests during the playback process, the problem of high concurrency of key requests (especially in the live broadcast scenario) can be alleviated, making the key requests more stable and reliable, reducing the occurrence of playback failures, and improving the user experience.

[0094] The following is a detailed description in combination with another embodiment.

[0095] Embodiment 2

[0096] A key acquisition device for media content provided in this embodiment includes multiple implementation units, and each implementation unit corresponds to each implementation step in Embodiment 1 above.

[0097] Figure 6 It is a schematic diagram of an optional key acquisition device for media content according to an embodiment of the present invention. As Figure 6 shown, the key acquisition device may include: a judgment unit 60, a first distribution unit 61, a determination unit 62, and a second distribution unit 63.

[0098] Among them, the judgment unit 60 is used to judge whether there is a key for the first preset media content segment in the key gateway when the playback end starts playing the target media content. The first preset media content segment is a media content segment adjacent to the start-play media content segment and the key of this media content segment is inconsistent with the key of the start-play media content segment;

[0099] The first sending unit 61 is used to control the key gateway to send the key of the start-play media content segment and the key of the first preset media content segment to the playback end when there is a key for the first preset media content segment in the key gateway;

[0100] The determination unit 62 is used to determine the preset time range of the currently playing current media content segment during the process of the playback end playing the target media content. The preset time range is determined based on the start time of the current media content segment and the second preset media content segment. The second preset media content segment is a media content segment adjacent to the current media content segment and the key of this media content segment is inconsistent with the key of the current media content segment;

[0101] The second sending unit 63 is used to control the key gateway to send the key of the second preset media content segment to the playback end when it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range.

[0102] The above-mentioned key acquisition device can, when the judgment unit 60 determines that the target media content starts playing at the playback end, determine whether there is a key for the first preset media content segment in the key gateway. When there is a key for the first preset media content segment in the key gateway, the first sending unit 61 controls the key gateway to send the key for the start-play media content segment and the key for the first preset media content segment to the playback end. The determination unit 62 determines the preset time range of the currently playing media content segment during the process of the playback end playing the target media content. When it is determined that the playback end requests the key for the second preset media content segment from the key gateway at any time point within the preset time range, the second sending unit 63 controls the key gateway to send the key for the second preset media content segment to the playback end. In the embodiment of the present invention, when the playback end starts playing the target media content, first determine whether there is a key for the first preset media content segment that is adjacent to the start-play media content segment and whose key has changed in the key gateway. If so, the key gateway returns the key for the first preset media content segment and the key for the start-play media content segment to the playback end. In this way, it can reduce the burden on the preset digital rights management system and make the playback of media content more stable. Moreover, during the process of the playback end playing the target media content, if the playback end requests from the key gateway to obtain the key for the second preset media content segment that is adjacent to the currently playing media content segment and whose key has changed at any time point within the preset time range of the currently playing media content segment, the key gateway returns the key for the second preset media content segment to the playback end. In this way, the time of key requests can be dispersed, effectively reducing the high concurrency of key requests, making key acquisition more stable and reliable, reducing the occurrence of playback failures, and thus solving the technical problem in the related art that due to the easy occurrence of high-concurrency key requests, key acquisition fails.

[0103] Optionally, the key acquisition device further includes: a first determination module, configured to determine the start time of the start-play media content segment and the start time of the first preset media content segment before determining whether there is a key for the first preset media content segment in the key gateway, where the start time is the time when the playback end starts playing the target media content, and the playback types for starting playback include at least one of the following: start playing, switching playback, and jumping playback; a second determination module, configured to determine the time interval between the start time and the start time; a first judgment module, configured to determine whether there is a key for the first preset media content segment in the key gateway when the time interval is less than a preset interval threshold.

[0104] Optionally, during the process of playing the target media content, the playback end pre-loads the media content segment to be played, and the media content segment to be played carries key change information. The key acquisition device further includes: a third determination module, configured to determine a media content sub-segment to be played adjacent to the media content segment at the start of playback from the media content segment to be played; a fourth determination module, configured to determine, based on the key change information, a change moment at which the key changes in the media content sub-segment to be played; and a fifth determination module, configured to determine the change moment as the start moment.

[0105] Optionally, the determination unit includes: a sixth determination module, configured to determine a delay duration and an advance duration; a seventh determination module, configured to determine a first specified moment based on the start moment of the current media content segment and the delay duration; an eighth determination module, configured to determine a second specified moment based on the start moment of the second preset media content segment and the advance duration; and a ninth determination module, configured to determine a time range between the first specified moment and the second specified moment as the preset time range.

[0106] Optionally, a media content sub-segment between the start moment of each media content segment and the first specified moment carries the preset time range.

[0107] Optionally, the key acquisition device further includes: a second judgment module, configured to control the key gateway to judge whether the request time point of the playback end is within the preset time range before controlling the key gateway to send the key of the second preset media content segment to the playback end, where the request time point is the time point at which the playback end sends a key distribution request to the key gateway, and the key distribution request carries an identifier of the media content segment to be decrypted; and a first distribution module, configured to control the key gateway to send the key of the media content segment to be decrypted indicated by the identifier of the media content segment to be decrypted to the playback end when the key gateway determines that the request time point is within the preset time range.

[0108] Optionally, the preset digital rights management system further includes: a key management server, a media content encryptor, and a content distribution end. The key acquisition device further includes: a first generation module, configured to control the key management server to generate a key for each media content segment based on preset configuration information; a first encryption module, configured to control the media content encryptor to encrypt the media content segment based on the key of the media content segment to obtain an encrypted media content segment; a second distribution module, configured to, when the content distribution end receives a media content distribution request, control the content distribution end to distribute the encrypted media content segment to be played to the playback end, where the media content distribution request carries an identifier of the media content segment to be played, and the encrypted media content segment to be played is the encrypted media content segment indicated by the identifier of the media content segment to be played; a third distribution module, configured to, when the key gateway receives a key distribution request, control the key gateway to distribute a preset key to the playback end, where the key distribution request carries an identifier of the media content segment to be decrypted, and the preset key is a key determined based on the identifier of the media content segment to be decrypted.

[0109] The above key acquisition device may further include a processor and a memory. The above determination unit 60, first distribution unit 61, determination unit 62, second distribution unit 63, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.

[0110] The above processor includes a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and by adjusting the kernel parameters, when it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range, the key gateway is controlled to distribute the key of the second preset media content segment to the playback end.

[0111] The above memory may include non-permanent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one storage chip.

[0112] The present invention also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with the following method steps: when starting to play target media content at a playback end, determining whether there is a key for a first preset media content segment in a key gateway; when there is a key for the first preset media content segment in the key gateway, controlling the key gateway to send the key for the start-play media content segment and the key for the first preset media content segment to the playback end; during the process of playing the target media content at the playback end, determining a preset time range of the currently playing media content segment; when it is determined that the playback end requests the key for a second preset media content segment from the key gateway at any time point within the preset time range, controlling the key gateway to send the key for the second preset media content segment to the playback end.

[0113] According to another aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium, which includes a stored computer program, wherein when the computer program runs, it controls a device where the computer-readable storage medium is located to execute the above-mentioned method for obtaining a key of media content.

[0114] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, which includes one or more processors and a memory, and the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the above-mentioned method for obtaining a key of media content.

[0115] Figure 7 is a hardware structural block diagram of an electronic device (or mobile device) for a method of obtaining a key of media content according to an embodiment of the present invention. As Figure 7 shown, the electronic device may include one or more processors (for example, Figure 7 processor 702a, processor 702b,..., processor 702n in Figure 7 , and these processors may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA), and a memory 704 for storing data. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 7 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components than those shown in Figure 7 , or have a different configuration from that shown in

[0116] The above serial numbers of the embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0117] The embodiments or examples of the present disclosure are not exhaustive. They are only illustrations of some embodiments or examples and do not specifically limit the protection scope of the present disclosure. Without conflict, each step in a certain embodiment or example can be implemented as an independent embodiment, and the steps can be combined arbitrarily. For example, a solution obtained by removing some steps in a certain embodiment or example can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional modes or optional examples in a certain embodiment or example can be combined arbitrarily; furthermore, the embodiments or examples can be combined arbitrarily. For example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional modes or optional examples of other embodiments or examples.

[0118] In the above embodiments of the present invention, the descriptions of the various embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0119] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in an electrical or other form.

[0120] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0121] In addition, the functional units in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0122] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0123] The foregoing are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for obtaining a key of media content, characterized in that: Applied to a preset digital copyright management system, the preset digital copyright management system at least includes: a playback terminal, a key gateway, including: In the case where the playback end starts to play the target media content, it is determined whether there is a key of a first preset media content segment in the key gateway, wherein the first preset media content segment is a media content segment adjacent to the start-up media content segment and the key of the media content segment is inconsistent with the key of the start-up media content segment; before determining whether there is a key of the first preset media content segment in the key gateway, it also includes: determining the start time of the start-up media content segment and the start time of the first preset media content segment, wherein the start time is the time when the playback end starts to play the target media content, and the playback type of the start playback includes at least one of the following: start playback, switch playback, jump playback; determine the time interval between the start time and the start time; when the time interval is less than a preset interval threshold, determine whether there is a key of the first preset media content segment in the key gateway; When the key of the first preset media content segment exists in the key gateway, controlling the key gateway to send the key of the start-playing media content segment and the key of the first preset media content segment to the playback terminal; During the process of playing the target media content at the playback end, a preset time range of the current media content segment being played is determined, wherein the preset time range is determined based on the start time of the current media content segment and a second preset media content segment, the second preset media content segment is a media content segment adjacent to the current media content segment and a key of the media content segment is inconsistent with the key of the current media content segment; the step of determining the preset time range of the current media content segment being played includes: determining a delay time and an advance time; determining a first designated time based on the start time of the current media content segment and the delay time; determining a second designated time based on the start time of the second preset media content segment and the advance time; determining a time range between the first designated time and the second designated time as the preset time range; When it is determined that the playback end requests the key of the second preset media content segment from the key gateway at any time point within the preset time range, the key gateway is controlled to send the key of the second preset media content segment to the playback end, wherein the any time point is random.

2. The key acquisition method according to claim 1, characterized in that: The playback end preloads a to-be-played media content segment during playback of the target media content, wherein the to-be-played media content segment carries key change information, and the key acquisition method further includes: Determine, from the to-be-played media content segment, a to-be-played media content subsegment adjacent to the start-play media content segment; Based on the key change information, determining a change time when a key in a sub-segment of the to-be-played media content changes; The change time is determined as the start time.

3. The key acquisition method according to claim 1, characterized in that: The preset time range is carried on the media content sub-segment between the start time of each media content segment and the first designated time.

4. The key acquisition method according to claim 1, characterized in that: Before controlling the key gateway to send the key of the second preset media content segment to the playback terminal, the method further includes: Control the key gateway to determine whether the request time point of the playback terminal is within the preset time range, wherein the request time point is the time point when the playback terminal sends a key issuance request to the key gateway, and the key issuance request carries an identifier of a media content segment to be decrypted; When the key gateway determines that the request time point is within the preset time range, the key gateway is controlled to send the key of the to-be-decrypted media content segment indicated by the to-be-decrypted media content segment identifier to the playback terminal.

5. The key acquisition method according to claim 1, characterized in that: The preset digital copyright management system also includes: a key management server, a media content encryptor, and a content distribution terminal. The key acquisition method also includes: Controlling the key management server to generate a key for each media content segment based on preset configuration information; Control the media content encryption machine to encrypt the media content segment based on the key of the media content segment to obtain an encrypted media content segment; When the content distribution end receives a media content delivery request, the content distribution end is controlled to deliver the to-be-played encrypted media content segment to the playback end, wherein the media content delivery request carries an identifier of the to-be-played media content segment, and the to-be-played encrypted media content segment is the encrypted media content segment indicated by the identifier of the to-be-played media content segment; When the key gateway receives a key sending request, the key gateway is controlled to send a preset key to the playback end, wherein the key sending request carries an identifier of the media content segment to be decrypted, and the preset key is a key determined based on the identifier of the media content segment to be decrypted.

6. A device for obtaining a key for media content, characterized in that: Applied to a preset digital copyright management system, the preset digital copyright management system at least includes: a playback terminal, a key gateway, including: A judging unit, configured to judge whether there is a key of a first preset media content segment in the key gateway when the playback terminal starts to play the target media content, wherein the first preset media content segment is a media content segment adjacent to the start-play media content segment and the key of the media content segment is inconsistent with the key of the start-play media content segment; A first sending unit, configured to control the key gateway to send the key of the start-play media content segment and the key of the first preset media content segment to the playback terminal when the key of the first preset media content segment exists in the key gateway; a determining unit, configured to determine, during the process of playing the target media content at the playback end, a preset time range of a current media content segment being played, wherein the preset time range is determined based on the start time of the current media content segment and a second preset media content segment, the second preset media content segment being a media content segment adjacent to the current media content segment and having a key that is inconsistent with the key of the current media content segment; A second sending unit is used to control the key gateway to send the key of the second preset media content segment to the playback terminal when it is determined that the playback terminal requests the key of the second preset media content segment from the key gateway at any time point within the preset time range, wherein the any time point is random; The key acquisition device further includes: a first determination module, used to determine the start time of the start media content segment and the start time of the first preset media content segment before determining whether the key of the first preset media content segment exists in the key gateway, wherein the start time is the time when the playback end starts playing the target media content, and the playback type of the start playback includes at least one of the following: start playback, switch playback, jump playback; a second determination module, used to determine the time interval between the start time and the start time; a first determination module, used to determine whether the key of the first preset media content segment exists in the key gateway when the time interval is less than a preset interval threshold; The determination unit includes: a sixth determination module, used to determine the delay time and the advance time; a seventh determination module, used to determine the first specified time based on the start time of the current media content segment and the delay time; an eighth determination module, used to determine the second specified time based on the start time and the advance time of the second preset media content segment; and a ninth determination module, used to determine the time range between the first specified time and the second specified time as the preset time range.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for obtaining a key for media content according to any one of claims 1 to 5.

8. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the key acquisition method for media content as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Live stream encryption

    US9742749B1