WO2019153433A1 - 一种密钥的提供、视频播放方法、服务器及客户端 - Google Patents

一种密钥的提供、视频播放方法、服务器及客户端 Download PDF

Info

Publication number
WO2019153433A1
WO2019153433A1 PCT/CN2018/079499 CN2018079499W WO2019153433A1 WO 2019153433 A1 WO2019153433 A1 WO 2019153433A1 CN 2018079499 W CN2018079499 W CN 2018079499W WO 2019153433 A1 WO2019153433 A1 WO 2019153433A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
server
key
file
index file
Prior art date
Application number
PCT/CN2018/079499
Other languages
English (en)
French (fr)
Inventor
黄镇林
陈云辉
范少卓
Original Assignee
网宿科技股份有限公司
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 网宿科技股份有限公司 filed Critical 网宿科技股份有限公司
Priority to EP18899029.5A priority Critical patent/EP3557876A4/en
Priority to US16/516,326 priority patent/US11055429B2/en
Publication of WO2019153433A1 publication Critical patent/WO2019153433A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/26613Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel for generating or managing keys in general
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • 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, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video stream decryption
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • 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/47End-user applications
    • H04N21/482End-user interface for program selection
    • H04N21/4825End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/633Control signals issued by server directed to the network components or client
    • H04N21/6332Control signals issued by server directed to the network components or client directed to client
    • H04N21/6334Control signals issued by server directed to the network components or client directed to client for authorisation, e.g. by transmitting a key
    • H04N21/63345Control signals issued by server directed to the network components or client directed to client for authorisation, e.g. by transmitting a key by transmitting keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/835Generation of protective data, e.g. certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/85406Content authoring involving a specific file format, e.g. MP4 format

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a key providing, a video playing method, a server, and a client.
  • the HLS (http live streaming) protocol developed by Apple Inc. of the United States is widely used.
  • the HLS (Http Live Streaming) protocol is a dynamic rate adaptive streaming protocol that splits large media files into numerous small fragment files.
  • the video data using the protocol usually has an index file, and the index file may include a download address of each fragment file and a key used to encrypt each fragment file. Since the HLS protocol is an open streaming protocol, the keys in the index file are displayed directly in clear text. Referring to FIG.
  • the index file of the video data may be first downloaded from a server that stores the video data, and then obtained from the index file and displayed in a clear text.
  • the client can also obtain the encrypted fragment file from the server according to the download address in the index file. In this way, the client can decrypt the encrypted fragment file by using the key, so that the decrypted fragment file can be played.
  • the purpose of the application is to provide a key, a video playing method, a server and a client, which can effectively protect the copyright of video data.
  • the present application provides a method for providing a key, where the method includes: dividing preset video data into multiple pieces of data, and separately respectively, for the plurality of fragments based on a preset key.
  • the data is encrypted, and the encrypted fragment data is stored in a specified directory to generate a file address of each of the encrypted fragment data; an initial index file is generated, and the initial index file includes each of the encrypted files.
  • another aspect of the present application further provides a server, the server including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the following steps are implemented:
  • the preset video data is divided into a plurality of fragment data, and the plurality of fragment data is separately encrypted based on the preset key, and the encrypted fragment data is stored in a specified directory to generate each of the encryptions.
  • the receiving client sends the preset video data a download request, and providing the modified index file to the client, so that the client is based on the modified index file Specifying a string to construct an access request to the preset key; receiving the access request sent by the client, and providing the preset password to the client in response to the access request key.
  • another aspect of the present application further provides a video playing method, the method comprising: sending a download request to a target video data to a server, and receiving an index file of the target video data fed back by the server;
  • the index file includes a file address that points to the encrypted fragment data and a specified character string, and the fragment data is obtained by dividing the target video data; and is constructed based on the specified character string in the index file.
  • another aspect of the present application further provides a client, the client including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, implements the following steps Sending a download request to the server to the target video data, and receiving an index file of the target video data fed back by the server; wherein the index file includes a file address pointing to the encrypted fragment data and a specified string And the fragmentation data is obtained by dividing the target video data; constructing an access request based on the specified character string in the index file, and transmitting the access request to the server to obtain the obtained from the server Determining a preset key pointed to by the access request; sending, to the server, a file acquisition request including a file address of the fragmentation data, to obtain an encrypted score pointed to by the file address of the fragmentation data from the server Slice data; decrypting the obtained encrypted fragment data by using the preset key, and playing Secret data slice.
  • the initial index file may be first generated in a conventional manner.
  • the file address of each encrypted fragment data may be included, and the preamble used for encryption may be included.
  • Set the plaintext information of the key In order to prevent the preset key displayed in the plain text form from being directly acquired, the server may replace the preset key with the specified character string in the present application, and may use the corrected index file as an index of the preset video data. file.
  • the server feeds back the corrected index file to it.
  • the client cannot directly obtain the preset key used to encrypt the fragment data from the corrected index file, and only obtains the specified string.
  • a set of private rules may be set in a client having access rights to the preset video data, and the private rule may construct an access request to the preset key based on the specified character string. .
  • the client can obtain the preset key from the server, thereby decrypting the downloaded encrypted fragment data.
  • those clients that do not have access to the preset video data cannot know the above-mentioned private rules, and therefore cannot construct an access request that meets the requirements.
  • the client that does not have access rights cannot obtain the preset key, so that the encrypted fragment data cannot be played normally, so that the copyright of the preset video data can be protected.
  • the preset key stored in the server may be secondarily encrypted by using the designated key, and the designated key may be pre-stored in the access. Permissions in the client. In this way, after obtaining the encrypted key, the client having the access authority can decrypt the encrypted key through the built-in designated key, thereby restoring the preset key. In this way, the strength of copyright protection is further enhanced.
  • FIG. 2 is a schematic diagram of video playback interaction under the improved HLS protocol in the embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a server in an embodiment of the present application.
  • FIG. 4 is a flowchart of a video playing method in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a client in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a computer terminal in an embodiment of the present application.
  • the present application provides a method for providing a key, which can be applied to a system architecture of a server and a client.
  • the server may be a device that stores video data.
  • the server may for example be a service server of a video playing website.
  • the server may be a separate server or a cluster of a plurality of servers, and the number of servers is not limited herein.
  • the client may be a terminal device used by a user.
  • the client may be, for example, a television box, a set top box, a smart phone, a smart TV, a tablet computer, a portable computer, a desktop computer, a smart wearable device, and the like.
  • the client may also be software running in the above electronic device.
  • the client can be an application or player provided by a video playing website.
  • the client may be Youku APP, Tencent Video APP, LeTV APP, and the like.
  • a method for providing a key provided by this embodiment may be performed by the server. Referring to FIG. 2, the method may include the following steps.
  • the preset video data is divided into a plurality of fragment data, and the plurality of fragment data is separately encrypted based on the preset key, and the encrypted fragment data is stored in a specified directory to generate each The file address of the encrypted fragment data.
  • the server may divide the complete preset video data into a plurality of slice data in advance. Specifically, the server may perform fragmentation processing on the preset video data according to a fixed duration. For example, the server may divide the preset video data into a plurality of slice data according to a duration of 10 seconds. After obtaining a plurality of slice data, each slice data can be assigned a unique identifier for distinguishing different slice data. For example, there are currently a total of three pieces of fragmentation data, and the identification of the three pieces of slice data may be A-1, A-2, and A-3, respectively.
  • the server may encrypt each fragment data by using a preset encryption algorithm.
  • the server may encrypt the fragment data by using an encryption algorithm of AES (Advanced Encryption Standard).
  • AES Advanced Encryption Standard
  • the encrypted fragment data may be stored in a specified directory, so that the file address of each of the encrypted fragment data may be generated. Through the file address, the directory for storing the encrypted fragment data can be located, so that the corresponding encrypted fragment data can be obtained.
  • S13 Generate an initial index file, where the initial index file includes a file address of each of the encrypted fragment data and the preset key.
  • the initial index file may be generated according to the requirements of the HLS protocol.
  • information of each piece of slice data may be included.
  • the initial index file may include a duration of each fragment data, an encryption algorithm used when encrypting the fragment data, a file address of each of the encrypted fragment data, and a preset key used for encryption. Wait.
  • the initial index in order to prevent any client from directly obtaining the preset key displayed in the plain text form from the initial index file, the initial index may be replaced by the specified string after the initial index file is obtained.
  • the preset key in the file thereby obtaining the corrected index file. In this way, the client can not directly obtain the preset key from the corrected index file, but can only obtain the specified string.
  • the corrected index file may be replaced with the previous initial index file, so that the corrected index file is used as the index file of the preset video data. If the client needs to download the preset video data, the server may provide the modified index file to the client.
  • S17 Receive a download request sent by the client to the preset video data, and provide the modified index file to the client, so that the client is based on the corrected index file.
  • the specified character string constructs an access request directed to the preset key.
  • the client since the location of the modified index file in which the preset key should be stored is replaced by the specified character string, the client processes the modified index file through the existing HLS protocol. Attempts to decrypt the encrypted fragment data using the specified string will fail, and the decryption process will fail, causing the client to not play the fragmented data properly.
  • a set of private rules may be preset in a client having access rights to the preset video data, and the private rule may process the modified index file in some improved manner, thereby A client with access rights can correctly decrypt the encrypted fragment data.
  • the client with access rights may be a client that purchases the copyright of the preset video data.
  • the server may provide the modified index file to the client.
  • the specified character string may be processed based on the private rule, thereby constructing an access request directed to the preset key.
  • the private rules may define various components of the access request.
  • the specified string may be included, and the specified string may be used to correctly send the constructed access request to the server, and let the server know that the constructed access request is for obtaining Preset key.
  • the access request may further include a verification string added by the client, and the server will feedback the preset key to the client after the verification string passes the verification of the server.
  • the verification string may include two parts, one of which is a server prediction time and the other part is a factory setting value.
  • the server prediction time may be a time calculated by the client in a certain manner. Specifically, when the client starts running, the client can obtain the current server time from the server, and the current server time is provided by the server, and can be recorded as A. At this time, the client may calculate a time difference A-B1 between the current server time A and its own time B1, which may be used as an error between the server time and the client time. Then, when the client constructs the access request, a period of time has elapsed since the client starts running. At this time, the client can calculate the current time B2 according to the current time and the time difference AB.
  • the server predicts the time, and the server prediction time can be expressed as B2+(AB).
  • the server prediction time can be used to indicate the timeliness of the constructed access request.
  • the server may calculate a difference between a current time of the server and a server prediction time in the access request. If the difference is less than or equal to a specified threshold, indicating that the access request is valid, the Further processing. If the difference is greater than the specified threshold, indicating that the access request has expired, the access request may be directly rejected.
  • the verification string may further include a factory setting value, which may be preset in a client having access rights.
  • the factory setting value can be a string of hexadecimal data.
  • the factory setting value may be provided by the issuer of the preset video data after the client purchases the access right of the preset video data. In this way, clients that do not have access rights will not have the above factory settings.
  • S19 Receive the access request sent by the client, and provide the preset key to the client in response to the access request.
  • the access request constructed by the client may be a URL (Universal Resource Locator) through which the client can access the server.
  • the server may verify the verification string in the access request. Specifically, the server may first calculate a difference between a current actual time and a server prediction time in the access request, and when the difference is less than or equal to a specified threshold, indicating that the access request is valid, so that the server may further The factory setting value in the access request is determined. When the factory setting value in the access request is consistent with the preset factory setting value, indicating that the factory setting value in the access request is also valid, the preset key may be provided to the client at this time. .
  • the preset factory setting value may be a corresponding factory setting value of the preset video data in the server.
  • the preset factory setting value may be an authorization code of the preset video data.
  • the factory setting value corresponding to each video data may be stored in association with the identifier of the video data. In this way, after receiving the foregoing access request, the server may obtain the preset factory setting value by using the identifier of the preset video data, and then the preset factory setting value may be used in the access request. The factory setting values are compared. When the two are consistent, it indicates that the client that sent the access request has access rights.
  • the server may perform secondary encryption on the preset key in advance. . Specifically, the server may encrypt the preset key by using a specified key, and save the encrypted key to a directory pointed to by the specified string.
  • the preset key may be secondarily encrypted by using a common encryption algorithm.
  • the preset key may be encrypted by a symmetric encryption algorithm, an asymmetric encryption algorithm, a hash algorithm, or the like.
  • the designated key may be predetermined by the issuer or distribution platform of the video data, and the designated key may be built in the client having access rights. In this way, after receiving the access request sent by the client, the server can provide the encrypted key to the client.
  • the client may restore the encrypted key to the preset key based on the built-in specified key.
  • the client may further obtain corresponding encrypted fragment data from the server based on the file address in the modified index file.
  • the server may receive a file acquisition request sent by the client, where the file acquisition request includes a file address identified from the modified index file.
  • the file address may be a directory in which the encrypted fragment data is stored in the server, so that the file acquisition request may point to the encrypted fragment data.
  • the server may feed back the encrypted fragment data pointed to by the file obtaining request to the client.
  • the client may decrypt the encrypted fragment data by using the preset key obtained above, so that the decrypted fragment data can be played.
  • the present application further provides a server, where the server includes a memory and a processor, where the computer stores a computer program, and when the computer program is executed by the processor, the following steps are implemented:
  • the preset video data is divided into a plurality of fragment data, and the plurality of fragment data is separately encrypted based on the preset key, and the encrypted fragment data is stored in a specified directory to generate each a file address of the encrypted fragment data;
  • S13 Generate an initial index file, where the initial index file includes a file address of each of the encrypted fragment data and the preset key;
  • S17 Receive a download request sent by the client to the preset video data, and provide the modified index file to the client, so that the client is based on the corrected index file. Specifying a string to construct an access request directed to the preset key;
  • S19 Receive the access request sent by the client, and provide the preset key to the client in response to the access request.
  • Encrypting the preset key with a specified key and saving the encrypted key to a directory pointed by the specified string;
  • the encrypted fragment data pointed to by the file obtaining request is fed back to the client, so that the client decrypts the encrypted fragment data by using the preset key, and plays the decrypted Fragmentation data.
  • the memory may include physical means for storing information, typically by digitizing the information and then storing it in a medium that utilizes electrical, magnetic or optical methods.
  • the memory according to the embodiment may further include: a device for storing information by using an electric energy method, such as a RAM, a ROM, etc.; a device for storing information by using a magnetic energy method, such as a hard disk, a floppy disk, a magnetic tape, a magnetic core memory, a magnetic bubble memory, and a USB flash drive; A device that optically stores information, such as a CD or a DVD.
  • an electric energy method such as a RAM, a ROM, etc.
  • a magnetic energy method such as a hard disk, a floppy disk, a magnetic tape, a magnetic core memory, a magnetic bubble memory, and a USB flash drive
  • a device that optically stores information such as a CD or a DVD.
  • quantum memory graphene memory, and the like.
  • the processor can be implemented in any suitable manner.
  • the processor can take the form of, for example, a microprocessor or processor and computer readable media, logic gates, switches, and special-purpose integrations for storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • ASIC Application Specific Integrated Circuit
  • programmable logic controller programmable logic controller and embedded microcontroller form.
  • the present application also provides a video playing method, which can be applied to the above client.
  • the method includes the following steps.
  • S21 Send a download request to the server to the target video data, and receive an index file of the target video data that is fed back by the server; where the index file includes a file address and a specified character that point to the encrypted fragment data. a string, the fragment data being divided by the target video data.
  • the client may initiate a download request to the server for the target video data through the download address of the target video data.
  • an identifier of the target video data may be carried.
  • the identifier may be, for example, a storage directory of the target video data in the server, or a data number of the target video data in the server.
  • the target video data may be fragmented by the server in advance, and a corresponding index file is generated.
  • the index file can be modified based on an index file that conforms to the HLS protocol.
  • the server may first generate an initial index file of the target video data according to the requirements of the HLS protocol.
  • information of each piece of slice data may be included.
  • the initial index file may include a duration of each fragment data, an encryption algorithm used when encrypting the fragment data, a file address of each of the encrypted fragment data, and a preset key used for encryption. Wait.
  • the server may replace the foregoing in the initial index file with the specified string after obtaining the initial index file. Preset the key to get the corrected index file.
  • the modified index file can be used as an index file of the target video data. In this way, after receiving the download request from the client to the target video data, the server may provide the modified index file to the client.
  • the index file received by the client may include a file address pointing to the encrypted fragment data and the specified character string, and the fragment data may be divided by the target video data.
  • S23 Build an access request based on the specified character string in the index file, and send the access request to the server to acquire a preset key pointed by the access request from the server.
  • a set of private rules may be preset in a client having access rights to the target video data, and the private rule may process the modified index file in some improved manner, thereby enabling access rights.
  • the client can correctly decrypt the encrypted fragment data.
  • the client with access rights may be a client that purchases the copyright of the target video data. For example, if Youku platform purchases the copyright of a certain online drama, then in the player of Youku platform, the above private rules can be pre-installed, so that the content of the online drama can be viewed normally through the player of Youku platform. However, other players that have not purchased the copyright cannot play the content of the screen play properly because the private rule is not installed inside.
  • the specified character string may be processed based on the private rule to construct an access request.
  • the private rules may define various components of the access request.
  • the specified string may be included, and the specified string may be used to correctly send the constructed access request to the server, and let the server know that the constructed access request is for obtaining Preset key.
  • the access request may further include a verification string added by the client, and the server will feedback the preset key to the client after the verification string passes the verification of the server.
  • the verification string may contain two parts, one of which is the server prediction time and the other part is the factory setting value.
  • the server prediction time may be a time calculated by the client in a certain manner. Specifically, when the client starts running, the client can obtain the current server time from the server, and the current server time is provided by the server, and can be recorded as A. At this time, the client may calculate a time difference A-B1 between the current server time A and its own time B1, which may be used as an error between the server time and the client time. Then, when the client constructs the access request, a period of time has elapsed since the client starts running. At this time, the client can calculate the current time B2 according to the current time and the time difference AB.
  • the server predicts the time, and the server prediction time can be expressed as B2+(AB).
  • the server prediction time can be used to indicate the timeliness of the constructed access request.
  • the server may calculate a difference between a current time of the server and a server prediction time in the access request. If the difference is less than or equal to a specified threshold, indicating that the access request is valid, the Further processing. If the difference is greater than the specified threshold, indicating that the access request has expired, the access request may be directly rejected.
  • the verification string may further include a factory setting value, which may be preset in a client having access rights.
  • the factory setting value can be a string of hexadecimal data.
  • the factory setting value may be provided by the issuer of the target video data after the client has purchased the access rights of the target video data. In this way, clients that do not have access rights will not have the above factory settings.
  • the access request constructed by the client may be a URL through which the client can access the server.
  • the server may verify the verification string in the access request. After the verification is passed, the client can obtain the preset key used by the server to encrypt the fragmented data.
  • S25 Send a file acquisition request that includes a file address of the fragment data to the server, to obtain encrypted fragment data pointed to by the file address of the fragment data from the server.
  • S27 Decrypt the obtained encrypted fragment data by using the preset key, and play the decrypted fragment data.
  • the client may obtain corresponding encrypted fragment data from the server based on the file address in the modified index file. Specifically, the client may send a file acquisition request including the file address of the fragmentation data to the server.
  • the file address may be a directory in which the encrypted fragment data is stored in the server, so that the file acquisition request may point to the encrypted fragment data.
  • the server may feed back the encrypted fragment data pointed to by the file obtaining request to the client.
  • the client may decrypt the encrypted fragment data by using the preset key obtained above, so that the decrypted fragment data can be played.
  • the server may perform secondary encryption on the key in advance. Specifically, the server may encrypt the key with a specified key and save the encrypted key to a directory pointed to by the specified string.
  • the key may be secondarily encrypted by using a common encryption algorithm.
  • the key may be encrypted by a symmetric encryption algorithm, an asymmetric encryption algorithm, a hash algorithm, or the like.
  • the designated key may be predetermined by the issuer or distribution platform of the video data, and the designated key may be built in the client having access rights.
  • the preset key obtained by the client from the server is a key encrypted by the specified key.
  • the client may decrypt the obtained preset key into an original key based on the built-in specified key, and subsequently obtain the obtained key by using the original key pair.
  • the encrypted fragment data is decrypted, and the decrypted fragment data is played.
  • the present application further provides a client, where the client includes a memory and a processor, where the computer stores a computer program, and when the computer program is executed by the processor, the following steps are implemented:
  • S21 Send a download request to the server to the target video data, and receive an index file of the target video data that is fed back by the server; where the index file includes a file address and a specified character that point to the encrypted fragment data. a string, the fragment data being divided by the target video data;
  • S23 Build an access request based on the specified character string in the index file, and send the access request to the server to obtain a preset key pointed by the access request from the server;
  • S25 Send, to the server, a file obtaining request that includes a file address of the fragment data, to obtain encrypted fragment data pointed to by a file address of the fragment data from the server;
  • S27 Decrypt the obtained encrypted fragment data by using the preset key, and play the decrypted fragment data.
  • the access request includes the specified character string and a verification string added by the client; wherein the verification string includes a server prediction time and a factory setting value; accordingly, the computer program When executed by the processor, the following steps are also implemented:
  • the client When the client starts running, the client acquires a current server time from the server, and calculates a time difference between the current server time and its own time;
  • the server prediction time is calculated based on the current time of the client and the time difference.
  • the preset key obtained from the server is a key encrypted by a specified key; accordingly, when the computer program is executed by the processor, the following steps are also implemented:
  • the obtained encrypted fragment data is decrypted by using the original key, and the decrypted fragment data is played.
  • the memory may include physical means for storing information, typically by digitizing the information and then storing it in a medium that utilizes electrical, magnetic or optical methods.
  • the memory according to the embodiment may further include: a device for storing information by using an electric energy method, such as a RAM, a ROM, etc.; a device for storing information by using a magnetic energy method, such as a hard disk, a floppy disk, a magnetic tape, a magnetic core memory, a magnetic bubble memory, and a USB flash drive; A device that optically stores information, such as a CD or a DVD.
  • an electric energy method such as a RAM, a ROM, etc.
  • a magnetic energy method such as a hard disk, a floppy disk, a magnetic tape, a magnetic core memory, a magnetic bubble memory, and a USB flash drive
  • a device that optically stores information such as a CD or a DVD.
  • quantum memory graphene memory, and the like.
  • the processor can be implemented in any suitable manner.
  • the processor can take the form of, for example, a microprocessor or processor and computer readable media, logic gates, switches, and special-purpose integrations for storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • ASIC Application Specific Integrated Circuit
  • programmable logic controller programmable logic controller and embedded microcontroller form.
  • Computer terminal 10 may include one or more (only one of which is shown) processor 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), for storing data.
  • processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), for storing data.
  • FIG. 6 is merely illustrative and does not limit the structure of the above electronic device.
  • computer terminal 10 may also include more or fewer components than shown in FIG. 6, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store software programs and modules of application software, and the processor 102 executes various functional applications and data processing by running software programs and modules stored in the memory 104.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 may further include memory remotely located relative to processor 102, which may be coupled to computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is for receiving or transmitting data via a network.
  • the network specific examples described above may include a wireless network provided by a communication provider of the computer terminal 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • the initial index file may be first generated in a conventional manner.
  • the file address of each encrypted fragment data may be included, and the preamble used for encryption may be included.
  • Set the plaintext information of the key In order to prevent the preset key displayed in the plain text form from being directly acquired, the server may replace the preset key with the specified character string in the present application, and may use the corrected index file as an index of the preset video data. file.
  • the server feeds back the corrected index file to it.
  • the client cannot directly obtain the preset key used to encrypt the fragment data from the corrected index file, and only obtains the specified string.
  • a set of private rules may be set in a client having access rights to the preset video data, and the private rule may construct an access request to the preset key based on the specified character string. .
  • the client can obtain the preset key from the server, thereby decrypting the downloaded encrypted fragment data.
  • those clients that do not have access to the preset video data cannot know the above-mentioned private rules, and therefore cannot construct an access request that meets the requirements.
  • the client that does not have access rights cannot obtain the preset key, so that the encrypted fragment data cannot be played normally, so that the copyright of the preset video data can be protected.
  • the preset key stored in the server may be secondarily encrypted by using the designated key, and the designated key may be pre-stored in the access. Permissions in the client. In this way, after obtaining the encrypted key, the client having the access authority can decrypt the encrypted key through the built-in designated key, thereby restoring the preset key. In this way, the strength of copyright protection is further enhanced.

