CN110381342B - Information processing method and related equipment - Google Patents

Information processing method and related equipment Download PDF

Info

Publication number
CN110381342B
CN110381342B CN201810333219.1A CN201810333219A CN110381342B CN 110381342 B CN110381342 B CN 110381342B CN 201810333219 A CN201810333219 A CN 201810333219A CN 110381342 B CN110381342 B CN 110381342B
Authority
CN
China
Prior art keywords
client
server
acquisition information
current video
video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810333219.1A
Other languages
Chinese (zh)
Other versions
CN110381342A (en
Inventor
周志刚
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810333219.1A priority Critical patent/CN110381342B/en
Publication of CN110381342A publication Critical patent/CN110381342A/en
Application granted granted Critical
Publication of CN110381342B publication Critical patent/CN110381342B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2407Monitoring of transmitted content, e.g. distribution time, number of downloads
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server

Abstract

The embodiment of the invention provides an information processing method and related equipment, which are used for reducing the loss of a video website by identifying the false playing of a video. The method provided by the embodiment of the invention comprises the following steps: the method comprises the steps that a server and a client negotiate to generate a shared secret key, and the shared secret key is used for encrypting or decrypting communication between the server and the client; the server sends first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; when the server receives the encrypted acquisition information sent by the client, the server determines whether the current video watching record is an illegal record according to the encrypted acquisition information, and the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key.

Description

Information processing method and related equipment
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to an information processing method and a related device.
Background
As short videos are increasingly popular and loved by users, some video websites also provide the users with a video uploading and playing function, so that the users can shoot or edit the short videos and upload the short videos to the video websites. In order to encourage more users to upload videos, the video website rewards the users who upload the short videos according to the watching times of the short videos, wherein the more the watching times of the short videos, the more the contents of the short videos are favored by the audiences, the more the video website rewards the users who upload the short videos, however, the mode also provides a good opportunity for a few illegal hackers, namely, the hackers forge the false watching times by stealing the watching times of the videos to obtain profits from the video website, so that the benefits of the video website are infringed.
Therefore, for a video website, how to identify a hacker who steals the video viewing frequency to reduce the loss of the video website is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides an information processing method and related equipment, which are used for reducing the loss of a video website by identifying the false playing of a video.
A first aspect of an embodiment of the present invention provides an information processing method, including: the method comprises the steps that a server and a client negotiate to generate a shared secret key, and the shared secret key is used for encrypting or decrypting communication between the server and the client; the server sends first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; when the server receives the encrypted acquisition information sent by the client, the server determines whether the current video watching record is an illegal record according to the encrypted acquisition information, and the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key.
In one possible design, in a first implementation manner of the first aspect of the embodiment of the present invention, the method further includes: and the server sends second indication information to the client, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
In a possible design, in a second implementation manner of the first aspect of the embodiment of the present invention, the acquiring information includes: and the client downloads the video stream flow data of the current video.
In a possible design, in a third implementation manner of the first aspect of the embodiment of the present invention, the determining, by the server, whether the record currently watching the current video is an illegal record according to the encrypted acquisition information includes: the server decrypts the encrypted acquisition information according to the shared secret key to obtain the acquisition information; the server judges whether the video stream flow data of the current video is in a preset video flow range or not; and if the video stream flow data of the current video is not in a preset video flow range, the server determines that the record of the current video is an illegal record.
A second aspect of an embodiment of the present invention provides an information processing method, including: the method comprises the steps that a client and a server negotiate to generate a shared secret key, wherein the shared secret key is used for encrypting or decrypting communication between the server and the client; the client receives first indication information sent by the server, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; the client encrypts the acquisition information according to the shared secret key to obtain encrypted acquisition information; and the client sends the encrypted acquisition information to the server.
In one possible design, in a first implementation manner of the second aspect of the embodiment of the present invention, the method further includes: and the client receives second indication information sent by the server, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
A third aspect of an embodiment of the present invention provides a server, including: a generating unit, configured to negotiate with a client to generate a shared key, where the shared key is used to encrypt or decrypt communication between the server and the client; the receiving and sending unit is used for sending first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; and the determining unit is used for determining whether the current video watching record is an illegal record according to the encrypted acquisition information when the transceiving unit receives the encrypted acquisition information sent by the client, and the encrypted acquisition information is obtained by encrypting the acquisition information by the client according to the shared secret key.
In a possible design, in a first implementation manner of the third aspect of the embodiment of the present invention, the transceiver unit is further configured to: and sending second indication information to the client, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
In a possible design, in a second implementation manner of the third aspect of the embodiment of the present invention, the acquisition information includes video stream traffic data of the current video downloaded by the client.
In one possible design, in a third implementation manner of the third aspect of the embodiment of the present invention, the determining unit includes: the decryption module is used for decrypting the encrypted acquisition information according to the shared secret key so as to obtain the acquisition information; the judging module is used for judging whether the video stream flow data of the current video is within a preset video flow range or not; and the determining module is used for determining that the record for watching the current video is an illegal record if the video stream flow data of the current video is not in the preset video flow range.
A fourth aspect of an embodiment of the present invention provides a client, including: a generating unit, configured to negotiate with a server to generate a shared key, where the shared key is used to encrypt or decrypt communication between the server and the client; the receiving and sending unit is used for receiving first indication information sent by the server, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; the encryption unit is used for encrypting the acquisition information according to the shared secret key to obtain the encrypted acquisition information; the receiving and sending unit is further configured to send the encrypted acquisition information to the server.
In a possible design, in a first implementation manner of the fourth aspect of the embodiment of the present invention, the transceiver unit is further configured to receive second indication information sent by the server, where the second indication information is used to indicate the client to send plaintext capture information of the current video to the server at a second preset period.
A fifth aspect of the present invention provides an electronic device, including a storage and a processor, wherein the processor is configured to implement the steps of the memory management method according to any one of the above descriptions when the processor executes a computer management program stored in the storage.
A sixth aspect of the present invention provides a computer-readable storage medium having a computer management-like program stored thereon, characterized in that: when executed by a processor, the computer management program implements the steps of the memory management method as described in any one of the above.
According to the technical scheme, the embodiment of the invention has the following advantages: the method comprises the steps that a server and a client negotiate to generate a shared secret key, and the shared secret key is used for encrypting or decrypting communication between the server and the client; the server sends first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; when the server receives the encrypted acquisition information sent by the client, the server determines whether the current video watching record is an illegal record according to the encrypted acquisition information, and the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key. In the embodiment of the invention, the server can identify the false playing of the video, so that the loss of the video website is reduced.
Drawings
Fig. 1 is a flowchart of a possible information processing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a possible server according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a possible client according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a possible server according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of another possible server according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a possible client according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of another possible client according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides an information processing method and related equipment, which are used for reducing the loss of a video website by identifying the false playing of a video.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of a possible information processing method according to an embodiment of the present invention specifically includes:
101. the server generates a first public and private key pair;
in order to improve the security of data transmission between the server and the client, the communication between the server and the client may be encrypted. In the embodiment of the invention, an asymmetric RSA encryption algorithm can be adopted to generate the public and private key pair, wherein when a client opens one video for playing each time, a pair of public and private key pairs can be regenerated, and the public and private key pairs of each video are ensured to be different.
Optionally, in the present invention, the server generates a first public and private key pair including a first public key and a first private key according to information of a current video being played by the client. The specific first private key can be generated by using a random number, the first public key calls an interface function of the RSA to generate a corresponding public key, the first private key and the first public key are in a unique pairing relationship, and the implementation mode for generating the first public and private key pair comprises the following steps:
step 1, generating random data;
Randdata=rand();
and generating a random data Randdata by calling a system function rand.
Step 2, generating an Md5 value of the current video as a first private key according to the Identification (ID) number and the random number of the current video;
ClientPrivatekey=Md5.Create(Randdata+VideoId);
where VideoId is used to indicate the ID number of the current video, it should be noted that the ID of the current video can be understood as the room number of each video.
The Md5 value of the random data and the ID number of the current video are calculated by calling the interface Md5.create of the Md5 function to splice together their Md5 values, resulting in the data of the first private key.
And 3, calculating the first public key.
ClientPublickey=RSA.CreatePair(ClientPrivatekey);
The first public key is generated by calling the generation pairing key interface RSA.
The final server thus generates a pair of first public key and first private key information.
102. The client generates a second public and private key pair;
when the server interacts with the client, the server firstly issues the information of the first public key of the server to the client. Meanwhile, the client generates a pair of second public and private keys in the manner of the server. The server generates a second private key according to the ID number of the current video, the user ID number (user ID, Uid) of the user and the random data, so as to ensure that the private keys of different clients playing different videos are different as much as possible. The concrete implementation is as follows:
step 1, generating random data;
Randdata=rand();
and generating a random data Randdata by calling a system function rand.
And 2, generating an Md5 value of the current video as a second private key according to the ID number, the Uid and the random number of the current video.
ServerPrivatekey=Md5.Create(Randdata+Uid+VideoId);
And calculating the Md5 value of the random number, the Uid of the user and the ID number of the current video by calling an interface Md5.Create of the Md5 function to splice together, thereby obtaining the data of the second private key.
And 3, calculating a second public key.
ServerPublickey=RSA.CreatePair(ServerPrivatekey);
The second public key is generated by calling the generation pairing key interface RSA.
So that the client generates information of the second public-private key pair.
At this time, after receiving the first public key issued by the server, the client sends the information of the second public key to the server.
103. The server and the client exchange public keys and generate a shared secret key;
the server and the client exchange respective public key information to generate a shared key, and it is understood that the shared key generated by the server and the client is the same value. It should be noted that, in order to ensure that the shared keys generated by the server and the client are the same value, the server and the client need to negotiate to determine a generation algorithm for generating the shared key according to the first public key and the second public key before generating the shared key.
The specific server and the client exchange public keys and generate a shared secret key as follows:
and step 1, exchanging public keys.
The server sends the first public key ServerPublinkey of the server to the client.
And the client sends the second public key ClientPublinkey of the client to the server.
And step 2, the client generates a shared secret key.
ShareKey=RSA.CreateShareKey(ServerPublickey,ClientPrivatekey);
And 3, the server generates a shared secret key.
ShareKey=RSA.CreateShareKey(ClientPublickey,ServerPrivatekey);
Since the generation factor and the generation algorithm are consistent, the values of ShareKey generated by the server and the client are consistent.
It should be noted that the client generates the shared key through step 2, and the server generates the shared key through step 3, and these two processes are not limited by a time sequence, that is, step 2 may be executed first, step 3 may be executed first, or executed simultaneously, and the specific details are not limited herein.
After the server and the client generate the shared secret key, the server and the client are encrypted or decrypted according to the shared secret key. Optionally, in the embodiment of the present invention, in addition to performing encryption or decryption processing by using an asymmetric RSA encryption algorithm, a Data Encryption Standard (DES) or another encryption algorithm may also be used, which is not limited herein.
104. The server sends first indication information to the client;
after both the server and the client obtain the shared secret key, the server sends a first indication message to the client according to the shared secret key, wherein the first indication message is used for indicating the client to send the acquisition information of the current video played by the client to the server at intervals of a first preset period according to the shared secret key, namely the server encrypts the first indication message according to the shared secret key to obtain encrypted first indication information, and sends the encrypted first indication information to the client. In the embodiment of the present invention, an encryption algorithm, such as Advanced Encryption Standard (AES), may be used to perform encryption.
105. The client encrypts the acquired information according to the shared secret key to obtain the encrypted acquired information;
since the player of the video website is developed by the video website, if the player is a normal client, the player must be watched by the video player of the video website, and thus the normal client has the functions of receiving the video data of the server and decrypting the video data. Therefore, after receiving the first indication information, the client decrypts the first indication information according to the shared secret key to obtain the original first indication information.
And the client acquires the acquisition information of the current video played by the client once every a first preset period according to the first indication information, wherein the acquisition information includes but is not limited to one or more of the following information: the video number of the current video, the unique uid of the user, the opening time of the initial frame when the current video is watched, the code rate of the current video, the FPS of the current video playing, the hardware decoding and the software decoding of the current video, the state record (such as whether an error occurs or not, whether a pause phenomenon exists or not) of the current video watching, the watching time length of the current video or the total amount of the downloaded video stream data in the whole watching time length. The first preset period may be 1 minute, or 30 seconds, or 10 seconds, and the like, which is not limited herein. For example, when the first preset period is 1 minute, the client acquires the acquisition information every 1 minute.
After the acquisition information is acquired, the client side encrypts the acquisition information by using an encryption algorithm negotiated by the client side and the server through a shared secret key to obtain the encrypted acquisition information.
106. The client sends the encrypted acquisition information to the server;
and after the client side obtains the encrypted acquisition information, sending the encrypted acquisition information to the server, so that the server decrypts the acquisition information according to the shared secret key to obtain the original acquisition information.
107. The server sends second indication information to the client;
further, in order to interfere with cracking or hackers, the server sends second indication information to the client according to the shared secret key, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period, that is, the server encrypts the second indication information according to the shared secret key to obtain encrypted second indication information, and sends the encrypted second indication information to the client. In this step, an encryption algorithm such as AES may also be used for encryption.
108. And the client sends the plaintext acquisition information to the server.
And after receiving the second indication information, the client decrypts the second indication information according to the shared secret key to obtain the original second indication information.
And the client acquires the clear text collection information of the current video played by the client once every second preset period according to the second indication information, wherein the clear text collection information may include some less important information, such as but not limited to one or more of the following information: the unique ID information of the current user equipment, the watching duration information of the current video, the ID information of the current video or the video code rate information of the current video. The second preset period may be 1 minute, or 30 seconds, or 10 seconds, and the like, which is not limited herein. For example, when the second preset period is 1 minute, the client acquires the plaintext acquisition information every 1 minute.
It should be noted that the purpose of collecting the plaintext collected information is to interfere with a hacker, and since the plaintext collected information is plaintext and is not encrypted, the hacker can easily find the plaintext collected information, so that the hacker can recognize the hacking behavior by reporting the plaintext collected information for the server.
Therefore, after the client acquires the plaintext acquisition information, the plaintext acquisition information is directly sent to the server.
109. The server determines whether the current video watching record is an illegal record according to the encrypted acquisition information;
and after obtaining the encrypted acquisition information, the server decrypts the acquisition information according to the shared secret key to obtain the original acquisition information. It should be noted that, if any third-party platform steals the video stream (the third-party platform uses a general or own video player) or does not view the current video, the acquisition information will not be available. Meanwhile, for hackers, the acquired information is encrypted acquired information, the encryption algorithm is encrypted by a shared secret key negotiated by a client and a server, the encryption of the acquired information depends on time and unique information of users, the acquired information is forged by copying the data, the server can identify that the acquired information is illegal by decrypting the acquired information, and even if the acquired information is intercepted, the hackers cannot acquire the shared secret key and cannot decrypt the acquired information, so that the hackers cannot forge and intercept the acquired information easily.
It should be noted that, when the collected information includes the video stream traffic data downloaded by the client, the behavior of the pirate is very well recognized, and for example, when a video of 10 minutes is watched normally, the video must be within a reasonable preset video traffic range, and is illegal if the video is not within the range, and even if a hacker performs the pirate, the hacker must have a very large network bandwidth to swipe a large number of false watching times, so that the hacker has a very high cost. Therefore, the user who steals the video watching times can be well identified.
In addition, if the server determines whether the current video watching record is an illegal record, the current video playing is not counted in the watching times of the current video; and if the server determines that the current video watching record is a legal record, the current video playing time is counted in the current video watching times.
It should be noted that, in the embodiment of the present invention, in addition to identifying the spurious playback of the video by using the information processing method shown in fig. 1, the spurious playback of the video may also be identified by using the following method, for example:
mode 1: the server and the client may negotiate a shared key that is used to encrypt or decrypt communications between the server and the client. The server obtains video data such as random data Rdata, starting frame data startFrame, frame number NumFrames needing to be calculated and current timestamp information according to a current video played by the client; the server sends the video data to the client, so that the client performs calculation according to the video data to obtain a client calculation result, specifically, the client performs MD5 calculation on the video data according to the starting frame number of the current video and the frame number required to be calculated, and meanwhile, random data Rdata sent by the server is added during calculation, thereby ensuring that the finally calculated client calculation results are inconsistent even if the starting frame number and the frame number are the same. The concrete implementation is as follows:
md5result ═ Md5.create (video _ data + Rdata); wherein Md5result is used for representing the calculation result of the client, and video _ data is used for representing the video data from the starting frame to the frame number of the video; the Rdata is used for representing random data issued by the server. Therefore, the result data of the HASH, i.e. the calculation result of the client, is finally obtained through the md5 algorithm, and the client encrypts and sends the calculation result of the client to the server by using the shared key. The server receives a client calculation result sent by the client and decrypts the calculation result by using the shared key; and when the client side calculation result is different from the server calculation result, the server determines that the current video watching record is a false record.
Mode 2: for all videos of the video website, the user uploads the prepared videos to the server. The server firstly audits the video and adds the watermark of the video website into the video to prevent other websites from stealing the video. Therefore, in the invention, after the video is added with the watermark of the video website, a path of verification information is further added to the video, and the verification information is not played but only plays a verification role. And when inserting information, the invention makes the inserted information of each video different according to a certain algorithm. When the user terminal watches the video, the video content is downloaded, wherein the video content carries the verification information, only the player of the video website can decrypt the verification information, and the verification information is calculated to obtain a verification result and reported to the server. For other players of non-video websites, the player does not know that there is a piece of authentication information, and does not know how to calculate the authentication result, so that the server can identify and obtain the real watching times watched through the player of the video website.
Mode 3: it will be appreciated that for a normal user, the frequency with which he or she simultaneously views video is limited. For hackers, in order to forge a large number of viewing records, they would need to swipe the viewing records a large amount to gain revenue. The client obtains verification data through a certain amount of calculation, wherein the calculation of the verification data consumes CPU resources of the client, so that when the client concurrently watches videos, a large amount of calculation needs to be performed concurrently to consume the CPU resources, the concurrent number is limited, and the behavior of refreshing watching times of the client can be prevented. For normal users, normal watching of one-time video does not affect users, and concurrent watching of a large number of videos has great influence, so that the cost is increased. How to design the algorithm can enable the client to have a certain amount of calculation to obtain the verification result, and the calculation cannot be bypassed, and meanwhile, the server can easily judge whether the result of the client is correct. The invention designs a set of algorithm to make the client have a certain amount of calculation, and the server is easy to identify the result of the client and does not consume the calculation resource of the server. First, the client and the server negotiate a shared key, and then the server generates a random string of 32 bits in length and a number of 0 s. These 2 data are eventually sent to the client. And encrypted with the previously negotiated shared key. After receiving the data of the server, the client decrypts the data of the server to obtain the random data character string and the number digit of 0 of the result data needing to be calculated. The client writes an algorithm to generate the result data needed by the server. The client side calculation includes that the unique device ID of the client side, the TOKEN data used when the client side logs in, the unique video ID watched at the client side currently, the random data issued by the server and the current system timestamp information are spliced together, and the random data of the client side is added to calculate the MD5 value, and the specific implementation mode is as follows:
md5result (devicid + Token + videoId + rdata + Time + clientranddata); wherein DeviceId is the device unique ID of the client; wherein, Token is the Token value when the client logs in the server; the videoId is the unique id of the video; rdata is random data issued by the server; the clientRandData is random data generated by the client. The HASH result data is finally obtained by the md5 algorithm, and the server will request the number of 0 at the beginning in the HASH result data calculated by the client. For example, it is calculated as "2013 dabcd6987abc 4523654123451263". Since the first bit of the result data is 2 instead of 0, the client needs to generate random data to calculate the MD5 value until the start bit is 0, so as to satisfy the requirement of the server. Therefore, the calculation amount of the client is the same as that of continuously generating random data and continuously calculating the MD5 value until the requirement of the server is met. The server may also adjust the computation amount of the client, for example, the greater the number of initial 0s, the greater the computation amount of the client. Making client computation very complex. And after the client end completes the calculation of the result meeting the server, the result data and the data which the client end participates in the calculation are sent to the server. Then Md5result + DeviceId + Time + clientRandData are included. While other data includes the video unique ID and the token server itself has a record at login. The server verifies the client computing result. The client reports the result data meeting the server to the server, and the server checks according to the client data. Md5result (devicid + Token + videoId + rdata + Time + clientRandData); and judging whether the Md5result is consistent with that of the client or not, judging whether the initial number of 0 is satisfied or not, and if so, indicating that the result of the client is correct. And the server only needs to calculate the MD5 value once to know whether the result of the client is correct, because the client frequently calculates the MD5 value to obtain a proper random data clientrRandData, and the server knows the random data selected by the client from the result reported by the client, so that the server verification is simpler.
The embodiments of the present invention are described above from the perspective of an information processing method, and the embodiments of the present invention are described below from the perspective of a server and a client, respectively.
Referring to fig. 2, fig. 2 is a schematic diagram of an embodiment of a server according to an embodiment of the present invention, where the server specifically includes:
a generating unit 201, configured to negotiate with a client to generate a shared key, where the shared key is used to encrypt or decrypt communications between the server and the client;
a transceiving unit 202, configured to send first indication information to the client, where the first indication information is used to indicate that the client sends, according to the shared secret key, acquisition information of a current video played by the client to the server at intervals of a first preset period;
and the determining unit 203 is configured to determine whether the current video watching record is an illegal record according to the encrypted acquisition information when the transceiving unit receives the encrypted acquisition information sent by the client, where the encrypted acquisition information is obtained by encrypting the acquisition information by the client according to the shared secret key.
Optionally, in some possible implementations, the transceiver unit 202 is further configured to: and sending second indication information to the client, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
Optionally, in some possible implementations, the determining unit 203 includes:
a decryption module 2031, configured to decrypt the encrypted acquisition information according to the shared key to obtain the acquisition information;
a judging module 2032, configured to judge whether the video stream flow data of the current video is within a preset video flow range;
the determining module 2033 is configured to determine that the record currently watching the current video is an illegal record if the video stream flow data of the current video is not within the preset video flow range.
Referring to fig. 3, fig. 3 is a schematic diagram of an embodiment of a client according to the present invention, where the client specifically includes:
a generating unit 301, configured to negotiate with a server to generate a shared key, where the shared key is used to encrypt or decrypt communications between the server and the client;
a transceiving unit 302, configured to receive first indication information sent by the server, where the first indication information is used to indicate the client to send, according to the shared key, acquisition information of a current video played by the client to the server at intervals of a first preset period;
an encrypting unit 303, configured to encrypt the acquisition information according to the shared key to obtain encrypted acquisition information;
the transceiver unit 302 is further configured to send the encrypted acquisition information to the server.
Optionally, in some possible implementations, the transceiver unit 302 is further configured to:
and receiving second indication information sent by the server, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
Referring to fig. 4, fig. 4 is a schematic view of an embodiment of an electronic device according to an embodiment of the invention.
As shown in fig. 4, an embodiment of the present invention provides an electronic device, which includes a memory 410, a processor 420, and a computer program 411 stored in the memory 420 and running on the processor 420, and when the processor 420 executes the computer program 411, the following steps are implemented: negotiating with a client to generate a shared key, wherein the shared key is used for encrypting or decrypting communication between the server and the client; sending first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; and when receiving the encrypted acquisition information sent by the client, determining whether the current video watching record is an illegal record according to the encrypted acquisition information, wherein the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key.
Optionally, the processor is further configured to: and sending second indication information to the client, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
Optionally, determining whether the current video record is an illegal record according to the encrypted acquisition information includes: decrypting the encrypted acquisition information according to the shared secret key to obtain the acquisition information; judging whether the video stream flow data of the current video is in a preset video flow range or not; and if the video stream flow data of the current video is not in a preset video flow range, determining that the record of the current video is an illegal record.
In a specific implementation, when the processor 420 executes the computer program 411, any of the embodiments corresponding to fig. 1 may be implemented.
Since the electronic device described in this embodiment is a device used for implementing one of the servers in the embodiment of the present invention, based on the method described in the embodiment of the present invention, those skilled in the art can understand the specific implementation manner of the electronic device in this embodiment and various variations thereof, so that how to implement the method in the embodiment of the present invention by the electronic device is not described in detail herein, and as long as the device used for implementing the method in the embodiment of the present invention by those skilled in the art is within the scope of the present invention to be protected.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an embodiment of a computer-readable storage medium according to the present invention.
As shown in fig. 5, the present embodiment provides a computer-readable storage medium 500 having a computer program 511 stored thereon, the computer program 511 implementing the following steps when executed by a processor: negotiating with a client to generate a shared key, wherein the shared key is used for encrypting or decrypting communication between the server and the client; sending first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; and when receiving the encrypted acquisition information sent by the client, determining whether the current video watching record is an illegal record according to the encrypted acquisition information, wherein the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key.
Optionally, the computer program 511 is further configured to, when executed by the processor, implement the following steps: and sending second indication information to the client, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
Optionally, the computer program 511 is further configured to, when executed by the processor, implement the following steps: decrypting the encrypted acquisition information according to the shared secret key to obtain the acquisition information; judging whether the video stream flow data of the current video is in a preset video flow range or not; and if the video stream flow data of the current video is not in a preset video flow range, determining that the record of the current video is an illegal record.
Referring to fig. 6, a schematic diagram of another electronic device according to an embodiment of the invention is shown.
As shown in fig. 6, an embodiment of the present invention provides an electronic device, which includes a memory 610, a processor 620, and a computer program 611 stored in the memory 620 and operable on the processor 620, and when the processor 620 executes the computer program 611, the following steps are implemented: negotiating with a server to generate a shared key, wherein the shared key is used for encrypting or decrypting communication between the server and the client; receiving first indication information sent by the server, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; encrypting the acquisition information according to the shared secret key to obtain encrypted acquisition information; and sending the encrypted acquisition information to the server.
Optionally, the processor 620 is further configured to perform:
and receiving second indication information sent by the server, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
In a specific implementation, when the processor 620 executes the computer program 611, any of the embodiments corresponding to fig. 1 may be implemented.
Since the electronic device described in this embodiment is a device used for implementing one of the clients in the embodiment of the present invention, based on the method described in the embodiment of the present invention, those skilled in the art can understand the specific implementation manner of the electronic device of this embodiment and various variations thereof, so that how to implement the method in the embodiment of the present invention by the electronic device is not described in detail herein, and as long as the device used for implementing the method in the embodiment of the present invention by the person skilled in the art belongs to the intended protection scope of the present invention.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating an embodiment of a computer-readable storage medium according to the present invention.
As shown in fig. 7, the present embodiment provides a computer-readable storage medium 700 having a computer program 711 stored thereon, the computer program 711, when executed by a processor, implementing the steps of: negotiating with a server to generate a shared key, wherein the shared key is used for encrypting or decrypting communication between the server and the client; receiving first indication information sent by the server, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; encrypting the acquisition information according to the shared secret key to obtain encrypted acquisition information; and sending the encrypted acquisition information to the server.
Optionally, the computer program 711, when executed by the processor, implements the following steps: and receiving second indication information sent by the server, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to relevant descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (7)

1. An information processing method characterized by comprising:
the method comprises the steps that a server and a client negotiate to generate a shared secret key, and the shared secret key is used for encrypting or decrypting communication between the server and the client;
the server sends first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key; when the server receives the encrypted acquisition information sent by the client, the server determines whether the current video watching record is an illegal record according to the encrypted acquisition information, and the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key;
the acquisition information comprises video stream flow data of the current video downloaded by the client;
wherein the server determining whether the current video watching record is an illegal record according to the encrypted acquisition information comprises:
the server decrypts the encrypted acquisition information according to the shared secret key to obtain the acquisition information;
the server judges whether the video stream flow data of the current video is in a preset video flow range or not;
and if the video stream flow data of the current video is not in a preset video flow range, the server determines that the record of the current video is an illegal record.
2. The method of claim 1, further comprising:
and the server sends second indication information to the client, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
3. An information processing method characterized by comprising:
the method comprises the steps that a client and a server negotiate to generate a shared secret key, wherein the shared secret key is used for encrypting or decrypting communication between the server and the client;
the client receives first indication information sent by the server, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key;
the client encrypts the acquisition information according to the shared secret key to obtain encrypted acquisition information;
the client sends the encrypted acquisition information to the server;
when the server receives encrypted acquisition information sent by the client, the server determines whether the current video watching record is an illegal record according to the encrypted acquisition information, and the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key;
the acquisition information comprises video stream flow data of the current video downloaded by the client;
wherein the server determining whether the current video watching record is an illegal record according to the encrypted acquisition information comprises:
the server decrypts the encrypted acquisition information according to the shared secret key to obtain the acquisition information;
the server judges whether the video stream flow data of the current video is in a preset video flow range or not;
and if the video stream flow data of the current video is not in a preset video flow range, the server determines that the record of the current video is an illegal record.
4. The method of claim 3, further comprising:
and the client receives second indication information sent by the server, wherein the second indication information is used for indicating the client to send the plaintext acquisition information of the current video to the server at intervals of a second preset period.
5. A server, comprising:
a generating unit, configured to negotiate with a client to generate a shared key, where the shared key is used to encrypt or decrypt communication between the server and the client;
the receiving and sending unit is used for sending first indication information to the client, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key;
a determining unit, configured to determine whether a current video watching record is an illegal record according to the encrypted acquisition information when the transceiving unit receives the encrypted acquisition information sent by the client, where the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key;
the acquisition information comprises video stream flow data of the current video downloaded by the client;
wherein the determination unit includes:
the decryption module is used for decrypting the encrypted acquisition information according to the shared secret key so as to obtain the acquisition information;
the judging module is used for judging whether the video stream flow data of the current video is within a preset video flow range or not;
and the determining module is used for determining that the record for watching the current video is an illegal record if the video stream flow data of the current video is not in the preset video flow range.
6. A client, comprising:
a generating unit, configured to negotiate with a server to generate a shared key, where the shared key is used to encrypt or decrypt communication between the server and the client;
the receiving and sending unit is used for receiving first indication information sent by the server, wherein the first indication information is used for indicating the client to send acquisition information of a current video played by the client to the server at intervals of a first preset period according to the shared secret key;
the encryption unit is used for encrypting the acquisition information according to the shared secret key to obtain the encrypted acquisition information;
the receiving and sending unit is also used for sending the encrypted acquisition information to the server;
when the server receives encrypted acquisition information sent by the client, the server determines whether the current video watching record is an illegal record according to the encrypted acquisition information, and the encrypted acquisition information is obtained by the client encrypting the acquisition information according to the shared secret key;
the acquisition information comprises video stream flow data of the current video downloaded by the client;
wherein the server determining whether the current video watching record is an illegal record according to the encrypted acquisition information comprises:
the server decrypts the encrypted acquisition information according to the shared secret key to obtain the acquisition information;
the server judges whether the video stream flow data of the current video is in a preset video flow range or not;
and if the video stream flow data of the current video is not in a preset video flow range, the server determines that the record of the current video is an illegal record.
7. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-2.
CN201810333219.1A 2018-04-13 2018-04-13 Information processing method and related equipment Active CN110381342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810333219.1A CN110381342B (en) 2018-04-13 2018-04-13 Information processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810333219.1A CN110381342B (en) 2018-04-13 2018-04-13 Information processing method and related equipment

Publications (2)

Publication Number Publication Date
CN110381342A CN110381342A (en) 2019-10-25
CN110381342B true CN110381342B (en) 2021-09-07

Family

ID=68242998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810333219.1A Active CN110381342B (en) 2018-04-13 2018-04-13 Information processing method and related equipment

Country Status (1)

Country Link
CN (1) CN110381342B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992367A (en) * 2021-10-18 2022-01-28 四川托普信息技术职业学院 Data encryption transmission system and method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346374A (en) * 2013-07-31 2015-02-11 阿里巴巴集团控股有限公司 Data processing method and system
CN107707642A (en) * 2017-09-22 2018-02-16 广东欧珀移动通信有限公司 Brush amount terminal determines method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2011343699B2 (en) * 2010-12-15 2014-02-27 Shadow Networks, Inc. Network stimulation engine
CN106789985B (en) * 2016-12-08 2019-11-12 武汉斗鱼网络科技有限公司 Client validation method and system based on GPU algorithm
CN106603554B (en) * 2016-12-29 2019-11-15 北京奇艺世纪科技有限公司 A kind of anti-cheat method and device of adaptive real time video data
CN106651475A (en) * 2017-02-22 2017-05-10 广州万唯邑众信息科技有限公司 Method and system for identifying false traffic of mobile video advertisement
CN107566897B (en) * 2017-07-19 2019-10-15 北京奇艺世纪科技有限公司 A kind of discrimination method, device and the electronic equipment of video brush amount

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346374A (en) * 2013-07-31 2015-02-11 阿里巴巴集团控股有限公司 Data processing method and system
CN107707642A (en) * 2017-09-22 2018-02-16 广东欧珀移动通信有限公司 Brush amount terminal determines method and device

Also Published As

Publication number Publication date
CN110381342A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
US11055429B2 (en) Key providing method, video playing method, server and client
CN108881966B (en) Information processing method and related equipment
CN106571951B (en) Audit log obtaining method, system and device
CN101977190B (en) Digital content encryption transmission method and server side
CN110011950B (en) Authentication method and device for video stream address
CN103237010B (en) The server end of digital content is cryptographically provided
US20230132485A1 (en) System for Thin Client Devices in Hybrid Edge Cloud Systems
CN108259183B (en) Attention method, attention device, attention electronic equipment and attention medium
CN108769749B (en) Method for determining data embezzlement, client and server
CN108768920B (en) Recorded broadcast data processing method and device
US8495154B2 (en) Content usage tracking in superdistribution
US20080077938A1 (en) Method of implementing a state tracking mechanism in a communications session between a server and a client system
CN103237011B (en) Digital content encryption transmission method and server end
CN110380843B (en) Information processing method and related equipment
CN111131127B (en) Communication method based on live broadcast platform and related device
CN108206961B (en) Method for calculating popularity of live broadcast platform and related equipment
CN110381342B (en) Information processing method and related equipment
CN108769748B (en) Information processing method and related equipment
WO2018176531A1 (en) Video request and video playing method and apparatus
CN110139163B (en) Method and related device for acquiring bullet screen
CN108933766B (en) Method and client for improving equipment ID security
CN113014956B (en) Video playing method and device
CN110381375B (en) Method for determining data embezzlement, client and server
CN110691267B (en) TLS-based video stream address authentication method, storage medium, equipment and system
CN112769783A (en) Data transmission method, cloud server, receiving end and sending end

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant