CN112291617A - Audio and video offline playing method and device and electronic equipment - Google Patents

Audio and video offline playing method and device and electronic equipment Download PDF

Info

Publication number
CN112291617A
CN112291617A CN202010958079.4A CN202010958079A CN112291617A CN 112291617 A CN112291617 A CN 112291617A CN 202010958079 A CN202010958079 A CN 202010958079A CN 112291617 A CN112291617 A CN 112291617A
Authority
CN
China
Prior art keywords
content
downloading
cache
local
address information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010958079.4A
Other languages
Chinese (zh)
Inventor
韦月飞
李波
严志康
张灵晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen SDMC Technology Co Ltd
Original Assignee
Shenzhen SDMC Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen SDMC Technology Co Ltd filed Critical Shenzhen SDMC Technology Co Ltd
Priority to CN202010958079.4A priority Critical patent/CN112291617A/en
Publication of CN112291617A publication Critical patent/CN112291617A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4623Processing of entitlement messages, e.g. ECM [Entitlement Control Message] or EMM [Entitlement Management Message]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4627Rights management associated to the content

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides an audio and video offline playing method, an audio and video offline playing device and electronic equipment, wherein the method comprises the following steps: the terminal system receives the cache event, the content downloading module starts a downloading task, acquires the cache content corresponding to the cache event called by the content distribution system, acquires the license certificate corresponding to the cache content after the authorization system verifies, and stores the license certificate to a local path; receiving a playing event, acquiring local cache content and a license certificate cached in the local path according to the playing event, and replacing domain names of the local cache content and the license certificate and then transmitting the domain names into a player in the terminal system; and the player requests the local cache content from a content output module according to the local cache content replaced by the domain name and the license certificate, and performs decryption playing. The audio and video content which is subjected to copyright protection by the Widevine DRM can be normally played under the condition of no Internet access.

Description

