CN107679149A - A kind of data processing method and server - Google Patents

A kind of data processing method and server Download PDF

Info

Publication number
CN107679149A
CN107679149A CN201710883395.8A CN201710883395A CN107679149A CN 107679149 A CN107679149 A CN 107679149A CN 201710883395 A CN201710883395 A CN 201710883395A CN 107679149 A CN107679149 A CN 107679149A
Authority
CN
China
Prior art keywords
block chain
client
server
destination client
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710883395.8A
Other languages
Chinese (zh)
Inventor
周志刚
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710883395.8A priority Critical patent/CN107679149A/en
Priority to PCT/CN2017/107069 priority patent/WO2019061597A1/en
Publication of CN107679149A publication Critical patent/CN107679149A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0239Online discounts or incentives
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25808Management of client data

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a kind of data processing method and server.Present invention method includes:When draw a lottery for the first time, server issues the first block chain to all clients in target room, to cause each client to generate the second block chain after receiving the first block chain;Server is according to the second block chain, it is determined that the destination client of first time lottery prize;When carrying out second of prize drawing, server issues the 3rd block chain to destination client, to cause destination client to generate the 5th block chain after receiving the 3rd block chain;Server issues the 4th block chain to other clients, to cause other clients to generate the 6th block chain after receiving the 4th block chain;The 5th block chain that the 6th block chain and destination client that server is sent according to each client are sent, it is determined that second of client got the winning number in a bond.In the embodiment of the present invention, the fairness of prize drawing is improved, simultaneously because the use of block chain technology, improves the difficulty of hack, security is higher.

Description

