WO2019047375A1 - 防止被刷的验证方法、装置、服务器及存储介质 - Google Patents

防止被刷的验证方法、装置、服务器及存储介质 Download PDF

Info

Publication number
WO2019047375A1
WO2019047375A1 PCT/CN2017/111925 CN2017111925W WO2019047375A1 WO 2019047375 A1 WO2019047375 A1 WO 2019047375A1 CN 2017111925 W CN2017111925 W CN 2017111925W WO 2019047375 A1 WO2019047375 A1 WO 2019047375A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
server
gift
verification
protocol
Prior art date
Application number
PCT/CN2017/111925
Other languages
English (en)
French (fr)
Inventor
周志刚
张文明
陈少杰
Original Assignee
武汉斗鱼网络科技有限公司
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 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2019047375A1 publication Critical patent/WO2019047375A1/zh

Links

Images

Classifications

    • 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/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • 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/25808Management of client data
    • H04N21/25816Management of client data involving client 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/475End-user interface for inputting end-user data, e.g. personal identification number [PIN], preference data

Definitions

  • the present invention relates to the field of network information security technologies, and in particular, to a method, an apparatus, a server, and a storage medium for preventing a flash.
  • the anchor live broadcast platform for example, the Betta live broadcast platform
  • the duration can receive free gifts (for example, fish balls), which can be used to reward the audience through the anchor, or to allow the audience to participate in the treasure chest to promote the interaction between the anchor and the audience.
  • free gifts for example, fish balls
  • some technicians or hackers will write scripts to automate the collection of "fish balls” and automatic treasure chests. These scripts have great advantages over other viewers to manually grab gifts, resulting in most of the "fish balls” being taken away by these technicians or hackers, resulting in most other viewers not being able to get gifts, not reaching the platform to promote the anchor and The purpose of interaction between viewers.
  • the present invention aims to provide a method, device, server and storage medium for preventing the brush from being verified, and verifying the legality of the client by setting a multi-layer verification method, and collecting it at the client end. The more the number of gifts, the more stringent the client's legality verification.
  • a preferred embodiment of the present invention provides a method for preventing a brush from being applied to a server that is in communication with a client, the method comprising:
  • the preset automatic verification program is started to verify the legality of the client.
  • the authentication is performed on the client. Sexual verification.
  • the preset number of times is two
  • the step of starting the preset automatic verification procedure to verify the validity of the client includes:
  • the client When the client first receives the gift, the client is verified according to the protocol field information sent by the client. legality;
  • the client When the client receives the gift for the second time, the validity of the client is verified according to an asymmetric encryption algorithm.
  • the step of verifying the legitimacy of the client according to the protocol field information sent by the client includes:
  • the agreement content includes a gift quantity, a gift number, and a key value used by the client to encrypt
  • the client protocol is obtained by the client according to a preset encryption parameter
  • the encryption parameter includes The user ID reported by the client, the number of gifts delivered by the server, the gift number delivered by the server, the timestamp of the current client, the device ID of the client, the token obtained when the client logs in, the room number of the live broadcast room of the client, and The key value used by the client to encrypt;
  • the step of verifying the legitimacy of the client according to the asymmetric encryption algorithm includes:
  • the client encrypts the random number according to the private key generated by the client and the public key of the server;
  • the step of verifying the legality of the client by inputting the verification information includes:
  • a verification device for preventing a brush from being applied to a server that communicates with a client, the device comprising:
  • a receiving module configured to receive an operation of the client to receive a gift
  • a recording module for recording the number of times the client receives the gift
  • a judging module configured to determine whether the number of times the client receives the gift exceeds a preset number of times
  • the verification module is configured to start the preset automatic verification procedure to verify the legality of the client when the number of times the gift is received does not exceed the preset number.
  • the verification information is input. The validity of the client is verified.
  • the preset number of times is two
  • the manner in which the verification module starts the preset automatic verification procedure to verify the legality of the client includes:
  • the client When the client first receives the gift, verifying the legality of the client according to the protocol field information sent by the client;
  • the client When the client receives the gift for the second time, the validity of the client is verified according to an asymmetric encryption algorithm.
  • the verification module verifies the legality of the client according to the protocol field information sent by the client, including:
  • the agreement content includes a gift quantity, a gift number, and a key value used by the client to encrypt
  • the client protocol is obtained by the client according to a preset encryption parameter
  • the encryption parameter includes The user ID reported by the client, the number of gifts delivered by the server, the gift number delivered by the server, the timestamp of the current client, the device ID of the client, the token obtained when the client logs in, the room number of the live broadcast room of the client, and The key value used by the client to encrypt;
  • the manner in which the verification module verifies the legality of the client according to the asymmetric encryption algorithm includes:
  • the client encrypts the random number according to the private key generated by the client and the public key of the server;
  • the manner in which the verification module verifies the legality of the client by inputting the verification information includes:
  • a preferred embodiment of the present invention further provides a method for preventing a brush from being applied to a client and a server that communicate with each other, the method comprising:
  • the server records the number of times the client receives the gift
  • the server determines whether the number of times the client receives the gift exceeds a preset number of times
  • the server starts a preset automatic verification procedure to verify the legality of the client, and when the number of times the gift is received exceeds a preset number, the verification information is input by Verify the validity of the client.
  • the preset number of times is two
  • the step of the server starting the preset automatic verification procedure to verify the legality of the client includes:
  • the server verifies the legality of the client according to the protocol field information sent by the client;
  • the server verifies the legitimacy of the client according to an asymmetric encryption algorithm.
  • the step of the server verifying the legitimacy of the client according to the protocol field information sent by the client includes:
  • the server sends a protocol for receiving a gift to the client, where the protocol content includes a gift quantity, a gift number, and a key value used by the client for encryption;
  • the encryption parameter includes the user ID reported by the client, the number of gifts delivered by the server, the gift number delivered by the server, the current timestamp of the client, the device ID of the client, and the login time of the client.
  • the token the room number of the live broadcast room to which the client belongs, and the key value used by the client for encryption;
  • the server determines that the client is legal, when the protocol field in the client protocol is inconsistent with the server storage data When the client is determined to be illegal.
  • the step of the server verifying the legitimacy of the client according to the asymmetric encryption algorithm includes:
  • the step of verifying the legality of the client by inputting the verification information includes:
  • the client responds to the verification information input operation, and sends the input verification information to the server;
  • the server compares the input verification information uploaded by the client with the issued verification information
  • a preferred embodiment of the present invention further provides a server, including a processor, a memory, and a verification device for preventing brushing, wherein the flash-proof verification device is installed in the memory and includes one or more a software function module executed by the processor, the verification device for preventing brushing comprises:
  • a receiving module configured to receive an operation of the client to receive a gift
  • a recording module configured to record the number of times the client receives the gift
  • the determining module is configured to determine whether the number of times the client receives the gift exceeds a preset number of times
  • the verification module is configured to: when the number of times the gift is received does not exceed the preset number of times, start a preset automatic verification procedure to verify the legality of the client, and when the number of times the gift is received exceeds a preset number, the verification information is input. The method verifies the legality of the client.
  • a preferred embodiment of the present invention further provides a storage medium, the storage medium comprising a set of instructions, when executed, causing at least one processor to perform the prevention provided by the first aspect of the embodiments of the present invention Brush verification method.
  • the present invention has the following beneficial effects:
  • the method and device for preventing the brush from being provided by the present invention set the corresponding client legally by receiving the number of gifts Sexual verification scheme, when the number of gifts is small, the method of automatic verification is used to verify the legality of the client. When the number of gifts is high, the validity of the client needs to be verified by manually inputting the verification information, which greatly curbs the brush through the software tool.
  • the behavior of gifts allows more viewers to participate in live interactive activities, increasing the appeal of the live platform to the audience and a good user experience.
  • FIG. 1 is a schematic diagram of interaction between a client and a server according to a first preferred embodiment of the present invention.
  • FIG. 2 is a schematic block diagram of a client according to a preferred embodiment of the present invention.
  • FIG. 3 is a block diagram of a server according to a preferred embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of a method for preventing a brush from being provided according to a preferred embodiment of the present invention.
  • FIG. 5 is a schematic flow chart of the sub-steps of step S440 in FIG.
  • FIG. 6 is a schematic flow chart of the sub-steps of step S441 in FIG. 5.
  • FIG. 7 is a schematic flow chart of the sub-steps of step S442 in FIG. 5.
  • FIG. 8 is a schematic flow chart of the sub-steps of step S450 in FIG.
  • FIG. 9 is a functional block diagram of a verification device for preventing brushing according to a second preferred embodiment of the present invention.
  • Icon 100-client; 200-server; 300-network; 110-first memory; 120-first processor; 130-first communication unit; 140-storage controller; 210-second memory; 220- Second processor; 230-second communication unit; 500-verification device; 510-receiving module; 520-recording module; 530-judgement module; 540-verification module.
  • FIG. 1 is a schematic diagram of interaction between a client 100 and a server 200 according to a preferred embodiment of the present invention.
  • the server 200 can communicate with the client 100 over the network 300 to enable data communication or interaction between the server 200 and the client 100.
  • the server 200 may be, but not limited to, a web server, a file transfer protocol (ftp) server, and the like.
  • the client 100 can be, but not limited to, a smart phone, a personal computer (PC), a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), and the like.
  • the network 300 can be, but is not limited to, a wired network or a wireless network.
  • the operating system of the client 100 may be, but not limited to, an Android system, an IOS (iPhone operating system) system, a Windows phone system, a Windows system, and the like.
  • the operating system of the client 100 is an Android system.
  • the application may be any application provided by the server 200 for the client 100 to customize download and install, for example, the application may be a betta live broadcast app.
  • FIG. 2 is a block diagram of the client 100 shown in FIG. 1.
  • the client 100 includes a first memory 110, a first processor 120, a first communication unit 130, and a storage controller 140.
  • the first memory 110, the first processor 120, the first communication unit 130, and the storage controller 140 are electrically connected to each other directly or indirectly to implement data transmission or interaction.
  • the components can be electrically connected to one another via one or more communication buses or signal lines.
  • the first memory 110 may be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a programmable read only memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), and the like.
  • RAM random access memory
  • ROM read only memory
  • PROM Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electric Erasable Programmable Read-Only Memory
  • the first processor 120 can be an integrated circuit chip with signal processing capabilities.
  • the first processor 120 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), and the like. It can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present invention may be implemented or carried out.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the first communication unit 130 is configured to establish a communication connection between the client 100 and the server 200.
  • the first communication unit 130 can connect to the network 300 by using a radio frequency signal sent by the radio unit.
  • the communication connection is established between the network and the first communication unit 130 of the server 200, and the collected user behavior information is sent to the server 200.
  • the behavior of the user robbing the client at the client 100 or inputting verification information or the like is sent to the server 200. .
  • the structure shown in FIG. 2 is merely illustrative, and the client 100 may further include more or less components than those shown in FIG. 2, or have a different configuration from that shown in FIG. 2.
  • the components shown in Figure 2 can be implemented in hardware, software, or a combination thereof.
  • FIG. 3 is a block diagram of the server 200 shown in FIG. 1.
  • the server 200 includes a second memory 210, a second processor 220, and a second communication unit 230.
  • the components of the second memory 210, the second processor 220, and the second communication unit 230 are electrically connected directly or indirectly to each other to implement data transmission or interaction.
  • the components can be electrically connected to one another via one or more communication buses or signal lines.
  • the second processor 220 is configured to execute an executable module stored in the second memory 210.
  • the second memory 210 stores a verification device 500 for preventing the brushing, and the verification device 500 for preventing the brushing includes at least one software function module that can be stored in the second memory 210 in the form of software or firmware.
  • the second processor 220 executes various functional applications and data processing by executing a software program and a module stored in the second memory 210, such as the flash-proof verification device 500 in the embodiment of the present invention. A method of verifying the prevention of being brushed in an embodiment of the invention.
  • the second processor 220 executes the program after receiving the execution instruction.
  • the second communication unit 230 is configured to establish a communication connection between the server 200 and the client 100 through the network 300, and is configured to receive, by using the network 300, the collected user operation information sent by the client 100. .
  • FIG. 4 is a schematic flow chart of a method for verifying the brush prevention according to a preferred embodiment of the present invention. The method is applied to the server 200, and the specific process of the method is as follows:
  • Step S410 receiving an operation of the client 100 to receive a gift.
  • the client 100 when performing an interactive activity, displays an interface of the interactive activity, for example, a treasure chest pattern and/or a control that reminds the viewer to grab the gift.
  • the logic that the client 100 receives the gift is triggered.
  • the client 100 sends a response protocol to the server 200, informing the server 200 that the client 100 has an operation for receiving a gift.
  • step S420 the number of times the client 100 receives the gift is recorded.
  • Each response of the server 100 to the client 100 is recorded, and the identity information (for example, the device identification number) of the client 100 and the response time are recorded. According to the record information, each client 100 can receive a gift corresponding to the gift. The number of times, in order to verify the legality of the client 100 by using different verification methods.
  • step S430 it is determined whether the number of times the client 100 receives the gift exceeds a preset number of times.
  • the preset number of times may be set according to the severity of the stolen brush, and specifically, may be set to 2 or 3 times.
  • the process proceeds to step S440, and when the number of times exceeds the preset number of times, the process proceeds to step S450.
  • Step S440 the preset automatic verification procedure is started to verify the legality of the client 100.
  • the step S440 when the preset number of times is two, the step S440 includes sub-step S441 and sub-step S442.
  • Sub-step S441 when the client 100 first receives the gift, the validity of the client 100 is verified according to the protocol field information sent by the client 100.
  • the sub-step S440 may include the following steps:
  • step S441a the agreement for receiving the gift is sent to all the clients 100 in the live broadcast room.
  • the server 200 will issue the current number of gifts that can be received, the current gift number, and the KEY value used by the client 100 for encryption.
  • the current gift number can be different every time, and can be randomly generated to ensure that there is no repetition before.
  • Server_send_client 30+yw10005+bacdef;
  • bacdef indicates the key value used by the client 100 for encryption.
  • step S441b the client protocol reported by the client 100 is received, and the protocol field in the protocol of the client 100 is verified.
  • the client protocol is generated on the client 100, and the client 100 is based on the user ID reported by the client 100, the number of gifts delivered by the server 200, the gift number delivered by the server 200, and the timestamp of the current client 100.
  • the device ID of the client 100, the token obtained when the client 100 logs in, the room number of the live room to which the client 100 belongs, and the key value used by the client 100 for encryption are obtained.
  • the form of the client protocol may be as follows:
  • encryptData TEA.encrypt(UID+30+TIME+RoomID+DeviceID+Token+yw10005,bacdef);
  • the UID is the user ID reported by the client 100
  • the TIME is the timestamp of the current client 100
  • the RoomID is the room number of the live room to which the client 100 belongs
  • the DeviceID is the device ID of the client 100
  • the Token is the client 100 when logging in. The token obtained.
  • the server 200 decrypts the client protocol to obtain a protocol field reported by the client 100, and verifies the protocol field reported by the client 100.
  • the decrypted protocol field is compared with the data stored in the server 200.
  • Step S441c when the protocol field in the client protocol is consistent with the stored data in the server 200, It is determined that the client 100 is legal. When the protocol field in the client protocol is inconsistent with the data stored by the server 200, it is determined that the client 100 is invalid.
  • the client 100 When it is determined that the client 100 is legal, the client 100 can be notified that the gift can be successfully received. When the client 100 is determined to be illegal, the client 100 is denied the receiving operation and the corresponding reminding information is given.
  • Sub-step S442 when the client 100 receives the gift for the second time, the validity of the client 100 is verified according to an asymmetric encryption algorithm.
  • the sub-step S442 may include the following steps:
  • step S442a the asymmetric encryption algorithm is invoked to generate a pair of public and private keys for the server 200.
  • the server 200 and the client 100 both call the asymmetric encryption algorithm to generate a pair of public and private keys.
  • the private key may be generated by using a random number, and the corresponding public key may be generated by calling an interface function of the RSA, where the private key and the public key are uniquely paired.
  • Privatekey rand();//The private key is generated using a random number.
  • Publickey RSA.CreatePair(Privatekey); The public key is generated by calling RSA.
  • step S442b the public key of the server 200 and the public key generated by the client 100 using an asymmetric encryption algorithm are exchanged.
  • step S442c a random number is sent to the client 100, and the client 100 encrypts the random number according to the private key of the client 100 and the public key of the server 200.
  • the manner in which the client 100 obtains encrypted data may be:
  • the client 100 performs MD5 calculation on the random number sent by the server 200. After the calculation is completed, the data is encrypted using an encryption algorithm.
  • the encryption process can be as follows:
  • the client 100 can generate a shared key using the private key of the client 100 and the public key of the server 200.
  • KEY RSA.Sharekey (client privatekey, server publickey);
  • the client 100 calculates the MD5 value of the data sent by the server 200.
  • the final Md5Result result is obtained by calculating the MD5 value from the random number sent by the server 200.
  • the Md5Result result is encrypted and reported to the server 200 by using an encryption algorithm (for example, a TEA encryption algorithm).
  • an encryption algorithm for example, a TEA encryption algorithm
  • EncryptData TEA.Encrypt(MD5Result, KEY);
  • the KEY value used is calculated by the client private key and the server public key. This KEY value is not transmitted in the network 300 and is very secure.
  • Step S442d using the private key of the server 200 and the public key of the client 100 to send a random request to the client 100.
  • the encrypted data obtained after the number processing is decrypted, and the data obtained after the decryption is compared with the issued random number.
  • the server 200 generates a shared secret key by its own private key and the public key of the server 200.
  • KEY RSA.Sharekey (server privatekey, client publickey);
  • the server 200 decrypts the encrypted data reported by the client 100 using the Key value.
  • the server 200 compares the decrypted MD5Result with the random number delivered by the server 200.
  • step S442e when the data obtained after the decryption is consistent with the delivered random number, it is determined that the client 100 is legal. When the data obtained after the decryption is inconsistent with the delivered random number, it is determined that the client 100 is invalid. .
  • the client 100 When it is determined that the client 100 is legal, the client 100 can be notified that the gift can be successfully received. When the client 100 is determined to be illegal, the client 100 is denied the receiving operation and the corresponding reminding information is given.
  • Step S450 verifying the legality of the client 100 by inputting the verification information.
  • step S450 may include the following sub-steps:
  • Sub-step S451 sending a verification message to the client 100.
  • the server 200 When the client 100 receives a gift that exceeds a preset number of times (for example, 2 times), the server 200 performs further legality verification on the client 100. To prevent the client 100 from stealing gifts by using a software tool.
  • the server 200 causes the client 100 to pop up an interface for inputting a verification code, and the server 200 transmits the verification information to the mobile phone through the mobile phone number bound to the client 100.
  • the verification information includes, but is not limited to, a numeric string, a character string, a phrase, and the like.
  • Sub-step S452 the input verification information uploaded by the client 100 is compared with the issued verification information.
  • the client 100 After the viewer inputs the verification code on the interface of the client 100 to input the verification code, the client 100 uploads the input verification code to the server 200, and the server 200 compares the received verification code with the issued verification code information.
  • Sub-step S453 when the input verification information uploaded by the client 100 is consistent with the issued verification information, it is determined that the client 100 is legal. When the input verification information uploaded by the client 100 is inconsistent with the issued verification information, the determination is performed. The client 100 is not legal.
  • the client 100 When it is determined that the client 100 is legal, the client 100 can be notified that the gift can be successfully received. When the client 100 is determined to be illegal, the client 100 is denied the receiving operation and the corresponding reminding information is given.
  • FIG. 9 is a functional block diagram of a verification device 500 for preventing brushing according to a preferred embodiment of the present invention.
  • the verification device 500 for preventing the brushing includes a receiving module 510, a recording module 520, a determining module 530, and a verification module 540.
  • the receiving module 510 is configured to receive an operation of the client 100 to receive a gift.
  • the receiving module 510 is configured to perform step S410 in FIG. 5, and the specific description refers to step S410, and then Let me repeat.
  • the recording module 520 is configured to record the number of times the client 100 receives the gift.
  • the recording module 520 is configured to perform step S420 in FIG. 5. For details, refer to step S420, and details are not described herein again.
  • the determining module 530 is configured to determine whether the number of times the client 100 receives the gift exceeds a preset number of times.
  • the verification module 540 is configured to: when the number of times the gift is received does not exceed the preset number of times, start a preset automatic verification procedure to verify the legality of the client 100, and when the number of times the gift is received exceeds a preset number, the input is performed. The manner in which the information is verified verifies the legitimacy of the client 100.
  • the preset number of times is two, and the manner in which the verification module 540 starts the automatic verification to verify the legality of the client 100 includes:
  • the validity of the client 100 is verified according to the protocol field information sent by the client 100.
  • the validity of the client 100 is verified according to an asymmetric encryption algorithm.
  • the manner in which the verification module 540 verifies the legality of the client 100 according to the protocol field information sent by the client 100 when receiving the gift for the first time includes:
  • the parameters include the user ID reported by the client 100 according to the client 100, the number of gifts delivered by the server 200, the gift number delivered by the server 200, the timestamp of the current client 100, the device ID of the client 100, and the client.
  • the manner in which the verification module 540 verifies the legality of the client 100 according to the asymmetric encryption algorithm includes:
  • the public key of the server 200 is exchanged with the public key generated by the client 100 by using an asymmetric encryption algorithm.
  • the client 100 also calls an asymmetric encryption algorithm to generate a pair of public and private keys.
  • the client 100 sends a random number to the client 100, the client 100 encrypts the random number according to the private key generated by the client 100 and the public key of the server 200;
  • the private data of the server 200 and the public key of the client 100 are used to decrypt the encrypted data obtained by the client 100 based on the processed random number, and the decrypted data is compared with the issued random number.
  • the verification module 540 is further configured to verify the client 100 by inputting verification information when the number of times the gift is received exceeds a preset number of times.
  • the manner in which the verification module 540 verifies the legality of the client 100 by inputting the verification information includes:
  • the client 100 When the input verification information uploaded by the client 100 is consistent with the issued verification information, it is determined that the client 100 is legal. When the input verification information uploaded by the client 100 is inconsistent with the issued verification information, the client 100 is determined. illegal.
  • the embodiment of the present invention further provides a storage medium, which includes a set of instructions, when executed, causes at least one processor to execute the method for preventing the brushing provided by the embodiment of the present invention.
  • the method, device, server and storage medium for preventing the brushing of the present invention set the corresponding client 100 legality verification scheme by receiving the number of gifts, and adopt the automatic verification method when the number of gifts is small.
  • the validity of the client 100 needs to be verified by manually inputting the verification information, which greatly curbs the behavior of brushing gifts through software tools, so that more viewers can participate.
  • the live platform is more attractive to the audience and a good user experience.
  • the present application solves the problem that the gift in the existing live interaction is swept away by the software tool, which greatly improves the attraction and user experience of the live broadcast platform to the viewer, and has great practical value.

