Video playing method and device, equipment, medium and product

By decrypting and verifying the encrypted user identity information sent by the client on the server, and providing the video access file address only when the conditions are met, the low video security problem caused by key leakage in the prior art is solved, and a higher video is achieved File security.

CN119094821AActive Publication Date: 2024-12-06CHINA CONSTRUCTION BANK +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411193854.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

In the prior art, when the m3u8 file and its corresponding video file are encrypted and transmitted, the video file has the risk of being cracked after the key is leaked, resulting in lower video security.

Method used

The server obtains the key through the target identifier sent by the client, and uses the key to decrypt the encrypted user identity information sent by the client. Only when the decryption is successful and the user identity information meets the preset conditions are met, the video access file address is sent to the client. , ensure the security of the video.

Benefits of technology

Improves the security of videos, ensuring that even if the key is not cracked, the video files will not be illegally accessed, and enhances the strictness of user authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094821A_ABST
    Figure CN119094821A_ABST
Patent Text Reader

Abstract

The invention discloses a video playing method and device, equipment, a medium and a product, and relates to the technical field of information security. The method is applied to a server, and comprises the following steps: receiving a first video access file acquisition request sent by a client, and acquiring a key corresponding to a target identifier in the first video access file acquisition request; decrypting the first ciphertext information according to a preset decryption rule by using the key; if the decryption is successful, verifying the user identity information obtained by decryption; and under the condition that the user identity information meets a preset condition, sending a video access file to the client, so that the client plays a target video corresponding to the video access file. In the embodiment of the invention, the video access file in the video access file address is sent to the client only when the two conditions that decryption is successful and the user identity information meets the preset condition are met at the same time, so that the client plays the target video corresponding to the video access file, and the security of the video is improved.
Need to check novelty before this filing date? Find Prior Art

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] As a carrier of information transmission, video files have occupied most of the scenes in people's work and life. At present, most video files are spread on the Internet in the form of file addresses. The m3u8 file is a video index address file. The video file can be obtained and played through the index address in the m3u8 file. The m3u8 file is more secure than the mp4 file because of its special format and the characteristics of video segment transmission. Therefore, when processing confidential video files, many users will choose the m3u8 file.

[0003] In the prior art, usually m3u8 file and the video file corresponding to the m3u8 file are encrypted and transmitted to ensure the security of the video. However, if the key file is leaked, the video will be at risk of being cracked, and the security of the video 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 obtains a key through a target identifier sent by a client, and uses the key to decrypt a first ciphertext information sent by the client that is encrypted using the key to encrypt user identity information. If the decryption is successful, the decrypted user identity information is verified, and the video access file in the video access file address is sent to the client only if the user identity information meets a preset condition. That is, the video access file in the video access file address must be sent to the client only when both the decryption success and the user identity information meeting the preset condition are met at the same time, so that the client can play the target video corresponding to the video access file, thereby improving the security of the video.

