CN110633983A - Target event execution method and device based on block chain - Google Patents

Target event execution method and device based on block chain Download PDF

Info

Publication number
CN110633983A
CN110633983A CN201910839113.3A CN201910839113A CN110633983A CN 110633983 A CN110633983 A CN 110633983A CN 201910839113 A CN201910839113 A CN 201910839113A CN 110633983 A CN110633983 A CN 110633983A
Authority
CN
China
Prior art keywords
target
block
information
event
block number
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
CN201910839113.3A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910839113.3A priority Critical patent/CN110633983A/en
Publication of CN110633983A publication Critical patent/CN110633983A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C15/00Generating random numbers; Lottery apparatus
    • G07C15/006Generating random numbers; Lottery apparatus electronically

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Game Theory and Decision Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a target event execution method and device based on a block chain. Wherein, the method comprises the following steps: issuing block number information corresponding to the target event, wherein the block number information comprises: ending block numbers participating in the target event in the block chain, and target block numbers; before generating a cut-off block corresponding to the cut-off block number on the block chain, acquiring target prediction information provided by a target object participating in the target event, and after generating the cut-off block on the block chain, stopping acquiring prediction information provided by any object; after generating a target block corresponding to the target block number on the block chain, acquiring a hash string generated by information recorded on the target block; and generating and issuing the actual event information according to the hash string. The method and the device solve the technical problem that the predicted event is easy to cheat due to centralized guidance.

Description

