Video stream data encryption method and device and processing equipment

By using the video stream data encryption method in the video live broadcast platform and using the user identification, video stream data identification and timestamp to generate a unique key to encrypt key frames, the problem of insufficient security in video stream data distribution is solved and the data is ensured. the security and normal operation of the platform.

CN118632052APending Publication Date: 2024-09-10WUHAN OUYUE ONLINE TV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410734902.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The video stream data distribution method of the existing video live broadcast platform lacks data security and is easily stolen and exploited by third parties, affecting the normal operation of the platform.

Method used

Adopting the video stream data encryption method, through the collaboration between the client and the server, the user ID, video stream data ID, timestamp and other information are used to generate a unique secret key to encrypt the key frames of the video stream data to ensure that only the current user Video streaming data can be decrypted and viewed.

Benefits of technology

It effectively strengthens the security of video streaming data and prevents third-party users from being able to watch videos even if they obtain the video streaming address and data, ensuring the normal operation of the video live broadcast platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118632052A
    Figure CN118632052A
Patent Text Reader

Abstract

The invention provides a video stream data encryption method, a video stream data encryption device and processing equipment, which are used for distributing and processing video stream data of a video live broadcast platform, a set of novel video key frame encryption mechanism is realized, and only a current user can normally encrypt and watch the video stream data. Even if the third-party user obtains the video stream address through various ways and pulls the video stream data, the third-party user cannot watch the video, so that the effect of enhancing the data security is achieved, and the normal operation work of the video live broadcast platform is further guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video, and in particular to a method, device and processing equipment for encrypting video stream data. Background Art

[0002] Existing video live broadcast is easy to understand. It is to achieve the purpose of playing videos in a way that the client plays the video stream data distributed by the server. Behind the scenes, the video format of the video stream data played by the client adopts the mainstream universal format, which is convenient for the client's video player to load.

[0003] In this case, if the playback address of the video stream data can be obtained, the corresponding video stream data can be pulled from the server according to the playback address and played through a video player. Obviously, this makes it very easy for a third party (individual user or other platform) to steal the video stream data, and further use it for profit. Although different users now obtain different video stream addresses of the same video stream data, the pulled video stream data is the same, so as long as there is one video stream address, the complete video stream data can be obtained.

[0004] It can be seen that in the existing technology, the distribution method of video stream data lacks data security, which will affect the normal operation of the video live broadcast platform to a certain extent. Summary of the invention

[0005] The present application provides a video stream data encryption method, apparatus and processing equipment for the distribution and processing of video stream data for a live video broadcast platform, and implements a novel video key frame encryption mechanism, in which only the current user can encrypt and watch normally. Even if a third-party user obtains the video stream address and pulls the video stream data through various channels, he or she will not be able to watch the video, thereby enhancing data security and ensuring the normal operation of the live video broadcast platform.

[0006] In a first aspect, the present application provides a method for encrypting video stream data, the method comprising:

[0007] Receive a video stream data sending request reported by a client, wherein the video stream data sending request is used to request sending of target video stream data, and the video stream data sending request carries a user identifier of a request initiating user, a video stream data identifier of the target video stream data, and a timestamp identifying the time when the request was initiated;

[0008] Based on the user ID, video stream data ID, timestamp and the unique paired identifier of this video stream data pulling process, a corresponding secret key is generated by a preset secret key generation algorithm;

[0009] Encrypt the key frames of the target video stream data using a secret key;

[0010] The encrypted target video stream data and identifier are sent to the client, so that the client generates a secret key through a preset secret key generation algorithm based on the user identifier, video stream data identifier, timestamp and identifier, and plays the target video stream data after decrypting it with the secret key.

[0011] In a second aspect, the present application provides a method for encrypting video stream data, the method comprising:

[0012] Determine the target video stream data to be played;

[0013] Reporting a video stream data sending request to a server, so that the server generates a corresponding secret key through a preset secret key generation algorithm based on the user ID of the request initiator, the video stream data ID of the target video stream data, the timestamp of the time when the request was initiated, and the uniquely paired identifier of the current video stream data pull processing, and then encrypts the key frame of the target video stream data through the secret key, wherein the video stream data sending request is used to request the sending of the target video stream data, and the video stream data sending request carries the user ID, the video stream data ID, and the timestamp;

[0014] Receive target video stream data and identifier sent by the server;

[0015] Generate a secret key through a preset secret key generation algorithm based on the user ID, video stream data ID, timestamp and identifier;

[0016] Decrypt the target video stream data using the secret key;

[0017] Play the target video stream data.

[0018] In a third aspect, the present application provides a video stream data encryption device, the device comprising:

[0019] A receiving unit, configured to receive a video stream data sending request reported by a client, wherein the video stream data sending request is used to request sending of target video stream data, and the video stream data sending request carries a user identifier of a request initiating user, a video stream data identifier of the target video stream data, and a timestamp identifying the time when the request was initiated;

[0020] A generating unit, configured to generate a corresponding secret key by a preset secret key generation algorithm based on a user identifier, a video stream data identifier, a timestamp, and an identifier uniquely paired with the current video stream data pulling process;

[0021] An encryption unit, used for encrypting key frames of target video stream data using a secret key;

[0022] The sending unit is used to send the encrypted target video stream data and the identifier to the client, so that the client generates a secret key through a preset secret key generation algorithm based on the user identifier, video stream data identifier, timestamp and identifier, and plays the target video stream data after decrypting the target video stream data through the secret key.

[0023] In a fourth aspect, the present application provides a video stream data encryption device, the device comprising:

[0024] A determination unit, used to determine target video stream data to be played;

[0025] A reporting unit, used for reporting a video stream data sending request to a server, so that the server generates a corresponding secret key through a preset secret key generation algorithm based on a user identifier of a request initiating user, a video stream data identifier of a target video stream data, a timestamp of a time when the request is initiated, and an identifier uniquely paired with the current video stream data pulling and processing, and then encrypts a key frame of the target video stream data through the secret key, wherein the video stream data sending request is used to request sending the target video stream data, and the video stream data sending request carries the user identifier, the video stream data identifier, and the timestamp;

[0026] A receiving unit, used for receiving target video stream data and an identifier sent by a server;

[0027] A generating unit, configured to generate a secret key through a preset secret key generating unit based on a user identifier, a video stream data identifier, a timestamp and an identifier;

[0028] A decryption unit, used for decrypting target video stream data using a secret key;

[0029] The playback unit is used to play the target video stream data.

[0030] In a fifth aspect, the present application provides a processing device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, it executes the method provided by the first aspect of the present application, any possible implementation of the first aspect of the present application, the second aspect of the present application, or any possible implementation of the second aspect of the present application.

[0031] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the method provided in the first aspect of the present application or any possible implementation of the first aspect of the present application.

[0032] From the above content, it can be concluded that the present application has the following beneficial effects:

[0033] Regarding the distribution and processing of video stream data of the live video broadcast platform, this application is that the client side reports a request for sending video stream data, and the request for sending video stream data carries the user ID of the user initiating the request, the video stream data ID of the target video stream data, and a timestamp indicating the time when the request was initiated. The server side can generate a corresponding key through a preset key generation algorithm based on the user ID, video stream data ID, timestamp, and an identifier that is uniquely paired with this video stream data pull processing, and encrypt the key frames of the target video stream data through the secret key, and send the encrypted target video stream data and the identifier to the client side, and the client ... send the encrypted target video stream data and the identifier to the client side, and the client side can generate a corresponding key through a preset key generation algorithm based on the user ID , video stream data identification, timestamp and identifier, a secret key is generated by a preset key generation algorithm, and the target video stream data is played after being decrypted by the secret key. In this way, on the basis of a series of data required for generating the secret key on the client side, a unique secret key with high confidentiality is constructed in combination with the identifier on the server side, and a novel video key frame encryption mechanism is implemented. Only the current user can encrypt and watch normally. Even if a third-party user obtains the video stream address and pulls the video stream data through various channels, he or she will not be able to watch the video, which enhances data security and ensures the normal operation of the video live broadcast platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 A schematic diagram of a flow chart of the video stream data encryption method of the present application;

[0036] Figure 2 This is another flow chart of the video stream data encryption method of the present application;

[0037] Figure 3 A schematic diagram of the structure of the video stream data encryption device of the present application;

[0038] Figure 4 This is another structural diagram of the video stream data encryption device of the present application;

[0039] Figure 5 A schematic diagram of the structure of the processing equipment of this application. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0041] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0042] The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.

[0043] Before introducing the video stream data encryption method provided by this application, the background content involved in this application is first introduced.

[0044] The video stream data encryption method, device and computer-readable storage medium provided in the present application can be applied to processing equipment for distributing and processing video stream data for a live video broadcast platform, and implements a novel video key frame encryption mechanism. Only the current user can encrypt and watch normally. Even if a third-party user obtains the video stream address and pulls the video stream data through various channels, he or she will not be able to watch the video, thereby enhancing data security and ensuring the normal operation of the live video broadcast platform.

[0045] The video stream data encryption method mentioned in the present application may be executed by a video stream data encryption device, or a server or client that integrates the video stream data encryption device, wherein the client may be specifically understood as a user equipment (UE), and the video stream data encryption device may be implemented in hardware or software. The UE is installed with a client application / service, which may specifically be a user-side terminal device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, or a personal digital assistant (PDA).

[0046] It can be understood that the original intention of the solution of this application involves a video live broadcast application scenario, in which the server is a server of a video live broadcast platform, and the client is a device for users or viewers to access the video live broadcast platform to watch video live content.

[0047] In addition, it is easy to understand that the overall solution of the present application involves encryption processing of video stream data. Thus, in addition to the live video application scenario, in actual situations, other types of application scenarios may also be involved, which can be configured according to actual conditions.

[0048] Next, we will introduce the video stream data encryption method provided by this application.

[0049] First, see Figure 1 , Figure 1 A schematic diagram of a process of encrypting video stream data of the present application is shown. The video stream data encryption method provided by the present application may specifically include the following steps S101 to S104:

[0050] Step S101, receiving a video stream data sending request reported by a client, wherein the video stream data sending request is used to request sending target video stream data, and the video stream data sending request carries a user identifier of a request initiating user, a video stream data identifier of the target video stream data, and a timestamp identifying the time when the request was initiated;