[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 first video access file acquisition request sent by a client, obtaining a key corresponding to a target identifier in the first video access file acquisition request, wherein the first video access file acquisition request also includes a video access file address corresponding to the target video and first ciphertext information, wherein the first ciphertext information is obtained by encrypting the user identity information by the client using the key according to a preset encryption rule;

[0007] Decrypting the first ciphertext information using the key according to a preset decryption rule corresponding to the preset encryption rule;

[0008] If the decryption is successful, the decrypted user identity information is verified;

[0009] When the user identity information meets the preset conditions, the video access file in the video access file address is sent to the client, so that the client can play the target video corresponding to the video access file.

[0010] In a possible implementation, when receiving the first video access file acquisition request sent by the client, before acquiring the key corresponding to the target identifier in the first video access file acquisition request, the method further includes:

[0011] Receive a verification information acquisition request sent by a client, where the verification information acquisition request includes a video identifier of a target video;

[0012] Generate and cache target verification information corresponding to the video identifier, the target verification information including the target identifier and a key corresponding to the target identifier;

[0013] Send target verification information to the client.

[0014] In one possible implementation, after sending the target verification information to the client, the method further includes:

[0015] Updating the access state of the video access file to the first target state;

[0016] In the case of receiving a first video access file acquisition request sent by a client, acquiring a key corresponding to a target identifier in the first video access file acquisition request includes:

[0017] When a first video access file acquisition request sent by a client is received and the access state of the video access file is a first target state, a key corresponding to the target identifier in the first video access file acquisition request is acquired.

[0018] In a possible embodiment, it also includes:

[0019] When the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset conditions, the target information is sent to the client.

[0020] In one possible implementation, the video access file address includes a first address of the video file;

[0021] In a case where the video access file address is the first address, the video access file includes a video file.

[0022] In a possible implementation, the video access file address includes a second address of a video index address file, and the video access file includes a video index address file. When the user identity information satisfies a preset condition, after sending the video access file in the video access file address to the client, the method further includes:

[0023] Receive a second video access file acquisition request sent by a client, the second video access file acquisition request includes a first address, a target identifier, and second ciphertext information, the second ciphertext information is obtained by encrypting the user identity information by the client using a key according to a preset encryption rule, and the first address is an address in a video index address file;

[0024] Decrypting the second ciphertext information using the key according to a preset decryption rule;

[0025] If the decryption is successful, the decrypted user identity information is verified;

[0026] When the user identity information meets the preset condition, the video file in the first address is sent to the client, so that the client plays the target video corresponding to the video file.

[0027] In a possible implementation, after decrypting the first ciphertext information using the key according to a preset decryption rule corresponding to the preset encryption rule, the method further includes:

[0028] Delete the target ID and key cached in the server.

[0029] In one possible implementation, after deleting the target identifier and key cached in the server, the method further includes:

[0030] The access state of the video access file is updated to the second target state.

[0031] In a second aspect, an embodiment of the present application provides a video playback method, which is applied to a client, comprising:

[0032] When receiving a click input for a target video, obtaining a video access file address corresponding to the target video, target verification information corresponding to the target video, and user identity information, wherein the target verification information includes a target identifier and a key corresponding to the target identifier;

[0033] Using the key, encrypt the user identity information according to a preset encryption rule to obtain first ciphertext information;

[0034] Sending a first video access file acquisition request to the server, the first video access file acquisition request is used to instruct the server to use the key to decrypt the first ciphertext information according to the preset decryption rule corresponding to the preset encryption rule. If the decryption is successful and the user identity information obtained by decryption meets the preset conditions, the video access file in the video access file address is sent to the client, and the first video access file acquisition request includes the video access file address, the target identifier and the first ciphertext information;

[0035] Receive the video access file sent by the client to play the target video corresponding to the video access file.

[0036] In a possible implementation, obtaining target verification information corresponding to a target video includes:

[0037] Get the video ID of the target video;

[0038] Sending a verification information acquisition request to the server, the verification information acquisition request is used to instruct the server to generate and cache target verification information corresponding to the video identifier, and the verification information acquisition request includes the video identifier;

[0039] Receive the target verification information sent by the server.

[0040] In a possible implementation embodiment, the video access file is a file sent by the server when the access state of the video access file is the first target state.

[0041] In a possible embodiment, it also includes:

[0042] Receive target information sent by the server, where the target information is information sent by the server to the client when the access state of the video access file is the second target state, or the decryption fails, or the user identity information does not meet the preset conditions.

[0043] In a possible implementation, the video access file address includes a first address of a video file, and the video access file includes the video file; after receiving the video access file sent by the client, the method further includes:

[0044] Play the target video corresponding to the video file.

[0045] In a possible implementation, the video access file address includes the second address of the video index address file, and the video access file includes the video index address file; after receiving the video access file sent by the client, the method further includes:

[0046] Get the first address of the video file from the video index address file;

[0047] Using the key, encrypt the user identity information according to a preset encryption rule to obtain second ciphertext information;

[0048] Sending a second video access file acquisition request to the server, the second video access file acquisition request is used to instruct the server to use the key to decrypt the second ciphertext information according to the preset decryption rule, and if the decryption is successful and the user identity information obtained by decryption meets the preset conditions, then sending the video file in the first address to the client, the second video access file acquisition request includes the first address, the target identifier and the second ciphertext information;

[0049] Receive video files sent by the client;

[0050] Play the target video corresponding to the video file.

[0051] In a third aspect, an embodiment of the present application provides a video playback device, which is applied to a server, including:

[0052] an acquisition module, configured to acquire a key corresponding to a target identifier in the first video access file acquisition request upon receiving the first video access file acquisition request sent by the client, wherein the first video access file acquisition request further includes a video access file address corresponding to the target video and first ciphertext information, wherein the first ciphertext information is obtained by encrypting the user identity information by the client using the key according to a preset encryption rule;

[0053] A decryption module, used to decrypt the first ciphertext information using a key according to a preset decryption rule corresponding to a preset encryption rule;

[0054] A verification module, used to verify the user identity information obtained by decryption if the decryption is successful;

[0055] The sending module is used to send the video access file in the video access file address to the client when the user identity information meets the preset conditions, so that the client can play the target video corresponding to the video access file.

[0056] In a possible embodiment, the device further includes:

[0057] A receiving module, configured to receive a verification information acquisition request sent by the client before acquiring a key corresponding to a target identifier in the first video access file acquisition request upon receiving the first video access file acquisition request sent by the client, wherein the verification information acquisition request includes a video identifier of a target video;

[0058] A generation module, used to generate and cache target verification information corresponding to the video identifier, the target verification information including the target identifier and a key corresponding to the target identifier;

[0059] The sending module is also used to send target verification information to the client.

[0060] In a possible embodiment, the device further includes:

[0061] An updating module, configured to update the access status of the video access file to a first target status after sending the target verification information to the client;

[0062] The acquisition module is specifically used for:

[0063] When a first video access file acquisition request sent by a client is received and the access state of the video access file is a first target state, a key corresponding to the target identifier in the first video access file acquisition request is acquired.

[0064] In a possible embodiment, it also includes:

[0065] The sending module is also used to send target information to the client when the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset conditions.

[0066] In one possible implementation, the video access file address includes a first address of the video file;

[0067] In a case where the video access file address is the first address, the video access file includes a video file.

[0068] In a possible implementation, the video access file address includes a second address of a video index address file, the video access file includes a video index address file, and the device further includes:

[0069] A receiving module, configured to receive a second video access file acquisition request sent by the client after sending the video access file in the video access file address to the client when the user identity information meets the preset conditions, wherein the second video access file acquisition request includes the first address, the target identifier, and the second ciphertext information, wherein the second ciphertext information is obtained by encrypting the user identity information by the client using a key according to a preset encryption rule, and the first address is an address in the video index address file;

[0070] The decryption module is further used to decrypt the second ciphertext information using the key according to a preset decryption rule;

[0071] The verification module is also used to verify the user identity information obtained by decryption if the decryption is successful;

[0072] The sending module is also used to send the video file in the first address to the client when the user identity information meets the preset conditions, so that the client can play the target video corresponding to the video file.

[0073] In a possible embodiment, the device further includes:

[0074] The deletion module is used to delete the target identifier and the key cached in the server after decrypting the first ciphertext information using the key according to the preset decryption rule corresponding to the preset encryption rule.

[0075] In a possible embodiment, the device further includes:

[0076] The updating module is used to update the access status of the video access file to a second target status after deleting the target identifier and the key cached in the server.

[0077] In a fourth aspect, an embodiment of the present application provides a video playback device, which is applied to a client, including:

[0078] An acquisition module, for acquiring, upon receiving a click input on a target video, a video access file address corresponding to the target video, target verification information corresponding to the target video, and user identity information, wherein the target verification information includes a target identifier and a key corresponding to the target identifier;

[0079] The encryption module is used to encrypt the user identity information using a key according to a preset encryption rule to obtain first ciphertext information;

[0080] A sending module, used to send a first video access file acquisition request to a server, the first video access file acquisition request is used to instruct the server to use a key to decrypt the first ciphertext information according to a preset decryption rule corresponding to a preset encryption rule, and if the decryption is successful and the user identity information obtained by decryption meets a preset condition, the video access file in the video access file address is sent to the client, the first video access file acquisition request includes the video access file address, the target identifier and the first ciphertext information;

[0081] The receiving module is used to receive the video access file sent by the client to play the target video corresponding to the video access file.

[0082] In a possible implementation, the acquisition module is specifically used for:

[0083] Get the video ID of the target video;

[0084] Sending a verification information acquisition request to the server, the verification information acquisition request is used to instruct the server to generate and cache target verification information corresponding to the video identifier, and the verification information acquisition request includes the video identifier;

[0085] Receive the target verification information sent by the server.

[0086] In a possible implementation embodiment, the video access file is a file sent by the server when the access state of the video access file is the first target state.

[0087] In a possible embodiment, it also includes:

[0088] The receiving module is also used to receive target information sent by the server. The target information is information sent by the server to the client when the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset conditions.

[0089] In a possible implementation, the video access file address includes a first address of a video file, and the video access file includes the video file; the device further includes:

[0090] The playing module is used to play the target video corresponding to the video file after receiving the video access file sent by the client.

[0091] In a possible implementation, the video access file address includes a second address of a video index address file, and the video access file includes a video index address file; the device further includes:

[0092] The acquisition module is further used to acquire the first address of the video file from the video index address file after receiving the video access file sent by the client;

[0093] The encryption module is further used to encrypt the user identity information using the key according to a preset encryption rule to obtain second ciphertext information;

[0094] The sending module is further used to send a second video access file acquisition request to the server, the second video access file acquisition request is used to instruct the server to use the key to decrypt the second ciphertext information according to the preset decryption rule, if the decryption is successful and the user identity information obtained by decryption meets the preset conditions, then send the video file in the first address to the client, the second video access file acquisition request includes the first address, the target identifier and the second ciphertext information;

[0095] The receiving module is also used to receive the video file sent by the client;

[0096] The playback module is used to play the target video corresponding to the video file.

[0097] In a fifth aspect, an embodiment of the present application provides an electronic device, the device comprising:

[0098] a processor and a memory storing computer program instructions;

[0099] When the processor executes the computer program instructions, any of the above-mentioned video playback methods is implemented.

[0100] 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.

[0101] 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.

[0102] 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 first video access file acquisition request sent by a client, obtaining a key corresponding to a target identifier in the first video access file acquisition request, the first video access file acquisition request also includes a video access file address corresponding to the target video and a first ciphertext information, the first ciphertext information is obtained by the client using the key to encrypt user identity information according to preset encryption rules; using the key to decrypt the first ciphertext information according to preset decryption rules corresponding to the preset encryption rules; if the decryption is successful, verifying the user identity information obtained by decryption; and when the user identity information meets the preset conditions, sending the video access file in the video access file address to the client, so that the client can play the target video corresponding to the video access file.

[0103] In this way, the server obtains the key through the target identifier sent by the client, and uses the key to decrypt the first ciphertext information sent by the client that is encrypted by using the key to encrypt the user identity information. If the decryption is successful, the decrypted user identity information is verified, and only when the user identity information meets the preset conditions, the video access file in the video access file address will be sent to the client. That is, the two conditions of successful decryption and user identity information meeting the preset conditions must be met at the same time before the video access file in the video access file address will be sent to the client, so that the client can play the target video corresponding to the video access file, thereby improving the security of the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0104] 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.