Abstract

本申请公开了一种密钥的提供、视频播放方法、服务器及客户端,其中,所述视频播放方法包括:向服务器发送下载请求,并接收所述服务器反馈的目标视频数据的索引文件;基于所述索引文件中的指定字符串构建访问请求,并向所述服务器发送所述访问请求,以从所述服务器中获取所述访问请求指向的预设密钥;向所述服务器发送包含文件地址的文件获取请求,以从所述服务器中获取所述分片数据的文件地址指向的加密后的分片数据;利用所述预设密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。本申请提供的技术方案,能够有效地对视频数据的版权进行保护。

Description

一种密钥的提供、视频播放方法、服务器及客户端 技术领域
本申请涉及互联网技术领域,特别涉及一种密钥的提供、视频播放方法、服务器及客户端。
背景技术
随着视频点播技术和视频直播技术的不断发展,视频数据传输过程中采用的协议也在不断完善。当前,由美国苹果公司开发的HLS(http live streaming)协议受到广泛地应用。HLS(Http Live Streaming,HTTP直播流)协议是一种动态码率自适应流媒体协议,该协议可以将大的媒体文件分割成众多小的分片文件。采用该协议的视频数据通常会具备索引文件,在索引文件中,可以包括各个分片文件的下载地址以及对各个分片文件加密时所采用的密钥。由于HLS协议是一种开放式的流媒体协议,因此在索引文件中的密钥是以明文的形式直接进行展示的。请参阅图1,现有技术中采用HLS协议的客户端在播放视频数据时,首先可以从存储视频数据的服务器中下载该视频数据的索引文件,然后可以从索引文件中获取到以明文形式展示的密钥,此外,客户端还可以根据索引文件中的下载地址,从服务器中获取到经过加密的分片文件。这样,客户端便可以利用密钥对加密的分片文件进行解密,从而可以播放解密后的分片文件。
然而,这种开放式的协议往往会带来以下缺陷:无论何种客户端,只要其支持HLS协议,那么便可以直接从索引文件中获取到分片文件加密时所采用的密钥。这样便会严重影响视频数据的私密性,无法针对视频数据的版权进行保护。
发明内容
本申请的目的在于提供一种密钥的提供、视频播放方法、服务器及客户端,能够有效地对视频数据的版权进行保护。
为实现上述目的,本申请一方面提供一种密钥的提供方法,所述方法包 括:将预设视频数据划分为多个分片数据,并基于预设密钥分别对所述多个分片数据进行加密,并将加密后的分片数据存放于指定目录下,以生成各个所述加密后的分片数据的文件地址;生成初始索引文件,所述初始索引文件中包含各个所述加密后的分片数据的文件地址以及所述预设密钥;利用指定字符串替换所述初始索引文件中的所述预设密钥,得到修正后的索引文件,并将所述修正后的索引文件作为所述预设视频数据的索引文件;接收客户端发来的指向所述预设视频数据的下载请求,并向所述客户端提供所述修正后的索引文件,以使得所述客户端基于所述修正后的索引文件中的所述指定字符串,构建指向所述预设密钥的访问请求;接收所述客户端发来的所述访问请求,并响应于所述访问请求,向所述客户端提供所述预设密钥。
为实现上述目的,本申请另一方面还提供一种服务器,所述服务器包括存储器和处理器,所述存储器中存储计算机程序,所述计算机程序被所述处理器执行时,实现以下步骤:将预设视频数据划分为多个分片数据,并基于预设密钥分别对所述多个分片数据进行加密,并将加密后的分片数据存放于指定目录下,以生成各个所述加密后的分片数据的文件地址;生成初始索引文件,所述初始索引文件中包含各个所述加密后的分片数据的文件地址以及所述预设密钥;利用指定字符串替换所述初始索引文件中的所述预设密钥,得到修正后的索引文件,并将所述修正后的索引文件作为所述预设视频数据的索引文件;接收客户端发来的指向所述预设视频数据的下载请求,并向所述客户端提供所述修正后的索引文件,以使得所述客户端基于所述修正后的索引文件中的所述指定字符串,构建指向所述预设密钥的访问请求;接收所述客户端发来的所述访问请求,并响应于所述访问请求,向所述客户端提供所述预设密钥。
为实现上述目的,本申请另一方面还提供一种视频播放方法,所述方法包括:向服务器发送指向目标视频数据的下载请求,并接收所述服务器反馈的所述目标视频数据的索引文件;其中,所述索引文件中包括指向加密后的分片数据的文件地址以及指定字符串,所述分片数据由所述目标视频数据划分得到;基于所述索引文件中的所述指定字符串构建访问请求,并向所述服务器发送所述访问请求,以从所述服务器中获取所述访问请求指向的预设密钥;向所述服务器发送包含所述分片数据的文件地址的文件获取请求,以从所述服务器中获取所述分片数据的文件地址指向的加密后的分片数据;利用所述预设密钥对获 取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
为实现上述目的,本申请另一方面还提供一种客户端,所述客户端包括存储器和处理器,所述存储器中存储计算机程序,所述计算机程序被所述处理器执行时,实现以下步骤:向服务器发送指向目标视频数据的下载请求,并接收所述服务器反馈的所述目标视频数据的索引文件;其中,所述索引文件中包括指向加密后的分片数据的文件地址以及指定字符串,所述分片数据由所述目标视频数据划分得到;基于所述索引文件中的所述指定字符串构建访问请求,并向所述服务器发送所述访问请求,以从所述服务器中获取所述访问请求指向的预设密钥;向所述服务器发送包含所述分片数据的文件地址的文件获取请求,以从所述服务器中获取所述分片数据的文件地址指向的加密后的分片数据;利用所述预设密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
由上可见,本申请提供的技术方案,可以在当前的HLS协议的基础上进行改进。存储预设视频数据的服务器在构建索引文件时,首先可以按照常规的方式生成初始索引文件,在该初始索引文件中,可以包含各个加密后的分片数据的文件地址以及加密时所使用的预设密钥的明文信息。为了防止以明文形式显示的预设密钥被直接获取,在本申请中服务器可以利用指定字符串替换所述预设密钥,并且可以将修正之后的索引文件作为所述预设视频数据的索引文件。当客户端需要下载所述预设视频数据时,服务器会向其反馈经过修正的索引文件。客户端从经过修正的索引文件中,无法直接获取到加密分片数据所使用的预设密钥,只能获取到上述的指定字符串。在本申请中,可以预先在对所述预设视频数据具备访问权限的客户端中设置一套私有规则,该私有规则可以基于上述的指定字符串构建出指向所述预设密钥的访问请求。这样,通过该访问请求,客户端才能从服务器中获取到预设密钥,从而对下载的经过加密的分片数据进行解密。而那些对所述预设视频数据没有访问权限的客户端,则无法获知上述的私有规则,因此便无法构建出符合要求的访问请求。这样,不具备访问权限的客户端无法获取到预设密钥,从而无法正常播放经过加密的分片数据,这样便可以对所述预设视频数据的版权进行保护。进一步地,为了防止服务器与客户端之间传输的预设密钥被拦截,可以对服务器中存储的预设密钥利用指定密钥进行二次加密,而该指定密钥可以预先存储于具备访问权限的客户端中。 这样,具备访问权限的客户端在获取到加密的密钥后,可以通过内置的指定密钥对其进行解密,从而还原得到所述预设密钥。这样,便进一步提高了版权保护的力度。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是现有技术中遵循HLS协议的视频播放流程图;
图2是本申请实施例中改进的HLS协议下视频播放交互示意图;
图3是本申请实施例中服务器的结构示意图;
图4是本申请实施例中视频播放方法的流程图;
图5是本申请实施例中客户端的结构示意图;
图6是本申请实施例中计算机终端的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
实施例一
本申请提供一种密钥的提供方法,所述方法可以应用于服务器与客户端的系统架构中。其中,所述服务器可以是存储视频数据的设备。所述服务器例如可以是视频播放网站的业务服务器。所述服务器可以是独立的一个服务器,也可以是众多服务器的集群,这里对服务器的数量并不做限定。所述客户端可以是用户使用的终端设备。所述客户端例如可以是电视盒子、机顶盒、智能手机、智能电视、平板电脑、手提式电脑、台式电脑、智能可穿戴设备等电子设备。当然,所述客户端还可以是运行于上述电子设备中的软件。例如,所述客户端可以是视频播放网站提供的应用程序或者播放器。举例来说,所述客户端可以是优酷APP、腾讯视频APP、乐视APP等。
本实施方式提供的一种密钥的提供方法,其执行主题可以是上述的服务器。请参阅图2,所述方法可以包括以下步骤。
S11:将预设视频数据划分为多个分片数据,并基于预设密钥分别对所述多个分片数据进行加密,并将加密后的分片数据存放于指定目录下,以生成各个所述加密后的分片数据的文件地址。
在本实施方式中,遵循HLS协议,服务器可以预先将完整的预设视频数据划分为多个分片数据。具体地,服务器可以按照固定时长对所述预设视频数据进行分片处理。例如,服务器可以按照10秒的时长将所述预设视频数据划分为多个分片数据。在得到多个分片数据之后,可以给每个分片数据分配唯一的标识,以用于区分不同的分片数据。例如,当前共计有3个分片数据,这3个分片数据的标识可以分别为A-1、A-2以及A-3。
在本实施方式中,在划分得到分片数据之后,服务器可以采用预设的加密算法,对各个分片数据进行加密。例如,服务器可以采用AES(Advanced Encryption Standard,高级加密标准)的加密算法对所述分片数据进行加密。在加密过程中,通常需要使用预设密钥,该预设密钥除了可以用于对分片数据进行加密,还可以用于对加密后的分片数据进行解密。
在本实施方式中,服务器将各个分片数据进行加密之后,可以将加密后的分片数据存储于指定目录下,这样便可以生成各个所述加密后的分片数据的文件地址。通过该文件地址,可以定位至存储加密后的分片数据的目录,从而可以获取到对应的加密后的分片数据。
S13:生成初始索引文件,所述初始索引文件中包含各个所述加密后的分片数据的文件地址以及所述预设密钥。
在本实施方式中,在对预设视频数据进行分片处理,并加密存储之后,可以按照HLS协议的要求,生成初始索引文件。在所述初始索引文件中,可以包括各个分片数据的信息。例如,所述初始索引文件中可以包括各个分片数据的时长、加密分片数据时所采用的加密算法、各个所述加密后的分片数据的文件地址以及加密时所采用的预设密钥等。
S15:利用指定字符串替换所述初始索引文件中的所述预设密钥,得到修正后的索引文件,并将所述修正后的索引文件作为所述预设视频数据的索引文件。
在本实施方式中,为了避免任何客户端都能直接从初始索引文件中获取到以明文形式展示的预设密钥,可以在得到所述初始索引文件后,利用指定字符串替换所述初始索引文件中的所述预设密钥,从而得到修正后的索引文件。这样,客户端从修正后的索引文件中,便无法直接获取到预设密钥,而是只能获取到上述的指定字符串。
在本实施方式中,在对所述初始索引文件进行修正后,可以将修正后的索引文件替换之前的初始索引文件,从而将修正后的索引文件作为所述预设视频数据的索引文件。后续如果有客户端需要下载所述预设视频数据,服务器便可以将该修正后的索引文件提供给该客户端。
S17:接收客户端发来的指向所述预设视频数据的下载请求,并向所述客户端提供所述修正后的索引文件,以使得所述客户端基于所述修正后的索引文件中的所述指定字符串,构建指向所述预设密钥的访问请求。
在本实施方式中,由于修正后的索引文件中原本应当存放预设密钥的位置被替换为了指定字符串,那么客户端在通过现有的HLS协议对修正后的索引文件进行处理时,便会尝试利用指定字符串对加密后的分片数据进行解密,而这样的解密过程会失败,从而导致客户端无法正常播放分片数据。鉴于此,在本申请中,对所述预设视频数据具备访问权限的客户端中可以预先设置一套私有规则,该私有规则可以通过一些改进的方式对修正后的索引文件进行处理,从而使得具备访问权限的客户端能够正确地对加密后的分片数据进行解密。其中,所述具备访问权限的客户端可以是购买了该预设视频数据的版权的客户端。例如,优酷平台购买了某部网剧的版权,那么在优酷平台的播放器中,便可以预先安装上述的私有规则,这样,通过优酷平台的播放器,可以正常观看该网剧的内容。然而,其它没有购买版权的播放器,由于其内部没有安装该私有规则,从而无法正常播放该网剧的内容。
在本实施方式中,服务器在接收到客户端发来的指向所述预设视频数据的下载请求后,便可以向所述客户端提供所述修正后的索引文件。此时,若该客户端具备访问所述预设视频数据的权限,那么便可以基于所述私有规则,对所述指定字符串进行处理,从而构建指向所述预设密钥的访问请求。具体地,所述私有规则可以限定所述访问请求的各个组成部分。在所述访问请求中,可以包括所述指定字符串,该指定字符串可以用于将构建的访问请求正确地发送 至所述服务器处,并让服务器获知,该构建的访问请求是用于获取预设密钥的。此外,在所述访问请求中还可以包括由客户端添加的验证字符串,当该验证字符串通过服务器的验证之后,服务器才会向客户端反馈预设密钥。
在本实施方式中,所述验证字符串可以包含两部分,其中一部分为服务器预测时间,另一部分为出厂设置值。其中,所述服务器预测时间可以是由所述客户端按照一定的方式计算出的时间。具体地,在所述客户端开始运行时,所述客户端可以从服务器处获取当前的服务器时间,该当前的服务器时间是由服务器提供的,可以记做A。此时,客户端可以将计算所述当前的服务器时间A与自身时间B1之间的时间差值A-B1,该时间差值可以作为服务器时间与客户端时间之间的误差。那么在所述客户端构建所述访问请求时,距离客户端开始运行的时间已经过去了一段时间,此时,客户端可以基于自身当前的时间B2以及所述时间差值A-B,计算得到所述服务器预测时间,该服务器预测时间可以表示为B2+(A-B)。在本实施方式中,该服务器预测时间可以用于表示构建的所述访问请求的时效性。服务器在接收到该访问请求后,可以计算服务器当前的实际时间与所述访问请求中的服务器预测时间之间的差值,若该差值小于或者等于指定阈值,表明该访问请求有效,可以进行进一步地处理。若该差值大于所述指定阈值,则表明该访问请求已经失效,则可以直接拒绝该访问请求。
在本实施方式中,除了所述服务器预测时间,在所述验证字符串中还可以包含一个出厂设置值,该出厂设置值可以是在具备访问权限的客户端中预先设置的。例如,所述出厂设置值可以是一串16进制的数据。该出厂设置值可以是所述客户端在购买了所述预设视频数据的访问权限之后,由所述预设视频数据的发行方提供的。这样,不具备访问权限的客户端,便不会拥有上述的出厂设置值。
S19:接收所述客户端发来的所述访问请求,并响应于所述访问请求,向所述客户端提供所述预设密钥。
在本实施方式中,客户端构建的所述访问请求可以是一个URL(Universal Resource Locator,统一资源定位符),通过该URL,客户端便可以访问服务器。服务器接收到所述客户端发来的访问请求后,可以对该访问请求中的验证字符串进行验证。具体地,服务器首先可以计算当前的实际时间与所述访问请求中的服务器预测时间之间的差值,当所述差值小于或者等于指定阈值时,表示该 访问请求有效,从而可以进一步地对所述访问请求中的出厂设置值进行判定。当所述访问请求中的所述出厂设置值与预设出厂设置值一致时,表示该访问请求中的出厂设置值也是有效的,此时便可以向所述客户端提供所述预设密钥。其中,所述预设出厂设置值可以是所述预设视频数据在所述服务器中对应的出厂设置值。例如,所述预设出厂设置值可以是该预设视频数据的授权码。在服务器中,可以将各个视频数据对应的出厂设置值与视频数据的标识进行关联存储。这样,服务器在接收到上述的访问请求后,可以通过所述预设视频数据的标识查询得到所述预设出厂设置值,然后便可以将所述预设出厂设置值与所述访问请求中的出厂设置值进行比较,当两者一致时,则表明发送该访问请求的客户端具备访问权限。
在本申请一个实施方式中,为了防止不法软件拦截服务器与客户端之间交互的数据,从而获取到服务器发送往客户端的预设密钥,服务器可以预先对所述预设密钥进行二次加密。具体地,服务器可以利用指定密钥对所述预设密钥进行加密,并将加密后的密钥保存至由所述指定字符串指向的目录下。在本实施方式中,可以采用常用的加密算法对所述预设密钥进行二次加密。例如,可以通过对称加密算法、非对称加密算法、哈希算法等对预设密钥进行加密。所述指定密钥可以是视频数据的发行厂商或者发行平台预先确定的,并且该指定密钥可以内置于具备访问权限的客户端内。这样,服务器在接收到所述客户端发来的所述访问请求后,便可以向所述客户端提供加密后的密钥。客户端可以基于内置的所述指定密钥,将所述加密后的密钥还原为所述预设密钥。
在本申请一个实施方式中,客户端还可以基于修正后的索引文件中的文件地址,从服务器中获取相应的加密后的分片数据。具体地,服务器可以接收所述客户端发来的文件获取请求,所述文件获取请求中包括从所述修正后的索引文件中识别的文件地址。该文件地址可以是加密后的分片数据在服务器中的存放目录,这样,所述文件获取请求便可以指向加密后的分片数据。服务器在接收到该文件获取请求之后,可以将所述文件获取请求指向的加密后的分片数据反馈给所述客户端。客户端接收到加密后的分片数据后,便可以通过上述获取的预设密钥对所述加密后的分片数据进行解密,从而可以播放解密后的分片数据。
实施例二
请参阅图3,本申请还提供一种服务器,所述服务器包括存储器和处理器,所述存储器中存储计算机程序,所述计算机程序被所述处理器执行时,实现以下步骤:
S11:将预设视频数据划分为多个分片数据,并基于预设密钥分别对所述多个分片数据进行加密,并将加密后的分片数据存放于指定目录下,以生成各个所述加密后的分片数据的文件地址;
S13:生成初始索引文件,所述初始索引文件中包含各个所述加密后的分片数据的文件地址以及所述预设密钥;
S15:利用指定字符串替换所述初始索引文件中的所述预设密钥,得到修正后的索引文件,并将所述修正后的索引文件作为所述预设视频数据的索引文件;
S17:接收客户端发来的指向所述预设视频数据的下载请求,并向所述客户端提供所述修正后的索引文件,以使得所述客户端基于所述修正后的索引文件中的所述指定字符串,构建指向所述预设密钥的访问请求;
S19:接收所述客户端发来的所述访问请求,并响应于所述访问请求,向所述客户端提供所述预设密钥。
在一个实施方式中,所述计算机程序被所述处理器执行时,还实现以下步骤:
利用指定密钥对所述预设密钥进行加密,并将加密后的密钥保存至由所述指定字符串指向的目录下;
相应地,在接收到所述客户端发来的所述访问请求后,向所述客户端提供所述加密后的密钥,以使得所述客户端基于内置的所述指定密钥,将所述加密后的密钥还原为所述预设密钥。
在一个实施方式中,所述计算机程序被所述处理器执行时,还实现以下步骤:
接收所述客户端发来的文件获取请求,所述文件获取请求中包括从所述修正后的索引文件中识别的文件地址;
将所述文件获取请求指向的加密后的分片数据反馈给所述客户端,以使得所述客户端通过所述预设密钥对所述加密后的分片数据进行解密,并播放解 密后的分片数据。
在本实施方式中,所述存储器可以包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方法的媒体加以存储。本实施方式所述的存储器又可以包括:利用电能方式存储信息的装置,如RAM、ROM等;利用磁能方式存储信息的装置,如硬盘、软盘、磁带、磁芯存储器、磁泡存储器、U盘;利用光学方式存储信息的装置,如CD或DVD。当然,还有其他方式的存储器,例如量子存储器、石墨烯存储器等等。
在本实施方式中,所述处理器可以按任何适当的方式实现。例如,所述处理器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式等等。
本说明书实施方式提供的服务器,其存储器和处理器实现的具体功能,可以与本说明书中的前述实施方式相对照解释,并能够达到前述实施方式的技术效果,这里便不再赘述。
实施例三
本申请还提供一种视频播放方法,所述方法可以应用于上述的客户端中,请参阅图2和图4,所述方法包括以下步骤。
S21:向服务器发送指向目标视频数据的下载请求,并接收所述服务器反馈的所述目标视频数据的索引文件;其中,所述索引文件中包括指向加密后的分片数据的文件地址以及指定字符串,所述分片数据由所述目标视频数据划分得到。
在本实施方式中,客户端可以通过目标视频数据的下载地址,向服务器发起指向目标视频数据的下载请求。在所述下载请求中,可以携带所述目标视频数据的标识。该标识例如可以是所述目标视频数据在服务器中的存放目录,或者是所述目标视频数据在服务器中的数据编号。这样,服务器基于该下载请求,便可以确定客户端所需下载的目标视频数据。
在本实施方式中,该目标视频数据可以预先被服务器进行分片处理,并生成了对应的索引文件。该索引文件可以是基于遵循HLS协议的索引文件修正 得到。具体地,服务器首先可以按照HLS协议的要求,生成目标视频数据的初始索引文件。在所述初始索引文件中,可以包括各个分片数据的信息。例如,所述初始索引文件中可以包括各个分片数据的时长、加密分片数据时所采用的加密算法、各个所述加密后的分片数据的文件地址以及加密时所采用的预设密钥等。为了避免任何客户端都能直接从初始索引文件中获取到以明文形式展示的预设密钥,服务器可以在得到所述初始索引文件后,利用指定字符串替换所述初始索引文件中的所述预设密钥,从而得到修正后的索引文件。该修正后的索引文件便可以作为所述目标视频数据的索引文件。这样,服务器在接收到客户端发来的指向所述目标视频数据的下载请求后,便可以向所述客户端提供上述的修正后的索引文件。这样,客户端接收到的索引文件中,可以包括指向加密后的分片数据的文件地址以及所述指定字符串,所述分片数据可以由所述目标视频数据划分得到。
S23:基于所述索引文件中的所述指定字符串构建访问请求,并向所述服务器发送所述访问请求,以从所述服务器中获取所述访问请求指向的预设密钥。
在本实施方式中,对所述目标视频数据具备访问权限的客户端中可以预先设置一套私有规则,该私有规则可以通过一些改进的方式对修正后的索引文件进行处理,从而使得具备访问权限的客户端能够正确地对加密后的分片数据进行解密。其中,所述具备访问权限的客户端可以是购买了该目标视频数据的版权的客户端。例如,优酷平台购买了某部网剧的版权,那么在优酷平台的播放器中,便可以预先安装上述的私有规则,这样,通过优酷平台的播放器,可以正常观看该网剧的内容。然而,其它没有购买版权的播放器,由于其内部没有安装该私有规则,从而无法正常播放该网剧的内容。
在本实施方式中,若客户端具备访问所述目标视频数据的权限,那么便可以基于所述私有规则,对所述指定字符串进行处理,从而构建访问请求。具体地,所述私有规则可以限定所述访问请求的各个组成部分。在所述访问请求中,可以包括所述指定字符串,该指定字符串可以用于将构建的访问请求正确地发送至所述服务器处,并让服务器获知,该构建的访问请求是用于获取预设密钥的。此外,在所述访问请求中还可以包括由客户端添加的验证字符串,当该验证字符串通过服务器的验证之后,服务器才会向客户端反馈预设密钥。
在本实施方式中,所述验证字符串可以包含两部分,其中一部分为服务 器预测时间,另一部分为出厂设置值。其中,所述服务器预测时间可以是由所述客户端按照一定的方式计算出的时间。具体地,在所述客户端开始运行时,所述客户端可以从服务器处获取当前的服务器时间,该当前的服务器时间是由服务器提供的,可以记做A。此时,客户端可以将计算所述当前的服务器时间A与自身时间B1之间的时间差值A-B1,该时间差值可以作为服务器时间与客户端时间之间的误差。那么在所述客户端构建所述访问请求时,距离客户端开始运行的时间已经过去了一段时间,此时,客户端可以基于自身当前的时间B2以及所述时间差值A-B,计算得到所述服务器预测时间,该服务器预测时间可以表示为B2+(A-B)。在本实施方式中,该服务器预测时间可以用于表示构建的所述访问请求的时效性。服务器在接收到该访问请求后,可以计算服务器当前的实际时间与所述访问请求中的服务器预测时间之间的差值,若该差值小于或者等于指定阈值,表明该访问请求有效,可以进行进一步地处理。若该差值大于所述指定阈值,则表明该访问请求已经失效,则可以直接拒绝该访问请求。
在本实施方式中,除了所述服务器预测时间,在所述验证字符串中还可以包含一个出厂设置值,该出厂设置值可以是在具备访问权限的客户端中预先设置的。例如,所述出厂设置值可以是一串16进制的数据。该出厂设置值可以是所述客户端在购买了所述目标视频数据的访问权限之后,由所述目标视频数据的发行方提供的。这样,不具备访问权限的客户端,便不会拥有上述的出厂设置值。
在本实施方式中,客户端构建的所述访问请求可以是一个URL,通过该URL,客户端便可以访问服务器。服务器接收到所述客户端发来的访问请求后,可以对该访问请求中的验证字符串进行验证。在验证通过之后,客户端便可以获取到服务器在加密分片数据时所采用的预设密钥。
S25:向所述服务器发送包含所述分片数据的文件地址的文件获取请求,以从所述服务器中获取所述分片数据的文件地址指向的加密后的分片数据。
S27:利用所述预设密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
在本实施方式中,客户端可以基于修正后的索引文件中的文件地址,从服务器中获取相应的加密后的分片数据。具体地,客户端可以向所述服务器发送包含所述分片数据的文件地址的文件获取请求。该文件地址可以是加密后的 分片数据在服务器中的存放目录,这样,所述文件获取请求便可以指向加密后的分片数据。服务器在接收到该文件获取请求之后,可以将所述文件获取请求指向的加密后的分片数据反馈给所述客户端。客户端接收到加密后的分片数据后,便可以通过上述获取的预设密钥对所述加密后的分片数据进行解密,从而可以播放解密后的分片数据。
在本申请一个实施方式中,为了防止不法软件拦截服务器与客户端之间交互的数据,从而获取到服务器发送往客户端的密钥,服务器可以预先对所述密钥进行二次加密。具体地,服务器可以利用指定密钥对所述密钥进行加密,并将加密后的密钥保存至由所述指定字符串指向的目录下。在本实施方式中,可以采用常用的加密算法对所述密钥进行二次加密。例如,可以通过对称加密算法、非对称加密算法、哈希算法等对密钥进行加密。所述指定密钥可以是视频数据的发行厂商或者发行平台预先确定的,并且该指定密钥可以内置于具备访问权限的客户端内。这样,客户端从所述服务器中获取的预设密钥为经过指定密钥进行加密的密钥。客户端在获取到经过加密的密钥后,可以基于内置的所述指定密钥,将获取的所述预设密钥解密为原始密钥,后续便可以利用所述原始密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
实施例四
请参阅图5,本申请还提供一种客户端,所述客户端包括存储器和处理器,所述存储器中存储计算机程序,所述计算机程序被所述处理器执行时,实现以下步骤:
S21:向服务器发送指向目标视频数据的下载请求,并接收所述服务器反馈的所述目标视频数据的索引文件;其中,所述索引文件中包括指向加密后的分片数据的文件地址以及指定字符串,所述分片数据由所述目标视频数据划分得到;
S23:基于所述索引文件中的所述指定字符串构建访问请求,并向所述服务器发送所述访问请求,以从所述服务器中获取所述访问请求指向的预设密钥;
S25:向所述服务器发送包含所述分片数据的文件地址的文件获取请求,以从所述服务器中获取所述分片数据的文件地址指向的加密后的分片数据;
S27:利用所述预设密钥对获取的所述加密后的分片数据进行解密,并播 放解密后的分片数据。
在一个实施方式中,所述访问请求中包括所述指定字符串以及由客户端添加的验证字符串;其中,所述验证字符串包括服务器预测时间以及出厂设置值;相应地,所述计算机程序被所述处理器执行时,还实现以下步骤:
在所述客户端开始运行时,所述客户端从服务器处获取当前的服务器时间,并计算所述当前的服务器时间与自身时间之间的时间差值;
在所述客户端构建所述访问请求时,基于自身当前的时间以及所述时间差值,计算得到所述服务器预测时间。
在一个实施方式中,从所述服务器中获取的预设密钥为经过指定密钥进行加密的密钥;相应地,所述计算机程序被所述处理器执行时,还实现以下步骤:
基于内置的所述指定密钥,将获取的所述预设密钥解密为原始密钥;
利用所述原始密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
在本实施方式中,所述存储器可以包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方法的媒体加以存储。本实施方式所述的存储器又可以包括:利用电能方式存储信息的装置,如RAM、ROM等;利用磁能方式存储信息的装置,如硬盘、软盘、磁带、磁芯存储器、磁泡存储器、U盘;利用光学方式存储信息的装置,如CD或DVD。当然,还有其他方式的存储器,例如量子存储器、石墨烯存储器等等。
在本实施方式中,所述处理器可以按任何适当的方式实现。例如,所述处理器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式等等。
本说明书实施方式提供的客户端,其存储器和处理器实现的具体功能,可以与本说明书中的前述实施方式相对照解释,并能够达到前述实施方式的技术效果,这里便不再赘述。
请参阅图6,在本申请中,上述实施例中的技术方案可以应用于如图6所 示的计算机终端10上。计算机终端10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输模块106。本领域普通技术人员可以理解,图6所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,计算机终端10还可包括比图6中所示更多或者更少的组件,或者具有与图6所示不同的配置。
存储器104可用于存储应用软件的软件程序以及模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。尤其,针对服务器和客户端的实施方式来说,均可以参照前述方法的实施方式的介绍对照解释。
由上可见,本申请提供的技术方案,可以在当前的HLS协议的基础上进行改进。存储预设视频数据的服务器在构建索引文件时,首先可以按照常规的方式生成初始索引文件,在该初始索引文件中,可以包含各个加密后的分片数据的文件地址以及加密时所使用的预设密钥的明文信息。为了防止以明文形式显示的预设密钥被直接获取,在本申请中服务器可以利用指定字符串替换所述预设密钥,并且可以将修正之后的索引文件作为所述预设视频数据的索引文件。 当客户端需要下载所述预设视频数据时,服务器会向其反馈经过修正的索引文件。客户端从经过修正的索引文件中,无法直接获取到加密分片数据所使用的预设密钥,只能获取到上述的指定字符串。在本申请中,可以预先在对所述预设视频数据具备访问权限的客户端中设置一套私有规则,该私有规则可以基于上述的指定字符串构建出指向所述预设密钥的访问请求。这样,通过该访问请求,客户端才能从服务器中获取到预设密钥,从而对下载的经过加密的分片数据进行解密。而那些对所述预设视频数据没有访问权限的客户端,则无法获知上述的私有规则,因此便无法构建出符合要求的访问请求。这样,不具备访问权限的客户端无法获取到预设密钥,从而无法正常播放经过加密的分片数据,这样便可以对所述预设视频数据的版权进行保护。进一步地,为了防止服务器与客户端之间传输的预设密钥被拦截,可以对服务器中存储的预设密钥利用指定密钥进行二次加密,而该指定密钥可以预先存储于具备访问权限的客户端中。这样,具备访问权限的客户端在获取到加密的密钥后,可以通过内置的指定密钥对其进行解密,从而还原得到所述预设密钥。这样,便进一步提高了版权保护的力度。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (14)

  1. 一种密钥的提供方法,其特征在于,所述方法包括:
    将预设视频数据划分为多个分片数据,并基于预设密钥分别对所述多个分片数据进行加密,并将加密后的分片数据存放于指定目录下,以生成各个所述加密后的分片数据的文件地址;
    生成初始索引文件,所述初始索引文件中包含各个所述加密后的分片数据的文件地址以及所述预设密钥;
    利用指定字符串替换所述初始索引文件中的所述预设密钥,得到修正后的索引文件,并将所述修正后的索引文件作为所述预设视频数据的索引文件;
    接收客户端发来的指向所述预设视频数据的下载请求,并向所述客户端提供所述修正后的索引文件,以使得所述客户端基于所述修正后的索引文件中的所述指定字符串,构建指向所述预设密钥的访问请求;
    接收所述客户端发来的所述访问请求,并响应于所述访问请求,向所述客户端提供所述预设密钥。
  2. 根据权利要求1所述的方法,其特征在于,所述访问请求中包括所述指定字符串以及由所述客户端添加的验证字符串;其中,所述验证字符串包括服务器预测时间以及出厂设置值;
    在接收所述客户端发来的所述访问请求之后,所述方法还包括:
    计算服务器当前的实际时间与所述访问请求中的服务器预测时间之间的差值;
    当所述差值小于或者等于指定阈值并且所述访问请求中的所述出厂设置值与预设出厂设置值一致时,向所述客户端提供所述预设密钥。
  3. 根据权利要求2所述的方法,其特征在于,所述服务器预测时间由所述客户端按照以下方式确定:
    在所述客户端开始运行时,所述客户端从服务器处获取当前的服务器时间,并计算所述当前的服务器时间与自身时间之间的时间差值;
    在所述客户端构建所述访问请求时,基于自身当前的时间以及所述时间差 值,计算得到所述服务器预测时间。
  4. 根据权利要求1所述的方法,其特征在于,在将所述修正后的索引文件作为所述预设视频数据的索引文件之后,所述方法还包括:
    利用指定密钥对所述预设密钥进行加密,并将加密后的密钥保存至由所述指定字符串指向的目录下;
    相应地,在接收到所述客户端发来的所述访问请求后,向所述客户端提供所述加密后的密钥,以使得所述客户端基于内置的所述指定密钥,将所述加密后的密钥还原为所述预设密钥。
  5. 根据权利要求1所述的方法,其特征在于,向所述客户端提供所述预设密钥之后,所述方法还包括:
    接收所述客户端发来的文件获取请求,所述文件获取请求中包括从所述修正后的索引文件中识别的文件地址;
    将所述文件获取请求指向的加密后的分片数据反馈给所述客户端,以使得所述客户端通过所述预设密钥对所述加密后的分片数据进行解密,并播放解密后的分片数据。
  6. 一种服务器,所述服务器包括存储器和处理器,所述存储器中存储计算机程序,其特征在于,所述计算机程序被所述处理器执行时,实现以下步骤:
    将预设视频数据划分为多个分片数据,并基于预设密钥分别对所述多个分片数据进行加密,并将加密后的分片数据存放于指定目录下,以生成各个所述加密后的分片数据的文件地址;
    生成初始索引文件,所述初始索引文件中包含各个所述加密后的分片数据的文件地址以及所述预设密钥;
    利用指定字符串替换所述初始索引文件中的所述预设密钥,得到修正后的索引文件,并将所述修正后的索引文件作为所述预设视频数据的索引文件;
    接收客户端发来的指向所述预设视频数据的下载请求,并向所述客户端提供所述修正后的索引文件,以使得所述客户端基于所述修正后的索引文件中的所述指定字符串,构建指向所述预设密钥的访问请求;
    接收所述客户端发来的所述访问请求,并响应于所述访问请求,向所述客户端提供所述预设密钥。
  7. 根据权利要求6所述的服务器,其特征在于,所述计算机程序被所述处理器执行时,还实现以下步骤:
    利用指定密钥对所述预设密钥进行加密,并将加密后的密钥保存至由所述指定字符串指向的目录下;
    相应地,在接收到所述客户端发来的所述访问请求后,向所述客户端提供所述加密后的密钥,以使得所述客户端基于内置的所述指定密钥,将所述加密后的密钥还原为所述预设密钥。
  8. 根据权利要求6所述的服务器,其特征在于,所述计算机程序被所述处理器执行时,还实现以下步骤:
    接收所述客户端发来的文件获取请求,所述文件获取请求中包括从所述修正后的索引文件中识别的文件地址;
    将所述文件获取请求指向的加密后的分片数据反馈给所述客户端,以使得所述客户端通过所述预设密钥对所述加密后的分片数据进行解密,并播放解密后的分片数据。
  9. 一种视频播放方法,其特征在于,所述方法包括:
    向服务器发送指向目标视频数据的下载请求,并接收所述服务器反馈的所述目标视频数据的索引文件;其中,所述索引文件中包括指向加密后的分片数据的文件地址以及指定字符串,所述分片数据由所述目标视频数据划分得到;
    基于所述索引文件中的所述指定字符串构建访问请求,并向所述服务器发送所述访问请求,以从所述服务器中获取所述访问请求指向的预设密钥;
    向所述服务器发送包含所述分片数据的文件地址的文件获取请求,以从所述服务器中获取所述分片数据的文件地址指向的加密后的分片数据;
    利用所述预设密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
  10. 根据权利要求9所述的方法,其特征在于,所述访问请求中包括所述指定字符串以及由客户端添加的验证字符串;其中,所述验证字符串包括服务器预测时间以及出厂设置值;所述服务器预测时间由所述客户端按照以下方式确定:
    在所述客户端开始运行时,所述客户端从服务器处获取当前的服务器时间,并计算所述当前的服务器时间与自身时间之间的时间差值;
    在所述客户端构建所述访问请求时,基于自身当前的时间以及所述时间差值,计算得到所述服务器预测时间。
  11. 根据权利要求9所述的方法,其特征在于,从所述服务器中获取的预设密钥为经过指定密钥进行加密的密钥;相应地,在获取到所述预设密钥之后,所述方法还包括:
    基于内置的所述指定密钥,将获取的所述预设密钥解密为原始密钥;
    利用所述原始密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
  12. 一种客户端,所述客户端包括存储器和处理器,所述存储器中存储计算机程序,其特征在于,所述计算机程序被所述处理器执行时,实现以下步骤:
    向服务器发送指向目标视频数据的下载请求,并接收所述服务器反馈的所述目标视频数据的索引文件;其中,所述索引文件中包括指向加密后的分片数据的文件地址以及指定字符串,所述分片数据由所述目标视频数据划分得到;
    基于所述索引文件中的所述指定字符串构建访问请求,并向所述服务器发送所述访问请求,以从所述服务器中获取所述访问请求指向的预设密钥;
    向所述服务器发送包含所述分片数据的文件地址的文件获取请求,以从所述服务器中获取所述分片数据的文件地址指向的加密后的分片数据;
    利用所述预设密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
  13. 根据权利要求12所述的客户端,其特征在于,所述访问请求中包括所述指定字符串以及由客户端添加的验证字符串;其中,所述验证字符串包括服 务器预测时间以及出厂设置值;相应地,所述计算机程序被所述处理器执行时,还实现以下步骤:
    在所述客户端开始运行时,所述客户端从服务器处获取当前的服务器时间,并计算所述当前的服务器时间与自身时间之间的时间差值;
    在所述客户端构建所述访问请求时,基于自身当前的时间以及所述时间差值,计算得到所述服务器预测时间。
  14. 根据权利要求12所述的客户端,其特征在于,从所述服务器中获取的预设密钥为经过指定密钥进行加密的密钥;相应地,所述计算机程序被所述处理器执行时,还实现以下步骤:
    基于内置的所述指定密钥,将获取的所述预设密钥解密为原始密钥;
    利用所述原始密钥对获取的所述加密后的分片数据进行解密,并播放解密后的分片数据。