Target event execution method and device based on block chain
Technical Field
The present application relates to the field of blockchains, and in particular, to a method and an apparatus for executing a target event based on a blockchain.
Background
Most lottery systems in the related art are designed such that lottery players bet first and then draw prizes. Various cheating means are diversified, and the obvious disadvantage that the banker knows the whole betting fund distribution before the lottery is drawn is that the banker can maximize the benefit of the banker by artificially interfering the lottery drawing result. Meanwhile, the lottery drawing process is a centralized guiding process, which easily causes information isolated island and lacks of transparency. Similarly, in many forecasting events, it is often the case that the centralized guidance leads to a problem of easy cheating.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a target event execution method and device based on a block chain, and the method and device at least solve the technical problem that predicted events are easy to cheat due to centralized guidance.
According to an aspect of the embodiments of the present application, there is provided a target event execution method based on a blockchain, including: issuing block number information corresponding to a target event, wherein the block number information comprises: a cut-off block number and a target block number which participate in the target event are cut off from the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number; before a cut-off block corresponding to the cut-off block number is generated on the block chain, target prediction information provided by a target object participating in the target event is acquired, and after the cut-off block is generated on the block chain, the acquisition of prediction information provided by any object is stopped; after a target block corresponding to the target block number is generated on the block chain, a hash string generated by information recorded on the target block is acquired; and generating and issuing actual event information according to the hash string, wherein when the actual event information is matched with the target prediction information, a resource corresponding to a matching result is set to be allocated to the target object.
According to another embodiment of the present application, there is also provided a target event execution apparatus based on a blockchain, including: the issuing module is configured to issue block number information corresponding to a target event, where the block number information includes: a cut-off block number and a target block number which participate in the target event are cut off from the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number; a first obtaining module, configured to obtain target prediction information provided by a target object participating in the target event before a cutoff block corresponding to the cutoff block number is generated on the block chain, and stop obtaining prediction information provided by any object after the cutoff block is generated on the block chain; a second obtaining module, configured to obtain a hash string generated by information recorded in the target block after the target block corresponding to the target block number is generated in the block chain; and the generation module is used for generating and releasing actual event information according to the hash string, wherein under the condition that the actual event information is matched with the target prediction information, resources corresponding to the matching result are set to be distributed to the target object.
Optionally, the second obtaining module is further configured to obtain information recorded on the target block within a predetermined time period; and the hash operation is carried out on the recorded information to obtain the hash string.
Optionally, the second obtaining module is further configured to obtain a first set of information recorded directly on the target block within the predetermined time period and a second set of information received and recorded by the target block during the predetermined time period and broadcasted by other blocks in the block chain.
Optionally, when the block number information further includes a start block number for starting to participate in the target event, the first obtaining module is further configured to obtain target prediction information provided by a target object participating in the target event after a start block corresponding to the start block number is generated on the block chain and before an end block corresponding to the end block number is generated on the block chain.
Optionally, the generating module is further configured to convert the last two digits of the hash string into a decimal number, so as to obtain a first numerical value; and the module operation is carried out on the highest value of a value range by using the first value to obtain the actual event information, wherein the value range is the value range of the target prediction information.
Optionally, when the actual event information is multiple, the number of the target block numbers is the same as the number of the actual event information, multiple target block numbers correspond to multiple hash strings, and for any two first hash strings and any two second hash strings in the multiple hash strings, under the condition that the actual second event information generated according to the second hash string is the same as the actual first event information generated according to the first hash string, the last two and three bits of the second hash string are taken for decimal conversion to obtain a second value; and performing modular operation on the highest value of the value range by using the second numerical value, and updating the actual information of the second event.
Optionally, the second obtaining module is further configured to obtain a bitcoin transaction record recorded on the target block; and the hash algorithm is used for carrying out hash operation on the bitcoin transaction record to obtain the hash string.
According to another aspect of the embodiments of the present application, there is also provided a storage medium, in which a computer program is stored, where the computer program is configured to execute the above target event execution method based on a block chain when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above target event execution method based on a block chain through the computer program.
In this embodiment of the present application, the block number information corresponding to the target event is issued, where the block number information includes: ending a cut-off block number and a target block number participating in the target event in the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number; before generating a cut-off block corresponding to the cut-off block number on the block chain, acquiring target prediction information provided by a target object participating in the target event, and after generating the cut-off block on the block chain, stopping acquiring prediction information provided by any object; after generating a target block corresponding to the target block number on the block chain, acquiring a hash string generated by information recorded on the target block; and generating and issuing event actual information according to the hash string, wherein when the event actual information is matched with the target prediction information, a resource corresponding to a result of the matching is set to be allocated to the target object. By adopting the scheme, the prediction event is executed on the block chain, and the value of the hash string of the block cannot be predicted, so that the advance prediction of the lottery drawing result is prevented, the artificial tampering of the actual result is avoided, the transparency and the reliability of the result are increased, and the technical problem that the prediction event is easy to cheat due to centralized guidance is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application;
FIG. 2 is a flow chart of a block chain based target event execution method according to an embodiment of the present application;
fig. 3 is an overall flow diagram of a wagering lottery according to an embodiment of the present application;
FIG. 4 is a block diagram of a bitcoin block according to the related art;
FIG. 5 is a block chain-based target event execution apparatus according to an embodiment of the present application;
fig. 6 is a block chain-based target event execution method according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Technical terms in the embodiments of the present application are explained as follows;
block chains: a decentralized distributed ledger database is an intelligent peer-to-peer network that uses distributed databases to identify, propagate, and record information, also known as the value Internet. The accuracy of data transmission and query is ensured by using a consensus mechanism, cryptography and the like, and the characteristics of the method comprise non-falsification, traceability and the like.
Bit currency: a cryptocurrency based on decentralization, employing peer-to-peer networking and consensus initiative, open source code, with blockchains as the underlying technology, anyone can participate in bitcoin activities and issue them through computer operations called mining. From birth to the present, a bitcoin is born every 10 minutes.
Hash: an input of arbitrary length (also called pre-mapped pre-image) is converted into an output of fixed length by a Hash algorithm, the output is a Hash value, and the algorithm process is irreversible.
According to an aspect of the embodiments of the present application, a method for executing a target event based on a blockchain is provided, and optionally, as an optional implementation manner, the method for executing a target event based on a blockchain may be applied to, but is not limited to, an environment shown in fig. 1.
Optionally, in this embodiment, the above target event execution method based on the blockchain may be applied, but not limited to, in the server 104, for assisting the application client in performing a search decision process on the published media file. The application client may be but not limited to run in the user equipment 102, and the user equipment 102 may be but not limited to a mobile phone, a tablet computer, a notebook computer, a PC, and other terminal equipment supporting running of the application client. The server 104 and the user device 102 may, but are not limited to, enable data interaction via a network 110, which may include, but is not limited to, a wireless network or a wired network. Wherein, this wireless network includes: bluetooth, WIFI, and other networks that enable wireless communication. Such wired networks may include, but are not limited to: wide area networks, metropolitan area networks, and local area networks. The above is merely an example, and this is not limited in this embodiment.
The block chain-based target event execution method according to the embodiment of the present application has a flow shown in fig. 2, and includes the following steps:
step S202, issuing block number information corresponding to the target event, wherein the block number information includes: ending a cut-off block number and a target block number participating in the target event in the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number;
the above-mentioned block number information may be distributed to the internet. The target event may be a lottery wager or other predictive event and the target block number may be the block that produced the winning number in the current lottery wager. The target block number is larger than the cut-off block number, i.e. the cut-off block is generated first and then the target block is generated on the block chain.
Step S204, before generating the ending block corresponding to the ending block number on the block chain, acquiring target prediction information provided by the target object participating in the target event, and after generating the ending block on the block chain, stopping acquiring prediction information provided by any object;
the target prediction information may be a bet number. The target prediction information of the target object may be received after the block number information is distributed to the internet, or a start time may be set. The target object may be a user who plays a lottery in the related art.
Step S206, after generating the target block corresponding to the target block number on the block chain, acquiring a hash string generated by the information recorded on the target block;
step S208, generating and issuing event actual information according to the hash string, wherein if the event actual information matches the target prediction information, a resource corresponding to a result of the matching is set to be allocated to the target object.
The event actual information may be a generated winning number, and when the winning number includes a plurality of sets of numbers, the event actual information may be partially or completely matched with the target prediction information, the partial matching corresponds to a small prize, and the complete matching corresponds to a large prize.
By adopting the scheme, the prediction event is executed on the block chain, and the value of the hash string of the block cannot be predicted, so that the advance prediction of the lottery drawing result is prevented, the artificial tampering of the actual result is avoided, the transparency and the reliability of the result are increased, and the technical problem that the prediction event is easy to cheat due to centralized guidance is solved.
Optionally, the obtaining a hash string generated by information recorded on the target block includes: acquiring information recorded in a preset time length on the target block; and carrying out hash operation on the recorded information to obtain the hash string. The information recorded in the block in the related art may be bit currency transaction data, and the information is continuously updated, and the hash string may be calculated by using the information within a predetermined time period. Since the information stored in the block in the related art is continuously updated, the generated hash value is also uncontrollable or unpredictable by manpower, and the condition that cheating cannot be performed is ensured.
Optionally, the obtaining information recorded in the target block within a predetermined time includes: a first set of information recorded directly on the target block for the predetermined duration and a second set of information broadcast by other blocks in the blockchain received and recorded by the target block for the predetermined duration are obtained. By adopting the scheme, the target block comprises a first group of information directly recorded in the target block, and also receives a second group of information of other block synchronization in the block chain network.
Optionally, when the block number information further includes a start block number for starting to participate in the target event, after a start block corresponding to the start block number is generated on the block chain, and before an end block corresponding to the end block number is generated on the block chain, target prediction information provided by a target object for participating in the target event is obtained. By adopting the scheme, the starting time is set in a mode of setting the starting block number.
Optionally, generating and publishing the event actual information according to the hash string includes: converting the last two digits of the hash string into a decimal system to obtain a first numerical value; and performing modular operation on the highest value of a value range by using the first value to obtain the actual event information, wherein the value range is the value range of the target prediction information. For example, the maximum value of the range of values of the two-digit number is 99.
Optionally, when the actual event information is multiple, the number of the target block numbers is the same as the number of the actual event information, and multiple target block numbers correspond to multiple hash strings, including: for any two first hash strings and any two second hash strings in the plurality of hash strings, under the condition that the actual information of a second event generated according to the second hash string is the same as the actual information of the first event generated according to the first hash string, taking the last two and three bits of the second hash string to perform decimal conversion to obtain a second numerical value; and performing modular operation on the highest value of the value range by using the second numerical value, and updating the actual information of the second event. In the same target event in the related technology, the lottery numbers cannot be repeated, and by adopting the scheme, the calculated actual information of the event is different.
Optionally, the obtaining a hash string generated by information recorded on the target block includes: acquiring a bitcoin transaction record recorded on the target block; and carrying out hash operation on the bit currency transaction record to obtain the hash string. The bit currency transaction records on the blocks can be generated by thousands of users, and anyone cannot predict the transaction records on the blocks, so that cheating in the process of betting the lottery ticket is avoided.
Optionally, when the event actual information is multiple, the number of the target block numbers is the same as the number of the event actual information, and generating and issuing the event actual information according to the hash string includes: and acquiring the hash string of each target block, generating actual event information according to each hash string, and forming the actual event information into the maximum prize predicted this time.
The scheme of the present application is further described below by taking the target event as a lottery ticket bet.
The embodiment of the application realizes a lottery system based on a block chain technology. In the related technology, the bit coin network generates a block about every ten minutes, the system selects a block number to be generated in the future to be disclosed on the day before the lottery is drawn, and the hash strings of the corresponding blocks are obtained through the block numbers and the lottery drawing number is calculated from the hash strings. In the process from public display to lottery drawing, the information is all from the bitcoin block chain, and the lottery system is only used as a display front end of the information, so that the aim of decentralization is fulfilled. The overall flow is shown in fig. 3, and includes the following steps:
step 1, the target block number and the cut-off block number are disclosed. And selecting a target block number which can be generated in the future and determining a block number of a bet cutoff, and showing the block numbers in the whole network. For example, the current bitcoin chunk number is 100, the chunk number of the bet cut off may be selected to be 300 (when a chunk with chunk number 300 appears in the bitcoin chunk chain, the bet is cut off), and the target chunk numbers 360, 361, 362 … are selected as the chunk numbers required for the drawing;
step 2, betting, namely, the user starts betting;
step 3, stopping the betting according to the stop block number, namely stopping the betting when the stop block number disclosed before the block number appears in the bitcoin block chain;
and 4, drawing a prize. Finding out the corresponding block in the bitcoin block chain by the previously disclosed block number, obtaining the hash string of the corresponding block, taking the last two digits of the hash string to convert into decimal numbers (assuming that the lottery value is less than or equal to 99), and taking the modulus of the highest value in the lottery value range, wherein the obtained value is the lottery number. If the same value is obtained, taking one bit before the hash string, namely the last second and third bits, and so on.
And 5, inquiring. The public can inquire the hash strings of the blocks corresponding to the public indication block numbers through various bit currency browsers and verify whether the lottery drawing result is correct or not.
In the embodiment of the application, the credibility of the lottery drawing result is ensured by using the non-tamper property of the bit currency block chain data. The bit coin block structure is shown in fig. 4 as follows: the block is divided into a block head and a block body, wherein the block head mainly comprises a version number, a father block hash value, a Merkle root, a timestamp and transaction data. The hash value here is the hash string that is later used to calculate the winning number. Where the Merkle root is used to generalize all transactions in a block, the Merkle tree is a binary hash tree, which has the obvious advantage of being more efficient by taking a branch alone (as a small tree) to check part of the data, as opposed to a hash list. Each block is also connected to a sub-block.
The digital signature scheme used by bitcoin is called elliptic curve digital signature algorithm. This algorithm has been extensively considered secure through years of careful cryptanalysis.
There are many one-way hash functions (also called hash functions), SHA-256 is a hash function that is mainly used in the bitcoin world and has good effect. First, information is stored, and in bitcoin we encounter a hash pointer, which refers to a pointer to the hash value of the data storage location and its location data. In addition, the hash pointer may also clarify the hash value of the data at a certain timestamp.
We call this data structure a blockchain by constructing a linked list with hash pointers. Bitcoins are packets of information into blocks that are connected one after the other in a unidirectional manner, where each block has both data and a hash pointer that points to the previous block. In this case, each chunk not only tells us where the value of the last chunk is, but also contains a hash digest of that value, so that we can verify that value has not changed.
The most important advantage of the above block structure is tamper resistance, which results in incorrect hash pointers for the next block if someone modifies data at any location in the blockchain. If he wishes to continue trying and to mask this tampering by tampering with the hash value of the next chunk, he needs to follow the chunk. Therefore, as long as we store the hash pointer at the head of the linked list (also called a created block) in an unchangeable place, nobody can tamper with any block without being detected.
By adopting the scheme, the scheme in the embodiment of the application utilizes the whole network openness of the bitcoin block chain to publish the block numbers which will be generated in the future in advance, each block number is exactly bound with the hash strings on the blocks, but the values of the hash strings cannot be predicted, so that people are prevented from predicting the lottery result in advance and preventing the lottery from being counterfeited in the process of lottery drawing. Meanwhile, the whole lottery drawing process and the result can be verified and inquired, so that the manual tampering is avoided, and the transparency and the reliability of the result are improved. Finally, the outcome of the draw does not require endorsement by any government or central authority, and its confidence is endorsed by all nodes on the bitcoin blockchain.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
According to another aspect of the embodiments of the present application, there is also provided a blockchain-based target execution event execution apparatus for implementing the above blockchain-based target execution event execution method. As shown in fig. 5, the apparatus includes:
the issuing module 502 is configured to issue block number information corresponding to a target event, where the block number information includes: the block chain is cut off to participate in the cut-off block number of the target event and the target block number, wherein the cut-off block number and the target block number are the numbers of the blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number;
a first obtaining module 504, configured to obtain target prediction information provided by a target object participating in the target event before a cutoff block corresponding to the cutoff block number is generated on the block chain, and stop obtaining prediction information provided by any object after the cutoff block is generated on the block chain;
a second obtaining module 506, configured to obtain a hash string generated by information recorded in the target block after the target block corresponding to the target block number is generated in the block chain;
a generating module 508, configured to generate and issue event actual information according to the hash string, where in a case that the event actual information matches the target prediction information, a resource corresponding to a result of the matching is set to be allocated to the target object.
Optionally, the second obtaining module 506 is further configured to obtain information recorded on the target block within a predetermined time period; and the hash operation is used for carrying out hash operation on the recorded information to obtain the hash string.
Optionally, the second obtaining module 506 is further configured to obtain a first set of information recorded directly on the target block within the predetermined time period and a second set of information received and recorded by the target block during the predetermined time period and broadcasted by other blocks in the block chain.
Optionally, when the block number information further includes a start block number for starting to participate in the target event, the first obtaining module 504 is further configured to obtain target prediction information provided by a target object participating in the target event after a start block corresponding to the start block number is generated on the block chain and before an end block corresponding to the end block number is generated on the block chain.
Optionally, the generating module 508 is further configured to convert the last two digits of the hash string into decimal numbers, so as to obtain a first numerical value; and the module operation is carried out on the highest value of the value range by using the first value to obtain the actual event information, wherein the value range is the value range of the target prediction information.
Optionally, when the event actual information is multiple, the number of the target block numbers is the same as the number of the event actual information, multiple target block numbers correspond to multiple hash strings, and for any two first hash strings and any two second hash strings in the multiple hash strings, under the condition that the second event actual information generated according to the second hash string is the same as the first event actual information generated according to the first hash string, the last two and three bits of the second hash string are taken for decimal conversion to obtain a second value; and performing modular operation on the highest value of the value range by using the second numerical value, and updating the actual information of the second event.
Optionally, the second obtaining module 506 is further configured to obtain a bitcoin transaction record recorded on the target block; and the hash algorithm is used for carrying out hash operation on the bit currency transaction record to obtain the hash string.
According to yet another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above method for block chain based target event execution, as shown in fig. 6, the electronic device includes a memory 602 and a processor 604, the memory 602 stores therein a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, issuing block number information corresponding to the target event, wherein the block number information includes: ending a cut-off block number and a target block number participating in the target event in the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number;
s2, obtaining the target prediction information provided by the target object participating in the target event before generating the ending block corresponding to the ending block number on the block chain, and stopping obtaining the prediction information provided by any object after generating the ending block on the block chain;
s3, after generating a target block corresponding to the target block number on the block chain, obtaining a hash string generated by information recorded on the target block;
s4, generating and issuing event actual information according to the hash string, wherein, in case that the event actual information matches the target prediction information, a resource corresponding to a result of the matching is set to be allocated to the target object.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
The memory 602 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for block chain based target event execution in the embodiment of the present application, and the processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, that is, implementing the above-mentioned method for block chain based target event execution. The memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 602 may further include memory located remotely from the processor 604, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 602 may be, but not limited to, specifically configured to store information such as target prediction information input by a target object. As an example, as shown in fig. 6, the memory 602 may include the above but is not limited to the above. . . . A publish module 502, a first obtain module 504, a second obtain module 506, and a generate module 508 in the device. In addition, the target event execution device may further include, but is not limited to, other module units in the target event execution device based on the block chain, which is not described in detail in this example.
Optionally, the transmitting device 606 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 606 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmitting device 606 is a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In addition, the electronic device further includes: a display 608 for displaying the information of the order to be processed; and a connection bus 610 for connecting the respective module parts in the above-described electronic apparatus.
According to a further aspect of embodiments of the present application, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps in any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, issuing block number information corresponding to the target event, wherein the block number information includes: ending a cut-off block number and a target block number participating in the target event in the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number;
s2, obtaining the target prediction information provided by the target object participating in the target event before generating the ending block corresponding to the ending block number on the block chain, and stopping obtaining the prediction information provided by any object after generating the ending block on the block chain;
s3, after generating a target block corresponding to the target block number on the block chain, obtaining a hash string generated by information recorded on the target block;
s4, generating and issuing event actual information according to the hash string, wherein, in case that the event actual information matches the target prediction information, a resource corresponding to a result of the matching is set to be allocated to the target object.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A target event execution method based on a block chain is characterized by comprising the following steps:
issuing block number information corresponding to a target event, wherein the block number information comprises: a cut-off block number and a target block number which participate in the target event are cut off from the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number;
before a cut-off block corresponding to the cut-off block number is generated on the block chain, target prediction information provided by a target object participating in the target event is acquired, and after the cut-off block is generated on the block chain, the acquisition of prediction information provided by any object is stopped;
after a target block corresponding to the target block number is generated on the block chain, a hash string generated by information recorded on the target block is acquired;
and generating and issuing actual event information according to the hash string, wherein when the actual event information is matched with the target prediction information, a resource corresponding to a matching result is set to be allocated to the target object.
2. The method of claim 1, wherein obtaining the hash string generated by the information recorded on the target block comprises:
acquiring information recorded in a preset time length on the target block;
and carrying out hash operation on the recorded information to obtain the hash string.
3. The method according to claim 2, wherein the obtaining information recorded in the target block within a predetermined time period comprises:
acquiring a first set of information recorded directly on the target block for the predetermined length of time and a second set of information broadcast by other blocks in the block chain that is received and recorded by the target block for the predetermined length of time.
4. The method of claim 1, wherein when the block number information further includes a start block number to start participating in the target event, the method further comprises:
and after a starting block corresponding to the starting block number is generated on the block chain, and before a cut-off block corresponding to the cut-off block number is generated on the block chain, acquiring target prediction information provided by a target object participating in the target event.
5. The method of claim 1, wherein generating and publishing event actual information according to the hash string comprises:
converting the last two digits of the hash string into a decimal system to obtain a first numerical value;
and performing modular operation on the highest value of a value range by using the first value to obtain the actual event information, wherein the value range is the value range of the target prediction information.
6. The method according to claim 5, wherein when the event actual information is plural, the number of the target block numbers is the same as the number of the event actual information, and the plural target block numbers correspond to plural hash strings, the method further comprising:
for any two first hash strings and any two second hash strings in the plurality of hash strings, under the condition that the actual information of a second event generated according to the second hash strings is the same as the actual information of the first event generated according to the first hash strings, taking the last two and three bits of the second hash strings for decimal conversion to obtain a second numerical value;
and performing modular operation on the highest value of the value range by using the second numerical value, and updating the actual information of the second event.
7. The method according to any one of claims 1 to 6, wherein the obtaining the hash string generated by the information recorded on the target block comprises:
acquiring a bitcoin transaction record recorded on the target block;
and carrying out hash operation on the bit currency transaction record to obtain the hash string.
8. A block chain-based target event execution apparatus, comprising:
the issuing module is configured to issue block number information corresponding to a target event, where the block number information includes: a cut-off block number and a target block number which participate in the target event are cut off from the block chain, wherein the cut-off block number and the target block number are numbers of blocks which are not generated on the block chain, and the target block number is larger than the cut-off block number;
a first obtaining module, configured to obtain target prediction information provided by a target object participating in the target event before a cutoff block corresponding to the cutoff block number is generated on the block chain, and stop obtaining prediction information provided by any object after the cutoff block is generated on the block chain;
a second obtaining module, configured to obtain a hash string generated by information recorded in the target block after the target block corresponding to the target block number is generated in the block chain;
and the generation module is used for generating and releasing actual event information according to the hash string, wherein under the condition that the actual event information is matched with the target prediction information, resources corresponding to the matching result are set to be distributed to the target object.
9. A storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN201910839113.3A 2019-09-05 2019-09-05 Target event execution method and device based on block chain Pending CN110633983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910839113.3A CN110633983A (en) 2019-09-05 2019-09-05 Target event execution method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910839113.3A CN110633983A (en) 2019-09-05 2019-09-05 Target event execution method and device based on block chain