Abstract

本发明提供的防止被刷的验证方法、装置、服务器及存储介质,通过领取礼品次数设置对应的客户端合法性验证方案,当领取礼品次数较少时采用自动验证的方式验证客户端的合法性,当领取礼品次数较多时需要通过手动输入验证信息的方式验证客户端的合法性,极大遏制了通过软件工具刷礼品的行为,可以让更多的观众能够参与到直播互动活动中,增加直播平台对观众的吸引力及良好的用户体验。

Description

防止被刷的验证方法、装置、服务器及存储介质
本申请要求于2017年9月8日提交中国专利局的申请号为2017108042025、名称为“防止被刷的验证方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及网络信息安全技术领域,具体而言,涉及一种防止被刷的验证方法、装置、服务器及存储介质。
背景技术
目前,网络视频直播通过利用互联网及流媒体技术进行在线直播,随着直播平台的发展,各种各样的活动也会随之展开,例如主播直播平台(比如,斗鱼直播平台)提供观看一定时长可以领取免费礼品(比如,鱼丸),可以是通过主播打赏观众,或让观众参与进行抢宝箱等方式来促进主播与观众之间的互动。然而一部分技术人员或者黑客会编写一些脚本来实现自动领取“鱼丸”和自动抢宝箱的功能。这些编写的脚本相比其他观众手动抢礼品具有极大的优势,从而导致大多数“鱼丸”都被这些技术人员或黑客抢走,导致其他大部分观众无法获得礼品,未达到平台促进主播与观众之间互动的目的。
发明内容
为了克服现有技术中的上述不足,本发明目的在于提供一种防止被刷的验证方法、装置、服务器及存储介质,通过设置多层验证方式对客户端的合法性进行验证,在客户端领取的礼品数量次数越多时,对应的客户端合法性验证也就越严格。
为了实现上述目的,本发明较佳实施例所采用的技术方案如下所示:
第一方面,本发明较佳实施例提供一种防止被刷的验证方法,应用于与客户端通信连接的服务器,所述方法包括:
接收所述客户端领取礼品的操作;
记录该客户端领取礼品的次数;
判断该客户端领取礼品的次数是否超过预设次数;
当领取礼品的次数未超过预设次数时,启动预设的自动验证程序对该客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
在本发明较佳实施例中,所述预设次数为两次,所述启动预设的自动验证程序对该客户端的合法性进行验证的步骤包括:
当客户端首次领取礼品时,根据接收到客户端发送的协议字段信息验证所述客户端的 合法性;
当客户端第二次领取礼品时,根据非对称加密算法验证所述客户端的合法性。
在本发明较佳实施例中,上述当客户端首次领取礼品时,根据接收到客户端发送的协议字段信息验证所述客户端的合法性的步骤包括:
向客户端发送领取礼品的协议,其中,协议内容包括礼品数量、礼品编号及客户端加密使用的key值;
接收客户端上报的所述客户端协议,对所述客户端协议中的协议字段进行验证,其中,所述客户端协议由所述客户端根据预设的加密参数进行加密得到,该加密参数包括客户端上报的用户ID、服务器下发的礼品数量、服务器下发的礼品编号、当前客户端的时间戳、客户端的设备ID、客户端登录时获得的令牌、客户端所属直播间的房号及客户端加密使用的key值;
当所述客户端协议中的协议字段与所述服务器中的存储数据一致时,判定所述客户端合法,当所述客户端协议中的协议字段与所述服务器存储数据不一致时,判定所述客户端不合法。
在本发明较佳实施例中,所述当客户端第二次领取礼品时,根据非对称加密算法验证所述客户端的合法性的步骤包括:
调用非对称加密算法为服务器生成一对公钥和私钥;
将服务器的公钥和客户端采用非对称加密算法生成的公钥进行互换;
下发一随机数到所述客户端,由客户端根据客户端生成的私钥和服务器的公钥对随机数进行加密;
采用服务器的私钥和客户端的公钥对客户端基于下发随机数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对;
当解密后得到的数据与下发的随机数一致时,判定所述客户端合法,当解密后得到的数据与下发的随机数不一致时,判定所述客户端不合法。
在本发明较佳实施例中,所述通过输入验证信息的方式对所述客户端的合法性进行验证的步骤包括:
下发一验证信息到所述客户端;
将客户端上传的输入验证信息与下发的验证信息进行比对;
当客户端上传的输入验证信息与下发的验证信息一致时,判定所述客户端合法,当客户端上传的输入验证信息与下发的验证信息不一致时,判定所述客户端不合法。
第二方面,本发明较佳实施例中还提供一种防止被刷的验证装置,所述装置应用于与客户端通信的服务器,所述装置包括:
接收模块,用于接收所述客户端领取礼品的操作;
记录模块,用于记录该客户端领取礼品的次数;
判断模块,用于判断该客户端领取礼品的次数是否超过预设次数;
验证模块,用于当领取礼品的次数未超过预设次数时,启动预设的自动验证程序对该客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
在本发明较佳实施例中,所述预设次数为两次,所述验证模块所述启动预设的自动验证程序对该客户端的合法性进行验证的方式包括:
当客户端首次领取礼品时,根据接收到客户端发送的协议字段信息验证所述客户端的合法性;
当客户端第二次领取礼品时,根据非对称加密算法验证所述客户端的合法性。
在本发明较佳实施例中,所述验证模块在客户端首次领取礼品时,根据接收到客户端发送的协议字段信息验证所述客户端的合法性的方式包括:
向客户端发送领取礼品的协议,其中,协议内容包括礼品数量、礼品编号及客户端加密使用的key值;
接收客户端上报的所述客户端协议,对所述客户端协议中的协议字段进行验证,其中,所述客户端协议由所述客户端根据预设的加密参数进行加密得到,该加密参数包括客户端上报的用户ID、服务器下发的礼品数量、服务器下发的礼品编号、当前客户端的时间戳、客户端的设备ID、客户端登录时获得的令牌、客户端所属直播间的房号及客户端加密使用的key值;
当所述客户端协议中的协议字段与所述服务器中的存储数据一致时,判定所述客户端合法,当所述客户端协议中的协议字段与所述服务器存储数据不一致时,判定所述客户端不合法。
在本发明较佳实施例中,所述当客户端第二次领取礼品时,所述验证模块根据非对称加密算法验证所述客户端的合法性的方式包括:
调用非对称加密算法为服务器生成一对公钥和私钥;
将服务器的公钥和客户端采用非对称加密算法生成的公钥进行互换;
下发一随机数到所述客户端,由客户端根据客户端生成的私钥和服务器的公钥对随机数进行加密;
采用服务器的私钥和客户端的公钥对客户端基于下发随机数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对;
当解密后得到的数据与下发的随机数一致时,判定所述客户端合法,当解密后得到的 数据与下发的随机数不一致时,判定所述客户端不合法。
在本发明较佳实施例中,所述验证模块通过输入验证信息的方式对所述客户端的合法性进行验证的方式包括:
下发一验证信息到所述客户端;
将客户端上传的输入验证信息与下发的验证信息进行比对;
当客户端上传的输入验证信息与下发的验证信息一致时,判定所述客户端合法,当客户端上传的输入验证信息与下发的验证信息不一致时,判定所述客户端不合法。
第三方面,本发明较佳实施例中还提供一种防止被刷的验证方法,所述方法应用于相互通信的客户端与服务器,所述方法包括:
所述服务器接收所述客户端领取礼品的操作;
所述服务器记录该客户端领取礼品的次数;
所述服务器判断所述客户端领取礼品的次数是否超过预设次数;
当领取礼品的次数未超过预设次数时,所述服务器启动预设的自动验证程序对所述客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
在本发明较佳实施例中,所述预设次数为两次,所述服务器启动预设的自动验证程序对所述客户端的合法性进行验证的步骤包括:
当所述客户端首次领取礼品时,所述服务器根据接收到客户端发送的协议字段信息验证所述客户端的合法性;
当所述客户端第二次领取礼品时,所述服务器根据非对称加密算法验证所述客户端的合法性。
在本发明较佳实施例中,所述当客户端首次领取礼品时,所述服务器根据接收到所述客户端发送的协议字段信息验证所述客户端的合法性的步骤包括:
所述服务器向所述客户端发送领取礼品的协议,其中,协议内容包括礼品数量、礼品编号及所述客户端加密使用的key值;
所述服务器接收所述客户端上报的所述客户端协议,对所述客户端协议中的协议字段进行验证,其中,所述客户端协议由所述客户端根据预设的加密参数进行加密得到,该加密参数包括所述客户端上报的用户ID、服务器下发的礼品数量、服务器下发的礼品编号、当前所述客户端的时间戳、所述客户端的设备ID、所述客户端登录时获得的令牌、所述客户端所属直播间的房号及所述客户端加密使用的key值;
当所述客户端协议中的协议字段与所述服务器中的存储数据一致时,所述服务器判定所述客户端合法,当所述客户端协议中的协议字段与所述服务器存储数据不一致 时,判定所述客户端不合法。
在本发明较佳实施例中,所述当所述客户端第二次领取礼品时,所述服务器根据非对称加密算法验证所述客户端的合法性的步骤包括:
调用非对称加密算法为所述服务器生成一对公钥和私钥;
将所述服务器的公钥和所述客户端采用非对称加密算法生成的公钥进行互换;
下发一随机数到所述客户端,由所述客户端根据所述客户端生成的私钥和所述服务器的公钥对随机数进行加密;
采用所述服务器的私钥和所述客户端的公钥对所述客户端基于下发随机数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对;
当解密后得到的数据与下发的随机数一致时,判定所述客户端合法,当解密后得到的数据与下发的随机数不一致时,判定所述客户端不合法。
在本发明较佳实施例中,所述通过输入验证信息的方式对所述客户端的合法性进行验证的步骤包括:
所述服务器下发一验证信息到所述客户端;
所述客户端响应验证信息输入操作,将输入的验证信息发送给所述服务器;
所述服务器将客户端上传的输入验证信息与下发的验证信息进行比对;
当客户端上传的输入验证信息与下发的验证信息一致时,判定所述客户端合法,当客户端上传的输入验证信息与下发的验证信息不一致时,判定所述客户端不合法。
第四方面,本发明较佳实施例中还提供一种服务器,包括处理器、存储器、及防止被刷的验证装置,所述防止被刷的验证装置安装于所述存储器中并包括一个或多个由所述处理器执行的软件功能模块,所述防止被刷的验证装置包括:
接收模块,被配置为接收所述客户端领取礼品的操作;
记录模块,被配置为记录所述客户端领取礼品的次数;
判断模块,被配置为判断所述客户端领取礼品的次数是否超过预设次数;
验证模块,被配置为当领取礼品的次数未超过预设次数时,启动预设的自动验证程序对所述客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
第五方面,本发明较佳实施例中还提供一种存储介质,该存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行本发明实施例第一方面提供的防止被刷的验证方法。
相对于现有技术而言,本发明具有以下有益效果:
本发明提供的防止被刷的验证方法及装置,通过领取礼品次数设置对应的客户端合法 性验证方案,当领取礼品次数较少时采用自动验证的方式验证客户端的合法性,当领取礼品次数较多时需要通过手动输入验证信息的方式验证客户端的合法性,极大遏制了通过软件工具刷礼品的行为,让更多的观众能够参与到直播互动活动中,增加直播平台对观众的吸引力及良好的用户体验。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1为本发明第一较佳实施例提供的客户端与服务器通信的交互示意图。
图2为本发明较佳实施例提供的客户端的方框示意图。
图3为本发明较佳实施例提供的服务器的方框示意图。
图4为本发明较佳实施例提供的防止被刷的验证方法的流程示意图。
图5为图4中步骤S440的子步骤流程示意图。
图6为图5中步骤S441的子步骤流程示意图。
图7是图5中步骤S442的子步骤流程示意图。
图8是图4中步骤S450的子步骤流程示意图。
图9为本发明第二较佳实施例提供的防止被刷的验证装置的功能模块图。
图标:100-客户端;200-服务器;300-网络;110-第一存储器;120-第一处理器;130-第一通信单元;140-存储控制器;210-第二存储器;220-第二处理器;230-第二通信单元;500-验证装置;510-接收模块;520-记录模块;530-判断模块;540-验证模块。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实 施例及实施例中的特征可以相互组合。
请参照图1,图1是本发明较佳实施例提供的客户端100与服务器200通信的交互示意图。所述服务器200可通过网络300与所述客户端100进行通信,以实现服务器200与客户端100之间的数据通信或交互。
本实施例中,所述服务器200可以是,但不限于,web(网站)服务器、ftp(file transfer protocol,文件传输协议)服务器等。所述客户端100可以是,但不限于,智能手机、个人电脑(personal computer,PC)、平板电脑、个人数字助理(personal digital assistant,PDA)、移动上网设备(mobile Internet device,MID)等。所述网络300可以是,但不限于,有线网络或无线网络。所述客户端100的操作系统可以是,但不限于,安卓(Android)系统、IOS(iPhone operating system)系统、Windows phone系统、Windows系统等。优选地,本实施例中,所述客户端100的操作系统为Android系统。所述应用程序可以是服务器200提供的任何可供客户端100自定义下载并安装的应用程序,例如,所述应用程序可以是斗鱼直播APP。
请参照图2,是图1中所示的客户端100的方框示意图。
如图2所示,所述客户端100包括第一存储器110、第一处理器120、第一通信单元130以及存储控制器140。所述第一存储器110、第一处理器120、第一通信单元130以及存储控制器140相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。
其中,所述第一存储器110可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,第一存储器110用于存储程序,所述第一处理器120在接收到执行指令后,执行所述程序。
所述第一处理器120可以是一种集成电路芯片,具有信号的处理能力。上述的第一处理器120可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等。还可以是数字信号处理器(DSP))、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述第一通信单元130用于建立所述客户端100与所述服务器200二者之间的通信连接。例如,所述第一通信单元130可以利用射频单元发送的射频信号连接到网络300,进 而通过网络300与服务器200的第一通信单元130建立通信连接,将采集到的用户行为信息发送到服务器200,比如,将用户在客户端100抢礼品的行为或输入验证信息等发送到服务器200。
可以理解,图2所示的结构仅为示意,所述客户端100还可以包括比图2中所示更多或者更少的组件,或者具有与图2所示不同的配置。图2中所示的各组件可以采用硬件、软件或其组合实现。
请参照图3,是图1中所示的服务器200的方框示意图。所述服务器200包括第二存储器210、第二处理器220以及第二通信单元230。
所述第二存储器210、第二处理器220以及第二通信单元230各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。所述第二处理器220用于执行所述第二存储器210中存储的可执行模块。
第二存储器210中存储有防止被刷的验证装置500,所述防止被刷的验证装置500包括至少一个可以软件或固件(firmware)的形式存储于所述第二存储器210中的软件功能模块,所述第二处理器220通过运行存储在第二存储器210内的软件程序以及模块,如本发明实施例中的防止被刷的验证装置500,从而执行各种功能应用以及数据处理,即实现本发明实施例中的防止被刷的验证方法。所述第二处理器220在接收到执行指令后,执行所述程序。所述第二通信单元230用于通过所述网络300建立所述服务器200与客户端100之间的通信连接,并用于通过所述网络300接收所述客户端100发送的采集到的用户操作信息。
第一实施例
请参照图4,图4是本发明较佳实施例提供的防止被刷的验证方法的流程示意图。所述方法应用于服务器200,所述方法的具体流程如下:
步骤S410,接收所述客户端100领取礼品的操作。
在直播平台中,在进行互动活动时,所述客户端100会显示互动活动的界面,比如,会有宝箱图案和/或提醒观众抢礼品的控件。当观众点击这样的图案或者控件时,就会触发客户端100领取礼品的逻辑。此时客户端100就会发送一应答协议到服务器200,告知服务器200客户端100上有领取礼品的操作。
步骤S420,记录该客户端100领取礼品的次数。
服务器200对客户端100的每一次应答都会进行记录,记录下客户端100的身份信息(比如,设备识别号)及应答的时间,通过上述记录信息可以得知每一客户端100对应领取礼品的次数,以便后续采用不同的验证方式对客户端100的合法性进行验证。
步骤S430,判断该客户端100领取礼品的次数是否超过预设次数。
在本实施例中所述预设次数可以根据盗刷的严重程度进行设置,具体地,可以设置为2次或3次。当次数没有超过预设次数,进入步骤S440,当次数超过预设次数,进入步骤S450。
步骤S440,启动预设的自动验证程序对该客户端100的合法性进行验证。
请参照图5,本实施例给出了当预设次数为2次的情形,所述步骤S440包括子步骤S441及子步骤S442。
子步骤S441,当客户端100首次领取礼品时,根据接收到客户端100发送的协议字段信息验证所述客户端100的合法性。
可选地,请参照图6,所述子步骤S440可以包括以下步骤:
步骤S441a,向直播间内所有客户端100发送领取礼品的协议。
在本实施例中,服务器200会下发当前可以领取礼品的数量、当前礼品编号、客户端100加密使用的KEY值。其中,当前礼品编号可以每一次都不一样,可以通过随机生成的方式以保证和之前没有重复。
可选地,采用以下形式表示:
Server_send_client:30+yw10005+bacdef;
其中30则标示客户端100可以领取的礼品数目,yw10005标示礼品的编号,bacdef则标示客户端100加密使用的key值。
步骤S441b,接收客户端100上报的客户端协议,对所述客户端100协议中的协议字段进行验证。
所述客户端协议在客户端100上生成,所述客户端100根据客户端100上报的用户ID、服务器200下发的礼品数量、服务器200下发的礼品编号、当前客户端100的时间戳、客户端100的设备ID、客户端100登录时获得的令牌、客户端100所属直播间的房号及客户端100加密使用的key值进行加密得到。
可选地,所述客户端协议的形式可以如下:
encryptData=TEA.encrypt(UID+30+TIME+RoomID+DeviceID+Token+yw10005,bacdef);
其中,UID为客户端100上报的用户ID,TIME为当前客户端100的时间戳,RoomID为客户端100所属直播间的房号,DeviceID为客户端100的设备ID,Token为客户端100登录时获得的令牌。
在验证时,服务器200对所述客户端协议进行解密得到客户端100上报的协议字段,并对客户端100上报的协议字段进行验证。可选地,将解密得到的协议字段与服务器200中存储的数据进行比对。
步骤S441c,当所述客户端协议中的协议字段与所述服务器200中的存储数据一致时, 判定所述客户端100合法,当所述客户端协议中的协议字段与所述服务器200存储数据不一致时,判定所述客户端100不合法。
在判定客户端100合法时,可以告知客户端100可以成功领取礼品,在判定客户端100不合法时,拒绝客户端100的领取操作并给出相应提醒信息。
子步骤S442,当客户端100第二次领取礼品时,根据非对称加密算法验证所述客户端100的合法性。
可选地,请参照图7,所述子步骤S442可以包括以下步骤:
步骤S442a,调用非对称加密算法为服务器200生成一对公钥和私钥。
在本实施例中,服务器200和客户端100都会调用非对称加密算法各自生成一对公钥和私钥。
可选地,私钥可以使用随机数生成,对应的公钥可以调用RSA的接口函数生成,私钥和公钥是唯一配对的关系。
Privatekey=rand();//私钥使用随机数生成。
Publickey=RSA.CreatePair(Privatekey);公钥为调用RSA生成的。
步骤S442b,将服务器200的公钥和客户端100采用非对称加密算法生成的公钥进行互换。
步骤S442c,下发一随机数到所述客户端100,由客户端100根据客户端100的私钥和服务器200的公钥对随机数进行加密。
其中,所述客户端100获得加密数据方式可以是:
客户端100对服务器200下发的随机数进行MD5计算,计算完成后,会使用加密算法对数据进行加密。
加密过程可以如下:
客户端100可以使用客户端100的私钥和服务器200的公钥生成一个共享的密钥。
KEY=RSA.Sharekey(客户端privatekey,服务器publickey);
客户端100计算出服务器200下发数据的MD5值。
Md5Result=MD5.Create(Server_randdate);
通过对服务器200下发的随机数计算MD5值得到最终的Md5Result结果。
采用加密算法(比如,TEA加密算法)对Md5Result结果加密后上报到服务器200。
EncryptData=TEA.Encrypt(MD5Result,KEY);
使用的KEY值通过客户端私钥和服务器公钥计算得到,此KEY值则没有在网络300中传输,非常安全。
步骤S442d,采用服务器200的私钥和客户端100的公钥对客户端100基于下发随机 数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对。
服务器200将自己的私钥和服务器200的公钥生成一个共享的秘钥。
KEY=RSA.Sharekey(服务器privatekey,客户端publickey);
服务器200使用Key值对客户端100上报的加密数据进行解密。
MD5Result=TEA.Encrypt(EncryptDate,Key);
服务器200将解密得到的MD5Result与服务器200下发的随机数进行比对。
步骤S442e,当解密后得到的数据与下发的随机数一致时,判定所述客户端100合法,当解密后得到的数据与下发的随机数不一致时,判定所述客户端100不合法。
在判定客户端100合法时,可以告知客户端100可以成功领取礼品,在判定客户端100不合法时,拒绝客户端100的领取操作并给出相应提醒信息。
步骤S450,通过输入验证信息的方式对所述客户端100的合法性进行验证。
请参照图8,在本实施例中,步骤S450可以包括以下子步骤:
子步骤S451,下发一验证信息到所述客户端100。
当客户端100领取了超过预设次数(比如,2次)的礼物,此时,服务器200会对客户端100做进一步的合法性验证。以防止客户端100通过使用软件工具盗刷礼品。可选地,在本实施例中,服务器200会使客户端100弹出输入验证码的界面,同时服务器200通过与该客户端100绑定的手机号码将验证信息发送给手机。其中,所述验证信息包括但不限于,数字串、字符串及词组等。
子步骤S452,将客户端100上传的输入验证信息与下发的验证信息进行比对。
观众在客户端100输入验证码的界面输入验证码之后,客户端100将输入的验证码上传给服务器200,服务器200将接收的验证码与下发的验证码信息进行比对。
子步骤S453,当客户端100上传的输入验证信息与下发的验证信息一致时,判定所述客户端100合法,当客户端100上传的输入验证信息与下发的验证信息不一致时,判定所述客户端100不合法。
在判定客户端100合法时,可以告知客户端100可以成功领取礼品,在判定客户端100不合法时,拒绝客户端100的领取操作并给出相应提醒信息。
第二实施例
请参照图9,图9为为本发明较佳实施例提供的防止被刷的验证装置500的一种功能模块图。所述防止被刷的验证装置500包括接收模块510、记录模块520、判断模块530及验证模块540。
所述接收模块510,用于接收所述客户端100领取礼品的操作。
所述接收模块510用于执行图5中的步骤S410,具体描述请参照步骤S410,再此就不 再赘述。
所述记录模块520,用于记录该客户端100领取礼品的次数。
所述记录模块520用于执行图5中的步骤S420,具体描述请参照步骤S420,再此就不再赘述。
所述判断模块530,用于判断该客户端100领取礼品的次数是否超过预设次数。
所述验证模块540,用于当领取礼品的次数未超过预设次数时,启动预设的自动验证程序对该客户端100的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端100的合法性进行验证。
所述预设次数为两次,所述验证模块540启动自动验证的方式对该客户端100的合法性进行验证的方式包括:
当客户端100首次领取礼品时,根据接收到客户端100发送的协议字段信息验证所述客户端100的合法性;
当客户端100第二次领取礼品时,根据非对称加密算法验证所述客户端100的合法性。
所述验证模块540在为首次领取礼品时,根据接收到客户端100发送的协议字段信息验证所述客户端100的合法性的方式包括:
向直播间内所有客户端100发送领取礼品的协议,其中,协议内容包括礼品数量、礼品编号及客户端100加密使用的key值;
接收客户端100上报的所述客户端协议,对所述客户端协议中的协议字段进行验证,其中,所述客户端协议由所述客户端100根据预设的加密参数进行加密得到,该加密参数包括由所述客户端100根据客户端100上报的用户ID、服务器200下发的礼品数量、服务器200下发的礼品编号、当前客户端100的时间戳、客户端100的设备ID、客户端100登录时获得的令牌、客户端100所属直播间的房号及客户端100加密使用的key值。
当所述客户端协议中的协议字段与所述服务器200中的存储数据一致时,判定所述客户端100合法,当所述客户端协议中的协议字段与所述服务器200存储数据不一致时,判定所述客户端100不合法。
当客户端100第二次领取礼品时,所述验证模块540根据非对称加密算法验证所述客户端100的合法性的方式包括:
调用非对称加密算法为服务器200生成一对公钥和私钥;
将服务器200的公钥和客户端100采用非对称加密算法生成的公钥进行互换,其中,客户端100也调用非对称加密算法生成一对公钥和私钥;
下发一随机数到所述客户端100,由客户端100根据客户端100生成的私钥和服务器200的公钥对随机数进行加密;
采用服务器200的私钥和客户端100的公钥对客户端100基于下发随机数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对;
当解密后得到的数据与下发的随机数一致时,判定所述客户端100合法,当解密后得到的数据与下发的随机数不一致时,判定所述客户端100不合法。
所述验证模块540还用于当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端100进行验证。
所述验证模块540通过输入验证信息的方式对所述客户端100的合法性进行验证的方式包括:
下发一验证信息到所述客户端100;
将客户端100上传的输入验证信息与下发的验证信息进行比对;
当客户端100上传的输入验证信息与下发的验证信息一致时,判定所述客户端100合法,当客户端100上传的输入验证信息与下发的验证信息不一致时,判定所述客户端100不合法。
本发明实施例还提供了一种存储介质,该存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行本发明实施例提供的防止被刷的验证方法。
综上所述,本发明提供的防止被刷的验证方法、装置、服务器及存储介质,通过领取礼品次数设置对应的客户端100合法性验证方案,当领取礼品次数较少时采用自动验证的方式验证客户端100的合法性,当领取礼品次数较多时需要通过手动输入验证信息的方式验证客户端100的合法性,极大遏制了通过软件工具刷礼品的行为,让更多的观众能够参与到直播互动活动中,增加直播平台对观众的吸引力及良好的用户体验。
对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化囊括在本发明内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。
工业实用性
本申请解决现有直播互动中礼物被软件工具刷走的问题,极大地提高了直播平台对观众的吸引力和用户体验,具有极大地实用价值。