PCT/CN2018/079499 2018-02-09 2018-03-19 一种密钥的提供、视频播放方法、服务器及客户端 WO2019153433A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18899029.5A EP3557876A4 (en) 2018-02-09 2018-03-19 SECRET KEY PROVISION, VIDEO PLAYBACK, SERVER AND CLIENT
US16/516,326 US11055429B2 (en) 2018-02-09 2019-07-19 Key providing method, video playing method, server and client

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810136728.5A CN110138716B (zh) 2018-02-09 2018-02-09 一种密钥的提供、视频播放方法、服务器及客户端
CN201810136728.5 2018-02-09

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/516,326 Continuation US11055429B2 (en) 2018-02-09 2019-07-19 Key providing method, video playing method, server and client

Publications (1)

Publication Number Publication Date
WO2019153433A1 true WO2019153433A1 (zh) 2019-08-15

Family

ID=67549093

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/079499 WO2019153433A1 (zh) 2018-02-09 2018-03-19 一种密钥的提供、视频播放方法、服务器及客户端

Country Status (4)

Country Link
US (1) US11055429B2 (zh)
EP (1) EP3557876A4 (zh)
CN (1) CN110138716B (zh)
WO (1) WO2019153433A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112530068A (zh) * 2020-10-29 2021-03-19 重庆恢恢信息技术有限公司 一种通过物联网实现智慧建筑工地的人员识别方法
CN113301431A (zh) * 2021-01-22 2021-08-24 阿里巴巴集团控股有限公司 视频数据的加解密方法、装置、电子设备及系统
CN113923482A (zh) * 2021-09-02 2022-01-11 北京奇艺世纪科技有限公司 一种视频播放方法、系统、电子设备及存储介质
CN114070592A (zh) * 2021-11-09 2022-02-18 乐美科技股份私人有限公司 一种资源下载方法、装置、终端及服务器
CN114338033A (zh) * 2021-12-06 2022-04-12 北京达佳互联信息技术有限公司 一种请求处理方法、装置、设备及存储介质
CN114554286A (zh) * 2021-12-09 2022-05-27 武汉众智数字技术有限公司 一种基于gb35114的音视频数据处理方法及系统

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110677242B (zh) * 2019-08-28 2022-08-09 RealMe重庆移动通信有限公司 秘钥处理方法、秘钥处理装置及终端设备
CN110896505A (zh) * 2019-11-29 2020-03-20 天脉聚源(杭州)传媒科技有限公司 一种视频链接防盗方法、系统、装置及存储介质
CN113014956B (zh) * 2019-12-20 2022-06-03 腾讯科技(深圳)有限公司 视频播放方法以及装置
CN113141542B (zh) * 2020-01-20 2023-07-07 亦非云互联网技术(上海)有限公司 基于区块链的视频流安全播放系统、方法、介质及服务端
US11630860B2 (en) * 2020-04-30 2023-04-18 Arris Enterprises Llc System and method for the migration of legacy digital content
CN111586062A (zh) * 2020-05-11 2020-08-25 广州中科智巡科技有限公司 一种标注管理方法及系统
CN111611606B (zh) * 2020-05-22 2023-06-20 北京百度网讯科技有限公司 文件加密、解密方法和装置
CN113727184B (zh) * 2020-05-25 2023-11-03 京东城市(北京)数字科技有限公司 视频播放方法、装置、系统、存储介质以及电子设备
CN112416450B (zh) * 2020-06-05 2023-02-17 上海哔哩哔哩科技有限公司 资源加密及展示方法及系统
CN111787361B (zh) * 2020-07-13 2022-02-11 安徽云森物联网科技有限公司 一种rtsp视频流传输方法、系统、设备及可存储介质
CN112261118B (zh) * 2020-10-19 2022-03-25 腾讯科技(深圳)有限公司 多媒体数据的异常检测方法、终端及服务器
CN112261040B (zh) * 2020-10-21 2023-02-07 厦门悦讯信息科技股份有限公司 一种在线音视频防盗方法及系统
CN112257088B (zh) * 2020-10-26 2022-02-22 上海睿成软件有限公司 一种文件缓存加密系统、设备及存储介质
CN112104895B (zh) * 2020-11-17 2021-02-26 浙江岩华文化科技有限公司 视频加解密方法、服务器、机顶盒插件及视频播放系统
CN113132484B (zh) * 2021-04-20 2022-10-25 北京奇艺世纪科技有限公司 一种数据传输方法及装置
US20220343925A1 (en) * 2021-04-22 2022-10-27 Xandrie SA System and method for encoding audio data
CN113259720B (zh) * 2021-06-15 2022-05-27 杭州当贝网络科技有限公司 基于hls协议的视频加密方法和系统
CN113489729B (zh) * 2021-07-09 2023-08-29 福州数据技术研究院有限公司 一种基于预置视频的网页验证生成方法和系统
CN114124529B (zh) * 2021-11-23 2024-03-29 国网山东省电力公司电力科学研究院 用于并网测试数据加密/解密的方法及装置、数据处理方法及装置
CN114448999A (zh) * 2021-12-21 2022-05-06 杭州华橙软件技术有限公司 数据存储方法、装置、系统、电子装置和存储介质
CN114666616A (zh) * 2022-03-16 2022-06-24 同方知网数字出版技术股份有限公司 一种低成本高保密的直播回放方法
CN114727157B (zh) * 2022-03-31 2022-11-15 慧之安信息技术股份有限公司 基于平台的视频加解密方法和系统
CN115567328B (zh) * 2022-12-06 2023-03-14 杭州菲助科技有限公司 一种视频资源地址的安全加密传输方法、装置及应用
CN117150537B (zh) * 2023-11-01 2024-01-09 北京睿航至臻科技有限公司 一种数据库数据加密解密方法和系统

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120246462A1 (en) * 2011-03-23 2012-09-27 General Instrument Corporation System and methods for providing live streaming content using digital rights management-based key management
CN103428583A (zh) * 2013-08-12 2013-12-04 深圳市同洲电子股份有限公司 一种对流媒体文件的保护方法和数字电视终端
CN104902343A (zh) * 2015-05-26 2015-09-09 北京微吼时代科技有限公司 一种传输和播放音视频与消息的方法、服务器及终端
CN105939484A (zh) * 2016-06-14 2016-09-14 深圳创维数字技术有限公司 一种音视频的加密播放方法及其系统
CN106331751A (zh) * 2016-08-31 2017-01-11 广州易方信息科技有限公司 一种基于iOS操作系统的在线加密切片视频播放方法
CN106791986A (zh) * 2017-01-10 2017-05-31 环球智达科技(北京)有限公司 一种hls直播索引列表加密防盗链系统及方法
CN106790074A (zh) * 2016-12-21 2017-05-31 中国传媒大学 一种基于hls协议的细粒度流媒体视频加密、解密方法
CN106936770A (zh) * 2015-12-30 2017-07-07 玲珑视界科技(北京)有限公司 一种hls索引列表加密防盗链系统及方法

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9237387B2 (en) * 2009-10-06 2016-01-12 Microsoft Technology Licensing, Llc Low latency cacheable media streaming
TWI510066B (zh) * 2010-03-22 2015-11-21 Echostar Technologies Llc 用於安全串流媒體內容之系統和方法
CN101883255A (zh) * 2010-06-17 2010-11-10 中兴通讯股份有限公司 一种交互式网络电视中点播节目的处理系统及其方法
US8983076B2 (en) * 2011-12-22 2015-03-17 Adobe Systems Incorporated Methods and apparatus for key delivery in HTTP live streaming
US9215065B2 (en) * 2012-02-17 2015-12-15 Cbs Interactive Inc. Media player security for full length episodes
EP2929695A1 (en) * 2012-12-10 2015-10-14 Koninklijke KPN N.V. Digital rights management for segmented content
US9008305B2 (en) * 2013-03-15 2015-04-14 Startal, Inc. Video data delivery protection
US20150271541A1 (en) * 2014-03-19 2015-09-24 Time Warner Cable Enterprises Llc Apparatus and methods for recording a media stream
CN103957436B (zh) * 2014-05-13 2016-09-07 北京清源新创科技有限公司 一种基于ott业务的视频防盗链方法
CN104320377B (zh) * 2014-09-25 2017-07-07 华为技术有限公司 一种流媒体文件的防盗链方法及设备
CN104333818A (zh) * 2014-10-17 2015-02-04 中兴通讯股份有限公司 一种http实时流媒体分片的拼接方法及拼接系统
CN105915494A (zh) * 2015-12-07 2016-08-31 乐视云计算有限公司 防盗链方法及系统
CN107404379A (zh) * 2016-05-18 2017-11-28 中兴通讯股份有限公司 一种流媒体文件的处理方法及装置
CN105847869B (zh) * 2016-05-24 2019-06-18 武汉斗鱼网络科技有限公司 一种加密播放方法与装置
US10432685B2 (en) * 2016-05-31 2019-10-01 Brightcove, Inc. Limiting key request rates for streaming media
CN106028064A (zh) * 2016-06-24 2016-10-12 武汉斗鱼网络科技有限公司 一种直播视频流播放地址权限校验方法及系统
CN106028154B (zh) * 2016-06-30 2019-05-03 青岛海信电器股份有限公司 一种基于hls协议的节目播放方法和装置
CN107659829B (zh) * 2017-11-06 2020-05-22 网宿科技股份有限公司 一种视频加密的方法和系统

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120246462A1 (en) * 2011-03-23 2012-09-27 General Instrument Corporation System and methods for providing live streaming content using digital rights management-based key management
CN103428583A (zh) * 2013-08-12 2013-12-04 深圳市同洲电子股份有限公司 一种对流媒体文件的保护方法和数字电视终端
CN104902343A (zh) * 2015-05-26 2015-09-09 北京微吼时代科技有限公司 一种传输和播放音视频与消息的方法、服务器及终端
CN106936770A (zh) * 2015-12-30 2017-07-07 玲珑视界科技(北京)有限公司 一种hls索引列表加密防盗链系统及方法
CN105939484A (zh) * 2016-06-14 2016-09-14 深圳创维数字技术有限公司 一种音视频的加密播放方法及其系统
CN106331751A (zh) * 2016-08-31 2017-01-11 广州易方信息科技有限公司 一种基于iOS操作系统的在线加密切片视频播放方法
CN106790074A (zh) * 2016-12-21 2017-05-31 中国传媒大学 一种基于hls协议的细粒度流媒体视频加密、解密方法
CN106791986A (zh) * 2017-01-10 2017-05-31 环球智达科技(北京)有限公司 一种hls直播索引列表加密防盗链系统及方法

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112530068A (zh) * 2020-10-29 2021-03-19 重庆恢恢信息技术有限公司 一种通过物联网实现智慧建筑工地的人员识别方法
CN112530068B (zh) * 2020-10-29 2023-09-22 重庆恢恢信息技术有限公司 一种通过物联网实现智慧建筑工地的人员识别方法
CN113301431A (zh) * 2021-01-22 2021-08-24 阿里巴巴集团控股有限公司 视频数据的加解密方法、装置、电子设备及系统
CN113923482A (zh) * 2021-09-02 2022-01-11 北京奇艺世纪科技有限公司 一种视频播放方法、系统、电子设备及存储介质
CN114070592A (zh) * 2021-11-09 2022-02-18 乐美科技股份私人有限公司 一种资源下载方法、装置、终端及服务器
CN114338033A (zh) * 2021-12-06 2022-04-12 北京达佳互联信息技术有限公司 一种请求处理方法、装置、设备及存储介质
CN114554286A (zh) * 2021-12-09 2022-05-27 武汉众智数字技术有限公司 一种基于gb35114的音视频数据处理方法及系统
CN114554286B (zh) * 2021-12-09 2023-12-15 武汉众智数字技术有限公司 一种基于gb35114的音视频数据处理方法及系统

