CN108769718A - A kind of barrage verification method, computer equipment and storage medium - Google Patents

A kind of barrage verification method, computer equipment and storage medium Download PDF

Info

Publication number
CN108769718A
CN108769718A CN201810316801.7A CN201810316801A CN108769718A CN 108769718 A CN108769718 A CN 108769718A CN 201810316801 A CN201810316801 A CN 201810316801A CN 108769718 A CN108769718 A CN 108769718A
Authority
CN
China
Prior art keywords
barrage
fields
agreement
field
server
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.)
Granted
Application number
CN201810316801.7A
Other languages
Chinese (zh)
Other versions
CN108769718B (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 CN201810316801.7A priority Critical patent/CN108769718B/en
Publication of CN108769718A publication Critical patent/CN108769718A/en
Application granted granted Critical
Publication of CN108769718B publication Critical patent/CN108769718B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • H04N21/2351Processing of additional data, e.g. scrambling of additional data or processing content descriptors involving encryption of additional data
    • 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/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25875Management of end-user data involving end-user authentication
    • 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/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a kind of barrage verification method, computer equipment and storage medium, this method to include:Login protocol is sent to the barrage server that platform is broadcast live;If logining successfully, token fields, random field r and times fields that the barrage server returns are received;Generate barrage agreement;Times md5 is carried out to the random field r, field R is calculated;K fields are calculated according to token fields, the room number of direct broadcasting room, the timestamp of barrage agreement, the transmission times of barrage, barrage content and field R;K fields are encrypted;Encrypted k fields are added in the barrage agreement, and send the barrage agreement that encrypted k fields are added to the barrage server;If barrage is sent successfully, next random field r of barrage server transmission is received.As it can be seen that the application can have found disabled user by the verification of login protocol come timely, and illegal barrage agreement is identified by verifying k fields, enriches the mode of processing brush barrage.

Description

A kind of barrage verification method, computer equipment and storage medium
Technical field
The invention belongs to a kind of field of computer technology more particularly to barrage verification method, computer equipment and storages to be situated between Matter.
Background technology
Currently, live streaming is increasingly welcome by everybody.And barrage is then extraordinary interaction mode in live streaming.For example, In live streaming, spectators' main broadcaster can be made comments by sending barrage, be carried out with main broadcaster interactive.The barrage that any spectators send The direct broadcasting room all users it can be seen that.
However, the characteristics of having some disabled users, capable of being seen by all spectators using barrage, and it is constantly flat in live streaming Platform is advertised by sending barrage, for example, linking with live streaming Platform Server by establishing one and forging barrage and assist View carrys out brush barrage, and writes automatized script and carry out brush barrage.Existing way is to carry out barrage mistake at live streaming platform service end Filter and the identification of anti-brush, to stop the behavior of brush barrage.
As it can be seen that the prior art is relatively simple for the processing mode of brush barrage.
Invention content
The embodiment of the present application solves existing by a kind of barrage verification method of offer, computer equipment and storage medium In technology, for the problem that the processing mode of brush barrage is relatively simple.
In a first aspect, the embodiment of the present application provides a kind of barrage verification method, the method is applied to client device, The method includes:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, The barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room is by the barrage service Device, which is sent, obtains the agreement of room information to obtain, and the transmission times of the barrage is that barrage sends successful number, according to institute The barrage transmission success message for stating the return of barrage server is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k is added The barrage agreement of field;
If barrage is sent successfully, receive next random field r that the barrage server is sent, it is described it is next with Machine field r is used to calculate the k fields of next barrage agreement.
Optionally, described according to the token fields, the hair of the room number of direct broadcasting room, the timestamp of barrage agreement, barrage It includes calculating k fields according to following formula to send number, barrage content and the field R to calculate k fields:
K=md5.create (token+roomid+ts+no+content+R);
Wherein, md5.create is the calculating interface of hash algorithm md5;
Token is the token fields;
Roomid is the room number of the direct broadcasting room;
Ts is the timestamp of the barrage agreement;
No is the transmission times of the barrage;
Content is the barrage content;
R is that the random field r carries out the result that times md5 is calculated.
Optionally, described that the k fields are encrypted, including the k fields are encrypted according to following formula:
Encryptk=TEA.encrypt (r, ts)
Wherein TEA.encrypt is the encryption interface of Encryption Algorithm tea;
R is the random field r;
Ts is the timestamp of the barrage agreement;
Encryptk is the encrypted result of the k fields.
Second aspect, present invention also provides a kind of barrage verification methods, which is characterized in that the method is applied to live streaming The barrage server of platform, the method includes:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
Judge the difference of the timestamp of the barrage agreement and the timestamp of the barrage server whether in presetting range It is interior, if so, the encrypted k fields are decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R are to carry out times md5 to the random field r to calculate As a result, the configuration file is the random field r, the correspondence of the times fields and the field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, Barrage content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to described Client device sends next random field r.
Optionally, described according to the token fields, timestamp, the barrage of the room number of direct broadcasting room, the barrage agreement Transmission times, to calculate k fields include calculating k fields according to following formula by barrage content and the field R:
K=md5.create (token+roomid+ts+no+content+R);
Wherein, md5.create is the calculating interface of hash algorithm md5;
Token is the token fields;
Roomid is the room number of the direct broadcasting room;
Ts is the timestamp of the barrage agreement;
No is the transmission times of the barrage;
Content is the barrage content;
R is that the random field r carries out the result that times md5 is calculated.
Optionally, described that the encrypted k fields are decrypted, include according to following formula to obtain k fields The encrypted k fields are decrypted, to obtain k fields:
K=TEA.decrypt (r, encryptk);
Wherein, TEA.decrypt is the decryption interface of the Encryption Algorithm of TEA;
R is the random field r;
Encryptk is the encrypted k fields.
The third aspect, present invention also provides a kind of computer readable storage medium, the computer readable storage medium It is stored with computer program, which is characterized in that the computer program realizes following steps when being executed by processor:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, The barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room is by the barrage service Device, which is sent, obtains the agreement of room information to obtain, and the transmission times of the barrage is that barrage sends successful number, according to institute The barrage transmission success message for stating the return of barrage server is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k is added The barrage agreement of field;
If barrage is sent successfully, receive next random field r that the barrage server is sent, it is described it is next with Machine field r is used to calculate the k fields of next barrage agreement.
Fourth aspect present invention also provides a kind of computer equipment, including processor, memory and is stored in storage On device and the computer program that can run on a processor, which is characterized in that when the processor executes the computer program Realize following steps:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, The barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room is by the barrage service Device, which is sent, obtains the agreement of room information to obtain, and the transmission times of the barrage is that barrage sends successful number, according to institute The barrage transmission success message for stating the return of barrage server is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k is added The barrage agreement of field;
If barrage is sent successfully, receive next random field r that the barrage server is sent, it is described it is next with Machine field r is used to calculate the k fields of next barrage agreement.
5th aspect, present invention also provides a kind of computer readable storage medium, the computer readable storage medium It is stored with computer program, which is characterized in that the computer program realizes following steps when being executed by processor:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
Judge the difference of the timestamp of the barrage agreement and the timestamp of the barrage server whether in presetting range It is interior, if so, the encrypted k fields are decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R are to carry out times md5 to the random field r to calculate As a result, the configuration file is the random field r, the correspondence of the times fields and the field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, Barrage content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to described Client device sends next random field r.
6th aspect present invention also provides a kind of computer equipment, including processor, memory and is stored in storage On device and the computer program that can run on a processor, which is characterized in that when the processor executes the computer program Realize following steps:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
Judge the difference of the timestamp of the barrage agreement and the timestamp of the barrage server whether in presetting range It is interior, if so, the encrypted k fields are decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R are to carry out times md5 to the random field r to calculate As a result, the configuration file is the random field r, the correspondence of the times fields and the field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, Barrage content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to described Client device sends next random field r.
In the embodiment of the present application, client device sends login protocol to the barrage server of live streaming platform;Barrage service Device verifies login protocol, is verified, then logins successfully, the barrage server to client return token fields, Random field r and times field;Client device generates barrage agreement;Times md5 meter is carried out to the random field r It calculates, to obtain field R;Client device according to the token fields, the room number of direct broadcasting room, barrage agreement timestamp, Transmission times, barrage content and the field R of barrage calculate k fields, and the k fields are encrypted;It is assisted in the barrage Encrypted k fields are added in view, and send the barrage agreement that encrypted k fields are added to the barrage server;Barrage After server receives barrage agreement, the difference of the timestamp of the barrage agreement and the timestamp of the barrage server is first judged Whether value is in presetting range, if so, the encrypted k fields are decrypted, to obtain k fields;Again in configuration text Lookup Field R in part, the field R are to the times md5 calculating of random field r progress as a result, the configuration file For the random field r, the correspondence of the times fields and the field R;Then according to token fields, direct broadcasting room Room number, the timestamp of the barrage agreement, the transmission times of barrage, barrage content and field R calculate k fields;Judge Whether the k fields that decryption obtains and the k fields that barrage server is voluntarily calculated are consistent, if so, being verified, Ke Yi Direct broadcasting room plays the barrage content, and sends next random field r to the client device, and client device can basis Next random field r calculates the k fields of next barrage agreement.As it can be seen that the embodiment of the present application can pass through login protocol Verification to find disabled user in time, and identifies illegal barrage agreement by verifying k fields, enriches processing brush barrage Mode.
In addition, since md5 calculating can consume certain cpu resources, and the times number the big, the cpu resource consumed More, times scheme that MD5 calculating is carried out to random field r of the embodiment of the present application can consume the automatized script write Cpu resource, make illegality equipment that can not generate a large amount of check field simultaneously, to cannot achieve batch brush barrage row For.Further, the random field r of barrage server is issued, and is also enhanced barrage server and is generated k words for client device The control of section, client generate k fields each time, it is necessary to rely on the random field r of barrage server return.
Description of the drawings
Fig. 1 is the flow chart of the barrage verification method provided in the embodiment of the present application;
Fig. 2 is the flow chart of another barrage verification method provided in the embodiment of the present application;
Fig. 3 is the interaction figure of the barrage verification method provided in the embodiment of the present application;
Fig. 4 is the structural schematic diagram of the computer readable storage medium provided in the embodiment of the present application;
Fig. 5 is the structural schematic diagram of the computer equipment provided in the embodiment of the present application;
Fig. 6 is the structural schematic diagram of another computer readable storage medium provided in the embodiment of the present application;
Fig. 7 is the structural schematic diagram of another computer equipment provided in the embodiment of the present application;
Specific implementation mode
The embodiment of the present application provides a kind of barrage verification method, computer equipment and storage medium, solves existing skill In art, for the problem that the processing mode of brush barrage is relatively simple.The embodiment of the present application can by the verification of login protocol come Disabled user is found in time, and identifies illegal barrage agreement by verifying k fields, enriches the mode of processing brush barrage.
In order to better understand the above technical scheme, below in conjunction with attached drawing and specific embodiment, to above-mentioned technical proposal It is further elaborated.It should be appreciated that specific embodiment described herein is not used to limit only to explain the application Determine the application.Meanwhile the technical solution in the embodiment of the present invention is introduced for convenience, it hereafter will be based on the bullet including platform is broadcast live The network structure of curtain server and client side's equipment is described, and is not used to limit the application, wherein client device and bullet Curtain server is attached by Transmission Control Protocol.It is understood that function name or name variable that the embodiment of the present application uses Deng, be not used to limit the application can also use other names mode in some other possible realization methods.
Embodiment one:
Referring to Fig. 1, a kind of barrage verification method provided in this embodiment, the method is applied to client device, institute The method of stating includes the following steps:
S101, login protocol is sent to the barrage server that platform is broadcast live;
If S102, logining successfully, token fields, the random field r and times that the barrage server returns are received Field;
S103, barrage agreement is generated;
Wherein, the barrage agreement includes the timestamp of barrage content and barrage agreement.
S104, times md5 calculating is carried out to the random field r, to obtain field R;
S105, according to the token fields, the transmission time of the room number of direct broadcasting room, the timestamp of barrage agreement, barrage Number, barrage content and the field R calculate k fields;
Wherein, the room number of the direct broadcasting room is obtained by sending the agreement of acquisition room information to the barrage server Take, the transmission times of the barrage is that barrage sends successful number, according to the barrage that the barrage server returns send at Work(message is calculated, initial value 0.
S106, the k fields are encrypted;
S107, encrypted k fields are added in the barrage agreement, and are sent to the barrage server and encryption is added The barrage agreement of k fields afterwards;
If S108, barrage are sent successfully, next random field r that the barrage server is sent is received, under described One random field r is used to calculate the k fields of next barrage agreement.
As it can be seen that the present embodiment increases login protocol in client device side, and k words are added in barrage agreement Section distinguishes disabled user and illegal barrage agreement with this, enriches the mode of processing brush barrage.
It is the barrage verification method based on client device above, is based on same inventive concept, present invention also provides another A kind of barrage verification method, this method are applied to the barrage server of live streaming platform, refer to Fig. 2, below in conjunction with Fig. 2 to implementing Example two is introduced.
Embodiment two:
Referring to Fig. 2, a kind of barrage verification method provided in this embodiment, the method is applied to the barrage of live streaming platform Server the described method comprises the following steps:
S201, the login protocol that client device is sent is received;
If S202, logining successfully, token fields, random field r and times fields are returned to the client device;
S203, the barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
S204, the timestamp for judging the barrage agreement and the timestamp of the barrage server difference whether preset In range, if so, the encrypted k fields are decrypted, to obtain k fields;
S205, the Lookup Field R in configuration file;
The field R is to carry out that times md5 is calculated to the random field r as a result, the configuration file is described The correspondence of random field r, the times fields and the field R;
S206, according to the token fields, the room number of direct broadcasting room, the barrage agreement timestamp, barrage transmission Number, barrage content and the field R calculate k fields;
S207, judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and Next random field r is sent to the client device.
As it can be seen that verification that the present embodiment increases login protocol in barrage server side and k fields in barrage agreement Verification distinguishes disabled user and illegal barrage agreement with this, enriches the mode of processing brush barrage.
The barrage authentication that the barrage verification method and the embodiment of the present application one that the embodiment of the present application two provides provide is owned by France In same design, the application, interacts below in conjunction with Fig. 3 between client device and barrage server in order to better understand Angle be described in detail, see embodiment three.
Embodiment three:
It is tested referring to Fig. 3, the angle that the present embodiment is interacted from client device with barrage server provides a kind of barrage Card method, the described method comprises the following steps:
S301, client device send login protocol to the barrage server of live streaming platform;
Correspondingly, barrage server receives the login protocol that client device is sent.
Specifically, the client device of the barrage server for being successfully linked to live streaming platform by TCP, client are set It is standby actively to be logged in by account number cipher.Client device sends login protocol to the barrage server of live streaming platform, barrage service Whether device judges the legitimacy of the log-on message of client device, and be registration user, if log-on message it is illegal or It is not registration user, then login failure, barrage server can actively disconnect the link, to false client or non-registered use Family will be unable to send barrage in live streaming platform.Moreover, login protocol can pass through the account number cipher of user complicated encrypted authentication, Barrage server can then check the login encrypted authentication of user, if verification is correct, logins successfully, illustrate that client is set Standby is legitimate client end equipment, can just carry out subsequent transmission barrage function.
It should also be noted that, client device includes but not limited to mobile phone, tablet computer, desktop computer, PDA The equipment such as (Personal Digital Assistant, personal digital assistant), vehicle-mounted computer, smartwatch.
If S302, logining successfully, client device receives token fields, the random field r that the barrage server returns And times fields;
If correspondingly, login successfully, barrage server to the client device return token fields, random field r with And times fields.
Token (token) be can verification client device whether be effectively that live streaming platform registers the user logged in, And token can ensure that its token value of different users is different.In the present embodiment, token fields will be added to In the calculating of barrage verifying field, to ensure different users, the verifying field finally calculated is different.
Random field r is the random number generated by barrage server, specifically, can pass through the random letter of calling system One 16 random numbers that number generates, and corresponding this data of the client device records, meanwhile, barrage server can return The multiple login to client device returns in message and carries this random field r in subsequent transmission barrage agreement, so that Client device can use different random field r to calculate k fields when sending barrage agreement every time.As it can be seen that client Equipment sends barrage every time can not complete alone the calculating of verifying field, it is necessary to could be complete by the verifying field that issues of server At the calculating of the verifying field of barrage next time, the ability of barrage server controls client device is greatly enhanced.
It gives one example, the indentification protocol that existing barrage server replys client device is as follows, which includes bullet Curtain sends success message or barrage sends failed message, may also be referred to as barrage and sends agreement, the agreement is for notifying client Whether equipment barrage sends success:
@=0/ type@=chatres/len=50/code
Wherein type@=chatres are then the type of messages that server is replied;
Wherein len=50 is then the content-length of entire barrage agreement;
Wherein code@=0 indicate this barrage and send successfully.
The present embodiment increases the field information that a barrage server issues, i.e., random field r, for visitor in this agreement When the transmission next time barrage of family end, in the verification calculating for participating in barrage agreement.
The present embodiment is sent to each the barrage agreement of barrage server, and all one 16 bit length of generation is random Number, and add it in the indentification protocol for replying to client device.Specific implementation can use function R=rand (), bullet Curtain server calls system random function generates one 16 random numbers, and to this data of the client device records, together When carry this field information in the existing indentification protocol for replying to client, give one example, increase testing after random field r It is as follows to demonstrate,prove agreement:
Type@=chatres/len=50/code@=0/r@=48ac3dbca9823456/
Simultaneously as first barrage agreement of client is the barrage agreement that no server replys indentification protocol, institute When logging in barrage server by client device with the random field r of first barrage agreement, barrage server is logging in return Message in carry this field.
In addition, the present embodiment also adds a times field for informing calculating of the client device to random field r Number.
S303, client device generate barrage agreement;
Wherein, the barrage agreement includes the timestamp of barrage content and barrage agreement.It is understood that the barrage is assisted View is existing barrage agreement, and for example, existing barrage agreement is as follows:
Type@=chatmessage/content@=666/style@=/@=1520128375/ ts
Wherein " type@=chatmessage " indicates that this agreement is to send the agreement of barrage.
Wherein "@=666 content " indicate that this barrage content is " 666 ".
Wherein " style@=" indicates the pattern of this barrage, color size etc..
Wherein "@=1520128375 ts " indicate the timestamp information of this barrage agreement.
The present embodiment then increases a verifying field k field in existing barrage agreement, for verifying barrage agreement Legitimacy.
S304, client device carry out times md5 to the random field r and calculate, to obtain field R;
Specifically, client device gets the value of times fields.
Then to the content of random field r compute repeatedly the MD5 values of times number according to the value of times fields, It can be by writing a for cycle, cycle-index is times, such as:
For (int i=0;i<times;i++)
R=md5.create (r);
Cycle is all to calculate md5 values to random field r, and the md5 results of last computation are as calculating next time every time Input, to finally obtain field R, i.e., random field r calculates the md5 values of times number.One can be consumed due to calculating md5 Fixed cpu resources, to which the times times several the big, the cpu resource consumed is more.
S305, client device are according to the token fields, the room number of direct broadcasting room, the timestamp of barrage agreement, barrage Transmission times, barrage content and the field R calculate k fields;
Specifically, k fields can be calculated by the following formula:
K=md5.create (token+roomid+ts+no+content+R);
Wherein, md5.create is the calculating interface of hash algorithm md5, uses MD5 to calculate k fields in the present embodiment, most 32 verifying fields of a regular length are obtained eventually, it is to be understood that, can also in some possible realization methods Other algorithms are selected, do not do too many restriction herein;
Token is the token fields, wherein token is added, different users may be implemented, the verification finally calculated Field is different;
Roomid is the room number of the direct broadcasting room, wherein the room number of direct broadcasting room is added, the same use may be implemented Family, the same barrage content, synchronization are different in the final verifying field of different direct broadcasting rooms, specifically, described The room number of direct broadcasting room is obtained by sending the agreement of acquisition room information to the barrage server;
Ts is the timestamp of the barrage agreement, can be obtained from barrage agreement, wherein in the same barrage Hold, the same user, the time of barrage agreement is added in verifying field, when can ensure different by the same live streaming room The final verifying field carved is different;
No is the transmission times of the barrage, it is to be understood that the transmission times of barrage refers to being successfully transmitted barrage Number, is often successfully transmitted a barrage, and no adds 1.Specifically, after barrage is sent successfully, the transmission times of barrage can basis The barrage that barrage server returns sends success message and is calculated, initial value 0, often receives a barrage server and returns Barrage send success message, the barrage calculated value no of client device can then add 1, correspondingly, barrage server also has record The transmission times of barrage, after barrage is sent successfully, the barrage calculated value no of barrage server can also add 1.
In addition, due to client device can not ensure completely with the time of barrage server it is consistent, it is common to do Rule is a certain range of compatible processing of timestamp progress of the transmission barrage reported to client device, as long as barrage agreement The difference of the timestamp of timestamp and barrage server is in presetting range, and it is legal to be regarded as, therefore, for illegal brush bullet For curtain, this point can be utilized, whithin a period of time, using the timestamp of same barrage agreement, to bypass different moments Verification, the transmission times of barrage is added, can be to avoid using the timestamp of same barrage agreement, when to bypass different The case where verification at quarter;
Content is the barrage content, i.e., the barrage content that the described barrage agreement is ready for sending, can be from barrage agreement Middle acquisition.
R is that the random field r carries out the result that times md5 is calculated.
The k fields are encrypted in S306, client device;
In order to further be protected to k fields, the present embodiment is taken carries out one-time pad encryption again to k fields, thus into The safety of the raising data transmission of one step, and the threshold that is cracked.For live streaming platform, total barrage amount is huge , and the barrage amount that synchronization barrage server receives is also huge, if using complicated encrypted authentication algorithm, most It can lead to the performance bottleneck of barrage server eventually, to cause bigger calculating pressure to barrage server.Therefore, it can adopt It is calculated with the Encryption Algorithm of lightweight decryption is encrypted to data.In the present embodiment, using TEA Encryption Algorithm come to final K fields further encrypted, be not used to limit the application can also be selected in some possible realization methods Other cipher modes.In addition, in order to ensure that encrypted result changes every time, the present embodiment uses r, as Encryption Algorithm The key values of TEA.
Specifically, encryptk=TEA.encrypt (r, ts);
Wherein TEA.encrypt is the encryption interface of Encryption Algorithm tea;
R is the random field r;
Ts is the timestamp of the barrage agreement;
Encryptk is the encrypted result of the k fields.
Encrypted k fields are added in S307, client device in the barrage agreement, and are sent out to the barrage server Send the barrage agreement that encrypted k fields are added;
Specifically, step S307 can be divided into S307a and S307b:
Encrypted k fields are added in S307a, client in the barrage agreement;
In view of the function to existing barrage agreement and the compatibility of client different editions, the present embodiment need not be changed existing Some barrage agreements, but k fields are added to by way of increasing a field in existing barrage agreement.
S307b, client device send the barrage agreement that encrypted k fields are added to the barrage server;
Correspondingly, barrage server receives the barrage agreement that client device is sent, the barrage agreement includes after encrypting K fields;
S308, barrage server judge the difference of the timestamp of the barrage agreement and the timestamp of the barrage server Whether in presetting range, if so, the encrypted k fields are decrypted, to obtain k fields;
The illegal one's share of expenses for a joint undertaking of brush barrage bypasses inspection policy in order to prevent, and uses fixed barrage Protocol Timestamp, this reality It applies regular meeting to verify the timestamp in current barrage agreement, barrage server can obtain the timestamp of barrage server, sentence Whether the difference of the timestamp of the disconnected barrage server and the timestamp of the barrage agreement of client device is in presetting range, such as Fruit is then to illustrate that the timestamp information of client device is legal, otherwise illegal.Preferably, presetting range can be 5 minutes. If difference in presetting range, is decrypted the encrypted k fields, to obtain original k fields.
Specifically, the encrypted k fields can be decrypted by following formula:
K=TEA.decrypt (r, encryptk);
Wherein, TEA.decrypt is the decryption interface of the Encryption Algorithm of TEA;
R is the random field r;
Encryptk is the encrypted k fields.
It is understood that the decipherment algorithm of barrage server is corresponding with the Encryption Algorithm of client.
S309, barrage server Lookup Field R in configuration file;
The field R is to carry out that times md5 is calculated to the random field r as a result, the configuration file is described The correspondence of random field r, the times fields and the field R.
In order to reduce the calculating pressure of barrage server, barrage server can generate random data in advance, then to The MD5 operations that machine data carry out times number obtain field R, then by random field r, times field, corresponding with field R Relationship is saved in configuration file, is all calculated random field r after need not receiving barrage agreement every time to barrage server The md5 values of times number, and only need the field R from configuration file by random field r and times fields.
Hacker obtains all configurations of barrage server by the method for exhaustion in order to prevent simultaneously, and barrage server can timing Replacement entirely configure content, issued by regenerating a configuration.
S310, barrage server according to the token fields, the room number of direct broadcasting room, the barrage agreement timestamp, Transmission times, barrage content and the field R of barrage calculate k fields;
Barrage server can use the method as client to calculate original k field informations.Client device meter Calculation k fields are that token+roomid+ts+no+content+R has been used to calculate its MD5 together as a result, and barrage server is also adopted It is carried out calculating k fields with same method.Wherein, token is to be handed down to client by barrage server, so barrage service Device stores the token values of client device.Barrage server has recorded the straight of client device when client device logs in Room number between broadcasting, so barrage server has the room number roomid of the direct broadcasting room of client device.Barrage server The barrage number that client device transmission can be recorded, to which barrage server also has time for similarly sending barrage with client Number no.Content is the barrage content that client is sent, and barrage server can be obtained from the barrage agreement that client is sent It arrives.Likewise, the timestamp ts of barrage agreement can also be obtained from barrage agreement.Field R can be searched in configuration file. All field barrage servers to calculate k fields all have, then can calculate original k using same md5 algorithms Field.
K=md5.create (token+roomid+ts+no+content+R);
Wherein, md5.create is the calculating interface of hash algorithm md5;
Token is the token fields;
Roomid is the room number of the direct broadcasting room;
Ts is the timestamp of the barrage agreement;
No is the transmission times of the barrage;
Content is the barrage content.
R is that the random field r carries out the result that times md5 is calculated.
S311, judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and Next random field r is sent to the client device.
Step S311 can be divided into S311a and S311b again, as follows respectively:
S311a, judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, being verified;
After k fields have been calculated, barrage server can compare the k fields that barrage server calculates and the k reported from client Whether field is consistent, that is, whether the k fields decrypted and the k fields being calculated are consistent, and the bullet is illustrated if inconsistent Curtain agreement is illegal, otherwise it is assumed that the barrage agreement is legal, is verified.
It is calculated by same md5, to which indirectly to the token of client, room number, timestamp, barrage sends secondary Number, barrage content and field R are verified, only client with barrage server is all consistent can just finally obtain same k Field.
S311b, barrage server send next random field r to the client device.
Correspondingly, if barrage is sent successfully, client device receives next random field r that barrage server is sent, Next random field r is used to calculate the k fields of next barrage agreement, to reciprocation cycle.Wherein, barrage server can be with This random field r is carried in the transmission barrage agreement for replying to client device, which is also used for notice client simultaneously Equipment barrage sends successful message.It is understood that the generation to random field r and the calculating of k fields above and Verification is described in detail, and the generation of follow-up each random field r and the calculating of each k fields are similar with verification process, Details are not described herein again.
It should also be noted that, when platform being broadcast live carrying out some major issue race activities, barrage amount can be usually barrage More times of amount, it is contemplated that the performance pressures of barrage server can neatly choose whether to be verified according to actual conditions, or Person is verified by the way of sampling observation, since the present embodiment does not change existing barrage agreement, but increases a verifying field, So barrage server is not verified verifying field, and any calculation amount will not be increased.To which barrage server can be light The original barrage agreement of compatibility and increase the barrage agreement of verification.
In the embodiment of the present application, client device sends login protocol to the barrage server of live streaming platform;Barrage service Device verifies login protocol, is verified, then logins successfully, the barrage server to client return token fields, Random field r and times field;Client device generates barrage agreement;Times md5 meter is carried out to the random field r It calculates, to obtain field R;Client device according to the token fields, the room number of direct broadcasting room, barrage agreement timestamp, Transmission times, barrage content and the field R of barrage calculate k fields, and the k fields are encrypted;It is assisted in the barrage Encrypted k fields are added in view, and send the barrage agreement that encrypted k fields are added to the barrage server;Barrage After server receives barrage agreement, the difference of the timestamp of the barrage agreement and the timestamp of the barrage server is first judged Whether value is in presetting range, if so, the encrypted k fields are decrypted, to obtain k fields;Again in configuration text Lookup Field R in part, the field R are to the times md5 calculating of random field r progress as a result, the configuration file For the random field r, the correspondence of the times fields and the field R;Then according to token fields, direct broadcasting room Room number, the timestamp of the barrage agreement, the transmission times of barrage, barrage content and field R calculate k fields;Judge Whether the k fields that decryption obtains and the k fields that barrage server is voluntarily calculated are consistent, if so, being verified, Ke Yi Direct broadcasting room plays the barrage content, and sends next random field r to the client device, and client device can basis Next random field r calculates the k fields of next barrage agreement.As it can be seen that the embodiment of the present application can pass through login protocol Verification to find disabled user in time, and identifies illegal barrage agreement by verifying k fields, enriches processing brush barrage Mode.
In addition, since md5 calculating can consume certain cpu resources, and the times number the big, the cpu resource consumed More, times scheme that MD5 calculating is carried out to random field r of the embodiment of the present application can consume the automatized script write Cpu resource, make illegality equipment that can not generate a large amount of check field simultaneously, to cannot achieve batch brush barrage row For.Further, the random field r of barrage server is issued, and is also enhanced barrage server and is generated k words for client device The control of section, client generate k fields each time, it is necessary to rely on the random field r of barrage server return.
Based on same inventive concept, this application provides a kind of computer readable storage mediums, refer to Fig. 4, below will knot Fig. 4 is closed example IV is introduced.
Example IV:
A kind of computer readable storage medium 400 is present embodiments provided, the computer readable storage medium 400 stores There are computer program 411, the computer program 411 to realize following steps when being executed by processor:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, The barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room is by the barrage service Device, which is sent, obtains the agreement of room information to obtain, and the transmission times of the barrage is that barrage sends successful number, according to institute The barrage transmission success message for stating the return of barrage server is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k is added The barrage agreement of field;
If barrage is sent successfully, receive next random field r that the barrage server is sent, it is described it is next with Machine field r is used to calculate the k fields of next barrage agreement.
In specific implementation process, when which is executed by processor, may be implemented in above-described embodiment by All steps that client device executes, details are not described herein again.
Based on same inventive concept, present invention also provides a kind of computer equipments, refer to Fig. 5, below in conjunction with Fig. 5 pairs Embodiment five is introduced.
Embodiment five:
This application provides a kind of computer equipment 500, including processor 520, memory 510 and it is stored in memory On 510 and the computer program 511 that can be run on processor 520, the processor 520 execute the computer program 511 Shi Shixian following steps:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, The barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room is by the barrage service Device, which is sent, obtains the agreement of room information to obtain, and the transmission times of the barrage is that barrage sends successful number, according to institute The barrage transmission success message for stating the return of barrage server is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k is added The barrage agreement of field;
If barrage is sent successfully, receive next random field r that the barrage server is sent, it is described it is next with Machine field r is used to calculate the k fields of next barrage agreement.
In specific implementation process, computer equipment 500 includes but not limited to client device, the computer equipment 500 All steps executed by client device in above-described embodiment may be implemented, details are not described herein again.
Based on same inventive concept, this application provides a kind of computer readable storage mediums, refer to Fig. 6, below will knot Fig. 6 is closed embodiment six is introduced.
Embodiment six:
A kind of computer readable storage medium 600 is present embodiments provided, the computer readable storage medium 600 stores There are computer program 611, the computer program 611 to realize following steps when being executed by processor:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
Judge the difference of the timestamp of the barrage agreement and the timestamp of the barrage server whether in presetting range It is interior, if so, the encrypted k fields are decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R are to carry out times md5 to the random field r to calculate As a result, the configuration file is the random field r, the correspondence of the times fields and the field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, Barrage content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to described Client device sends next random field r.
In specific implementation process, when which is executed by processor, may be implemented in above-described embodiment by All steps that barrage server executes, details are not described herein again.
Based on same inventive concept, present invention also provides a kind of computer equipments, refer to Fig. 7, below in conjunction with Fig. 7 pairs Embodiment seven is introduced.
Embodiment seven:
This application provides a kind of computer equipment 700, including processor 720, memory 710 and it is stored in memory On 710 and the computer program 711 that can be run on processor 720, the processor 720 execute the computer program 711 Shi Shixian following steps:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
Judge the difference of the timestamp of the barrage agreement and the timestamp of the barrage server whether in presetting range It is interior, if so, the encrypted k fields are decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R are to carry out times md5 to the random field r to calculate As a result, the configuration file is the random field r, the correspondence of the times fields and the field R;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage transmission times, Barrage content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to described Client device sends next random field r.
In specific implementation process, computer equipment 700 includes but not limited to barrage server, the computer equipment 700 All steps executed by barrage server in above-described embodiment may be implemented, details are not described herein again.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, the application can be used in one or more wherein include computer usable program code computer The computer program product implemented in usable storage medium (including but not limited to magnetic disk storage CD-ROM, optical memory etc.) Form.
The application is with reference to method, the flow of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out the application essence of the various modification and variations without departing from the present invention God and range.In this way, if these modifications and variations of the application belong to the range of the application claim and its equivalent technologies Within, then the application is also intended to include these modifications and variations.

Claims (10)

1. a kind of barrage verification method, which is characterized in that the method is applied to client device, the method includes:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the transmission times, described of the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage Barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room to the barrage server by sending out It send and obtains the agreement of room information to obtain, the transmission times of the barrage is that barrage sends successful number, according to the bullet The barrage that curtain server returns sends success message and is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k fields is added Barrage agreement;
If barrage is sent successfully, next random field r that the barrage server is sent, next random words are received Section r is used to calculate the k fields of next barrage agreement.
2. the method as described in claim 1, which is characterized in that it is described according to the token fields, direct broadcasting room room number, It includes according to following public affairs that the timestamp of barrage agreement, the transmission times of barrage, barrage content and the field R, which calculate k fields, Formula calculates k fields:
K=md5.create (token+roomid+ts+no+content+R);
Wherein, md5.create is the calculating interface of hash algorithm md5;
Token is the token fields;
Roomid is the room number of the direct broadcasting room;
Ts is the timestamp of the barrage agreement;
No is the transmission times of the barrage;
Content is the barrage content;
R is that the random field r carries out the result that times md5 is calculated.
3. method as claimed in claim 1 or 2, which is characterized in that it is described that the k fields are encrypted, including according to The k fields are encrypted in lower formula:
Encryptk=TEA.encrypt (r, ts)
Wherein TEA.encrypt is the encryption interface of Encryption Algorithm tea;
R is the random field r;
Ts is the timestamp of the barrage agreement;
Encryptk is the encrypted result of the k fields.
4. a kind of barrage verification method, which is characterized in that the method is applied to the barrage server of live streaming platform, the method Including:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
The difference of the timestamp of the barrage agreement and the timestamp of the barrage server is judged whether in presetting range, if It is the encrypted k fields to be decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R be to the random field r carry out times md5 calculating as a result, The configuration file be the random field r, the times fields and the field R correspondence;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, the transmission times of barrage, barrage Content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to the client End equipment sends next random field r.
5. according to the method described in claim 4, it is characterized in that, described according to the token fields, the room of direct broadcasting room Number, to calculate k fields include basis by the transmission times of the timestamp of the barrage agreement, barrage, barrage content and the field R Following formula calculates k fields:
K=md5.create (token+roomid+ts+no+content+R);
Wherein, md5.create is the calculating interface of hash algorithm md5;
Token is the token fields;
Roomid is the room number of the direct broadcasting room;
Ts is the timestamp of the barrage agreement;
No is the transmission times of the barrage;
Content is the barrage content;
R is that the random field r carries out the result that times md5 is calculated.
6. method according to claim 4 or 5, which is characterized in that it is described that the encrypted k fields are decrypted, Include that the encrypted k fields are decrypted according to following formula to obtain k fields, to obtain k fields:
K=TEA.decrypt (r, encryptk);
Wherein, TEA.decrypt is the decryption interface of the Encryption Algorithm of TEA;
R is the random field r;
Encryptk is the encrypted k fields.
7. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist In the computer program realizes following steps when being executed by processor:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the transmission times, described of the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage Barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room to the barrage server by sending out It send and obtains the agreement of room information to obtain, the transmission times of the barrage is that barrage sends successful number, according to the bullet The barrage that curtain server returns sends success message and is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k fields is added Barrage agreement;
If barrage is sent successfully, next random field r that the barrage server is sent, next random words are received Section r is used to calculate the k fields of next barrage agreement.
8. a kind of computer equipment, including processor, memory and storage can be run on a memory and on a processor Computer program, which is characterized in that the processor realizes following steps when executing the computer program:
Login protocol is sent to the barrage server that platform is broadcast live;
If logining successfully, token fields, random field r and times fields that the barrage server returns are received;
Barrage agreement is generated, the barrage agreement includes the timestamp of barrage content and barrage agreement;
Times md5 is carried out to the random field r to calculate, to obtain field R;
According to the token fields, the transmission times, described of the room number of direct broadcasting room, the timestamp of the barrage agreement, barrage Barrage content and the field R calculate k fields, wherein the room number of the direct broadcasting room to the barrage server by sending out It send and obtains the agreement of room information to obtain, the transmission times of the barrage is that barrage sends successful number, according to the bullet The barrage that curtain server returns sends success message and is calculated, initial value 0;
The k fields are encrypted;
Encrypted k fields are added in the barrage agreement, and is sent to the barrage server and encrypted k fields is added Barrage agreement;
If barrage is sent successfully, next random field r that the barrage server is sent, next random words are received Section r is used to calculate the k fields of next barrage agreement.
9. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist In the computer program realizes following steps when being executed by processor:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
The difference of the timestamp of the barrage agreement and the timestamp of the barrage server is judged whether in presetting range, if It is the encrypted k fields to be decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R be to the random field r carry out times md5 calculating as a result, The configuration file be the random field r, the times fields and the field R correspondence;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, the transmission times of barrage, barrage Content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to the client End equipment sends next random field r.
10. a kind of computer equipment, including processor, memory and storage can be run on a memory and on a processor Computer program, which is characterized in that the processor realizes following steps when executing the computer program:
Receive the login protocol that client device is sent;
If logining successfully, token fields, random field r and times fields are returned to the client device;
The barrage agreement that the client device is sent is received, the barrage agreement includes encrypted k fields;
The difference of the timestamp of the barrage agreement and the timestamp of the barrage server is judged whether in presetting range, if It is the encrypted k fields to be decrypted, to obtain k fields;
The Lookup Field R in configuration file, the field R be to the random field r carry out times md5 calculating as a result, The configuration file be the random field r, the times fields and the field R correspondence;
According to the token fields, the room number of direct broadcasting room, the timestamp of the barrage agreement, the transmission times of barrage, barrage Content and the field R calculate k fields;
Judge whether the obtained k fields of decryption and the k fields being calculated are consistent, if so, be verified, and to the client End equipment sends next random field r.
CN201810316801.7A 2018-04-10 2018-04-10 Barrage verification method, computer equipment and storage medium Active CN108769718B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810316801.7A CN108769718B (en) 2018-04-10 2018-04-10 Barrage verification method, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810316801.7A CN108769718B (en) 2018-04-10 2018-04-10 Barrage verification method, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108769718A true CN108769718A (en) 2018-11-06
CN108769718B CN108769718B (en) 2020-12-15

Family

ID=63981661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810316801.7A Active CN108769718B (en) 2018-04-10 2018-04-10 Barrage verification method, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108769718B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847717A (en) * 2016-05-30 2016-08-10 武汉斗鱼网络科技有限公司 Barrage reporting method, client and server
CN105939485A (en) * 2016-06-27 2016-09-14 武汉斗鱼网络科技有限公司 System and method for monitoring bullet screen service availability based on user bullet screen behaviors
US20160285850A1 (en) * 2013-12-13 2016-09-29 Huawei Technologies Co., Ltd. Security Authentication Method and Bidirectional Forwarding Detection BFD Device
CN106060057A (en) * 2016-06-17 2016-10-26 武汉斗鱼网络科技有限公司 System and method for video live broadcast website to generate white list based on user barrage behavior
CN106534905A (en) * 2016-12-09 2017-03-22 武汉斗鱼网络科技有限公司 Method and system for intercommunication between video bullet screen live platform and bullet screen of third-party platform
CN106788983A (en) * 2017-03-01 2017-05-31 深圳市中博睿存信息技术有限公司 A kind of communication data encryption method and device based on customer end/server mode
CN107155113A (en) * 2017-03-31 2017-09-12 武汉斗鱼网络科技有限公司 The method and server of a kind of protection barrage information
CN107484032A (en) * 2017-09-08 2017-12-15 武汉斗鱼网络科技有限公司 Prevent the verification method and device brushed

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160285850A1 (en) * 2013-12-13 2016-09-29 Huawei Technologies Co., Ltd. Security Authentication Method and Bidirectional Forwarding Detection BFD Device
CN105847717A (en) * 2016-05-30 2016-08-10 武汉斗鱼网络科技有限公司 Barrage reporting method, client and server
CN106060057A (en) * 2016-06-17 2016-10-26 武汉斗鱼网络科技有限公司 System and method for video live broadcast website to generate white list based on user barrage behavior
CN105939485A (en) * 2016-06-27 2016-09-14 武汉斗鱼网络科技有限公司 System and method for monitoring bullet screen service availability based on user bullet screen behaviors
CN106534905A (en) * 2016-12-09 2017-03-22 武汉斗鱼网络科技有限公司 Method and system for intercommunication between video bullet screen live platform and bullet screen of third-party platform
CN106788983A (en) * 2017-03-01 2017-05-31 深圳市中博睿存信息技术有限公司 A kind of communication data encryption method and device based on customer end/server mode
CN107155113A (en) * 2017-03-31 2017-09-12 武汉斗鱼网络科技有限公司 The method and server of a kind of protection barrage information
CN107484032A (en) * 2017-09-08 2017-12-15 武汉斗鱼网络科技有限公司 Prevent the verification method and device brushed

Also Published As

Publication number Publication date
CN108769718B (en) 2020-12-15

Similar Documents

Publication Publication Date Title
CN109347835A (en) Information transferring method, client, server and computer readable storage medium
CN107948736A (en) A kind of audio and video preservation of evidence method and system
CN104869102B (en) Authorization method, device and system based on xAuth agreement
CN106104562A (en) Safety of secret data stores and recovery system and method
CN110601830B (en) Key management method, device, equipment and storage medium based on block chain
CN112989426B (en) Authorization authentication method and device, and resource access token acquisition method
CN108234442A (en) Obtain method, system and the readable storage medium storing program for executing of contract
CN109981576B (en) Key migration method and device
CN105812366A (en) Server, anti-crawler system and anti-crawler verification method
CN110380859B (en) Quantum communication service station identity authentication method and system based on asymmetric key pool pair and DH protocol
Chen et al. Security analysis and improvement of user authentication framework for cloud computing
Chen et al. An approach to verifying data integrity for cloud storage
CN111339040B (en) Cloud storage method, device and equipment for data files and storage medium
CN103327034A (en) Safe login method, system and device
CN107613316A (en) A kind of network direct broadcasting plug-flow verification method and system
CN106533677B (en) A kind of user login method, user terminal and server
CN107094156A (en) A kind of safety communicating method and system based on P2P patterns
Saribekyan et al. Security analysis of Telegram
CN108881966A (en) A kind of information processing method and relevant device
Al‐Balasmeh et al. Framework of data privacy preservation and location obfuscation in vehicular cloud networks
CN117240625B (en) Tamper-resistant data processing method and device and electronic equipment
CN104883341A (en) Application management device, terminal and application management method
CN110176994A (en) Session cipher key distributing method, equipment and storage medium based on alliance&#39;s block chain
CN102256252A (en) Method for realizing safety model of access authentication in mobile internet
CN108712657B (en) Barrage verification method, computer equipment and storage medium

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