[0105] Figure 1 It is a flowchart of a method for playing a video provided by an embodiment of the present application;

[0106] Figure 2 is a flowchart of a video playback method provided by another embodiment of the present application;

[0107] Figure 3 is a flowchart of a video playback method provided by another embodiment of the present application;

[0108] Figure 4 is a flowchart of a video playback method provided by yet another embodiment of the present application;

[0109] Figure 5 is a structural diagram of a video playback device applied to a server provided in yet another embodiment of the present application;

[0110] Figure 6 is a structural diagram of a video playback device applied to a client provided by another embodiment of the present application;

[0111] Figure 7 It is a structural diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0112] 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.

[0113] 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.

[0114] 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.

[0115] 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.

[0116] As a carrier of information transmission, video files have occupied most of the scenes in people's work and life. At present, most video files are spread on the Internet in the form of file addresses. The m3u8 file is a video index address file. The video file can be obtained and played through the index address in the m3u8 file. The m3u8 file is more secure than the mp4 file because of its special format and the characteristics of video segment transmission. Therefore, when processing confidential video files, many users will choose the m3u8 file.

[0117] In the prior art, usually m3u8 file and the video file corresponding to the m3u8 file are encrypted and transmitted to ensure the security of the video. However, if the key file is leaked, the video will be at risk of being cracked, and the security of the video is relatively low.

[0118] It should be noted that the existing playback of the video corresponding to the m3u8 file is generally achieved through a video player library (such as video.js, hls.js, etc.). The player first reads the m3u8 file, requests the corresponding video file in a preset manner through the index address in the m3u8 file, loads the corresponding video file into the cache area, and then plays the video. m3u8 is a video playlist file format, mainly used for streaming media transmission and online video playback. It is a video file format based on the HLS protocol. The m3u8 file contains the index addresses of multiple media segments, and can automatically adjust the quality and size of the segments according to network conditions. The HLS protocol is a media streaming protocol based on HTTP, the full name of which is HTTP LiveStreaming, which is used for the transmission of real-time audio and video streams. By cutting the entire stream into a small media file that can be downloaded through HTTP, and then providing a matching media list file to the client, the client can pull the video files sequentially for playback to achieve the effect of playing a stream.