Publications (1)

Publication Number Publication Date
CN110633983A true CN110633983A (en) 2019-12-31

Family

ID=68971124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910839113.3A Pending CN110633983A (en) 2019-09-05 2019-09-05 Target event execution method and device based on block chain

Country Status (1)

Country Link
CN (1) CN110633983A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105913174A (en) * 2016-04-07 2016-08-31 彭军红 Lottery issuing method based on block chains
US20180115413A1 (en) * 2016-10-24 2018-04-26 Mastercard International Incorporated Method and system for fast tracking navigation of blockchains via data manipulation
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN108335208A (en) * 2018-02-28 2018-07-27 北京京东尚科信息技术有限公司 Method and apparatus for handling information
US20180294967A1 (en) * 2017-04-07 2018-10-11 Citizen Hex Techniques for increasing the probability that a transaction will be included in a target block of a blockchain
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
KR101928087B1 (en) * 2018-01-03 2019-02-26 한국조폐공사 Method for managing on-line lottery based on blockchain and server using the same
CN109598365A (en) * 2018-10-25 2019-04-09 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109741513A (en) * 2018-12-20 2019-05-10 太原理工大学 A kind of winners' announcement in lottery method based on block chain technology
KR20190078668A (en) * 2017-12-12 2019-07-05 포항공과대학교 산학협력단 Apparatus and Methods for Verifiable Lottery
CN110189465A (en) * 2019-06-13 2019-08-30 北京艾摩瑞策科技有限公司 A kind of random lottery drawing method and its equipment by means of block chain

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105913174A (en) * 2016-04-07 2016-08-31 彭军红 Lottery issuing method based on block chains
US20180115413A1 (en) * 2016-10-24 2018-04-26 Mastercard International Incorporated Method and system for fast tracking navigation of blockchains via data manipulation
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
US20180294967A1 (en) * 2017-04-07 2018-10-11 Citizen Hex Techniques for increasing the probability that a transaction will be included in a target block of a blockchain
KR20190078668A (en) * 2017-12-12 2019-07-05 포항공과대학교 산학협력단 Apparatus and Methods for Verifiable Lottery
KR101928087B1 (en) * 2018-01-03 2019-02-26 한국조폐공사 Method for managing on-line lottery based on blockchain and server using the same
CN108335208A (en) * 2018-02-28 2018-07-27 北京京东尚科信息技术有限公司 Method and apparatus for handling information
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN109598365A (en) * 2018-10-25 2019-04-09 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109741513A (en) * 2018-12-20 2019-05-10 太原理工大学 A kind of winners' announcement in lottery method based on block chain technology
CN110189465A (en) * 2019-06-13 2019-08-30 北京艾摩瑞策科技有限公司 A kind of random lottery drawing method and its equipment by means of block chain

