Video playing method and device, equipment, medium and product
By using server encryption and client decryption in HLS technology, the video security problem caused by fixed content of m3u8 files is solved, the secure transmission of video and keys is realized, and the security of video playback is improved. sex.
Patent Information
- Application Number
- CN202411357869.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-10
AI Technical Summary
In the existing HTTP Live Streaming (HLS) technology, the fixed content of m3u8 files is easily acquired, which makes it difficult to guarantee the security of encrypted video slice files, especially when the key file is leaked, the video has the risk of being cracked and has low security.
The server receives the client's target verification information, uses this information to encrypt the second address in the first file, and sends the encrypted address to the client. After the client decrypts, the client obtains the key address and obtains the video resolution key from the server for Decryption playback ensures encrypted transmission of key addresses, which only involves the encryption and decryption process of the client and server, improving security.
The video resolution key is obtained through the server encryption key address and client decryption, which realizes different transmission of video and keys, enhances the security of video and avoids the risk of video being cracked due to key leakage.
Smart Images

Figure CN119299797A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information security technology, and in particular relates to a video playback method, device, equipment, medium and product. Background Art
[0002] HTTP Live Streaming (HLS), a streaming media network transmission protocol based on HyperText Transfer Protocol (HTTP), is widely used in the field of video on demand and live broadcast. It consists of an m3u8 file and multiple video slice files. The standard encryption method natively supported by HLS is to encrypt the video slice file with a key after the video is uploaded, and specify the key acquisition method through the m3u8 file, and obtain the key for decryption and playback when playing the video. Since the content of the m3u8 file is usually fixed, once the m3u8 file is obtained by others, the encrypted video slice file will be cracked, and the security of the video slice file is difficult to guarantee.
[0003] In the prior art, the client sends a file acquisition request carrying the address of the m3u8 file to the server, and the server rewrites the key file in the m3u8 file through the content distribution network (Content Delivery Network, CDN), and returns it to the client, and the client obtains the video parsing key according to the key file, and downloads the video slice file according to the video address in the m3u8 file, obtains the video, and decrypts it using the video parsing key to realize the playback of the video. In the transmission and rewriting process of the m3u8 file, it is necessary to pass through the CDN. Once the key file is leaked, the video is at risk of being cracked, and the security is relatively low. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device, medium and product for playing a video. The server receives target verification information sent by the client, and uses the target verification information to encrypt the second address in the first file, that is, the server encrypts the second address in the first file, puts it into the first file, obtains the second file, and sends it to the client. After decryption, the client can obtain the key of the second address to decrypt and play the video, that is, the address of the encrypted key is obtained by the server. The client needs to first obtain the address of the video and the encrypted key address from the server, decrypt the key address, obtain the video parsing key from the server according to the key address, and then obtain the video for decryption. The video and the key are not transmitted at the same time, and the key address needs to be encrypted and transmitted by the server. The encryption and decryption process only involves the client and the server, thereby improving security.
[0005] In a first aspect, an embodiment of the present application provides a video playback method, which is applied to a server, comprising:
[0006] Upon receiving a file acquisition request sent by a client, acquiring a first file from a first address, wherein the file acquisition request includes a first address of the first file corresponding to the target video and target verification information, and the first file includes a second address of a video parsing key and a third address of the target video;
[0007] The second address in the first file is updated to a fourth address to obtain a second file, where the fourth address is an address obtained by encrypting the second address using the target verification information;
[0008] Sending the second file to the client, so that the client can decrypt the fourth address using the target verification information to obtain the second address;
[0009] Upon receiving a key acquisition request sent by the client, acquiring a video parsing key from a second address, wherein the key acquisition request includes the second address;
[0010] The video parsing key is sent to the client, so that the client can obtain the target video from the third address, and use the video parsing key to decrypt the target video to play the target video.
[0011] In a possible implementation, when receiving a file acquisition request sent by a client, before acquiring the first file from the first address, the method further includes:
[0012] Receive a file address acquisition request sent by a client, where the file address acquisition request includes a video identifier of a target video;
[0013] Generate target verification information according to preset verification information generation rules;
[0014] Obtain a first address of a first file corresponding to the video identifier;
[0015] The first address and target verification information are sent to the client.
[0016] In a possible implementation, generating target verification information according to a preset verification information generation rule includes:
[0017] Obtain the target timestamp and the preset encryption key. The target timestamp is the timestamp when the server receives the file address acquisition request sent by the client.
[0018] Encrypt the target timestamp using a preset encryption key to obtain initial verification information;
[0019] The initial verification information is encrypted using a first preset encryption rule to obtain target verification information.
[0020] In one possible implementation, before updating the second address in the first file to the fourth address, the method further includes:
[0021] Decrypt the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule to obtain initial verification information;
[0022] Decrypt the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain a target timestamp;
[0023] The target verification information and the target timestamp are added to the second address to obtain a fourth address.
[0024] In a possible implementation, the key acquisition request further includes target verification information; when the key acquisition request sent by the client is received, acquiring the video parsing key from the second address includes:
[0025] Upon receiving the key acquisition request sent by the client, verify the target authentication information;
[0026] When the target verification information meets the preset condition, the video parsing key is obtained from the second address.
[0027] In a possible implementation, sending a video parsing key to a client includes:
[0028] Encrypting the video parsing key using a second preset encryption rule to obtain a target video parsing key;
[0029] A target video parsing key is sent to the client so that the client can obtain the target video from a third address, and the target video parsing key is decrypted using the second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key, and the target video is decrypted using the video parsing key to play the target video.
[0030] In a second aspect, an embodiment of the present application provides a video playback method, which is applied to a client, comprising:
[0031] Upon receiving a click input for a target video, obtaining a first address of a first file corresponding to the target video and target verification information;
[0032] Send a file acquisition request to the server, the file acquisition request is used to instruct the server to obtain a first file from a first address, update a second address in the first file to a fourth address encrypted by using target verification information to obtain a second file, the file acquisition request includes the first address and the target verification information, and the first file also includes a third address of the target video;
[0033] When receiving the second file sent by the server, decrypt the fourth address using the target verification information to obtain the second address;
[0034] Sending a key acquisition request to the server, where the key acquisition request is used to instruct the server to obtain the video parsing key from the second address, and the key acquisition request includes the second address;
[0035] When the video parsing key sent by the server is received, the target video is obtained from the third address, and the target video is decrypted using the video parsing key to play the target video.
[0036] In a possible implementation, when a click input on a target video is received, obtaining a first address of a first file corresponding to the target video and target verification information includes:
[0037] When receiving a click input for a target video, obtaining a video identifier of the target video;
[0038] Send a file address acquisition request to the server, the file address acquisition request is used to instruct the server to generate target verification information according to a preset verification information generation rule, and obtain the first address of the first file corresponding to the video identifier, the file address acquisition request including the video identifier;
[0039] Receive the first address and target verification information sent by the server.
[0040] In one possible embodiment, the target verification information is obtained by the server using a first preset encryption rule to encrypt the initial verification information, and the initial verification information is obtained by the server using a preset encryption key to encrypt the target timestamp. The target timestamp is the timestamp when the server receives the file address acquisition request sent by the client.
[0041] In a possible implementation, when receiving the second file sent by the server, decrypting the fourth address using the target verification information to obtain the second address includes:
[0042] When receiving the second file sent by the server, decrypting the target verification information according to the first preset decryption rule corresponding to the first preset encryption rule to obtain initial verification information;
[0043] Decrypt the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain a target timestamp;
[0044] The target verification information and the target timestamp are deleted from the fourth address to obtain the second address.
[0045] In one possible embodiment, the key acquisition request also includes target verification information; the key acquisition request is specifically used to instruct the server to verify the target verification information, and obtain the video parsing key from the second address when the target verification information meets preset conditions.
[0046] In a possible implementation, upon receiving a video parsing key sent by a server, obtaining a target video from a third address, and decrypting the target video using the video parsing key to play the target video, including:
[0047] Upon receiving the target video parsing key sent by the server, obtaining the target video from the third address, wherein the target video parsing key is obtained by encrypting the video parsing key by the server using the second preset encryption rule;
[0048] Decrypting the target video parsing key using a second preset decryption rule corresponding to the second preset encryption rule to obtain a video parsing key;
[0049] The target video is decrypted using the video parsing key to play the target video.
[0050] In a third aspect, an embodiment of the present application provides a video playback device, which is applied to a server, including:
[0051] an acquisition module, configured to acquire a first file from a first address upon receiving a file acquisition request sent by a client, wherein the file acquisition request includes a first address of the first file corresponding to a target video and target verification information, and the first file includes a second address of a video parsing key and a third address of the target video;
[0052] An updating module, used for updating the second address in the first file to a fourth address to obtain a second file, wherein the fourth address is an address obtained by encrypting the second address using the target verification information;
[0053] A sending module, used for sending the second file to the client, so that the client can decrypt the fourth address by using the target verification information to obtain the second address;
[0054] The acquisition module is further used to acquire the video parsing key from the second address when receiving a key acquisition request sent by the client, the key acquisition request including the second address;
[0055] The sending module is also used to send a video parsing key to the client, so that the client can obtain the target video from the third address and use the video parsing key to decrypt the target video to play the target video.
[0056] In a possible embodiment, the device further includes:
[0057] A receiving module, configured to receive a file address acquisition request sent by a client before acquiring the first file from the first address when receiving the file acquisition request sent by the client, wherein the file address acquisition request includes a video identifier of a target video;
[0058] A generation module, used to generate target verification information according to preset verification information generation rules;
[0059] The acquisition module is further used to acquire a first address of a first file corresponding to the video identifier;
[0060] The sending module is also used to send the first address and target verification information to the client.
[0061] In one possible implementation, the generating module is specifically used for:
[0062] Obtain the target timestamp and the preset encryption key. The target timestamp is the timestamp when the server receives the file address acquisition request sent by the client.
[0063] Encrypt the target timestamp using a preset encryption key to obtain initial verification information;
[0064] The initial verification information is encrypted using a first preset encryption rule to obtain target verification information.
[0065] In a possible embodiment, the device further includes:
[0066] a decryption module, configured to decrypt the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule before updating the second address in the first file to the fourth address, to obtain initial verification information;
[0067] The decryption module is further used to decrypt the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain a target timestamp;
[0068] An adding module is used to add target verification information and a target timestamp to the second address to obtain a fourth address.
[0069] In a possible implementation, the key acquisition request further includes target verification information; the acquisition module is specifically used to:
[0070] Upon receiving the key acquisition request sent by the client, verify the target authentication information;
[0071] When the target verification information meets the preset condition, the video parsing key is obtained from the second address.
[0072] In one possible implementation, the sending module is specifically used for:
[0073] Encrypting the video parsing key using a second preset encryption rule to obtain a target video parsing key;
[0074] A target video parsing key is sent to the client so that the client can obtain the target video from a third address, and the target video parsing key is decrypted using the second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key, and the target video is decrypted using the video parsing key to play the target video.
[0075] In a fourth aspect, an embodiment of the present application provides a video playback device, which is applied to a client, including:
[0076] An acquisition module, configured to acquire a first address of a first file corresponding to the target video and target verification information when a click input to the target video is received;
[0077] A sending module, used to send a file acquisition request to a server, the file acquisition request is used to instruct the server to acquire a first file from a first address, update a second address in the first file to a fourth address encrypted by using target verification information to obtain a second file, the file acquisition request includes the first address and the target verification information, and the first file also includes a third address of the target video;
[0078] a decryption module, configured to decrypt the fourth address using the target verification information to obtain the second address when receiving the second file sent by the server;
[0079] The sending module is further used to send a key acquisition request to the server, where the key acquisition request is used to instruct the server to obtain the video parsing key from the second address, and the key acquisition request includes the second address;
[0080] The acquisition module is also used to obtain the target video from the third address when receiving the video parsing key sent by the server, and decrypt the target video using the video parsing key to play the target video.
[0081] In a possible implementation, the acquisition module is specifically used for:
[0082] When receiving a click input for a target video, obtaining a video identifier of the target video;
[0083] Send a file address acquisition request to the server, the file address acquisition request is used to instruct the server to generate target verification information according to a preset verification information generation rule, and obtain the first address of the first file corresponding to the video identifier, the file address acquisition request including the video identifier;
[0084] Receive the first address and target verification information sent by the server.
[0085] In one possible embodiment, the target verification information is obtained by the server using a first preset encryption rule to encrypt the initial verification information, and the initial verification information is obtained by the server using a preset encryption key to encrypt the target timestamp. The target timestamp is the timestamp when the server receives the file address acquisition request sent by the client.
[0086] In one possible implementation, the decryption module is specifically used for:
[0087] When receiving the second file sent by the server, decrypting the target verification information according to the first preset decryption rule corresponding to the first preset encryption rule to obtain initial verification information;
[0088] Decrypt the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain a target timestamp;
[0089] The target verification information and the target timestamp are deleted from the fourth address to obtain the second address.
[0090] In one possible embodiment, the key acquisition request also includes target verification information; the key acquisition request is specifically used to instruct the server to verify the target verification information, and obtain the video parsing key from the second address when the target verification information meets preset conditions.
[0091] In a possible implementation, the acquisition module is specifically used for:
[0092] Upon receiving the target video parsing key sent by the server, obtaining the target video from the third address, wherein the target video parsing key is obtained by encrypting the video parsing key by the server using the second preset encryption rule;
[0093] Decrypting the target video parsing key using a second preset decryption rule corresponding to the second preset encryption rule to obtain a video parsing key;
[0094] The target video is decrypted using the video parsing key to play the target video.
[0095] In a fifth aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0096] a processor and a memory storing computer program instructions;
[0097] When the processor executes the computer program instructions, any of the above-mentioned video playback methods is implemented.
[0098] In a sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any of the above-mentioned video playback methods is implemented.
[0099] In a seventh aspect, an embodiment of the present application provides a computer program product, characterized in that when instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the above-mentioned video playback methods.
[0100] The video playback method, device, equipment, medium and product of the embodiments of the present application are applied to the server, including: upon receiving a file acquisition request sent by a client, acquiring a first file from a first address, the file acquisition request including a first address of the first file corresponding to the target video and target verification information, the first file including a second address of a video parsing key and a third address of the target video; updating the second address in the first file to a fourth address to obtain a second file, the fourth address being an address obtained by encrypting the second address using the target verification information; sending the second file to the client, so that the client can decrypt the fourth address using the target verification information to obtain the second address; upon receiving a key acquisition request sent by the client, acquiring a video parsing key from the second address, the key acquisition request including the second address; sending the video parsing key to the client, so that the client can obtain the target video from the third address, and decrypt the target video using the video parsing key to play the target video.
[0101] In this way, the server receives the target verification information sent by the client, and uses the target verification information to encrypt the second address in the first file, that is, the server encrypts the second address in the first file, puts it in the first file, obtains the second file, and sends it to the client. After decryption, the client can obtain the key of the second address to decrypt and play the video, that is, through the server's encrypted key address, the client needs to first obtain the video address and the encrypted key address from the server, after decrypting the key address, obtain the video parsing key from the server according to the key address, and then obtain the video for decryption. The video and the key are not transmitted at the same time, and the key address needs to be encrypted and transmitted by the server. The encryption and decryption process only involves the client and the server, which improves security. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0103] Figure 1 It is a flowchart of a method for playing a video provided by an embodiment of the present application;
[0104] Figure 2 is a flowchart of a video playback method provided by another embodiment of the present application;
[0105] Figure 3 is a flowchart of a video playback method provided by another embodiment of the present application;
[0106] Figure 4 is a flowchart of a video playback method provided by yet another embodiment of the present application;
[0107] Figure 5 is a flowchart of a video playback method provided by yet another embodiment of the present application;
[0108] Figure 6 is a structural diagram of a video playback device applied to a server provided in yet another embodiment of the present application;
[0109] Figure 7 is a structural diagram of a video playback device applied to a client provided by another embodiment of the present application;
[0110] Figure 8 It is a structural diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0111] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0112] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0113] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0114] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0115] HTTP Live Streaming (HLS) is a streaming media network transmission protocol based on HTTP, which is widely used in the field of video on demand and live broadcast. It consists of an m3u8 file and multiple video slice files. The standard encryption method natively supported by HLS is to encrypt the video slice file with a key after the video is uploaded, and specify the key acquisition method through the m3u8 file. When playing the video, the key is obtained for decryption and playback. Since the content of the m3u8 file is usually fixed, once the m3u8 file is obtained by others, the encrypted video slice file will be cracked, and the security of the video slice file is difficult to guarantee.
[0116] In the prior art, the client sends a file acquisition request carrying the address of the m3u8 file to the server, and the server rewrites the key file in the m3u8 file through the content distribution network (Content Delivery Network, CDN), and returns it to the client, and the client obtains the video parsing key according to the key file, and downloads the video slice file according to the video address in the m3u8 file, obtains the video, and decrypts it using the video parsing key to realize the playback of the video. In the transmission and rewriting process of the m3u8 file, it is necessary to pass through the CDN. Once the key file is leaked, the video is at risk of being cracked, and the security is relatively low.
[0117] In order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment, medium and product for playing a video. In the method for playing a video provided by the embodiments of the present application, the server receives the target verification information sent by the client, and uses the target verification information to encrypt the second address in the first file, that is, the server encrypts the second address in the first file, puts it into the first file, obtains the second file, and sends it to the client. After the client decrypts, it can obtain the key of the second address to decrypt and play the video, that is, through the address of the encrypted key on the server, the client needs to first obtain the address of the video and the encrypted key address from the server, after decrypting the key address, obtain the video parsing key from the server according to the key address, and then obtain the video for decryption. The video and the key are not transmitted at the same time, and the key address needs to be encrypted and transmitted by the server. The encryption and decryption process only involves the client and the server, which improves security.
[0118] The following first introduces the video playback method provided by the embodiment of the present application. Figure 1As shown, the video playback method provided in the embodiment of the present application includes the following steps.
[0119] S110. When receiving a click input for a target video, the client obtains a first address of a first file corresponding to the target video and target verification information, where the first file includes a second address of a video parsing key and a third address of the target video.
[0120] Here, the first file includes the m3u8 file. The target verification information is set in advance.
[0121] In some embodiments, the first address is an address in the server. The client includes a player, and the server includes a video on demand platform. The first file is saved in advance to the server. Specifically, the first file is a video file uploaded to the server and stored in the format of an m3u8 file after being transcoded.
[0122] It is understood that the address refers to the URL address, including the link.
[0123] S120: The client sends a file acquisition request to the server, where the file acquisition request includes a first address of a first file corresponding to the target video and target verification information.
[0124] In some embodiments, the target verification information is used as a request parameter of the first address, and the client synchronously sends the first address and the target verification information to the server.
[0125] S130. The server obtains the first file from the first address, updates the second address in the first file to a fourth address, and obtains the second file, where the fourth address is an address obtained by encrypting the second address using the target verification information.
[0126] Here, the second address refers to the index address of the video file.
[0127] In some embodiments, after receiving the file acquisition request sent by the client, the server obtains the first file at the first address, and Nginx rewrites the first file, updates the second address in the first file to the fourth address, and obtains the second file. The fourth address is an address obtained by encrypting the second address using the target verification information. For example, the target verification information is appended to the end of the second address.
[0128] S140: The server sends the second file to the client.
[0129] It can be understood that the second file includes the fourth address and the third address of the target video.
[0130] S150: The client uses the target verification information to decrypt the fourth address to obtain the second address.
[0131] In some embodiments, the client parses the fourth address through the second file, and decrypts the fourth address using the target verification information to obtain the second address.
[0132] It should be noted that if the client can obtain the decryption result, it means that the second address can be obtained. Otherwise, the decryption result cannot be obtained and an error will be reported during the decryption process.
[0133] S160: The client sends a key acquisition request to the server, where the key acquisition request includes the second address.
[0134] S170: The server obtains a video parsing key from the second address.
[0135] Here, the second address is the second address carried by the client in the key acquisition request. The video parsing key is the parsing key of the video file.
[0136] In some embodiments, after the server receives the key acquisition request, the second address carried in the key acquisition request can be compared with the second address in the first file originally in the server. If they are consistent, the server obtains the video parsing key from the second address.
[0137] S180: The server sends a video parsing key to the client.
[0138] S190: The client obtains the target video from the third address, and decrypts the target video using the video parsing key to play the target video.
[0139] In some embodiments, the client obtains the video file from the third address, and then obtains the target video. The third address may be an address in the server.
[0140] It should be noted that the video file can be a ts file. ts refers to the video ts format, which is a high-definition video packaging format, and its full name is Transport Stream. The characteristic of this format is that any segment of the video stream can be independently decoded.
[0141] In this way, the server receives the target verification information sent by the client, and uses the target verification information to encrypt the second address in the first file, that is, the server encrypts the second address in the first file, puts it in the first file, obtains the second file, and sends it to the client. After decryption, the client can obtain the key of the second address to decrypt and play the video, that is, through the server's encrypted key address, the client needs to first obtain the video address and the encrypted key address from the server, after decrypting the key address, obtain the video parsing key from the server according to the key address, and then obtain the video for decryption. The video and the key are not transmitted at the same time, and the key address needs to be encrypted and transmitted by the server. The encryption and decryption process only involves the client and the server, which improves security.
[0142] Based on this, in some embodiments, Figure 2 As shown, the above S110 may specifically include:
[0143] S111, when receiving a click input on a target video, the client obtains a video identifier of the target video;
[0144] S112, the client sends a file address acquisition request to the server, where the file address acquisition request includes a video identifier;
[0145] S113, the server generates target verification information according to preset verification information generation rules;
[0146] S114, the server obtains a first address of a first file corresponding to the video identifier;
[0147] S115. The server sends the first address and target verification information to the client.
[0148] Here, the video identifier may be a video ID corresponding to the target video, or may be a file ID of a video file. The preset verification information generation rule is set in advance.
[0149] In some embodiments, the target verification information is verification information corresponding to the video identifier, and the relationship between the target verification information and the target video is binding.
[0150] In some embodiments, the target verification information is used as a request parameter of the first address, and the server synchronously sends the first address and the target verification information to the client.
[0151] In this way, the server generates target verification information and sends it to the client. The server can use the target verification information to encrypt the address of the key, and the client can use the target verification information to decrypt the address of the key, thereby achieving secure transmission of the key address and ensuring the security of the video.
[0152] Based on this, in some embodiments, Figure 3As shown, the above S113 may specifically include:
[0153] S210, the server obtains a target timestamp and a preset encryption key, where the target timestamp is the timestamp of the file address acquisition request sent by the client to the server;
[0154] S220, the server encrypts the target timestamp using a preset encryption key to obtain initial verification information;
[0155] S230: The server encrypts the initial verification information using a first preset encryption rule to obtain target verification information.
[0156] Here, the first preset encryption rule includes a symmetric encryption rule and an asymmetric encryption rule, which can be a standard encryption rule or a custom encryption rule. For example, the first preset encryption rule is to encrypt using the AES encryption algorithm.
[0157] In some embodiments, the server may also use a preset encryption key to encrypt the target timestamp according to a first preset encryption rule to generate target verification information.
[0158] In this way, the server obtains the target verification information through double encryption of the preset encryption key and the first preset encryption rule, and uses the target verification information to encrypt the address of the video parsing key, thereby better ensuring the security of the address of the video parsing key, thereby improving the security of the video; and the target verification information is generated by the server, and does not involve other components, only the client and the server, which can also improve the security of the target verification information, thereby improving the security of the video.
[0159] Based on this, in some embodiments, Figure 4 As shown, in the above S130, the second address in the first file is updated to the fourth address, and before the second file is obtained, the method is applied to the server, and may also include:
[0160] S121. The server decrypts the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule to obtain initial verification information;
[0161] S122, the server uses a preset decryption key corresponding to the preset encryption key to decrypt the initial verification information to obtain a target timestamp;
[0162] S123. The server adds the target verification information and the target timestamp to the second address to obtain a fourth address.
[0163] Here, the target verification information refers to the verification information carried in the request when the client sends a file acquisition request to the server.
[0164] In some embodiments, after receiving the file acquisition request, the server can compare the target verification information carried in the file acquisition request with the target verification information originally in the server. If they are consistent, the server decrypts the target verification information according to the first preset decryption rule corresponding to the first preset encryption rule to obtain the target timestamp. The target verification information and the target timestamp are added to the second address to obtain the fourth address. For example, the second address is *** / getKey, and the encrypted fourth address is *** / getKey&target verification information&target timestamp.
[0165] In some embodiments, other information in the first file may also be encrypted and synchronized to the second file.
[0166] In this way, the server adds the target verification information and the target timestamp to the second address instead of simply adding the target verification information to the second address, which is equivalent to adding an extra layer of protection for the address of the video parsing key, thereby better ensuring the security of the address of the video parsing key and thus improving the security of the video.
[0167] Based on this, in some embodiments, Figure 5 As shown, the above S150 may specifically include:
[0168] S151, when the client receives the second file sent by the server, the client decrypts the target verification information according to the first preset decryption rule corresponding to the first preset encryption rule to obtain initial verification information;
[0169] S152, the client uses a preset decryption key corresponding to the preset encryption key to decrypt the initial verification information to obtain a target timestamp;
[0170] S153. The client deletes the target verification information and the target timestamp from the fourth address to obtain the second address.
[0171] It can be understood that, in the same manner as the server obtains the target timestamp, when the client receives the second file sent by the server, it decrypts the target verification information according to the first preset decryption rule corresponding to the first preset encryption rule to obtain the initial verification information, and decrypts the initial verification information using the preset decryption key corresponding to the preset encryption key to obtain the target timestamp. Then the client deletes the target verification information and the target timestamp from the fourth address to obtain the second address.
[0172] In this way, the client can decrypt the target verification information to obtain the second address in the original first file, that is, the address of the video parsing key, and then obtain the video parsing key through the address of the video parsing key to decrypt and play the target video. The target verification information and target timestamp are used to better ensure the security of the address of the video parsing key, thereby improving the security of the video.
[0173] Based on this, in some embodiments, the key acquisition request also includes target verification information; the above S170 may specifically include:
[0174] When the server receives the key acquisition request sent by the client, it verifies the target verification information;
[0175] When the target verification information meets the preset conditions, the server obtains the video parsing key from the second address.
[0176] Specifically, the target verification information can be used as a token for the server to verify it.
[0177] As an example, when a key acquisition request is received from a client, the target verification information is decrypted. If the decryption is successful, it is determined whether the target verification information is expired. Specifically, the target timestamp can be used for judgment; the server obtains the current timestamp, and compares the current timestamp with the target timestamp. If the time interval exceeds the preset time, the verification fails. For example, the expiration time of the target verification information can be set to 1 minute. If it still passes, the number of times the target verification information is used is checked. For example, the target verification information is only allowed to be used once, and it will not pass the verification for subsequent uses. Specifically, the server saves the target verification information after verifying it. If verification information consistent with the target verification information is subsequently received, the verification of the verification information received subsequently fails.
[0178] It should be noted that the verification method of the target verification information is not unique. This is just an example and the specific implementation method is not limited.
[0179] In some embodiments, when the target verification information does not meet the preset conditions, the server sends the target information to the client to prompt the user that the target video cannot be obtained.
[0180] In this way, only when the target verification information sent by the client passes the verification, the server will send the video parsing key to the client, further ensuring the security of the video.
[0181] Based on this, in some embodiments, the above S180 may specifically include:
[0182] The server encrypts the video parsing key using the second preset encryption rule to obtain the target video parsing key;
[0183] The server sends the target video parsing key to the client;
[0184] The above S190 may specifically include:
[0185] Upon receiving the target video parsing key sent by the server, the client obtains the target video from the third address;
[0186] The client uses the second preset decryption rule corresponding to the second preset encryption rule to decrypt the target video parsing key to obtain the video parsing key;
[0187] The client uses the video parsing key to decrypt the target video to play the target video.
[0188] Here, the second preset encryption rule includes a symmetric encryption rule and an asymmetric encryption rule, which can be a standard encryption rule or a custom encryption rule. For example, the second preset encryption rule is to encrypt using the RSA encryption algorithm.
[0189] In some embodiments, the server returns the key in ciphertext form to the client, which can only be used after the client decrypts it.
[0190] In this way, the video parsing key is also encrypted by the server before being sent to the client, further ensuring the security of the video.
[0191] In the embodiments provided in the present application, the service backend video encryption based on HLS technology can realize dynamic rewriting of m3u8 files through the business system backend service, does not rely on third-party components, and supports a mechanism for authentication protection based on target verification information. At the same time, the key is protected by an encryption algorithm. Even if the m3u8 file is intercepted, the key cannot be obtained, thereby protecting the security of the video.
[0192] In the embodiments provided in the present application, based on the standard HLS video encryption method, target verification information authentication (including timeliness check and number check, etc.) and server-side rewriting of m3u8 files are implemented without relying on third-party components, with strong scalability and extremely high security for videos.
[0193] In the embodiment provided in the present application, the server includes an authentication module, a rewriting module and a key encryption module. The authentication module is used to generate target verification information and verify the target verification information; the rewriting module is used to update the second address in the second file to the fourth address; the key encryption module is used to encrypt the video parsing key using the second preset encryption rule to obtain the target video parsing key. The client includes a key decryption module, which is used to decrypt the target video parsing key using the second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key.
[0194] As an example, after a video file is uploaded to a video-on-demand platform, it is transcoded and encrypted and stored in the format of an m3u8 file, wherein the encryption key is encrypted and stored again.
[0195] Based on the video playback method provided in the above embodiment, the present application also provides a specific implementation of a video playback device. Please refer to the following embodiment.
[0196] See also Figure 6 The video playback device 300 provided in the embodiment of the present application is applied to a server, and includes:
[0197] The acquisition module 310 is used to acquire the first file from the first address when receiving a file acquisition request sent by the client, the file acquisition request includes the first address of the first file corresponding to the target video and the target verification information, and the first file includes the second address of the video parsing key and the third address of the target video;
[0198] An updating module 320 is used to update the second address in the first file to a fourth address to obtain a second file, where the fourth address is an address obtained by encrypting the second address using the target verification information;
[0199] A sending module 330, configured to send the second file to the client, so that the client can decrypt the fourth address using the target verification information to obtain the second address;
[0200] The acquisition module 310 is further configured to acquire the video parsing key from the second address when receiving a key acquisition request sent by the client, wherein the key acquisition request includes the second address;
[0201] The sending module 330 is further used to send the video parsing key to the client, so that the client can obtain the target video from the third address and use the video parsing key to decrypt the target video to play the target video.
[0202] Based on this, in some embodiments, the apparatus 300 may further include:
[0203] A receiving module, configured to receive a file address acquisition request sent by a client before acquiring the first file from the first address when receiving the file acquisition request sent by the client, wherein the file address acquisition request includes a video identifier of a target video;
[0204] A generation module, used to generate target verification information according to preset verification information generation rules;
[0205] The acquisition module 310 is further used to acquire a first address of a first file corresponding to the video identifier;
[0206] The sending module 330 is further configured to send the first address and target verification information to the client.
[0207] Based on this, in some embodiments, the generation module can be specifically used to:
[0208] Obtain the target timestamp and the preset encryption key. The target timestamp is the timestamp when the server receives the file address acquisition request sent by the client.
[0209] Encrypt the target timestamp using a preset encryption key to obtain initial verification information;
[0210] The initial verification information is encrypted using a first preset encryption rule to obtain target verification information.
[0211] Based on this, in some embodiments, the apparatus 300 may further include:
[0212] a decryption module, configured to decrypt the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule before updating the second address in the first file to the fourth address, to obtain initial verification information;
[0213] The decryption module is further used to decrypt the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain a target timestamp;
[0214] An adding module is used to add target verification information and a target timestamp to the second address to obtain a fourth address.
[0215] Based on this, in some embodiments, the key acquisition request also includes target verification information; the acquisition module 310 can be specifically used to:
[0216] Upon receiving the key acquisition request sent by the client, verify the target authentication information;
[0217] When the target verification information meets the preset condition, the video parsing key is obtained from the second address.
[0218] Based on this, in some embodiments, the sending module 330 may be specifically used for:
[0219] Encrypting the video parsing key using a second preset encryption rule to obtain a target video parsing key;
[0220] A target video parsing key is sent to the client so that the client can obtain the target video from a third address, and the target video parsing key is decrypted using the second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key, and the target video is decrypted using the video parsing key to play the target video.
[0221] See also Figure 7 The video playback device 400 provided in the embodiment of the present application is applied to a client and includes:
[0222] The acquisition module 410 is used to acquire the first address of the first file corresponding to the target video and the target verification information when receiving a click input on the target video;
[0223] A sending module 420 is used to send a file acquisition request to the server, where the file acquisition request is used to instruct the server to acquire a first file from a first address, update a second address in the first file to a fourth address encrypted by using target verification information to obtain a second file, where the file acquisition request includes the first address and the target verification information, and the first file also includes a third address of the target video;
[0224] The decryption module 430 is used to decrypt the fourth address using the target verification information to obtain the second address when receiving the second file sent by the server;
[0225] The sending module 420 is further used to send a key acquisition request to the server, where the key acquisition request is used to instruct the server to obtain the video parsing key from the second address, and the key acquisition request includes the second address;
[0226] The acquisition module 410 is further used to acquire the target video from the third address when receiving the video parsing key sent by the server, and decrypt the target video using the video parsing key to play the target video.
[0227] Based on this, in some embodiments, the acquisition module 410 may be specifically used to:
[0228] When receiving a click input for a target video, obtaining a video identifier of the target video;
[0229] Send a file address acquisition request to the server, the file address acquisition request is used to instruct the server to generate target verification information according to a preset verification information generation rule, and obtain the first address of the first file corresponding to the video identifier, the file address acquisition request including the video identifier;
[0230] Receive the first address and target verification information sent by the server.
[0231] Based on this, in some embodiments, the target verification information is obtained by the server using a first preset encryption rule to encrypt the initial verification information, and the initial verification information is obtained by the server using a preset encryption key to encrypt the target timestamp, and the target timestamp is the timestamp when the server receives the file address acquisition request sent by the client.
[0232] Based on this, in some embodiments, the decryption module 430 may be specifically used for:
[0233] When receiving the second file sent by the server, decrypting the target verification information according to the first preset decryption rule corresponding to the first preset encryption rule to obtain initial verification information;
[0234] Decrypt the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain a target timestamp;
[0235] The target verification information and the target timestamp are deleted from the fourth address to obtain the second address.
[0236] Based on this, in some embodiments, the key acquisition request also includes target verification information; the key acquisition request is specifically used to instruct the server to verify the target verification information, and obtain the video parsing key from the second address when the target verification information meets the preset conditions.
[0237] Based on this, in some embodiments, the acquisition module 410 may be specifically used to:
[0238] Upon receiving the target video parsing key sent by the server, obtaining the target video from the third address, wherein the target video parsing key is obtained by encrypting the video parsing key by the server using the second preset encryption rule;
[0239] Decrypting the target video parsing key using a second preset decryption rule corresponding to the second preset encryption rule to obtain a video parsing key;
[0240] The target video is decrypted using the video parsing key to play the target video.
[0241] The various modules of the video playback device provided in the embodiment of the present application can implement the functions of the various steps of the video playback method provided above and achieve the corresponding technical effects, which will not be repeated here for the sake of concise description.
[0242] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.
[0243] Figure 8A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0244] The electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0245] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0246] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 502 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.
[0247] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.
[0248] The processor 501 implements any one of the video playback methods in the above embodiments by reading and executing computer program instructions stored in the memory 502 .
[0249] In one example, the electronic device may further include a communication interface 503 and a bus 510. Figure 8 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.
[0250] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0251] The bus 510 includes hardware, software or both, coupling the components of the electronic device to each other. For example, but not limitation, the bus may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, a front side bus (Front Side Bus, FSB), a hypertransport (Hyper Transport, HT) interconnection, an industry standard architecture (Industry Standard Architecture, ISA) bus, an infinite bandwidth interconnection, a low pin count (Linear Predictive Coding, LPC) bus, a memory bus, a microchannel architecture (MicroChannel Architecture, MCA) bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) bus, a video electronics standard association local (VESA Local Bus, VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus 510 may include one or more buses. Although the embodiments of the present application describe and illustrate a specific bus, the present application considers any suitable bus or interconnection. The electronic device can execute the video playing method in the embodiments of the present invention, thereby realizing the above-mentioned video playing method.
[0252] In addition, in combination with the video playback method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any video playback method in the above embodiment is implemented.
[0253] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes each process of implementing any one of the above-mentioned video playback method embodiments.
[0254] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0255] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0256] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0257] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0258] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A video playback method, characterized in that: Applied to the server, including: Upon receiving a file acquisition request sent by a client, acquiring a first file from a first address, wherein the file acquisition request includes the first address of the first file corresponding to a target video and target verification information, and the first file includes a second address of a video parsing key and a third address of the target video; The second address in the first file is updated to a fourth address to obtain a second file, wherein the fourth address is an address obtained by encrypting the second address using the target verification information; Sending the second file to the client, so that the client uses the target verification information to decrypt the fourth address to obtain the second address; Upon receiving a key acquisition request sent by the client, acquiring the video parsing key from the second address, wherein the key acquisition request includes the second address; The video parsing key is sent to the client so that the client can obtain the target video from the third address, and the target video is decrypted using the video parsing key to play the target video.
2. The video playback method according to claim 1, characterized in that: In the case of receiving a file acquisition request sent by the client, before acquiring the first file from the first address, the method further includes: Receiving a file address acquisition request sent by the client, wherein the file address acquisition request includes a video identifier of the target video; Generate the target verification information according to the preset verification information generation rule; Obtaining a first address of a first file corresponding to the video identifier; The first address and the target verification information are sent to the client.
3. The video playback method according to claim 2, characterized in that: The step of generating the target verification information according to a preset verification information generation rule includes: Obtaining a target timestamp and a preset encryption key, wherein the target timestamp is a timestamp of the server receiving the file address acquisition request sent by the client; Encrypting the target timestamp using the preset encryption key to obtain initial verification information; The initial verification information is encrypted using a first preset encryption rule to obtain target verification information.
4. The video playback method according to claim 3, characterized in that: Before updating the second address in the first file to a fourth address, the method further includes: Decrypting the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule to obtain the initial verification information; Decrypting the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain the target timestamp; The target verification information and the target timestamp are added to the second address to obtain a fourth address.
5. The video playback method according to claim 1, characterized in that: The key acquisition request also includes the target verification information; The step of acquiring the video parsing key from the second address upon receiving the key acquisition request sent by the client includes: Upon receiving the key acquisition request sent by the client, verifying the target verification information; When the target verification information satisfies a preset condition, the video parsing key is obtained from the second address.
6. The video playback method according to claim 1, characterized in that: The sending the video parsing key to the client includes: Encrypting the video parsing key using a second preset encryption rule to obtain a target video parsing key; The target video parsing key is sent to the client so that the client can obtain the target video from the third address, and the target video parsing key is decrypted using the second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key, and the target video is decrypted using the video parsing key to play the target video.
7. A video playback method, characterized in that: Applied to the client, including: When receiving a click input for a target video, obtaining a first address of a first file corresponding to the target video and target verification information; Sending a file acquisition request to the server, wherein the file acquisition request is used to instruct the server to acquire the first file from the first address, update the second address in the first file to a fourth address encrypted by using the target verification information to obtain the second file, wherein the file acquisition request includes the first address and the target verification information, and the first file also includes the third address of the target video; When receiving the second file sent by the server, decrypting the fourth address using the target verification information to obtain the second address; Sending a key acquisition request to the server, wherein the key acquisition request is used to instruct the server to obtain a video parsing key from the second address, and the key acquisition request includes the second address; When the video parsing key sent by the server is received, the target video is obtained from the third address, and the target video is decrypted using the video parsing key to play the target video.
8. The video playback method according to claim 7, characterized in that: The method of, upon receiving a click input on a target video, obtaining a first address of a first file corresponding to the target video and target verification information, comprises: When receiving a click input for a target video, obtaining a video identifier of the target video; Sending a file address acquisition request to the server, wherein the file address acquisition request is used to instruct the server to generate the target verification information according to a preset verification information generation rule and acquire a first address of a first file corresponding to the video identifier, wherein the file address acquisition request includes the video identifier; Receive the first address and the target verification information sent by the server.
9. The video playback method according to claim 7, characterized in that: The target verification information is obtained by the server side encrypting the initial verification information using a first preset encryption rule. The initial verification information is obtained by the server side encrypting the target timestamp using a preset encryption key. The target timestamp is the timestamp when the server side receives the file address acquisition request sent by the client.
10. The video playback method according to claim 9, characterized in that: The method of decrypting the fourth address by using the target verification information to obtain the second address upon receiving the second file sent by the server includes: Upon receiving the second file sent by the server, decrypting the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule to obtain the initial verification information; Decrypting the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain the target timestamp; The target verification information and the target timestamp are deleted from the fourth address to obtain the second address.
11. The video playback method according to claim 7, characterized in that: The key acquisition request also includes the target verification information; the key acquisition request is specifically used to instruct the server to verify the target verification information, and obtain the video parsing key from the second address when the target verification information meets a preset condition.
12. The video playback method according to claim 7, characterized in that: When the video parsing key sent by the server is received, the target video is obtained from the third address, and the target video is decrypted by using the video parsing key to play the target video, including: Upon receiving the target video parsing key sent by the server, obtaining the target video from the third address, wherein the target video parsing key is obtained by encrypting the video parsing key by the server using a second preset encryption rule; Decrypting the target video parsing key using a second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key; The target video is decrypted using the video parsing key to play the target video.
13. A video playback device, characterized in that: Applied to the server, including: an acquisition module, configured to acquire a first file from a first address upon receiving a file acquisition request sent by a client, wherein the file acquisition request includes the first address of the first file corresponding to a target video and target verification information, and the first file includes a second address of a video parsing key and a third address of the target video; An updating module, configured to update the second address in the first file to a fourth address to obtain a second file, wherein the fourth address is an address obtained by encrypting the second address using the target verification information; a sending module, configured to send the second file to the client, so that the client decrypts the fourth address using the target verification information to obtain the second address; The acquisition module is further configured to acquire the video parsing key from the second address upon receiving a key acquisition request sent by the client, wherein the key acquisition request includes the second address; The sending module is further used to send the video parsing key to the client, so that the client can obtain the target video from the third address and use the video parsing key to decrypt the target video to play the target video.
14. The video playback device according to claim 13, characterized in that: The device also includes: A receiving module, configured to, upon receiving a file acquisition request sent by a client, before acquiring a first file from a first address, receive a file address acquisition request sent by the client, wherein the file address acquisition request includes a video identifier of the target video; A generation module, used to generate the target verification information according to a preset verification information generation rule; The acquisition module is further used to acquire a first address of a first file corresponding to the video identifier; The sending module is further used to send the first address and the target verification information to the client.
15. The video playback device according to claim 14, characterized in that: The generation module is specifically used for: Obtaining a target timestamp and a preset encryption key, wherein the target timestamp is a timestamp of the server receiving the file address acquisition request sent by the client; Encrypting the target timestamp using the preset encryption key to obtain initial verification information; The initial verification information is encrypted using a first preset encryption rule to obtain target verification information.
16. The video playback device according to claim 15, characterized in that: The device also includes: a decryption module, configured to decrypt the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule before updating the second address in the first file to a fourth address, so as to obtain the initial verification information; The decryption module is further used to decrypt the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain the target timestamp; An adding module is used to add the target verification information and the target timestamp to the second address to obtain a fourth address.
17. The video playback device according to claim 13, characterized in that: The key acquisition request also includes the target verification information; the acquisition module is specifically used to: Upon receiving the key acquisition request sent by the client, verifying the target verification information; When the target verification information satisfies a preset condition, the video parsing key is obtained from the second address.
18. The video playback device according to claim 13, characterized in that: The sending module is specifically used for: Encrypting the video parsing key using a second preset encryption rule to obtain a target video parsing key; The target video parsing key is sent to the client so that the client can obtain the target video from the third address, and the target video parsing key is decrypted using the second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key, and the target video is decrypted using the video parsing key to play the target video.
19. A video playback device, characterized in that: Applied to the client, including: An acquisition module, configured to acquire, upon receiving a click input on a target video, a first address of a first file corresponding to the target video and target verification information; a sending module, configured to send a file acquisition request to a server, wherein the file acquisition request is used to instruct the server to acquire the first file from the first address, update the second address in the first file to a fourth address encrypted by using the target verification information to obtain the second file, wherein the file acquisition request includes the first address and the target verification information, and the first file also includes a third address of the target video; a decryption module, configured to, upon receiving the second file sent by the server, decrypt the fourth address using the target verification information to obtain the second address; The sending module is further used to send a key acquisition request to the server, wherein the key acquisition request is used to instruct the server to obtain the video parsing key from the second address, and the key acquisition request includes the second address; The acquisition module is also used to obtain the target video from the third address when receiving the video parsing key sent by the server, and decrypt the target video using the video parsing key to play the target video.
20. The video playback device according to claim 19, characterized in that: The acquisition module is specifically used for: When receiving a click input for a target video, obtaining a video identifier of the target video; Sending a file address acquisition request to the server, wherein the file address acquisition request is used to instruct the server to generate the target verification information according to a preset verification information generation rule and acquire a first address of a first file corresponding to the video identifier, wherein the file address acquisition request includes the video identifier; Receive the first address and the target verification information sent by the server.
21. The video playback device according to claim 19, characterized in that: The target verification information is obtained by the server side encrypting the initial verification information using a first preset encryption rule. The initial verification information is obtained by the server side encrypting the target timestamp using a preset encryption key. The target timestamp is the timestamp when the server side receives the file address acquisition request sent by the client.
22. The video playback device according to claim 21, characterized in that: The decryption module is specifically used for: Upon receiving the second file sent by the server, decrypting the target verification information according to a first preset decryption rule corresponding to the first preset encryption rule to obtain the initial verification information; Decrypting the initial verification information using a preset decryption key corresponding to the preset encryption key to obtain the target timestamp; The target verification information and the target timestamp are deleted from the fourth address to obtain the second address.
23. The video playback device according to claim 19, characterized in that: The key acquisition request also includes the target verification information; the key acquisition request is specifically used to instruct the server to verify the target verification information, and obtain the video parsing key from the second address when the target verification information meets a preset condition.
24. The video playback device according to claim 19, characterized in that: The acquisition module is specifically used for: Upon receiving the target video parsing key sent by the server, obtaining the target video from the third address, wherein the target video parsing key is obtained by encrypting the video parsing key by the server using a second preset encryption rule; Decrypting the target video parsing key using a second preset decryption rule corresponding to the second preset encryption rule to obtain the video parsing key; The target video is decrypted using the video parsing key to play the target video.
25. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the video playback method described in any one of claims 1-6, or the video playback method described in any one of claims 7-12.
26. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the video playback method according to any one of claims 1 to 6 or the video playback method according to any one of claims 7 to 12 is implemented.
27. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the video playback method described in any one of claims 1 to 6, or the video playback method described in any one of claims 7 to 12.