WO2019134303A1 - 直播间人气处理方法、装置、服务器及存储介质 - Google Patents

直播间人气处理方法、装置、服务器及存储介质 Download PDF

Info

Publication number
WO2019134303A1
WO2019134303A1 PCT/CN2018/084110 CN2018084110W WO2019134303A1 WO 2019134303 A1 WO2019134303 A1 WO 2019134303A1 CN 2018084110 W CN2018084110 W CN 2018084110W WO 2019134303 A1 WO2019134303 A1 WO 2019134303A1
Authority
WO
WIPO (PCT)
Prior art keywords
detection code
code segment
data
server
target detection
Prior art date
Application number
PCT/CN2018/084110
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 WO2019134303A1 publication Critical patent/WO2019134303A1/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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/4508Management of client data or end-user data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8543Content authoring using a description language, e.g. Multimedia and Hypermedia information coding Expert Group [MHEG], eXtensible Markup Language [XML]

Definitions

  • the present disclosure relates to the field of live broadcast technologies, and in particular, to a live broadcast processing method, apparatus, server, and storage medium.
  • the popularity service mainly solves the illusion of watching a large number of viewers in the live broadcast by forcing a large number of fake client users to simultaneously log into the live broadcast room by cracking the network protocol of the live broadcast platform. This kind of behavior not only violates the principle of good faith, but also causes losses to the live broadcast platform.
  • the purpose of the present disclosure is to provide a method, a device, a server, and a storage medium for processing popularity in a live room to improve the problem of forging popularity data by using a popular service.
  • an embodiment of the present disclosure provides a method for processing popularity between live broadcasts, where the method is applied to a server, and the server is communicably connected to a plurality of clients, and the method includes: randomly selecting one from a pre-stored detection code segment.
  • a target detection code segment wherein at least one global variable information corresponding to the HTML5 characteristic is set in the target detection code segment; the selected target detection code segment is sent to a target client that accesses the live room to be detected; Execution data of the target detection code segment that is output by the target client, wherein the execution data includes a global mark that records an execution process of the target detection code segment, the global mark and the target detection code segment Corresponding to the global variable information, the popularity data corresponding to the to-be-detected live broadcast is counted according to the received execution data corresponding to the to-be-detected live broadcast.
  • execution data further includes execution result data
  • step of acquiring and analyzing the popularity data corresponding to the to-be-detected live broadcast according to the received execution data corresponding to the to-be-detected broadcast includes:
  • Seizing the masquerading execution data in the qualified data wherein, in the qualified data, the execution data that is identical to the masquerading execution data exceeds a predetermined number;
  • the method further includes: when detecting that the target client accesses the to-be-detected live broadcast room, exchanging a key with the target client to generate a shared key corresponding to the target client;
  • the method further includes: performing decryption processing on the execution data by using the corresponding shared key to obtain the corresponding global mark and Execution result data.
  • the step of exchanging a key with the target client includes:
  • the target client Receiving a second public key that is fed back by the target client, where the second public key is a public key corresponding to the to-be-detected live broadcast generated by the target client when accessing the live broadcast to be detected.
  • the step of exchanging a key with the target client includes:
  • step of decrypting the execution data by using the corresponding shared key includes:
  • the execution data is decrypted according to the time stamp and the shared key, and the execution data is generated by the target client by using the shared key and creating a timestamp corresponding to the WebSocket connection.
  • the pre-stored detection code segment includes configuring to create a canvas element, create a WebSocket connection server, create a video playback control, A detection code fragment that acquires current browser information, obtains a browser window size, obtains a current domain name, and acquires at least one function of a browser operating system platform.
  • the pre-stored detection code fragment is configured to create a canvas element after running, the corresponding code is:
  • the corresponding global variable information is g_flagCanvas, and g_flagCanvas records whether to create a Canvas.
  • the pre-stored detection code segment is configured to create a video playback control after running
  • the corresponding global variable information is defined as g_video
  • g_video is configured to record whether the video control is supported.
  • the pre-stored detection code fragment is configured to acquire current browser information after running
  • the pre-stored detection code fragment is configured to acquire the browser window size after running
  • g_domain window.location.host.
  • the pre-stored detection code fragment is configured to create a WebSocket connection server after running, after receiving the WebSocket connection, obtain a corresponding UID according to the connection and a timestamp corresponding to the creation of the connection, and store the record as a WebSocket connection record.
  • an embodiment of the present disclosure provides a live broadcast processing method, where the method is applied to a target client, where the target client is in communication with a server, and the target client is configured to access the live broadcast to be detected.
  • the method includes: receiving a target detection code segment sent by the server, wherein the target detection code segment is randomly selected by the server from a pre-stored detection code segment, and at least one of the target detection code segments is set Global variable information corresponding to the HTML5 characteristic; executing the target detection code segment to obtain execution result data; extracting a global mark corresponding to the global variable information from the executed target detection code segment; according to the global mark And executing the result data to generate the execution data; and sending the execution data to the server, so that the server acquires and analyzes the popularity data corresponding to the to-be-detected live broadcast according to the received execution data.
  • the method further includes: generating a second public key corresponding to the visited live broadcast to be detected; and when receiving the first public key sent by the server, sending the second public key to the server; Generating a shared key according to the first public key and the second public key;
  • the generating the execution data according to the global mark and the execution result data comprises: performing encryption processing on the global mark and the execution result data by using the shared key to obtain the execution data.
  • the step of generating a shared key according to the first public key and the second public key includes:
  • the step of generating a second public key corresponding to the visited live broadcast to be detected includes:
  • ClientPrivatekey Md5.Create(Randdata+RoomId) to generate a private key corresponding to the live broadcast;
  • an embodiment of the present disclosure provides a live room popularity processing device, where the device is applied to a server, and the server is communicatively connected to a plurality of clients, and the device includes: a selection module configured to detect from a pre-stored The code segment randomly selects a target detection code segment, wherein at least one global variable information corresponding to the HTML5 characteristic is set in the target detection code segment, and the sending module is configured to send the selected target detection code segment to the access to be detected.
  • the receiving module is configured to receive execution data of the target detection code segment that is fed back by the target client, where the execution data includes a global record of the execution process of the target detection code segment Marking, the global mark is corresponding to the global variable information in the target detection code segment;
  • the processing module is configured to acquire and analyze the to-be-detected live room according to the received execution data corresponding to the to-be-detected live broadcast Corresponding popularity data.
  • an embodiment of the present disclosure provides a server, where the server is communicatively connected to a plurality of clients, the server includes: a memory; a processor; and a live room popularity processing device, where the live room popularity processing device is installed
  • the memory includes one or more software function modules executed by the processor, and the live room popularity processing device includes: a selection module configured to randomly select a target detection code segment from the pre-stored detection code segments.
  • At least one global variable information corresponding to the HTML5 characteristic is set in the target detection code segment; the sending module is configured to send the selected target detection code segment to the target client that accesses the live broadcast to be detected; the receiving module Configuring to receive execution data of the target detection code segment fed back by the target client, wherein the execution data includes a global mark that records an execution process of the target detection code segment, the global mark and the Correspondence of global variable information in the target detection code segment; processing mode Configured according to the received execution data corresponding to the broadcast to be detected between, to acquire and analyze the popularity among data corresponding to the broadcast to be detected.
  • an embodiment of the present disclosure provides a storage medium having stored thereon a computer program that, when executed by a processor, implements any of the above methods.
  • the present disclosure provides a live broadcast popularity processing method, which randomly selects a target detection code segment in which at least one global variable information corresponding to an HTML5 characteristic is set from a pre-stored detection code segment, and sends it to Accessing a target client of the live broadcast to be detected to receive execution data of the target detection code segment that is fed back by the target client. Since the virtual client does not run the target detection code segment in the running environment of the HTML5 protocol, the fake popularity data can be screened out by checking the global flag of the execution data in which the target detection code segment is executed. The accurate popularity data corresponding to the live broadcast to be detected is counted. Ensure that users get real-life information and improve the user experience. At the same time, it can also help the live broadcast platform to effectively manage the live broadcast room.
  • FIG. 1 shows a schematic diagram of an application environment of the present disclosure.
  • FIG. 2 is a block schematic diagram of a server according to a preferred embodiment of the present disclosure.
  • FIG. 3 is a flowchart of a method for processing popularity among live broadcasts according to a first embodiment of the present disclosure.
  • FIG. 4 is a flowchart of a method for processing popularity between live broadcasts according to a second embodiment of the present disclosure.
  • FIG. 5 is a schematic block diagram of a live air handling device according to an embodiment of the present disclosure.
  • Icon 100-server; 200-client; 400-live room popularity processing device; 111-memory; 112-processor; 113-communication unit; 401-switch module; 402-select module; 403-send module; Receive module; 405-decode module; 406-processing module.
  • the server 100 and the client 200 can be connected by a wired or wireless network.
  • the selected live broadcast room is implemented.
  • the client 200 can be installed in an electronic device (not shown) and corresponds to the server 100.
  • the user can access the server 100 by using the client 200, and can access the selected live broadcast room to watch the live broadcast through the corresponding browser.
  • the above electronic devices may include smart phones, tablet computers, e-book readers, laptop portable computers, computers, notebook computers, and the like.
  • the above-mentioned live broadcast room provides services for the server 100.
  • the server 100 includes a live broadcast popularity processing device 400, a memory 111, a processor 112, and a communication unit 113.
  • the components of the memory 111, the processor 112, and the communication unit 113 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 live room popularity processing apparatus 400 includes at least one software function module that can be stored in the memory 111 or solidified in an operating system (OS) of the server 100 in the form of software or firmware.
  • the processor 112 is configured to execute an executable module stored in the memory 111, such as a software function module, a computer program, and the like included in the live broadcast processing device 400.
  • the memory 111 can be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a 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 memory 111 is configured to store programs and voice data, and the processor 112 executes the programs after receiving the execution instructions.
  • the communication unit 113 is configured to perform data transmission and reception with the client 200.
  • FIG. 2 is only a schematic structural diagram of the server 100, and the server 100 may further include more or less components than those shown in FIG. 2, or have a configuration different 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 flow chart of steps of a method for processing popularity among live broadcasts according to a preferred embodiment of the present disclosure.
  • the live room popularity processing method described above is applied to the server 100 in FIG. As shown in FIG. 3, the method includes:
  • Step S101 When detecting that the target client accesses the to-be-detected live broadcast room, exchange a key with the target client to generate a shared key corresponding to the target client.
  • each time the client 200 accesses a live broadcast room a pair of public and private keys corresponding to the live broadcast are created.
  • the private key can use any data.
  • an asymmetric encryption algorithm can be used to generate the public key corresponding to the private key.
  • the private key and the public key are uniquely paired.
  • the generated random data and the MD5 value of the corresponding room number between the live broadcasts may be used as a private key, and the preset function is generated according to the private key to generate a public key.
  • the preset function may be a pairing key of the RSA generation. Interface RSA.CreatePair.
  • the server 100 When detecting that the client 200 accesses the live broadcast room, the server 100 generates a private key and a public key corresponding to the live broadcast room and the client 200. Optionally, the server 100 generates a corresponding public key and a private key according to the corresponding room number between the live broadcasts, the UID corresponding to the client 200, and the generated random data.
  • the server 100 can invoke the same asymmetric encryption algorithm as the client 200 to generate a pair of public and private keys.
  • the function called can be the same as the function called by client 200.
  • the client 200 accessing the live room to be detected is the target client.
  • the server 100 detects that the target client accesses the to-be-detected live broadcast room, the generated first public key corresponding to the live broadcast to be detected and the target client is sent to the target client.
  • the target client feeds back to the server 100 the second public key corresponding to the time when the live broadcast to be detected is accessed.
  • the shared key is generated by using the first public key and the second public key, respectively, and the generated shared key is the same.
  • ServerPublickey is the first public key
  • ClientPrivatekey is the second public key.
  • the function that generates the shared key is the function CreateShareKey, which is also the interface of the asymmetric encryption algorithm.
  • Step S102 randomly selecting a target detection code segment from a plurality of detection code segments stored in advance.
  • the detection code fragment may be a JS code fragment. At least one global variable information corresponding to the HTML5 characteristic is set in the target detection code fragment.
  • the pre-stored detection code segment may include configuring to create a canvas element, create a WebSocket connection server 100, create a video playback control, obtain current browser information, obtain a browser window size, obtain a current domain name, and obtain A detection code fragment of at least one function in the browser's operating system platform.
  • the detection code fragment when the detection code fragment is configured to run to create a canvas element, the corresponding code is:
  • the corresponding global variable information is g_flagCanvas.
  • the default value of g_flagCanvas is equal to 0, and the default value is only 1 when Canvas is supported. That is, although the virtual client 200 can decipher the communication protocol of the server 100, the execution result of the canvas element is returned to the server 100 as successful, but since it does not run under the HTML5 protocol, the corresponding global The variable information g_flagCanvas will remain at its default value. In this embodiment, whether the Canvas is created by the g_flagCanvas; when the detection code segment is configured to run the video playback control, the corresponding global variable information is defined as g_video, and it should be noted that the webpage does not support playing the video.
  • g_video is configured to record whether video controls are supported. If it is executed in a browser that supports HTML5, the value of g_video is set.
  • a WebSocket connection is sent to the server 100.
  • the server 100 acquires the corresponding UID and the timestamp corresponding to the creation of the connection according to the connection, and stores it as a WebSocket connection record.
  • the detection code segments each include a function of implementing the creation of the WebSocket connection server 100.
  • the target detection code segment that can implement the at least one function may be randomly selected from the pre-stored detection code segments; or the target detection code segment may be selected by using a polling manner, where the polling
  • the method means that there are many detection code segments, and the selection part can be executed to perform the inspection, or both can be executed, and all the inspection fragment codes are executed sequentially; or different target detection code fragments can be separately selected for different rooms.
  • Step S103 Send the selected target detection code segment to the target client that accesses the live room to be detected.
  • the target detection code fragment is transmitted to the target client.
  • the virtual client 200 does not execute the target detection code segment, and only sends the execution result to the server 100 after relying on the deciphered protocol, for example, feedback to create a video playback space success or a specific size data of the browser window. .
  • Step S104 Receive execution data of the target detection code segment that is fed back by the target client.
  • the execution data includes a global mark and an execution result in which the execution process of the target detection code segment is recorded.
  • the global flag corresponds to global variable information in the target detection code segment.
  • the above global mark is a value corresponding to the global variable information extracted from the target detection code segment after execution by the client 200.
  • the target client encrypts the execution data using the shared key.
  • the target client may encrypt the execution data by using the shared key and creating a timestamp corresponding to the WebSocket connection, and feed back to the server 100 after the encryption.
  • Step S105 Perform decryption processing on the execution data by using the corresponding shared key to obtain corresponding global mark and execution result data.
  • the UID corresponding to the target client is used to query whether there is a corresponding WebSocket connection record.
  • the above WebSocket connection record is generated by the server 100 based on the received WebSocket connection.
  • the WebSocket connection is created by the target client by using a corresponding UID and a corresponding timestamp.
  • the corresponding timestamp is obtained, and the execution data is decrypted according to the timestamp and the shared key to obtain the corresponding global mark and execution result data. In this way, the security of the data is guaranteed.
  • the shared key is used for encryption and decryption processing, and the shared key is obtained by calculation, and is not transmitted over the network, so it is more secure.
  • Step S106 Acquire and analyze the popularity data corresponding to the to-be-detected live broadcast according to the received execution data corresponding to the to-be-detected live broadcast.
  • each target detection code segment corresponds to a predetermined requirement.
  • the target detection code fragment is configured to implement a JS code fragment for creating a canvas element
  • the global flag corresponding to g_flagCanvas is 1 and the execution result is that the creation is successful, and the predetermined requirement is met.
  • both the global mark and the execution result data are satisfied, it is confirmed that the corresponding execution data is qualified data.
  • the masquerading execution data in the qualified data is then screened out. Further, in the eligible data, when one execution data is identical to the other than a predetermined number of execution data, they are all identified as masquerading execution data.
  • the statistics screen the number of eligible data of the masquerading execution data as the popularity data.
  • FIG. 4 is a flow chart of steps of a method for processing popularity among live broadcasts according to a preferred embodiment of the present disclosure.
  • the live room popularity processing method described above is applied to the client 200. Further, it is applied to the target client that accesses the live room to be detected. As shown in FIG. 4, the method includes:
  • Step S201 receiving a target detection code segment sent by the server 100.
  • the target detection code segment is randomly selected by the server 100 from a pre-stored detection code segment, and at least one global variable information corresponding to the HTML5 characteristic is set in the target detection code segment.
  • the target client Before the step, the target client generates a second public key corresponding to the visited live broadcast to be detected when entering the to-be-detected live broadcast room, so that when the first public key sent by the server 100 is received, The server 100 transmits the second public key; and generates a shared key according to the first public key and the second public key.
  • Step S202 executing the target detection code segment to obtain execution result data.
  • Step S203 extracting a global mark corresponding to the global variable information from the executed target detection code segment.
  • Step S204 generating execution data according to the global mark and the execution result data.
  • the global mark and the execution result data are encrypted by the shared key to obtain the execution data.
  • step S205 the execution data is sent to the server 100, so that the server 100 acquires and analyzes the popularity data corresponding to the to-be-detected live broadcast according to the received execution data.
  • a preferred embodiment of the present disclosure provides a live room popularity processing apparatus 400.
  • the device is applied to the server 100.
  • the live room popularity processing device 400 includes a switch module 401, a selection module 402, a sending module 403, a receiving module 404, a decoding module 405, and a processing module 406.
  • the switching module 401 is configured to exchange a key with the target client to generate a shared key corresponding to the target client when detecting that the target client accesses the to-be-detected live room.
  • step S101 may be performed by the switching module 401.
  • the selecting module 402 is configured to randomly select a target detection code segment from the pre-stored detection code segment, wherein at least one global variable information corresponding to the HTML5 characteristic is set in the target detection code segment.
  • step S102 may be performed by the selection module 402.
  • the sending module 403 is configured to send the selected target detection code segment to the target client that accesses the live room to be detected.
  • step S103 may be performed by the transmitting module 403.
  • the receiving module 404 is configured to receive execution data of the target detection code segment that is fed back by the target client, where the execution data includes a global mark that records an execution process of the target detection code segment, the global mark Corresponding to the global variable information in the target detection code segment.
  • step S104 may be performed by the receiving module 404.
  • the decoding module 405 is configured to decrypt the execution data by using the corresponding shared key to obtain the corresponding global mark and execution result data.
  • step S105 may be performed by decoding module 405.
  • the processing module 406 is configured to acquire and analyze the popularity data corresponding to the to-be-detected live broadcast according to the received execution data corresponding to the to-be-detected live broadcast.
  • step S106 may be performed by processing module 406.
  • the embodiment of the present disclosure further discloses a computer readable storage medium having stored thereon a computer program, which is executed by the processor 103 to implement the live broadcast popularity processing method disclosed in the foregoing embodiments of the present disclosure.
  • the present disclosure provides a live broadcast processing method, apparatus, server, and storage medium.
  • the method is applied to a server, and the server is communicatively coupled to a plurality of clients, the method comprising: randomly selecting a target detection code segment from a pre-stored detection code segment, wherein the target detection code segment is set At least one global variable information corresponding to the HTML5 characteristic; sending the selected target detection code segment to a target client accessing the live broadcast to be detected; and receiving execution data of the target detection code segment fed back by the target client
  • the execution data includes a global mark that records an execution process of the target detection code segment, the global mark corresponding to global variable information in the target detection code segment; according to the received and the to-be-tested live broadcast
  • the corresponding execution data can be used to screen out the false popularity data, and the accurate popularity data corresponding to the live broadcast to be detected is counted. Ensure that users get real-life information and improve the user experience. At the same time, it can also help the live broadcast platform to effectively manage the live broadcast room
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more configurations configured to perform the specified logical functions. Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in various embodiments of the present disclosure may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • a computer readable storage medium including: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like.
  • the live broadcast processing method, device, server and storage medium provided by the disclosure can screen out false popularity data, and calculate accurate popularity data corresponding to the live broadcast to be detected, thereby ensuring that the user can obtain real popularity information and improve users. Experience. At the same time, it can also help the live broadcast platform to effectively manage the live broadcast room.

