WO2019061628A1 - 一种数据校验方法及服务器 - Google Patents

一种数据校验方法及服务器 Download PDF

Info

Publication number
WO2019061628A1
WO2019061628A1 PCT/CN2017/108058 CN2017108058W WO2019061628A1 WO 2019061628 A1 WO2019061628 A1 WO 2019061628A1 CN 2017108058 W CN2017108058 W CN 2017108058W WO 2019061628 A1 WO2019061628 A1 WO 2019061628A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
blockchain
server
verification result
clients
Prior art date
Application number
PCT/CN2017/108058
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 WO2019061628A1 publication Critical patent/WO2019061628A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data

Definitions

  • the present invention relates to the field of video live broadcast technology, and in particular, to a data verification method and a server.
  • some anchors will increase the number of viewers watching the room at the same time by brushing the popularity, so as to gain revenue.
  • the specific implementation method of popular popularity is on a server with very good performance, through cracking the live broadcast platform.
  • the network protocol while forging a large number of fake client users simultaneously logged into the live broadcast room, thereby forging a large number of viewers, to brush the popularity data between the live broadcasts is relatively high.
  • the embodiment of the invention provides a data verification method and a server for detecting a situation in which a live room forges a fake client to brush popularity.
  • the present application provides a data verification method, the method comprising:
  • the server delivers the first blockchain to all clients in all rooms of the live platform, so that each client receives the first blockchain and generates a second blockchain.
  • S102 The server pairs all the clients of all the rooms in pairs, so that the two paired clients mutually check the second blockchain generated by the other party, and send the verification result to the server;
  • S103 The server obtains a verification result that is respectively fed back by a client in all rooms;
  • S104 The server determines the legality of the client in all rooms of the live broadcast platform according to the verification result respectively fed back by the client in all rooms.
  • the server selects, for the first client on the live broadcast platform, at least one second client on the live broadcast platform to be paired with the second client, and the second client is different from the first client;
  • the step S103 includes:
  • the step S104 includes:
  • first verification result is that the second client is illegal
  • second verification result is that the first client is legal
  • the step S103 includes:
  • the step S104 includes:
  • the most identical verification result is legal, it is determined that the first client is legal, and if at most the same verification result is illegal, it is determined that the first client is illegal.
  • first blockchain and the second blockchain are the same data structure
  • the data structure includes a block number of a blockchain, a hash value of a previous blockchain, a timestamp of a current time, and blockchain function data, the blockchain function data including a room number of the target room, The user identifier of the client and the logo of the client.
  • the application provides a server, where the server includes:
  • a sending module configured to send all the clients of the first blockchain to all rooms of the live platform, so that each client receives the first blockchain and generates a second blockchain;
  • a pairing module configured to pair all the clients of all rooms in pairs, so that the two pairs of clients check each other's second blockchain and send the verification result to the server;
  • the obtaining module is configured to obtain a verification result fed back by the client in all rooms;
  • the determining module is configured to determine the legality of the client in all rooms of the live broadcast platform according to the verification results respectively fed back by the clients in all rooms.
  • pairing module is specifically configured to:
  • the acquiring module is specifically configured to:
  • the determining module is specifically configured to:
  • first verification result is that the second client is illegal
  • second verification result is that the first client is legal
  • the at least one second client only includes multiple second clients
  • the obtaining module is specifically configured to:
  • the determining module is specifically configured to:
  • the most identical verification result is legal, it is determined that the first client is legal, and if at most the same verification result is illegal, it is determined that the first client is illegal.
  • first blockchain and the second blockchain are the same data structure
  • the data structure includes a block number of a blockchain, a hash value of a previous blockchain, a timestamp of a current time, and blockchain function data, the blockchain function data including a room number of the target room, The user identifier of the client and the logo of the client.
  • the present invention also provides a server, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when the processor executes the computer program
  • a server comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein when the processor executes the computer program
  • the present invention further provides a computer readable storage medium having stored thereon a computer program, the program being implemented by the processor to implement the method of any of the first aspects.
  • the embodiment of the present invention delivers the first blockchain to all clients in all rooms of the live platform through the server, so that each client receives the first blockchain and generates a second blockchain; the server will all the rooms in the room.
  • the client pairs two pairs, so that the two pairs of clients verify each other's second blockchain and send the verification result to the server; the server obtains the feedback of the client in all rooms.
  • the result of the test ; the server determines the legality of the client in all rooms of the live broadcast platform according to the verification results respectively fed back by the clients in all rooms.
  • the validity of the mutual verification between the clients is verified. After the verification is completed, the result is reported to the server, and the server directly obtains the verification result of the client, thereby greatly reducing the computing pressure of the server and improving the computing pressure. Check efficiency.
  • FIG. 1 is a schematic diagram of an embodiment of a server side data verification method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an embodiment of step S102 in the embodiment shown in Figure 1;
  • FIG. 3 is a schematic diagram of an embodiment of a server according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another embodiment of a server in an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an embodiment of a client side data verification method according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of another embodiment of a client side data verification method according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an embodiment of step S501 in the embodiment shown in Figure 5;
  • FIG. 8 is a schematic diagram of an embodiment of a client in an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of another embodiment of a client in an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of an embodiment of a client in an embodiment of the present invention.
  • an embodiment of a data verification method in an embodiment of the present invention includes:
  • the server sends the first blockchain to all clients in all rooms of the live broadcast platform, so that each client receives the first blockchain and generates a second blockchain.
  • the server is the server corresponding to the live broadcast platform
  • the client may be a user terminal, such as a smart terminal such as a mobile phone or a tablet computer.
  • the target room is a live broadcast room established by the anchor on the live broadcast platform, and the target client is to enter the target live broadcast. Between the clients.
  • a blockchain is a chained data structure in which data blocks are sequentially connected in a chronological order, and is cryptographically Non-tamperable and unforgeable distributed ledgers guaranteed by means.
  • the server pairs all the clients of all the rooms in pairs, so that the two paired clients check each other's second blockchain and send the verification result to the server.
  • the server obtains a verification result fed back by a client in all rooms.
  • the server determines the legality of the client in all rooms of the live broadcast platform according to the verification results respectively fed back by the clients in all rooms.
  • the embodiment of the present invention delivers the first blockchain to all clients in all rooms of the live platform through the server, so that each client receives the first blockchain and generates a second blockchain; the server will all the rooms in the room.
  • the client pairs two pairs, so that the two pairs of clients verify each other's second blockchain and send the verification result to the server; the server obtains the feedback of the client in all rooms.
  • the result of the test ; the server determines the legality of the client in all rooms of the live broadcast platform according to the verification results respectively fed back by the clients in all rooms.
  • the validity of the mutual verification between the clients is verified. After the verification is completed, the result is reported to the server, and the server directly obtains the verification result of the client, thereby greatly reducing the computing pressure of the server and improving the computing pressure. Check efficiency.
  • step S102 includes:
  • the server selects, by the first client on the live broadcast platform, at least one second client on the live broadcast platform to pair with the second client;
  • the second client is different from the first client, that is, each client of the at least one second client is different from the first client, for example, the first client is the client A on the live platform.
  • the second client is client B above the live platform.
  • S1022 The server sends information that is paired between the first client and the at least one second client to the first client and the at least one second client, respectively, so that the first client and the at least one second client are mutually authenticated.
  • the second blockchain generated by the other party is checked and the verification result is sent to the server.
  • the at least the second client may include only one client, or may include multiple clients. If the at least one second client includes only one second client, the step S103 may include: The server obtains a first verification result of the second client that is fed back by the first client, and obtains a second verification result that is fed back by the second client to the first client; The foregoing step S104 may include: if the first verification result is that the second client is legal, and the second verification result is that the first client is illegal, determining that the first client is an illegal client, The second client is a legitimate client; if the first verification result is that the second client is illegal, and the second verification result is that the first client is legal, determining that the first client is legal Client, the second client is an illegal client.
  • the step S103 may include: the server acquiring, by the at least one second client, respectively, the feedback to the first client The third verification result; the step S104 may include: the server determining a maximum of the same verification result in the third verification result; if the most identical verification result is legal, determining the first client Legally, if the most identical verification result is illegal, it is determined that the first client is illegal.
  • the method in the embodiment of the present invention may further include: the server generating the first blockchain, before the server sends the first blockchain to the target client.
  • a blockchain data structure is defined in advance, and the first blockchain and the second blockchain are the same data structure; the data structure includes the block. a block number of the chain, a hash value of the previous block chain, a time stamp of the current time, and blockchain function data, the blockchain function data including a room number of the target room, a user identifier of the client, and The logo of the client.
  • the first blockchain when the first blockchain is generated, the first blockchain is generated according to the predefined blockchain data structure.
  • the client receives the first blockchain, according to the first zone.
  • the generated second blockchain is also generated according to the predefined blockchain data structure.
  • a typical blockchain must contain some necessary data so that one can verify the legitimacy of the blockchain itself, and the other makes it less prone to forgery.
  • the blockchain data structure in the embodiment of the present invention relies on verifying the popularity of the room, so the room information and the like are included in the data structure of the blockchain.
  • the blockchain data structure in the embodiment of the present invention may specifically be as follows:
  • index is used to indicate the block number of the blockchain, usually starting from 0; previousHash is the HASH value of the previous blockchain; timestamp is the timestamp; where the data field is the splicing of some data, the content of this data field It is the data involved in the function required by the blockchain, that is, the above blockchain function data, including the room number, the user uid (user ID) of the client, and the client's token (the client's logo); the hash value is Indicates the current hash value of this blockchain.
  • the server receives the newly generated second blockchain from the client, it can verify the legitimacy by verifying the data inside.
  • Embodiments of the server in the embodiment of the present invention are described below.
  • FIG. 3 it is a schematic diagram of an embodiment of a server according to an embodiment of the present invention.
  • the server includes:
  • the sending module 301 is configured to send all the clients of the first blockchain to all rooms of the live platform, so that each client receives the first blockchain and generates a second blockchain.
  • the pairing module 302 is configured to pair all the clients of all the rooms in pairs, so that the two paired clients mutually check the second blockchain generated by the other party, and send the verification result to the server;
  • the obtaining module 303 is configured to obtain a verification result that is respectively fed back by the client in all rooms;
  • the determining module 304 is configured to determine the legality of the client in all rooms of the live broadcast platform according to the verification results respectively fed back by the clients in all rooms.
  • pairing module 302 is specifically configured to:
  • the module 303 is specifically configured to:
  • the determining module 304 is specifically configured to:
  • first verification result is that the second client is illegal
  • second verification result is that the first client is legal
  • the at least one second client only includes multiple second clients
  • the obtaining module 303 is specifically configured to:
  • the determining module 304 is specifically configured to:
  • the most identical verification result is legal, it is determined that the first client is legal, and if at most the same verification result is illegal, it is determined that the first client is illegal.
  • first blockchain and the second blockchain are the same data structure
  • the data structure includes a block number of a blockchain, a hash value of a previous blockchain, a timestamp of a current time, and blockchain function data, the blockchain function data including a room number of the target room, The user identifier of the client and the logo of the client.
  • a server is also provided in the embodiment of the present invention.
  • the server includes:
  • the memory 401 is a processor 402 and a computer program 403 stored on the memory and executable on the processor, wherein the data verification method can be implemented when the processor 402 executes the computer program 403.
  • the memory 401 can be used to store a computer program 403, the computer program including software programs, modules, and data, and the processor 402 executes by running
  • the computer program 403 is stored in the memory 401, thereby performing various functional applications of the server as well as data processing.
  • the memory 401 can be used to store software programs and modules, and the processor 402 executes various functional applications and data processing of the server by running software programs and modules stored in the memory 401.
  • the memory 401 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (for example, a game application, a chat application), and the like; and the storage data area may be stored. Data created based on the use of the server (game configuration data, audio data), and the like.
  • the memory 401 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the processor 402 is the control center of the server, and connects various parts of the entire server using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 401, and calling data stored in the memory 401, executing The server's various functions and processing data to monitor the server as a whole.
  • the processor 402 may include one or more processing units; preferably, the processor 402 may integrate an application processor, wherein the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the following describes an embodiment of the client side data verification method in the embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an embodiment of a client side data verification method according to an embodiment of the present invention, where the method includes:
  • the first client on the live broadcast platform receives the first blockchain delivered by the server, and generates a second blockchain.
  • the first client receives the pairing information that is sent by the server and is configured by the at least one second client.
  • the first client sends the second blockchain to the at least one second client, so that the at least one second client separately checks the legality of the first client, and feeds back the verification result to the server.
  • the first client on the live broadcast platform receives the first blockchain delivered by the server, and generates a second blockchain.
  • the first client receives the pairing information delivered by the server and the at least one second client. Transmitting, by the first client, the second blockchain to the at least one second client, so that the at least one second client separately checks the legality of the first client, and reverses the verification result. Feed to the server.
  • the client verifies the validity of the client, and after the verification is completed, the result is reported to the server, and the server directly obtains the verification result of the client, thereby greatly reducing the computing pressure of the server and improving the computing pressure. Check efficiency.
  • the method in the embodiment of the present invention further includes:
  • the first client receives a third block chain that is sent by the at least one second client, where the third block chain receives, for each second client, the server to send the first block. Generated after the chain;
  • the first client respectively verifies the legality of the at least one second client according to the third blockchain.
  • the first client feeds back the verification result of the at least one second client to the server.
  • first blockchain and the second blockchain are the same data structure
  • the data structure includes a block number of the blockchain, a hash value of the previous blockchain, a timestamp of the current time, a hash value of the current blockchain, and blockchain function data, and the blockchain function data A room number of the target room, a user identification of the client, and a logo of the client.
  • the data structure in the client is similar to the data structure described on the server side, and details are not described herein again.
  • step S501 may further include:
  • S5011 Add a block number of the first blockchain to obtain a block number of the second blockchain.
  • Number here is the block number of the first blockchain, that is, the block number of the second blockchain is the block number of the first blockchain plus one.
  • Newblock.previousHash prevblock.hash
  • calculating the hash value of the previous block of the new block is the hash value of the obtained previous block, where the hash value of the first block chain is calculated.
  • S5014 Obtain a room number of the target room, a user identifier of the client, and a logo of the client, to obtain function data of the second blockchain;
  • the roomid is the room number of the target room that the current user is viewing on the client.
  • the first client separately verifies the legality of the at least one second client according to the third blockchain, and specifically includes: determining whether the block number of the third blockchain is equal to the first zone The block number of the block chain is incremented by one. If not, it is determined that the third block chain is incorrect; whether the hash value of the previous block chain included in the third block chain is determined to be the first region. The hash value of the blockchain is matched, and if not, it is determined that the third blockchain is incorrect.
  • the first client separately verifies the legality of the at least one second client according to the third blockchain, and specifically includes: calculating an overall hash value of the first blockchain; The block number of the blockchain in the first blockchain, the hash value of the previous blockchain, the timestamp of the first blockchain, and the blockchain function data are hashed to obtain the first zone. a hash value of the blockchain; determining whether the hash value of the first blockchain matches the overall hash value of the first blockchain, and if not, determining that the first blockchain is incorrect.
  • FIG. 8 is a schematic diagram of an embodiment of a client in an embodiment of the present invention, where the client includes:
  • the generating module 801 is configured to receive a first blockchain delivered by the server, and generate a second blockchain.
  • the first receiving module 802 is configured to receive pairing information that is sent by the server and configured by the at least one target client.
  • a first sending module 803 configured to separately send the second blockchain to the at least one target client, so that the at least one target client separately verifies the legitimacy of the client, and the verification result is Feedback to the server.
  • the client further includes:
  • a second receiving module 804 configured to receive a third blockchain sent by the at least one target client, where the third blockchain receives the first block for each target client to receive the server Generated after the chain;
  • the verification module 805 is configured to verify the legality of the at least one target client according to the third blockchain.
  • the second sending module 806 is configured to feed back the verification result of the at least one target client to the server.
  • first blockchain and the second blockchain are the same data structure
  • the data structure includes a block number of the blockchain, a hash value of the previous blockchain, a timestamp of the current time, a hash value of the current blockchain, and blockchain function data, and the blockchain function data A room number of the target room, a user identification of the client, and a logo of the client.
  • the generating module 801 is specifically configured to:
  • a client is also provided in the embodiment of the present invention. Referring to FIG. 10, the client includes:
  • the memory 901 is a processor 902 and a computer program 903 stored on the memory and operable on the processor, wherein the data verification method can be implemented when the processor 902 executes the computer program 903.
  • clients involved in the present application include, but are not limited to, mobile terminals (mobile phones, smart phones, PADs, notebook computers, etc.), fixed terminals (computers).
  • the memory 901 can be used to store a computer program 903 including software programs, modules, and data, and the processor 902 executes a computer program 903 stored in the memory 901 to execute various functional applications and data processing of the client.
  • the memory 901 can be used to store software programs and modules, and the processor 902 executes various functional applications and data processing of the client by running software programs and modules stored in the memory 901.
  • the memory 901 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (for example, a game application, a chat application), and the like; and the storage data area may be stored. Data created based on the use of the client (game configuration data, audio data), and the like.
  • the memory 901 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the processor 902 is a control center of the client that connects various parts of the entire client using various interfaces and lines, executes or executes software programs and/or modules stored in the memory 901, and calls data stored in the memory 901 to execute The client's various functions and processing data to monitor the client as a whole.
  • the processor 902 may include one or more processing units; preferably, the processor 902 may integrate an application processor, wherein the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the embodiment of the present invention further provides a computer readable storage medium, wherein the computer readable storage medium can store a program, and the program includes some or all of the steps of the data verification method described in the foregoing method embodiments.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: 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. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Graphics (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例公开了一种数据校验方法及服务器。本发明实施例方法包括:服务器下发第一区块链到直播平台所有房间的所有客户端,以使得每个客户端收到第一区块链后生成第二区块链;服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;服务器获取所有房间的客户端分别反馈的校验结果;服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。本发明实施例中通过客户端之间进行互相校验合法性,校验完成后将结果上报到服务器,服务器直接获取客户端的校验结果,从而极大的节省了服务器的计算压力,同时提升了校验效率。

Description

一种数据校验方法及服务器 技术领域
本发明涉及视频直播技术领域,特别涉及一种数据校验方法及服务器。
背景技术
目前,随着网络通信技术的进步和宽带网络的提速,网络直播得到了越来越多的发展和应用。尤其在游戏直播领域,越来越多的观众会观看游戏主播的直播。
在视频直播中,部分主播会通过刷人气的方法来提高房间同时观看的观众数量,从而获取收益,其刷人气的具体的实现方式则是在一台性能非常好的服务器上,通过破解直播平台的网络协议,同时伪造大量的虚假客户端用户同时登陆到直播间,从而伪造大量观众的方法,来将直播间的人气数据刷的比较高。
因此对于直播平台则需要一种方法能够检测出该直播间是否存在伪造虚假客户端刷人气的情况。
发明内容
本发明实施例提供了一种数据校验方法及服务器,以检测直播房间伪造虚假客户端刷人气的情况。
第一方面,本申请提供了一种数据校验方法,该方法包括:
S101:服务器下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;
S102:所述服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;
S103:所述服务器获取所有房间的客户端分别反馈的校验结果;
S104:所述服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。
进一步的,所述服务器为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;
所述服务器将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。
进一步的,若所述至少一个第二客户端仅包括一个第二客户端;所述步骤S103包括:
所述服务器获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;
所述步骤S104包括:
若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;
若所述第一校验结果为所述第二客户端非法,第二校验结果为所述第一客户端合法,则确定所述第一客户端为合法客户端,第二客户端为非法客户端。
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;所述步骤S103包括:
所述服务器获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;
所述步骤S104包括:
所述服务器确定所述第三校验结果中最多相同的校验结果;
若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;
所述数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。
第二方面,本申请提供一种服务器,该服务器包括:
发送模块,用于下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;
配对模块,用于将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;
获取模块,用于获取所有房间的客户端分别反馈的校验结果;
确定模块,用于根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。
进一步的,所述配对模块具体用于:
为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;
将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。
进一步的,若所述至少一个第二客户端仅包括一个第二客户端;所述获取模块具体用于:
获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;
所述确定模块具体用于:
若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;
若所述第一校验结果为所述第二客户端非法,第二校验结果为所述第一客户端合法,则确定所述第一客户端为合法客户端,第二客户端为非法客户端。
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;
所述获取模块具体用于:
获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;
所述确定模块具体用于:
确定所述第三校验结果中最多相同的校验结果;
若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;
所述数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。
第三方面,本发明还提供一种服务器,包括:存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时可以实现第一方面中任一所述的方法。
第四方面,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现第一方面中任一所述的方法。
本发明实施例通过服务器下发第一区块链到直播平台所有房间的所有客户端,以使得每个客户端收到第一区块链后生成第二区块链;服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;服务器获取所有房间的客户端分别反馈的校验结果;服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。本发明实施例中通过客户端之间进行互相校验合法性,校验完成后将结果上报到服务器,服务器直接获取客户端的校验结果,从而极大的节省了服务器的计算压力,同时提升了校验效率。
附图说明
图1是本发明实施例中服务器侧数据校验方法的一个实施例示意图;
图2是图1所示实施例中步骤S102的一个实施例示意图;
图3是本发明实施例服务器的一个实施例示意图;
图4是本发明实施例中服务器的另一个实施例示意图;
图5是本发明实施例中客户端侧数据校验方法的一个实施例示意图;
图6是本发明实施例中客户端侧数据校验方法的另一个实施例示意图;
图7是图5所示实施例中步骤S501的一个实施例示意图;
图8是本发明实施例中客户端的一个实施例示意图
图9是本发明实施例中客户端的另一个实施例示意图;
图10是本发明实施例中客户端的一个实施例示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
请参阅图1,本发明实施例中数据校验方法的一个实施例包括:
S101、服务器下发第一区块链到直播平台所有房间的所有客户端,以使得每个客户端收到第一区块链后生成第二区块链;
本实施例中,服务器即即直播平台对应的服务器,客户端可以是用户终端,例如手机、平板电脑等智能终端,目标房间为直播平台上主播建立的直播间,目标客户端为进入该目标直播间的客户端。区块链是一种按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学 方式保证的不可篡改和不可伪造的分布式账本。
S102、服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;
S103、服务器获取所有房间的客户端分别反馈的校验结果;
S104、服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。
本发明实施例通过服务器下发第一区块链到直播平台所有房间的所有客户端,以使得每个客户端收到第一区块链后生成第二区块链;服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;服务器获取所有房间的客户端分别反馈的校验结果;服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。本发明实施例中通过客户端之间进行互相校验合法性,校验完成后将结果上报到服务器,服务器直接获取客户端的校验结果,从而极大的节省了服务器的计算压力,同时提升了校验效率。
进一步的,在本发明一些实施例中,如图2所示,上述步骤S102包括:
S1021、服务器为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对;
其中,所述第二客户端与所述第一客户端不同,即至少一个第二客户端中每一个客户端与第一客户端均不同,例如第一客户端为直播平台上的客户端A,第二客户端为直播平台上面的客户端B。
S1022、服务器将第一客户端与至少一个第二客户端配对的信息分别发送给第一客户端和至少一个第二客户端,以使得第一客户端和至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。
进一步的,上述至少第二客户端可以是仅包括一个客户端,也可以是包括多个客户端,若所述至少一个第二客户端仅包括一个第二客户端;所述步骤S103可以包括:服务器获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;此时, 上述步骤S104可以包括:若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;若所述第一校验结果为所述第二客户端非法,第二校验结果为所述第一客户端合法,则确定所述第一客户端为合法客户端,第二客户端为非法客户端。
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;所述步骤S103可以包括:所述服务器获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;所述步骤S104可以包括:所述服务器确定所述第三校验结果中最多相同的校验结果;若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。
在服务器下发第一区块链到目标客户端之前,本发明实施例中方法还可以进一步包括:服务器生成该第一区块链。
本发明实施例中,在生成该第一区块链之前,会预先定义好区块链数据结构,该第一区块链和第二区块链为同样的数据结构;该数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。本发明实施例中,在生成该第一区块链时,按照预先定义的区块链数据结构生成第一区块链,同理,在客户端接收第一区块链后,根据第一区块链生成第二区块链时,生成的第二区块链也按照该预先定义的区块链数据结构生成。
通常的一个区块链必须包含一些必要的数据,从而一个是可以校验区块链本身的合法性,另一个也使得其不易于伪造。具体的,本发明实施例中的区块链数据结构则依赖于对房间人气进行校验的,所以在区块链的数据结构中包含房间信息等。本发明实施例中区块链数据结构具体可以如下:
Struct BlockData{
Int64 index;
String previousHash;
Int64 timestamp;
String data;
String hash;
}
其中,index用来表示区块链的块号,通常从0开始递增;previousHash表示前一个区块链的HASH值;timestamp表示时间戳;其中data字段则是一些数据的拼接,这个data字段的内容则是依据区块链所需要完成的功能所涉及的数据,即上述区块链功能数据,包括房间号,客户端的用户uid(用户标识),以及客户端的token(客户端的标志);hash值则表示当前这个区块链的hash值。有了这个区块链数据结构的设计后,当服务器收到客户端新生成的第二区块链后,则可以通过对里面的数据进行校验,以判断其合法性。
下面介绍本发明实施例中服务器的实施例。
请参阅图3,为本发明实施例中服务器的一个实施例示意图,该服务器包括:
发送模块301,用于下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;
配对模块302,用于将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;
获取模块303,用于获取所有房间的客户端分别反馈的校验结果;
确定模块304,用于根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。
进一步的,所述配对模块302具体用于:
为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;
将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。
进一步的,若所述至少一个第二客户端仅包括一个第二客户端;所述获 取模块303具体用于:
获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;
所述确定模块304具体用于:
若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;
若所述第一校验结果为所述第二客户端非法,第二校验结果为所述第一客户端合法,则确定所述第一客户端为合法客户端,第二客户端为非法客户端。
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;
所述获取模块303具体用于:
获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;
所述确定模块304具体用于:
确定所述第三校验结果中最多相同的校验结果;
若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;
所述数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。
本发明实施例中还提供一种服务器,请参见图4,所述服务器包括:
存储器401,处理器402及存储在所述存储器上并可在所述处理器上运行的计算机程序403,其中,所述处理器402执行所述计算机程序403时可以实现上述数据校验方法。
为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。存储器401可用于存储计算机程序403,上述计算机程序包括软件程序、模块和数据,处理器402通过运行执行 存储在存储器401的计算机程序403,从而执行服务器的各种功能应用以及数据处理。
在具体的实施过程中,存储器401可用于存储软件程序以及模块,处理器402通过运行存储在存储器401的软件程序以及模块,从而执行服务器的各种功能应用以及数据处理。存储器401可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(例如游戏类应用程序、聊天类应用程序)等;存储数据区可存储根据服务器的使用所创建的数据(游戏配置数据、音频数据)等。此外,存储器401可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。处理器402是服务器的控制中心,利用各种接口和线路连接整个服务器的各个部分,通过运行或执行存储在存储器401内的软件程序和/或模块,以及调用存储在存储器401内的数据,执行服务器的各种功能和处理数据,从而对服务器进行整体监控。可选的,处理器402可包括一个或多个处理单元;优选的,处理器402可集成应用处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等。
下面介绍本发明实施例中客户端侧数据校验方法的实施例。
请参阅图5,为本发明实施例中客户端侧数据校验方法的一个实施例示意图,该方法包括:
S501、直播平台上的第一客户端接收服务器下发的第一区块链,生成第二区块链;
S502、第一客户端接收服务器下发的与至少一个第二客户端的配对信息;
S503、第一客户端向至少一个第二客户端分别发送所述第二区块链,以使得至少一个第二客户端分别校验第一客户端的合法性,并将校验结果反馈给服务器。
本发明实施例通过直播平台上的第一客户端接收服务器下发的第一区块链,生成第二区块链;第一客户端接收服务器下发的与至少一个第二客户端的配对信息;第一客户端向所述至少一个第二客户端分别发送第二区块链,以使得至少一个第二客户端分别校验第一客户端的合法性,并将校验结果反 馈给所述服务器。本发明实施例中通过客户端对客户端进行校验合法性,校验完成后将结果上报到服务器,服务器直接获取客户端的校验结果,从而极大的节省了服务器的计算压力,同时提升了校验效率。
进一步的,在本发明一些实施例中,如图6所示,本发明实施例中方法还包括:
S504、第一客户端接收所述至少一个第二客户端分别发送的第三区块链,所述第三区块链为每个第二客户端接收所述服务器下发所述第一区块链后生成的;
S505、第一客户端根据所述第三区块链分别校验所述至少一个第二客户端的合法性;
S506、第一客户端将对所述至少一个第二客户端的校验结果反馈给所述服务器。
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;
所述数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳、当前区块链的哈希值以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。
本发明实施例中,客户端中数据结构与上述服务器侧描述的数据结构类似,此处不再赘述。
在本发明一些实施例中,如图7所示,上述步骤S501可以进一步包括:
S5011、根据所述第一区块链的块号加1,得到所述第二区块链的块号;
具体的,根据Newblock.index=prevblock.index+1,计算第二区块链的块号,其中,Newblock.index为第二区块链的块号,prevblock.index为前一个区块链的块号,此处即为第一区块链的块号,即第二区块链的块号是第一区块链的块号加1。
S5012、获取当前时间;
具体的,根据Newblock.timestamp=time()来获取当前的时间,以作为第二区块链的时间戳。
S5013、计算所述第一区块链的哈希值,作为所述第二区块链中前一个区块链的哈希值;
具体的,根据Newblock.previousHash=prevblock.hash,计算新区块的上一个区块的hash值则是获取的上一个区块的hash值,此处,即计算第一区块链的哈希值,作为第二区块链中前一个区块链的哈希值。
S5014、获取目标房间的房间号,客户端的用户标识以及客户端的标志,得到第二区块链功能数据;
具体的,根据Newblock.data=roomid+uid+token得到第二区块链功能数据,其中,Newblock.data为第二区块链功能数据,token为当前客户端登陆时获取的客户端的标志,uid为客户端的用户标识,roomid为当前用户在客户端观看的目标房间的房间号。
S5015、对所述第二区块链的块号、当前时间、所述第一区块链的哈希值及所述第二区块链功能数据进行哈希计算,得到所述第二区块链的哈希值;
S5016、根据第二区块链的块号、当前时间、第一区块链的哈希值、第二区块链的哈希值及第二区块链功能数据,按照所述数据结构生成第二区块链。
通过上述步骤即可实现了通过第一区块链按照预设的数据结构生成一个新的第二区块链的方法。
进一步的,所述第一客户端根据所述第三区块链分别校验所述至少一个第二客户端的合法性,具体包括:判断所述第三区块链的块号是否等于第一区块链的块号加1,若否,则确定所述第三区块链不正确;判断所述第三区块链中包含的前一个区块链的哈希值是否与所述第一区块链的哈希值匹配,若否,则确定所述第三区块链不正确。
进一步的,所述第一客户端根据所述第三区块链分别校验所述至少一个第二客户端的合法性,具体还包括:计算所述第一区块链的整体哈希值;对所述第一区块链中区块链的块号、前一个区块链的哈希值、第一区块链的时间戳以及区块链功能数据进行哈希计算,得到所述第一区块链的哈希值;判断所述第一区块链的哈希值和所述第一区块链的整体哈希值是否匹配,若否,则确定所述第一区块链不正确。
下面介绍本发明实施例中客户端的实施例。
请参阅图8,为本发明实施例中客户端的一个实施例示意图,该客户端包括:
生成模块801,用于接收服务器下发的第一区块链,生成第二区块链;
第一接收模块802,用于接收服务器下发的与至少一个目标客户端的配对信息;
第一发送模块803,用于向所述至少一个目标客户端分别发送所述第二区块链,以使得所述至少一个目标客户端分别校验所述客户端的合法性,并将校验结果反馈给所述服务器。
进一步的,如图9所示,所述客户端还包括:
第二接收模块804,用于接收所述至少一个目标客户端分别发送的第三区块链,所述第三区块链为每个目标客户端接收所述服务器下发所述第一区块链后生成的;
校验模块805,根据所述第三区块链分别校验所述至少一个目标客户端的合法性;
第二发送模块806,用于将对所述至少一个目标客户端的校验结果反馈给所述服务器。
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;
所述数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳、当前区块链的哈希值以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。
进一步的,所述生成模块801具体用于:
根据所述第一区块链的块号加1,得到所述第二区块链的块号;
获取当前时间;
计算所述第一区块链的哈希值,作为所述第二区块链中前一个区块链的哈希值;
获取所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志,得到所述第二区块链功能数据;
对所述第二区块链的块号、当前时间、所述第一区块链的哈希值及所述第二区块链功能数据进行哈希计算,得到所述第二区块链的哈希值;
根据所述第二区块链的块号、当前时间、所述第一区块链的哈希值、所述第二区块链的哈希值及所述第二区块链功能数据,按照所述数据结构生成 所述第二区块链。
本发明实施例中还提供一种客户端,请参见图10,所述客户端包括:
存储器901,处理器902及存储在所述存储器上并可在所述处理器上运行的计算机程序903,其中,所述处理器902执行所述计算机程序903时可以实现上述数据校验方法。
需要说明的是,本申请涉及的客户端包括但不限于是:移动终端(手机、智能手机、PAD、笔记本电脑等等)、固定终端(计算机)。
为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。存储器901可用于存储计算机程序903,上述计算机程序包括软件程序、模块和数据,处理器902通过运行执行存储在存储器901的计算机程序903,从而执行客户端的各种功能应用以及数据处理。
在具体的实施过程中,存储器901可用于存储软件程序以及模块,处理器902通过运行存储在存储器901的软件程序以及模块,从而执行客户端的各种功能应用以及数据处理。存储器901可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(例如游戏类应用程序、聊天类应用程序)等;存储数据区可存储根据客户端的使用所创建的数据(游戏配置数据、音频数据)等。此外,存储器901可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。处理器902是客户端的控制中心,利用各种接口和线路连接整个客户端的各个部分,通过运行或执行存储在存储器901内的软件程序和/或模块,以及调用存储在存储器901内的数据,执行客户端的各种功能和处理数据,从而对客户端进行整体监控。可选的,处理器902可包括一个或多个处理单元;优选的,处理器902可集成应用处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等。
本发明实施例还提供一种计算机可读存储介质,其中,该计算机可读存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的数据校验方法的部分或全部步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应 当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种数据校验方法,其特征在于,所述方法包括:
    S101:服务器下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;
    S102:所述服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;
    S103:所述服务器获取所有房间的客户端分别反馈的校验结果;
    S104:所述服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。
  2. 根据权利要求1所述的方法,其特征在于,所述步骤S102包括:
    所述服务器为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;
    所述服务器将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。
  3. 根据权利要求2所述的方法,其特征在于,若所述至少一个第二客户端仅包括一个第二客户端;所述步骤S103包括:
    所述服务器获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;
    所述步骤S104包括:
    若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;
    若所述第一校验结果为所述第二客户端非法,第二校验结果为所述第一客户端合法,则确定所述第一客户端为合法客户端,第二客户端为非法客户端。
  4. 根据权利要求2所述的方法,其特征在于,若所述至少一个第二客户端仅包括多个第二客户端;所述步骤S103包括:
    所述服务器获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;
    所述步骤S104包括:
    所述服务器确定所述第三校验结果中最多相同的校验结果;
    若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。
  5. 根据权利要求1所述的方法,其特征在于,所述第一区块链和所述第二区块链为同样的数据结构;
    所述数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。
  6. 一种服务器,其特征在于,所述服务器包括:
    发送模块,用于下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;
    配对模块,用于将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;
    获取模块,用于获取所有房间的客户端分别反馈的校验结果;
    确定模块,用于根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。
  7. 根据权利要求6所述的装置,其特征在于,所述配对模块具体用于:
    为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;
    将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。
  8. 根据权利要求6所述的装置,其特征在于,若所述至少一个第二客户端仅包括一个第二客户端;所述获取模块具体用于:
    获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;
    所述确定模块具体用于:
    若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;
    若所述第一校验结果为所述第二客户端非法,第二校验结果为所述第一客户端合法,则确定所述第一客户端为合法客户端,第二客户端为非法客户端。
  9. 根据权利要求6所述的装置,其特征在于,若所述至少一个第二客户端仅包括多个第二客户端;
    所述获取模块具体用于:
    获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;
    所述确定模块具体用于:
    确定所述第三校验结果中最多相同的校验结果;
    若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。
  10. 一种服务器,其特征在于,包括:存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时可以实现权利要求1至5任一所述的方法。
PCT/CN2017/108058 2017-09-26 2017-10-27 一种数据校验方法及服务器 WO2019061628A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710883417.0A CN107623865A (zh) 2017-09-26 2017-09-26 一种数据校验方法及服务器
CN201710883417.0 2017-09-26

Publications (1)

Publication Number Publication Date
WO2019061628A1 true WO2019061628A1 (zh) 2019-04-04

Family

ID=61090775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108058 WO2019061628A1 (zh) 2017-09-26 2017-10-27 一种数据校验方法及服务器

Country Status (2)

Country Link
CN (1) CN107623865A (zh)
WO (1) WO2019061628A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230047A (zh) * 2018-02-05 2018-06-29 武汉斗鱼网络科技有限公司 抽奖数据处理方法及装置
CN111372091A (zh) * 2020-02-26 2020-07-03 广州趣丸网络科技有限公司 一种直播内容风险信息控制方法及***
CN111966971A (zh) * 2020-08-20 2020-11-20 咪咕文化科技有限公司 版权产品的收益分配方法、装置、服务器及存储介质
CN112529429A (zh) * 2020-12-16 2021-03-19 平安科技(深圳)有限公司 客户信息校验方法、装置、计算机设备及存储介质
CN113434561A (zh) * 2021-06-24 2021-09-24 北京金山云网络技术有限公司 直播数据校验方法、***、电子设备及存储介质
CN113645214A (zh) * 2021-08-03 2021-11-12 北京百度网讯科技有限公司 数据检测方法、装置、电子设备及可读存储介质
CN114666399A (zh) * 2022-03-08 2022-06-24 北京沃东天骏信息技术有限公司 业务请求的校验方法、装置、设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924089B (zh) * 2018-05-29 2021-11-09 武汉斗鱼网络科技有限公司 一种客户端设备识别方法、装置及客户端设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385593A (zh) * 2016-09-14 2017-02-08 武汉斗鱼网络科技有限公司 基于椭圆曲线算法的同时观看直播人数的统计方法及***
CN106385601A (zh) * 2016-09-14 2017-02-08 武汉斗鱼网络科技有限公司 基于多协议验证的同时观看直播人数的统计方法及***
US20170149560A1 (en) * 2012-02-02 2017-05-25 Netspective Communications Llc Digital blockchain authentication
CN107171810A (zh) * 2017-06-27 2017-09-15 中国联合网络通信集团有限公司 区块链的验证方法及装置
CN107426253A (zh) * 2017-09-26 2017-12-01 武汉斗鱼网络科技有限公司 一种数据校验方法及客户端

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959728B (zh) * 2016-06-27 2019-06-21 武汉斗鱼网络科技有限公司 统计直播平台在线人数的***及其方法
CN106357640B (zh) * 2016-09-18 2019-11-08 江苏通付盾科技有限公司 基于区块链网络的身份认证方法、***及服务器
CN106534160B (zh) * 2016-12-02 2020-02-21 江苏通付盾科技有限公司 基于区块链的身份认证方法及***
CN106789985B (zh) * 2016-12-08 2019-11-12 武汉斗鱼网络科技有限公司 基于gpu算法的客户端验证方法及***
CN111917864B (zh) * 2017-02-22 2023-08-22 创新先进技术有限公司 一种业务校验的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170149560A1 (en) * 2012-02-02 2017-05-25 Netspective Communications Llc Digital blockchain authentication
CN106385593A (zh) * 2016-09-14 2017-02-08 武汉斗鱼网络科技有限公司 基于椭圆曲线算法的同时观看直播人数的统计方法及***
CN106385601A (zh) * 2016-09-14 2017-02-08 武汉斗鱼网络科技有限公司 基于多协议验证的同时观看直播人数的统计方法及***
CN107171810A (zh) * 2017-06-27 2017-09-15 中国联合网络通信集团有限公司 区块链的验证方法及装置
CN107426253A (zh) * 2017-09-26 2017-12-01 武汉斗鱼网络科技有限公司 一种数据校验方法及客户端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HEMLIN BILLSTROM, A. ET AL.: "Video Integrity through Blockchain Technology", DEGREE PROJECT IN ELECTRICAL ENGINEERING, SECOND LEVEL, 2 August 2017 (2017-08-02), STOCKHOLM, SWEDEN, XP055513816, Retrieved from the Internet <URL:http://kth.diva-portal.org/smash/record.jsf?pid=diva2%3A1129877&dswid=-7539> *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230047A (zh) * 2018-02-05 2018-06-29 武汉斗鱼网络科技有限公司 抽奖数据处理方法及装置
CN108230047B (zh) * 2018-02-05 2021-04-27 武汉斗鱼网络科技有限公司 抽奖数据处理方法及装置
CN111372091A (zh) * 2020-02-26 2020-07-03 广州趣丸网络科技有限公司 一种直播内容风险信息控制方法及***
CN111966971A (zh) * 2020-08-20 2020-11-20 咪咕文化科技有限公司 版权产品的收益分配方法、装置、服务器及存储介质
CN112529429A (zh) * 2020-12-16 2021-03-19 平安科技(深圳)有限公司 客户信息校验方法、装置、计算机设备及存储介质
CN112529429B (zh) * 2020-12-16 2024-05-14 平安科技(深圳)有限公司 客户信息校验方法、装置、计算机设备及存储介质
CN113434561A (zh) * 2021-06-24 2021-09-24 北京金山云网络技术有限公司 直播数据校验方法、***、电子设备及存储介质
CN113645214A (zh) * 2021-08-03 2021-11-12 北京百度网讯科技有限公司 数据检测方法、装置、电子设备及可读存储介质
CN113645214B (zh) * 2021-08-03 2023-08-15 北京百度网讯科技有限公司 数据检测方法、装置、电子设备及可读存储介质
CN114666399A (zh) * 2022-03-08 2022-06-24 北京沃东天骏信息技术有限公司 业务请求的校验方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN107623865A (zh) 2018-01-23

Similar Documents

Publication Publication Date Title
WO2019061628A1 (zh) 一种数据校验方法及服务器
CN111949953B (zh) 基于区块链的身份认证方法、***、装置和计算机设备
WO2019061626A1 (zh) 一种数据校验方法及服务器
CN107426253B (zh) 一种数据校验方法及客户端
KR102039316B1 (ko) 동적 패스워드들을 사용하는 인증을 위한 방법 및 디바이스
WO2019061598A1 (zh) 一种数据校验方法及客户端
CN111556006B (zh) 第三方应用***登录方法、装置、终端及sso服务平台
WO2019061629A1 (zh) 一种数据校验方法及服务器
WO2019061627A1 (zh) 一种数据校验方法及服务器
WO2017036365A1 (zh) 一种语音通信处理方法、电子设备、***及存储介质
CN108805571B (zh) 数据保护方法、平台、区块链节点、***和存储介质
WO2019061599A1 (zh) 一种鉴权方法及服务器
WO2019134303A1 (zh) 直播间人气处理方法、装置、服务器及存储介质
WO2019001083A1 (zh) 一种视频流地址鉴权方法及装置
CN112672098B (zh) 一种云视频会议加密方法、装置及***
US20140282696A1 (en) Advertising download verification
CN111461720B (zh) 基于区块链的身份验证方法、装置、存储介质及电子设备
WO2019061597A1 (zh) 一种数据处理方法及服务器
CN110912689A (zh) 一种唯一值的生成、验证方法及***
WO2017007767A1 (en) Method and device for authentication using dynamic passwords
CN108924089B (zh) 一种客户端设备识别方法、装置及客户端设备
CN108289096B (zh) 一种直播间关注、验证直播间关注的方法及装置
WO2019071857A1 (zh) 一种直播平台中防止刷礼物的方法及装置
CN110034922B (zh) 请求处理方法、处理装置以及请求验证方法、验证装置
CN109981558B (zh) 智能家居设备的认证方法、设备及***

Legal Events

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

Ref document number: 17927395

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

Country of ref document: EP

Kind code of ref document: A1