WO2019136846A1 - Bullet screen sending interval control method, storage medium, electronic device, and system - Google Patents

Bullet screen sending interval control method, storage medium, electronic device, and system Download PDF

Info

Publication number
WO2019136846A1
WO2019136846A1 PCT/CN2018/081293 CN2018081293W WO2019136846A1 WO 2019136846 A1 WO2019136846 A1 WO 2019136846A1 CN 2018081293 W CN2018081293 W CN 2018081293W WO 2019136846 A1 WO2019136846 A1 WO 2019136846A1
Authority
WO
WIPO (PCT)
Prior art keywords
barrage
server
interval
sending
sent
Prior art date
Application number
PCT/CN2018/081293
Other languages
French (fr)
Chinese (zh)
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 WO2019136846A1 publication Critical patent/WO2019136846A1/en

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/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/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/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/26613Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel for generating or managing keys in general

Definitions

  • the present invention relates to the field of mobile internet applications, and in particular, to a barrage transmission interval control method, a storage medium, an electronic device and a system.
  • live broadcasts are more and more popular among the public.
  • the live broadcast of the audience during the live broadcast enhances the interaction between the anchor and the audience, so more and more viewers pass.
  • the object of the present invention is to provide a method for controlling the transmission interval of the barrage, which can effectively realize the control of the speaking time of the user.
  • the technical solution adopted by the present invention includes:
  • the live client logs in to the server, and the server encrypts the preset live broadcast client login interval data and sends it to the live client.
  • the live client decrypts the interval data of the speech, and calculates the time interval between the current to-be-transmitted barrage and the successful transmission of the barrage of the user, and compares with the interval of the speech obtained by the decryption. If it is smaller, the current to-be-transmitted bomb is discarded. If not less than, the current to-be-sending barrage is sent to the server;
  • the server receives the time interval between the to-be-transmitted barrage received by the to-be-sending barrage and the successful transmission of the barrage of the user, and compares it with the preset time interval. If it is less than, the discard to be sent is discarded, if not less than, the packet is sent. Wait for the bullet to be sent to all live broadcast clients to complete the successful transmission of the to-be-sending barrage.
  • the live client calculates the time interval between the generation time of the to-be-sending barrage and the sending time of the user's last successful delivery of the barrage;
  • the server calculates the time interval between the generated time of the received salvage screen and the sending time of the user successfully sending the barrage.
  • the live client logs in to the server, and the live client and the server generate the public and private keys using asymmetric algorithms.
  • the generated public key is exchanged between the live client and the server, and the live client and the server use the newly obtained public key and the original private key to generate a key, and the key generated by the live client and the server is the same.
  • the server encrypts the speaking interval data sent to the current live client login user by using the generated key and the DES encryption algorithm;
  • the live broadcast client uses global variables to save the interval data of the speech sent by the server;
  • the live client obtains the global variable for saving the interval data of the utterance, and uses the generated key and the DES encryption algorithm to decrypt the encrypted interval time data to obtain the utterance interval.
  • the server calculates the MD5 value by using the generated key and the sending time of the successfully transmitted barrage, and uses the MD5 value as the key value of the DES encryption algorithm for the current live client login user.
  • the interleave time data is encrypted.
  • the present invention also provides a storage medium having stored thereon a computer program that, when executed by a processor, implements the method described above.
  • the present invention also provides an electronic device comprising a memory and a processor having stored thereon a computer program running on a processor, the processor executing the computer program to implement the method described above.
  • the invention also provides a barrage transmission interval control system, which comprises:
  • a data sending module configured to: when the live client logs in to the server, the server encrypts the preset current live client login user interval interval data and sends the data to the live client;
  • a judging module configured to enable the live client to decrypt the interleave time data, and calculate a time interval between the current to-be-transmitted barrage and the user's last successful transmission of the barrage, and compare with the interleave time obtained by the decryption, if less than , the current to-be-sending barrage is discarded, and if not less than, the current to-be-sending barrage is sent to the server;
  • the barrage sending execution module is configured to enable the server to calculate the time interval between the received barrage to be sent and the user to successfully send the barrage and compare it with the preset time interval. If less than, the discard to be sent is discarded. If it is not less than, send the to-be-sent bullet to all live clients to complete the successful transmission of the to-be-sending barrage.
  • the judging module uses the generation time of the to-be-transmitted bullet re-preparation and the transmission time of the user to successfully send the salamage to calculate the time interval; the barrage sending execution module uses the received to-be-transmitted bomb.
  • the generation time of the screen is calculated as the time interval between the sending time of the user and the successful sending of the barrage.
  • the live client logs in to the server, and the live client and the server use the asymmetric algorithm to generate the public key and the private key; the live client and the server exchange the generated public key, and the live client and the server use The newly obtained public key and the original private key generate the key, and the key generated by the live client and the server is the same.
  • the advantage of the present invention is that the live client and the server determine whether the current to-be-sending barrage meets the interval of the speech based on the interval of the user's speech, and the content is sent to all the live clients, and the user is implemented.
  • the time interval of each barrage to be sent is precisely controlled, which reduces the pressure on the computing resources of the server, saves the bandwidth resource consumption of the live broadcast platform, reduces the generation of illegal barrage, ensures the normal viewing of the live broadcast by the user, and to a certain extent Reduce the loss of bandwidth consumption of the live platform.
  • FIG. 1 is a flowchart of a method for controlling a transmission interval of a barrage according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for controlling the transmission interval of a barrage, which is applicable to a live client running on an Android system, and flexibly controls the barrage time of a live client login user to avoid high concurrency.
  • the barrage impacts the server.
  • the server refers to the barrage server of the live broadcast company. Specific includes:
  • S1 The live client logs in to the server.
  • the server encrypts the preset live broadcast client login interval data and sends it to the live client.
  • the server may need to flexibly set the interval between each user, such as 30s and 10s. Etc.
  • the interval between them can be set to 0s, and for users who frequently send illegal advertisements, the interval between barrage speeches is other users. Many times.
  • S201 The live client logs in to the server, and the live client and the server generate the public key and the private key by using an asymmetric algorithm. Further, each time the live client logs in to the server, a pair of public and private keys are generated to ensure each time. The public key and the private key are different, so as to ensure the security of the data transmission during the interval.
  • the private key of the live client and the server is generated by using a random number, and then RSA (public key encryption algorithm) is called to generate a corresponding public key.
  • the Md5 value is calculated for the random number by calling the interface Md5.Create of the Md5 function, thereby obtaining the private key data.
  • ClientPublickey RSA.CreatePair(ClientPrivatekey);
  • the RSA generation pairing key interface RSA.CreatePair is called to generate the public key.
  • the Md5 value is calculated together with the spliced random number and the number of user IDs, thereby obtaining the private key data.
  • ServerPublickey RSA.CreatePair(ServerPrivatekey);
  • the RSA generation pairing key interface RSA.CreatePair is called to generate the public key.
  • S202 The generated public key is exchanged between the live client and the server, and the live client and the server use the newly obtained public key and the original private key to generate a key, and the key generated by the live client and the server is the same. That is, the server and the client exchange their respective public key information to generate a shared secret key, and the shared secret key generated by the client and the server is the same value.
  • the server sends the server's public key ServerPublickey to the client.
  • the client sends the client's public key ClientPublickey to the server.
  • S203 The server encrypts the speaking interval time data sent to the current live client login user by using the generated key and the DES encryption algorithm. After the live client logs in to the server, the server reads the interval between the users logging in to the live client and encrypts the key obtained before, so as to ensure the security of the data in the network transmission and prevent the hacker from getting the user. The interval data is spoken and the data is tampered to bypass the detection of the barrage transmission interval by the live client. The server uses the DES encryption algorithm to encrypt the user's speaking interval data.
  • the corresponding code is:
  • DES.encrypt is the encryption interface of the encryption algorithm DES; the parameter "time" is the interval of the user's speech; the parameter ShareKey is the shared key generated by the previous step; the return value encryptData is the generated encrypted result.
  • the encrypted speech interval time data is sent to the live client via the network.
  • the live broadcast client uses the global variable to save the encrypted interleave time data sent by the server, and does not decrypt the data for the time being.
  • the live client uses the global variable to protect the encrypted encryptData sent by the server to ensure the security of the data in the memory.
  • the server encrypts the interval data of the speech sent to the live client, and the server calculates the MD5 value by using the generated key and the sending time of the successfully transmitted barrage, and uses the MD5 value as the MD5 value.
  • the key value of the DES encryption algorithm encrypts the interval data of the current live client login user, and the subsequent live server uses the algorithm to decrypt the encrypted speech interval data.
  • G_encryptData DES.encrypt(time,key)
  • the live client decrypts the interval data of the speaking interval. Specifically, the live client obtains the global variable for storing the interval data of the speaking interval, and simultaneously decrypts the encrypted interval data by using the generated key and the DES encryption algorithm to obtain the speaking interval.
  • the time interval between the current to-be-transmitted barrage and the user's last successful transmission of the barrage is calculated, and compared with the interval of the speeches obtained by the decryption. If it is less than, the current to-be-sending barrage is discarded. If not less, the current The barrage to be sent is sent to the server.
  • the live broadcast client uses the generation time of the to-be-sending barrage and the transmission time of the user to successfully send the barrage to calculate the time interval; the server uses the received generation time of the to-be-sent of the barrage to be successfully sent by the user. The time interval for the transmission time of the barrage.
  • the server receives the to-be-transmitted bullet screen received by the to-be-sending barrage and the time interval between the successful transmission of the barrage of the user and compares it with the preset time interval. If it is less than, the discard to be sent is discarded, if not less than Then, the to-be-sent bullet is sent to all the live broadcast clients, and the successful transmission of the to-be-sending barrage is completed.
  • the barrage interval control method of the present invention after the live client logs in to the server, the server encrypts the current user's speech interval time data and sends the data to the live client, so that the live client user sends the to-be-sending barrage based on the acquired
  • the interval of the speech is judged whether the current to-be-sending barrage meets the interval of the speech. If it is not satisfied, the discard is discarded. After the satisfied barrage is sent to the server, the server will judge again. If it is satisfied, it will be sent to all live clients.
  • the present invention further provides a storage medium on which a computer program is stored, and when the computer program is executed by the processor, the method for controlling the transmission interval of the barrage described in the above embodiments is implemented. step.
  • the storage medium includes a U disk, a mobile hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a disk or an optical disk, and the like. The medium of the code.
  • the present invention further provides an electronic device including a memory and a processor, wherein the memory stores a computer program running on the processor, and when the processor executes the computer program, The barrage transmission interval control method of each of the above embodiments is implemented.
  • the invention also provides a barrage transmission interval control system based on the above-mentioned barrage transmission interval control method, which comprises a data transmission module, a judgment module and a barrage transmission execution module.
  • the data sending module is configured to: when the live client logs in to the server, the server encrypts the preset current live client login user interval interval data and sends the data to the live client; the determining module is configured to enable the live client to decrypt the speaking interval time data, and Calculate the time interval between the current to-be-sending barrage and the user's last successful transmission of the barrage, and compare it with the interval of the speeches obtained by the decryption. If it is less than, discard the current to-be-sending barrage. If it is not less than, it will be currently waiting.
  • the sending bar is sent to the server; the barrage sending and executing module is configured to enable the server to calculate the time interval between the received barrage to be sent and the user to successfully send the barrage and compare it with the preset time interval. Send the barrage. If it is not less than, send the salute to be sent to all live clients to complete the successful transmission of the barrage to be sent.
  • the judging module calculates the time interval between the generation time of the to-be-sending barrage and the sending time of the user successfully sending the barrage; the barrage sending execution module uses the generated generation time of the to-be-transmitted barrage and the user successfully sends the barrage
  • the transmission time is calculated by the time interval.
  • the live client logs in to the server.
  • the live client and the server use the asymmetric algorithm to generate the public key and the private key.
  • the live client and the server exchange the generated public key, and the live client and server use the newly obtained public key and the original. Some private keys generate keys, and the live client and the server generate the same key.
  • the data sending module enables the server to encrypt the current interval time data of the current user and send the data to the live client, so that the live client user is sent to be sent.
  • the barrage is performed, it is judged whether the current to-be-transmitted barrage meets the interval of the speech interval based on the obtained interval of the speech. If it is not satisfied, the discard is discarded, and the satisfied barrage to be sent is sent to the server, and the server will judge again.
  • the barrage sending execution module which can accurately control the time interval of each barrage to be sent by the user, reduce the computing resource pressure of the server, and save the bandwidth resource consumption of the live broadcast platform and reduce
  • the production of illegal barrage ensures the normal viewing of the live broadcast by the user and the loss of bandwidth consumption of the live broadcast platform to a certain extent.