Abstract

本公开提供的直播间人气处理方法、装置、服务器及存储介质。其中,所述方法通过从预先存储的检测代码片段随机选取一目标检测代码片段,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息,将选取的目标检测代码片段发送给访问待检测直播间的目标客户端,以接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,根据所述执行数据中记录了目标检测代码片段执行过程的全局标记,筛除虚假的人气数据,统计出所述待检测直播间对应的准确的人气数据。确保用户可以获得真实的人气信息,提高用户体验。同时还能有助于直播平台对直播间进行有效的管理。

Description

直播间人气处理方法、装置、服务器及存储介质
相关申请的交叉引用
本公开要求于2018年01月02日提交中国专利局的公开号为2018100007047、名称为“直播间人气处理方法、装置、服务器及存储介质”的中国专利公开的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及直播技术领域,具体而言,涉及一种直播间人气处理方法、装置、服务器及存储介质。
背景技术
随着网络通信技术的进步和宽带网络的提速,网络直播得到了越来越多的发展和应用。为了获得更多的关注与收益,存在一些主播通过从恶意第三方购买刷人气服务。该刷人气服务主要通过破解直播平台的网络协议,以伪造大量的虚假客户端用户同时登陆到直播间,给使用者营造直播间大量观众观看的假象。这种行为不仅与诚信原则相违背,同时也会对直播平台造成损失。
发明内容
本公开的目的在于提供一种直播间人气处理方法、装置、服务器及存储介质,用以改善直播间通过借助刷人气服务伪造人气数据的问题。
为了实现上述目的,本公开实施例采用的技术方案如下:
第一方面,本公开实施例提供一种直播间人气处理方法,所述方法应用于服务器,所述服务器与多个客户端通信连接,所述方法包括:从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端;接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应;根据接收到的与所述待检测直播间对应的执行数据,统计所述待检测直播间对应的人气数据。
进一步地,所述执行数据还包括执行结果数据,所述根据接收到的与所述待检测直 播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据的步骤包括:
分别验证所述全局标记及执行结果数据是否满足预定要求;
当所述全局标记及执行结果数据均满足时,确认对应的所述执行数据为合格数据;
将所述合格数据中的伪装执行数据筛除,其中,在所述合格数据中,与所述伪装执行数据完全相同的所述执行数据超过预定数目;
统计筛除了所述伪装执行数据的合格数据的数量,以作为所述人气数据。
进一步地,所述方法还包括:当检测到所述目标客户端访问所述待检测直播间时,与所述目标客户端交换密钥,以生成与所述目标客户端对应的共享密钥;
在所述获取并分析所述待检测直播间对应的人气之前,所述方法还包括:分别利用对应的所述共享密钥对所述执行数据进行解密处理,以获得对应的所述全局标记及执行结果数据。
进一步地,所述与所述目标客户端交换密钥的步骤包括:
将预设生成的与所述待检测直播间对应的第一公钥向所述目标客户端发送,以使所述目标客户端获取到对应所述共享密钥;
接收所述目标客户端反馈的第二公钥,其中,所述第二公钥为所述目标客户端访问所述待检测直播间时生成的与所述待检测直播间对应的公钥。
进一步地,所述与所述目标客户端交换密钥的步骤包括:
依照直播间对应的房间号、客户端对应的UID以及生成的随机数据,生成与所述待检测直播间对应的公钥及私钥,以生成所述第一公钥。
进一步地,所述利用对应的所述共享密钥对所述执行数据进行解密处理的步骤包括:
利用所述目标客户端对应的UID查询是否存在对应的WebSocket连接记录,其中,所述WebSocket连接记录由所述服务器根据接收到的WebSocket连接生成,所述WebSocket连接由所述目标客户端利用对应的UID及对应的时间戳创建;
当存在时,获取对应的所述时间戳;
根据所述时间戳及共享密钥对所述执行数据进行解密,所述执行数据由所述目标客户端利用所述共享密钥及创建所述WebSocket连接对应的时间戳进行加密生成。
进一步地,所述从预先存储的检测代码片段随机选取一目标检测代码片段的步骤中,所述预先存储的检测代码片段包括配置为实现创建一个canvas元素、创建WebSocket连接服务器、创建视频播放控件、获取当前浏览器信息、获取浏览器窗口大小、获取当前域名、获取浏览器的操作系统平台中至少一种功能的检测代码片段。
进一步地,当所述预先存储的检测代码片段配置为运行后创建一个canvas元素时, 对应的代码为:
var canvas=document.createElement('canvas');
If(canvas)
{g_flagCanvas=1;}
而其中对应的全局变量信息为g_flagCanvas,由g_flagCanvas记录是否创建Canvas。
进一步地,当所述预先存储的检测代码片段配置为运行后创建视频播放控件时,对应的全局变量信息定义为g_video,g_video配置为记录视频控件是否支持。
进一步地,当所述预先存储的检测代码片段配置为运行后获取当前浏览器信息时,对应的全局变量信息定义为g_broswe,g_broswe=navigator.appCodeName。
进一步地,当所述预先存储的检测代码片段配置为运行后获取浏览器窗口大小时,对应的全局变量信息定义为g_winHeight,g_winHeight=window.innerHeight。
进一步地,当所述预先存储的检测代码片段配置为运行后获取当前域名时,对应的全局变量信息定义为g_domain,本实施例中,g_domain=window.location.host。
进一步地,当所述预先存储的检测代码片段配置为运行后创建WebSocket连接服务器时,接收到WebSocket连接后,根据该连接获取对应的UID及创建连接时对应的时间戳,并存储为WebSocket连接记录。
第二方面,本公开实施例提供一种直播间人气处理方法,所述方法应用于目标客户端,所述目标客户端与服务器通信连接,所述目标客户端配置为访问所述待检测直播间,所述方法包括:接收所述服务器发送的目标检测代码片段,其中,所述目标检测代码片段由所述服务器从预先存储的检测代码片段随机选取,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;执行所述目标检测代码片段,以获得执行结果数据;从执行后的所述目标检测代码片段中提取与所述全局变量信息对应的全局标记;根据所述全局标记及执行结果数据生成执行数据;将所述执行数据发送至所述服务器,以便所述服务器根据接收到的所述执行数据获取并分析所述待检测直播间对应的人气数据。
进一步地,所述方法还包括:生成与访问的待检测直播间对应的第二公钥;当接收到所述服务器发送的第一公钥时,向所述服务器发送所述第二公钥;根据所述第一公钥及第二公钥生成共享密钥;
所述根据所述全局标记及执行结果数据生成执行数据包括:利用所述共享密钥对所述全局标记及执行结果数据进行加密处理,以获得所述执行数据。
进一步地,所述根据所述第一公钥及第二公钥生成共享密钥的步骤包括:
利用函数ShareKey=RSA.CreateShareKey(ServerPublickey,ClientPrivatekey)生成 共享密钥,其中,ServerPublickey为第一公钥,ClientPrivatekey为第二公钥。
进一步地,所述生成与访问的待检测直播间对应的第二公钥的步骤包括:
调用Randdata=rand()函数生成一段随机数据Randdata;
利用函数ClientPrivatekey=Md5.Create(Randdata+RoomId)生成与访问直播间对应的私钥;
调用函数ClientPublickey=RSA.CreatePair(ClientPrivatekey)生成对应的所述第二公钥。
第三方面,本公开实施例提供一种直播间人气处理装置,所述装置应用于服务器,所述服务器与多个客户端通信连接,所述装置包括:选取模块,配置为从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;发送模块,配置为将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端;接收模块,配置为接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应;处理模块,配置为根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据。
第四方面,本公开实施例提供一种服务器,所述服务器与多个客户端通信连接,所述服务器包括:存储器;处理器;以及直播间人气处理装置,所述直播间人气处理装置安装于所述存储器中并包括一个或多个由所述处理器执行的软件功能模组,所述直播间人气处理装置包括:选取模块,配置为从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;发送模块,配置为将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端;接收模块,配置为接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应;处理模块,配置为根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据。
第五方面,本公开实施例提供一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现任一上述的方法。
与现有技术相比,本公开提供的一种直播间人气处理方法,通过从预先存储的检测代码片段随机选取设置了至少一个与HTML5特性对应的全局变量信息的目标检测代码片段,并发送至访问待检测直播间的目标客户端,以便接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据。由于虚拟客户端不会在HTML5协议的运行环境下运行目标检 测代码片段,因此,通过核对所述执行数据中记录了所述目标检测代码片段执行过程的全局标记,即可筛除虚假的人气数据,统计出所述待检测直播间对应的准确的人气数据。确保用户可以获得真实的人气信息,提高用户体验。同时还能有助于直播平台对直播间进行有效的管理。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了本公开的应用环境示意图。
图2为本公开较佳实施例提供的服务器的方框示意图。
图3为本公开第一实施例提供的一种直播间人气处理方法的流程图。
图4为本公开第二实施例提供的一种直播间人气处理方法的流程图。
图5为本公开实施例提供的一种直播间人气处理装置的方框示意图。
图标:100-服务器;200-客户端;400-直播间人气处理装置;111-存储器;112-处理器;113-通信单元;401-交换模块;402-选取模块;403-发送模块;404-接收模块;405-解码模块;406-处理模块。
具体实施方式
下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本公开的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
在直播领域,为了获得更多的关注与收益,存在一些主播进行恶意刷人气。恶意刷人 气主要通过破解直播平台的网络协议,以伪造大量的虚假客户端用户同时登陆到直播间,给使用者营造直播间大量观众观看的假象。但是,经发明人观察发现,大量的虚假客户端登陆到直播间,不需要通过浏览器来执行前端的JavaScript代码。同时,随着HTML5技术的发展,HTML5已广泛应用于浏览器中,HTML5也将成为下一代标准HTML协议。从而基于HTML5的新特性越来越多的应用到WEB程序中。因此,本公开基于HTML5的特性提出一种直播间人气处理方法、装置、服务器及存储介质。
本公开下述各实施例如无特别说明均可应用于如图1所示的环境中,如图1所示,服务器100与客户端200之间可以通过有线或无线网络的方式连接。以便于所述客户端200与所述服务器100,进而实现对选中的直播间进行访问。
上述客户端200可以安装于电子设备(图未标)中,与服务器100对应。用户可以使用客户端200对服务器100进行访问,且可以通过对应的浏览器进入选中的直播间观看直播。上述电子设备可以包括智能手机、平板电脑、电子书阅读器、膝上型便携计算机、电脑、笔记本电脑等。上述直播间为服务器100提供的服务。
如图2所示,上述服务器100包括直播间人气处理装置400、存储器111、处理器112、通信单元113。
所述存储器111、处理器112以及通信单元113各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。所述直播间人气处理装置400包括至少一个可以软件或固件(firmware)的形式存储于所述存储器111中或固化在服务器100的操作系统(operating system,OS)中的软件功能模块。所述处理器112配置为执行所述存储器111中存储的可执行模块,例如所述直播间人气处理装置400所包括的软件功能模块及计算机程序等。
其中,所述存储器111可以是,但不限于,随机存取存储器(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)等。其中,存储器111配置为存储程序以及语音数据,所述处理器112在接收到执行指令后,执行所述程序。所述通信单元113配置为与客户端200之间进行数据收发。
应当理解的是,图2所示的结构仅为服务器100的结构示意图,所述服务器100还可包括比图2中所示更多或者更少的组件,或者具有与图2所示不同的配置。图2中所示的各组件可以采用硬件、软件或其组合实现。
第一实施例
请参照图3,是本公开较佳实施例提供一种直播间人气处理方法的步骤流程图。上述直播间人气处理方法应用于图1中的服务器100。如图3所示,所述方法包括:
步骤S101,当检测到所述目标客户端访问所述待检测直播间时,与所述目标客户端交换密钥,以生成与所述目标客户端对应的共享密钥。
需要说明的是,客户端200每次访问一直播间时,均会创建与该直播间对应的一对公钥及私钥。私钥可以使用任意的数据,私钥定下来后,可以使用非对称加密算法来生成和私钥对应的公钥。私钥和公钥唯一配对。可选地,可以采用生成的随机数据和访问直播间对应的房间号的MD5值做为私钥,并依据私钥调用预设函数生成公钥,例如,预设函数可以是RSA的生成配对钥匙接口RSA.CreatePair。作为一种实施方式,可以通过调用Randdata=rand()函数生成一段随机数据Randdata,再利用函数ClientPrivatekey=Md5.Create(Randdata+RoomId)生成与访问直播间对应的私钥,再调用函数ClientPublickey=RSA.CreatePair(ClientPrivatekey)生成对应的公钥。保障每个直播间公钥和私钥不一样,从而提高整个数据传输的安全性。
上述服务器100在检测到客户端200访问直播间时,均会生成与该直播间及客户端200对应的私钥及公钥。可选地,所述服务器100依照直播间对应的房间号、客户端200对应的UID以及生成的随机数据,生成对应的公钥及私钥。所述服务器100可以调用与客户端200同样的非对称加密算法来生成一对公钥及私钥。调用的函数可以与客户端200调用的函数相同。可选地,可以通过调用Randdata=rand()函数生成一段随机数据Randdata,再利用函数ClientPrivatekey=Md5.Create(Randdata+RoomId)生成与客户端200对应的私钥,再调用函数ClientPublickey=RSA.CreatePair(ClientPrivatekey)生成对应的公钥。
在本公开实施例中,访问待检测直播间的客户端200为目标客户端。当服务器100检测到目标客户端访问待检测直播间时,则将生成的与待检测直播间及目标客户端对应的第一公钥向所述目标客户端发送。所述目标客户端接收到第一公钥后,向服务器100反馈访问待检测直播间时生成的与其对应的第二公钥。当所述目标客户端及服务器100均具有第一公钥及第二公钥时,分别利用上述第一公钥及第二公钥生成共享密钥,且生成的共享密钥相同。作为一种实施方式,可以是客户端200利用函数ShareKey=RSA.CreateShareKey(ServerPublickey,ClientPrivatekey)生成共享密钥,服务器100调用ShareKey=RSA.CreateShareKey(ClientPublickey,ServerPrivatekey)生成共享秘钥。ServerPublickey为第一公钥,ClientPrivatekey为第二公钥。其中,生成共享秘钥利用的是函数CreateShareKey,此函数也是非对称加密算法的接口。
步骤S102,从预先存储的多个检测代码片段中随机选取一目标检测代码片段。
在本公开实施例中,上述检测代码片段可以是JS代码片段。上述目标检测代码片段中 设置至少一个与HTML5特性对应的全局变量信息。作为一种实施方式,预先存储的检测代码片段可以包括配置为实现创建一个canvas元素、创建WebSocket连接服务器100、创建视频播放控件、获取当前浏览器信息、获取浏览器窗口大小、获取当前域名、获取浏览器的操作系统平台中至少一种功能的检测代码片段。作为一种实施方式,当检测代码片段配置为运行后创建一个canvas元素时,对应的代码为:
var canvas=document.createElement('canvas');
If(canvas)
{g_flagCanvas=1;}
而其中对应的全局变量信息为g_flagCanvas。g_flagCanvas默认值是等于0,只有支持Canvas时默认值才是1。也就是虚拟客户端200虽然可以在破译了服务器100的通信协议后,向服务器100反馈创建canvas元素的执行结果为成功,但是由于其并没有在HTML5协议下的浏览器运行,因此,对应的全局变量信息g_flagCanvas会依然保持默认值。本实施例中,可以由g_flagCanvas记录是否创建Canvas;当检测代码片段配置为运行后创建视频播放控件时,对应的全局变量信息定义为g_video,需要说明的是,网页其实是不支持播放视频的,而目前大多是通过网页插件如Flash来进行播放,而HTML5则是支持视频播放控件创建的,g_video配置为记录视频控件是否支持,如果其是在支持HTML5的浏览器中执行,g_video的值被置为0,否则获取不到上述的值,其值依然保持是0;当检测代码片段配置为运行后获取当前浏览器信息时,对应的全局变量信息定义为g_broswe,本实施例中,g_broswe=navigator.appCodeName,也就是在浏览器环境下执行该检测代码片段获取到当前浏览器信息时,g_broswe会由0置为1;当检测代码片段配置为运行后获取浏览器窗口大小时,对应的全局变量信息定义为g_winHeight,本实施例中,g_winHeight=window.innerHeight,也就是在浏览器环境下执行该检测代码片段获取到浏览器窗口大小时,g_winHeight会由0置为1;当检测代码片段配置为运行后获取当前域名时,对应的全局变量信息定义为g_domain,本实施例中,g_domain=window.location.host,也就是在浏览器环境下执行该检测代码片段获取到当前域名时,window.location.host会由0置为1;当检测代码片段配置为运行后创建WebSocket连接服务器100时。在HTML5浏览器下运行的真实目标客户端才可以利用自身对应的UID及创建连接时对应的时间戳创建WebSocket连接。进一步地,可以运行该检测代码片段通过:
var socket=new WebSocket('服务器100域名');
Socket.send(“uid+time”)
向服务器100发送WebSocket连接。服务器100在接收到WebSocket连接后,根据该连接获取对应的UID及创建连接时对应的时间戳,并存储为WebSocket连接记录。作为一 种可以的实施方式,检测代码片段均包括实现创建WebSocket连接服务器100的功能。本公开实施例中,可以随机抽选预存储的检测代码片段中选取可以实现上述至少一项功能的目标检测代码片段;也可以采用轮询的方式选出目标检测代码片段,其中,轮询的方式是指检测代码片段有很多,可以选择部分来执行进行检查,也可以都执行,顺序地执行所有的检查片段代码;也可以分别为不同的房间挑选不同的目标检测代码片段。
步骤S103,将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端。
在本公开实施例中,将目标检测代码片段发送给目标客户端。需要说明的是,相关技术中,虚拟客户端200不执行目标检测代码片段,其仅依靠破译的协议后向服务器100发送执行结果,例如,反馈创建视频播放空间成功或浏览器窗口的具体尺寸数据。
步骤S104,接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据。
在本公开实施例中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记及执行结果。上述全局标记与所述目标检测代码片段中的全局变量信息对应。上述全局标记为从客户端200从执行后的目标检测代码片段中提取全局变量信息对应的取值。目标客户端将执行数据利用共享密钥进行加密。可选地,目标客户端可以利用共享密钥及创建WebSocket连接对应的时间戳对执行数据进行加密,并在加密之后反馈给服务器100。
步骤S105,分别利用对应的所述共享密钥对所述执行数据进行解密处理,以获得对应的所述全局标记及执行结果数据。
在本公开实施例中,利用所述目标客户端对应的UID查询是否存在对应的WebSocket连接记录。上述WebSocket连接记录由服务器100根据接收到的WebSocket连接生成。所述WebSocket连接由所述目标客户端利用对应的UID及对应的时间戳创建。当存在时,获取对应的所述时间戳,根据所述时间戳及共享密钥对所述执行数据进行解密,以获得对应的所述全局标记及执行结果数据。这样,保障数据的安全性。本实施例中,使用共享密钥进行加密和解密处理,共享密钥是通过计算得到的,没有在网络传输,所以更安全。
步骤S106,根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据。
在本公开实施例中,可以通过分别验证所述全局标记及执行结果数据是否满足预定要求。每一个目标检测代码片段对应一预定要求,例如,目标检测代码片段为配置为实现创建一个canvas元素的JS代码片段时,对应于g_flagCanvas的全局标记为1且执行结果为创建成功则满足预定要求。进一步地,当所述全局标记及执行结果数据均满足时,确认对应的所述执行数据为合格数据。再将所述合格数据中的伪装执行数据筛除。进一步地,在所述合格数据中,当一个执行数据与其他超过预定数目的执行数据完全相同,则将它们均认定为伪装执行数据。统计筛除了所述伪装执行数据的合格数据的数量,以作为所述人气数 据。
第二实施例
请参照图4,是本公开较佳实施例提供一种直播间人气处理方法的步骤流程图。上述直播间人气处理方法应用于客户端200。进一步地,应用于访问待检测直播间的目标客户端。如图4所示,所述方法包括:
步骤S201,接收所述服务器100发送的目标检测代码片段。
在本公开实施例中,所述目标检测代码片段由所述服务器100从预先存储的检测代码片段随机选取,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息。
在该步骤之前,目标客户端在进入待检测直播间时,生成与访问的待检测直播间对应的第二公钥,以便当接收到所述服务器100发送的第一公钥时,向所述服务器100发送所述第二公钥;根据所述第一公钥及第二公钥生成共享密钥。
步骤S202,执行所述目标检测代码片段,以获得执行结果数据。
步骤S203,从执行后的所述目标检测代码片段中提取与所述全局变量信息对应的全局标记。
步骤S204,根据所述全局标记及执行结果数据生成执行数据。
在本公开实施例中,利用所述共享密钥对所述全局标记及执行结果数据进行加密处理,以获得所述执行数据。
步骤S205,将所述执行数据发送至所述服务器100,以便所述服务器100根据接收到的所述执行数据获取并分析所述待检测直播间对应的人气数据。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的方法的具体流程与第一实施例提供的直播间人气处理方法对应,可以参考前述实施例中的对应过程,在此不再赘述。
第三实施例
请参照图5,是本公开较佳实施例提供一种直播间人气处理装置400。所述装置应用于服务器100。所述直播间人气处理装置400包括交换模块401、选取模块402、发送模块403、接收模块404、解码模块405及处理模块406。
交换模块401,配置为当检测到所述目标客户端访问所述待检测直播间时,与所述目标客户端交换密钥,以生成与所述目标客户端对应的共享密钥。
在本公开实施例中,步骤S101可以由交换模块401执行。
选取模块402,配置为从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息。
在本公开实施例中,步骤S102可以由选取模块402执行。
发送模块403,配置为将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端。
在本公开实施例中,步骤S103可以由发送模块403执行。
接收模块404,配置为接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应。
在本公开实施例中,步骤S104可以由接收模块404执行。
解码模块405,配置为分别利用对应的所述共享密钥对所述执行数据进行解密处理,以获得对应的所述全局标记及执行结果数据。
在本公开实施例中,步骤S105可以由解码模块405执行。
处理模块406,配置为根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据。
在本公开实施例中,步骤S106可以由处理模块406执行。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本公开实施例还揭示了一种计算机可读的存储介质,其上存储有计算机程序,所述计算机程序被处理器103执行时实现本公开前述实施例揭示的直播间人气处理方法。
综上所述,本公开提供的直播间人气处理方法、装置、服务器及存储介质。其中,所述方法应用于服务器,所述服务器与多个客户端通信连接,所述方法包括:从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端;接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应;根据接收到的与所述待检测直播间对应的执行数据,即可筛除虚假的人气数据,统计出所述待检测直播间对应的准确的人气数据。确保用户可以获得真实的人气信息,提高用户体验。同时还能有助于直播平台对直播间进行有效的管理。
在本公开所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本公开的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的 一部分,所述模块、程序段或代码的一部分包含一个或多个配置为实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本公开各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应所述以权利要求的保护范围为准。
工业实用性
本公开提供的直播间人气处理方法、装置、服务器及存储介质可筛除虚假的人气数据,统计出所述待检测直播间对应的准确的人气数据,确保用户可以获得真实的人气信息,提高用户体验。同时还能有助于直播平台对直播间进行有效的管理。