Also Published As

Publication number Publication date
US20190340384A1 (en) 2019-11-07
CN110138716A (zh) 2019-08-16
EP3557876A4 (en) 2020-02-12
US11055429B2 (en) 2021-07-06
CN110138716B (zh) 2020-11-27
EP3557876A1 (en) 2019-10-23

Similar Documents

Publication Publication Date Title
WO2019153433A1 (zh) 一种密钥的提供、视频播放方法、服务器及客户端
WO2017215514A1 (zh) 音视频的加密播放方法及其系统
US10055553B2 (en) PC secure video path
US8832727B2 (en) Method and authentication server for verifying access identity of set-top box
KR101366243B1 (ko) 인증을 통한 데이터 전송 방법 및 그 장치
US20130283033A1 (en) Token-based entitlement verification for streaming media decryption
CN107707504B (zh) 一种流媒体的播放方法、系统以及服务器和客户端
US11432039B2 (en) Systems and methods for data processing, storage, and retrieval from a server
KR20100008740A (ko) 사용자 인터페이스에서 보안 서비스를 제공하는 장치 및 방법
CN113259720B (zh) 基于hls协议的视频加密方法和系统
WO2015184743A1 (zh) 对视频直播进行防盗链处理的方法及其系统
WO2017054620A1 (zh) 基于dvb多终端节目播放方法及系统、机顶盒及移动终端
US20110113443A1 (en) IP TV With DRM
CN106534894A (zh) 一种加密视频分发方法及系统
CN110392288B (zh) 一种多媒体文件播放方法、终端装置以及终端设备
US20140108804A1 (en) System and method for verifying the authenticity of an electronic device
WO2018054144A1 (zh) 对称密钥动态生成方法、装置、设备及系统
CN104244030A (zh) 一种录制节目共享方法及系统
CN117729379A (zh) 一种视频播放方法、装置及电子设备

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018899029

Country of ref document: EP

Effective date: 20190718

NENP Non-entry into the national phase

Ref country code: DE