Landscapes

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

Abstract

Disclosed in the present invention are a bullet screen sending interval control method, a storage medium, an electronic device, and a system, relating to the field of mobile interconnection applications, said method comprising: a live stream client logging in to a server, and the server encrypting predetermined time interval data of the current live stream client login user sending a bullet screen, and then transmitting same to the live stream client; the live stream client decrypting the predetermined time interval data of sending a bullet screen, calculating a time interval between a current bullet screen to be sent and the latest bullet screen successfully sent by the user, and performing comparison to determine whether said time interval is less than a decrypted time interval for sending a bullet screen, if so, discarding the current bullet screen to be sent, and if not, sending, to the server, the current bullet screen to be sent; and the server receiving the bullet screen to be sent, and calculating a time interval between the received bullet screen to be sent and the latest bullet screen successfully sent by the user, and comparing same with the predetermined time interval. The present invention can effectively enable the control to the bullet screen sending time of the user.

Description

弹幕发送间隔控制方法、存储介质、电子设备及***Barrage transmission interval control method, storage medium, electronic device and system 技术领域Technical field
本发明涉及移动互联应用领域,具体涉及一种弹幕发送间隔控制方法、存储介质、电子设备及***。The present invention relates to the field of mobile internet applications, and in particular, to a barrage transmission interval control method, a storage medium, an electronic device and a system.
背景技术Background technique
当前,随着移动端互联网的发展,直播也越来越受到大众的喜爱,直播时观众在直播间发送的弹幕更是加强了主播与观众之间的互动,因而越来越多的观众通过发送弹幕来参与直播,加强与主播间的互动和交流。At present, with the development of the mobile Internet, live broadcasts are more and more popular among the public. The live broadcast of the audience during the live broadcast enhances the interaction between the anchor and the audience, so more and more viewers pass. Send a barrage to participate in the live broadcast, and strengthen interaction and communication with the anchor.
然而存在一些观众通过频繁的发送广告弹幕,或者恶意低俗弹幕,降低整个直播平台的弹幕质量,同时也存在一些黑客使用非法手段发送大量弹幕信息对主播平台进行恶意攻击,使直播平台服务器因压力过大而雪崩,影响观众对直播的正常观看或对直播平台造成损失。However, some viewers reduce the quality of the barrage of the entire live broadcast platform by frequently sending advertisement barrage or malicious vulgarity. At the same time, some hackers use illegal means to send a large amount of barrage information to maliciously attack the anchor platform, so that the live broadcast platform The server is avalanche due to excessive pressure, which affects the viewer's normal viewing of the live broadcast or damage to the live platform.
发明内容Summary of the invention
针对现有技术中存在的缺陷,本发明的目的在于提供一种弹幕发送间隔控制方法,能够有效实现对用户发言时间的控制。Aiming at the defects existing in the prior art, the object of the present invention is to provide a method for controlling the transmission interval of the barrage, which can effectively realize the control of the speaking time of the user.
为达到以上目的,本发明采取的技术方案是,包括:In order to achieve the above object, the technical solution adopted by the present invention includes:
直播客户端登录服务器,服务器将预设的当前直播客户端登录用户发言间隔时间数据加密后发送至直播客户端;The live client logs in to the server, and the server encrypts the preset live broadcast client login interval data and sends it to the live client.
直播客户端解密发言间隔时间数据,并计算当前待发送弹幕和该用户上条成功发送弹幕间的时间间隔,并与解密得到的发言间隔时间 比对,若小于,则丢弃当前待发送弹幕,若不小于,则将当前待发送弹幕发送至服务器;The live client decrypts the interval data of the speech, and calculates the time interval between the current to-be-transmitted barrage and the successful transmission of the barrage of the user, and compares with the interval of the speech obtained by the decryption. If it is smaller, the current to-be-transmitted bomb is discarded. If not less than, the current to-be-sending barrage is sent to the server;
服务器接收待发送弹幕计算接收的待发送弹幕和该用户上条成功发送弹幕间时间间隔并与预设时间间隔比对,若小于,则丢弃待发送弹幕,若不小于,则发送待发送弹幕至所有直播客户端,完成待发送弹幕的成功发送。The server receives the time interval between the to-be-transmitted barrage received by the to-be-sending barrage and the successful transmission of the barrage of the user, and compares it with the preset time interval. If it is less than, the discard to be sent is discarded, if not less than, the packet is sent. Wait for the bullet to be sent to all live broadcast clients to complete the successful transmission of the to-be-sending barrage.
在上述技术方案的基础上,Based on the above technical solutions,
直播客户端使用待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔;The live client calculates the time interval between the generation time of the to-be-sending barrage and the sending time of the user's last successful delivery of the barrage;
服务器使用接收到的待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔。The server calculates the time interval between the generated time of the received salvage screen and the sending time of the user successfully sending the barrage.
在上述技术方案的基础上,Based on the above technical solutions,
直播客户端登录服务器,直播客户端和服务器使用非对称算法均生成公钥和私钥;The live client logs in to the server, and the live client and the server generate the public and private keys using asymmetric algorithms.
直播客户端和服务器间交换生成的公钥,且直播客户端和服务器使用新得到的公钥和和原有的私钥生成密匙,且直播客户端和服务器生成的密匙相同。The generated public key is exchanged between the live client and the server, and the live client and the server use the newly obtained public key and the original private key to generate a key, and the key generated by the live client and the server is the same.
在上述技术方案的基础上,Based on the above technical solutions,
服务器使用生成的密匙并结合DES加密算法对发送给当前直播客户端登录用户的发言间隔时间数据进行加密;The server encrypts the speaking interval data sent to the current live client login user by using the generated key and the DES encryption algorithm;
直播客户端使用全局变量保存服务器发送的发言间隔时间数据;The live broadcast client uses global variables to save the interval data of the speech sent by the server;
直播客户端获取保存发言间隔时间数据的全局变量,同时使用生成的密匙并结合DES加密算法对加密的发言间隔时间数据解密,得到发言间隔时间。The live client obtains the global variable for saving the interval data of the utterance, and uses the generated key and the DES encryption algorithm to decrypt the encrypted interval time data to obtain the utterance interval.
在上述技术方案的基础上,服务器使用生成的密匙和上条成功发 送弹幕的发送时间一起计算得到MD5值,并将该MD5值作为DES加密算法的key值对当前直播客户端登录用户的发言间隔时间数据进行加密。Based on the foregoing technical solution, the server calculates the MD5 value by using the generated key and the sending time of the successfully transmitted barrage, and uses the MD5 value as the key value of the DES encryption algorithm for the current live client login user. The interleave time data is encrypted.
本发明还提供一种存储介质,该存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述所述的方法。The present invention also provides a storage medium having stored thereon a computer program that, when executed by a processor, implements the method described above.
本发明还提供一种电子设备,包括存储器和处理器,存储器上储存有在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述所述的方法。The present invention also provides an electronic device comprising a memory and a processor having stored thereon a computer program running on a processor, the processor executing the computer program to implement the method described above.
本发明还提供一种弹幕发送间隔控制***,其特征在于,包括:The invention also provides a barrage transmission interval control system, which comprises:
数据发送模块,其用于当直播客户端登录服务器,服务器将预设的当前直播客户端登录用户发言间隔时间数据加密后发送至直播客户端;a data sending module, configured to: when the live client logs in to the server, the server encrypts the preset current live client login user interval interval data and sends the data to the live client;
判断模块,其用于使直播客户端解密发言间隔时间数据,并计算当前待发送弹幕和该用户上条成功发送弹幕间的时间间隔,并与解密得到的发言间隔时间比对,若小于,则丢弃当前待发送弹幕,若不小于,则将当前待发送弹幕发送至服务器;a judging module, configured to enable the live client to decrypt the interleave time data, and calculate a time interval between the current to-be-transmitted barrage and the user's last successful transmission of the barrage, and compare with the interleave time obtained by the decryption, if less than , the current to-be-sending barrage is discarded, and if not less than, the current to-be-sending barrage is sent to the server;
弹幕发送执行模块,其用于使服务器计算接收的待发送弹幕和该用户上条成功发送弹幕间时间间隔并与预设时间间隔比对,若小于,则丢弃待发送弹幕,若不小于,则发送待发送弹幕至所有直播客户端,完成待发送弹幕的成功发送。The barrage sending execution module is configured to enable the server to calculate the time interval between the received barrage to be sent and the user to successfully send the barrage and compare it with the preset time interval. If less than, the discard to be sent is discarded. If it is not less than, send the to-be-sent bullet to all live clients to complete the successful transmission of the to-be-sending barrage.
在上述技术方案的基础上,所述判断模块使用待发送弹幕预的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔;所述弹幕发送执行模块使用接收到的待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔。On the basis of the above technical solution, the judging module uses the generation time of the to-be-transmitted bullet re-preparation and the transmission time of the user to successfully send the salamage to calculate the time interval; the barrage sending execution module uses the received to-be-transmitted bomb. The generation time of the screen is calculated as the time interval between the sending time of the user and the successful sending of the barrage.
在上述技术方案的基础上,直播客户端登录服务器,直播客户端 和服务器使用非对称算法均生成公钥和私钥;直播客户端和服务器间交换生成的公钥,且直播客户端和服务器使用新得到的公钥和和原有的私钥生成密匙,且直播客户端和服务器生成的密匙相同。On the basis of the foregoing technical solutions, the live client logs in to the server, and the live client and the server use the asymmetric algorithm to generate the public key and the private key; the live client and the server exchange the generated public key, and the live client and the server use The newly obtained public key and the original private key generate the key, and the key generated by the live client and the server is the same.
与现有技术相比,本发明的优点在于:直播客户端和服务器均基于用户发言间隔时间判断当前待发送弹幕是否满足发言间隔时间,满足则才会发送至所有直播客户端,实现对用户待发送的每一条弹幕的时间间隔进行精确控制,减轻服务器的计算资源压力,且节约直播平台的带宽资源消耗,减少非法弹幕的产生,保证用户对直播的正常观看,以及在一定程度上减轻直播平台的带宽消耗损失。Compared with the prior art, the advantage of the present invention is that the live client and the server determine whether the current to-be-sending barrage meets the interval of the speech based on the interval of the user's speech, and the content is sent to all the live clients, and the user is implemented. The time interval of each barrage to be sent is precisely controlled, which reduces the pressure on the computing resources of the server, saves the bandwidth resource consumption of the live broadcast platform, reduces the generation of illegal barrage, ensures the normal viewing of the live broadcast by the user, and to a certain extent Reduce the loss of bandwidth consumption of the live platform.
附图说明DRAWINGS
图1为本发明实施例中一种弹幕发送间隔控制方法的流程图;1 is a flowchart of a method for controlling a transmission interval of a barrage according to an embodiment of the present invention;
图2为为本发明实施例中一种电子设备的结构示意图。FIG. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图及实施例对本发明作进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
参见图1所示,本发明实施例提供一种弹幕发送间隔控制方法,适用于Android***端运行的直播客户端,对直播客户端登录用户的弹幕发言时间进行灵活控制,避免高并发的弹幕对服务器造成冲击,本发明实施例中,服务器指直播公司的弹幕服务器。具体的包括:As shown in FIG. 1 , an embodiment of the present invention provides a method for controlling the transmission interval of a barrage, which is applicable to a live client running on an Android system, and flexibly controls the barrage time of a live client login user to avoid high concurrency. The barrage impacts the server. In the embodiment of the present invention, the server refers to the barrage server of the live broadcast company. Specific includes:
S1:直播客户端登录服务器,服务器将预设的当前直播客户端登录用户发言间隔时间数据加密后发送至直播客户端;服务器可以需要灵活的对每个用户设定发言间隔时间,如30s、10s等等,当然,对于高等级的VIP用户、高质量用户或房管则可将其发言间隔时间设定为0s,而对于频繁发送违法广告弹幕的用户,其弹幕发言间隔时间则是其它用户的多倍。S1: The live client logs in to the server. The server encrypts the preset live broadcast client login interval data and sends it to the live client. The server may need to flexibly set the interval between each user, such as 30s and 10s. Etc. Of course, for high-level VIP users, high-quality users or house management, the interval between them can be set to 0s, and for users who frequently send illegal advertisements, the interval between barrage speeches is other users. Many times.
S201:直播客户端登录服务器,直播客户端和服务器使用非对称算法均生成公钥和私钥,进一步的,每次直播客户端登陆服务器,均会生成一对公钥和私钥,保障每次的公钥和私钥均不一样,以此来保障发言间隔时间数据传输的安全性。本发明实施例中,直播客户端和服务器的私钥使用随机数生成,然后调用RSA(公钥加密算法)生成对应的公钥。S201: The live client logs in to the server, and the live client and the server generate the public key and the private key by using an asymmetric algorithm. Further, each time the live client logs in to the server, a pair of public and private keys are generated to ensure each time. The public key and the private key are different, so as to ensure the security of the data transmission during the interval. In the embodiment of the present invention, the private key of the live client and the server is generated by using a random number, and then RSA (public key encryption algorithm) is called to generate a corresponding public key.
对于直播客户端生成的公钥和私钥:For the public and private keys generated by the live client:
1、生成随机数,相应代码为anddata=rand();即通过调用安卓***函数rand来生成一段随机数Randdata。1, generate a random number, the corresponding code is anddata = rand (); that is, by calling the Android system function rand to generate a random number Randdata.
2、依据随机数生成Md5值做为私钥,相应代码为:2. Generate the Md5 value as a private key based on the random number. The corresponding code is:
ClientPrivatekey=Md5.Create(Randdata)ClientPrivatekey=Md5.Create(Randdata)
即通过调用Md5函数的接口Md5.Create来对随机数计算其Md5值,从而得到了私钥数据。That is, the Md5 value is calculated for the random number by calling the interface Md5.Create of the Md5 function, thereby obtaining the private key data.
3、计算公钥,相应代码为:3. Calculate the public key, the corresponding code is:
ClientPublickey=RSA.CreatePair(ClientPrivatekey);ClientPublickey=RSA.CreatePair(ClientPrivatekey);
即调用RSA的生成配对钥匙接口RSA.CreatePair来生成公钥。That is, the RSA generation pairing key interface RSA.CreatePair is called to generate the public key.
至此,完成直播客户端公钥和私钥的生成。At this point, the generation of the public key and private key of the live client is completed.
对于服务器生成的公钥和私钥:For server generated public and private keys:
1、生成随机数,相应代码为anddata=rand();即通过调用安卓***函数rand来生成一段随机数Randdata。1, generate a random number, the corresponding code is anddata = rand (); that is, by calling the Android system function rand to generate a random number Randdata.
2、依据随机数和用户ID数生成Md5值做为私钥,相应代码为:2. Generate the Md5 value as a private key based on the random number and the number of user IDs. The corresponding code is:
ServerPrivatekey=Md5.Create(Randdata+Uid)ServerPrivatekey=Md5.Create(Randdata+Uid)
即通过调用Md5函数的接口Md5.Create来对拼接后的随机数和用户ID数一起计算Md5值,从而得到了私钥数据。That is, by calling the Md5.Create interface of the Md5 function, the Md5 value is calculated together with the spliced random number and the number of user IDs, thereby obtaining the private key data.
3、计算公钥,相应代码为:3. Calculate the public key, the corresponding code is:
ServerPublickey=RSA.CreatePair(ServerPrivatekey);ServerPublickey=RSA.CreatePair(ServerPrivatekey);
即调用RSA的生成配对钥匙接口RSA.CreatePair来生成公钥。That is, the RSA generation pairing key interface RSA.CreatePair is called to generate the public key.
至此,完成服务器公钥和私钥的生成。At this point, the generation of the server public key and private key is completed.
S202:直播客户端和服务器间交换生成的公钥,且直播客户端和服务器使用新得到的公钥和和原有的私钥生成密匙,且直播客户端和服务器生成的密匙相同。即服务器和客户端会交换各自的公钥信息,来生成一个共享的秘钥,并且客户端和服务器生成的共享秘钥是同一个值。具体的:S202: The generated public key is exchanged between the live client and the server, and the live client and the server use the newly obtained public key and the original private key to generate a key, and the key generated by the live client and the server is the same. That is, the server and the client exchange their respective public key information to generate a shared secret key, and the shared secret key generated by the client and the server is the same value. specific:
1、互换公钥。服务器将服务器的公钥ServerPublickey发送给客户端。客户端将客户端的公钥ClientPublickey发送给服务器。1. Exchange public keys. The server sends the server's public key ServerPublickey to the client. The client sends the client's public key ClientPublickey to the server.
2、客户端生成共享秘钥,相应代码为:ShareKey=RSA.CreateShareKey(ServerPublickey,ClientPrivatekey)。2. The client generates a shared secret key. The corresponding code is: ShareKey=RSA.CreateShareKey(ServerPublickey, ClientPrivatekey).
3、服务器生成共享秘钥,相应代码为:ShareKey=RSA.CreateShareKey(ClientPublickey,ServerPrivatekey)。3. The server generates a shared secret key. The corresponding code is: ShareKey=RSA.CreateShareKey(ClientPublickey, ServerPrivatekey).
至此,客户端和服务器均完成秘钥ShareKey的生成,且客户端和服务器的秘钥ShareKey相同。At this point, both the client and the server complete the generation of the key ShareKey, and the client and the server's secret Key are the same.
S203:服务器使用生成的密匙并结合DES加密算法对发送给当前直播客户端登录用户的发言间隔时间数据进行加密。直播客户端登录到服务器后,服务器便会读取该直播客户端登录用户的发言间隔时间,并使用之前得到的秘钥进行加密,从而保障数据在网络传输中的安全性,防止黑客得到用户的发言间隔时间数据而篡改该数据以绕过直播客户端对弹幕发送间隔时间的检测。服务器使用DES加密算法来对用户的发言间隔时间数据进行加密,相应代码为:S203: The server encrypts the speaking interval time data sent to the current live client login user by using the generated key and the DES encryption algorithm. After the live client logs in to the server, the server reads the interval between the users logging in to the live client and encrypts the key obtained before, so as to ensure the security of the data in the network transmission and prevent the hacker from getting the user. The interval data is spoken and the data is tampered to bypass the detection of the barrage transmission interval by the live client. The server uses the DES encryption algorithm to encrypt the user's speaking interval data. The corresponding code is:
encryptData=DES.encrypt(“time”,ShareKey);encryptData=DES.encrypt("time",ShareKey);
其中,DES.encrypt则是加密算法DES的加密接口;参数“time”是用户的发言间隔时间;参数ShareKey是之前步骤生成的共享密钥;返回值encryptData则是生成的加密后的结果。加密后的发言间隔时 间数据通过网络发送至直播客户端。DES.encrypt is the encryption interface of the encryption algorithm DES; the parameter "time" is the interval of the user's speech; the parameter ShareKey is the shared key generated by the previous step; the return value encryptData is the generated encrypted result. The encrypted speech interval time data is sent to the live client via the network.
S204:直播客户端使用全局变量保存服务器发送的加密后的发言间隔时间数据,暂时先不对该数据进行解密,直播客户端使用全局变量保护服务器下发的加密encryptData,保障数据在内存中的安全性。使用全局变量保存encryptData的代码为:G_encryptData=encryptData。S204: The live broadcast client uses the global variable to save the encrypted interleave time data sent by the server, and does not decrypt the data for the time being. The live client uses the global variable to protect the encrypted encryptData sent by the server to ensure the security of the data in the memory. . The code to save encryptData using global variables is: G_encryptData=encryptData.
在一种实施方式中,服务器对于下发给直播客户端的发言间隔时间数据的加密,服务器使用生成的密匙和上条成功发送弹幕的发送时间一起计算得到MD5值,并将该MD5值作为DES加密算法的key值对当前直播客户端登录用户的发言间隔时间数据进行加密,后续的直播服务器则对应使用算法对加密的发言间隔时间数据进行解密。具体的:In an implementation manner, the server encrypts the interval data of the speech sent to the live client, and the server calculates the MD5 value by using the generated key and the sending time of the successfully transmitted barrage, and uses the MD5 value as the MD5 value. The key value of the DES encryption algorithm encrypts the interval data of the current live client login user, and the subsequent live server uses the algorithm to decrypt the encrypted speech interval data. specific:
key=Md5.Create(time2+ShareKey)Key=Md5.Create(time2+ShareKey)
G_encryptData=DES.encrypt(time,key)G_encryptData=DES.encrypt(time,key)
使用计算得到的sharekey和上条弹幕成功发送的时间一起计算得到其MD5值,并使用此md5值作为加密时的key值,保证每次加密值总在变化,进一步提高被黑客破解的门槛。Use the calculated sharekey and the time of the successful transmission of the barrage to calculate the MD5 value, and use the md5 value as the key value during encryption to ensure that the encryption value is always changing every time, further improving the threshold of being hacked.
S2:直播客户端解密发言间隔时间数据,具体的,直播客户端获取保存发言间隔时间数据的全局变量,同时使用生成的密匙并结合DES加密算法对加密的发言间隔时间数据解密,得到发言间隔时间,解密代码为Time=DES.decrypt(G_encryptData,ShareKey);S2: The live client decrypts the interval data of the speaking interval. Specifically, the live client obtains the global variable for storing the interval data of the speaking interval, and simultaneously decrypts the encrypted interval data by using the generated key and the DES encryption algorithm to obtain the speaking interval. Time, the decryption code is Time=DES.decrypt(G_encryptData,ShareKey);
然后计算当前待发送弹幕和该用户上条成功发送弹幕间的时间间隔,并与解密得到的发言间隔时间比对,若小于,则丢弃当前待发送弹幕,若不小于,则将当前待发送弹幕发送至服务器。本发明实施例中,直播客户端使用待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔;服务器使用接收到的待发送弹幕的生成 时间与用户上条成功发送弹幕的发送时间计算时间间隔。Then, the time interval between the current to-be-transmitted barrage and the user's last successful transmission of the barrage is calculated, and compared with the interval of the speeches obtained by the decryption. If it is less than, the current to-be-sending barrage is discarded. If not less, the current The barrage to be sent is sent to the server. In the embodiment of the present invention, the live broadcast client uses the generation time of the to-be-sending barrage and the transmission time of the user to successfully send the barrage to calculate the time interval; the server uses the received generation time of the to-be-sent of the barrage to be successfully sent by the user. The time interval for the transmission time of the barrage.
用户经服务器成功向所有直播客户端发送一条弹幕,服务器便会记录该条弹幕成功发送的时间并通知所有直播客户端,因此当用户在直播客户端中编辑完待发送弹幕并点击发送按钮,此刻的时间即为该条待发送弹幕的生成时间。例如待发送弹幕时间生成时间为time2,上条已成功发送的弹幕的发送时间为time1,则两者间的时间间隔为time2-time1=elapse,然后与解密得到的发言间隔时间比对,若小于,则丢弃当前待发送弹幕,并提示用户存在发言间隔限制,若不小于,则将当前待发送弹幕发送至服务器。After the user successfully sends a barrage to all live clients via the server, the server will record the time when the barrage was successfully sent and notify all live clients, so when the user edits the barrage to be sent in the live client and clicks to send Button, the time at the moment is the generation time of the bar to be sent. For example, the time to generate the barrage time is time2, and the time of sending the barrage that has been successfully sent is time1, then the time interval between the two is time2-time1=elapse, and then the time interval between the speeches obtained by the decryption is compared. If the value is less than, the current to-be-sending barrage is discarded, and the user is prompted to have a speaking interval limit. If not, the current to-be-sent barrage is sent to the server.
S3:服务器接收待发送弹幕计算接收的待发送弹幕和该用户上条成功发送弹幕间时间间隔并与预设时间间隔比对,若小于,则丢弃待发送弹幕,若不小于,则发送待发送弹幕至所有直播客户端,完成待发送弹幕的成功发送。S3: The server receives the to-be-transmitted bullet screen received by the to-be-sending barrage and the time interval between the successful transmission of the barrage of the user and compares it with the preset time interval. If it is less than, the discard to be sent is discarded, if not less than Then, the to-be-sent bullet is sent to all the live broadcast clients, and the successful transmission of the to-be-sending barrage is completed.
本发明的弹幕发送间隔控制方法当直播客户端登录服务器后,服务器将当前用户的发言间隔时间数据加密后发送至直播客户端,使得直播客户端用户在发送待发送弹幕时,基于获取的发言间隔时间判断当前待发送弹幕是否满足发言间隔时间,若不满足则丢弃,且满足的待发送弹幕发送至服务器后,服务器还会再次进行判断,满足则才会发送至所有直播客户端,实现对用户待发送的每一条弹幕的时间间隔进行精确控制,减轻服务器的计算资源压力,且节约直播平台的带宽资源消耗,减少非法弹幕的产生,保证用户对直播的正常观看,以及在一定程度上减轻直播平台的带宽消耗损失。The barrage interval control method of the present invention, after the live client logs in to the server, the server encrypts the current user's speech interval time data and sends the data to the live client, so that the live client user sends the to-be-sending barrage based on the acquired The interval of the speech is judged whether the current to-be-sending barrage meets the interval of the speech. If it is not satisfied, the discard is discarded. After the satisfied barrage is sent to the server, the server will judge again. If it is satisfied, it will be sent to all live clients. To accurately control the time interval of each barrage to be sent by the user, reduce the computing resource pressure of the server, save the bandwidth resource consumption of the live platform, reduce the generation of illegal barrage, and ensure the normal viewing of the live broadcast by the user, and To some extent, the bandwidth consumption loss of the live platform is reduced.
另外,对应上述弹幕发送间隔控制方法,本发明还提供一种存储介质,存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述各实施例所述的弹幕发送间隔控制方法的步骤。需要说明的 是,所述存储介质包括U盘、移动硬盘、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, in accordance with the foregoing method for controlling the transmission interval of the barrage, the present invention further provides a storage medium on which a computer program is stored, and when the computer program is executed by the processor, the method for controlling the transmission interval of the barrage described in the above embodiments is implemented. step. It should be noted that the storage medium includes a U disk, a mobile hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a disk or an optical disk, and the like. The medium of the code.
参见图2所示,对应上述弹幕发送间隔控制方法,本发明还提供一种事电子设备,包括存储器和处理器,存储器上储存有在处理器上运行的计算机程序,处理器执行计算机程序时实现上述各实施例的弹幕发送间隔控制方法。Referring to FIG. 2, in accordance with the above-described barrage transmission interval control method, the present invention further provides an electronic device including a memory and a processor, wherein the memory stores a computer program running on the processor, and when the processor executes the computer program, The barrage transmission interval control method of each of the above embodiments is implemented.
本发明还提供一种基于上述弹幕发送间隔控制方法的弹幕发送间隔控制***,包括数据发送模块、判断模块和弹幕发送执行模块。The invention also provides a barrage transmission interval control system based on the above-mentioned barrage transmission interval control method, which comprises a data transmission module, a judgment module and a barrage transmission execution module.
数据发送模块用于当直播客户端登录服务器,服务器将预设的当前直播客户端登录用户发言间隔时间数据加密后发送至直播客户端;判断模块用于使直播客户端解密发言间隔时间数据,并计算当前待发送弹幕和该用户上条成功发送弹幕间的时间间隔,并与解密得到的发言间隔时间比对,若小于,则丢弃当前待发送弹幕,若不小于,则将当前待发送弹幕发送至服务器;弹幕发送执行模块用于使服务器计算接收的待发送弹幕和该用户上条成功发送弹幕间时间间隔并与预设时间间隔比对,若小于,则丢弃待发送弹幕,若不小于,则发送待发送弹幕至所有直播客户端,完成待发送弹幕的成功发送。The data sending module is configured to: when the live client logs in to the server, the server encrypts the preset current live client login user interval interval data and sends the data to the live client; the determining module is configured to enable the live client to decrypt the speaking interval time data, and Calculate the time interval between the current to-be-sending barrage and the user's last successful transmission of the barrage, and compare it with the interval of the speeches obtained by the decryption. If it is less than, discard the current to-be-sending barrage. If it is not less than, it will be currently waiting. The sending bar is sent to the server; the barrage sending and executing module is configured to enable the server to calculate the time interval between the received barrage to be sent and the user to successfully send the barrage and compare it with the preset time interval. Send the barrage. If it is not less than, send the salute to be sent to all live clients to complete the successful transmission of the barrage to be sent.
判断模块使用待发送弹幕预的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔;弹幕发送执行模块使用接收到的待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔。直播客户端登录服务器,直播客户端和服务器使用非对称算法均生成公钥和私钥;直播客户端和服务器间交换生成的公钥,且直播客户端和服务器使用新得到的公钥和和原有的私钥生成密匙,且直播客户端和服务器生成的密匙相同。The judging module calculates the time interval between the generation time of the to-be-sending barrage and the sending time of the user successfully sending the barrage; the barrage sending execution module uses the generated generation time of the to-be-transmitted barrage and the user successfully sends the barrage The transmission time is calculated by the time interval. The live client logs in to the server. The live client and the server use the asymmetric algorithm to generate the public key and the private key. The live client and the server exchange the generated public key, and the live client and server use the newly obtained public key and the original. Some private keys generate keys, and the live client and the server generate the same key.
本发明实施例的弹幕发送间隔控制***,当直播客户端登录服务器后,数据发送模块使服务器将当前用户的发言间隔时间数据加密后发送至直播客户端,使得直播客户端用户在发送待发送弹幕时,基于获取的发言间隔时间判断当前待发送弹幕是否满足发言间隔时间,若不满足则丢弃,且满足的待发送弹幕发送至服务器后,服务器还会再次进行判断,满足则才会通过弹幕发送执行模块发送至弹幕所有直播客户端,实现对用户待发送的每一条弹幕的时间间隔进行精确控制,减轻服务器的计算资源压力,且节约直播平台的带宽资源消耗,减少非法弹幕的产生,保证用户对直播的正常观看,以及在一定程度上减轻直播平台的带宽消耗损失。In the barrage interval control system of the embodiment of the present invention, after the live client logs in to the server, the data sending module enables the server to encrypt the current interval time data of the current user and send the data to the live client, so that the live client user is sent to be sent. When the barrage is performed, it is judged whether the current to-be-transmitted barrage meets the interval of the speech interval based on the obtained interval of the speech. If it is not satisfied, the discard is discarded, and the satisfied barrage to be sent is sent to the server, and the server will judge again. It will be sent to all live broadcast clients of the barrage through the barrage sending execution module, which can accurately control the time interval of each barrage to be sent by the user, reduce the computing resource pressure of the server, and save the bandwidth resource consumption of the live broadcast platform and reduce The production of illegal barrage ensures the normal viewing of the live broadcast by the user and the loss of bandwidth consumption of the live broadcast platform to a certain extent.
本发明不局限于上述实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围之内。本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。The present invention is not limited to the above embodiments, and those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. These improvements and retouchings are also considered as protection of the present invention. Within the scope. The contents not described in detail in the present specification belong to the prior art well known to those skilled in the art.