Claims (20)

  1. 一种直播间人气处理方法,其特征在于,所述方法应用于服务器,所述服务器与多个客户端通信连接,所述方法包括:
    从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;
    将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端;
    接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应;
    根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据。
  2. 如权利要求1所述的方法,其特征在于,所述执行数据还包括执行结果数据,所述根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据的步骤包括:
    分别验证所述全局标记及执行结果数据是否满足预定要求;
    当所述全局标记及执行结果数据均满足时,确认对应的所述执行数据为合格数据;
    将所述合格数据中的伪装执行数据筛除,其中,在所述合格数据中,与所述伪装执行数据完全相同的所述执行数据超过预定数目;
    统计筛除了所述伪装执行数据的合格数据的数量,以作为所述人气数据。
  3. 如权利要求2所述的方法,其特征在于,
    所述方法还包括:当检测到所述目标客户端访问所述待检测直播间时,与所述目标客户端交换密钥,以生成与所述目标客户端对应的共享密钥;
    在所述获取并分析所述待检测直播间对应的人气之前,所述方法还包括:分别利用对应的所述共享密钥对所述执行数据进行解密处理,以获得对应的所述全局标记及执行结果数据。
  4. 如权利要求3所述的方法,其特征在于,所述与所述目标客户端交换密钥的步骤包括:
    将预设生成的与所述待检测直播间对应的第一公钥向所述目标客户端发送,以使所述目标客户端获取到对应所述共享密钥;
    接收所述目标客户端反馈的第二公钥,其中,所述第二公钥为所述目标客户端访问所述待检测直播间时生成的与所述待检测直播间对应的公钥。
  5. 如权利要求4所述的方法,其特征在于,所述与所述目标客户端交换密钥的步骤包括:
    依照直播间对应的房间号、客户端对应的UID以及生成的随机数据,生成与所述待检测直播间对应的公钥及私钥,以生成所述第一公钥。
  6. 如权利要求3-5任一项所述的方法,其特征在于,所述利用对应的所述共享密钥对所述执行数据进行解密处理的步骤包括:
    利用所述目标客户端对应的UID查询是否存在对应的WebSocket连接记录,其中,所述WebSocket连接记录由所述服务器根据接收到的WebSocket连接生成,所述WebSocket连接由所述目标客户端利用对应的UID及对应的时间戳创建;
    当存在时,获取对应的所述时间戳;
    根据所述时间戳及共享密钥对所述执行数据进行解密,所述执行数据由所述目标客户端利用所述共享密钥及创建所述WebSocket连接对应的时间戳进行加密生成。
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述从预先存储的检测代码片段随机选取一目标检测代码片段的步骤中,所述预先存储的检测代码片段包括配置为实现创建一个canvas元素、创建WebSocket连接服务器、创建视频播放控件、获取当前浏览器信息、获取浏览器窗口大小、获取当前域名、获取浏览器的操作系统平台中至少一种功能的检测代码片段。
  8. 如权利要求7所述的方法,其特征在于,当所述预先存储的检测代码片段配置为运行后创建一个canvas元素时,对应的代码为:
    var canvas=document.createElement('canvas');
    If(canvas)
    {g_flagCanvas=1;}
    而其中对应的全局变量信息为g_flagCanvas,由g_flagCanvas记录是否创建Canvas。
  9. 如权利要求7所述的方法,其特征在于,当所述预先存储的检测代码片段配置为运行后创建视频播放控件时,对应的全局变量信息定义为g_video,g_video配置为记录视频控件是否支持。
  10. 如权利要求7所述的方法,其特征在于,当所述预先存储的检测代码片段配置为运行后获取当前浏览器信息时,对应的全局变量信息定义为g_broswe,g_broswe=navigator.appCodeName。
  11. 如权利要求7所述的方法,其特征在于,当所述预先存储的检测代码片段配置为运行后获取浏览器窗口大小时,对应的全局变量信息定义为g_winHeight, g_winHeight=window.innerHeight。
  12. 如权利要求7所述的方法,其特征在于,当所述预先存储的检测代码片段配置为运行后获取当前域名时,对应的全局变量信息定义为g_domain,本实施例中,g_domain=window.location.host。
  13. 如权利要求7所述的方法,其特征在于,当所述预先存储的检测代码片段配置为运行后创建WebSocket连接服务器时,接收到WebSocket连接后,根据该连接获取对应的UID及创建连接时对应的时间戳,并存储为WebSocket连接记录。
  14. 一种直播间人气处理方法,其特征在于,所述方法应用于目标客户端,所述目标客户端与服务器通信连接,所述目标客户端配置为访问待检测直播间,所述方法包括:
    接收所述服务器发送的目标检测代码片段,其中,所述目标检测代码片段由所述服务器从预先存储的检测代码片段随机选取,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;
    执行所述目标检测代码片段,以获得执行结果数据;
    从执行后的所述目标检测代码片段中提取与所述全局变量信息对应的全局标记;
    根据所述全局标记及执行结果数据生成执行数据;
    将所述执行数据发送至所述服务器,以便所述服务器根据接收到的所述执行数据获取并分析所述待检测直播间对应的人气数据。
  15. 如权利要求14所述的方法,其特征在于,
    所述方法还包括:生成与访问的待检测直播间对应的第二公钥;当接收到所述服务器发送的第一公钥时,向所述服务器发送所述第二公钥;根据所述第一公钥及第二公钥生成共享密钥;
    所述根据所述全局标记及执行结果数据生成执行数据包括:利用所述共享密钥对所述全局标记及执行结果数据进行加密处理,以获得所述执行数据。
  16. 如权利要求15所述的方法,其特征在于,所述根据所述第一公钥及第二公钥生成共享密钥的步骤包括:
    利用函数ShareKey=RSA.CreateShareKey(ServerPublickey,ClientPrivatekey)生成共享密钥,其中,ServerPublickey为第一公钥,ClientPrivatekey为第二公钥。
  17. 如权利要求15所述的方法,其特征在于,所述生成与访问的待检测直播间对应的第二公钥的步骤包括:
    调用Randdata=rand()函数生成一段随机数据Randdata;
    利用函数ClientPrivatekey=Md5.Create(Randdata+RoomId)生成与访问直播间对 应的私钥;
    调用函数ClientPublickey=RSA.CreatePair(ClientPrivatekey)生成对应的所述第二公钥。
  18. 一种直播间人气处理装置,其特征在于,所述装置应用于服务器,所述服务器与多个客户端通信连接,所述装置包括:
    选取模块,配置为从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;
    发送模块,配置为将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端;
    接收模块,配置为接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应;
    处理模块,配置为根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据。
  19. 一种服务器,其特征在于,所述服务器与多个客户端通信连接,所述服务器包括:
    存储器;
    处理器;以及
    直播间人气处理装置,所述直播间人气处理装置安装于所述存储器中并包括一个或多个由所述处理器执行的软件功能模组,所述直播间人气处理装置包括:
    选取模块,配置为从预先存储的检测代码片段随机选取一目标检测代码片段,其中,所述目标检测代码片段中设置至少一个与HTML5特性对应的全局变量信息;
    发送模块,配置为将选取的所述目标检测代码片段发送给访问待检测直播间的目标客户端;
    接收模块,配置为接收所述目标客户端反馈的执行所述目标检测代码片段的执行数据,其中,所述执行数据包括记录了所述目标检测代码片段执行过程的全局标记,所述全局标记与所述目标检测代码片段中的全局变量信息对应;
    处理模块,配置为根据接收到的与所述待检测直播间对应的执行数据,获取并分析所述待检测直播间对应的人气数据。
  20. 一种存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1-13中任一项所述的方法。