Claims (17)

  1. 一种防止被刷的验证方法,其特征在于,所述方法应用于与客户端通信连接的服务器,所述方法包括:
    接收所述客户端领取礼品的操作;
    记录所述客户端领取礼品的次数;
    判断所述客户端领取礼品的次数是否超过预设次数;
    当领取礼品的次数未超过预设次数时,启动预设的自动验证程序对所述客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
  2. 如权利要求1所述的验证方法,其特征在于,所述预设次数为两次,所述启动预设的自动验证程序对所述客户端的合法性进行验证的步骤包括:
    当所述客户端首次领取礼品时,根据接收到客户端发送的协议字段信息验证所述客户端的合法性;
    当所述客户端第二次领取礼品时,根据非对称加密算法验证所述客户端的合法性。
  3. 如权利要求2所述的验证方法,其特征在于,所述当客户端首次领取礼品时,根据接收到所述客户端发送的协议字段信息验证所述客户端的合法性的步骤包括:
    向所述客户端发送领取礼品的协议,其中,协议内容包括礼品数量、礼品编号及所述客户端加密使用的key值;
    接收所述客户端上报的所述客户端协议,对所述客户端协议中的协议字段进行验证,其中,所述客户端协议由所述客户端根据预设的加密参数进行加密得到,该加密参数包括所述客户端上报的用户ID、服务器下发的礼品数量、服务器下发的礼品编号、当前所述客户端的时间戳、所述客户端的设备ID、所述客户端登录时获得的令牌、所述客户端所属直播间的房号及所述客户端加密使用的key值;
    当所述客户端协议中的协议字段与所述服务器中的存储数据一致时,判定所述客户端合法,当所述客户端协议中的协议字段与所述服务器存储数据不一致时,判定所述客户端不合法。
  4. 如权利要求2所述的验证方法,其特征在于,所述当所述客户端第二次领取礼品时,根据非对称加密算法验证所述客户端的合法性的步骤包括:
    调用非对称加密算法为所述服务器生成一对公钥和私钥;
    将所述服务器的公钥和所述客户端采用非对称加密算法生成的公钥进行互换;
    下发一随机数到所述客户端,由所述客户端根据所述客户端生成的私钥和所述服 务器的公钥对随机数进行加密;
    采用所述服务器的私钥和所述客户端的公钥对所述客户端基于下发随机数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对;
    当解密后得到的数据与下发的随机数一致时,判定所述客户端合法,当解密后得到的数据与下发的随机数不一致时,判定所述客户端不合法。
  5. 如权利要求1-4中任意一项所述的验证方法,其特征在于,所述通过输入验证信息的方式对所述客户端的合法性进行验证的步骤包括:
    下发一验证信息到所述客户端;
    将所述客户端上传的输入验证信息与下发的验证信息进行比对;
    当所述客户端上传的输入验证信息与下发的验证信息一致时,判定所述客户端合法,当所述客户端上传的输入验证信息与下发的验证信息不一致时,判定所述客户端不合法。
  6. 一种防止被刷的验证装置,其特征在于,所述装置应用于与客户端通信的服务器,所述装置包括:
    接收模块,被配置为接收所述客户端领取礼品的操作;
    记录模块,被配置为记录所述客户端领取礼品的次数;
    判断模块,被配置为判断所述客户端领取礼品的次数是否超过预设次数;
    验证模块,被配置为当领取礼品的次数未超过预设次数时,启动预设的自动验证程序对所述客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
  7. 如权利要求6所述的验证装置,其特征在于,所述预设次数为两次,所述验证模块启动预设的自动验证程序对该客户端的合法性进行验证的方式包括:
    当所述客户端首次领取礼品时,根据接收到所述客户端发送的协议字段信息验证所述客户端的合法性;
    当所述客户端第二次领取礼品时,根据非对称加密算法验证所述客户端的合法性。
  8. 如权利要求7所述的验证装置,其特征在于,所述验证模块在客户端首次领取礼品时,根据接收到所述客户端发送的协议字段信息验证所述客户端的合法性的方式包括:
    向所述客户端发送领取礼品的协议,其中,协议内容包括礼品数量、礼品编号及所述客户端加密使用的key值;
    接收所述客户端上报的所述客户端协议,对所述客户端协议中的协议字段进行验证,其中,所述客户端协议由所述客户端根据预设的加密参数进行加密得到,该加密 参数包括所述客户端上报的用户ID、服务器下发的礼品数量、服务器下发的礼品编号、当前所述客户端的时间戳、所述客户端的设备ID、所述客户端登录时获得的令牌、所述客户端所属直播间的房号及客户端加密使用的key值;
    当所述客户端协议中的协议字段与所述服务器中的存储数据一致时,判定所述客户端合法,当所述客户端协议中的协议字段与所述服务器存储数据不一致时,判定所述客户端不合法。
  9. 如权利要求7所述的验证装置,其特征在于,当客户端第二次领取礼品时,所述验证模块根据非对称加密算法验证所述客户端的合法性的方式包括:
    调用非对称加密算法为所述服务器生成一对公钥和私钥;
    将所述服务器的公钥和所述客户端采用非对称加密算法生成的公钥进行互换;
    下发一随机数到所述客户端,由所述客户端根据客户端生成的私钥和服务器的公钥对随机数进行加密;
    采用所述服务器的私钥和所述客户端的公钥对所述客户端基于下发随机数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对;
    当解密后得到的数据与下发的随机数一致时,判定所述客户端合法,当解密后得到的数据与下发的随机数不一致时,判定所述客户端不合法。
  10. 如权利要求6-9中任意一项所述的验证装置,其特征在于,所述验证模块通过输入验证信息的方式对所述客户端的合法性进行验证的方式包括:
    下发一验证信息到所述客户端;
    将所述客户端上传的输入验证信息与下发的验证信息进行比对;
    当所述客户端上传的输入验证信息与下发的验证信息一致时,判定所述客户端合法,当客户端上传的输入验证信息与下发的验证信息不一致时,判定所述客户端不合法。
  11. 一种防止被刷的验证方法,其特征在于,所述方法应用于相互通信的客户端与服务器,所述方法包括:
    所述服务器接收所述客户端领取礼品的操作;
    所述服务器记录该客户端领取礼品的次数;
    所述服务器判断所述客户端领取礼品的次数是否超过预设次数;
    当领取礼品的次数未超过预设次数时,所述服务器启动预设的自动验证程序对所述客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
  12. 如权利要求11所述的验证方法,其特征在于,所述预设次数为两次,所述服务 器启动预设的自动验证程序对所述客户端的合法性进行验证的步骤包括:
    当所述客户端首次领取礼品时,所述服务器根据接收到客户端发送的协议字段信息验证所述客户端的合法性;
    当所述客户端第二次领取礼品时,所述服务器根据非对称加密算法验证所述客户端的合法性。
  13. 如权利要求12所述的验证方法,其特征在于,所述当客户端首次领取礼品时,所述服务器根据接收到所述客户端发送的协议字段信息验证所述客户端的合法性的步骤包括:
    所述服务器向所述客户端发送领取礼品的协议,其中,协议内容包括礼品数量、礼品编号及所述客户端加密使用的key值;
    所述服务器接收所述客户端上报的所述客户端协议,对所述客户端协议中的协议字段进行验证,其中,所述客户端协议由所述客户端根据预设的加密参数进行加密得到,该加密参数包括所述客户端上报的用户ID、服务器下发的礼品数量、服务器下发的礼品编号、当前所述客户端的时间戳、所述客户端的设备ID、所述客户端登录时获得的令牌、所述客户端所属直播间的房号及所述客户端加密使用的key值;
    当所述客户端协议中的协议字段与所述服务器中的存储数据一致时,所述服务器判定所述客户端合法,当所述客户端协议中的协议字段与所述服务器存储数据不一致时,判定所述客户端不合法。
  14. 如权利要求12所述的验证方法,其特征在于,所述当所述客户端第二次领取礼品时,所述服务器根据非对称加密算法验证所述客户端的合法性的步骤包括:
    调用非对称加密算法为所述服务器生成一对公钥和私钥;
    将所述服务器的公钥和所述客户端采用非对称加密算法生成的公钥进行互换;
    下发一随机数到所述客户端,由所述客户端根据所述客户端生成的私钥和所述服务器的公钥对随机数进行加密;
    采用所述服务器的私钥和所述客户端的公钥对所述客户端基于下发随机数处理后得到的加密数据进行解密,将解密后得到的数据与下发的随机数进行比对;
    当解密后得到的数据与下发的随机数一致时,判定所述客户端合法,当解密后得到的数据与下发的随机数不一致时,判定所述客户端不合法。
  15. 如权利要求11-14中任意一项所述的验证方法,其特征在于,所述通过输入验证信息的方式对所述客户端的合法性进行验证的步骤包括:
    所述服务器下发一验证信息到所述客户端;
    所述客户端响应验证信息输入操作,将输入的验证信息发送给所述服务器;
    所述服务器将客户端上传的输入验证信息与下发的验证信息进行比对;
    当客户端上传的输入验证信息与下发的验证信息一致时,判定所述客户端合法,当客户端上传的输入验证信息与下发的验证信息不一致时,判定所述客户端不合法。
  16. 一种服务器,其特征在于,包括:
    处理器;
    存储器;及
    防止被刷的验证装置,所述防止被刷的验证装置安装于所述存储器中并包括一个或多个由所述处理器执行的软件功能模块,所述防止被刷的验证装置包括:
    接收模块,被配置为接收所述客户端领取礼品的操作;
    记录模块,被配置为记录所述客户端领取礼品的次数;
    判断模块,被配置为判断所述客户端领取礼品的次数是否超过预设次数;
    验证模块,被配置为当领取礼品的次数未超过预设次数时,启动预设的自动验证程序对所述客户端的合法性进行验证,当领取礼品的次数超过预设次数,通过输入验证信息的方式对所述客户端的合法性进行验证。
  17. 一种存储介质,该存储介质包括一组指令,当执行所述指令时,引起至少一个处理器执行权利要求1-5任一项所述的方法。