Claims (10)

  1. 一种弹幕发送间隔控制方法,适用于Android***端运行的直播客户端,其特征在于,包括:A barrage sending interval control method is applicable to a live client running on an Android system, and is characterized in that:
    直播客户端登录服务器,服务器将预设的当前直播客户端登录用户发言间隔时间数据加密后发送至直播客户端;The live client logs in to the server, and the server encrypts the preset live broadcast client login interval data and sends it to the live client.
    直播客户端解密发言间隔时间数据,并计算当前待发送弹幕和该用户上条成功发送弹幕间的时间间隔,并与解密得到的发言间隔时间比对,若小于,则丢弃当前待发送弹幕,若不小于,则将当前待发送弹幕发送至服务器;The live client decrypts the interval data of the speech, and calculates the time interval between the current to-be-transmitted barrage and the successful transmission of the barrage of the user, and compares with the interval of the speech obtained by the decryption. If it is smaller, the current to-be-transmitted bomb is discarded. If not less than, the current to-be-sending barrage is sent to the server;
    服务器接收待发送弹幕计算接收的待发送弹幕和该用户上条成功发送弹幕间时间间隔并与预设时间间隔比对,若小于,则丢弃待发送弹幕,若不小于,则发送待发送弹幕至所有直播客户端,完成待发送弹幕的成功发送。The server receives the time interval between the to-be-transmitted barrage received by the to-be-sending barrage and the successful transmission of the barrage of the user, and compares it with the preset time interval. If it is less than, the discard to be sent is discarded, if not less than, the packet is sent. Wait for the bullet to be sent to all live broadcast clients to complete the successful transmission of the to-be-sending barrage.
  2. 如权利要求1所述的一种弹幕发送间隔控制方法,其特征在于:A barrage transmission interval control method according to claim 1, wherein:
    直播客户端使用待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔;The live client calculates the time interval between the generation time of the to-be-sending barrage and the sending time of the user's last successful delivery of the barrage;
    服务器使用接收到的待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔。The server calculates the time interval between the generated time of the received salvage screen and the sending time of the user successfully sending the barrage.
  3. 如权利要求1所述的一种弹幕发送间隔控制方法,其特征在于:A barrage transmission interval control method according to claim 1, wherein:
    直播客户端登录服务器,直播客户端和服务器使用非对称算法均生成公钥和私钥;The live client logs in to the server, and the live client and the server generate the public and private keys using asymmetric algorithms.
    直播客户端和服务器间交换生成的公钥,且直播客户端和服务器使用新得到的公钥和和原有的私钥生成密匙,且直播客户端和服务器 生成的密匙相同。The generated public key is exchanged between the live client and the server, and the live client and the server use the newly obtained public key and the original private key to generate the key, and the key generated by the live client and the server is the same.
  4. 如权利要求3所述的一种弹幕发送间隔控制方法,其特征在于:A barrage transmission interval control method according to claim 3, wherein:
    服务器使用生成的密匙并结合DES加密算法对发送给当前直播客户端登录用户的发言间隔时间数据进行加密;The server encrypts the speaking interval data sent to the current live client login user by using the generated key and the DES encryption algorithm;
    直播客户端使用全局变量保存服务器发送的发言间隔时间数据;The live broadcast client uses global variables to save the interval data of the speech sent by the server;
    直播客户端获取保存发言间隔时间数据的全局变量,同时使用生成的密匙并结合DES加密算法对加密的发言间隔时间数据解密,得到发言间隔时间。The live client obtains the global variable for saving the interval data of the utterance, and uses the generated key and the DES encryption algorithm to decrypt the encrypted interval time data to obtain the utterance interval.
  5. 如权利要求3所述的一种弹幕发送间隔控制方法,其特征在于:A barrage transmission interval control method according to claim 3, wherein:
    服务器使用生成的密匙和上条成功发送弹幕的发送时间一起计算得到MD5值,并将该MD5值作为DES加密算法的key值对当前直播客户端登录用户的发言间隔时间数据进行加密。The server uses the generated key to calculate the MD5 value together with the sending time of the successfully transmitted barrage, and uses the MD5 value as the key value of the DES encryption algorithm to encrypt the floor interval data of the current live client login user.
  6. 一种存储介质,该存储介质上存储有计算机程序,其特征在于:所述计算机程序被处理器执行时实现权利要求1至5任一项所述的方法。A storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the method of any one of claims 1 to 5.
  7. 一种电子设备,包括存储器和处理器,存储器上储存有在处理器上运行的计算机程序,其特征在于:所述处理器执行所述计算机程序时实现权利要求1至5任一项所述的方法。An electronic device comprising a memory and a processor, the memory having stored thereon a computer program running on the processor, wherein the processor executes the computer program to implement the method of any one of claims 1 to method.
  8. 一种弹幕发送间隔控制***,其特征在于,包括:A barrage transmission interval control system, comprising:
    数据发送模块,其用于当直播客户端登录服务器,服务器将预设的当前直播客户端登录用户发言间隔时间数据加密后发送至直播客户端;a data sending module, configured to: when the live client logs in to the server, the server encrypts the preset current live client login user interval interval data and sends the data to the live client;
    判断模块,其用于使直播客户端解密发言间隔时间数据,并计算 当前待发送弹幕和该用户上条成功发送弹幕间的时间间隔,并与解密得到的发言间隔时间比对,若小于,则丢弃当前待发送弹幕,若不小于,则将当前待发送弹幕发送至服务器;a judging module, configured to enable the live client to decrypt the interleave time data, and calculate a time interval between the current to-be-transmitted barrage and the user's last successful transmission of the barrage, and compare with the interleave time obtained by the decryption, if less than , the current to-be-sending barrage is discarded, and if not less than, the current to-be-sending barrage is sent to the server;
    弹幕发送执行模块,其用于使服务器计算接收的待发送弹幕和该用户上条成功发送弹幕间时间间隔并与预设时间间隔比对,若小于,则丢弃待发送弹幕,若不小于,则发送待发送弹幕至所有直播客户端,完成待发送弹幕的成功发送。The barrage sending execution module is configured to enable the server to calculate the time interval between the received barrage to be sent and the user to successfully send the barrage and compare it with the preset time interval. If less than, the discard to be sent is discarded. If it is not less than, send the to-be-sent bullet to all live clients to complete the successful transmission of the to-be-sending barrage.
  9. 如权利要求8所述的一种弹幕发送间隔控制***,其特征在于:所述判断模块使用待发送弹幕预的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔;所述弹幕发送执行模块使用接收到的待发送弹幕的生成时间与用户上条成功发送弹幕的发送时间计算时间间隔。A barrage transmission interval control system according to claim 8, wherein: said judging module calculates a time interval between a generation time of the to-be-transmitted barrage pre-sent and a transmission time of the user successfully transmitting the barrage; The barrage sending execution module calculates the time interval between the generated time of the received salvage screen and the sending time of the user successfully sending the barrage.
  10. 如权利要求8所述的一种弹幕发送间隔控制***,其特征在于:直播客户端登录服务器,直播客户端和服务器使用非对称算法均生成公钥和私钥;直播客户端和服务器间交换生成的公钥,且直播客户端和服务器使用新得到的公钥和和原有的私钥生成密匙,且直播客户端和服务器生成的密匙相同。A barrage transmission interval control system according to claim 8, wherein the live client logs in to the server, and the live client and the server generate the public key and the private key using an asymmetric algorithm; and exchange between the live client and the server. The generated public key, and the live client and server use the newly obtained public key and the original private key to generate the key, and the key generated by the live client and the server is the same.
