[go: up one dir, main page]

CN110380843B - Information processing method and related equipment - Google Patents

Information processing method and related equipment Download PDF

Info

Publication number
CN110380843B
CN110380843B CN201810332146.4A CN201810332146A CN110380843B CN 110380843 B CN110380843 B CN 110380843B CN 201810332146 A CN201810332146 A CN 201810332146A CN 110380843 B CN110380843 B CN 110380843B
Authority
CN
China
Prior art keywords
client
video
server
frame number
data
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
CN201810332146.4A
Other languages
Chinese (zh)
Other versions
CN110380843A (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.)
Shaanxi Yiquhai Information 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 CN201810332146.4A priority Critical patent/CN110380843B/en
Publication of CN110380843A publication Critical patent/CN110380843A/en
Application granted granted Critical
Publication of CN110380843B publication Critical patent/CN110380843B/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/085Secret sharing or secret splitting, e.g. threshold schemes
    • 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 or manipulating encoded video stream scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明实施例公开了一种信息处理方法及相关设备,用于通过识别视频的虚假播放,减少视频网站的损失。本发明实施例方法包括:服务器根据客户端播放的当前视频获得视频数据;所述服务器将所述视频数据发送给所述客户端,以使得所述客户端根据所述视频数据得到客户端计算结果;所述服务器接收所述客户端发送的所述客户端计算结果;当所述客户端计算结果与服务器计算结果不同时,所述服务器确定当前观看所述当前视频的记录为虚假记录,所述服务器计算结果为所述服务器根据所述视频数据计算得到服务器计算结果。

Figure 201810332146

The embodiment of the invention discloses an information processing method and related equipment, which are used to reduce the loss of video websites by identifying false broadcasting of videos. The method in the embodiment of the present invention includes: the server obtains video data according to the current video played by the client; the server sends the video data to the client, so that the client obtains the client calculation result according to the video data ; The server receives the client calculation result sent by the client; when the client calculation result is different from the server calculation result, the server determines that the record currently watching the current video is a false record, and the The server calculation result is a server calculation result calculated by the server according to the video data.

Figure 201810332146

Description

一种信息处理方法及相关设备An information processing method and related equipment

技术领域technical field

本发明涉及信息处理技术领域,尤其涉及一种信息处理方法及相关设备。The present invention relates to the technical field of information processing, in particular to an information processing method and related equipment.

背景技术Background technique

随着短视频越来越多的受到用户的欢迎和喜爱,一些视频网站也会向用户提供视频上传播放的功能,使得用户可以拍摄或者编辑短视频,并上传到视频网站上。为了鼓励更多的用户上传视频,视频网站会根据短视频的观看次数对上传该短视频的用户进行奖励,其中,短视频的观看次数越多,代表该短视频的内容越受观众的喜爱,则视频网站对上传该短视频的用户的奖励也越多,然而这种方式也给不少的非法黑客提供了可乘之机,即黑客通过盗刷视频观看次数来伪造虚假的观看次数,以从视频网站获得收益,使得视频网站的利益受到了侵害。As short videos become more and more popular and loved by users, some video websites will also provide users with the function of uploading and playing videos, so that users can shoot or edit short videos and upload them to the video websites. In order to encourage more users to upload videos, video websites will reward users who upload the short video according to the number of views of the short video. The more views the short video has, the more popular the content of the short video is. Then the video website rewards the user who uploads the short video more. However, this method also provides opportunities for many illegal hackers, that is, the hacker forges the false viewing number by stealing the viewing number of the video. Gaining income from the video website has infringed the interests of the video website.

因此,对于视频网站而言,如何识别盗刷视频观看次数的黑客,来减少视频网站的损失,是一个亟待解决的问题。Therefore, for the video website, how to identify the hacker who steals the number of views of the video to reduce the loss of the video website is an urgent problem to be solved.

发明内容Contents of the invention

本发明实施例提供了一种信息处理方法及相关设备,用于通过识别视频的虚假播放,减少视频网站的损失。The embodiment of the present invention provides an information processing method and related equipment, which are used to reduce the loss of video websites by identifying false playback of videos.

本发明实施例的第一方面提供了一种信息处理方法,包括:服务器根据客户端播放的当前视频获得视频数据;所述服务器将所述视频数据发送给所述客户端,以使得所述客户端根据所述视频数据得到客户端计算结果;所述服务器接收所述客户端发送的所述客户端计算结果;当所述客户端计算结果与服务器计算结果不同时,所述服务器确定当前观看所述当前视频的记录为虚假记录,所述服务器计算结果为所述服务器根据所述视频数据计算得到服务器计算结果。The first aspect of the embodiments of the present invention provides an information processing method, including: the server obtains video data according to the current video played by the client; the server sends the video data to the client, so that the client The terminal obtains the calculation result of the client according to the video data; the server receives the calculation result of the client sent by the client; when the calculation result of the client is different from the calculation result of the server, the server determines that the currently watched The record of the current video is a false record, and the server calculation result is a server calculation result calculated by the server according to the video data.

在一种可能的实施例中,所述方法还包括:所述服务器与所述客户端进行协商生成共享秘钥,所述共享秘钥用于对所述服务器和所述客户端之间的通信进行加密或解密。In a possible embodiment, the method further includes: the server negotiates with the client to generate a shared key, and the shared key is used for communication between the server and the client Encrypt or decrypt.

在一种可能的实施例中,所述服务器与所述客户端进行协商生成共享秘钥包括:所述服务器根据所述当前视频的信息生成第一公私钥对,所述第一公私钥对包括第一公钥和第一私钥;所述服务器向所述客户端发送所述第一公钥,以使得所述客户端根据所述第一公钥生成共享秘钥;所述服务器根据所述第一公钥和第二公钥生成所述共享秘钥,所述第二公钥由所述客户端生成并发送。In a possible embodiment, the negotiation between the server and the client to generate the shared key includes: the server generates a first public-private key pair according to the information of the current video, and the first public-private key pair includes The first public key and the first private key; the server sends the first public key to the client, so that the client generates a shared secret key according to the first public key; the server according to the The first public key and the second public key generate the shared secret key, and the second public key is generated and sent by the client.

在一种可能的实施例中,所述服务器将所述视频数据发送给所述客户端包括:所述服务器根据所述共享秘钥加密所述视频数据,得到加密后的视频数据;所述服务器向所述客户端发送所述加密后的视频数据。In a possible embodiment, the server sending the video data to the client includes: the server encrypting the video data according to the shared key to obtain encrypted video data; the server Send the encrypted video data to the client.

本发明实施例的第二方面提供了一种信息处理方法,包括:客户端接收服务器发送的视频数据,所述视频数据为所述服务器根据所述客户端播放的当前视频获得;所述客户端根据所述视频数据生成客户端计算结果;所述客户端将所述客户端计算结果发送给所述服务器,以使得所述服务器根据所述客户端计算结果确定当前观看所述当前视频的记录是否为虚假记录。The second aspect of the embodiments of the present invention provides an information processing method, including: the client receives video data sent by the server, the video data is obtained by the server according to the current video played by the client; the client Generate a client calculation result according to the video data; the client sends the client calculation result to the server, so that the server determines whether the record of the current video is currently viewed according to the client calculation result for false records.

在一种可能的实施例中,所述方法还包括:所述客户端与所述服务器进行协商生成共享秘钥,所述共享秘钥用于对所述客户端和所述视频网服务器之间的通信进行加密或解密;所述客户端接收服务器发送的视频数据后,所述客户端根据所述视频数据生成客户端计算结果之前,所述方法还包括:所述客户端根据所述共享秘钥解密所述视频数据。In a possible embodiment, the method further includes: the client negotiates with the server to generate a shared key, and the shared key is used to communicate between the client and the video network server. After the client receives the video data sent by the server, before the client generates a client calculation result according to the video data, the method further includes: the client according to the shared secret key to decrypt the video data.

本发明实施例的第三方面提供了一种服务器,包括:获得单元,用于根据客户端播放的当前视频获得视频数据;收发单元,用于将所述视频数据发送给所述客户端,以使得所述客户端根据所述视频数据得到客户端计算结果;所述收发单元还用于,接收所述客户端发送的所述客户端计算结果;确定单元,当所述客户端计算结果与服务器计算结果不同时,用于确定当前观看所述当前视频的记录为虚假记录,所述服务器计算结果为所述服务器根据所述视频数据计算得到服务器计算结果。A third aspect of the embodiments of the present invention provides a server, including: an obtaining unit, configured to obtain video data according to the current video played by the client; a transceiver unit, configured to send the video data to the client, to making the client obtain a calculation result of the client according to the video data; the transceiver unit is also used to receive the calculation result of the client sent by the client; the determination unit, when the calculation result of the client and the server When the calculation results are different, it is used to determine that the record currently watching the current video is a false record, and the server calculation result is a server calculation result calculated by the server according to the video data.

在一种可能的实施例中,所述服务器还包括:生成单元,用于与所述客户端进行协商生成共享秘钥,所述共享秘钥用于对所述服务器和所述客户端之间的通信进行加密或解密。In a possible embodiment, the server further includes: a generating unit, configured to negotiate with the client to generate a shared key, and the shared key is used to communicate between the server and the client encrypted or decrypted communications.