Similar Documents

Publication Publication Date Title
US9836908B2 (en) System and method for securely receiving and counting votes in an election
CN108512652B (en) Decentralized consensus method and system based on time certification and block chain system
CN109981281B (en) Method and device for determining candidate elements based on block chain proposal random consensus
EP4102431A1 (en) Implementing logic gate functionality using a blockchain
CN110011974B (en) Accounting method and device of block chain, terminal and computer-readable storage medium
CN108230047B (en) Lottery drawing data processing method and device
CN107103097A (en) Drawing method and terminal device based on block chain technology
WO2016022864A2 (en) System and method for securely receiving and counting votes in an election
CN116739660A (en) Lottery drawing method and system based on block chain
CN108615195B (en) Resource transfer information transmission method and device, storage medium and electronic device
CN108696511A (en) A kind of public notification of information method, apparatus and relevant device based on block chain
WO2019193820A1 (en) Information processing device, information processing method, and program
CN108667717A (en) Block chain processing method, medium, device and computing device based on instant communication message record
CN110601819B (en) Processing method for random number, block chain link point device and storage medium
CN110780847A (en) Random number generation method, random number generation device and electronic equipment
KR20190078668A (en) Apparatus and Methods for Verifiable Lottery
CN110930254A (en) Data processing method, device, terminal and medium based on block chain
CN113781699A (en) Number shaking method
CN110633983A (en) Target event execution method and device based on block chain
CN110780040A (en) Harmful gas data processing method and device, electronic equipment and storage medium
US20200213095A1 (en) Method and device for the computer aided processing of a random bit pattern
CN112425121A (en) Usage control data network for distributed databases
KR20190119911A (en) Ticket Selling System Based on Blockchain
CN113051622B (en) Index construction method, device, equipment and storage medium
CN115310137A (en) Secrecy method and related device of intelligent settlement system

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