[0051] Generally speaking, in actual situations, the distribution and processing of video stream data is initiated by the client, which requests the server to respond in the form of a video stream data sending request and sends specific target video stream data. This also corresponds to the situation where when the audience opens the current live broadcast room, they need to pull the video stream data corresponding to the live broadcast room from the server side for playback.

[0052] Among them, it should be noted that the request for sending the video stream data reported to the server carries a series of data pointing to the current situation, which involves not only the user, but also the target video stream data, and also the time, which is also a series of data required for generating secret keys on the client side designed by this application.

[0053] As an example, these data are:

[0054] The user ID is recorded as UID, which is the unique ID of the user on the video live broadcast platform. Specifically, it is a 64-bit string consisting of numbers and letters;

[0055] The video stream data identifier is recorded as VideoID, which is a unique ID number generated by the server for each video stream data, specifically a 512-bit string consisting of numbers and letters;

[0056] The timestamp is TimeStamp, which is a 10-digit numeric string.

[0057] It can be understood that the user ID, video stream data ID and timestamp also reflect an event of a user watching a video, which is also helpful for subsequent backtracking of the video stream data distribution processing involved in the current user watching the video event.

[0058] It can also be seen from here that the secret key to be generated by this application and used to encrypt the key frames of the video stream data is one-to-one bound to the current user's video viewing event, that is, the design of this application scheme is to encrypt the key frame data of the video stream each time each user pulls the video stream, and the secret key used each time is re-generated / in real time, and will not be the same each time.

[0059] In this way, taking users A and B as an example, the video stream data pulled by user A and the video stream data pulled by user B are different. The video stream data pulled by user A can only be decrypted and viewed by user A, and the video stream data pulled by user B can only be decrypted and viewed by user B.

[0060] Step S102, generating a corresponding secret key by a preset secret key generation algorithm based on the user identifier, the video stream data identifier, the timestamp, and the unique paired identifier for the current video stream data pulling process;

[0061] It can be clearly seen that in addition to a series of data required to generate secret keys on the client side, when generating a key that matches the current user video viewing event (this video stream data pulling and processing), a unique paired identifier may also be involved. The identifier is easy to understand and is a string of characters that may involve numbers, letters or symbols.

[0062] Similar to the data required to generate a series of secret keys on the client side, this identifier is uniquely paired with the current user video viewing event (this video stream data pull process).

[0063] In this way, based on a series of data required to generate the key on the client side, a unique key with high confidentiality is constructed in combination with the identifier on the server side.

[0064] Among them, the preset key generation algorithm required to generate the key can be any type of necessary generation algorithm, as long as the keys generated based on different input data must be different, which can meet the usage requirements.

[0065] As an example, a hash algorithm can be used, such as the SHA-256 algorithm. The SHA-256 value generated by calling the SHA256 algorithm is the key. Of course, in addition to the SHA-256 algorithm, there are other different types of specific hash algorithms, such as the SHA-1 algorithm, the MD5 algorithm, etc. Considering that this application does not make corresponding optimization and improvement to the hash algorithm itself, it will not be described in detail here.

[0066] Of course, in practical applications, the use of self-developed or novel algorithms is not ruled out, which is possible for actual situations where application requirements are complex and changeable.

[0067] Step S103, encrypting the key frame of the target video stream data by using a secret key;

[0068] After constructing a unique key with high confidentiality, the target video stream data to be pulled by the user side can be encrypted. It should be noted that in the present application scheme, the target video stream data is not encrypted as a whole, but the key frames in the target video stream data are encrypted. After the key frames are encrypted, the target video stream data.

[0069] Among them, the key frames of the target video stream data can be the key frames that have been identified or determined by the target video stream data itself, that is, the ready-made key frames, or they can be the key frames determined in real time. Considering that how to determine the key frames is not the focus of the present application, no detailed explanation will be given here.

[0070] Similarly, the encryption algorithm used can also directly adopt a ready-made encryption algorithm. Of course, it is not ruled out that a self-developed or novel encryption algorithm can be used in actual applications.

[0071] As an example, in the video stream data, there is an H.264 structure h264_decode_struct designed to store relevant information of the video stream data, so that the recorded key frames can be determined therefrom. For the H.264 structure h264_decode_struct, the following content may be present:

[0072] typedef struct{

[0073] int nGOPIndex; / / Group of Pictures index (GOP), indicating the position of the current frame in the current group of pictures (GOP)

[0074] int frame_type; / / Frame type, usually refers to I frame, P frame or B frame, representing key frame, predicted frame and bidirectional predicted frame respectively

[0075] int nFramePOC; / / Picture Order Count (POC), used to determine the playback order of frames

[0076] unsigned char*data; / / Pointer to frame data, specific frame data content

[0077] int data_len; / / The length of the frame data, in bytes

[0078] unsigned int nTimeStamp; / / Timestamp, marking the capture or expected display time of the frame, the unit is not specified but usually milliseconds

[0079] uint64_t pts; / / Presentation Timestamp, which is very important in multimedia synchronization to ensure synchronous playback of audio and video

[0080] }h264_decode_struct; structure name