PCT/CN2018/084110 2018-01-02 2018-04-23 直播间人气处理方法、装置、服务器及存储介质 WO2019134303A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810000704.7A CN108206972B (zh) 2018-01-02 2018-01-02 直播间人气处理方法、装置、服务器及存储介质
CN201810000704.7 2018-01-02

Publications (1)

Publication Number Publication Date
WO2019134303A1 true WO2019134303A1 (zh) 2019-07-11

Family

ID=62606200

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/084110 WO2019134303A1 (zh) 2018-01-02 2018-04-23 直播间人气处理方法、装置、服务器及存储介质

Country Status (2)

Country Link
CN (1) CN108206972B (zh)
WO (1) WO2019134303A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582954A (zh) * 2020-06-01 2020-08-25 湖南快乐阳光互动娱乐传媒有限公司 一种虚假数据识别方法及装置
CN113329080A (zh) * 2021-05-27 2021-08-31 创新奇智(广州)科技有限公司 基于WebSocket的视频播放方法、装置、电子设备及存储介质
CN113784155A (zh) * 2021-08-12 2021-12-10 阿里巴巴达摩院(杭州)科技有限公司 基于直播间的数据处理方法及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109255371B (zh) * 2018-08-23 2021-06-15 武汉斗鱼网络科技有限公司 一种确定直播平台虚假关注用户的方法以及相关设备
CN110688320B (zh) * 2019-09-30 2023-05-23 潍柴动力股份有限公司 全局变量的检测方法、装置及终端设备
CN111182317B (zh) * 2019-12-13 2022-05-20 广州方硅信息技术有限公司 直播信息提示方法、装置、电子设备及存储介质
CN111478903A (zh) * 2020-04-07 2020-07-31 浙江同花顺智能科技有限公司 一种基于客户端的验证方法、服务器及存储介质
CN111836064B (zh) * 2020-07-02 2022-01-07 北京字节跳动网络技术有限公司 一种直播内容识别方法及装置
CN113068052B (zh) * 2021-03-15 2022-04-01 上海哔哩哔哩科技有限公司 确定直播间刷量的方法、直播方法以及数据处理方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959728A (zh) * 2016-06-27 2016-09-21 武汉斗鱼网络科技有限公司 统计直播平台在线人数的系统及其方法
CN107454441A (zh) * 2017-06-30 2017-12-08 武汉斗鱼网络科技有限公司 一种检测直播间刷人气行为的方法、及直播平台服务器
CN107483972A (zh) * 2017-07-24 2017-12-15 平安科技(深圳)有限公司 一种音视频的直播处理方法、存储介质和一种移动终端

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8489774B2 (en) * 2009-05-27 2013-07-16 Spot411 Technologies, Inc. Synchronized delivery of interactive content
CN106385593B (zh) * 2016-09-14 2019-05-17 武汉斗鱼网络科技有限公司 基于椭圆曲线算法的同时观看直播人数的统计方法及系统
CN107509083B (zh) * 2017-08-31 2018-09-04 武汉斗鱼网络科技有限公司 直播人数真实性检测方法、存储介质、电子设备及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959728A (zh) * 2016-06-27 2016-09-21 武汉斗鱼网络科技有限公司 统计直播平台在线人数的系统及其方法
CN107454441A (zh) * 2017-06-30 2017-12-08 武汉斗鱼网络科技有限公司 一种检测直播间刷人气行为的方法、及直播平台服务器
CN107483972A (zh) * 2017-07-24 2017-12-15 平安科技(深圳)有限公司 一种音视频的直播处理方法、存储介质和一种移动终端

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582954A (zh) * 2020-06-01 2020-08-25 湖南快乐阳光互动娱乐传媒有限公司 一种虚假数据识别方法及装置
CN111582954B (zh) * 2020-06-01 2023-04-28 湖南快乐阳光互动娱乐传媒有限公司 一种虚假数据识别方法及装置
CN113329080A (zh) * 2021-05-27 2021-08-31 创新奇智(广州)科技有限公司 基于WebSocket的视频播放方法、装置、电子设备及存储介质
CN113784155A (zh) * 2021-08-12 2021-12-10 阿里巴巴达摩院(杭州)科技有限公司 基于直播间的数据处理方法及装置