Audio and video offline playing method and device and electronic equipment
Technical Field
The invention relates to the technical field of audio and video playing, in particular to an audio and video offline playing method and device and electronic equipment.
Background
In recent years, with the increase of internet broadband, television programs viewed through the internet gradually become a mainstream trend, and internet televisions have started to become more and more popular. An internet television (Over The Top, OTT) is a television terminal which takes The internet as a transmission carrier, has an internet access function, and can provide various interactive services for users. Under such circumstances, copyright protection of Digital content becomes a primary problem to be solved by content providers, i.e. ensuring that content can only be played by a terminal under authorization, so as to generate Digital Rights Management (DRM) technology, for example: OMA DRM, Marlin DRM, Play Ready/Windows DRM, etc. While Google has introduced the Widevine DRM, the key components of the Widevine DRM mainly include a Content Decryption Module (CDM) and a License Services Module (LSM). The data request work flow when the terminal plays the DRM encrypted audio/video content based on the http(s) adaptive streaming protocol is shown in fig. 1. The request content and the request certificate both require that the playing terminal must access the internet, that is, the terminal can normally play the DRM encrypted audio and video file only by accessing the internet. Therefore, in the prior art, the problem that audio and video playing cannot be realized in an off-line state exists.
Disclosure of Invention
The embodiment of the invention provides an audio and video offline playing method, which can realize that audio and video contents subjected to copyright protection by the Widevine DRM can be normally played under the condition of no Internet access.
In a first aspect, an embodiment of the present invention provides an audio and video offline playing method, including the following steps:
a terminal system receives a cache event, a content downloading module of the terminal system starts a downloading task, acquires a cache content which is called by a content distribution system and corresponds to the cache event, acquires a license certificate which corresponds to the cache content after being verified by an authorization system, and stores the license certificate to a local path;
receiving a playing event, acquiring local cache content cached in the local path and a license corresponding to the local cache content according to the playing event, and replacing domain names of the local cache content and the license and then transmitting the domain names into a player in the terminal system;
and the player requests the local cache content from a content output module in the terminal system according to the local cache content after the domain name is replaced and the license certificate, and decrypts and plays the local cache content.
In a second aspect, an embodiment of the present invention further provides a device capable of implementing offline audio/video playing, including:
the downloading module is used for receiving the cache event by the terminal system, starting a downloading task by the content downloading module of the terminal system, acquiring cache content corresponding to the cache event and acquired license certificate corresponding to the cache content after the authorization system verifies, and storing the license certificate to a local path;
an obtaining module, configured to receive a play event, obtain, according to the play event, local cache content cached in the local path and a license corresponding to the local cache content, replace a domain name of the local cache content and the license, and then transmit the domain name to a player in the terminal system;
and the playing module is used for requesting the local cache content from a content output module in the terminal system by the player according to the local cache content after the domain name is replaced and the license certificate, and decrypting and playing the local cache content.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: the off-line audio and video playing method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the steps in the audio and video off-line playing method provided by any one of the embodiments are realized.
In a fourth aspect, a computer-readable storage medium has a computer program stored thereon, where the computer program, when executed by a processor, implements the steps in the audio and video offline playing method provided in any one of the above embodiments.
In the embodiment of the invention, a terminal system mainly aims at the realization process of off-line playing of audio and video contents under the protection of the Windows DRM copyright, and compared with on-line playing, a content downloading module and a content output module are added, when a user triggers a cache event, the content downloading module starts a downloading task to send a request to a content distribution system to obtain cache contents corresponding to the cache event, and sends the request to an authorization system to obtain a license certificate corresponding to the cache contents in the process of obtaining the cache contents, and simultaneously stores the cache contents and the license certificate to a local path, thereby facilitating the off-line playing of the user; after receiving the playing event, the content output module calls the corresponding local cache content from the local path based on the playing event and sends the local cache content to the player, and the local cache content is rendered and played after the license of the local cache content is obtained, so that the audio and video content which is subjected to copyright protection by the Widevine DRM can be normally played under the condition of no Internet access, and the problem that the terminal system is required to access the Internet when the local cache content is requested and the license is requested in the existing DRM playing flow is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1a is a schematic structural diagram of a system for offline audio/video playing according to an embodiment of the present invention;
fig. 1b is a schematic structural diagram of another system for offline playing of audio and video according to an embodiment of the present invention;
fig. 2 is a specific flowchart of an audio/video offline playing method according to an embodiment of the present invention;
fig. 3a is a specific flowchart of an audio/video offline playing method according to an embodiment of the present invention;
fig. 3b is a flowchart of a cache content downloading phase according to an embodiment of the present invention;
fig. 4a is a specific flowchart of another audio/video offline playing method according to an embodiment of the present invention;
fig. 4b is a flowchart of a cache content playing stage according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an audio/video offline playing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an audio/video offline playing device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another audio/video offline playing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another audio/video offline playing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another audio/video offline playing apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of another audio/video offline playing apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
As shown in fig. 1a, fig. 1a is a schematic structural diagram of a system for offline playing audio and video provided by an embodiment of the present invention. The system 100 includes: terminal system 101, content distribution system 102, authorization system 103. Referring to fig. 1b, the terminal system 101 includes: an application module 1011, a content download module 1012, a content output module 1013, a content decryption module 1014, and a player module 1015.
Specifically, the application module 1011 is configured to receive a cache event triggered by a user, and notify the content downloading module 1012 to start a downloading task. The application module 1011 is further configured to receive a play event triggered by a user, obtain, according to the play event, cached content that has been cached in the local path and a license corresponding to the cached content, and replace a domain name of the cached content and the license and then transfer the domain name into a player in the terminal system 101.
The content distribution system 102 is configured to, after the content downloading module 1012 starts a downloading task, call the cache content corresponding to the cache event and return the cache content to the content downloading module 1012 of the terminal system 101.
The authorization system 103 is configured to, when the content downloading module 1012 starts a downloading task and the content distribution system 102 calls the cache content, verify the received request, call a license certificate corresponding to the cache content and return the license certificate to the content downloading module 1012.
The content downloading module 1012 is configured to start a downloading task, obtain the cache content corresponding to the cache event that is called by the content distribution system 102, obtain the license certificate corresponding to the cache content after being verified by the authorization system 103, and store the license certificate in the local path.
The content output module 1013 is configured to return the local cache content to the player after the player sends a request for the local cache content.
The content decryption module 1014 is configured to receive the content output module 1013 and return the local cache content to the player for decryption; and also for decryption during the process of verifying the license credential corresponding to the cached content at the acquisition authorization system 103.
The player module 1015 is configured to render and play the local cache content decrypted by the content decryption module 1014.
More specifically, in the embodiment of the present invention, when the user does not access the internet, the user may trigger a cache event, and after the application module 1011 of the terminal system 101 captures the cache event, the application module may notify the content downloading module 1012 in a manner of sending notification information. At this time, the content downloading module 1012 starts a downloading task to download the cached content and the license certificate, respectively. By sending a request to the content distribution system 102, the content distribution system 102 can extract the cached content corresponding to the caching event and the license credential back to the content download module 1012, which the content download module 1012 receives and saves to the local path.
After the user touches the play event, the application module 1011 captures the play event, and may acquire the cached local cache content and the license certificate according to the play event clicked by the user, modify the content address information and the key address information of the local cache content into a local path, and send the local path to the player of the terminal system 101, thereby starting the video play flow process. The player creates a session, the player sends a request for obtaining the license to the content output module 1013, the content output module 1013 can return the license to the player according to the request, then the player sends the request for obtaining the local cache content to the content output module 1013 again, receives the local cache content returned by the content output module 1013, and plays the local cache content after decrypting the local cache content based on the license.
In the embodiment of the present invention, the terminal system 101 is mainly directed to an implementation process of playing audio and video content offline under the protection of the Widevine DRM copyright. Compared with online playing, a content downloading module 1012 and a content output module 1013 are added, when a user triggers a cache event, the content downloading module 1012 starts a downloading task to send a request to the content distribution system 102 to obtain cache content corresponding to the cache event, and sends a request to the authorization system 103 to obtain a license certificate corresponding to the cache content in the process of obtaining the cache content, and meanwhile, the cache content and the license certificate are stored to a local path, so that the user can perform offline playing conveniently; after receiving the play event, the content output module 1013 calls the local cache content corresponding to the play event from the local path based on the play event and sends the local cache content to the player, and renders and plays the local cache content after acquiring the license of the local cache content, so that the problem that the request for the local cache content and the request for the license require that the terminal system 101 must access the internet in the existing DRM play flow can be solved, and the DRM-protected local cache content can be normally played when the terminal system 101 cannot access the internet.
As shown in fig. 2, fig. 2 is a flowchart of an audio and video offline playing method provided by an embodiment of the present invention. The method specifically comprises the following steps:
201. the terminal system receives the cache event, a content downloading module of the terminal system starts a downloading task, acquires the cache content corresponding to the cache event called by the content distribution system, acquires the license certificate corresponding to the cache content after the authorization system verifies, and stores the license certificate to the local path.
The terminal system may be a system operated by a terminal used by a user, and the content distribution system may return the cache content to the terminal system. The terminal may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), a laptop, and the like.
The above-mentioned cache event may be an event triggered by a User at a UI (User Interface) layer, and represents that the User needs to download the selected audio/video in an offline condition, for example: in the audio and video content with copyright protection by the Widevine DRM, the user triggers the A video to be cached. After capturing a cache event triggered by a user through timing or real-time detection, an application module in a terminal System starts to communicate with a CMS (Content Management System) background, queries and obtains attribute information related to the cache event, and stores the attribute information in a local path. The application module may be application software (APP) of the terminal, for example: a recorder, a video player, etc.
The related attribute information may include the above-described cache content and a license certificate corresponding to the cache content. The cache content may refer to a specific piece of content corresponding to a cache event triggered by a user, for example: a piece of video, a piece of audio, or a piece of audiovisual. The license certificate may be a pass that needs to be downloaded to the local path in advance. When a user triggers a playing event, the content corresponding to the playing event triggered by the user can be played under the condition of obtaining the license certificate, otherwise, the content has no authority.
202. Receiving a playing event, acquiring local cache content cached in a local path and a license corresponding to the local cache content according to the playing event, and replacing the domain names of the local cache content and the license and then transmitting the domain names into a player in the terminal system.
Wherein, the playing event may be an event of the DRM content offline playing initiated by the user at the user interface. The domain name is the name of a computer or a group of computers (terminals) on the internet, which is composed of a string of names separated by dots, and the main function of the domain name is to facilitate people to access the internet and know the name and the nature of an address organization through the domain name. The player can be application software supporting offline audio and video playing.
Specifically, after capturing a play event triggered by a user, the APP may extract the cached content and the license credential that have been cached in the local path. The cache content includes content address information, and the license certificate includes key address information. After the content address information and the key address information are extracted, the domain names of the content address information and the key address information can be replaced by the local address localhost, and then the content address information and the key address information with the domain names replaced by the local address localhost are sent to the player. The localhost is also the address of the content output module.
203. And the player requests the local cache content from a content output module in the terminal system according to the local cache content after the domain name is replaced and the license certificate, and decrypts and plays the local cache content.
After the player creates a playing session, a request can be sent to the content output module according to the content address information of which the domain name is replaced by localhost, and the pre-stored local cache content is obtained, wherein the cache content comprises the local cache content. In the process of obtaining the local cache content, the player needs to replace the address information of the key of localhost with the address information of the domain name to send the domain name to the content output module to obtain a corresponding index file, then requests a license from the content decryption module according to the index file, and the player can decrypt the local cache content according to the license and then perform rendering and playing.
In the embodiment of the invention, a terminal system mainly aims at the realization process of off-line playing of audio and video contents under the protection of the Windows DRM copyright, and compared with on-line playing, a content downloading module and a content output module are added, when a user triggers a cache event, the content downloading module starts a downloading task to send a request to a content distribution system to obtain cache contents corresponding to the cache event, and sends the request to an authorization system to obtain a license certificate corresponding to the cache contents in the process of obtaining the cache contents, and simultaneously stores the cache contents and the license certificate to a local path, thereby facilitating the off-line playing of the user; after receiving the playing event, the content output module calls the corresponding local cache content from the local path based on the playing event and sends the local cache content to the player, and the local cache content is rendered and played after the license of the local cache content is obtained, so that the problem that the terminal system is required to access the internet when the terminal system requests the local cache content and the license, and the local cache content protected by the DRM can be normally played when the terminal system cannot access the internet in the existing DRM playing flow.
Referring to fig. 3a, fig. 3a is a flowchart of another audio/video offline playing method provided by the embodiment of the present invention, which specifically includes the following steps:
301. and an application module of the terminal system captures a cache event triggered by a user and inquires content address information and secret key address information of cache contents.
After capturing a user trigger event, the APP judges the type of the event, and identifies whether the event is a cache event. The user-triggered events may also include a pause event, a delete event, and the like. The user triggered cache event may include the cache content that the user needs to cache. The user triggered cache event may specifically be a click on a certain item in the screen or a click on a certain item through a tool such as a button or a mouse.
After receiving the cache event, the application module checks the cache content, and searches for relevant attribute information such as content address information (key URL address) and key address information (resource URL address) of the cache content in the system. The content address information may represent address information where the cache content triggered by the user is located, and the key address information may represent information of the license certificate that needs to be acquired when the user downloads the cache content.
Wherein, the key URL address:
https://www.cloud-license.com/getlicensecontentid=2CA231D6D6134239AF72300D816FEB41&keyid=c34b8a09-a789-5242-9045-80faff2488c2
resource URL address:
https://www.cloud-front.com/vod/2CA231D6D6134239AF72300D816FEB41/manifest.mpd
the URL is a compact representation of the location and access method of a resource available from the internet, and is the address of a standard resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it.
302. And constructing a downloading content request according to the cache content to send to a content downloading module of the terminal system, and transmitting content address information and key address information.
The APP can construct a downloading content request after judging that the cache event occurs, and sends the downloading content request to the content downloading module, and the content downloading module is informed to execute a downloading task, wherein the downloading content request comprises cache content. After the APP obtains the relevant address, the APP sends an instruction to the content downloading module, and a secret key URL address and a content URL address are transmitted.
303. The content downloading module creates a task of downloading the cache content and a task of downloading the license certificate according to the content downloading request.
After receiving the request for downloading the content, the content downloading module can respectively create a task of downloading the cached content and a task of downloading the license certificate, and the tasks are executed through two threads. The task of downloading the cache content can be responsible for downloading the cache content and saving the cache content to the local path, and the task of downloading the license certificate can be responsible for downloading the license certificate corresponding to the cache content and saving the license certificate to the local path.
304. The content downloading module starts a content downloading thread, downloads the cache content to the local path according to the content address information based on the task of downloading the cache content, starts a certificate downloading thread at the same time, and downloads the certificate and the license certificate to the local path according to the content address information and the secret key address information based on the task of downloading the license certificate.
The content downloading thread may be a thread for downloading cache content. After the task of downloading the cache content is started, the cache content can be located at the position of the cache content according to the content URL address, and the cache content is downloaded and stored in a local path.
The above-mentioned certificate downloading thread may be a thread for downloading a license certificate, and after starting the task of downloading the license certificate, the license certificate downloading thread may first request the content distribution system for information such as an index file according to the URL address of the content, and then generate a request for obtaining the license certificate, and send the generated request for obtaining the license certificate to the authorization system according to the URL address of the key, so as to obtain the license certificate. And downloading the license certificate corresponding to the cache event to a local path, namely downloading the license certificate corresponding to the cache content to the local path according to the task of downloading the license certificate.
The above-mentioned content distribution system domain name address: com www.cloud-front
Authority system domain name address: com www.cloud-license
Terminal system content output module address: localhost
305. Receiving a playing event, acquiring local cache content cached in a local path and a license corresponding to the local cache content according to the playing event, and replacing the domain names of the local cache content and the license and then transmitting the domain names into a player in the terminal system.
306. And the player requests the local cache content from a content output module in the terminal system according to the local cache content after the domain name is replaced and the license certificate, and decrypts and plays the local cache content.
Optionally, referring to fig. 3b, fig. 3b is a flowchart of a cache content downloading phase according to an embodiment of the present invention. The step 304 includes:
and the content downloading module starts a content downloading thread and sends a request for acquiring the content index file to the content distribution system according to the content address information contained in the cache content.
The APP captures a cache event triggered by a user, starts to communicate with a CMS (Content Management System) background, and queries Content address information (resource URL address) of cache Content. And sending a command of downloading a cache content task to the content downloading module according to the content address information acquired by the APP, and starting a content downloading thread by the content downloading module. Firstly, a request for obtaining the content index file is sent to a content distribution system according to the provided content address information, and the content index file is obtained.
The content downloading module receives a content index file returned by the content distribution system, stores the content index file to a local path, and analyzes the content index file to obtain a plurality of fragment files and paths corresponding to the fragment files.
The method comprises the steps of obtaining a content index file, storing the content index file in a local path, analyzing the content index file, obtaining a relative path pointing to an audio/video file in the content index file, and constructing download addresses of all the audio/video files. The analyzed relative path of the audio/video file is as follows:
audio files: mp 4. audio/audio _1_ dash _ audio
Video files: video/720P _ dash _ video. mp4
The fragment file may include an audio file and a video file, and the parsing of the content index file to form a plurality of fragment files may refer to dividing a complete file into a plurality of fragment files according to different file types, for example: the audio and video file B is decomposed into an audio file B1 and a video file B2.
And constructing the downloading address information of the fragment files according to the analyzed path, and sequentially downloading the fragment files to cache the fragment files to a local path, wherein the code rate contents corresponding to the plurality of fragment files are different.
The audio and video file download address information constructed by the method comprises the following steps:
audio file download address:
https://www.cloud-front.com/vod/2CA231D6D6134239AF72300D816FEB41/audio/audio_1_dash_audio.mp4
video file download address:
https://www.cloud-front.com/vod/2CA231D6D6134239AF72300D816FEB41/video/720P_dash_video.mp4
after the audio file download address and the video file download address are obtained, the corresponding fragment files can be downloaded in sequence according to the audio file download address and the video file download address to be stored in a local path.
Optionally, the step 304 further includes:
and the content downloading module starts a certificate downloading thread, requests the content distribution system according to the content address information to obtain a certificate index file corresponding to the cache event, and analyzes to obtain certificate index data in the certificate index file.
The APP captures a cache event triggered by a user, starts to communicate with a CMS (Content Management System) background, queries key address information (a key URL address) of cache Content, and after acquiring a Content URL address and a key URL address, the APP transmits the Content to a Content download module, and the Content download module requests a certificate index file from a Content distribution System according to the Content URL address, where the Content index file and the certificate index file may be the same as shown below:
Figure BDA0002677186290000101
Figure BDA0002677186290000111
Figure BDA0002677186290000121
after the certificate index file is obtained, certificate index data (PSSH data) may be extracted by parsing, where the PSSH data may be as follows:
AAAASHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACgiIDJDQTIzMUQ2RDYxMzQyMzlBRjcyMzAwRDgxNkZFQjQxSOPclZsG
and sending a key acquisition request to a content decryption module in the terminal system according to the certificate index data, and receiving a first message body which is returned by the content decryption module and corresponds to the key request, wherein the key acquisition request comprises key address information.
The content downloading module may call a CDM (data copy management) interface with PSSH data as a parameter, send a request for obtaining a key certificate to the content decryption module, and after receiving a message of the request for obtaining the key, the content decryption module constructs a first message body and returns the first message body to the content downloading module, where the first message body is as follows:
CAES8QwKjAwIARLtCQqwAggCEhBWkK0gHumpnVjzS9yAeX+zGJj4mvUFIo4CMIIBCgKCAQEAtidICkTCFnBrkU/ek9ozztKcn1bm1fUE6cr98LKiGOBNzUc1zie4mKZtGJYz+k9uUh3DAGu/u5dlt/77HvK5YAwkxXliyd+g/ClPyFgPx1VRFU0T8qt6xBr1XIGHu9UCaCu7E/0BqLrUMRq+xKYjJ+5c1FUANyawQqvRwPztmj8SxQy9ohp3 VqSlff0eKpfJBuhrLT2ooWEao2D+/NXx2n9n3 VUt4962MFzWA835r0uuBKxwQv8OWKMhAzst3dwoVUnqHjR35NueLGZSkwLipV59K071K9WaY41y2dZ4brXbIMUsVROvyf3oSnth1qtswEV1d13qmJB3e/BkLB3v8QIDAQABKOdSSAESgAJBgBrfYzVxkIxriQx1a1yOQbufB9I6081q+yqGTNtY+XjXh4GgVAjeh1mxE82d2v4zYJ536sK1hsdJ16aTLjAElzeN8ydmMXwi9AcuX9ST4+GytJEVrDmVK6/6B1ofMC9Yzaj0S7YCZBJVhJaL50g54Ge5sOMMoQYiV2x8rvPnD5zdbgen4pr9D/HHPCYt+tShyD2rNBDAiTL5fgMDVrFN3ACkPzmGKZRyLH9FQUZ2So+OzowC3Bp25owM/pOpUgvJUjWfTtCLa1ONOX1ka+TzaE5XBFkIrhv1mz9exqSjEy4ww3b3az+OLRwYjsa80VGE7s1cimih4vCBCA2LO5Y+GrQFCq4CCAESEBYqfTcoKCRunK91bi6Ps30Y3JmE3AUijgIwggEKAoIBAQCSCVIo/ssHMQ534GbiCZ/3OGc9JOJK+1h1yPyEfDXNh7vrCLjzo9OGEQpaCh6LrKot/ffXhzRfM5RmeOwDjpi2B0kY3BWE6CedfNjdeJ+rJnrTX4gUfK6f6bE/idtpWy79apCnvq3L/1ujw6Ht3GUdAO1v2dHHImECOJ/mnN2cV627dHi3ASrtadKYj/7vMgBPkFXH+MMPQr6JCtseqJziL64G4tuT2XSMmN9yEM7+k0BFFqjmd8d0Kro18AHmxBwwuL6+mPAeZewEKTf7YH6oy9vqf5h1K7vfs16s0H8XVAwzISLvwks86AIDkufR6g4UP59MOV5buS5q5DGWdvHtAgMBAAEo51ISgAMDSWjmeqti/5Pqgro15pMwwoyMQFrPXnRZK9x9HnjaLiJTrN0HqgWDvxgHhMPO8Cxe+Gjj19CbjB4M8y189USJMqxLHQky9vSTw5qXQughmePuG+ullmaqn0HVjkqeXzEcmvEYTLdfI7C1ltvj0XLC+lXanns7kBkpKsiLMZUUUmmW6WYMASmqTWiEZl+Cwg81+6v8V56712TeiLsxk0m+2IQYshJ5F6y8gp8uhOCA0e9M0KyZyyWTT7WcLYmHW/Dvr5XHK9aB7QyZMq1dPJUbnpuVBaCNsPLCvD1zJ5KwFBBiWhfID2+vMf7ZOk7u4CYl2hHwGsrqkq8VQFMKF1LKjHbFmoMd/HUfTC9i9/jH0CVZCMaE05H+iyuZzB8SL1/WwfAOb0xMJfmxnq9EbIRrXGgsNIUOKgokeStpfIDEEP3JbjdbMwmFcnd++RrjFGwwnlQAewekGs67t8nzCQ8dYDKU47rAkySbLzP/SIHRXqjuG4njywegaKq5GSoVdPn8aFAoMY29tcGFueV9uYW1lEgRTRE1DGhQKCm1vZGVsX25hbWUSBkRWODIyMBogChFhcmNoaXRlY3R1cmVfbmFtZRILYXJtZWFiaS12N2EaFQoLZGV2aWN1X25hbWUSBkRWODIyMBoWCgxwcm9kdWN0X25hbWUSBk9UVFNUQho/CgpidW1sZF9pbmZvEjFWT08vT1RUU1RCL0RWODIyMDo5L1BJLzIwMTkwODIyOnVzZXIvcmVsZWFzZS1rZXlzGh4KFHdpZGV2aW51X2NkbV92ZXJzaW9uEgYxNC4wLjAaJAofb2VtX2NyeXB0b19zZWN1cml0eV9wYXRjaF9sZXZlbBIBMzIUEAEgASgOMAE4AEAASABIAVABWAASUApOCigiIEI2MTJGRTVEMTM1MzQxODQ5Q0I2MzZCMzBDQ0U4NzVFSOPclZsGEAEaIDcxQUEwQjQxM0VBQTQ3ODUyRDAwMDAwMDAwMDAwMDAwGAEgkbvI9QUwFTicuM71CRqAAh+LwLoeZKmNFtMS/vq3HKbc1E7aesBGqbOn0BxbJOHec3wxb9RPLry9LCEj8d/x1v6RQYpJa3OR6uPoHQnjIXN4Z7rdmtvIubUA/DB8ys5O4d0TNPLPrb+b8Vp6xgCERbi8lSho11P5HD1A4rQuYIQ1NvDeGATdbxbV/TpZS0OKAwkjkvBToh7U4VHOORMLfjQvgdtoDloQ4cESX7NavV11eyaswwM8MBWkgWRMcilAsZY+bISUROKfLF0b3//M4RRODjQHlFYjXqOOWgfsRw5Cf3dvSzhHYb2/xUV91Kkgme4BIU2MUcFCU8f7IO9CIWlDZXjik7OXxFEs4yuYjog=
and based on the first message body, sending a license certificate request to the authorization system, and receiving a license certificate returned by the authorization system to store the license certificate to a local path, wherein the license certificate comprises key address information.
Wherein, the domain name address of the authorization system: com, www.cloud-license. After the CDM interface calls and returns, the certificate downloading thread sends a license certificate request to the authorization system in the form of HTTP POST by the first message body returned by the CDM interface, and requests to acquire a license certificate. The authorization system verifies the license request, and under the condition that the license request passes the verification, the authorization system inquires the license according to the address information of the secret key and returns the license to the content downloading module, wherein the data of the license is as follows:
CAIS6QUKSgogNzFBQTBCNDEzRUFBNDc4NTJEMDAwMDAwMDAwMDAwMDASIDcxQUEwQjQxM0VBQTQ3ODUyRDAwMDAwMDAwMDAwMDAwGgAgASgAEgYIARABGAEaZhIQ9K33mYphoej5tUOsx5pq1RpQ9XIqarIyTpODSIOe/sWpEhDzQmNpOW1n3cbk37s+QbsJzIs6TdxI/YrQZkMXynyfOa1ql2dwgoWw9PByxrxtBX6sgmVEEqr7y2aWjwL86dogARqGAQoQ5nKeqydyWWGF7vGk7b35NhIQnYvByxK91Vo6PApl31IW0xogakOPMC2kl8aoxWmfk0LkwnaAaSOWSqrUErtcYsVoRjUgAigBQjQKIHH50mj3PVAvO9IY9JqxCoZKIsFhyU/COw15e2s/v7gOEhDYGIkk+3vDahBsEDu4P7M8YgRVSEQxGoQBChAi5PguUVtSX5+OL3fdV4ayEhAkZZpMz0FBAcUMMFq6DjgjGiBtublzDqr23gDnK5d22By1Hsf/ZJYuMhoG2QPEDOKEHiACKAFCNAogpudF5KU3fc7auE+1mq7BgznabF9O0Ar9aKRmfpM1qb8SEBqLONC9OL+pXiC65rBnzNdiAkhEGoQBChDNehU7ROFQxoxcz3hnSNm2EhB7VF2s/5coVqVj79cHkZqQGiAZzmdkKeXoA8zI4R5doLwXX6dB116a5iKIs2O6K3dJQCACKAFCNAog3c16KDII2x7l8+f9EcmQUBpKhA2/HNzKHM02tP9lKp0SEIlwTjXNvaLLE08Dqw54dt5iAlNEGocBChCXeDajfXtRqpUXECxALrxnEhAqm/ANaF97yyIX2308MNrxGiAFCCGZx+1i9oOcqMTtzjYfIw4w/WNjobxIxArx5AOilyACKAFCNAogdu0iWZ+TItMdcKEJYIvHu+g3vfGAroopTWiRoihb/i0SED6qfhZAZXq6sNDztaFKn8diBUFVRElPIJG7yPUFOOPclZsGGiDSfXTySe1tiLrTOky+6Tv/zVHsZL9i/g6KRp2/0dQw4CKAAqaPGEMWBGce0a2/IB0T5Xc7mCK9eu+81PRVk7iq81GnA0seIoYaMBBTQp3yXS1wjjoep6fS947q/nxIhZPu/CTvR4j+UlaIgE+JuKWJdySBxs+9RI04yHYxEzBqC8cZ4B1hQA52Ope3S7uUISGwGoK6xpay9sNmPnDfYFvFW3jODERUhsOkgACU7Km+IHGHH18pHtigS++7jm0PsGol03KUJR4g3I2yqs3wTAOetCtpdC96/YLU/yjU2XZTG8kMsPyaF4wUXOr5VzZ/fmi3S/BrquHaf3RPmtK49P0heE7IvbZWHoP0DvuApcjbstJ9QQ738b2o2GrPNfMvpo0aAL46MwoxMTUuMC4xIEJ1aWx0IG9uIEZlYiAxNyAyMDIwIDIwOjM5OjU3ICgxNTgyMDAwNzk3KQ==
after the certificate downloading thread receives the returned license data, the license data can be stored in a local trusted Environment Path (TEP for short), and the TEP Path is a local secure storage Path.
In the embodiment of the invention, a terminal system mainly aims at the realization process of off-line playing of audio and video contents under the protection of the Windows DRM copyright, and is additionally provided with a content downloading module and a content output module compared with on-line playing. And after receiving the playing event, the content output module calls the corresponding local cache content from the local path based on the playing event and sends the local cache content to the player, and the content output module requests the local cache content after replacing the domain name with the local domain name by acquiring the content address information and the key address information of the local cache content. Therefore, the DRM-protected local cache content can be normally played when the terminal system cannot access the Internet, and the problem that the terminal system is required to access the Internet when the local cache content is requested and the license certificate is requested in the existing DRM playing process can be solved.
Referring to fig. 4a, fig. 4a is a flowchart of another audio/video offline playing method provided by the embodiment of the present invention, which specifically includes the following steps:
401. the terminal system receives the cache event, a content downloading module of the terminal system starts a downloading task, acquires the cache content corresponding to the cache event called by the content distribution system, acquires the license certificate corresponding to the cache content after the authorization system verifies, and stores the license certificate to the local path.
402. And receiving a playing event, capturing the playing event through an application module of the terminal system, and calling content address information of the local cache content and key address information corresponding to the local cache content from the local path.
The user initiates a DRM content offline play request to trigger a play event, and the APP can capture the play event and then call the content URL address and the key URL address that have been cached in the local path.
403. And replacing the domain names of the content address information and the key address information with local addresses, and sending the domain names to the player.
Referring to fig. 4b, fig. 4b is a flowchart of a cache content playing stage according to an embodiment of the present invention. The domain name parts of the content URL address and the key URL address are positioned, and the domain name parts are replaced by the domain name localhost of the local path. And starting the player, and sending the content URL address and the key URL address with the domain name of localhost to the player after the player is initialized.
The content URL address and the key URL address with the substitute domain name localhost are as follows:
key URL address:
https://localhost/getlicensecontentid=2CA231D6D6134239AF72300D816FEB41&keyid=c34b8a09-a789-5242-9045-80faff2488c2
content URL address:
https://localhost/vod/2CA231D6D6134239AF72300D816FEB41/manifest.mpd
404. the player creates a playing session according to the content address information of which the domain name is replaced by the local address, and requests the content output module for an index file.
After receiving the resource address key address, the player creates a playing session, requests an index file from a local content output module by using the incoming content URL address, and the content output module returns the content of the locally cached index file.
405. And analyzing the index file returned by the content output module to extract certificate index data, and initiating a request for obtaining the secret key to the content decryption module according to the certificate index data.
After receiving the index file, the player analyzes the index file, extracts PSSH data, and accordingly initiates a request for obtaining a secret key to the content decryption module.
406. And after the second message body corresponding to the request for obtaining the secret key is returned by the content decryption module, sending a request for obtaining the license certificate to the content output module according to the secret key address information of which the domain name is replaced by the local address.
Wherein, the content decryption module is requested to construct a second message body) (key request message body), and the second message body is returned to the player. And initiating a license certificate acquisition request through an HTTP POST method according to the content URL address and the key URL address with the domain name of localhost.
407. And the player acquires the local cache content from the content output module according to the license certificate corresponding to the license certificate request returned by the content output module.
408. And decrypting the local cache content according to the license certificate returned by the content output module, and then rendering and playing.
After receiving the license acquisition request, the content output module returns the locally cached license. After receiving the license, the player starts to construct the download address information of the fragment file, and then initiates a request for acquiring the fragment file to the content output module. And after receiving the request for acquiring the fragment file, the content output module reads the fragment file from the local cache according to the downloading address information and returns the fragment file to the player. And after receiving the fragment file, the player decrypts the encrypted audio and video media data according to the license certificate and outputs, renders and plays the encrypted audio and video media data.
In the embodiment of the invention, after a playing event is received, the playing event is captured through an application module, content address information and secret key address information of local cache content are called from a local path, a domain name of the local cache content is replaced by a local domain name and is sent to a player, the player requests an index file from a content output module, a license certificate is requested from a content decryption module according to certificate index data analyzed from the index file, the local cache content is analyzed after a license book is obtained, so that the local cache content protected by DRM can be normally played when a terminal system cannot access the Internet, and the problem that the terminal system needs to access the Internet when the local cache content and the license certificate are requested in the existing DRM playing flow can be solved.
As shown in fig. 5, fig. 5 is a schematic structural diagram of an audio/video offline playing apparatus provided in an embodiment of the present invention, where the apparatus 500 includes:
the downloading module 501 is used for the terminal system to receive the cache event, the content downloading module of the terminal system starts a downloading task, obtains the cache content corresponding to the cache event called by the content distribution system, obtains the license certificate corresponding to the cache content after the authorization system verifies, and stores the license certificate to the local path;
an obtaining module 502, configured to receive a play event, obtain, according to the play event, local cache content cached in a local path and a license corresponding to the local cache content, replace a domain name of the local cache content and the license, and then transmit the domain name to a player in the terminal system;
the playing module 503 is configured to request the local cache content from the content output module in the terminal system according to the local cache content after the domain name replacement and the license certificate, and decrypt and play the local cache content.
Optionally, as shown in fig. 6, fig. 6 is a schematic structural diagram of another audio/video offline playing apparatus provided in the embodiment of the present invention, and the downloading module 501 includes:
the receiving unit 5011 is configured to capture a cache event triggered by a user by an application module of a terminal system, and query content address information and key address information of cache content;
the capturing unit 5012 is configured to construct a content downloading request according to the cached content to be sent to a content downloading module of the terminal system, and to transmit content address information and key address information;
a task creating unit 5013, configured to create a task of downloading cached content and a task of downloading a license certificate according to the content downloading request by the content downloading module;
the downloading unit 5014 is configured to start a content downloading thread by the content downloading module, download the cached content to the local path according to the content address information based on the task of downloading the cached content, start a certificate downloading thread at the same time, and download the certificate and the license certificate to the local path according to the content address information and the key address information based on the task of downloading the license certificate.
Optionally, as shown in fig. 7, fig. 7 is a schematic structural diagram of another audio/video offline playing apparatus provided in the embodiment of the present invention, and the downloading unit 5014 includes:
a first sending subunit 50141, configured to start a content downloading thread by the content downloading module, and send a request for obtaining a content index file to the content distribution system according to content address information included in the cached content;
the parsing subunit 50142 is configured to receive, by the content downloading module, the content index file returned by the content distribution system, store the content index file in a local path, and parse the content index file to obtain a plurality of fragment files and paths corresponding to the plurality of fragment files;
the first downloading subunit 50143 is configured to construct downloading address information of the fragment file according to the parsed path, and sequentially download the fragment file to cache the fragment file to the local path, where the content of the code rate corresponding to the plurality of fragment files is different.
Optionally, as shown in fig. 8, fig. 8 is a schematic structural diagram of another audio/video offline playing apparatus provided in the embodiment of the present invention, and the downloading unit 5014 further includes:
a second sending subunit 50144, configured to start a certificate downloading thread, request the content distribution system according to the content address information to obtain a certificate index file corresponding to the cache event, and analyze the certificate index file to obtain certificate index data in the certificate index file;
the receiving subunit 50145 is configured to send an acquire key request to the content decryption module in the terminal system according to the certificate index data, and receive a first message body corresponding to the key request and returned by the content decryption module, where the acquire key request includes key address information;
the saving subunit 50146 is configured to send a license credential request to the authorization system based on the first message body, and receive a license credential returned by the authorization system to save to the local path, where the license credential includes key address information.
Optionally, as shown in fig. 9, fig. 9 is a schematic structural diagram of another audio/video offline playing apparatus provided in the embodiment of the present invention, and the obtaining module 502 includes:
the extracting unit 5021 is configured to capture a play event through an application module of the terminal system, and retrieve content address information of the local cache content and key address information corresponding to the local cache content from the local path;
a replacing unit 5022, configured to replace the domain name of the content address information and the key address information with a local address, and send the local address to the player.
Optionally, as shown in fig. 10, fig. 10 is a schematic structural diagram of another audio/video offline playing apparatus provided in the embodiment of the present invention, where the playing module 503 includes:
a creating unit 5031, configured to create, by the player, a playing session according to the content address information that the domain name has been replaced with the local address, and request an index file from the content output module;
the parsing unit 5032 is configured to parse the index file returned by the content output module to extract certificate index data, and initiate a request for obtaining a key to the content decryption module according to the certificate index data;
a sending unit 5033, configured to, after receiving that the content decryption module returns the second message body corresponding to the request for obtaining the key, send a request for obtaining a license certificate to the content output module according to the key address information that the domain name has been replaced with the local address;
an obtaining unit 5034, configured to, according to the license certificate corresponding to the license certificate request returned by the content output module, obtain the local cache content from the content output module by the player;
a playing unit 5035, configured to perform rendering playing after decrypting the local cache content according to the license credential returned by the content output module.
As shown in fig. 11, fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 1100 includes: the device comprises a memory 1102, a processor 1101, a network interface 1103 and a computer program which is stored in the memory 1102 and can run on the processor 1101, wherein the processor 1101 executes the computer program to realize the steps in the audio and video offline playing method provided by the embodiment.
Specifically, the processor 1101 is configured to perform the following steps:
the terminal system receives the cache event, a content downloading module of the terminal system starts a downloading task, acquires the cache content corresponding to the cache event called by the content distribution system, acquires the license certificate corresponding to the cache content after the authorization system verifies, and stores the license certificate to a local path;
receiving a playing event, acquiring local cache content cached in a local path and a license corresponding to the local cache content according to the playing event, and replacing domain names of the local cache content and the license and then transmitting the domain names into a player in a terminal system;
and the player requests the local cache content from a content output module in the terminal system according to the local cache content after the domain name is replaced and the license certificate, and decrypts and plays the local cache content.
Optionally, the steps that the terminal system executed by the processor 1101 receives the cache event, the content download module of the terminal system starts a download task, the content distribution system is obtained to call the cache content corresponding to the cache event, the license certificate corresponding to the cache content after the authorization system is verified is obtained, and the license certificate is stored in the local path include:
an application module of the terminal system captures a cache event triggered by a user, and inquires content address information and secret key address information of cache content;
constructing a downloading content request according to the cache content to send to a content downloading module of the terminal system, and transmitting content address information and secret key address information, and transmitting the content address information and the secret key address information;
the content downloading module creates a task of downloading cache content and a task of downloading a license certificate according to the content downloading request;
the content downloading module starts a content downloading thread, downloads the cache content to the local path according to the content address information based on the task of downloading the cache content, starts a certificate downloading thread at the same time, and downloads the certificate and the license certificate to the local path according to the content address information and the secret key address information based on the task of downloading the license certificate.
Optionally, the step of starting a content downloading thread by a content downloading module executed by the processor 1101, and downloading the cache content to the local path according to the content address information based on the task of downloading the cache content, includes:
the content downloading module starts a content downloading thread and sends a request for acquiring a content index file to a content distribution system according to content address information contained in the cache content;
the content downloading module receives a content index file returned by the content distribution system, stores the content index file to a local path, and analyzes the content index file to obtain a plurality of fragment files and paths corresponding to the fragment files;
and constructing the downloading address information of the fragment files according to the analyzed path, and sequentially downloading the fragment files to cache the fragment files to a local path, wherein the code rate contents corresponding to the plurality of fragment files are different.
Optionally, the step of starting a certificate downloading thread executed by the processor 1101, downloading the license certificate and the starting certificate to the local path according to the content address information and the key address information based on the task of downloading the license certificate, includes:
the content downloading module starts a certificate downloading thread, requests a content distribution system according to the content address information to obtain a certificate index file corresponding to the cache event, and analyzes the certificate index file to obtain certificate index data in the certificate index file;
sending a key acquisition request to a content decryption module in the terminal system according to the certificate index data, and receiving a first message body which is returned by the content decryption module and corresponds to the key request, wherein the key acquisition request comprises key address information;
and based on the first message body, sending a license certificate request to the authorization system, and receiving a license certificate returned by the authorization system to store the license certificate to a local path, wherein the license certificate comprises key address information.
Optionally, the step executed by the processor 1101, of obtaining the local cache content cached in the local path and the license certificate corresponding to the local cache content according to the play event, and transferring the local cache content and the domain name of the license certificate into the player in the terminal system after replacing the domain name, includes:
capturing a playing event through an application module of a terminal system, and calling content address information of local cache content and key address information corresponding to the local cache content from a local path;
and replacing the domain names of the content address information and the key address information with local addresses, and sending the domain names to the player.
Optionally, the step of requesting, by the player executed by the processor 1101, the local cache content from the content output module in the terminal system according to the local cache content after the domain name replacement and the license certificate, and decrypting and playing the local cache content includes:
the player creates a playing session according to the content address information of which the domain name is replaced by the local address, and requests an index file from a content output module;
analyzing the index file returned by the content output module to extract certificate index data, and initiating a request for obtaining a secret key to the content decryption module according to the certificate index data;
after a second message body corresponding to the key acquisition request returned by the content decryption module is received, a license acquisition request is sent to the content output module according to the key address information of which the domain name is replaced by the local address;
the player acquires local cache content from the content output module according to the license certificate corresponding to the license certificate request returned by the content output module;
and decrypting the local cache content according to the license certificate returned by the content output module, and then rendering and playing.
The electronic device 1100 provided by the embodiment of the present invention can implement each implementation manner in the audio/video offline playing method embodiment and corresponding beneficial effects, and for avoiding repetition, details are not repeated here.
It is noted that only 1101-1103 with components are shown, but it is understood that not all of the shown components are required and that more or fewer components may alternatively be implemented. As will be understood by those skilled in the art, the electronic device 1100 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device 1100 may be a computing device such as a desktop computer, a notebook, or a palmtop computer. The electronic device 1100 may interact with a user through a keyboard, mouse, remote control, touch pad, voice control device, or the like.
The memory 1102 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 1102 may be an internal storage unit of the electronic device 1100, such as a hard disk or a memory of the electronic device 1100. In other embodiments, the memory 1102 may also be an external storage device of the electronic device 1100, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the electronic device 1100. Of course, the memory 1102 may also include both internal and external memory units of the electronic device 1100. In this embodiment, the memory 1102 is generally configured to store an operating system installed in the electronic device 1100 and various application software, such as a program code of an audio/video offline playing method. In addition, the memory 1102 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 1101 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 1101 is typically used to control the overall operation of the electronic device 1100. In this embodiment, the processor 1101 is configured to execute the program code stored in the memory 1102 or process data, for example, execute a program code of an audio/video offline playing method.
The network interface 1103 may include a wireless network interface or a wired network interface, and the network interface 1103 is typically used to establish communication connections between the electronic device 1100 and other electronic devices.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by the processor 1101, the computer program implements each process in the audio/video offline playing method provided in the embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It can be understood by those skilled in the art that all or part of the processes in the method for playing an audio and video offline according to the embodiments may be implemented by instructing the relevant hardware through a computer program, where the program may be stored in a computer-readable storage medium, and when executed, the program may include processes such as the processes of the embodiments of the methods. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. An audio and video offline playing method is characterized by comprising the following steps:
a terminal system receives a cache event, a content downloading module of the terminal system starts a downloading task, acquires a cache content which is called by a content distribution system and corresponds to the cache event, acquires a license certificate which corresponds to the cache content after being verified by an authorization system, and stores the license certificate to a local path;
receiving a playing event, acquiring local cache content cached in the local path and a license corresponding to the local cache content according to the playing event, and replacing domain names of the local cache content and the license and then transmitting the domain names into a player in the terminal system;
and the player requests the local cache content from a content output module in the terminal system according to the local cache content after the domain name is replaced and the license certificate, and decrypts and plays the local cache content.
2. The method of claim 1, wherein the terminal system receives the cache event, the content download module of the terminal system starts a download task, obtains the cache content corresponding to the cache event called by the content distribution system, and obtains the license certificate corresponding to the cache content after the authorization system verifies, and stores the license certificate in the local path, the steps comprising:
an application module of the terminal system captures the cache event triggered by a user and inquires content address information and secret key address information of the cache content;
constructing a downloading content request according to the cache content to send to the content downloading module of the terminal system, transmitting the content address information and the key address information, and transmitting the content address information and the key address information;
the content downloading module creates a task of downloading cache content and a task of downloading a license certificate according to the downloading content request;
and the content downloading module starts a content downloading thread, downloads the cache content to a local path according to the content address information based on the task of downloading the cache content, starts a certificate downloading thread at the same time, and downloads the license certificate to the local path according to the content address information and the secret key address information based on the task of downloading the license certificate.
3. The method of claim 2, wherein the content download module starts a content download thread, and the step of downloading the cache content to a local path according to the content address information based on the task of downloading the cache content comprises:
the content downloading module starts a content downloading thread and sends a request for acquiring a content index file to the content distribution system according to content address information contained in the cache content;
the content downloading module receives the content index file returned by the content distribution system, stores the content index file to a local path, and analyzes the content index file to obtain a plurality of fragment files and paths corresponding to the fragment files;
and constructing the downloading address information of the fragment file according to the analyzed path, and sequentially downloading the fragment file to cache the fragment file to a local path.
4. The method of claim 3, wherein the initiating a certificate download thread, downloading the license certificate to a local path based on the download license certificate task according to the content address information and the key address information, comprises:
the content downloading module starts a certificate downloading thread, requests the content distribution system according to the content address information to obtain a certificate index file corresponding to the cache event, and analyzes the certificate index file to obtain certificate index data in the certificate index file;
sending a key obtaining request to a content decryption module in the terminal system according to the certificate index data, and receiving a first message body which is returned by the content decryption module and corresponds to the key request, wherein the key obtaining request comprises the key address information;
and sending a license certificate request to the authorization system based on the first message body, and receiving the license certificate returned by the authorization system to be stored to the local path, wherein the license certificate comprises key address information.
5. The method according to claim 4, wherein the step of obtaining local cache content cached in the local path and a license credential corresponding to the local cache content according to the play event, and transferring the local cache content and the domain name of the license credential into the player in the terminal system after replacing them comprises:
capturing the playing event through the application module of the terminal system, and calling the content address information of local cache content and the key address information corresponding to the local cache content from the local path;
and replacing the domain names of the content address information and the key address information with local addresses, and sending the domain names to the player.
6. The method according to claim 5, wherein the step of requesting the local cache content from a content output module in the terminal system by the player according to the local cache content after the domain name has been replaced and the license certificate, and decrypting and playing the local cache content comprises:
the player creates a playing session according to the content address information of which the domain name is replaced by the local address, and requests the index file from the content output module;
analyzing the index file returned by the content output module to extract certificate index data, and initiating a key acquisition request to the content decryption module according to the certificate index data;
after receiving a second message body corresponding to the key acquisition request returned by the content decryption module, sending a license acquisition request to the content output module according to the key address information of which the domain name is replaced by the local address;
the player acquires the local cache content from the content output module according to the license certificate corresponding to the license certificate request returned by the content output module;
and decrypting the local cache content according to the license certificate returned by the content output module and then rendering and playing the decrypted local cache content.
7. An audio and video offline playing device is characterized by comprising:
the downloading module is used for receiving the cache event by the terminal system, starting a downloading task by the content downloading module of the terminal system, acquiring cache content corresponding to the cache event and acquired license certificate corresponding to the cache content after the authorization system verifies, and storing the license certificate to a local path;
an obtaining module, configured to receive a play event, obtain, according to the play event, local cache content cached in the local path and a license corresponding to the local cache content, replace a domain name of the local cache content and the license, and then transmit the domain name to a player in the terminal system;
and the playing module is used for requesting the local cache content from a content output module in the terminal system by the player according to the local cache content after the domain name is replaced and the license certificate, and decrypting and playing the local cache content.
8. The apparatus of claim 7, wherein the download module comprises:
the receiving unit is used for capturing the cache event triggered by the user by the application module of the terminal system and inquiring content address information and secret key address information of the cache content;
the capturing unit is used for constructing a downloading content request according to the cache content to send to the content downloading module of the terminal system, and transmitting the content address information and the secret key address information;
the task creating unit is used for creating a task of downloading cache content and a task of downloading a license certificate according to the downloading content request by the content downloading module;
and the downloading unit is used for starting a content downloading thread by the content downloading module, downloading the cache content to a local path according to the content address information based on the task of downloading the cache content, simultaneously starting a certificate downloading thread, and downloading the license certificate to the local path according to the content address information and the secret key address information based on the task of downloading the license certificate.
9. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and operable on the processor, the processor implementing the steps of an audio and video offline playing method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of a method for offline playing audio and video according to any one of claims 1 to 6.
CN202010958079.4A 2020-09-11 2020-09-11 Audio and video offline playing method and device and electronic equipment Pending CN112291617A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010958079.4A CN112291617A (en) 2020-09-11 2020-09-11 Audio and video offline playing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010958079.4A CN112291617A (en) 2020-09-11 2020-09-11 Audio and video offline playing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112291617A true CN112291617A (en) 2021-01-29