[0081] Considering the server performance and client performance issues, we can focus on encrypting the data of key frames, namely I frames, while the data of other frames continue to be configured in plain text.

[0082] In this way, when the server sends the video stream data to the client, it determines whether there is key frame data in the video stream data, and if it is key frame data, it is encrypted using the secret key.

[0083] Taking the AES encryption algorithm (a symmetric encryption algorithm) as an example, the encryption processing involved may include:

[0084] AES.encrypt(data,data_len,HashResult,output,output_len);

[0085] Among them, AES.encrypt means using the AESs encryption algorithm to encrypt data, the parameter data represents the original plaintext key frame data content, the parameter data_len represents the data size of the original plaintext key frame, the parameter output represents the encrypted key frame data content, and the parameter output_len represents the encrypted key frame data size.

[0086] Step S104, the encrypted target video stream data and the identifier are sent to the client, so that the client generates a key through a preset key generation algorithm based on the user identifier, video stream data identifier, timestamp and identifier, and plays the target video stream data after decrypting the target video stream data through the key.

[0087] After completing the encryption of the target video stream data, the server side can send it to the client side, and at the same time, send the identifier used by the server side in the encryption process to the client side.

[0088] In this way, after receiving the encrypted target video stream data, the client can generate the same highly confidential unique key as the server side based on the preset key generation algorithm agreed upon / synchronized in advance, combined with the user ID, video stream data ID, and timestamp previously reported by its side along with the video stream data request.

[0089] It can be understood that since the data required to generate the secret key is only known by the current client and server that have informed each other, only the current client and server can generate a unique secret key that matches the target video stream data and can encrypt and decrypt it. For any third party, it is impossible to obtain the unique secret key for decryption. Therefore, even if the target video stream data is stolen, it cannot be played or used normally.

[0090] After obtaining the unique key, the decryption algorithm corresponding to the server-side encryption algorithm can be used, such as the server side, to focus on the key frames in the target video stream data and carry out decryption processing to obtain the target video stream data that can be loaded and played normally, and play it to complete the playback of a live video content.

[0091] As an example, corresponding to the AES encryption algorithm mentioned above, on the client side, the decryption processing involved may include:

[0092] AES.decrypt(data,data_len,HashResult,output,output_len);

[0093] Among them, AES.decrypt means using the AES encryption algorithm to decrypt the data, the parameter data represents the encrypted key frame data content sent by the server, the parameter data_len represents the data size of the encrypted key frame sent by the server, the parameter output represents the original content of the decrypted key frame data, and the parameter output_len represents the data size of the decrypted key frame.

[0094] The parameter output obtained at this time is the original, plain text key frame data, and the complete target video stream data that can be played normally is obtained at this time.

[0095] As an example, considering the experience of users watching live broadcasts on a live video platform, the present application can also design a method for requesting a video stream address. When a user enters the live broadcast room to watch the corresponding live video content, he or she first obtains a standard-definition video stream address from the server through a general interface authentication method. The video clarity of the standard-definition video stream address is not high, and it only supports viewing for 10 minutes. After 10 minutes, the server will cut off the stream and the user will not be able to continue watching.

[0096] During the user's viewing process, the high-definition video stream address can continue to be pulled, and high-definition video stream data can be pulled from the high-definition video stream address. The key frames of the pulled video stream data are encrypted through the above-mentioned processing content, so that decryption is impossible without a unique key. At the same time, since the secret key used is generated for the current user viewing video event (this video stream data pulling process), the secret key used for each stream pulling is different, which has a high degree of data security and uniqueness. When the secret key is difficult to steal, it is naturally difficult to steal the video stream data that can be played normally.

[0097] from Figure 1As can be seen from the illustrated embodiment, with respect to the distribution and processing of video stream data of a live video broadcasting platform, the present application is performed by the client side reporting a request for sending video stream data, and the request for sending video stream data carries the user ID of the user initiating the request, the video stream data ID of the target video stream data, and a timestamp identifying the time when the request was initiated. The server side can generate a corresponding key through a preset key generation algorithm based on the user ID, the video stream data ID, the timestamp, and an identifier that is uniquely paired with the current video stream data pull processing, and encrypt the key frames of the target video stream data through the secret key, and send the encrypted target video stream data and the identifier to the client side, and the client side can then generate a corresponding key through a preset key generation algorithm based on the user ID, the video stream data ID, the timestamp, and the identifier that is uniquely paired with the current video stream data pull processing. The server side can also generate a corresponding key through a preset key generation algorithm, and encrypt the key frames of the target video stream data through the secret key, and send the encrypted target video stream data and the identifier to the client side, and the client side can then generate a corresponding key through a preset key generation algorithm based on the user ID, the video stream data ID, the timestamp, and the identifier that is uniquely paired with the current video stream data pull processing ... A secret key is generated by a preset key generation algorithm based on the user ID, video stream data ID, timestamp and identifier, and the target video stream data is played after being decrypted by the secret key. In this way, based on a series of data required for generating the secret key on the client side, a unique secret key with high confidentiality is constructed in combination with the identifier on the server side, thereby realizing a novel video key frame encryption mechanism. Only the current user can encrypt and watch normally. Even if a third-party user obtains the video stream address and pulls the video stream data through various channels, he or she will not be able to watch the video, thereby enhancing data security and ensuring the normal operation of the video live broadcast platform.