PCT/CN2017/111925 2017-09-08 2017-11-20 防止被刷的验证方法、装置、服务器及存储介质 WO2019047375A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710804202.5A CN107484032B (zh) 2017-09-08 2017-09-08 防止被刷的验证方法及装置
CN201710804202.5 2017-09-08

Publications (1)

Publication Number Publication Date
WO2019047375A1 true WO2019047375A1 (zh) 2019-03-14

Family

ID=60584144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/111925 WO2019047375A1 (zh) 2017-09-08 2017-11-20 防止被刷的验证方法、装置、服务器及存储介质

Country Status (2)

Country Link
CN (1) CN107484032B (zh)
WO (1) WO2019047375A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769719B (zh) * 2018-04-10 2020-12-15 武汉斗鱼网络科技有限公司 一种弹幕验证方法、计算机设备和存储介质
CN108769720B (zh) * 2018-04-10 2020-10-16 武汉斗鱼网络科技有限公司 一种弹幕验证方法、计算机设备和存储介质
CN108881934B (zh) * 2018-04-10 2020-09-08 武汉斗鱼网络科技有限公司 一种弹幕验证方法、计算机设备和存储介质
CN108769718B (zh) * 2018-04-10 2020-12-15 武汉斗鱼网络科技有限公司 一种弹幕验证方法、计算机设备和存储介质
CN108881966B (zh) * 2018-04-13 2021-04-27 武汉斗鱼网络科技有限公司 一种信息处理方法以及相关设备
CN108924108B (zh) * 2018-06-21 2021-02-02 武汉斗鱼网络科技有限公司 一种用于客户端的通信方法及电子设备
CN110933113B (zh) * 2019-12-30 2021-04-09 腾讯科技(深圳)有限公司 基于区块链的互动行为检测方法、装置、设备及存储介质
CN112312152B (zh) * 2020-10-27 2022-11-04 浙江集享电子商务有限公司 网络直播中的数据处理系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100034383A1 (en) * 2005-12-23 2010-02-11 Doughan Turk System and method for encrypting traffic on a network
CN102624677A (zh) * 2011-01-27 2012-08-01 阿里巴巴集团控股有限公司 一种网络用户行为监控方法及服务器
CN105447715A (zh) * 2015-11-03 2016-03-30 北京京东尚科信息技术有限公司 用于与第三方合作的防盗刷电子优惠券的方法和装置
CN106022826A (zh) * 2016-05-18 2016-10-12 武汉斗鱼网络科技有限公司 一种网络直播平台中的作弊用户识别方法与系统
CN106228410A (zh) * 2016-07-29 2016-12-14 武汉斗鱼网络科技有限公司 一种直播平台中虚拟礼物任务防刷系统及方法
CN106452756A (zh) * 2016-11-08 2017-02-22 王栋 可离线验证安全二维码构造验证方法与装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8281155B1 (en) * 2000-11-02 2012-10-02 Intel Corporation Content protection using block reordering
JP2004265567A (ja) * 2003-02-14 2004-09-24 Ricoh Co Ltd 情報記録再生装置とディスク装置とプログラムとコンピュータ読み取り可能な記録媒体と欠陥領域交替方法
EA025197B1 (ru) * 2010-09-24 2016-11-30 Унилевер Н.В. Высококонцентрированные, содержащие сферические биополимерные гелеобразные частицы суспензии, приготовленные с использованием процесса гелеобразования в эмульсиях с высоким содержанием внутренней фазы
CN102833247A (zh) * 2012-08-24 2012-12-19 上海心动企业发展有限公司 一种用户登陆系统中的反扫号方法及其装置
CN104539604B (zh) * 2014-12-23 2017-11-24 北京奇安信科技有限公司 网站防护方法和装置
CN106096337A (zh) * 2016-06-21 2016-11-09 北京医视时代科技发展有限公司 一种数字出版版权保护的系统和方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100034383A1 (en) * 2005-12-23 2010-02-11 Doughan Turk System and method for encrypting traffic on a network
CN102624677A (zh) * 2011-01-27 2012-08-01 阿里巴巴集团控股有限公司 一种网络用户行为监控方法及服务器
CN105447715A (zh) * 2015-11-03 2016-03-30 北京京东尚科信息技术有限公司 用于与第三方合作的防盗刷电子优惠券的方法和装置
CN106022826A (zh) * 2016-05-18 2016-10-12 武汉斗鱼网络科技有限公司 一种网络直播平台中的作弊用户识别方法与系统
CN106228410A (zh) * 2016-07-29 2016-12-14 武汉斗鱼网络科技有限公司 一种直播平台中虚拟礼物任务防刷系统及方法
CN106452756A (zh) * 2016-11-08 2017-02-22 王栋 可离线验证安全二维码构造验证方法与装置