[0119] 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 obtains a key through a target identifier sent by a client, and uses the key to decrypt the first ciphertext information sent by the client by encrypting the user identity information using the key. If the decryption is successful, the decrypted user identity information is verified, and only when the user identity information meets the preset conditions, the video access file in the video access file address is sent to the client, that is, the two conditions of successful decryption and user identity information meeting the preset conditions need to be met at the same time, and the video access file in the video access file address is sent to the client, so that the client can play the target video corresponding to the video access file, thereby improving the security of the video.

[0120] The following first introduces the video playback method provided by the embodiment of the present application. Figure 1 As shown, the video playback method provided in the embodiment of the present application includes the following steps.

[0121] S110. When receiving a click input for a target video, the client obtains a video access file address corresponding to the target video, target verification information corresponding to the target video, and user identity information. The target verification information includes a target identifier and a key corresponding to the target identifier.

[0122] Here, the user identity information may include, but is not limited to, the user name, account number, password, ID, organization, etc. The target verification information is set in advance. The target identifier may be a global tracking number. It is understood that from receiving a click input on the target video to playing the target video, the target identifier is bound to the target video. Each video corresponds to a unique global tracking number.

[0123] In some embodiments, the video access file address is an address in the server, and the client needs to request the server to obtain the video access file. The server verifies the identity of the client, and returns the video access file if the verification is successful.

[0124] In some embodiments, the video access file address can be the address of the m3u8 file or the address of the video file. If the video access file address is the address of the m3u8 file, the client can obtain the video file for playback through the video index address in the m3u8 file. The address includes a link.

[0125] S120: The client uses the key to encrypt the user identity information according to a preset encryption rule to obtain first ciphertext information.

[0126] Here, the 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 preset encryption rule is to encrypt using the RSA asymmetric encryption algorithm.

[0127] In some embodiments, in the process of encrypting the user identity information according to the preset encryption rule, a key is required. It can be understood that the preset encryption rule sets the encryption process, and the key is a parameter used in the encryption process.

[0128] S130: The client sends a first video access file acquisition request to the server, where the first video access file acquisition request includes a video access file address, a target identifier, and first ciphertext information.

[0129] S140: The server obtains a key corresponding to the target identifier in the first video access file acquisition request.

[0130] In some embodiments, the information of the server includes target verification information. After receiving the first video access file acquisition request, the server acquires the corresponding key through the target identifier.

[0131] S150: The server uses the key to decrypt the first ciphertext information according to a preset decryption rule corresponding to the preset encryption rule.

[0132] In some embodiments, the server and the client have negotiated the preset encryption rule and the preset decryption rule in advance, and the server information includes the preset decryption rule corresponding to the preset encryption rule. After obtaining the key, the server uses the key to decrypt the first ciphertext information according to the preset decryption rule corresponding to the preset encryption rule.

[0133] S160: If the decryption is successful, the server verifies the user identity information obtained by decryption.

[0134] In some embodiments, if the decryption is successful, the server can obtain the user identity information; otherwise, the decryption result cannot be obtained. It should be noted that if the decryption fails, it means that an abnormality occurs in the decryption process, and the process reports an error and a decryption result cannot be obtained.

[0135] As an example, if the decryption is successful, the server verifies the validity and / or access rights of the decrypted user identity information.

[0136] S170. When the user identity information meets a preset condition, the server sends the video access file in the video access file address to the client, so that the client plays a target video corresponding to the video access file.

[0137] Here, the preconditions are set in advance.

[0138] In some embodiments, verifying the validity of the user identity information includes: verifying whether the user identity information is consistent with the preset user identity information cached by the server, and verifying the access rights of the user identity information when the user identity information is consistent with the cached preset user identity information. Verifying the access rights of the user identity information includes: verifying whether the user identity information has the access rights to the video access file, and if the user identity information also has the access rights to the video access file, it means that the user identity information meets the preset conditions. The video access file in the video access file address is sent to the client, so that the client can play the target video corresponding to the video access file.

[0139] In this way, the server obtains the key through the target identifier sent by the client, and uses the key to decrypt the first ciphertext information sent by the client that is encrypted by using the key to encrypt the user identity information. If the decryption is successful, the decrypted user identity information is verified, and only when the user identity information meets the preset conditions, the video access file in the video access file address will be sent to the client. That is, the two conditions of successful decryption and user identity information meeting the preset conditions must be met at the same time before the video access file in the video access file address will be sent to the client, so that the client can play the target video corresponding to the video access file, thereby improving the security of the video.

[0140] Based on this, in some embodiments, such as Figure 2 As shown, in the above S110, the client obtains the target verification information corresponding to the target video, which may specifically include:

[0141] S111, the client obtains a video identifier of a target video;

[0142] S112, the client sends a verification information acquisition request to the server, where the verification information acquisition request includes a video identifier;

[0143] S113, the server generates and caches target verification information corresponding to the video identifier;

[0144] S114. The server sends target verification information to the client.

[0145] Here, the video identifier may be a video ID corresponding to the target video, or may be a file ID.

[0146] In some embodiments, the server may generate the target verification information according to a preset rule. The preset generation rule is not specifically limited here, and the uniqueness of the target verification information is ensured.

[0147] In some embodiments, the server also caches the target verification information so that the server can decrypt the ciphertext information when receiving the ciphertext information.

[0148] In this way, the server generates target verification information, caches it and sends it to the client. The client can use the target verification information to encrypt the user identity information, and the server can use the target verification information to decrypt it, thereby achieving secure transmission of the user identity information and ensuring the security of the video.

[0149] Based on this, in some embodiments, after the above S114, the method may further include:

[0150] The server updates the access status of the video access file to the first target status;

[0151] The above S140 may specifically include:

[0152] When receiving the first video access file acquisition request sent by the client and the access status of the video access file is the first target status, the server acquires the key corresponding to the target identifier in the first video access file acquisition request.

[0153] Here, the first target state represents a state in which the video access file is allowed to be accessed, and at this time, the server can verify the client information.

[0154] In some embodiments, the server enters the verification process only when a first video access file acquisition request sent by a client is received and the access status of the video access file is the first target status, thereby achieving the purpose of dynamic verification.

[0155] In this way, the purpose of dynamic verification of the client is achieved based on the access status of the video access file. Only when the server receives the first video access file acquisition request sent by the client and the access status of the video access file is the first target state, the server obtains the key corresponding to the target identifier in the first video access file acquisition request and enters the verification process, thereby further improving the security of the video.

[0156] Based on this, in some embodiments, the method further includes:

[0157] When the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset conditions, the server sends the target information to the client.

[0158] Here, the second target state represents a state where the video access file is denied access. The target information represents that the video access file is not allowed to be accessed. Decryption failure means that the decryption result cannot be obtained and an abnormality occurs in the decryption process.

[0159] In some embodiments, upon receiving the target information, the client displays the target information to prompt the user that the video has not been acquired.

[0160] In this way, if an abnormality occurs in the process of obtaining the video access file, such as when the access status of the video access file is the second target status, or decryption fails, or the user identity information does not meet the preset conditions, the server sends the target information to the client, and the user will know that the video acquisition failed without the user having to wait too much, thereby improving the user experience.

[0161] Based on this, in some embodiments, the video access file address includes a first address of a video file, and the video access file includes a video file; Figure 3 As shown, after the above S170, the method may further include:

[0162] S180: The client plays the target video corresponding to the video file.

[0163] Here, 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.

[0164] In some embodiments, if the video access file includes a video file, the client can directly play the target video corresponding to the video file. It is understandable that the video file includes video data of the target video.

[0165] In some embodiments, the video file may also be encrypted, and the client negotiates a key with the server and then decrypts the video file for playback.

[0166] In this way, through the decryption of the ciphertext information and the verification of the user identity information on the server side, the client can obtain the video data of the target video from the server side, and then directly play the video, thus meeting user needs and improving user experience while ensuring the security of the video.

[0167] Based on this, in some embodiments, the video access file address includes the second address of the video index address file, and the video access file includes the video index address file; Figure 4 As shown, after the above S170, the method may further include:

[0168] S210, the client obtains the first address of the video file from the video index address file;

[0169] S220: The client uses the key to encrypt the user identity information according to a preset encryption rule to obtain second ciphertext information.

[0170] S230: The client sends a second video access file acquisition request to the server, where the second video access file acquisition request includes a first address, a target identifier, and a second ciphertext information;

[0171] S240, the server uses the key to decrypt the second ciphertext information according to a preset decryption rule;

[0172] S250: If the decryption is successful, the server verifies the user identity information obtained by decryption;

[0173] S260: When the user identity information meets a preset condition, the server sends the video file in the first address to the client;

[0174] S270: The client plays the target video corresponding to the video file.

[0175] Here, the video index address file refers to the m3u8 file.

[0176] In some embodiments, when the video access file is a video index address file, the client can obtain the first address of the video file from the video index address file. Then, similar to obtaining the video index address file, the same steps are used to perform verification to obtain the video file at the first address. Here, the first address is the address on the server.

[0177] It is understandable that although both use keys to encrypt user identity information according to preset encryption rules, these are two processes and the resulting ciphertext information may be different.

[0178] In this way, when the video access file is a video index address file, the client still needs to pass the server verification before obtaining the video file. The double verification of the video index address file and the video file access further improves the security of the video.

[0179] Based on this, in some embodiments, after the above S150, the method may further include:

[0180] The server deletes the target identifier and key cached in the server.

[0181] It should be noted that, in the case where the video access file is a video index address file, after the above S240, the server deletes the cached target identifier and key. That is, once the server receives an access request to the video file, the server will delete the cached target identifier and key after decrypting the ciphertext information using the obtained key, and the target identifier and key will become invalid.

[0182] In this way, regardless of whether the decryption is successful or not, once the server receives a request to access the video file and decrypts the ciphertext information using the acquired key, the cached target identifier and key will be deleted and cannot be reused. Even if the target verification information is cracked, the video file cannot be obtained, further improving the security of the video.

[0183] Based on this, in some embodiments, after deleting the target identifier and key cached in the server, the method may further include:

[0184] The server updates the access status of the video access file to the second target status.

[0185] Here, the second target state represents a state in which access to the video access file is denied.

[0186] It is understandable that from the time the server sends the target verification information to the client to the time the cached target identifier and key are deleted, the access status of the video access file is the first target status during this period, and the rest of the time is the second target status, thus achieving the purpose of dynamic verification.

[0187] In this way, the purpose of dynamic verification of the client is achieved based on the access status of the video access file. If the access status of the video access file is the second target state, the server will deny access and will not be able to obtain the video file. Only when the server receives the first video access file acquisition request sent by the client and the access status of the video access file is the first target state, the server will obtain the key corresponding to the target identifier in the first video access file acquisition request and enter the verification process, further improving the security of the video.

[0188] In the embodiment provided by the present application, starting from the transmission stage of the network, certain restrictions are imposed on the acquisition of video access files, and a dynamic identity verification method is used to ensure the security of the video file transmission process and improve the safety factor. At the same time, the embodiment provided by the present application can be used in combination with the m3u8 file encryption technology to further ensure the security of the video, and the encryption of the m3u8 file is not specifically limited here.

[0189] As an example, the client can be a player. The server includes a key server, a security verification server, and an authentication server. The key server is used to generate and cache target verification information; the security verification server is used to decrypt ciphertext information; and the authentication server is used to verify user identity information.

[0190] The embodiment provided in the present application uses a dynamic verification mechanism to clear the key information after the decryption is completed regardless of success or failure, so as to maximize the protection of the security of the video.

[0191] 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.

[0192] See also Figure 5 The video playback device 300 provided in the embodiment of the present application is applied to a server, and includes:

[0193] The acquisition module 310 is used to acquire a key corresponding to a target identifier in the first video access file acquisition request when receiving the first video access file acquisition request sent by the client. The first video access file acquisition request also includes a video access file address corresponding to the target video and first ciphertext information. The first ciphertext information is obtained by encrypting the user identity information by the client using the key according to a preset encryption rule.