[0098] Next, we will continue to Figure 1 Each step of the illustrated embodiment and possible implementation methods thereof in practical applications are described in detail.

[0099] It can be understood that in practical applications, in order to further enhance the uniqueness and data security of the secret key involved in the present application scheme, new elements can be added to the data involved in generating the secret key to further increase the complexity of the data required to generate the secret key.

[0100] As an exemplary implementation, the preceding step S102 generates a corresponding key through a preset key generation algorithm based on the user identifier, the video stream data identifier, the timestamp, and the unique paired identifier for the current video stream data pull process, which may specifically include:

[0101] Based on the user identifier, video stream data identifier, timestamp, identifier and request tracking identifier corresponding to the video stream data sending request, a corresponding key is generated by a preset key generation algorithm, wherein the request tracking identifier is obtained synchronously by the client.

[0102] Among them, it is easy to understand that the request tracking identifier is an identifier used to track the user's video viewing event (this video stream data pulling and processing). Like other data required to generate secret keys on the user side, it needs to be reported / synchronized by the client to the server side.

[0103] Specifically, taking into account the higher data security of the secret key and the situation of video stream theft, this application continues to design a method that can participate in the secret key algorithm based on the user's network request data. When watching the live broadcast, normal users will go to the startup page, home page, list page and other pages, and then enter the live broadcast room to watch the live broadcast. Therefore, normal users will go through multiple pages, each page will have multiple request data, and each page will also have an operation record of the user's operation and dot data request. The theft user directly pulls the video stream data through the video stream address, so there is no above-mentioned page request data.

[0104] In this way, based on user differences, this application can record the unique identifier of each request when the client initiates a request after startup, that is, the request tracking identifier, which is used to lock the startup behavior of a series of pages involved in the user's video viewing event (this video stream data pulling and processing), thereby screening out real users.

[0105] The request tracking identifier can be recorded as TraceID in a specific application. Specifically, the relevant page startup record (or the user operation record of starting the relevant page) involved in the current user video viewing event (this video stream data pulling and processing) can be identified by one identifier or a group of identifiers in accordance with a preset identification method.

[0106] Taking the configuration as a group of identifiers as an example, the client side can add a TraceID (unique ID of the request) to each request. The TraceID can be a string of serial data composed of numbers and English letters, with a length of 64 bits. It is used to mark the uniqueness of the request and facilitate the server to troubleshoot network problems. The success, failure, performance and other issues of the request can be checked based on the traceid. In this way, all requests involved from the user starting the client to entering the live broadcast room can be determined from the current group of TraceIDs.

[0107] Furthermore, the request tracking identifier involved in this user video viewing event (this video stream data pulling process) can be reported to the server side together with other data required for generating a secret key, or it can be reported in other ways.

[0108] Specifically, the present application may introduce a synchronization mechanism of a request tracking identifier queue between the client and the server, so as to facilitate synchronization of different request tracking identifiers on the client side between the client and the server, and can conveniently assist in generating a unique key.

[0109] In this regard, as another exemplary embodiment, the method of the present application may further include:

[0110] Receiving a request tracking identifier queue reported by a client, wherein the request tracking identifier queue is composed of request tracking identifiers of successful requests by the client;

[0111] A request tracking identifier corresponding to the video stream data sending request is determined based on the request tracking identifier queue.

[0112] Among them, it should be noted that the different request tracking identifiers involved in the request tracking identifier queue are specifically the request tracking identifiers of the requests that are successfully sent to the server side and responded to, excluding the requests that failed to respond. For the requests that failed to respond, it is easy to understand that the request can be retried. In this way, when the request is successful, a new request tracking identifier corresponding to the request will be added to the request tracking identifier queue.

[0113] In this way, based on the request tracking identifier queue, the request tracking identifier involved in the current user video viewing event (current video stream data pulling process) can be easily determined, which also helps to trace back the user behavior later.

[0114] At the same time, in terms of details, this application also takes into account that the client may initiate multiple requests at the same time. When multiple requests are initiated at the same time, there may be a slight error in the order of the requests and the order of the requests received by the server for some special requests. Therefore, if the client and the server follow their respective request orders, there may be errors in some cases. Taking into account the actual situation, this application can be specially configured to sort the TraceIDs of all request sequences in ascending alphabetical order, thereby ensuring that the TraceID lists of the client and the server are consistent.

[0115] That is, as another exemplary embodiment, different request tracking identifiers in the request tracking identifier queue may be specifically configured based on letters and digits and sorted in ascending order.

[0116] In addition, as an exemplary embodiment, the identifier configured on the server side involved in the key generation process can be a random value. In this way, under a high degree of randomness, the uniqueness of the generated key is further enhanced and its data security is improved.

[0117] Correspondingly, the identifier configured in the form of a random value can be recorded as a salt value Salt in a specific application.

[0118] Thus, based on the above multiple exemplary embodiments, as an example, still taking the SHA-256 algorithm as an example, the key generation process involved may include:

[0119] HashResult = Sha256 (TimeStamp + UID + VideoID + [TraceID list] + Salt);

[0120] Among them, HashResult is the secret key.

[0121] In addition, the above embodiments obviously introduce the solution of the present application from the perspective of the server side. Correspondingly, the present application can also provide another video stream data encryption method from the perspective of the client side.

[0122] See also Figure 2 , Figure 2 Another schematic diagram of a process of encrypting video stream data of the present application is shown. The video stream data encryption method provided by the present application may specifically include the following steps S201 to S206:

[0123] Step S201, determining the target video stream data to be played;

[0124] Step S202, reporting a video stream data sending request to the server, so that the server generates a corresponding secret key through a preset secret key generation algorithm based on the user identifier of the request initiator, the video stream data identifier of the target video stream data, the timestamp of the time when the request was initiated, and the identifier uniquely paired with the current video stream data pull processing, and then encrypts the key frame of the target video stream data through the secret key, wherein the video stream data sending request is used to request the sending of the target video stream data, and the video stream data sending request carries the user identifier, the video stream data identifier, and the timestamp;

[0125] Step S203, receiving the target video stream data and identifier sent by the server;

[0126] Step S204, generating a secret key by a preset secret key generation algorithm based on the user identifier, the video stream data identifier, the timestamp and the identifier;

[0127] Step S205, decrypting the target video stream data using a secret key;

[0128] Step S206, playing the target video stream data.

[0129] In an exemplary embodiment, reporting a video stream data sending request to a server specifically enables the server to generate a corresponding key through a preset key generation algorithm based on a user identifier, a video stream data identifier, a timestamp, an identifier, and a request tracking identifier corresponding to the video stream data sending request;

[0130] Based on the user ID, video stream data ID, timestamp and identifier, a secret key is generated through a preset secret key generation algorithm, including:

[0131] Based on the user ID, video stream data ID, timestamp, identifier and request tracking ID, a secret key is generated by a preset secret key generation algorithm.

[0132] In yet another exemplary embodiment, the method further includes:

[0133] Reporting a request tracking identifier queue to the server enables the server to determine a request tracking identifier corresponding to the video stream data sending request based on the request tracking identifier queue, wherein the request tracking identifier queue is composed of request tracking identifiers of successful requests by the client.

[0134] In yet another exemplary embodiment, different request tracking identifiers in the request tracking identifier queue are configured based on alphanumeric characters and are sorted in ascending order.

[0135] In yet another exemplary embodiment, the identifier is specifically a random value.

[0136] Those skilled in the art will clearly understand that for the convenience and brevity of description, Figure 2 The video stream data encryption method provided by the embodiment shown is Figure 1 The video stream data encryption method provided in the illustrated embodiment is relatively simple, more specifically, presented from the perspective of the client. For this, the specific solution content can be referred to Figure 1 The description of the video stream data encryption method in the corresponding embodiment will not be repeated here.

[0137] The above is an introduction to the video stream data encryption method provided by this application. In order to facilitate better implementation of the video stream data encryption method provided by this application, this application also provides a video stream data encryption device from the perspective of functional modules.

[0138] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of the video stream data encryption device of the present application. In the present application, the video stream data encryption device 300 may specifically include the following structure:

[0139] The receiving unit 301 is used to receive a video stream data sending request reported by a client, wherein the video stream data sending request is used to request to send target video stream data, and the video stream data sending request carries a user identifier of a request initiating user, a video stream data identifier of the target video stream data, and a timestamp identifying the time when the request was initiated;

[0140] A generating unit 302 is used to generate a corresponding secret key by a preset secret key generation algorithm based on a user identifier, a video stream data identifier, a timestamp, and an identifier uniquely paired with the current video stream data pulling process;

[0141] The encryption unit 303 is used to encrypt the key frame of the target video stream data by using a secret key;

[0142] The sending unit 304 is used to send the encrypted target video stream data and the identifier to the client, so that the client generates a key through a preset key generation algorithm based on the user identifier, video stream data identifier, timestamp and identifier, and plays the target video stream data after decrypting the target video stream data through the key.

[0143] In an exemplary embodiment, the generating unit 302 is specifically configured to:

[0144] Based on the user identifier, video stream data identifier, timestamp, identifier and request tracking identifier corresponding to the video stream data sending request, a corresponding key is generated by a preset key generation algorithm, wherein the request tracking identifier is obtained synchronously by the client.

[0145] In another exemplary embodiment, the receiving unit 301 is further configured to:

[0146] Receiving a request tracking identifier queue reported by a client, wherein the request tracking identifier queue is composed of request tracking identifiers of successful requests by the client;

[0147] The generating unit 302 is further configured to:

[0148] A request tracking identifier corresponding to the video stream data sending request is determined based on the request tracking identifier queue.

[0149] In yet another exemplary embodiment, different request tracking identifiers in the request tracking identifier queue are configured based on alphanumeric characters and are sorted in ascending order.

[0150] In yet another exemplary embodiment, the identifier is specifically a random value.

[0151] In addition, this application also provides another video stream data encryption device, see Figure 4 , Figure 4 This is another structural diagram of the video stream data encryption device of the present application. In the present application, the video stream data encryption device 400 may specifically include the following structure:

[0152] A determination unit 401 is used to determine target video stream data to be played;

[0153] The reporting unit 402 is used to report a video stream data sending request to the server, so that the server generates a corresponding secret key through a preset secret key generation algorithm based on the user identifier of the request initiating user, the video stream data identifier of the target video stream data, the timestamp of the time when the request is initiated, and the identifier uniquely paired with the current video stream data pulling process, and then encrypts the key frame of the target video stream data through the secret key, wherein the video stream data sending request is used to request the sending of the target video stream data, and the video stream data sending request carries the user identifier, the video stream data identifier, and the timestamp;

[0154] The receiving unit 403 is used to receive the target video stream data and the identifier sent by the server.

[0155] A generating unit 404, configured to generate a secret key through a preset secret key generating unit based on the user identifier, the video stream data identifier, the timestamp and the identifier;

[0156] A decryption unit 405, used to decrypt the target video stream data using a secret key;

[0157] The playing unit 406 is used to play the target video stream data.

[0158] In an exemplary embodiment, the reporting unit 402 reports the video stream data sending request to the server, specifically enabling the server to generate a corresponding key through a preset key generation algorithm based on the user identifier, the video stream data identifier, the timestamp, the identifier, and the request tracking identifier corresponding to the video stream data sending request;

[0159] The generating unit 404 is specifically configured to:

[0160] Based on the user ID, video stream data ID, timestamp, identifier and request tracking ID, a secret key is generated by a preset secret key generation algorithm.

[0161] In another exemplary embodiment, the reporting unit 402 is further configured to:

[0162] Reporting a request tracking identifier queue to the server enables the server to determine a request tracking identifier corresponding to the video stream data sending request based on the request tracking identifier queue, wherein the request tracking identifier queue is composed of request tracking identifiers of successful requests by the client.

[0163] In yet another exemplary embodiment, different request tracking identifiers in the request tracking identifier queue are configured based on alphanumeric characters and are sorted in ascending order.

[0164] In yet another exemplary embodiment, the identifier is specifically a random value.

[0165] The present application also provides a processing device from the perspective of hardware structure. The processing device can be a client or server involved in the solution of the present application. Figure 5 , Figure 5 501, a memory 502, and an input / output device 503. The processor 501 is used to execute the computer program stored in the memory 502 to implement the following Figure 1 or Figure 2 The steps of the video stream data encryption method in the corresponding embodiment; or, the processor 501 is used to execute the computer program stored in the memory 502 to implement the following Figure 3 Or 4 corresponds to the functions of each unit in the embodiment, the memory 502 is used to store the processor 501 to execute the above Figure 1 or Figure 2 The computer program required by the video stream data encryption method in the corresponding embodiment.

[0166] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 502, and executed by the processor 501 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.

[0167] The processing device may include, but is not limited to, a processor 501, a memory 502, and an input / output device 503. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation on the processing device, and may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the processing device may also include a network access device, a bus, etc., and the processor 501, the memory 502, the input / output device 503, etc. are connected via a bus.

[0168] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the processing device, and uses various interfaces and lines to connect various parts of the entire device.

[0169] The memory 502 can be used to store computer programs and / or modules. The processor 501 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 502 and calling the data stored in the memory 502. The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the processing device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0170] When the processor 501 is used to execute the computer program stored in the memory 502, the following functions can be implemented:

[0171] Receive a video stream data sending request reported by a client, wherein the video stream data sending request is used to request sending of target video stream data, and the video stream data sending request carries a user identifier of a request initiating user, a video stream data identifier of the target video stream data, and a timestamp identifying the time when the request was initiated;

[0172] Based on the user ID, video stream data ID, timestamp and the unique paired identifier of this video stream data pulling process, a corresponding secret key is generated by a preset secret key generation algorithm;

[0173] Encrypt the key frames of the target video stream data using a secret key;

[0174] The encrypted target video stream data and identifier are sent to the client, so that the client generates a secret key through a preset secret key generation algorithm based on the user identifier, video stream data identifier, timestamp and identifier, and plays the target video stream data after decrypting it with the secret key.

[0175] Alternatively, when the processor 501 is used to execute the computer program stored in the memory 502, the following functions may be implemented:

[0176] Determine the target video stream data to be played;

[0177] Reporting a video stream data sending request to a server, so that the server generates a corresponding secret key through a preset secret key generation algorithm based on the user ID of the request initiator, the video stream data ID of the target video stream data, the timestamp of the time when the request was initiated, and the uniquely paired identifier of the current video stream data pull processing, and then encrypts the key frame of the target video stream data through the secret key, wherein the video stream data sending request is used to request the sending of the target video stream data, and the video stream data sending request carries the user ID, the video stream data ID, and the timestamp;

[0178] Receive target video stream data and identifier sent by the server;

[0179] Generate a secret key through a preset secret key generation algorithm based on the user ID, video stream data ID, timestamp and identifier;

[0180] Decrypt the target video stream data using the secret key;

[0181] Play the target video stream data.

[0182] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the video stream data encryption device, processing device and its corresponding units described above can refer to the following. Figure 1 The description of the video stream data encryption method in the corresponding embodiment will not be repeated here.