A kind of data processing method and server
Technical field
The present invention relates to video display arts field, more particularly to a kind of data processing method and server.
Background technology
At present, net cast is to be carried out using internet and stream media technology live, and live platform is in order to strengthen its income And the interaction between increase spectators, current live platform have reward mechanism of beating, spectators can beat award some presents of main broadcaster with Represent the support to main broadcaster's content.Main broadcaster can also set precious case to allow all spectators in room to draw a lottery, with sign pair simultaneously The thanks of spectators.
But current drawing manner is spectators clicks on and get precious case to draw a lottery, while there is also some hacker's uses to write Script participate in drawing a lottery automatically, whether shell script can detect currently has precious case, if then click is got precious case and entered immediately Row prize drawing, or even directly drawn a lottery by procotol bag come notification server, this mode is obviously to other users It is inequitable.
Therefore a kind of method is needed to prevent the script of prize drawing, while it is also possible that more fair, energy of entirely drawing a lottery Enough allow different spectators to have the opportunity to be extracted into awards, and be not limited to a few individuals.
The content of the invention
The embodiments of the invention provide a kind of data processing method and server, to avoid the live room of live platform from entering Cheating during row prize drawing so that prize drawing is more fair.
In a first aspect, this application provides a kind of data processing method, this method includes:
When in live platform target room draw a lottery for the first time, server issues the first block chain to the target room Between all clients, to cause each client in the target room to generate the second block after receiving the first block chain Chain;
The second block chain that the server is sent according to each client is received, it is determined that the target of first time lottery prize Client, winning probability corresponding to the second block chain that each client is sent are identical;
When second of prize drawing is carried out in live platform target room, the server issues the 3rd block chain to the mesh The destination client in room is marked, to cause the destination client to generate the 5th block after receiving the 3rd block chain Chain;
The server issues the 4th block chain to other clients in addition to the destination client in the target room End, to cause other described clients to generate the 6th block chain after receiving the 4th block chain;
The server is according to receiving the 6th block chain that each client sends and the destination client is sent the Five block chains, it is determined that second of client got the winning number in a bond, winning probability corresponding to the 5th block chain are less than the 6th block Chain winning probability.
Further, the 3rd block chain includes the first default value for generating preset data in new block chain Number, the 4th block chain include generate new block chain in preset data the second default value number, described first is pre- If numerical value number is more than the second default value number, the default value of preset data in the block chain that the server receives Number is negatively correlated with winning probability.
Further, methods described also includes:
The server it is determined that first time lottery prize destination client when, record corresponding to the destination client User identifies;
The server issues the 3rd block chain to the destination client in the target room, including:
Server user according to corresponding to the destination client identifies, and issues the 3rd block chain to target visitor Family end.
Further, the first block chain, the second block chain, the 3rd block chain, the 4th block chain, 5th block chain and the 6th block chain data structure are identical;
The data structure includes the key that the block number of block chain, the cryptographic Hash of previous block chain, calculating new block need Preset data in value, the timestamp of current time, block chain performance data, current block chain cryptographic Hash and generation new block chain Default value number, the block chain performance data include the room number in the target room, user's mark of the client And the mark of the client.
Further, methods described also includes:
The server verifies the second block chain respectively when receiving the second block chain that each client is sent Legitimacy.
Second aspect, the application provide a kind of server, and the server includes:
First sending module, when being drawn a lottery for carrying out first time in live platform target room, issue the first block chain To all clients in the target room, after causing each client in the target room to receive the first block chain Generate the second block chain;
First determining module, for the second block chain sent according to each client is received, it is determined that in drawing a lottery for the first time The destination client of prize, winning probability corresponding to the second block chain that each client is sent are identical;
Second sending module, when being drawn a lottery for carrying out second in live platform target room, issue the 3rd block chain To the destination client in the target room, to cause the destination client to generate after receiving the 3rd block chain Five block chains;
3rd sending module, for issuing the 4th block chain to its in addition to the destination client in the target room His client, to cause other described clients to generate the 6th block chain after receiving the 4th block chain;
Second determining module, for the 6th block chain and destination client hair sent according to each client is received The 5th block chain sent, it is determined that second client got the winning number in a bond, winning probability corresponding to the 5th block chain is less than described the Six block chain winning probabilities.
Further, the 3rd block chain includes the first default value for generating preset data in new block chain Number, the 4th block chain include generate new block chain in preset data the second default value number, described first is pre- If numerical value number is more than the second default value number, the default value of preset data in the block chain that the server receives Number is negatively correlated with winning probability.
Further, the server also includes logging modle, and the logging modle, which is used to be recorded in, to be determined to take out for the first time When encouraging the destination client got the winning number in a bond, record user corresponding to the destination client and identify;
Second sending module is specifically used for the user according to corresponding to the destination client and identified, and issues the 3rd block Chain is to the destination client.
Further, the first block chain, the second block chain, the 3rd block chain, the 4th block chain, 5th block chain and the 6th block chain data structure are identical;
The data structure includes the key that the block number of block chain, the cryptographic Hash of previous block chain, calculating new block need Preset data in value, the timestamp of current time, block chain performance data, current block chain cryptographic Hash and generation new block chain Default value number, the block chain performance data include the room number in the target room, user's mark of the client And the mark of the client.
The third aspect, the present invention also provide a kind of server, including:Memory, processor and is stored in the memory Computer program that is upper and can running on the processor, wherein, can be with during computer program described in the computing device Realize any described method in first aspect.
Fourth aspect, the present invention also provide a kind of computer-readable recording medium, are stored thereon with computer program, the journey Any described method in first aspect is realized when sequence is executed by processor.
When the embodiment of the present invention carries out drawing a lottery for the first time in live platform target room, server issues the first block chain To all clients in target room, to cause each client in target room to generate the second block after receiving the first block chain Chain;The second block chain that server is sent according to each client is received, it is determined that the destination client of first time lottery prize; When second of prize drawing is carried out in live platform target room, server issues the 3rd block chain to the target customer in target room End, to cause destination client to generate the 5th block chain after receiving the 3rd block chain;Server issues the 4th block chain to target Other in addition to destination client client in room, to cause other clients to generate the 6th block after receiving the 4th block chain Chain;The 5th block chain that server is sent according to the 6th block chain and destination client that receive each client transmission, it is determined that Second of client got the winning number in a bond.Using block chain technology for being used during initial prize drawing to all clients in the embodiment of the present invention Identical winning probability, during for drawing a lottery again, the client to having arrived prize, adjust the client lot probability so that the visitor The probability that family end is got the winning number in a bond again than other clients, can then improve the fairness of prize drawing, simultaneously because the use of block chain technology, The difficulty of hack is improved, security is higher.
Brief description of the drawings
Fig. 1 is one embodiment schematic diagram of data processing method in the embodiment of the present invention;
Fig. 2 is another embodiment schematic diagram of data processing method in the embodiment of the present invention;
Fig. 3 is one embodiment schematic diagram of server in the embodiment of the present invention;
Fig. 4 is another embodiment schematic diagram of server in the embodiment of the present invention;
Fig. 5 is another embodiment schematic diagram of server in the embodiment of the present invention.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people The every other embodiment that member is obtained under the premise of creative work is not made, it should all belong to the model that the present invention protects Enclose.
The (if present)s such as term " first ", " second " in description and claims of this specification and above-mentioned accompanying drawing It is for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that the number so used According to can exchange in the appropriate case, so as to the embodiments described herein can with except the content for illustrating or describing herein with Outer order is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover non-exclusive bag Contain, for example, containing the process of series of steps or unit, method, system, product or equipment is not necessarily limited to what is clearly listed Those steps or unit, but may include not listing clearly or intrinsic for these processes, method, product or equipment Other steps or unit.
Referring to Fig. 1, one embodiment of data processing method includes in the embodiment of the present invention:
S101, in live platform target room carry out for the first time draw a lottery when, server issues the first block chain to target The all clients in room, to cause each client in target room to generate the second block chain after receiving the first block chain;
In the present embodiment, server i.e. server corresponding to live platform, client can be user terminal, such as hand The intelligent terminals such as machine, tablet personal computer, target room are the direct broadcasting room that main broadcaster establishes on live platform, and destination client is to enter to be somebody's turn to do The client of target direct broadcasting room.Block chain be it is a kind of sequentially in time by data block by sequentially be connected in a manner of be combined into A kind of linked data structure, and the distributed account book that can not be distorted He can not forge ensured in a manner of cryptography.
The second block chain that S102, server are sent according to each client is received, it is determined that the mesh of first time lottery prize Mark client;
Wherein, winning probability corresponding to the second block chain that each client is sent is identical, i.e. user is when first draws a lottery The winning probability of each client is identical.
S103, when carrying out second in live platform target room and drawing a lottery, server issues the 3rd block chain to target Client, to cause destination client to generate the 5th block chain after receiving the 3rd block chain;
S104, server issue the 4th block chain to the client of other in addition to destination client in the target room, To cause other clients to generate the 6th block chain after receiving the 4th block chain;
The 5th area that S105, server are sent according to the 6th block chain and destination client that receive each client transmission Block chain, it is determined that second of client got the winning number in a bond.
In the present embodiment, winning probability corresponding to the 5th block chain is less than the 6th block chain winning probability, so Second of the destination client of the prize-winning probability drawn a lottery is to be less than other clients do not got the winning number in a bond.
When the embodiment of the present invention carries out drawing a lottery for the first time in live platform target room, server issues the first block chain To all clients in target room, to cause each client in target room to generate the second block after receiving the first block chain Chain;The second block chain that server is sent according to each client is received, it is determined that the destination client of first time lottery prize; When second of prize drawing is carried out in live platform target room, server issues the 3rd block chain to the target customer in target room End, to cause destination client to generate the 5th block chain after receiving the 3rd block chain;Server issues the 4th block chain to target Other in addition to destination client client in room, to cause other clients to generate the 6th block after receiving the 4th block chain Chain;The 5th block chain that server is sent according to the 6th block chain and destination client that receive each client transmission, it is determined that Second of client got the winning number in a bond.Using block chain technology for being used during initial prize drawing to all clients in the embodiment of the present invention Identical winning probability, during for drawing a lottery again, the client to having arrived prize, adjust the client lot probability so that the visitor The probability that family end is got the winning number in a bond again than other clients, can then improve the fairness of prize drawing, simultaneously because the use of block chain technology, The difficulty of hack is improved, security is higher.
Further, the 3rd block chain includes generating the first default value number of preset data in new block chain, the Four block chains include the second default value number of preset data in the new block chain of generation, and the first default value number is more than The second default value number, default value number and the winning probability negative of preset data in the block chain that server receives Close, so when the first default value number is more than the second default value number, according to the 5th of the generation of the 3rd block chain the First default value number in block chain, i.e., than the second default value number in the 6th block chain that is generated according to the 4th block chain It is more, now, the 5th block chain by take out winning probability i.e. than the 6th block chain to be taken out winning probability low.
In the embodiment of the present invention, before server issues all clients of the first block chain to the target room, Method can further include in the embodiment of the present invention:Server generates the first block chain.The 3rd is issued in server Block chain is to before the destination client in the target room, and method also includes in the embodiment of the present invention:Server generates The 3rd block chain.The 4th block chain is issued to other clients in addition to the destination client in target room in server Before end, method also includes in the embodiment of the present invention:Server generates the 4th block chain.
In the embodiment of the present invention, the first block chain, the second block chain, the 3rd block chain, the described 4th Block chain, the 5th block chain and the 6th block chain data structure are identical;
The data structure includes the key that the block number of block chain, the cryptographic Hash of previous block chain, calculating new block need Preset data in value, the timestamp of current time, block chain performance data, current block chain cryptographic Hash and generation new block chain Default value number, the block chain performance data include the room number in the target room, user's mark of the client And the mark of the client.Further, the default value number for generating preset data in new block chain can be generation 0 number before new block chain cryptographic Hash.Further, the type currently drawn a lottery also is included in the data structure and is drawn It is several to wait prize.
Specifically, in the embodiment of the present invention, above-mentioned data structure is implemented as follows:
Struct BlockData{
Int64 index;
String previousHash;
Int64 timestamp;
String key;
String data;
String zero;
String randdata;
// this randdata then represents random data, for being added in new block chain, to cause its hash calculated Value result meets 0 number that server issues.
String hash;
// this HASH value then represents the HASH values of the content of this current block.
}
Wherein, index is used for representing the block number of block chain, is incremented by generally since 0;PreviousHash represents previous The hash values (cryptographic Hash) of block chain;Timestamp represents current time stamp;Key represents to calculate the key that new block chain needs Value;Zero represents to calculate before in the hash values of new block chain 0 individual data (preset data in i.e. above-mentioned generation new block chain Default value number, the hash values that preset data refers to herein);Data then represents splicing (the i.e. above-mentioned block chain work(of some data Energy data), the content of this data field is then according to designed by the required function of completing of block chain, is directed to the present invention in fact Apply in example, block chain performance data can then include prize drawing room number (above-mentioned target room number), the type currently drawn a lottery, draw It is several wait prize, the user of client identifies (uid), the flag data (Token) of client.Hash then represents this current block The hash values of the content of chain.After the design for having this block chain, after server receives client newly caused block chain, then Can be by being verified to the data of the inside.
In the embodiment of the present invention, the first block chain can be the original block chain of server generation, when the first block chain is During original block chain, original block chain is due to being first block chain generated, and the block number of original block chain is 0, timestamp It is then current time, the hash values of a upper block chain are 0.
The algorithm that new block chain generates in block chain, block chain initial first are devised in the embodiment of the present invention simultaneously It is that server generates (such as the first block chain), server can be issued to the client in live platform target room, then should The client in target room receives after original block chain, it is necessary to which algorithm generates next block chain.It is implemented as follows:First The data structure of a upper block chain is got, next block chain is then the data progress according to a upper block chain Generation.
In the embodiment of the present invention, it is assumed that the name of a upper block chain is prevblock, the name of newly-generated block chain It is newblock, the process for specifically generating new block chain is as follows:
(1) block number of new block chain is calculated.
Newblock.index=prevblock.index+1;
The block number of i.e. new block chain is that current block number adds 1.
(2) timestamp of new block chain is calculated.
Newblock.timestamp=time ();
The timestamp of new block chain is then to obtain the current time.
(3) the hash values of a upper block chain for new block chain are calculated.
Newblock.previousHash=prevblock.hash;
The hash values of a upper block chain for new block chain are then the hash of the upper block chain obtained.
(4) the key values of a upper block chain for new block chain are calculated.
Newblock.key=prevblock.key;
The key values of a upper block chain for new block chain are then the key of the upper block chain obtained.
(5) data of new block chain are calculated.
Newblock.data=rewardtype+rewardno+uid+token.
Wherein, rewardtype is then the prize drawing type for the original block chain that server issues, and rewardno is then this The several of client prize drawing wait prize, and uid is then user's mark of client, and token is then the mark that client logs on server.
Newblock.data=AES.encrypt (Newblock.data, Newblock.key);
The data data of new block chain are then to be used together AES AES by all of the above data to be carried out to data Further encryption, wherein the key values that the KEY values used are then servers to be issued in original block chain.
(6) the randdata values of new block chain are calculated.
This randdata value is then that client generates at random, before gathering together enough the hash values that just whole new block chain calculates Face meets 0 number that server issues.
(7) the hash values of new block chain are calculated.
Newblock.hash=HASH (index+previousHash+timestamp+data+zero+randdata+ key);
The hash values of new block chain be then have new block chain index fields and previousHash fields and Timestamp fields and data fields and key fields.
In the embodiment of the present invention, Hash corresponding to cryptographic Hash (HASH) algorithm is unified, and the HASH algorithms can be SHA-256 Algorithm, naturally it is also possible to be other HASH algorithms, such as SHA-1 etc., be not construed as limiting herein.
So far, the algorithm that a new block chain is generated by a block chain is achieved that by above-mentioned steps.And this In inventive embodiments, client by receive the first block chain generate the second block chain when, pass through the 3rd block chain generation the 5th Block chain, the six trivial pieces chains are generated by the 4th block chain, i.e., realized using above-mentioned steps.
In some embodiments of the invention, as shown in Fig. 2 method can also further include in the embodiment of the present invention:
S106, server it is determined that first time lottery prize destination client when, it is corresponding to record the destination client User mark;
Now, server issues the 3rd block chain to the target customer in the target room in above-mentioned steps S103 End, is specifically included:Server user according to corresponding to destination client identifies, and issues the 3rd block chain to destination client.
In the embodiment of the present invention, either client or server, first all can be right when it receives a block chain Block chain carries out legitimacy verifies, to judge whether current block chain is legal, to prevent hacker from forging block chain, or Block chain transmits the factor such as changed in a network.So each block chain is required for carrying out completeness check.Therefore, it is of the invention Method can further include in embodiment:
The server verifies the second block chain respectively when receiving the second block chain that each client is sent Legitimacy.
Likewise, the server verifies the 5th block chain when receiving the 5th block chain of destination client transmission Legitimacy, server verifies the legitimacy of the 6th block chain respectively when receiving the 6th block chain that each client is sent.
In the embodiment of the present invention, if it is drawn a lottery, type is that the prize-winning prize of this prize drawing is the same, all clients End is all to calculate new block chain, and new block chain is sent into server, and to represent take part in this prize drawing, server is then Determine whether client gets the winning number in a bond.And for prize drawing type be the prize for having a second- and third-tier level, then whom takes in the embodiment of the present invention Be calculated at first new block chain then who first get the winning number in a bond, if some client calculates new block chain, now client meeting New block chain is sent to all clients in room using the common recognition mechanism of block chain, and other clients receive newly Block chain can then verify the legitimacy of the block chain, the awards that the client is got can be obtained from block chain if legal Grade, so as to which other clients can then abandon the participation of the awards, but continue to participate in and get second prize, likewise, working as has visitor Family end calculates the block chain of second prize, then can inform other clients, so that other clients go to calculate third prize Block chain.
In the embodiment of the present invention, the step of server or client verify to the block chain received, can specifically wrap Include:In the present embodiment, it is assumed that the name of a upper block chain is prevblock, then have received a newly-generated block chain Name be newblock.
(1) judge whether its index is correct.
Newblock.index!=prevblock.index+1;
If the block number of new block chain is not the block number plus 1 of a upper block, illustrate that new block chain does not conform to Method, directly return to block chain error information.
(2) the hash values of block chain are judged.
Newblock.previousHash!=prevblock.hash
If the hash values of a upper block for new block chain are not equal to the hash values of a upper block chain, then it is assumed that new Block chain it is illegal, directly return block errors information.
(3) the hash values of new block chain are judged.
The hash values of new block chain are the hash results of the whole data of new block chain.
HASH(Newblock.index+Newblock.previousHash+Newblock.timestamp+ Newblock.data+Newblock.randdata+Newblock.zero+Newblock.key)!=Newblock.hash;
If the hash values of the data of the whole block of new block chain are not equal to new block chain hash values, then it is assumed that new Block chain it is illegal, directly return block chain error information.
(4) the data values of new block chain are judged.
Data are encrypted by AES for the data values of new block chain.Walking herein then can ciphertext data Judge the legitimacy of data.
Newblock.data=AES.decrypt (Newblock.data, Newblock.key);
So as to obtain original data data after now data fields are decrypted, can then be learnt from data current Awards type, the prize tier got the winning number in a bond.
In the embodiment of the present invention, server is to the second block chain, the 5th block chain, the 6th block chain that receive school again As above step progress can be taken by testing, likewise, client is to the first block chain, the 3rd block chain that receive, the 4th block Chain can also take aforesaid way to realize, here is omitted.
The embodiment of server in the embodiment of the present invention is described below.
Referring to Fig. 3, for one embodiment schematic diagram of server in the embodiment of the present invention, the server includes:
First sending module 301, when being drawn a lottery for carrying out first time in live platform target room, issue the first block Chain to the target room all clients, to cause each client in the target room to receive the first block chain After generate the second block chain;
First determining module 302, for the second block chain sent according to each client is received, it is determined that drawing a lottery for the first time The destination client of prize-winning, winning probability corresponding to the second block chain that each client is sent are identical;
Second sending module 303, when being drawn a lottery for carrying out second in live platform target room, issue the 3rd block Chain to the target room the destination client, to cause the destination client to be generated after receiving the 3rd block chain 5th block chain;
3rd sending module 304, for issuing the 4th block chain to the target room in addition to the destination client Other clients, to cause other described clients to generate the 6th block chain after receiving the 4th block chain;
Second determining module 305, for according to the 6th block chain and the target customer for receiving each client transmission The 5th block chain sent is held, it is determined that second of client got the winning number in a bond, winning probability is less than institute corresponding to the 5th block chain State the 6th block chain winning probability.
Further, the 3rd block chain includes the first default value for generating preset data in new block chain Number, the 4th block chain include generate new block chain in preset data the second default value number, described first is pre- If numerical value number is more than the second default value number, the default value of preset data in the block chain that the server receives Number is negatively correlated with winning probability.
Further, as shown in figure 4, the server also includes logging modle 306, the logging modle 306 is used to remember Record it is determined that first time lottery prize destination client when, record corresponding to the destination client user and identify;
Second sending module 303 is specifically used for the user according to corresponding to the destination client and identified, and issues the 3rd Block chain is to the destination client.
Further, the first block chain, the second block chain, the 3rd block chain, the 4th block chain, 5th block chain and the 6th block chain data structure are identical;
The data structure includes the key that the block number of block chain, the cryptographic Hash of previous block chain, calculating new block need Preset data in value, the timestamp of current time, block chain performance data, current block chain cryptographic Hash and generation new block chain Default value number, the block chain performance data include the room number in the target room, user's mark of the client And the mark of the client.
A kind of server is also provided in the embodiment of the present invention, refers to Fig. 5, the server includes:
Memory 501, processor 502 and is stored in the computer that can be run on the memory and on the processor Program 503, wherein, the processor 502 can realize above-mentioned data processing method when performing the computer program 503.
For convenience of description, the part related to the embodiment of the present invention is illustrate only, particular technique details does not disclose, please With reference to present invention method part.Memory 501 can be used for storage computer program 503, and above computer program includes Software program, module and data, processor 502 perform the computer program 503 for being stored in memory 501 by running, so as to The various function application of execute server and data processing.
In specific implementation process, memory 501 can be used for storage software program and module, processor 502 to pass through Operation is stored in the software program and module of memory 501, at the various function application and data of execute server Reason.Memory 501 can mainly include storing program area and storage data field, wherein, storing program area can storage program area, extremely Application program (such as game class application program, chat class application program) needed for few One function etc.;Storage data field can deposit Storage uses created data (game configuration data, voice data) etc. according to server.In addition, memory 501 can wrap High-speed random access memory is included, nonvolatile memory, for example, at least disk memory, a flash memories can also be included Part or other volatile solid-state parts.Processor 502 is the control centre of server, is connected using various interfaces and circuit The various pieces of whole server are connect, by running or performing the software program and/or module that are stored in memory 501, with And the data being stored in memory 501 are called, the various functions and processing data of execute server, so as to be carried out to server Integral monitoring.Optionally, processor 502 may include one or more processing units;Preferably, processor 502 can integrate application Processor, wherein, application processor mainly handles operating system, user interface and application program etc..
The embodiment of the present invention also provides a kind of computer-readable recording medium, wherein, the computer-readable recording medium can Have program stored therein, the part or all of step including the data processing method described in the above method embodiment when program performs Suddenly.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the unit Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a kind of data processing method, it is characterised in that methods described includes:
When in live platform target room draw a lottery for the first time, server issues the first block chain to the target room All clients, to cause each client in the target room to generate the second block chain after receiving the first block chain;
The second block chain that the server is sent according to each client is received, it is determined that the target customer of first time lottery prize End, winning probability corresponding to the second block chain that each client is sent are identical;
When second of prize drawing is carried out in live platform target room, the server issues the 3rd block chain to target visitor Family end, to cause the destination client to generate the 5th block chain after receiving the 3rd block chain;
The server issues the 4th block chain to other clients in addition to the destination client in the target room, with So that other described clients generate the 6th block chain after receiving the 4th block chain;
The 5th area that the server is sent according to the 6th block chain and the destination client that receive each client transmission Block chain, it is determined that second of client got the winning number in a bond, winning probability corresponding to the 5th block chain are less than in the 6th block chain Encourage probability.
2. according to the method for claim 1, it is characterised in that the 3rd block chain includes generating pre- in new block chain If the first default value number of data, the 4th block chain includes the second pre- of preset data in the new block chain of generation If numerical value number, the first default value number is more than the second default value number, the block that the server receives The default value number of preset data and winning probability are negatively correlated in chain.
3. according to the method for claim 1, it is characterised in that methods described also includes:
The server it is determined that first time lottery prize destination client when, record user corresponding to the destination client Mark;
The server issues the 3rd block chain to the destination client, including:
Server user according to corresponding to the destination client identifies, and issues the 3rd block chain to the target customer End.
4. according to the method for claim 1, it is characterised in that the first block chain, the second block chain, described the Three block chains, the 4th block chain, the 5th block chain and the 6th block chain data structure are identical;
The block number of the data structure including block chain, the cryptographic Hash of previous block chain, calculate key values that new block needs, Preset data is pre- in the timestamp of current time, block chain performance data, current block chain cryptographic Hash and generation new block chain If numerical value number, the block chain performance data includes the room number in the target room, the user of the client identify with And the mark of the client.
5. according to the method for claim 1, it is characterised in that methods described also includes:
The server verifies the legal of the second block chain respectively when receiving the second block chain that each client is sent Property.
6. a kind of server, it is characterised in that the server includes:
First sending module, when being drawn a lottery for carrying out first time in live platform target room, the first block chain is issued to institute The all clients in target room are stated, to cause each client in the target room to be generated after receiving the first block chain Second block chain;
First determining module, the second block chain of each client transmission is received for basis, it is determined that first time lottery prize Destination client, winning probability corresponding to the second block chain that each client is sent are identical;
Second sending module, when being drawn a lottery for carrying out second in live platform target room, the 3rd block chain is issued to institute Destination client is stated, to cause the destination client to generate the 5th block chain after receiving the 3rd block chain;
3rd sending module, for issuing the 4th block chain to the visitor of other in addition to the destination client in the target room Family end, to cause other described clients to generate the 6th block chain after receiving the 4th block chain;
Second determining module, for what is sent according to the 6th block chain and the destination client that receive each client transmission 5th block chain, it is determined that second of client got the winning number in a bond, winning probability corresponding to the 5th block chain are less than the 6th area Block chain winning probability.
7. server according to claim 6, it is characterised in that the 3rd block chain includes generating in new block chain First default value number of preset data, the 4th block chain include generation new block chain in preset data second Default value number, the first default value number are more than the second default value number, the area that the server receives The default value number of preset data and winning probability are negatively correlated in block chain.
8. server according to claim 6, it is characterised in that the server also includes logging modle, the record When module is used to be recorded in the destination client for determining first time lottery prize, records user corresponding to the destination client and mark Know;
Second sending module is specifically used for the user according to corresponding to the destination client and identified, and issues the 3rd block chain and arrives The destination client.
9. server according to claim 6, it is characterised in that the first block chain, the second block chain, described 3rd block chain, the 4th block chain, the 5th block chain and the 6th block chain data structure are identical;
The block number of the data structure including block chain, the cryptographic Hash of previous block chain, calculate key values that new block needs, Preset data is pre- in the timestamp of current time, block chain performance data, current block chain cryptographic Hash and generation new block chain If numerical value number, the block chain performance data includes the room number in the target room, the user of the client identify with And the mark of the client.
A kind of 10. server, it is characterised in that including:Memory, processor and is stored on the memory and can be described The computer program run on processor, wherein, claim 1 can be realized described in the computing device during computer program To 5 any described methods.
CN201710883395.8A 2017-09-26 2017-09-26 A kind of data processing method and server Pending CN107679149A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710883395.8A CN107679149A (en) 2017-09-26 2017-09-26 A kind of data processing method and server
PCT/CN2017/107069 WO2019061597A1 (en) 2017-09-26 2017-10-20 Data processing method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710883395.8A CN107679149A (en) 2017-09-26 2017-09-26 A kind of data processing method and server

Publications (1)

Publication Number Publication Date
CN107679149A true CN107679149A (en) 2018-02-09

Family

ID=61138160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710883395.8A Pending CN107679149A (en) 2017-09-26 2017-09-26 A kind of data processing method and server

Country Status (2)

Country Link
CN (1) CN107679149A (en)
WO (1) WO2019061597A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335208A (en) * 2018-02-28 2018-07-27 北京京东尚科信息技术有限公司 Method and apparatus for handling information
CN108882005A (en) * 2018-04-13 2018-11-23 武汉斗鱼网络科技有限公司 A kind of barrage verification method, computer equipment and storage medium
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN109547823A (en) * 2018-12-07 2019-03-29 四川链窗区块链科技有限公司 A kind of net cast platform bonus data processing method
CN110263579A (en) * 2018-11-16 2019-09-20 腾讯科技(深圳)有限公司 A kind of data processing method, system and relevant device
CN111815845A (en) * 2020-07-08 2020-10-23 中钞信用卡产业发展有限公司杭州区块链技术研究院 Shaking method, device, system, equipment and medium based on heterogeneous block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102356410A (en) * 2009-09-10 2012-02-15 哄鸭有限公司 Online capsule lottery system and method for same
US20150046337A1 (en) * 2013-08-06 2015-02-12 Chin-hao Hu Offline virtual currency transaction
US20160125403A1 (en) * 2014-04-28 2016-05-05 Chin-hao Hu Offline virtual currency transaction
CN106504174A (en) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 Lottery industry publishing system and device based on block chain
CN106534160A (en) * 2016-12-02 2017-03-22 江苏通付盾科技有限公司 Identity authentication method and system based on block chain
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016055985A1 (en) * 2014-10-10 2016-04-14 Scientific Games Holdings Limited Method and system for conducting and linking a televised game show with play of a lottery game
CN106028165A (en) * 2016-06-17 2016-10-12 武汉斗鱼网络科技有限公司 Method and system for realizing lucky draw in mobile terminal of live broadcasting website
CN106658207A (en) * 2016-12-09 2017-05-10 武汉斗鱼网络科技有限公司 Information extracting method and device
CN107124619A (en) * 2017-04-28 2017-09-01 暴风集团股份有限公司 User interaction method and interaction platform in a kind of net cast

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102356410A (en) * 2009-09-10 2012-02-15 哄鸭有限公司 Online capsule lottery system and method for same
US20150046337A1 (en) * 2013-08-06 2015-02-12 Chin-hao Hu Offline virtual currency transaction
US20160125403A1 (en) * 2014-04-28 2016-05-05 Chin-hao Hu Offline virtual currency transaction
CN106504174A (en) * 2016-09-27 2017-03-15 布比(北京)网络技术有限公司 Lottery industry publishing system and device based on block chain
CN106534160A (en) * 2016-12-02 2017-03-22 江苏通付盾科技有限公司 Identity authentication method and system based on block chain
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335208A (en) * 2018-02-28 2018-07-27 北京京东尚科信息技术有限公司 Method and apparatus for handling information
CN108335208B (en) * 2018-02-28 2022-11-08 北京京东尚科信息技术有限公司 Method and apparatus for processing information
CN108882005A (en) * 2018-04-13 2018-11-23 武汉斗鱼网络科技有限公司 A kind of barrage verification method, computer equipment and storage medium
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN110263579A (en) * 2018-11-16 2019-09-20 腾讯科技(深圳)有限公司 A kind of data processing method, system and relevant device
CN109547823A (en) * 2018-12-07 2019-03-29 四川链窗区块链科技有限公司 A kind of net cast platform bonus data processing method
CN109547823B (en) * 2018-12-07 2020-11-10 四川链窗区块链科技有限公司 Method for processing reward data of video live broadcast platform
CN111815845A (en) * 2020-07-08 2020-10-23 中钞信用卡产业发展有限公司杭州区块链技术研究院 Shaking method, device, system, equipment and medium based on heterogeneous block chain
CN111815845B (en) * 2020-07-08 2022-03-15 中钞信用卡产业发展有限公司杭州区块链技术研究院 Shaking method, device, system, equipment and medium based on heterogeneous block chain

Also Published As

Publication number Publication date
WO2019061597A1 (en) 2019-04-04

Similar Documents

Publication Publication Date Title
CN107679149A (en) A kind of data processing method and server
CN111914027B (en) Block chain transaction keyword searchable encryption method and system
RU2652443C1 (en) Voters votes quantity collected by electronic voting determining system and method
CN106533696B (en) Identity identifying method, certificate server and user terminal based on block chain
US20220368596A1 (en) Robust and Secure Proof of Space Based Mining
CN107465698A (en) A kind of data verification method and server
CN107909369A (en) Based on the common recognition method, apparatus merchandised across chain and storage medium
EP4002181A1 (en) A consensus method and framework for a blockchain system
CN107454110A (en) A kind of data verification method and server
CN108776929A (en) Bill processing method, system based on block chain database and readable storage medium storing program for executing
CN107798538A (en) One kind transaction accounting method and client
CN108646983A (en) The treating method and apparatus of storage service data on block chain
CN108062671A (en) Data trade method, block chain node server and data submit terminal
CN106980488A (en) Random digit generation method and device
CN107682308A (en) The electronic evidence preservation system for Channel Technology of being dived based on block chain
CN107454114A (en) A kind of auction bidding method, server and readable storage medium storing program for executing
CN107679045A (en) Copyright authorization management method and system
CN107682328A (en) A kind of data verification method and client
CN108764966A (en) Advertisement placement method, block chain node device and relevant device
CN108667717A (en) Block chain processing method, medium, device and computing device based on instant communication message record
CN107801059A (en) A kind of method for authenticating and server
CN107426253A (en) A kind of data verification method and client
CN110177124A (en) Identity identifying method and relevant device based on block chain
CN108596627A (en) A kind of big data computational methods and system calculated based on block chain and mist
CN108259489A (en) A kind of voting data processing method, device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180209

RJ01 Rejection of invention patent application after publication