Family

ID=74420923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010958079.4A Pending CN112291617A (en) 2020-09-11 2020-09-11 Audio and video offline playing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112291617A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140040412A1 (en) * 2012-07-31 2014-02-06 Apple Inc. Delivering content to electronic devices using local caching servers
CN106507181A (en) * 2016-11-30 2017-03-15 北京酷我科技有限公司 A kind of method for being obtained and stored in line video data
CN108156152A (en) * 2017-12-22 2018-06-12 北京百度网讯科技有限公司 Streaming Media downloads method, apparatus, storage medium and the terminal device with playing
CN109874028A (en) * 2017-12-01 2019-06-11 深圳市雷鸟信息科技有限公司 A kind of playback method, system and the storage medium of HLS Streaming Media

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140040412A1 (en) * 2012-07-31 2014-02-06 Apple Inc. Delivering content to electronic devices using local caching servers
CN106507181A (en) * 2016-11-30 2017-03-15 北京酷我科技有限公司 A kind of method for being obtained and stored in line video data
CN109874028A (en) * 2017-12-01 2019-06-11 深圳市雷鸟信息科技有限公司 A kind of playback method, system and the storage medium of HLS Streaming Media
CN108156152A (en) * 2017-12-22 2018-06-12 北京百度网讯科技有限公司 Streaming Media downloads method, apparatus, storage medium and the terminal device with playing