在一种可能的实施例中,所述生成单元包括:生成模块,用于根据所述当前视频的信息生成第一公私钥对,所述第一公私钥对包括第一公钥和第一私钥;收发模块,用于向所述客户端发送所述第一公钥,以使得所述客户端根据所述第一公钥生成共享秘钥;所述生成模块还用于根据所述第一公钥和第二公钥生成所述共享秘钥,所述第二公钥由所述客户端生成并发送。In a possible embodiment, the generation unit includes: a generation module, configured to generate a first public-private key pair according to the information of the current video, and the first public-private key pair includes the first public key and the first private key key; a transceiver module, configured to send the first public key to the client, so that the client generates a shared secret key according to the first public key; the generating module is also configured to generate a shared secret key according to the first The public key and the second public key generate the shared secret key, and the second public key is generated and sent by the client.

在一种可能的实施例中,所述收发单元具体用于:根据所述共享秘钥加密所述视频数据,得到加密后的视频数据;向所述客户端发送所述加密后的视频数据。In a possible embodiment, the transceiving unit is specifically configured to: encrypt the video data according to the shared key to obtain encrypted video data; and send the encrypted video data to the client.

本发明实施例的第四方面提供了一种客户端,包括:收发单元,用于接收服务器发送的视频数据,所述视频数据为所述服务器根据所述客户端播放的当前视频获得;生成单元,用于根据所述视频数据生成客户端计算结果;所述收发单元还用于,将所述客户端计算结果发送给所述服务器,以使得所述服务器根据所述客户端计算结果确定当前观看所述当前视频的记录是否为虚假记录。The fourth aspect of the embodiments of the present invention provides a client, including: a transceiver unit, configured to receive video data sent by the server, the video data is obtained by the server according to the current video played by the client; a generation unit , used to generate a client calculation result according to the video data; the transceiver unit is also used to send the client calculation result to the server, so that the server determines the current viewing result according to the client calculation result Whether the record of the current video is a false record.

在一种可能的实施例中,所述生成单元还用于:与所述服务器进行协商生成共享秘钥,所述共享秘钥用于对所述客户端和所述视频网服务器之间的通信进行加密或解密;所述服务器还包括:解密单元,用于根据所述共享秘钥解密所述视频数据。In a possible embodiment, the generating unit is further configured to: negotiate with the server to generate a shared key, and the shared key is used for communication between the client and the video network server performing encryption or decryption; the server further includes: a decryption unit configured to decrypt the video data according to the shared secret key.

本发明第五方面提供了一种电子设备,包括存储器、处理器,其特征在于,所述处理器用于执行存储器中存储的计算机管理类程序时实现如上述任意一项所述的内存管理方法的步骤。The fifth aspect of the present invention provides an electronic device, including a memory and a processor, wherein the processor is used to implement the memory management method described in any one of the above when executing a computer management program stored in the memory step.

本发明第六方面提供了一种计算机可读存储介质,其上存储有计算机管理类程序,其特征在于:所述计算机管理类程序被处理器执行时实现如上述任意一项所述的内存管理方法的步骤。The sixth aspect of the present invention provides a computer-readable storage medium, on which a computer management program is stored, characterized in that: when the computer management program is executed by a processor, the memory management as described in any one of the above is implemented method steps.

从以上技术方案可以看出,本发明实施例具有以下优点:服务器根据客户端播放的当前视频获得视频数据;所述服务器将所述视频数据发送给所述客户端,以使得所述客户端根据所述视频数据得到客户端计算结果;所述服务器接收所述客户端发送的所述客户端计算结果;当所述客户端计算结果与服务器计算结果不同时,所述服务器确定当前观看所述当前视频的记录为虚假记录,所述服务器计算结果为所述服务器根据所述视频数据计算得到服务器计算结果。本发明实施例中,服务器根据正在播放的当前视频获得视频数据,并将该视频数据发送给客户端,使得客户端根据在视频数据获得客户端计算结果,当客户端计算结果与该服务器生成的服务器计算结果不一样时,则服务器确定观看该当前视频的记录为虚假记录,即该当前视频的此次播放不算做当前视频的观看次数内,识别出了视频的虚假播放,减少了视频网站的损失。As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages: the server obtains video data according to the current video played by the client; The video data obtains the calculation result of the client; the server receives the calculation result of the client sent by the client; when the calculation result of the client is different from the calculation result of the server, the server determines that the current video is currently viewed The video record is a false record, and the server calculation result is the server calculation result calculated by the server based on the video data. In the embodiment of the present invention, the server obtains video data according to the current video being played, and sends the video data to the client, so that the client obtains the calculation result of the client according to the video data. When the calculation results of the server are different, the server determines that the record of watching the current video is a false record, that is, the current playback of the current video is not included in the number of views of the current video, and the false playback of the video is identified, reducing the number of video sites. Loss.

附图说明Description of drawings

图1为本发明实施例提供的一种可能的信息处理方法的流程图;FIG. 1 is a flowchart of a possible information processing method provided by an embodiment of the present invention;

图2为本发明实施例提供的一种可能的服务器的结构示意图;FIG. 2 is a schematic structural diagram of a possible server provided by an embodiment of the present invention;

图3为本发明实施例提供的一种可能的客户端的结构示意图;FIG. 3 is a schematic structural diagram of a possible client provided by an embodiment of the present invention;

图4为本发明实施例提供的一种可能的服务器的硬件结构示意图;FIG. 4 is a schematic diagram of a hardware structure of a possible server provided by an embodiment of the present invention;

图5为本发明实施例提供的另一可能的服务器的硬件结构示意图;FIG. 5 is a schematic diagram of a hardware structure of another possible server provided by an embodiment of the present invention;

图6为本发明实施例提供的一种可能的客户端的硬件结构示意图;FIG. 6 is a schematic diagram of a hardware structure of a possible client provided by an embodiment of the present invention;

图7为本发明实施例提供的另种可能的客户端的硬件结构示意图。FIG. 7 is a schematic diagram of another possible hardware structure of a client provided by an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例提供了一种信息处理方法及相关设备,用于通过识别视频的虚假播放,减少视频网站的损失。The embodiment of the present invention provides an information processing method and related equipment, which are used to reduce the loss of video websites by identifying false playback of videos.

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.

请参阅图1,为本发明实施例提供的一种可能的信息处理方法的流程图,具体包括:Please refer to Figure 1, which is a flow chart of a possible information processing method provided by an embodiment of the present invention, specifically including:

101、服务器生成第一公私钥对;101. The server generates a first public-private key pair;

需要说明的是,为了提高服务器与客户端之间进行数据传输的安全性,可以对服务器与客户端之间的通信进行加密处理。本发明实施例中,可采用非对称RSA加密算法来生成公私钥对,其中,当客户端每次打开一个视频进行播放时,则会重新生成一对公私钥对,保障每个视频的公私钥对均不一样。It should be noted that, 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 present invention, an asymmetric RSA encryption algorithm can be used to generate a public-private key pair, wherein, when the client opens a video for playback each time, a pair of public-private key pairs will be regenerated to ensure the public-private key of each video Pairs are different.

可选的,本发明中,服务器根据客户端正在播放的当前视频的信息来生成第一公私钥对,其包括第一公钥和第一私钥。具体的第一私钥可以使用随机数生成,第一公钥则调用RSA的接口函数可以生成对应的公钥,第一私钥和第一公钥是唯一配对的关系,生成第一公私钥对的实现方式包括以下步骤:Optionally, in the present invention, the server generates the first public-private key pair according to the information of the current video being played by the client, which includes the first public key and the first private key. The specific first private key can be generated using random numbers, and the first public key can generate the corresponding public key by calling the RSA interface function. The first private key and the first public key are uniquely paired, and the first public-private key pair is generated. The implementation method includes the following steps:

步骤1、生成随机数据;Step 1. Generate random data;

Randdata=rand();randdata = rand();

通过调用系统函数rand来生成一段随机数据Randdata。Generate a piece of random data Randdata by calling the system function rand.

步骤2、依据当前视频的身份标识号码(identification,ID)和随机数生成其Md5值做为第一私钥;Step 2, generate its Md5 value according to the identification number (identification, ID) of current video and random number as the first private key;

ClientPrivatekey=Md5.Create(Randdata+VideoId);ClientPrivatekey=Md5.Create(Randdata+VideoId);

其中VideoId用于表示当前视频的ID号,需要说明的是,该当前视频的ID可以理解为每个视频的房间号。The VideoId is used to represent 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.

通过调用Md5函数的接口Md5.Create来对随机数据和当前视频的ID号拼接到一起计算其Md5值,从而得到了第一私钥的数据。By calling the interface Md5.Create of the Md5 function, the random data and the ID number of the current video are spliced together to calculate its Md5 value, thereby obtaining the data of the first private key.

步骤3、计算第一公钥。Step 3. Calculate the first public key.

ClientPublickey=RSA.CreatePair(ClientPrivatekey);ClientPublicKey = RSA.CreatePair(ClientPrivateKey);

第一公钥则调用RSA的生成配对钥匙接口RSA.CreatePair来生成。The first public key is generated by calling the RSA pair key generation interface RSA.CreatePair.

从而最终服务器生成了一对第一公钥和第一私钥信息。Thus, finally the server generates a pair of first public key and first private key information.

102、客户端生成第二公私钥对;102. The client generates a second public-private key pair;

当服务器与客户端交互时,首先服务器会将自己的第一公钥的信息下发给客户端。与此同时,客户端也会依照服务器的方式生成一对第二公私钥对。服务器的生成则也会依照当前视频的ID号,用户的用户身份标识号码(user ID,Uid)以及随机数据来生成第二私钥,从而尽可能保障不同客户端播放不同视频时的私钥不一样。具体实现如下:When the server interacts with the client, first the server will send the information of its first public key to the client. At the same time, the client will also generate a second public-private key pair according to the method of the server. The generation of the server will also generate the second private key according to the ID number of the current video, the user's user identification number (user ID, Uid) and random data, so as to ensure that the private keys of different clients when playing different videos are different as much as possible. Same. The specific implementation is as follows:

步骤1、生成随机数据;Step 1. Generate random data;

Randdata=rand();randdata = rand();

通过调用系统函数rand来生成一段随机数据Randdata。Generate a piece of random data Randdata by calling the system function rand.

步骤2、依据当前视频的ID号、Uid和随机数生成其Md5值做为第二私钥。Step 2. Generate its Md5 value as the second private key according to the ID number, Uid and random number of the current video.

ServerPrivatekey=Md5.Create(Randdata+Uid+VideoId);ServerPrivatekey=Md5.Create(Randdata+Uid+VideoId);

通过调用Md5函数的接口Md5.Create来对随机数、用户的Uid和当前视频的ID号拼接到一起计算其Md5值,从而得到了第二私钥的数据。By calling the interface Md5.Create of the Md5 function to concatenate the random number, the user's Uid and the ID number of the current video to calculate its Md5 value, thereby obtaining the data of the second private key.

步骤3、计算第二公钥。Step 3. Calculate the second public key.

ServerPublickey=RSA.CreatePair(ServerPrivatekey);ServerPublickey = RSA.CreatePair(ServerPrivatekey);

第二公钥则调用RSA的生成配对钥匙接口RSA.CreatePair来生成。The second public key is generated by calling RSA's pair key generation interface RSA.CreatePair.

从而客户端则生成了第二公私钥对的信息。Thus, the client generates information about the second public-private key pair.

此时客户端收到服务器下发的第一公钥后,则将自己的第二公钥的信息发送给服务器。At this time, after receiving the first public key delivered by the server, the client sends information about its second public key to the server.

103、服务器与客户端互换公钥并生成共享秘钥;103. The server and the client exchange public keys and generate a shared secret key;

服务器和客户端互换各自的公钥信息,来生成一个共享秘钥,可以理解的是,服务器和客户端生成的共享秘钥是同一个值。需要说明的是,为了保证服务器和客户端生成的共享秘钥是同一个值,服务器和客户端在生成共享秘钥之前,需要协商确定一个生成算法,该生成算法用于根据第一公钥和第二公钥生成共享秘钥。The server and the client exchange their respective public key information to generate a shared secret key. It can be understood that the shared secret key generated by the server and the client is the same value. It should be noted that, in order to ensure that the shared secret key generated by the server and the client is the same value, the server and the client need to negotiate to determine a generation algorithm before generating the shared secret key. The second public key generates a shared secret key.

具体服务器和客户端互换公钥并生成共享秘钥实现如下:The implementation of the specific server and client exchanging public keys and generating shared secret keys is as follows:

步骤1、互换公钥。Step 1. Exchange public keys.

服务器将服务器的第一公钥ServerPublickey发送给客户端。The server sends the server's first public key ServerPublickey to the client.

客户端将客户端的第二公钥ClientPublickey发送给服务器。The client sends the client's second public key ClientPublickey to the server.

步骤2、客户端生成共享秘钥。Step 2. The client generates a shared secret key.

ShareKey=RSA.CreateShareKey(ServerPublickey,ClientPrivatekey);ShareKey = RSA.CreateShareKey(ServerPublicKey, ClientPrivateKey);

步骤3、服务器生成共享秘钥。Step 3. The server generates a shared secret key.

ShareKey=RSA.CreateShareKey(ClientPublickey,ServerPrivatekey);ShareKey = RSA.CreateShareKey(ClientPublickey, ServerPrivateKey);

由于生成因素和生成算法一致,从而服务器和客户端生成的ShareKey的值是一致的。Since the generation factor and the generation algorithm are consistent, the values of the ShareKey generated by the server and the client are consistent.

需要注意的是,客户端通过步骤2生成共享秘钥,服务器通过步骤3生成共享秘钥,这两个过程并没有时序的限定,即可以先执行步骤2,也可以先执行步骤3,或者同时执行,具体此处不做限定。It should be noted that the client generates the shared secret key through step 2, and the server generates the shared secret key through step 3. There is no time sequence limit for these two processes, that is, step 2 or step 3 can be performed first, or at the same time Execution, the details are not limited here.

服务器和客户端都生成共享秘钥后,根据该共享秘钥对服务器和客户端进行加密或者解密处理。可选的,本发明实施例中,除了采用非对称RSA加密算法来进行加密或者解密处理外,还可以采用数据加密算法(Data Encryptin Standard,DES)或者其他加密算法,具体此处不做限定。After both the server and the client generate the shared key, the server and the client are encrypted or decrypted according to the shared key. Optionally, in this embodiment of the present invention, in addition to using the asymmetric RSA encryption algorithm for encryption or decryption processing, a data encryption algorithm (Data Encryptin Standard, DES) or other encryption algorithms may also be used, which are not specifically limited here.

104、服务器根据客户端播放的当前视频获得视频数据;104. The server obtains video data according to the current video played by the client;

为了检测用户通过客户端是否有真实的观看当前视频,服务器会间隔的对播放当前视频的客户端进行数据抽查方式的校验。需要说明的是,当客户端播放视频时,客户端与服务器一直保持着通信,从而服务器是知道客户端在播放的当前视频的时长信息,故服务器可依据客户端播放的当前视频的时刻信息来随机的生成下发客户端的视频数据。In order to detect whether the user actually watches the current video through the client, the server will periodically check the data of the client playing the current video in a random data check mode. It should be noted that when the client plays the video, the client and the server keep communicating, so the server knows the duration information of the current video played by the client, so the server can use the time information of the current video played by the client to Randomly generate video data for delivery to the client.

具体地,服务器会从当前视频中获取当前视频的视频帧数(指视频的关键帧,即视频一帧的图片数据)以及当前帧数信息,进而得到视频数据,具体实现如下:Specifically, the server will obtain the video frame number of the current video (referring to the key frame of the video, that is, the image data of one frame of the video) and the current frame number information from the current video, and then obtain the video data. The specific implementation is as follows:

步骤1、服务器生成一段随机数据。Step 1. The server generates a piece of random data.

Rdata=rand();Rdata = rand();

步骤2、服务器从客户端的播放时刻随机取一个视频起始帧数。Step 2. The server randomly selects a video starting frame number from the client's playing time.

其中,每个视频是由一个个的视频帧组成,那么服务器会依据当前客户端播放的时刻来获取当前时刻的视频帧数,即从视频开始到播放时刻起的视频帧数startFrame。Wherein, each video is composed of video frames one by one, then the server will obtain the number of video frames at the current time according to the current playback time of the client, that is, the number of video frames startFrame from the start of the video to the playback time.

步骤3、需要读取的视频帧数。Step 3. The number of video frames to be read.

指从当前视频帧数startFrame起的取多少帧的视频数据NumFrames。Refers to how many frames of video data NumFrames are taken from the current video frame number startFrame.

服务器将上述步骤1~3得到的信息一起打包,得到视频数据,即视频数据包括随机数据Rdata,起始帧数据startFrame,和需要计算的帧数NumFrames,和当前的时间戳信息。The server packs the information obtained in the above steps 1 to 3 together to obtain video data, that is, the video data includes random data Rdata, start frame data startFrame, and the number of frames to be calculated NumFrames, and the current timestamp information.

105、服务器根据共享秘钥加密视频数据,得到加密后的视频数据;105. The server encrypts the video data according to the shared secret key to obtain the encrypted video data;

服务器得到视频数据后,根据共享秘钥将该视频数据进行加密,得到加密后的视频数据。其中,本发明实施例中采用加密算法AES来加密,具体实现如下:After the server obtains the video data, it encrypts the video data according to the shared secret key to obtain encrypted video data. Wherein, adopt encryption algorithm AES to encrypt in the embodiment of the present invention, concrete realization is as follows:

encryptData=Aes.encrypt(Rdata+startFrame+NumFrames+timestamp,ShareKey);encryptData = Aes.encrypt(Rdata+startFrame+NumFrames+timestamp, ShareKey);

其中encryptData用于表示加密后的视频数据,Aes.encrypt为加密的接口,timestamp表示当前的时间戳信息,ShareKey表示共享秘钥。Among them, encryptData is used to represent the encrypted video data, Aes.encrypt is the encrypted interface, timestamp represents the current timestamp information, and ShareKey represents the shared secret key.

106、服务器向客户端发送加密后的视频数据;106. The server sends encrypted video data to the client;

服务器得到加密后的视频数据后,将该加密后的视频数据发送给客户端。After the server obtains the encrypted video data, it sends the encrypted video data to the client.

107、客户端根据共享秘钥解密该加密后的视频数据,得到视频数据;107. The client decrypts the encrypted video data according to the shared secret key to obtain the video data;

由于视频网站的播放器是由视频网站开发的,所以如果是正常的客户端,则一定是由视频网站的视频播放器来进行观看,因此正常的客户端是具备收取服务器的视频数据及解密视频数据的功能。因此客户端接收到加密后的视频数据后,则可以解密出原始的视频数据。其中,客户端也可以使用AES算法来对加密后的视频数据进行解密操作,具体实现如下:Since the player of the video website is developed by the video website, if it is a normal client, it must be watched by the video player of the video website, so the normal client is capable of receiving the video data from the server and decrypting the video function of the data. Therefore, after receiving the encrypted video data, the client can decrypt the original video data. Among them, the client can also use the AES algorithm to decrypt the encrypted video data. The specific implementation is as follows:

Rdata+startFrame+NumFrames+timestamp=Aes.decrypt(encryptData,ShareKey);Rdata+startFrame+NumFrames+timestamp=Aes.decrypt(encryptData, ShareKey);

因此,客户端解密得到了服务器下发的视频数据,包括随机数据Rdata,视频的起始帧数startFrame,视频的帧数NumFrames,当前的时间戳信息timestamp。Therefore, the client decrypts and obtains the video data sent by the server, including the random data Rdata, the starting frame number of the video startFrame, the number of frames of the video NumFrames, and the current timestamp information timestamp.

108、客户端根据视频数据生成客户端计算结果;108. The client generates a client calculation result according to the video data;

客户端收到服务器下发的加密后的视频数据后,进行解密得到原始的视频数据,进而需要按照视频数据来对视频帧的数据进行计算,并生成客户端计算结果以上报到服务器。需要说明的是,客户端要观看当前视频时首先会从服务器下载当前视频,并进行播放,那么服务器下发的视频数据则是从客户端下载的当前视频的起始帧和需要计算的帧数进行HASH计算得到HASH结果即客户端计算结果,并将客户端计算结果上报给服务器。故只有真正播放过当前视频的客户端才能正确的计算得到正常的结果数据。客户端则从当前视频的起始帧数和需要计算的帧数来对视频数据进行MD5计算,同时计算时也会加上服务器下发的随机数据Rdata,从而保障即使是相同的起始帧和帧数,最终计算得到的客户端计算结果是不一致的。具体实现如下:After the client receives the encrypted video data from the server, it decrypts to obtain the original video data, and then needs to calculate the data of the video frame according to the video data, and generate the calculation results of the client to report to the server. It should be noted that when the client wants to watch the current video, it will first download the current video from the server and play it, then the video data sent by the server is the starting frame of the current video downloaded from the client and the number of frames to be calculated The HASH calculation is performed to obtain the HASH result, which is the client calculation result, and the client calculation result is reported to the server. Therefore, only the client that has actually played the current video can correctly calculate and obtain normal result data. The client performs MD5 calculation on the video data from the starting frame number of the current video and the number of frames to be calculated. At the same time, the random data Rdata sent by the server will be added to the calculation, so as to ensure that even the same starting frame and The number of frames, the final calculated client calculation results are inconsistent. The specific implementation is as follows:

Md5result=Md5.Create(video_data+Rdata);Md5result = Md5.Create(video_data+Rdata);

其中Md5result用于表示客户端计算结果,video_data用于表示视频的起始帧到帧数的视频数据;Rdata用于表示服务器下发的随机数据。故最终通过md5算法则得到了HASH的结果数据即客户端计算结果。Among them, Md5result is used to represent the calculation result of the client, video_data is used to represent the video data from the start frame to the frame number of the video; Rdata is used to represent the random data delivered by the server. Therefore, the result data of HASH is finally obtained through the md5 algorithm, that is, the calculation result of the client.

109、客户端根据共享秘钥向服务器发送客户端计算结果;109. The client sends the calculation result of the client to the server according to the shared secret key;

客户端计算得到客户端计算结果后,根据共享密钥对该客户端计算结果进行加密,并将加密后的客户端计算结果发送给服务器。其中,本发明实施例中,可以采用加密算法如高级加密标准(advanced encryption standard,AES)算法对客户端计算结果来进行加密来进行加密,具体实现如下:After the client calculates and obtains the client calculation result, it encrypts the client calculation result according to the shared key, and sends the encrypted client calculation result to the server. Wherein, in the embodiment of the present invention, an encryption algorithm such as an advanced encryption standard (advanced encryption standard, AES) algorithm can be used to encrypt the calculation results of the client to perform encryption, and the specific implementation is as follows:

encryptData=Aes.Encrypt(Md5result,ShareKey);encryptData = Aes.Encrypt(Md5result, ShareKey);

其中encryptData用于表示加密后的客户端计算结果,Md5result用于表示客户端计算结果,ShareKey用于表示共享秘钥。Among them, encryptData is used to indicate the encrypted client calculation result, Md5result is used to indicate the client calculation result, and ShareKey is used to indicate the shared secret key.

因此,客户端将加密后的客户端计算结果即encryptData发送给服务器。Therefore, the client sends the encrypted client calculation result, namely encryptData, to the server.

110、服务器根据共享秘钥接收客户端计算结果;110. The server receives the calculation result of the client according to the shared secret key;

服务器接收加密后的客户端计算结果后,对该加密后的客户端计算结果进行解密,得到原始的客户端计算结果。After receiving the encrypted client calculation result, the server decrypts the encrypted client calculation result to obtain the original client calculation result.

具体地,服务器也可以使用AES算法来对加密后的客户端计算结果进行解密操作,具体实现如下:Specifically, the server can also use the AES algorithm to decrypt the encrypted client calculation results, and the specific implementation is as follows:

Md5result=Aes.decrypt(encryptData,ShareKey);Md5result = Aes.decrypt(encryptData, ShareKey);

故服务器接收加密后的客户端计算结果,并根据共享秘钥解密得到了原始客户端计算结果。Therefore, the server receives the encrypted client calculation result, and decrypts it according to the shared secret key to obtain the original client calculation result.

111、服务器根据视频数据生成服务器计算结果;111. The server generates a server calculation result according to the video data;

需要说明的是,服务器具有当前视频的整个视频内容,故服务器也按照客户端的计算方式来提取视频的起始帧及帧数的视频数据进行MD5计算,从而得到服务器计算结果,具体得到服务器计算结果的方式与步骤108类似,具体此处不再赘述。It should be noted that the server has the entire video content of the current video, so the server also extracts the video data of the start frame and frame number of the video according to the calculation method of the client to perform MD5 calculation, thereby obtaining the calculation result of the server, and specifically the calculation result of the server The method is similar to that of step 108, and details are not repeated here.

需要注意的是,服务器通过步骤111生成服务器计算结果,客户端通过步骤108生成客户端计算结果,这两个过程并不存在特定的时序关系,即可以先执行步骤111,也可以先执行步骤108,或者同时执行,具体此处不做限定。It should be noted that the server generates server calculation results through step 111, and the client generates client calculation results through step 108. There is no specific timing relationship between these two processes, that is, step 111 or step 108 can be performed first. , or execute at the same time, which is not limited here.

112、服务器确定客户端计算结果与服务器计算结果是否一致;若否,则执行步骤113;若是,则执行步骤114;112. The server determines whether the calculation result of the client is consistent with the calculation result of the server; if not, execute step 113; if yes, execute step 114;

服务器得到客户端计算结果与服务器计算结果后,比对客户端计算结果与服务器计算结果是否一致,若客户端计算结果与服务器计算结果不一致,则执行步骤113;若客户端计算结果与服务器计算结果一致,则执行步骤114。After the server obtains the calculation result of the client and the calculation result of the server, it compares whether the calculation result of the client is consistent with the calculation result of the server. If the calculation result of the client is inconsistent with the calculation result of the server, then execute step 113; If they are consistent, go to step 114.

113、服务器确定当前观看当前视频的记录为虚假记录;113. The server determines that the current record of watching the current video is a false record;

当客户端计算结果与服务器计算结果不一致时,说明客户端的计算有问题,则确定当前观看该视频的记录为虚假记录,即该当前视频的此次播放不算做当前视频的观看次数内When the calculation result of the client is inconsistent with the calculation result of the server, it means that there is a problem with the calculation of the client, and then it is determined that the current record of watching the video is a false record, that is, the playback of the current video does not count as the number of views of the current video.

114、服务器确定当前观看当前视频的记录为合法记录。114. The server determines that the record of currently watching the current video is a legal record.

当客户端计算结果与服务器计算结果一致时,可以认为客户端的计算没有问题,客户端有真实的播放当前视频,则确定当前观看该视频的记录为合法记录,即该当前视频的此次播放算入当前视频的观看次数内。When the calculation result of the client is consistent with the calculation result of the server, it can be considered that there is no problem with the calculation of the client, and the client has actually played the current video, then it is determined that the record currently watching the video is a legal record, that is, the playback of the current video is included in the within the number of views of the current video.

需要说明的是,本发明实施例中,除了通过图1所示的信息处理方法来识别视频的虚假播放,还可以采用如下方式来识别视频的虚假播放,例如:It should be noted that, in the embodiment of the present invention, in addition to identifying the false playback of the video through the information processing method shown in FIG. 1 , the following methods can also be used to identify the false playback of the video, for example:

方式1:在客户端中定期得到采集信息(采集信息包括观看的视频编号,用户的唯一uid,视频观看时的起始帧的打开时间,当前视频的码率,当前视频播放的FPS,视频的硬件解码,软件解码,视频观看的状态记录(是否有错误出现等,是否有卡顿现象),视频的观看时长,及整个观看时长所下载的视频流数据的总量),例如以1分钟为界限,每隔1分钟来采集一次采集信息,并且将该采集信息使用客户端和服务器协商的加密算法来将采集信息上报到服务器。因此,任何第三方平台盗刷(第三方平台使用通用的或者第三方平台自己的视频播放器)视频流或者并没有观看过视频,则都不会有该采集信息。同时对于黑客来说,本文的采集信息为加密后的采集信息(加密算法是通过客户端和服务器进行协商的共享秘钥来加密,并且采集信息的加密是依赖于时间和用户独有的信息,那么复制该条数据来伪造采集信息,服务器则可以通过解密采集信息来识别该采集信息是非法的,同时即使采集信息被截获,黑客获取不到共享秘钥也无法进行解密采集信息),不容易伪造和截获。Method 1: Obtain collection information regularly in the client (collection information includes the video number watched, the user's unique uid, the opening time of the starting frame when watching the video, the bit rate of the current video, the FPS of the current video playing, the Hardware decoding, software decoding, video viewing status record (whether there is an error, etc., whether there is a freeze phenomenon), video viewing time, and the total amount of video stream data downloaded during the entire viewing time), for example, 1 minute Limit, to collect the collection information every 1 minute, and use the encryption algorithm negotiated between the client and the server to report the collection information to the server. Therefore, any third-party platform that steals (the third-party platform uses a general-purpose or third-party platform's own video player) video stream or has not watched the video will not have the collected information. At the same time, for hackers, the collected information in this article is encrypted collected information (the encryption algorithm is encrypted through the shared secret key negotiated between the client and the server, and the encryption of collected information depends on time and unique information of the user. Then copy the piece of data to forge the collected information, and the server can identify that the collected information is illegal by decrypting the collected information. At the same time, even if the collected information is intercepted, the hacker cannot obtain the shared secret key and cannot decrypt the collected information), which is not easy Forgery and interception.

进一步的为了对破解或者黑客起到干扰的作用,也可以定期上报明文的数据采集信息,明文数据采集主要包含部分不是特别重要的信息,其目的是数据采集信息是明文,黑客很容易发现数据采集信息,从而让黑客以为本文是通过上报这些明文的数据采集信息来识别盗刷行为的。其中,数据采集信息可以包含当前用户设备唯一ID信息,当前观看时长信息,当前观看影片的ID信息,当前观看的视频码率信息。此数据采集信息则主要是用于干扰黑客。Further, in order to interfere with cracking or hackers, it is also possible to regularly report plaintext data collection information. Plaintext data collection mainly includes some unimportant information. The purpose is that the data collection information is plaintext, and hackers can easily find data collection information. Information, so that hackers think that this article is to identify fraudulent brushing behavior by reporting the data collection information in these plain texts. Wherein, the data collection information may include the unique ID information of the current user equipment, the current viewing duration information, the ID information of the currently watched movie, and the currently watched video bit rate information. This data collection information is mainly used to interfere with hackers.

需要说明的是,本发明上报的客户端下载的视频流流量数据可以非常好的识别盗刷的行为,首先正常的观看例如10分钟的视频,则必须在一个合理的视频流量的范围内容,不在范围内则都是非法的,同时即使黑客去盗刷,那么其必须有非常大的网络带宽,才能刷大量的虚假观看次数,从而对于黑客则由极大的成本。因此通过本文的上述信息能够比较好的识别出盗刷视频观看次数的用户。It should be noted that the video flow data downloaded by the client terminal reported by the present invention can very well identify the behavior of fraudulent brushing. First of all, if you watch a video such as 10 minutes normally, the content must be within a reasonable video flow range, not in It is illegal within the scope, and even if the hacker steals the brush, it must have a very large network bandwidth in order to brush a large number of false viewing times, so the hacker will have a huge cost. Therefore, the above-mentioned information in this article can better identify users who steal video viewing times.

方式2:对于视频网站的所有视频都是用户将制作好的视频上传到服务器。服务器则首先会对视频进行审核,同时会在视频中加入视频网站的水印以防止其他网站盗取该视频。因此,本发明中,可以在对视频加入视频网站的水印后,进一步会对视频加入一路验证信息,该验证信息并不会进行播放,而只是起到验证的作用。并且在插入信息时,本发明依据一定算法,使得每个视频插入的信息是不一样的。当用户端进行视频观看时,则会下载该视频内容,其中该视频内容携带了该验证信息,那么只有视频网站的播放器才会解密出该验证信息,并对验证信息进行计算得到验证结果上报到服务器。而对于其他非视频网站的播放器则并不会知道有一条验证信息,也并不知道如何计算验证结果,从而服务器可以识别得到真实的通过视频网站播放器观看的真实观看次数。Mode 2: For all videos on the video website, the user uploads the produced video to the server. The server will first review the video, and at the same time add the watermark of the video website to the video to prevent other websites from stealing the video. Therefore, in the present invention, after adding the watermark of the video website to the video, a piece of verification information can be further added to the video, and the verification information will not be played, but only serves as a verification function. And when inserting information, the present invention is based on a certain algorithm, so that the information inserted into each video is different. When the user end watches a video, it will download the video content, and the video content carries the verification information, then only the player of the video website will decrypt the verification information, and calculate the verification information to obtain the verification result and report it to the server. However, the players of other non-video websites do not know that there is a piece of verification information, and do not know how to calculate the verification result, so that the server can identify the real number of times viewed by the video website player.

方式3:可以理解的是,对于一个正常的用户来说,其同时观看视频的频率是有限的。而对于黑客来说,为了伪造大量的观看记录,则其需要大量的刷观看记录才会有收益。那么需要一种方法来证明客户端有进行观看视频的验证,验证方法可以是客户端通过一定的计算量得到一个验证数据,其中计算验证数据会消耗客户端的CPU资源,从而使得客户端同时并发观看视频时,需要并发进行大量的计算消耗CPU资源,从而使得其并发数量有限,故能够阻止客户端的刷观看次数的行为。对于正常用户,正常的观看一次视频不影响用户,而对于并发大量发观看视频则会影响非常大,增加了其成本。那么如何设计算法,能够使得客户端会有一定计算量来得到验证结果,并且又不能绕过计算,同时服务器又比较容易的判断客户端的结果是否正确。那么本发明则设计了一套算法来使得客户端有一定计算量,服务器又比较容易鉴别客户端的结果,并且不消耗服务器的计算资源。首先客户端和服务器会协商一个共享秘钥,然后服务器会生成一个32位长度的随机字符串,和一个0的个数。这2个数据都会最终发送到客户端中。并且通过之前协商的共享秘钥进行加密。客户端收到服务器的数据后,首先对服务器的数据进行解密,从而得到随机数据字符串和需要计算的结果数据的0的个数位数。客户端编写算法来生成服务器需要的结果数据。客户端计算则是包含客户端的设备唯一ID、客户端登录时使用的TOKEN数据、客户端当前观看的视频唯一ID、服务器下发的随机数据、当前的系统时间戳信息拼接到一起,并加上客户端自身的随机数据,一起来计算MD5值,具体实现方式如下:Method 3: It is understandable that for a normal user, the frequency of watching videos at the same time is limited. For hackers, in order to forge a large number of viewing records, they need a large number of swiping viewing records to be profitable. Then there is a need for a method to prove that the client has verified watching the video. The verification method can be that the client obtains a verification data through a certain amount of calculation, and the calculation of the verification data will consume the CPU resources of the client, so that the client can watch it concurrently. In the case of video, a large number of calculations need to be performed concurrently to consume CPU resources, so that the number of concurrency is limited, so it can prevent the client from swiping the number of views. For normal users, watching a video normally does not affect the user, but it will have a very large impact on concurrent viewing of a large number of videos, which increases its cost. So how to design the algorithm so that the client will have a certain amount of calculation to obtain the verification result, and the calculation cannot be bypassed, and at the same time, the server can easily judge whether the result of the client is correct. Then the present invention designs a set of algorithms to make the client have a certain amount of calculation, and the server is relatively easy to identify the result of the client, and does not consume the calculation resources of the server. First, the client and the server will negotiate a shared secret key, and then the server will generate a 32-bit random string and a number of 0s. These two pieces of data will eventually be sent to the client. And it is encrypted by the previously negotiated shared secret key. After the client receives the data from the server, it first decrypts the data from the server to obtain the random data string and the number of 0s in the result data to be calculated. Clients write algorithms to generate the result data required by the server. The client-side calculation includes the unique device ID of the client, the TOKEN data used when the client logs in, the unique ID of the video currently watched by the client, the random data sent by the server, and the current system timestamp information are spliced together, plus The client's own random data, together to calculate the MD5 value, the specific implementation is as follows:

Md5result=Md5.Create(DeviceId+Token+videoId+rdata+Time+clientRandData);其中DeviceId则是客户端的设备唯一ID;其中Token则是客户端登录服务器时的token值;videoId则是视频的唯一id;rdata则是服务器下发的随机数据;clientRandData则是客户端生成的随机数据。最终通过md5算法则得到了HASH的结果数据,由于服务器会要求客户端计算的结果数据中,开头为0的个数。例如计算得到的是“2013dabcd6987abc4523654123451263”。由于该结果数据的起始第一位是2而并不是0,所以客户端还需要不断的生成随机数据来计算MD5值,直到起始位为0,才满足服务器的要求。所以客户端的计算量则在与不断的生成随机数据,不断的计算MD5值,直到满足服务器的要求。服务器也可以对客户端的计算量起到调节的作用,例如起始为0的个数越多,则客户端的计算量则越大。从而使得客户端计算非常复杂。客户端计算完成满足服务器的结果后,将结果数据和客户端参与计算的数据发送到服务器。则包括Md5result+DeviceId+Time+clientRandData。而其他数据包括视频唯一ID和登录时的token服务器本身有记录。服务器验证客户端计算结果。客户端将满足服务器的结果数据上报到服务器,服务器则会依据客户端数据来校验。Md5result=Md5.Create(DeviceId+Token+videoId+rdata+Time+clientRandData);并对Md5result判断与客户端的是否一致,并且起始的0的个数是否满足,如果满足则说明客户端的结果是正确的。并且服务器只需要计算一次MD5值就可以知道客户端的结果是否正确,因为客户端是在频繁的计算MD5值以取得一个合适的随机数据clientRandData,而服务器则从客户端上报的结果知道客户端选择的随机数据,从而服务器验证则比较简单。Md5result=Md5.Create(DeviceId+Token+videoId+rdata+Time+clientRandData); where DeviceId is the unique device ID of the client; where Token is the token value when the client logs in to the server; videoId is the unique id of the video; rdata is the random data sent by the server; clientRandData is the random data generated by the client. Finally, the HASH result data is obtained through the md5 algorithm, because the server will require the client to calculate the number of result data that starts with 0. For example, the calculated result is "2013dabcd6987abc4523654123451263". Since the first digit of the result data is 2 instead of 0, the client needs to continuously generate random data to calculate the MD5 value until the starting digit is 0 to meet the requirements of the server. Therefore, the calculation amount of the client is constantly generating random data and continuously calculating the MD5 value until it meets the requirements of the server. The server can also adjust the calculation amount of the client, for example, the more the number starting from 0, the greater the calculation amount of the client. This makes the client calculation very complicated. After the client calculates and satisfies the result of the server, it sends the result data and the data that the client participates in the calculation to the server. It includes Md5result+DeviceId+Time+clientRandData. Other data include the video unique ID and the token server itself has records when logging in. The server verifies the client calculation result. The client will report the result data that satisfies the server to the server, and the server will verify it based on the client data. Md5result=Md5.Create(DeviceId+Token+videoId+rdata+Time+clientRandData); and judge whether the Md5result is consistent with that of the client, and whether the initial number of 0s is satisfied, if it is satisfied, it means that the result of the client is correct . And the server only needs to calculate the MD5 value once to know whether the client's result is correct, because the client is frequently calculating the MD5 value to obtain a suitable random data clientRandData, and the server knows the client's choice from the result reported by the client. Random data, so server verification is simpler.

上面从信息处理方法的角度对本发明实施例进行了描述,下面分别从服务器和客户端的角度分别对本发明实施例进行描述。The embodiments of the present invention are described above from the perspective of the information processing method, and the embodiments of the present invention are respectively described below from the perspectives of the server and the client.

请参阅图2,图2为本发明实施例提供的服务器的一个实施例示意图,该服务器,具体包括:Please refer to FIG. 2. FIG. 2 is a schematic diagram of an embodiment of a server provided by an embodiment of the present invention. The server specifically includes:

获得单元201,用于根据客户端播放的当前视频获得视频数据;Obtaining unit 201, for obtaining video data according to the current video played by the client;

收发单元202,用于将所述视频数据发送给所述客户端,以使得所述客户端根据所述视频数据得到客户端计算结果;A transceiver unit 202, configured to send the video data to the client, so that the client obtains a client calculation result according to the video data;

所述收发单元202还用于,接收所述客户端发送的所述客户端计算结果;The transceiving unit 202 is further configured to receive the calculation result of the client sent by the client;

确定单元203,当所述客户端计算结果与服务器计算结果不同时,用于确定当前观看所述当前视频的记录为虚假记录,所述服务器计算结果为所述服务器根据所述视频数据计算得到服务器计算结果。The determining unit 203 is configured to determine that the record currently watching the current video is a false record when the calculation result of the client is different from the calculation result of the server, and the calculation result of the server is calculated by the server according to the video data. Calculation results.

可选的,在一些可能的实现方式中,所述服务器还包括:Optionally, in some possible implementation manners, the server further includes:

生成单元204,用于与所述客户端进行协商生成共享秘钥,所述共享秘钥用于对所述服务器和所述客户端之间的通信进行加密或解密。The generating unit 204 is configured to negotiate with the client to generate a shared key, and the shared key is used to encrypt or decrypt the communication between the server and the client.

可选的,在一些可能的实现方式中,所述生成单元204包括:Optionally, in some possible implementation manners, the generating unit 204 includes:

生成模块2041,用于根据所述当前视频的信息生成第一公私钥对,所述第一公私钥对包括第一公钥和第一私钥;A generation module 2041, configured to generate a first public-private key pair according to the information of the current video, where the first public-private key pair includes a first public key and a first private key;

收发模块2042,用于向所述客户端发送所述第一公钥,以使得所述客户端根据所述第一公钥生成共享秘钥;A transceiver module 2042, configured to send the first public key to the client, so that the client generates a shared secret key according to the first public key;

所述生成模块2041还用于根据所述第一公钥和第二公钥生成所述共享秘钥,所述第二公钥由所述客户端生成并发送。The generating module 2041 is further configured to generate the shared secret key according to the first public key and the second public key, and the second public key is generated and sent by the client.

可选的,在一些可能的实现方式中,所述收发单元202具体用于:Optionally, in some possible implementation manners, the transceiver unit 202 is specifically configured to:

根据所述共享秘钥加密所述视频数据,得到加密后的视频数据;向所述客户端发送所述加密后的视频数据。Encrypting the video data according to the shared secret key to obtain encrypted video data; sending the encrypted video data to the client.

请参阅图3,图3为本发明实施例提供的客户端的一个实施例示意图,该客户端,具体包括:Please refer to FIG. 3. FIG. 3 is a schematic diagram of an embodiment of a client provided by an embodiment of the present invention. The client specifically includes:

收发单元301,用于接收服务器发送的视频数据,所述视频数据为所述服务器根据所述客户端播放的当前视频获得;The transceiver unit 301 is configured to receive video data sent by the server, the video data is obtained by the server according to the current video played by the client;

生成单元302,用于根据所述视频数据生成客户端计算结果;A generating unit 302, configured to generate a client calculation result according to the video data;

所述收发单元301还用于,将所述客户端计算结果发送给所述服务器,以使得所述服务器根据所述客户端计算结果确定当前观看所述当前视频的记录是否为虚假记录。The transceiving unit 301 is further configured to send the calculation result of the client to the server, so that the server determines whether the record of currently viewing the current video is a false record according to the calculation result of the client.

可选的,在一些可能的实现方式中,所述生成单元302还用于:与所述服务器进行协商生成共享秘钥,所述共享秘钥用于对所述客户端和所述视频网服务器之间的通信进行加密或解密;Optionally, in some possible implementation manners, the generating unit 302 is further configured to: negotiate with the server to generate a shared key, and the shared key is used for the client and the video network server Encrypt or decrypt communications between

所述客户端还包括:The client also includes:

解密单元303,用于根据所述共享秘钥解密所述视频数据。Decryption unit 303, configured to decrypt the video data according to the shared key.

请参阅图4,图4为本发明实施例提供的电子设备的实施例示意图。Please refer to FIG. 4 . FIG. 4 is a schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention.

如图4所示,本发明实施例提供了一种电子设备,包括存储器410、处理器420及存储在存储器420上并可在处理器420上运行的计算机程序411,处理器420执行计算机程序411时实现以下步骤:根据客户端播放的当前视频获得视频数据;器将所述视频数据发送给所述客户端,以使得所述客户端根据所述视频数据得到客户端计算结果;接收所述客户端发送的所述客户端计算结果;当所述客户端计算结果与服务器计算结果不同时,确定当前观看所述当前视频的记录为虚假记录,所述服务器计算结果为所述服务器根据所述视频数据计算得到服务器计算结果。As shown in FIG. 4 , an embodiment of the present invention provides an electronic device, including a memory 410, a processor 420, and a computer program 411 stored in the memory 420 and operable on the processor 420, and the processor 420 executes the computer program 411. When implementing the following steps: obtain video data according to the current video played by the client; the device sends the video data to the client, so that the client obtains the calculation result of the client according to the video data; receives the client The calculation result of the client sent by the terminal; when the calculation result of the client is different from the calculation result of the server, it is determined that the record currently watching the current video is a false record, and the calculation result of the server is that the server calculates the result according to the video The data calculation obtains the calculation result of the server.

可选的,所述处理器还用于:Optionally, the processor is also used for:

与所述客户端进行协商生成共享秘钥,所述共享秘钥用于对所述服务器和所述客户端之间的通信进行加密或解密。Negotiating with the client to generate a shared key, where the shared key is used to encrypt or decrypt communications between the server and the client.

可选的,与所述客户端进行协商生成共享秘钥包括:Optionally, negotiating with the client to generate a shared secret key includes:

根据所述当前视频的信息生成第一公私钥对,所述第一公私钥对包括第一公钥和第一私钥;向所述客户端发送所述第一公钥,以使得所述客户端根据所述第一公钥生成共享秘钥;根据所述第一公钥和第二公钥生成所述共享秘钥,所述第二公钥由所述客户端生成并发送。Generate a first public-private key pair according to the information of the current video, the first public-private key pair includes a first public key and a first private key; send the first public key to the client, so that the client The terminal generates a shared secret key according to the first public key; generates the shared secret key according to the first public key and a second public key, and the second public key is generated and sent by the client.

可选的,将所述视频数据发送给所述客户端包括:根据所述共享秘钥加密所述视频数据,得到加密后的视频数据;向所述客户端发送所述加密后的视频数据。Optionally, sending the video data to the client includes: encrypting the video data according to the shared key to obtain encrypted video data; and sending the encrypted video data to the client.

可选的,根据所述第一公钥和第二公钥生成共享秘钥之前,还包括:与所述客户端确定生成算法,所述生成算法用于生成所述共享秘钥。Optionally, before generating the shared secret key according to the first public key and the second public key, the method further includes: determining a generation algorithm with the client, and the generation algorithm is used to generate the shared secret key.

在具体实施过程中,处理器420执行计算机程序411时,可以实现图1对应的实施例中任一实施方式。In a specific implementation process, when the processor 420 executes the computer program 411, any implementation manner in the embodiment corresponding to FIG. 1 may be implemented.

由于本实施例所介绍的电子设备为实施本发明实施例中一种服务器所采用的设备,故而基于本发明实施例中所介绍的方法,本领域所属技术人员能够了解本实施例的电子设备的具体实施方式以及其各种变化形式,所以在此对于该电子设备如何实现本发明实施例中的方法不再详细介绍,只要本领域所属技术人员实施本发明实施例中的方法所采用的设备,都属于本发明所欲保护的范围。Since the electronic device introduced in this embodiment is a device used to implement a server 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 electronic device in this embodiment Specific implementation methods and various variations thereof, so how the electronic device implements the method in the embodiment of the present invention will not be described in detail here, as long as those skilled in the art implement the device used in the method in the embodiment of the present invention, All belong to the intended protection scope of the present invention.

请参阅图5,图5为本发明实施例提供的一种计算机可读存储介质的实施例示意图。Referring to FIG. 5 , FIG. 5 is a schematic diagram of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention.

如图5所示,本实施例提供了一种计算机可读存储介质500,其上存储有计算机程序511,该计算机程序511被处理器执行时实现如下步骤:根据客户端播放的当前视频获得视频数据;将所述视频数据发送给所述客户端,以使得所述客户端根据所述视频数据得到客户端计算结果;接收所述客户端发送的所述客户端计算结果;当所述客户端计算结果与服务器计算结果不同时,确定当前观看所述当前视频的记录为虚假记录,所述服务器计算结果为所述服务器根据所述视频数据计算得到服务器计算结果。As shown in FIG. 5 , this embodiment provides a computer-readable storage medium 500 on which a computer program 511 is stored. When the computer program 511 is executed by a processor, the following steps are implemented: obtain the video according to the current video played by the client. data; send the video data to the client, so that the client obtains the client calculation result according to the video data; receive the client calculation result sent by the client; when the client When the calculation result is different from the server calculation result, it is determined that the record currently watching the current video is a false record, and the server calculation result is a server calculation result calculated by the server according to the video data.

可选的,该计算机程序511被处理器执行时还用于实现如下步骤:Optionally, when the computer program 511 is executed by the processor, it is also used to implement the following steps:

与所述客户端进行协商生成共享秘钥,所述共享秘钥用于对所述服务器和所述客户端之间的通信进行加密或解密。Negotiating with the client to generate a shared key, where the shared key is used to encrypt or decrypt communications between the server and the client.

可选的,该计算机程序511被处理器执行时还用于实现如下步骤:根据所述当前视频的信息生成第一公私钥对,所述第一公私钥对包括第一公钥和第一私钥;向所述客户端发送所述第一公钥,以使得所述客户端根据所述第一公钥生成共享秘钥;根据所述第一公钥和第二公钥生成所述共享秘钥,所述第二公钥由所述客户端生成并发送。Optionally, when the computer program 511 is executed by the processor, it is also used to implement the following steps: generate a first public-private key pair according to the information of the current video, and the first public-private key pair includes the first public key and the first private key. key; send the first public key to the client, so that the client generates a shared secret according to the first public key; generates the shared secret according to the first public key and the second public key key, the second public key is generated and sent by the client.

可选的,该计算机程序511被处理器执行时还用于实现如下步骤:根据所述共享秘钥加密所述视频数据,得到加密后的视频数据;向所述客户端发送所述加密后的视频数据。Optionally, when the computer program 511 is executed by the processor, it is also used to implement the following steps: encrypt the video data according to the shared secret key to obtain encrypted video data; send the encrypted video data to the client. video data.

可选的,该计算机程序511被处理器执行时还用于实现如下步骤:与所述客户端确定生成算法,所述生成算法用于生成所述共享秘钥。Optionally, when the computer program 511 is executed by the processor, it is further configured to implement the following step: determine a generation algorithm with the client, and the generation algorithm is used to generate the shared secret key.

请参阅图6,为本发明实施例提供的另一种电子设备的实施例示意图。Please refer to FIG. 6 , which is a schematic diagram of an embodiment of another electronic device provided by an embodiment of the present invention.

如图6所示,本发明实施例提供了一种电子设备,包括存储器610、处理器620及存储在存储器620上并可在处理器620上运行的计算机程序611,处理器620执行计算机程序611时实现以下步骤:接收服务器发送的视频数据,所述视频数据为所述服务器根据所述客户端播放的当前视频获得;根据所述视频数据生成客户端计算结果;将所述客户端计算结果发送给所述服务器,以使得所述服务器根据所述客户端计算结果确定当前观看所述当前视频的记录是否为虚假记录。As shown in FIG. 6 , an embodiment of the present invention provides an electronic device, including a memory 610, a processor 620, and a computer program 611 stored in the memory 620 and operable on the processor 620, and the processor 620 executes the computer program 611 When realizing the following steps: receiving the video data sent by the server, the video data is obtained by the server according to the current video played by the client; generating a client calculation result according to the video data; sending the client calculation result to the server, so that the server determines whether the record of currently viewing the current video is a false record according to the calculation result of the client.

可选的,所述处理器620还用于执行:Optionally, the processor 620 is also configured to execute:

与所述服务器进行协商生成共享秘钥,所述共享秘钥用于对所述客户端和所述视频网服务器之间的通信进行加密或解密;Negotiating with the server to generate a shared secret key, the shared secret key is used to encrypt or decrypt the communication between the client and the video network server;

所述接收服务器发送的视频数据后,根据所述视频数据生成客户端计算结果之前,所述处理器620还用于执行:After the video data sent by the server is received, and before the calculation result of the client is generated according to the video data, the processor 620 is further configured to perform:

根据所述共享秘钥解密所述视频数据。Decrypt the video data according to the shared secret key.

在具体实施过程中,处理器620执行计算机程序611时,可以实现图1对应的实施例中任一实施方式。In a specific implementation process, when the processor 620 executes the computer program 611, any implementation manner in the embodiment corresponding to FIG. 1 may be implemented.

由于本实施例所介绍的电子设备为实施本发明实施例中一种客户端所采用的设备,故而基于本发明实施例中所介绍的方法,本领域所属技术人员能够了解本实施例的电子设备的具体实施方式以及其各种变化形式,所以在此对于该电子设备如何实现本发明实施例中的方法不再详细介绍,只要本领域所属技术人员实施本发明实施例中的方法所采用的设备,都属于本发明所欲保护的范围。Since the electronic device introduced in this embodiment is a device used by a client 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 electronic device of this embodiment and its various variants, so how the electronic device implements the method in the embodiment of the present invention will not be described in detail here, as long as those skilled in the art implement the device used in the method in the embodiment of the present invention , all belong to the intended protection scope of the present invention.

请参阅图7,图7为本发明实施例提供的一种计算机可读存储介质的实施例示意图。Please refer to FIG. 7, which is a schematic diagram of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention.

如图7所示,本实施例提供了一种计算机可读存储介质700,其上存储有计算机程序711,该计算机程序711被处理器执行时实现如下步骤:接收服务器发送的视频数据,所述视频数据为所述服务器根据所述客户端播放的当前视频获得;根据所述视频数据生成客户端计算结果;将所述客户端计算结果发送给所述服务器,以使得所述服务器根据所述客户端计算结果确定当前观看所述当前视频的记录是否为虚假记录。As shown in FIG. 7 , this embodiment provides a computer-readable storage medium 700 on which a computer program 711 is stored. When the computer program 711 is executed by a processor, the following steps are implemented: receiving video data sent by the server, the The video data is obtained by the server according to the current video played by the client; the client calculation result is generated according to the video data; Determine whether the record of currently viewing the current video is a false record based on the calculation result of the terminal.

可选的,该计算机程序711被处理器执行时实现如下步骤:Optionally, when the computer program 711 is executed by the processor, the following steps are implemented:

与所述服务器进行协商生成共享秘钥,所述共享秘钥用于对所述客户端和所述视频网服务器之间的通信进行加密或解密;Negotiating with the server to generate a shared secret key, the shared secret key is used to encrypt or decrypt the communication between the client and the video network server;

所述接收服务器发送的视频数据后,根据所述视频数据生成客户端计算结果之前,该计算机程序711被处理器执行时实现如下步骤:After the video data sent by the server is received, before the client calculation result is generated according to the video data, the computer program 711 is executed by the processor to implement the following steps:

根据所述共享秘钥解密所述视频数据。Decrypt the video data according to the shared secret key.

需要说明的是,在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详细描述的部分,可以参见其它实施例的相关描述。It should be noted that, in the foregoing embodiments, descriptions of each embodiment have their own emphases, and for parts that are not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can 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, etc.) 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 should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized 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 device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce a machine for A device for realizing the functions specified in one or more procedures of a flowchart and/or one or more blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is understood. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包括这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.

Claims (9)

1. An information processing method characterized by comprising:
the server obtains the video frame number of the current video and the current frame number information according to the current video played by the client;
the server generates a section of random data, randomly selects a video starting frame number from the playing time of the current video, and acquires the video frame number to be read from the current frame number information of the current video; packing the random data, the video starting frame number and the video frame number needing to be read as video data; the video data comprises random data, initial frame data and frame numbers required to be calculated;
the server sends the video data to a client so that the client can obtain a client calculation result according to the video starting frame number and the video frame number needing to be calculated;
the server receives the client-side calculation result sent by the client side;
and when the client calculation result is different from the server calculation result, the server determines that the current video watching record is a false record, and the server calculation result is obtained by the server according to the video data calculation.
2. The method of claim 1, further comprising:
the server and the client negotiate to generate a shared key, and the shared key is used for encrypting or decrypting communication between the server and the client.
3. The method of claim 2, wherein negotiating, by the server and the client, for generating a shared key comprises:
the server generates a first public and private key pair according to the information of the current video, wherein the first public and private key pair comprises a first public key and a first private key;
the server sends the first public key to the client, so that the client generates a shared secret key according to the first public key;
and the server generates the shared secret key according to the first public key and a second public key, and the second public key is generated and sent by the client.
4. The method of claim 2 or 3, wherein the server sending the video data to the client comprises:
the server encrypts the video data according to the shared secret key to obtain encrypted video data;
and the server sends the encrypted video data to the client.
5. An information processing method, characterized by comprising:
the client receives video data sent by the server; the server generates a section of random data, randomly selects a video starting frame number from the playing time of the current video, and acquires the video frame number to be read from the current frame number information of the current video; the video data is obtained by packaging the random data, the video starting frame number and the video frame number needing to be read by the server; the video data comprises random data, initial frame data and the number of frames to be calculated;
the client generates a client calculation result according to the video starting frame number and the video frame number needing to be calculated;
and the client sends the client calculation result to the server so that the server determines whether the current video watching record is a false record according to the client calculation result.
6. The method of claim 5, further comprising:
the client and the server negotiate to generate a shared secret key, and the shared secret key is used for encrypting or decrypting communication between the client and the server;
after the client receives the video data sent by the server, and before the client generates a client calculation result according to the video data, the method further comprises:
and the client decrypts the video data according to the shared secret key.
7. A server, comprising:
the obtaining unit is used for obtaining the video frame number of the current video and the current frame number information according to the current video played by the client;
the server generates a section of random data, randomly selects a video starting frame number from the playing time of the current video, and acquires the video frame number to be read from the current frame number information of the current video; packing the random data, the video starting frame number and the video frame number needing to be read as video data; the video data comprises random data, initial frame data and the number of frames to be calculated; the receiving and sending unit is used for sending the video data to a client so that the client can obtain a client calculation result according to the video starting frame number and the video frame number needing to be calculated;
the receiving and sending unit is also used for receiving the client-side calculation result sent by the client side;
and the determining unit is used for determining that the current video watching record is a false record when the client side calculation result is different from the server calculation result, and the server calculation result is obtained by the server according to the video data calculation.
8. A client, comprising:
the receiving and sending unit is used for receiving video data sent by the server, the server generates a section of random data, randomly selects a video starting frame number from the playing time of the current video, and acquires the video frame number to be read from the current frame number information of the current video; the video data is obtained by packaging the random data, the video starting frame number and the video frame number needing to be read by the server; the video data comprises random data, initial frame data and frame numbers required to be calculated;
the generating unit is used for generating a client computing result according to the video starting frame number and the video frame number needing to be computed;
the receiving and sending unit is further configured to send a client calculation result to the server, so that the server determines whether the current video watching record is a false record according to the client calculation result.
9. 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-6.
CN201810332146.4A 2018-04-13 2018-04-13 Information processing method and related equipment Active CN110380843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810332146.4A CN110380843B (en) 2018-04-13 2018-04-13 Information processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810332146.4A CN110380843B (en) 2018-04-13 2018-04-13 Information processing method and related equipment

Publications (2)

Publication Number Publication Date
CN110380843A CN110380843A (en) 2019-10-25
CN110380843B true CN110380843B (en) 2022-12-02

Family

ID=68242997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810332146.4A Active CN110380843B (en) 2018-04-13 2018-04-13 Information processing method and related equipment

Country Status (1)

Country Link
CN (1) CN110380843B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111259371B (en) * 2020-01-13 2023-08-18 平安科技(深圳)有限公司 Internet of things equipment authentication method, electronic device and storage medium
CN113595741B (en) * 2021-08-02 2023-04-07 杭州叙简科技股份有限公司 Credible data chain generation system and method based on 5G law enforcement recorder

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327016A (en) * 2013-06-06 2013-09-25 合一信息技术(北京)有限公司 Method and system for calculating and correcting abnormal playing amount of network streaming media
CN106651475A (en) * 2017-02-22 2017-05-10 广州万唯邑众信息科技有限公司 Method and system for identifying false traffic of mobile video advertisement
CN106789985A (en) * 2016-12-08 2017-05-31 武汉斗鱼网络科技有限公司 Client validation method and system based on GPU algorithms
CN107454110A (en) * 2017-09-26 2017-12-08 武汉斗鱼网络科技有限公司 A kind of data verification method and server
CN107566897A (en) * 2017-07-19 2018-01-09 北京奇艺世纪科技有限公司 A kind of discrimination method, device and the electronic equipment of video brush amount

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170171745A1 (en) * 2015-12-09 2017-06-15 Qualcomm Incorporated Privacy protection in wireless networks
CN106803997B (en) * 2017-03-14 2019-12-17 广州视源电子科技股份有限公司 system and method for detecting client playing state in audio and video live broadcast
CN107613314B (en) * 2017-10-09 2019-09-20 武汉斗鱼网络科技有限公司 A kind of method and device detecting brush popularity behavior in live streaming

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327016A (en) * 2013-06-06 2013-09-25 合一信息技术(北京)有限公司 Method and system for calculating and correcting abnormal playing amount of network streaming media
CN106789985A (en) * 2016-12-08 2017-05-31 武汉斗鱼网络科技有限公司 Client validation method and system based on GPU algorithms
CN106651475A (en) * 2017-02-22 2017-05-10 广州万唯邑众信息科技有限公司 Method and system for identifying false traffic of mobile video advertisement
CN107566897A (en) * 2017-07-19 2018-01-09 北京奇艺世纪科技有限公司 A kind of discrimination method, device and the electronic equipment of video brush amount
CN107454110A (en) * 2017-09-26 2017-12-08 武汉斗鱼网络科技有限公司 A kind of data verification method and server

Also Published As

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

Similar Documents

Publication Publication Date Title
CN107018432B (en) Media content licensing method and device
EP3346633B1 (en) Permission information management system, user terminal, proprietor terminal, permission information management method, and permission information management program
EP3557876A1 (en) Secret key providing method, video playback method, server and client
WO2017097041A1 (en) Data transmission method and device
CN108881966B (en) Information processing method and related equipment
CN104113409B (en) A key management method and system for a SIP video surveillance networking system
KR20060020688A (en) Improved safety certification channel
CN109754226B (en) Data management method, device and storage medium
CN118740517B (en) Method, device, equipment and medium for encrypted transmission of video data
CN108768920B (en) Recorded broadcast data processing method and device
TW202231014A (en) Message transmitting system, user device and hardware security module for use therein
CN108650526B (en) An identification method, computer equipment and storage medium
CN103237011B (en) Digital content encryption transmission method and server end
Frattolillo A buyer-friendly and mediated watermarking protocol for web context
CN110380843B (en) Information processing method and related equipment
JP2014522171A (en) System and method for obfuscated initial value of encryption protocol
CN110381342B (en) Information processing method and related equipment
WO2018227471A1 (en) Secure processing method and apparatus for biometric feature data, sensor, and terminal device
US8196214B2 (en) Method and apparatus for securing content using encryption with embedded key in content
CN108769748B (en) An information processing method and related equipment
CN108933766A (en) A kind of method and client improving device id safety
Wu et al. A flexible and lightweight user‐demand DRM system for multimedia contents over multiple portable device platforms
JP5784143B2 (en) Method and system for limited reception of digital content, and related terminals and subscriber devices
CN106790273B (en) Encryption storage method and device for streaming media data in distributed file system
CN118764668B (en) Video data interaction method, system and electronic device

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
TR01 Transfer of patent right

Effective date of registration: 20231222

Address after: 21032, 9th Floor, Building 2, Micro World, No. 23 Century Avenue, Liuwu New District, Lhasa, Tibet Autonomous Region, 850000

Patentee after: Tibet Zhaoxun Technology Engineering Co.,Ltd.

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20241202

Address after: X1614, No. 10302, Zone E, Airport International Business Center, Beidu Street Management Committee Area, Xixian New Area, Xi'an City, Shaanxi Province, 712000

Patentee after: Shaanxi Yiquhai Information Technology Co.,Ltd.

Country or region after: China

Address before: 21032, 9th Floor, Building 2, Micro World, No. 23 Century Avenue, Liuwu New District, Lhasa, Tibet Autonomous Region, 850000

Patentee before: Tibet Zhaoxun Technology Engineering Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right