Also Published As

Publication number Publication date
CN107484032A (zh) 2017-12-15
CN107484032B (zh) 2018-08-03

Similar Documents

Publication Publication Date Title
WO2019047375A1 (zh) 防止被刷的验证方法、装置、服务器及存储介质
CN107251035B (zh) 账户恢复协议
WO2018214777A1 (zh) 一种数据通信方法、装置、设备和存储介质
CN107979514B (zh) 一种对设备进行绑定的方法和设备
CN108241517B (zh) 一种软件升级方法、客户端及电子设备
WO2019047511A1 (zh) 防止被刷的验证方法、装置及直播系统
CN101860540B (zh) 一种识别网站服务合法性的方法及装置
CN109150897B (zh) 一种端到端的通信加密方法及装置
WO2013097588A1 (zh) 应用程序登录方法、装置和移动终端
TW201706900A (zh) 終端的認證處理、認證方法及裝置、系統
WO2018014760A1 (zh) 图形码信息提供、获取方法、装置及终端
JP7041162B2 (ja) 相互認証システム
CN110198295A (zh) 安全认证方法和装置及存储介质
CN108964901B (zh) 信息验证方法、系统、装置
CN105491073B (zh) 一种数据下载方法、装置及系统
CN110011950B (zh) 一种视频流地址的鉴权方法及装置
CN110025955B (zh) 信息处理方法、终端、计算机可读存储介质和计算机设备
CN112738117A (zh) 数据传输方法、装置、系统和存储介质及电子装置
WO2018196686A1 (zh) 一种服务响应方法及其中间件
TW201638822A (zh) 進程的身份認證方法和裝置
WO2019061597A1 (zh) 一种数据处理方法及服务器
TW201603576A (zh) 應用於遠端連線的驗證方法、驗證系統及其網路攝影機
WO2016197555A1 (zh) 网络监控设备及其远程加密、远程激活方法、装置及系统
CN111901303A (zh) 设备认证方法和装置、存储介质及电子装置
WO2019136860A1 (zh) 一种关注合法性的确定方法、装置、电子设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17924318

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17924318

Country of ref document: EP

Kind code of ref document: A1