Similar Documents

Publication Publication Date Title
US10992682B2 (en) Systems and methods for efficient and secure temporary anonymous access to media content
JP6367883B2 (en) System and method for controlling local applications through web pages
US7890599B2 (en) Pause and replay of media content through bookmarks on a server device
US20220116666A1 (en) Pause and Replay of Media Content through Bookmarks on a Server Device
EP2334027A1 (en) Method for scalable access control decisions
US20200099992A1 (en) Method and terminal for playing a video file
KR101432319B1 (en) Virtualization of mobile device user experience
CN104837035A (en) Video playing method and terminal
CN104427358A (en) Fast-expiring licenses used to speculatively authorize access to streaming media content
US8909776B2 (en) Pause and replay of media content through bookmarks on a server device
CN114339456B (en) Video publishing method and device
WO2014026247A1 (en) Method and system for providing relevant portions of multi-media based on text searching of multi-media
CN110290097B (en) Data processing method and device, storage medium and electronic device
CN112291617A (en) Audio and video offline playing method and device and electronic equipment
TW201640392A (en) Computerized system and method for implementing digital rights management
AU2012205475B2 (en) Programmable, interactive content viewing on a mobile video application
CN106792018A (en) The low-end set top boxes system of integrated YouTube applications and the method for playing YouTube web videos
EP1365309A1 (en) System and method for tracking the usage of electronic content over a network
WO2014180369A1 (en) Method and device for processing data of iptv based on distributed database
CN113014973A (en) Audio and video data processing method, system and device, electronic equipment and storage medium
JP2009164692A (en) Viewing and listening effect measurement system, and measuring method thereof and measuring terminal
KR20120062396A (en) Method and apparatus for providing streaming service based on standard protocol through authentication of encrypted station information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210129