PCT/CN2018/081293 2018-01-09 2018-03-30 Bullet screen sending interval control method, storage medium, electronic device, and system WO2019136846A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810017884.X 2018-01-09
CN201810017884.XA CN108289253A (en) 2018-01-09 2018-01-09 Barrage sends interval control method, storage medium, electronic equipment and system

Publications (1)

Publication Number Publication Date
WO2019136846A1 true WO2019136846A1 (en) 2019-07-18

Family

ID=62835216

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081293 WO2019136846A1 (en) 2018-01-09 2018-03-30 Bullet screen sending interval control method, storage medium, electronic device, and system

Country Status (2)

Country Link
CN (1) CN108289253A (en)
WO (1) WO2019136846A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110058101A1 (en) * 2009-09-03 2011-03-10 Fox Broadcasting Company Method and apparatus for concurrent broadcast of media program and social networking derived information exchange
CN105516820A (en) * 2015-12-10 2016-04-20 腾讯科技(深圳)有限公司 Barrage interaction method and device
CN105872781A (en) * 2016-05-31 2016-08-17 武汉斗鱼网络科技有限公司 Bullet-screen-controlled speech filtering control method and device
CN106028069A (en) * 2016-05-16 2016-10-12 Tcl集团股份有限公司 Method and system for displaying live bullet screen based on smart television
CN106993234A (en) * 2017-03-22 2017-07-28 北京潘达互娱科技有限公司 Barrage display methods and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4263218B2 (en) * 2006-12-11 2009-05-13 株式会社ドワンゴ Comment distribution system, comment distribution server, terminal device, comment distribution method, and program
CN101459506B (en) * 2007-12-14 2011-09-14 华为技术有限公司 Cipher key negotiation method, system, customer terminal and server for cipher key negotiation
CN103001976A (en) * 2012-12-28 2013-03-27 中国科学院计算机网络信息中心 Safe network information transmission method
CN105491458B (en) * 2015-11-27 2018-11-27 武汉斗鱼网络科技有限公司 The optimization method of barrage time limit of speech in a kind of webcast website
CN106131696B (en) * 2016-06-20 2019-03-05 武汉斗鱼网络科技有限公司 A kind of barrage sending control method and device
CN106101851B (en) * 2016-07-01 2019-04-23 上海幻电信息科技有限公司 A kind of whole realization method and system of barrage service
CN106899877A (en) * 2017-03-16 2017-06-27 武汉斗鱼网络科技有限公司 barrage sending method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110058101A1 (en) * 2009-09-03 2011-03-10 Fox Broadcasting Company Method and apparatus for concurrent broadcast of media program and social networking derived information exchange
CN105516820A (en) * 2015-12-10 2016-04-20 腾讯科技(深圳)有限公司 Barrage interaction method and device
CN106028069A (en) * 2016-05-16 2016-10-12 Tcl集团股份有限公司 Method and system for displaying live bullet screen based on smart television
CN105872781A (en) * 2016-05-31 2016-08-17 武汉斗鱼网络科技有限公司 Bullet-screen-controlled speech filtering control method and device
CN106993234A (en) * 2017-03-22 2017-07-28 北京潘达互娱科技有限公司 Barrage display methods and device

