WO2019061628A1 - Data verification method, and server - Google Patents
Data verification method, and server Download PDFInfo
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management 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/258—Client 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)
- Information Transfer Between Computers (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Disclosed are a data verification method, and a server. The method in the embodiments of the present invention comprises: a server issuing a first block chain to all clients in all rooms on a live-broadcasting platform, so that each of the clients generates a second block chain after receiving the first block chain; the server pairing every two clients of all the clients in all the rooms, so that each two paired clients verify the second block chain generated by the opposite side and send verification results to the server; the server acquiring the verification results respectively fed back by the clients in all the rooms; and the server respectively determining the legitimacy of the clients in all the rooms on the live-broadcasting platform according to the verification results respectively fed back by the clients in all the rooms. In the embodiments of the present invention, clients verify the legitimacy thereof with each other and report results to a server after completion of the verification, and the server directly acquires the verification results of the clients, thereby greatly saving on the calculation pressure of the server and improving the verification efficiency at the same time.
Description
本发明涉及视频直播技术领域,特别涉及一种数据校验方法及服务器。The present invention relates to the field of video live broadcast technology, and in particular, to a data verification method and a server.
目前,随着网络通信技术的进步和宽带网络的提速,网络直播得到了越来越多的发展和应用。尤其在游戏直播领域,越来越多的观众会观看游戏主播的直播。At present, with the advancement of network communication technology and the speed of broadband networks, webcasting has been increasingly developed and applied. Especially in the field of game live broadcast, more and more viewers will watch the live broadcast of the game anchor.
在视频直播中,部分主播会通过刷人气的方法来提高房间同时观看的观众数量,从而获取收益,其刷人气的具体的实现方式则是在一台性能非常好的服务器上,通过破解直播平台的网络协议,同时伪造大量的虚假客户端用户同时登陆到直播间,从而伪造大量观众的方法,来将直播间的人气数据刷的比较高。In the live video broadcast, 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.
因此对于直播平台则需要一种方法能够检测出该直播间是否存在伪造虚假客户端刷人气的情况。Therefore, for the live broadcast platform, a method is needed to detect whether there is a fake fake client in the live broadcast room.
发明内容Summary of the invention
本发明实施例提供了一种数据校验方法及服务器,以检测直播房间伪造虚假客户端刷人气的情况。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.
第一方面,本申请提供了一种数据校验方法,该方法包括:In a first aspect, the present application provides a data verification method, the method comprising:
S101:服务器下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;S101: 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:所述服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;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:所述服务器获取所有房间的客户端分别反馈的校验结果;S103: The server obtains a verification result that is respectively fed back by a client in all rooms;
S104:所述服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。
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.
进一步的,所述服务器为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;Further, 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;
所述服务器将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。Sending, by the server, information that is paired by the first client and the at least one second client to the first client and the at least one second client, respectively, to enable the first client and The at least one second client mutually checks the second blockchain generated by the other party, and sends the verification result to the server.
进一步的,若所述至少一个第二客户端仅包括一个第二客户端;所述步骤S103包括:Further, if the at least one second client includes only one second client, the step S103 includes:
所述服务器获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;Obtaining, by the server, a first verification result that is fed back by the first client, and obtaining a second verification result that is sent by the second client to the first client;
所述步骤S104包括:The step S104 includes:
若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;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, and the second client is legal. 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, it is determined that the first client is a legitimate client, and the second client is illegal. Client.
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;所述步骤S103包括:Further, if the at least one second client only includes multiple second clients, the step S103 includes:
所述服务器获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;Obtaining, by the server, the third verification result that is fed back by the at least one second client to the first client;
所述步骤S104包括:The step S104 includes:
所述服务器确定所述第三校验结果中最多相同的校验结果;Determining, by the server, a verification result that is the same in the third verification result;
若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。If 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.
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;Further, the 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.
第二方面,本申请提供一种服务器,该服务器包括:In a second aspect, 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.
进一步的,所述配对模块具体用于:Further, the pairing module is specifically configured to:
为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;Selecting, by the first client on the live broadcast platform, at least one second client on the live broadcast platform, the second client being different from the first client;
将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。Transmitting, by the first client, the information paired with the at least one second client to the first client and the at least one second client, respectively, such that the first client and the at least A second client checks the second block chain generated by the other party with each other, and sends a verification result to the server.
进一步的,若所述至少一个第二客户端仅包括一个第二客户端;所述获取模块具体用于:Further, if the at least one second client includes only one second client, the acquiring module is specifically configured to:
获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;Obtaining a first verification result of the second client that is fed back by the first client, and acquiring a second verification result that is fed back by the second client to the first client;
所述确定模块具体用于:The determining module is specifically configured to:
若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;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, and the second client is legal. 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, it is determined that the first client is a legitimate client, and the second client is illegal. Client.
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;Further, if the at least one second client only includes multiple second clients;
所述获取模块具体用于:
The obtaining module is specifically configured to:
获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;Obtaining a third verification result that is fed back by the at least one second client to the first client;
所述确定模块具体用于:The determining module is specifically configured to:
确定所述第三校验结果中最多相同的校验结果;Determining at most the same verification result in the third verification result;
若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。If 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.
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;Further, the 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.
第三方面,本发明还提供一种服务器,包括:存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时可以实现第一方面中任一所述的方法。In a third aspect, 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 The method of any of the first aspects can be implemented.
第四方面,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现第一方面中任一所述的方法。In a fourth aspect, 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. In the embodiment of the present invention, 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.
图1是本发明实施例中服务器侧数据校验方法的一个实施例示意图;1 is a schematic diagram of an embodiment of a server side data verification method according to an embodiment of the present invention;
图2是图1所示实施例中步骤S102的一个实施例示意图;Figure 2 is a schematic diagram of an embodiment of step S102 in the embodiment shown in Figure 1;
图3是本发明实施例服务器的一个实施例示意图;
3 is a schematic diagram of an embodiment of a server according to an embodiment of the present invention;
图4是本发明实施例中服务器的另一个实施例示意图;4 is a schematic diagram of another embodiment of a server in an embodiment of the present invention;
图5是本发明实施例中客户端侧数据校验方法的一个实施例示意图;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是本发明实施例中客户端侧数据校验方法的另一个实施例示意图;6 is a schematic diagram of another embodiment of a client side data verification method according to an embodiment of the present invention;
图7是图5所示实施例中步骤S501的一个实施例示意图;Figure 7 is a schematic diagram of an embodiment of step S501 in the embodiment shown in Figure 5;
图8是本发明实施例中客户端的一个实施例示意图FIG. 8 is a schematic diagram of an embodiment of a client in an embodiment of the present invention;
图9是本发明实施例中客户端的另一个实施例示意图;9 is a schematic diagram of another embodiment of a client in an embodiment of the present invention;
图10是本发明实施例中客户端的一个实施例示意图。FIG. 10 is a schematic diagram of an embodiment of a client in an embodiment of the present invention.
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is an embodiment of the invention, but not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", and the like (if any) in the specification and claims of the present invention and the above figures are used to distinguish similar objects, and are not necessarily used to describe a particular order or order. It is to be understood that the data so used may be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than what is illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
请参阅图1,本发明实施例中数据校验方法的一个实施例包括:Referring to FIG. 1, an embodiment of a data verification method in an embodiment of the present invention includes:
S101、服务器下发第一区块链到直播平台所有房间的所有客户端,以使得每个客户端收到第一区块链后生成第二区块链;S101. 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.
本实施例中,服务器即即直播平台对应的服务器,客户端可以是用户终端,例如手机、平板电脑等智能终端,目标房间为直播平台上主播建立的直播间,目标客户端为进入该目标直播间的客户端。区块链是一种按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学
方式保证的不可篡改和不可伪造的分布式账本。In this embodiment, the server is the server corresponding to the live broadcast platform, and 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.
S102、服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;S102. 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.
S103、服务器获取所有房间的客户端分别反馈的校验结果;S103. The server obtains a verification result fed back by a client in all rooms.
S104、服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。S104. 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. In the embodiment of the present invention, 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.
进一步的,在本发明一些实施例中,如图2所示,上述步骤S102包括:Further, in some embodiments of the present invention, as shown in FIG. 2, the foregoing step S102 includes:
S1021、服务器为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对;S1021: 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;
其中,所述第二客户端与所述第一客户端不同,即至少一个第二客户端中每一个客户端与第一客户端均不同,例如第一客户端为直播平台上的客户端A,第二客户端为直播平台上面的客户端B。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、服务器将第一客户端与至少一个第二客户端配对的信息分别发送给第一客户端和至少一个第二客户端,以使得第一客户端和至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。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.
进一步的,上述至少第二客户端可以是仅包括一个客户端,也可以是包括多个客户端,若所述至少一个第二客户端仅包括一个第二客户端;所述步骤S103可以包括:服务器获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;此时,
上述步骤S104可以包括:若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;若所述第一校验结果为所述第二客户端非法,第二校验结果为所述第一客户端合法,则确定所述第一客户端为合法客户端,第二客户端为非法客户端。Further, 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.
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;所述步骤S103可以包括:所述服务器获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;所述步骤S104可以包括:所述服务器确定所述第三校验结果中最多相同的校验结果;若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。Further, if the at least one second client only includes multiple second clients, 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.
本发明实施例中,在生成该第一区块链之前,会预先定义好区块链数据结构,该第一区块链和第二区块链为同样的数据结构;该数据结构包括区块链的块号、前一个区块链的哈希值、当前时间的时间戳以及区块链功能数据,所述区块链功能数据包括所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志。本发明实施例中,在生成该第一区块链时,按照预先定义的区块链数据结构生成第一区块链,同理,在客户端接收第一区块链后,根据第一区块链生成第二区块链时,生成的第二区块链也按照该预先定义的区块链数据结构生成。In the embodiment of the present invention, before generating the first blockchain, 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. In the embodiment of the present invention, when the first blockchain is generated, the first blockchain is generated according to the predefined blockchain data structure. Similarly, after the client receives the first blockchain, according to the first zone. When the blockchain generates the second blockchain, 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. Specifically, 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:
Struct BlockData{Struct BlockData{
Int64 index;Int64 index;
String previousHash;String previousHash;
Int64 timestamp;
Int64 timestamp;
String data;String data;
String hash;String hash;
}}
其中,index用来表示区块链的块号,通常从0开始递增;previousHash表示前一个区块链的HASH值;timestamp表示时间戳;其中data字段则是一些数据的拼接,这个data字段的内容则是依据区块链所需要完成的功能所涉及的数据,即上述区块链功能数据,包括房间号,客户端的用户uid(用户标识),以及客户端的token(客户端的标志);hash值则表示当前这个区块链的hash值。有了这个区块链数据结构的设计后,当服务器收到客户端新生成的第二区块链后,则可以通过对里面的数据进行校验,以判断其合法性。Where 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. With the design of the blockchain data structure, when 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.
请参阅图3,为本发明实施例中服务器的一个实施例示意图,该服务器包括:Referring to FIG. 3, it is a schematic diagram of an embodiment of a server according to an embodiment of the present invention. The server includes:
发送模块301,用于下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;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.
配对模块302,用于将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;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;
获取模块303,用于获取所有房间的客户端分别反馈的校验结果;The obtaining module 303 is configured to obtain a verification result that is respectively fed back by the client in all rooms;
确定模块304,用于根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。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.
进一步的,所述配对模块302具体用于:Further, the pairing module 302 is specifically configured to:
为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;Selecting, by the first client on the live broadcast platform, at least one second client on the live broadcast platform, the second client being different from the first client;
将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。Transmitting, by the first client, the information paired with the at least one second client to the first client and the at least one second client, respectively, such that the first client and the at least A second client checks the second block chain generated by the other party with each other, and sends a verification result to the server.
进一步的,若所述至少一个第二客户端仅包括一个第二客户端;所述获
取模块303具体用于:Further, if the at least one second client only includes one second client;
The module 303 is specifically configured to:
获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;Obtaining a first verification result of the second client that is fed back by the first client, and acquiring a second verification result that is fed back by the second client to the first client;
所述确定模块304具体用于:The determining module 304 is specifically configured to:
若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;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, and the second client is legal. 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, it is determined that the first client is a legitimate client, and the second client is illegal. Client.
进一步的,若所述至少一个第二客户端仅包括多个第二客户端;Further, if the at least one second client only includes multiple second clients;
所述获取模块303具体用于:The obtaining module 303 is specifically configured to:
获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;Obtaining a third verification result that is fed back by the at least one second client to the first client;
所述确定模块304具体用于:The determining module 304 is specifically configured to:
确定所述第三校验结果中最多相同的校验结果;Determining at most the same verification result in the third verification result;
若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。If 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.
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;Further, the 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.
本发明实施例中还提供一种服务器,请参见图4,所述服务器包括:A server is also provided in the embodiment of the present invention. Referring to FIG. 4, the server includes:
存储器401,处理器402及存储在所述存储器上并可在所述处理器上运行的计算机程序403,其中,所述处理器402执行所述计算机程序403时可以实现上述数据校验方法。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.
为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。存储器401可用于存储计算机程序403,上述计算机程序包括软件程序、模块和数据,处理器402通过运行执行
存储在存储器401的计算机程序403,从而执行服务器的各种功能应用以及数据处理。For the convenience of description, only the parts related to the embodiments of the present invention are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present invention. 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.
在具体的实施过程中,存储器401可用于存储软件程序以及模块,处理器402通过运行存储在存储器401的软件程序以及模块,从而执行服务器的各种功能应用以及数据处理。存储器401可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(例如游戏类应用程序、聊天类应用程序)等;存储数据区可存储根据服务器的使用所创建的数据(游戏配置数据、音频数据)等。此外,存储器401可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。处理器402是服务器的控制中心,利用各种接口和线路连接整个服务器的各个部分,通过运行或执行存储在存储器401内的软件程序和/或模块,以及调用存储在存储器401内的数据,执行服务器的各种功能和处理数据,从而对服务器进行整体监控。可选的,处理器402可包括一个或多个处理单元;优选的,处理器402可集成应用处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等。In a specific implementation process, 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. Further, 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. Optionally, 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.
请参阅图5,为本发明实施例中客户端侧数据校验方法的一个实施例示意图,该方法包括: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:
S501、直播平台上的第一客户端接收服务器下发的第一区块链,生成第二区块链;S501. The first client on the live broadcast platform receives the first blockchain delivered by the server, and generates a second blockchain.
S502、第一客户端接收服务器下发的与至少一个第二客户端的配对信息;S502. The first client receives the pairing information that is sent by the server and is configured by the at least one second client.
S503、第一客户端向至少一个第二客户端分别发送所述第二区块链,以使得至少一个第二客户端分别校验第一客户端的合法性,并将校验结果反馈给服务器。S503. 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.
本发明实施例通过直播平台上的第一客户端接收服务器下发的第一区块链,生成第二区块链;第一客户端接收服务器下发的与至少一个第二客户端的配对信息;第一客户端向所述至少一个第二客户端分别发送第二区块链,以使得至少一个第二客户端分别校验第一客户端的合法性,并将校验结果反
馈给所述服务器。本发明实施例中通过客户端对客户端进行校验合法性,校验完成后将结果上报到服务器,服务器直接获取客户端的校验结果,从而极大的节省了服务器的计算压力,同时提升了校验效率。In the embodiment of the present invention, 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. In the embodiment of the present invention, 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.
进一步的,在本发明一些实施例中,如图6所示,本发明实施例中方法还包括:Further, in some embodiments of the present invention, as shown in FIG. 6, the method in the embodiment of the present invention further includes:
S504、第一客户端接收所述至少一个第二客户端分别发送的第三区块链,所述第三区块链为每个第二客户端接收所述服务器下发所述第一区块链后生成的;S504. 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;
S505、第一客户端根据所述第三区块链分别校验所述至少一个第二客户端的合法性;S505. The first client respectively verifies the legality of the at least one second client according to the third blockchain.
S506、第一客户端将对所述至少一个第二客户端的校验结果反馈给所述服务器。S506. The first client feeds back the verification result of the at least one second client to the server.
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;Further, the 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.
本发明实施例中,客户端中数据结构与上述服务器侧描述的数据结构类似,此处不再赘述。In the embodiment of the present invention, the data structure in the client is similar to the data structure described on the server side, and details are not described herein again.
在本发明一些实施例中,如图7所示,上述步骤S501可以进一步包括:In some embodiments of the present invention, as shown in FIG. 7, the foregoing step S501 may further include:
S5011、根据所述第一区块链的块号加1,得到所述第二区块链的块号;S5011: Add a block number of the first blockchain to obtain a block number of the second blockchain.
具体的,根据Newblock.index=prevblock.index+1,计算第二区块链的块号,其中,Newblock.index为第二区块链的块号,prevblock.index为前一个区块链的块号,此处即为第一区块链的块号,即第二区块链的块号是第一区块链的块号加1。Specifically, the block number of the second blockchain is calculated according to Newblock.index=prevblock.index+1, wherein Newblock.index is the block number of the second blockchain, and prevblock.index is the block of the previous 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.
S5012、获取当前时间;S5012: Obtain a current time;
具体的,根据Newblock.timestamp=time()来获取当前的时间,以作为第二区块链的时间戳。Specifically, the current time is obtained according to Newblock.timestamp=time() as the timestamp of the second blockchain.
S5013、计算所述第一区块链的哈希值,作为所述第二区块链中前一个区块链的哈希值;
S5013. Calculate a hash value of the first blockchain as a hash value of a previous blockchain in the second blockchain.
具体的,根据Newblock.previousHash=prevblock.hash,计算新区块的上一个区块的hash值则是获取的上一个区块的hash值,此处,即计算第一区块链的哈希值,作为第二区块链中前一个区块链的哈希值。Specifically, according to 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. As a hash of the previous blockchain in the second blockchain.
S5014、获取目标房间的房间号,客户端的用户标识以及客户端的标志,得到第二区块链功能数据;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;
具体的,根据Newblock.data=roomid+uid+token得到第二区块链功能数据,其中,Newblock.data为第二区块链功能数据,token为当前客户端登陆时获取的客户端的标志,uid为客户端的用户标识,roomid为当前用户在客户端观看的目标房间的房间号。Specifically, the second blockchain function data is obtained according to Newblock.data=roomid+uid+token, wherein Newblock.data is the function data of the second blockchain, and the token is the flag of the client acquired when the current client logs in, uid For the client's user ID, the roomid is the room number of the target room that the current user is viewing on the client.
S5015、对所述第二区块链的块号、当前时间、所述第一区块链的哈希值及所述第二区块链功能数据进行哈希计算,得到所述第二区块链的哈希值;S5015. Perform a hash calculation on the block number of the second blockchain, the current time, the hash value of the first blockchain, and the second blockchain function data, to obtain the second block. The hash value of the chain;
S5016、根据第二区块链的块号、当前时间、第一区块链的哈希值、第二区块链的哈希值及第二区块链功能数据,按照所述数据结构生成第二区块链。S5016. Generate a first according to the data structure according to the block number of the second blockchain, the current time, the hash value of the first blockchain, the hash value of the second blockchain, and the second blockchain function data. Two blockchain.
通过上述步骤即可实现了通过第一区块链按照预设的数据结构生成一个新的第二区块链的方法。Through the above steps, a method for generating a new second blockchain according to a preset data structure through the first blockchain can be realized.
进一步的,所述第一客户端根据所述第三区块链分别校验所述至少一个第二客户端的合法性,具体包括:判断所述第三区块链的块号是否等于第一区块链的块号加1,若否,则确定所述第三区块链不正确;判断所述第三区块链中包含的前一个区块链的哈希值是否与所述第一区块链的哈希值匹配,若否,则确定所述第三区块链不正确。Further, 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.
进一步的,所述第一客户端根据所述第三区块链分别校验所述至少一个第二客户端的合法性,具体还包括:计算所述第一区块链的整体哈希值;对所述第一区块链中区块链的块号、前一个区块链的哈希值、第一区块链的时间戳以及区块链功能数据进行哈希计算,得到所述第一区块链的哈希值;判断所述第一区块链的哈希值和所述第一区块链的整体哈希值是否匹配,若否,则确定所述第一区块链不正确。Further, 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.
下面介绍本发明实施例中客户端的实施例。The following describes an embodiment of the client in the embodiment of the present invention.
请参阅图8,为本发明实施例中客户端的一个实施例示意图,该客户端包括:
FIG. 8 is a schematic diagram of an embodiment of a client in an embodiment of the present invention, where the client includes:
生成模块801,用于接收服务器下发的第一区块链,生成第二区块链;The generating module 801 is configured to receive a first blockchain delivered by the server, and generate a second blockchain.
第一接收模块802,用于接收服务器下发的与至少一个目标客户端的配对信息;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.
第一发送模块803,用于向所述至少一个目标客户端分别发送所述第二区块链,以使得所述至少一个目标客户端分别校验所述客户端的合法性,并将校验结果反馈给所述服务器。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.
进一步的,如图9所示,所述客户端还包括:Further, as shown in FIG. 9, the client further includes:
第二接收模块804,用于接收所述至少一个目标客户端分别发送的第三区块链,所述第三区块链为每个目标客户端接收所述服务器下发所述第一区块链后生成的;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;
校验模块805,根据所述第三区块链分别校验所述至少一个目标客户端的合法性;The verification module 805 is configured to verify the legality of the at least one target client according to the third blockchain.
第二发送模块806,用于将对所述至少一个目标客户端的校验结果反馈给所述服务器。The second sending module 806 is configured to feed back the verification result of the at least one target client to the server.
进一步的,所述第一区块链和所述第二区块链为同样的数据结构;Further, the 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.
进一步的,所述生成模块801具体用于:Further, the generating module 801 is specifically configured to:
根据所述第一区块链的块号加1,得到所述第二区块链的块号;Obtaining a block number of the second blockchain according to a block number of the first blockchain plus one;
获取当前时间;Get the current time;
计算所述第一区块链的哈希值,作为所述第二区块链中前一个区块链的哈希值;Calculating a hash value of the first blockchain as a hash value of a previous blockchain in the second blockchain;
获取所述目标房间的房间号,所述客户端的用户标识以及所述客户端的标志,得到所述第二区块链功能数据;Obtaining a room number of the target room, a user identifier of the client, and a logo of the client, to obtain the second blockchain function data;
对所述第二区块链的块号、当前时间、所述第一区块链的哈希值及所述第二区块链功能数据进行哈希计算,得到所述第二区块链的哈希值;Performing a hash calculation on the block number of the second blockchain, the current time, the hash value of the first blockchain, and the second blockchain function data, to obtain the second blockchain Hash value
根据所述第二区块链的块号、当前时间、所述第一区块链的哈希值、所述第二区块链的哈希值及所述第二区块链功能数据,按照所述数据结构生成
所述第二区块链。And according to the block number of the second blockchain, the current time, the hash value of the first blockchain, the hash value of the second blockchain, and the second blockchain function data, according to Data structure generation
The second block chain.
本发明实施例中还提供一种客户端,请参见图10,所述客户端包括:A client is also provided in the embodiment of the present invention. Referring to FIG. 10, the client includes:
存储器901,处理器902及存储在所述存储器上并可在所述处理器上运行的计算机程序903,其中,所述处理器902执行所述计算机程序903时可以实现上述数据校验方法。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.
需要说明的是,本申请涉及的客户端包括但不限于是:移动终端(手机、智能手机、PAD、笔记本电脑等等)、固定终端(计算机)。It should be noted that the 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).
为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。存储器901可用于存储计算机程序903,上述计算机程序包括软件程序、模块和数据,处理器902通过运行执行存储在存储器901的计算机程序903,从而执行客户端的各种功能应用以及数据处理。For the convenience of description, only the parts related to the embodiments of the present invention are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present invention. 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.
在具体的实施过程中,存储器901可用于存储软件程序以及模块,处理器902通过运行存储在存储器901的软件程序以及模块,从而执行客户端的各种功能应用以及数据处理。存储器901可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(例如游戏类应用程序、聊天类应用程序)等;存储数据区可存储根据客户端的使用所创建的数据(游戏配置数据、音频数据)等。此外,存储器901可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。处理器902是客户端的控制中心,利用各种接口和线路连接整个客户端的各个部分,通过运行或执行存储在存储器901内的软件程序和/或模块,以及调用存储在存储器901内的数据,执行客户端的各种功能和处理数据,从而对客户端进行整体监控。可选的,处理器902可包括一个或多个处理单元;优选的,处理器902可集成应用处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等。In a specific implementation process, 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. Further, 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. Optionally, 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.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, 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. In addition, 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.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, 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.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。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. Based on such understanding, 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. .
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应
当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。
The above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should
It is to be understood that the technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced; and such modifications or substitutions do not detract from the essence of the corresponding technical solutions. The spirit and scope of the programme.
Claims (10)
- 一种数据校验方法,其特征在于,所述方法包括:A data verification method, the method comprising:S101:服务器下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;S101: 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:所述服务器将所有房间的所有客户端两两配对,以使得两两配对的客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器;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:所述服务器获取所有房间的客户端分别反馈的校验结果;S103: The server obtains a verification result that is respectively fed back by a client in all rooms;S104:所述服务器根据所有房间的客户端分别反馈的校验结果,分别确定直播平台所有房间的客户端的合法性。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.
- 根据权利要求1所述的方法,其特征在于,所述步骤S102包括:The method of claim 1 wherein said step S102 comprises:所述服务器为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;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;所述服务器将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。Sending, by the server, information that is paired by the first client and the at least one second client to the first client and the at least one second client, respectively, to enable the first client and The at least one second client mutually checks the second blockchain generated by the other party, and sends the verification result to the server.
- 根据权利要求2所述的方法,其特征在于,若所述至少一个第二客户端仅包括一个第二客户端;所述步骤S103包括:The method according to claim 2, wherein if said at least one second client comprises only one second client; said step S103 comprises:所述服务器获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;Obtaining, by the server, a first verification result that is fed back by the first client, and obtaining a second verification result that is sent by the second client to the first client;所述步骤S104包括:The step S104 includes:若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;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, and the second client is legal. 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, it is determined that the first client is a legitimate client, and the second client is illegal. Client.
- 根据权利要求2所述的方法,其特征在于,若所述至少一个第二客户端仅包括多个第二客户端;所述步骤S103包括:The method according to claim 2, wherein if the at least one second client only includes a plurality of second clients; the step S103 comprises:所述服务器获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;Obtaining, by the server, the third verification result that is fed back by the at least one second client to the first client;所述步骤S104包括:The step S104 includes:所述服务器确定所述第三校验结果中最多相同的校验结果;Determining, by the server, a verification result that is the same in the third verification result;若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。If 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.
- 根据权利要求1所述的方法,其特征在于,所述第一区块链和所述第二区块链为同样的数据结构;The method of claim 1 wherein said first blockchain and said second blockchain are of 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, wherein the server comprises:发送模块,用于下发第一区块链到直播平台所有房间的所有客户端,以使得所述每个客户端收到所述第一区块链后生成第二区块链;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.
- 根据权利要求6所述的装置,其特征在于,所述配对模块具体用于:The device according to claim 6, wherein the pairing module is specifically configured to:为直播平台上的第一客户端选择直播平台上的至少一个第二客户端与其配对,所述第二客户端与所述第一客户端不同;Selecting, by the first client on the live broadcast platform, at least one second client on the live broadcast platform, the second client being different from the first client;将所述第一客户端与所述至少一个第二客户端配对的信息分别发送给所述第一客户端和所述至少一个第二客户端,以使得所述第一客户端和所述至少一个第二客户端之间互相校验对方生成的第二区块链,并将校验结果发送到所述服务器。 Transmitting, by the first client, the information paired with the at least one second client to the first client and the at least one second client, respectively, such that the first client and the at least A second client checks the second block chain generated by the other party with each other, and sends a verification result to the server.
- 根据权利要求6所述的装置,其特征在于,若所述至少一个第二客户端仅包括一个第二客户端;所述获取模块具体用于:The device according to claim 6, wherein the at least one second client comprises only one second client; the obtaining module is specifically configured to:获取第一客户端反馈的对第二客户端的第一校验结果,以及获取第二客户端反馈的对所述第一客户端的第二校验结果;Obtaining a first verification result of the second client that is fed back by the first client, and acquiring a second verification result that is fed back by the second client to the first client;所述确定模块具体用于:The determining module is specifically configured to:若所述第一校验结果为所述第二客户端合法,第二校验结果为所述第一客户端非法,则确定所述第一客户端为非法客户端,第二客户端为合法客户端;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, and the second client is legal. 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, it is determined that the first client is a legitimate client, and the second client is illegal. Client.
- 根据权利要求6所述的装置,其特征在于,若所述至少一个第二客户端仅包括多个第二客户端;The apparatus according to claim 6, wherein said at least one second client comprises only a plurality of second clients;所述获取模块具体用于:The obtaining module is specifically configured to:获取所述至少一个第二客户端分别反馈的对所述第一客户端的第三校验结果;Obtaining a third verification result that is fed back by the at least one second client to the first client;所述确定模块具体用于:The determining module is specifically configured to:确定所述第三校验结果中最多相同的校验结果;Determining at most the same verification result in the third verification result;若最多相同的校验结果为合法,则确定所述第一客户端合法,若最多相同的校验结果为非法,则确定所述第一客户端非法。If 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.
- 一种服务器,其特征在于,包括:存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时可以实现权利要求1至5任一所述的方法。 A server, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor can implement the claims when executing the computer program The method of any of 1 to 5.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710883417.0 | 2017-09-26 | ||
CN201710883417.0A CN107623865A (en) | 2017-09-26 | 2017-09-26 | A kind of data verification method and server |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019061628A1 true WO2019061628A1 (en) | 2019-04-04 |
Family
ID=61090775
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/108058 WO2019061628A1 (en) | 2017-09-26 | 2017-10-27 | Data verification method, and server |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107623865A (en) |
WO (1) | WO2019061628A1 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108230047A (en) * | 2018-02-05 | 2018-06-29 | 武汉斗鱼网络科技有限公司 | Data processing method of drawing a lottery and device |
CN111372091A (en) * | 2020-02-26 | 2020-07-03 | 广州趣丸网络科技有限公司 | Live content risk information control method and system |
CN111966971A (en) * | 2020-08-20 | 2020-11-20 | 咪咕文化科技有限公司 | Profit distribution method, apparatus, server and storage medium for copyright product |
CN112529429A (en) * | 2020-12-16 | 2021-03-19 | 平安科技(深圳)有限公司 | Customer information checking method and device, computer equipment and storage medium |
CN113434561A (en) * | 2021-06-24 | 2021-09-24 | 北京金山云网络技术有限公司 | Live broadcast data verification method and system, electronic device and storage medium |
CN113645214A (en) * | 2021-08-03 | 2021-11-12 | 北京百度网讯科技有限公司 | Data detection method and device, electronic equipment and readable storage medium |
CN114666399A (en) * | 2022-03-08 | 2022-06-24 | 北京沃东天骏信息技术有限公司 | Service request verification method, device, equipment and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108924089B (en) * | 2018-05-29 | 2021-11-09 | 武汉斗鱼网络科技有限公司 | Client device identification method and device and client device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106385601A (en) * | 2016-09-14 | 2017-02-08 | 武汉斗鱼网络科技有限公司 | Method and system for counting number of persons watching live broadcast simultaneously based on multiprotocol verification |
CN106385593A (en) * | 2016-09-14 | 2017-02-08 | 武汉斗鱼网络科技有限公司 | Method and system for counting number of persons watching live broadcast simultaneously based on elliptical curve algorithm |
US20170149560A1 (en) * | 2012-02-02 | 2017-05-25 | Netspective Communications Llc | Digital blockchain authentication |
CN107171810A (en) * | 2017-06-27 | 2017-09-15 | 中国联合网络通信集团有限公司 | The verification method and device of block chain |
CN107426253A (en) * | 2017-09-26 | 2017-12-01 | 武汉斗鱼网络科技有限公司 | A kind of data verification method and client |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105959728B (en) * | 2016-06-27 | 2019-06-21 | 武汉斗鱼网络科技有限公司 | The system and method for the statistics live streaming online number of platform |
CN106357640B (en) * | 2016-09-18 | 2019-11-08 | 江苏通付盾科技有限公司 | Identity authentication method, system and server based on block chain network |
CN106534160B (en) * | 2016-12-02 | 2020-02-21 | 江苏通付盾科技有限公司 | Identity authentication method and system based on block chain |
CN106789985B (en) * | 2016-12-08 | 2019-11-12 | 武汉斗鱼网络科技有限公司 | Client validation method and system based on GPU algorithm |
CN111917864B (en) * | 2017-02-22 | 2023-08-22 | 创新先进技术有限公司 | Service verification method and device |
-
2017
- 2017-09-26 CN CN201710883417.0A patent/CN107623865A/en active Pending
- 2017-10-27 WO PCT/CN2017/108058 patent/WO2019061628A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170149560A1 (en) * | 2012-02-02 | 2017-05-25 | Netspective Communications Llc | Digital blockchain authentication |
CN106385601A (en) * | 2016-09-14 | 2017-02-08 | 武汉斗鱼网络科技有限公司 | Method and system for counting number of persons watching live broadcast simultaneously based on multiprotocol verification |
CN106385593A (en) * | 2016-09-14 | 2017-02-08 | 武汉斗鱼网络科技有限公司 | Method and system for counting number of persons watching live broadcast simultaneously based on elliptical curve algorithm |
CN107171810A (en) * | 2017-06-27 | 2017-09-15 | 中国联合网络通信集团有限公司 | The verification method and device of block chain |
CN107426253A (en) * | 2017-09-26 | 2017-12-01 | 武汉斗鱼网络科技有限公司 | A kind of data verification method and client |
Non-Patent Citations (1)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108230047A (en) * | 2018-02-05 | 2018-06-29 | 武汉斗鱼网络科技有限公司 | Data processing method of drawing a lottery and device |
CN108230047B (en) * | 2018-02-05 | 2021-04-27 | 武汉斗鱼网络科技有限公司 | Lottery drawing data processing method and device |
CN111372091A (en) * | 2020-02-26 | 2020-07-03 | 广州趣丸网络科技有限公司 | Live content risk information control method and system |
CN111966971A (en) * | 2020-08-20 | 2020-11-20 | 咪咕文化科技有限公司 | Profit distribution method, apparatus, server and storage medium for copyright product |
CN112529429A (en) * | 2020-12-16 | 2021-03-19 | 平安科技(深圳)有限公司 | Customer information checking method and device, computer equipment and storage medium |
CN112529429B (en) * | 2020-12-16 | 2024-05-14 | 平安科技(深圳)有限公司 | Client information verification method, device, computer equipment and storage medium |
CN113434561A (en) * | 2021-06-24 | 2021-09-24 | 北京金山云网络技术有限公司 | Live broadcast data verification method and system, electronic device and storage medium |
CN113645214A (en) * | 2021-08-03 | 2021-11-12 | 北京百度网讯科技有限公司 | Data detection method and device, electronic equipment and readable storage medium |
CN113645214B (en) * | 2021-08-03 | 2023-08-15 | 北京百度网讯科技有限公司 | Data detection method, device, electronic equipment and readable storage medium |
CN114666399A (en) * | 2022-03-08 | 2022-06-24 | 北京沃东天骏信息技术有限公司 | Service request verification method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107623865A (en) | 2018-01-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019061628A1 (en) | Data verification method, and server | |
CN111949953B (en) | Identity authentication method, system and device based on block chain and computer equipment | |
WO2019061626A1 (en) | Data verification method, and server | |
CN107426253B (en) | Data verification method and client | |
KR102039316B1 (en) | Method and device for authentication using dynamic passwords | |
CN111556006B (en) | Third-party application system login method, device, terminal and SSO service platform | |
WO2019061598A1 (en) | Data verification method and client | |
WO2019061629A1 (en) | Data verification method, and server | |
WO2019061627A1 (en) | Data verification method, and server | |
WO2019061630A1 (en) | Transaction accounting method, and client | |
CN112672098B (en) | Cloud video conference encryption method, device and system | |
CN108805571B (en) | Data protection method, platform, block chain node, system and storage medium | |
WO2019061599A1 (en) | Authentication method and server | |
WO2019134303A1 (en) | Live stream room popularity processing method and apparatus, server and storage medium | |
WO2019001083A1 (en) | Authentication method and device for video stream address | |
US20140282696A1 (en) | Advertising download verification | |
WO2019061597A1 (en) | Data processing method and server | |
CN110912689A (en) | Method and system for generating and verifying unique value | |
CN111461720A (en) | Identity verification method and device based on block chain, storage medium and electronic equipment | |
CN108924089B (en) | Client device identification method and device and client device | |
CN108289096B (en) | Method and device for paying attention to live broadcast room and verifying attention to live broadcast room | |
WO2019071857A1 (en) | Method and device preventing gift giving on live streaming platform | |
CN110034922B (en) | Request processing method, processing device, request verification method and verification device | |
WO2023151415A1 (en) | Data processing methods and apparatuses | |
WO2023103425A1 (en) | Communicative connection method, system, and apparatus, storage medium, and processor |
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 |