[0183] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0184] To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figure 1 or Figure 2 The steps of the video stream data encryption method in the corresponding embodiment, the specific operation can refer to the following Figure 1or Figure 2 The description of the video stream data encryption method in the corresponding embodiment will not be repeated here.

[0185] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0186] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figure 1 or Figure 2 The steps of the video stream data encryption method in the corresponding embodiment, therefore, the present application can be implemented as follows Figure 1 or Figure 2 The beneficial effects that can be achieved by the video stream data encryption method in the corresponding embodiment are detailed in the previous description and will not be repeated here.

[0187] The video stream data encryption method, device, processing equipment and computer-readable storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A video stream data encryption method, characterized in that: The method comprises: Receive a video stream data sending request reported by a client, wherein the video stream data sending request is used to request sending target video stream data, and the video stream data sending request carries a user identifier of a request initiating user, a video stream data identifier of the target video stream data, and a timestamp identifying the time when the request was initiated; Based on the user identifier, the video stream data identifier, the timestamp, and the unique paired identifier for the current video stream data pulling process, a corresponding secret key is generated by a preset secret key generation algorithm; Encrypting the key frames of the target video stream data by using the secret key; The encrypted target video stream data and the identifier are sent to the client, so that the client generates the key through the preset key generation algorithm based on the user identifier, the video stream data identifier, the timestamp and the identifier, and plays the target video stream data after decrypting the target video stream data through the key.

2. The method according to claim 1, characterized in that The generating of the corresponding secret key by a preset secret key generation algorithm based on the user identifier, the video stream data identifier, the timestamp and the unique paired identifier of the current video stream data pulling process includes: Based on the user identifier, the video stream data identifier, the timestamp, the identifier and the request tracking identifier corresponding to the video stream data sending request, the corresponding key is generated by the preset key generation algorithm, wherein the request tracking identifier is obtained synchronously by the client.

3. The method according to claim 2, characterized in that The method further comprises: Receiving a request tracking identifier queue reported by the client, wherein the request tracking identifier queue is composed of request tracking identifiers of successful requests by the client; The request tracking identifier corresponding to the video stream data sending request is determined based on the request tracking identifier queue.

4. The method according to claim 3, characterized in that Different request tracking identifiers in the request tracking identifier queue are configured based on alphanumeric characters and are sorted in ascending order.

5. The method according to claim 1, characterized in that The identifier is specifically a random value.

6. A video stream data encryption method, characterized in that: The method comprises: Determine the target video stream data to be played; Reporting a video stream data sending request to a server, so that the server generates a corresponding secret key through a preset secret key generation algorithm based on the user identifier of the request initiator, the video stream data identifier of the target video stream data, the timestamp of the time when the request was initiated, and the identifier uniquely paired with the current video stream data pull processing, and then encrypts the key frame of the target video stream data through the secret key, wherein the video stream data sending request is used to request the sending of the target video stream data, and the video stream data sending request carries the user identifier, the video stream data identifier and the timestamp; Receiving the target video stream data and the identifier sent by the server; Based on the user identifier, the video stream data identifier, the timestamp and the identifier, the secret key is generated by the preset secret key generation algorithm; Decrypting the target video stream data using the secret key; Play the target video stream data.

7. A video stream data encryption device, characterized in that: The device comprises: A receiving unit, configured to receive a video stream data sending request reported by a client, wherein the video stream data sending request is used to request sending target video stream data, and the video stream data sending request carries a user identifier of a request initiating user, a video stream data identifier of the target video stream data, and a timestamp identifying the time when the request was initiated; A generating unit, configured to generate a corresponding secret key by a preset secret key generation algorithm based on the user identifier, the video stream data identifier, the timestamp and an identifier uniquely paired with the current video stream data pulling process; An encryption unit, used for encrypting the key frame of the target video stream data by using the secret key; A sending unit is used to send the encrypted target video stream data and the identifier to the client, so that the client generates the key through the preset key generation algorithm based on the user identifier, the video stream data identifier, the timestamp and the identifier, and plays the target video stream data after decrypting the target video stream data through the secret key.

8. A video stream data encryption device, characterized in that: The device comprises: A determination unit, used to determine target video stream data to be played; A reporting unit, used for reporting a video stream data sending request to a server, so that the server generates a corresponding secret key through a preset secret key generation algorithm based on a user identifier of a request initiating user, a video stream data identifier of the target video stream data, a timestamp of the time when the request is initiated, and an identifier uniquely paired with the current video stream data pulling and processing, and then encrypts a key frame of the target video stream data through the secret key, wherein the video stream data sending request is used to request sending the target video stream data, and the video stream data sending request carries the user identifier, the video stream data identifier, and the timestamp; A receiving unit, configured to receive the target video stream data and the identifier sent by the server; A generating unit, configured to generate the secret key through the preset secret key generating unit based on the user identifier, the video stream data identifier, the timestamp and the identifier; A decryption unit, used for decrypting the target video stream data using the secret key; A playing unit is used to play the target video stream data.

9. A processing device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the method according to any one of claims 1 to 6 is executed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method according to any one of claims 1 to 6.