[0194] A decryption module 320, configured to decrypt the first ciphertext information using a key according to a preset decryption rule corresponding to a preset encryption rule;

[0195] Verification module 330, used to verify the user identity information obtained by decryption if the decryption is successful;

[0196] The sending module 340 is used to send the video access file in the video access file address to the client when the user identity information meets the preset conditions, so that the client can play the target video corresponding to the video access file.

[0197] Based on this, in some embodiments, the apparatus 300 may further include:

[0198] A receiving module, configured to receive a verification information acquisition request sent by the client before acquiring a key corresponding to a target identifier in the first video access file acquisition request upon receiving the first video access file acquisition request sent by the client, wherein the verification information acquisition request includes a video identifier of a target video;

[0199] A generation module, used to generate and cache target verification information corresponding to the video identifier, the target verification information including the target identifier and a key corresponding to the target identifier;

[0200] The sending module 340 is further configured to send target verification information to the client.

[0201] Based on this, in some embodiments, the apparatus 300 may further include:

[0202] An updating module, configured to update the access status of the video access file to a first target status after sending the target verification information to the client;

[0203] The acquisition module 310 may be specifically used for:

[0204] When a first video access file acquisition request sent by a client is received and the access state of the video access file is a first target state, a key corresponding to the target identifier in the first video access file acquisition request is acquired.

[0205] Based on this, in some embodiments, the apparatus 300 may further include:

[0206] The sending module 340 is further configured to send target information to the client when the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset condition.

[0207] Based on this, in some embodiments, the video access file address includes a first address of the video file;

[0208] In a case where the video access file address is the first address, the video access file includes a video file.

[0209] Based on this, in some embodiments, the video access file address includes the second address of the video index address file, the video access file includes the video index address file, and the apparatus 300 may further include:

[0210] A receiving module, configured to receive a second video access file acquisition request sent by the client after sending the video access file in the video access file address to the client when the user identity information meets the preset conditions, wherein the second video access file acquisition request includes the first address, the target identifier, and the second ciphertext information, wherein the second ciphertext information is obtained by encrypting the user identity information by the client using a key according to a preset encryption rule, and the first address is an address in the video index address file;

[0211] The decryption module 320 is further used to decrypt the second ciphertext information using the key according to a preset decryption rule;

[0212] The verification module 330 is further used to verify the user identity information obtained by decryption if the decryption is successful;

[0213] The sending module 340 is further used to send the video file in the first address to the client when the user identity information meets the preset condition, so that the client can play the target video corresponding to the video file.

[0214] Based on this, in some embodiments, the apparatus 300 may further include:

[0215] The deletion module is used to delete the target identifier and the key cached in the server after decrypting the first ciphertext information using the key according to the preset decryption rule corresponding to the preset encryption rule.

[0216] Based on this, in some embodiments, the apparatus 300 may further include:

[0217] The updating module is used to update the access status of the video access file to a second target status after deleting the target identifier and the key cached in the server.

[0218] See also Figure 6 The video playback device 400 provided in the embodiment of the present application is applied to a client and includes:

[0219] The acquisition module 410 is used to acquire the video access file address corresponding to the target video, the target verification information corresponding to the target video, and the user identity information when receiving a click input on the target video, wherein the target verification information includes a target identifier and a key corresponding to the target identifier;

[0220] The encryption module 420 is used to encrypt the user identity information using a key according to a preset encryption rule to obtain first ciphertext information;

[0221] The sending module 430 is used to send a first video access file acquisition request to the server, where the first video access file acquisition request is used to instruct the server to use a key to decrypt the first ciphertext information according to a preset decryption rule corresponding to a preset encryption rule. If the decryption is successful and the user identity information obtained by decryption meets a preset condition, the video access file in the video access file address is sent to the client, where the first video access file acquisition request includes the video access file address, the target identifier, and the first ciphertext information.

[0222] The receiving module 440 is used to receive the video access file sent by the client to play the target video corresponding to the video access file.

[0223] Based on this, in some embodiments, the acquisition module 310 may be specifically used for:

[0224] Get the video ID of the target video;

[0225] Sending a verification information acquisition request to the server, the verification information acquisition request is used to instruct the server to generate and cache target verification information corresponding to the video identifier, and the verification information acquisition request includes the video identifier;

[0226] Receive the target verification information sent by the server.

[0227] Based on this, in some embodiments, the video access file is a file sent by the server when the access state of the video access file is the first target state.

[0228] Based on this, in some embodiments, the apparatus 400 may further include:

[0229] The receiving module 440 is also used to receive target information sent by the server. The target information is information sent by the server to the client when the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset conditions.

[0230] Based on this, in some embodiments, the video access file address includes a first address of a video file, and the video access file includes a video file; the apparatus 400 may further include:

[0231] The playing module is used to play the target video corresponding to the video file after receiving the video access file sent by the client.

[0232] Based on this, in some embodiments, the video access file address includes the second address of the video index address file, and the video access file includes the video index address file; the apparatus 400 may further include:

[0233] The acquisition module 410 is further configured to acquire the first address of the video file from the video index address file after receiving the video access file sent by the client;

[0234] The encryption module 420 is further used to encrypt the user identity information using the key according to the preset encryption rule to obtain the second ciphertext information;

[0235] The sending module 430 is further used to send a second video access file acquisition request to the server, the second video access file acquisition request is used to instruct the server to use the key to decrypt the second ciphertext information according to the preset decryption rule, if the decryption is successful and the user identity information obtained by decryption meets the preset conditions, then send the video file in the first address to the client, the second video access file acquisition request includes the first address, the target identifier and the second ciphertext information;

[0236] The receiving module 440 is also used to receive the video file sent by the client;

[0237] The playback module is used to play the target video corresponding to the video file.

[0238] 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.

[0239] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.

[0240] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0241] The electronic device may include a processor 501 and a memory 502 storing computer program instructions.

[0242] 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.

[0243] 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.

[0244] 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.