Also Published As

Publication number Publication date
CN108289253A (en) 2018-07-17

Similar Documents

Publication Publication Date Title
US10003465B2 (en) System and method of encrypting authentication information
EP3324572B1 (en) Information transmission method and mobile device
CN110249336B (en) Addressing trusted execution environments using signing keys
WO2020019387A1 (en) Method for acquiring video resource file, and management system
US11470060B2 (en) Private exchange of encrypted data over a computer network
CN108881966B (en) Information processing method and related equipment
US20230132485A1 (en) System for Thin Client Devices in Hybrid Edge Cloud Systems
CN111741268A (en) Video transmission method, device, server, equipment and medium
CN113395406A (en) Encryption authentication method and system based on power equipment fingerprints
US20220247729A1 (en) Message transmitting system with hardware security module
CN113630412B (en) Resource downloading method, resource downloading device, electronic equipment and storage medium
WO2019136840A1 (en) Bullet screen posting time control method and system, and storage medium and electronic device
US20240064143A1 (en) Methods, mediums, and systems for verifying devices in an encrypted messaging system
CN112927026A (en) Coupon processing method and device, electronic equipment and computer storage medium
CN111382451A (en) Security level identification method and device, electronic equipment and storage medium
US9825942B2 (en) System and method of authenticating a live video stream
CN110380843B (en) Information processing method and related equipment
US8699710B2 (en) Controlled security domains
WO2019136846A1 (en) Bullet screen sending interval control method, storage medium, electronic device, and system
WO2018054144A1 (en) Method, apparatus, device and system for dynamically generating symmetric key
CN110381342B (en) Information processing method and related equipment
CN108769748B (en) Information processing method and related equipment
CN108769718B (en) Barrage verification method, computer equipment and storage medium
CN116506120B (en) Key loading method, key system and readable storage medium
CN111970281B (en) Routing equipment remote control method and system based on verification server and electronic equipment

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: 18900488

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: 18900488

Country of ref document: EP

Kind code of ref document: A1