Also Published As

Publication number Publication date
CN108206972B (zh) 2019-10-25
CN108206972A (zh) 2018-06-26

Similar Documents

Publication Publication Date Title
WO2019134303A1 (zh) 直播间人气处理方法、装置、服务器及存储介质
US11055429B2 (en) Key providing method, video playing method, server and client
US10659454B2 (en) Service authorization using auxiliary device
US10645430B2 (en) Reducing time to first encrypted frame in a content stream
US10972908B2 (en) Wireless network connection method, apparatus, and system
KR102146587B1 (ko) 로그인 검증의 방법, 클라이언트, 서버 및 시스템
JP6814147B2 (ja) 端末、方法、不揮発性記憶媒体
US11700433B2 (en) Verifying the rendering of video content at client devices using trusted platform modules
WO2015062378A1 (zh) 一种客户端应用程序的用户注册方法、移动终端及服务器
CN107786331B (zh) 数据处理方法、装置、系统及计算机可读存储介质
CN107196917B (zh) 一种服务响应方法及其中间件
WO2013097588A1 (zh) 应用程序登录方法、装置和移动终端
CN104284213A (zh) 一种防盗链方法、客户端以及系统
US20210192551A1 (en) Using hashed media identifiers to determine audience measurement data including demographic data from third party providers
CN110519268B (zh) 基于区块链的投票方法、装置、设备、系统及存储介质
WO2019001083A1 (zh) 一种视频流地址鉴权方法及装置
WO2019071859A1 (zh) 一种直播平台中防止刷礼物的方法及装置
CN113301431A (zh) 视频数据的加解密方法、装置、电子设备及系统
KR102038963B1 (ko) 오브젝트 특성에 따라 적응적으로 화면 정보 데이터를 보호하는 방법 및 장치
CN110290097B (zh) 数据的处理方法、装置、存储介质和电子装置
WO2016141797A1 (zh) 信息处理方法及装置、计算机可读介质
CN113038192B (zh) 视频处理方法、装置、电子设备和存储介质
CN109120576B (zh) 数据分享方法及装置、计算机设备及存储介质
US11356478B2 (en) Phishing protection using cloning detection
WO2015074450A1 (en) Instant messaging (im) client side data transmission processprocess and apparatus

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

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

Country of ref document: EP

Kind code of ref document: A1