[0245] 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 .

[0246] In one example, the electronic device may further include a communication interface 503 and a bus 510. Figure 7 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.

[0247] 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.

[0248] 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.

[0249] 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.

[0250] 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.

[0251] 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.

[0252] 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.

[0253] 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.

[0254] 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.

[0255] 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 first video access file acquisition request sent by a client, obtaining a key corresponding to a target identifier in the first video access file acquisition request, wherein the first video access file acquisition request also includes a video access file address corresponding to a target video and first ciphertext information, wherein the first ciphertext information is obtained by the client using the key to encrypt user identity information according to a preset encryption rule; Decrypting the first ciphertext information using the key according to a preset decryption rule corresponding to the preset encryption rule; If the decryption is successful, verify the user identity information obtained by decryption; In the case where the user identity information meets a preset condition, the video access file in the video access file address is sent to the client, so that the client plays the target video corresponding to the video access file.

2. The video playback method according to claim 1, characterized in that: In the case of receiving a first video access file acquisition request sent by a client, before acquiring a key corresponding to a target identifier in the first video access file acquisition request, the method further includes: Receiving a verification information acquisition request sent by the client, wherein the verification information acquisition request includes a video identifier of the target video; Generate and cache target verification information corresponding to the video identifier, the target verification information including the target identifier and a key corresponding to the target identifier; The target verification information is sent to the client.

3. The video playback method according to claim 2, characterized in that: After sending the target verification information to the client, the method further includes: Updating the access state of the video access file to a first target state; The step of, upon receiving a first video access file acquisition request sent by a client, acquiring a key corresponding to a target identifier in the first video access file acquisition request, comprises: When a first video access file acquisition request sent by a client is received and the access state of the video access file is the first target state, a key corresponding to the target identifier in the first video access file acquisition request is acquired.

4. The video playback method according to claim 3, characterized in that: Also includes: When the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset condition, the target information is sent to the client.

5. The video playback method according to claim 1, characterized in that: The video access file address includes a first address of a video file; When the video access file address is the first address, the video access file is the video file.

6. The video playback method according to claim 1, characterized in that: The video access file address includes a second address of a video index address file, and the video access file includes the video index address file. When the user identity information satisfies a preset condition, after sending the video access file in the video access file address to the client, the method further includes: Receive a second video access file acquisition request sent by the client, the second video access file acquisition request includes a first address, the target identifier, and second ciphertext information, the second ciphertext information is obtained by the client using the key to encrypt user identity information according to a preset encryption rule, and the first address is an address in the video index address file; Decrypting the second ciphertext information using the key according to the preset decryption rule; If the decryption is successful, verify the user identity information obtained by decryption; When the user identity information satisfies the preset condition, the video file in the first address is sent to the client, so that the client plays the target video corresponding to the video file.

7. The video playback method according to claim 1, characterized in that: After decrypting the first ciphertext information using the key according to a preset decryption rule corresponding to the preset encryption rule, the method further includes: Delete the target identifier and the key cached in the server.

8. The video playback method according to claim 7, characterized in that: After deleting the target identifier and the key cached in the server, the method further includes: The access state of the video access file is updated to a second target state.

9. A video playback method, characterized in that: Applied to the client, including: When receiving a click input for a target video, obtaining a video access file address corresponding to the target video, target verification information corresponding to the target video, and user identity information, wherein the target verification information includes a target identifier and a key corresponding to the target identifier; Using the key, encrypt the user identity information according to a preset encryption rule to obtain first ciphertext information; Sending a first video access file acquisition request to the server, wherein the first video access file acquisition request is used to instruct the server to use the key to decrypt the first ciphertext information according to a preset decryption rule corresponding to the preset encryption rule, and if the decryption is successful and the user identity information obtained by decryption meets a preset condition, sending the video access file in the video access file address to the client, wherein the first video access file acquisition request includes the video access file address, the target identifier, and the first ciphertext information; The video access file sent by the client is received to play the target video corresponding to the video access file.

10. The video playback method according to claim 9, characterized in that: Obtaining target verification information corresponding to the target video, including: Obtaining a video identifier of the target video; Sending a verification information acquisition request to the server, the verification information acquisition request is used to instruct the server to generate and cache target verification information corresponding to the video identifier, and the verification information acquisition request includes the video identifier; Receive the target verification information sent by the server.

11. The video playback method according to claim 9, characterized in that: The video access file is a file sent by the server when the access state of the video access file is the first target state.

12. The video playback method according to claim 11, characterized in that: Also includes: Receive target information sent by the server, where the target information is information sent by the server to the client when the access status of the video access file is a second target status, or decryption fails, or the user identity information does not meet the preset condition.

13. The video playback method according to claim 9, characterized in that: The video access file address includes a first address of a video file, and the video access file is the video file; After receiving the video access file sent by the client, the method further includes: Play the target video corresponding to the video file.

14. The video playback method according to claim 9, characterized in that: The video access file address includes a second address of a video index address file, and the video access file includes the video index address file; After receiving the video access file sent by the client, the method further includes: Acquire a first address of a video file from the video index address file; Using the key, encrypt the user identity information according to a preset encryption rule to obtain second ciphertext information; Sending a second video access file acquisition request to the server, the second video access file acquisition request is used to instruct the server to use the key to decrypt the second ciphertext information according to the preset decryption rule, and if the decryption is successful and the user identity information obtained by decryption meets the preset condition, then sending the video file in the first address to the client, the second video access file acquisition request includes the first address, the target identifier and the second ciphertext information; Receiving the video file sent by the client; Play the target video corresponding to the video file.

15. A video playback device, characterized in that: Applied to the server, including: an acquisition module, configured to, upon receiving a first video access file acquisition request sent by a client, acquire a key corresponding to a target identifier in the first video access file acquisition request, wherein the first video access file acquisition request further includes a video access file address corresponding to a target video and first ciphertext information, wherein the first ciphertext information is obtained by the client using the key to encrypt user identity information according to a preset encryption rule; A decryption module, used to decrypt the first ciphertext information using the key according to a preset decryption rule corresponding to the preset encryption rule; A verification module, used for verifying the user identity information obtained by decryption if the decryption is successful; The sending module is used to send the video access file in the video access file address to the client when the user identity information meets the preset conditions, so that the client can play the target video corresponding to the video access file.

16. The video playback device according to claim 15, characterized in that: The device also includes: A receiving module, configured to, upon receiving a first video access file acquisition request sent by a client, receive a verification information acquisition request sent by the client before acquiring a key corresponding to a target identifier in the first video access file acquisition request, wherein the verification information acquisition request includes a video identifier of the target video; A generating module, configured to generate and cache target verification information corresponding to the video identifier, wherein the target verification information includes the target identifier and a key corresponding to the target identifier; The sending module is further used to send the target verification information to the client.

17. The video playback device according to claim 16, characterized in that: The device also includes: An updating module, configured to update the access status of the video access file to a first target status after sending the target verification information to the client; The acquisition module is specifically used for: When a first video access file acquisition request sent by a client is received and the access state of the video access file is the first target state, a key corresponding to the target identifier in the first video access file acquisition request is acquired.

18. The video playback device according to claim 17, characterized in that: Also includes: The sending module is further used to send target information to the client when the access status of the video access file is the second target status, or the decryption fails, or the user identity information does not meet the preset condition.

19. The video playback device according to claim 15, characterized in that: The video access file address includes a first address of a video file; When the video access file address is the first address, the video access file is the video file.

20. The video playback device according to claim 15, characterized in that: The video access file address includes a second address of a video index address file, the video access file includes the video index address file, and the device further includes: A receiving module, configured to receive a second video access file acquisition request sent by the client after sending the video access file in the video access file address to the client if the user identity information satisfies a preset condition, wherein the second video access file acquisition request includes a first address, the target identifier, and second ciphertext information, wherein the second ciphertext information is obtained by encrypting the user identity information by the client using the key according to a preset encryption rule, and the first address is an address in the video index address file; The decryption module is further used to use the key to decrypt the second ciphertext information according to the preset decryption rule; The verification module is further configured to verify the user identity information obtained through decryption if the decryption is successful; The sending module is further configured to send the video file in the first address to the client when the user identity information meets the preset condition, so that the client can play the target video corresponding to the video file.

21. The video playback device according to claim 15, characterized in that: The device also includes: The deletion module is used to delete the target identifier and the key cached in the server after decrypting the first ciphertext information using the key according to the preset decryption rule corresponding to the preset encryption rule.

22. The video playback device according to claim 21, characterized in that: The device also includes: An updating module is used to update the access state of the video access file to a second target state after deleting the target identifier and the key cached in the server.

23. A video playback device, characterized in that: Applied to the client, including: An acquisition module, configured to, upon receiving a click input on a target video, acquire a video access file address corresponding to the target video, target verification information corresponding to the target video, and user identity information, wherein the target verification information includes a target identifier and a key corresponding to the target identifier; An encryption module, used to encrypt the user identity information using the key according to a preset encryption rule to obtain first ciphertext information; A sending module, used for sending a first video access file acquisition request to a server, wherein the first video access file acquisition request is used to instruct the server to use the key to decrypt the first ciphertext information according to a preset decryption rule corresponding to the preset encryption rule, and if the decryption is successful and the user identity information obtained by decryption meets a preset condition, the video access file in the video access file address is sent to the client, wherein the first video access file acquisition request includes the video access file address, the target identifier and the first ciphertext information; The receiving module is used to receive the video access file sent by the client to play the target video corresponding to the video access file.

24. The video playback device according to claim 23, characterized in that: The acquisition module is specifically used for: Obtaining a video identifier of the target video; Sending a verification information acquisition request to the server, the verification information acquisition request is used to instruct the server to generate and cache target verification information corresponding to the video identifier, and the verification information acquisition request includes the video identifier; Receive the target verification information sent by the server.

25. The video playback device according to claim 23, characterized in that: The video access file is a file sent by the server when the access state of the video access file is the first target state.

26. The video playback device according to claim 25, characterized in that: Also includes: The receiving module is also used to receive target information sent by the server, where the target information is information sent by the server to the client when the access status of the video access file is the second target status, or decryption fails, or the user identity information does not meet the preset conditions.

27. The video playback device according to claim 23, characterized in that: The video access file address includes a first address of a video file, and the video access file is the video file; the device further includes: The playing module is used to play the target video corresponding to the video file after receiving the video access file sent by the client.

28. The video playback device according to claim 23, characterized in that: The video access file address includes a second address of a video index address file, and the video access file includes the video index address file; the device further includes: The acquisition module is further configured to acquire the first address of the video file from the video index address file after receiving the video access file sent by the client; The encryption module is further used to encrypt the user identity information using the key according to a preset encryption rule to obtain second ciphertext information; The sending module is further used to send a second video access file acquisition request to the server, the second video access file acquisition request is used to instruct the server to use the key to decrypt the second ciphertext information according to the preset decryption rule, if the decryption is successful, and the user identity information obtained by decryption meets the preset condition, then send the video file in the first address to the client, the second video access file acquisition request includes the first address, the target identifier and the second ciphertext information; The receiving module is further used to receive the video file sent by the client; The playing module is used to play the target video corresponding to the video file.

29. 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-8, or the video playback method described in any one of claims 9-14.

30. 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 8 or the video playback method according to any one of claims 9 to 14 is implemented.

31. 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 8, or the video playback method described in any one of claims 9 to 14.

Citation Information

Patent Citations

  • Interactive video generation method and system and storage medium

    CN114302218A

  • Multimedia playing method, system and device based on HLS and storage medium

    CN114501069A

  • Video file processing method and device, equipment and readable storage medium

    CN116055767A

  • Video playing method and device and electronic equipment

    CN117729379A

  • Secure web RTC real time communications service for audio and video streaming communications

    US20220107994A1