CN112734455A - Prize exchanging result generating method, device and equipment and readable storage medium - Google Patents

Prize exchanging result generating method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN112734455A
CN112734455A CN201911039552.2A CN201911039552A CN112734455A CN 112734455 A CN112734455 A CN 112734455A CN 201911039552 A CN201911039552 A CN 201911039552A CN 112734455 A CN112734455 A CN 112734455A
Authority
CN
China
Prior art keywords
prize
exchanging
target
information
block
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.)
Granted
Application number
CN201911039552.2A
Other languages
Chinese (zh)
Other versions
CN112734455B (en
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 CN201911039552.2A priority Critical patent/CN112734455B/en
Publication of CN112734455A publication Critical patent/CN112734455A/en
Application granted granted Critical
Publication of CN112734455B publication Critical patent/CN112734455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0208Trade or exchange of goods or services in exchange for incentives or rewards
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The application discloses a prize exchange result generation method, a prize exchange result generation device, prize exchange equipment and a readable storage medium, and relates to the field of block chains. The method comprises the following steps: storing the received prize-exchanging intelligent contract into a block chain through a consensus mechanism; storing the received prize exchanging information into a block chain through a consensus mechanism; sending prize exchanging result information to a target account according to prize exchanging conditions; and storing the prize exchange result information into the block chain through a consensus mechanism. The prize winning codes are arranged in the prize winning intelligent contract, the prize winning intelligent contract is stored in the prize winning block chain system, when the target account number obtains the target prize winning codes, the matching condition between the prize winning codes and the prize winning codes is verified in the block chain system, and whether the target account number is a prize winning result or not is determined.

Description

Prize exchanging result generating method, device and equipment and readable storage medium
Technical Field
The embodiment of the application relates to the field of block chains, in particular to a method, a device and equipment for generating a prize exchange result and a readable storage medium.
Background
The online lottery is an online activity in which a player acquires prize codes and extracts one or more prize codes from all issued prize codes at the time of lottery as prize winning codes for winning, wherein the drawing process of the prize winning codes is a random drawing process.
In the related art, in the random drawing process of drawing a winning code, drawing is performed by a random drawing system generated by a developer by setting a random algorithm, the implementation of which is unknown to a player.
However, when the random drawing process is implemented in the above manner, the player cannot know the implementation manner of the random algorithm, so that the player cannot know whether the winning code obtained by the drawing is preset or randomly drawn, and the reliability of the random drawing process is low.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for generating a prize exchange result and a readable storage medium, and can solve the problem of low credibility in a random drawing process. The technical scheme is as follows:
in one aspect, a method for generating a prize exchanging result is provided, and is applied to any node in a prize exchanging block chain system, and the method includes:
storing a received prize-exchanging intelligent contract into a block chain through a consensus mechanism, wherein the prize-exchanging intelligent contract comprises a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition comprises at least one prize-winning code;
storing received prize exchanging information into the block chain through the consensus mechanism, wherein the prize exchanging information comprises at least one target prize exchanging code and a target account number holding the target prize exchanging code;
sending prize exchanging result information to a target account according to the prize exchanging condition, wherein the prize exchanging result information comprises the matching condition of the target prize exchanging code held by the target account and the prize winning code;
and storing the prize exchange result information into the block chain through the consensus mechanism.
In another aspect, an apparatus for generating a prize result is provided, which is applied to any node in a prize exchanging block chain system, and includes:
the storage module is used for storing the received prize-exchanging intelligent contract into a block chain through a consensus mechanism, wherein the prize-exchanging intelligent contract comprises a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition comprises at least one prize-winning code;
the storage module is further configured to store the received prize exchanging information into the block chain through the consensus mechanism, where the prize exchanging information includes at least one target prize exchanging code and a target account holding the target prize exchanging code;
the transmission module is used for transmitting prize exchanging result information to a target account according to the prize exchanging condition, wherein the prize exchanging result information comprises the matching condition of the target prize exchanging code held by the target account and the prize winning code;
the storage module is further configured to store the prize redemption result information into the block chain through the consensus mechanism.
In another aspect, a computer device is provided, the computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement a method of generating a redemption result as described in any of the above embodiments of the present application.
In another aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement the method of generating a redemption result as described in any of the above embodiments of the present application.
In another aspect, a computer program product is provided, which when run on a computer causes the computer to perform the method of generating a redemption result as described in any of the above embodiments of the present application.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the prize winning codes are arranged in the prize winning intelligent contract, the prize winning intelligent contract is stored in the prize winning block chain system, when the target account number obtains the target prize winning codes, the matching condition between the prize winning codes and the prize winning codes is verified in the block chain system, and whether the target account number is a prize winning result or not is determined.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a block chain system for a distributed system according to an exemplary embodiment of the present disclosure;
FIG. 2 is a block diagram of a block structure provided in an exemplary embodiment of the present application;
FIG. 3 illustrates a block chain system according to an exemplary embodiment of the present application;
FIG. 4 is a flow diagram of a method for generating a redemption result provided by an exemplary embodiment of the present application;
FIG. 5 is a flow chart of a method for generating a redemption result provided by an exemplary embodiment of the present application as applied within a gaming application;
FIG. 6 is a schematic illustration of a lottery contract interface provided by an exemplary embodiment of the present application;
FIG. 7 is a flow chart of a method of generating a redemption result provided by another exemplary embodiment of the present disclosure;
fig. 8 is a flowchart of a method of generating a redemption result provided by another exemplary embodiment of the present disclosure;
fig. 9 is a flowchart of a method of generating a redemption result provided by another exemplary embodiment of the present disclosure;
fig. 10 is a block diagram of a structure of an apparatus for generating a result of redemption provided by an exemplary embodiment of the present application;
fig. 11 is a block diagram of an apparatus for generating a result of redemption provided by an exemplary embodiment of the present application;
fig. 12 is a block diagram of a server according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, terms referred to in the embodiments of the present application are described:
blockchain (Blockchain): the method is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. The blockchain is essentially a decentralized database, which is a string of data blocks associated by using cryptography, each data block contains information of a batch of network transactions, and the information is used for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
The platform product service layer provides basic capability and an implementation framework of typical application, and developers can complete block chain implementation of business logic based on the basic capability and the characteristics of the superposed business. The application service layer provides the application service based on the block chain scheme for the business participants to use.
Block chains can be divided into private, federation, and public chains; here, the alliance chain is also called a community Block chain (Consortium Block chains), and refers to a Block chain whose consensus process is controlled by a preselected node. In the alliance chain, all or part of functions are opened only for the node members in the chain, and each block chain link point in the alliance chain can customize read-write permission, query permission and the like based on needs.
Consensus mechanism (Consensus mechanism): the block chain system is a mathematical algorithm for establishing trust and obtaining rights and interests among different nodes. In the block chain system, the verification and confirmation of the transaction can be completed in a short time through the voting of special nodes, and if a plurality of nodes with irrelevant benefits can achieve consensus on a transaction, all the nodes in the system can also achieve consensus on the transaction.
Intelligent contract: the contract program is automatically executed according to specific conditions, and is an important way for a user to interact with the block chain and realize business logic by utilizing the block chain. The basic idea of intelligent contracts is that various contract terms can be embedded into hardware and software used by an attacker, so that the attacker needs a great cost to attack, the intelligent contracts are mutually participated in customizing and utilizing a Peer-to-Peer network (P2P) to be diffused and stored into a block chain, and the intelligent contracts constructed by the block chain are automatically executed under the triggering condition. For example, each organization may access the data storage system through an intelligent contract on a blockchain deployed in a server to use functions such as data storage and data query provided by the data storage system. The intelligent contract is essentially a set of contracts defined, propagated, verified or executed in a digital form, including contracts in which contract participants can execute the contracts, intelligent contracts which also allow trusted transactions to be conducted without third parties, and which transactions are traceable and irreversible. For example, the method for generating the prize-winning result provided by the present application is executed according to a prize-winning intelligent contract, and determines whether or not a prize-winning code held by a player is identical to a prize-winning code according to the prize-winning intelligent contract, and determines that the player wins a prize when the prize-winning code is identical to the prize-winning code.
The system related to the embodiment of the application can be a distributed system formed by connecting a client, a plurality of nodes (any form of computing equipment in an access network, such as a server and a user terminal) through a network communication mode.
Taking a distributed system as an example of a blockchain system, referring to fig. 1, fig. 1 is a schematic structural diagram of a distributed system 100 applied to a blockchain system, which is formed by a plurality of nodes (computing devices in any form in an access network, such as servers and user terminals) and clients, and a peer-to-peer (P2P) network is formed between the nodes, and a P2P Protocol is an application layer Protocol running on top of a Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or a terminal, can join to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer.
Referring to the functions of each node in the blockchain system shown in fig. 1, the functions involved include:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the application include:
2.1) the wallet, is used for providing the function of carrying on the trade of the electronic currency, including initiating the trade, namely, send the trade record of the present trade to other nodes in the block chain system, after other nodes verify successfully, as the response of acknowledging that the trade is valid, store the record data of the trade in the temporary block of the block chain; the wallet also supports the querying of the electronic money remaining in the electronic money address. For example, the information of the excitation object to be added is sent to the blockchain system, other nodes in the blockchain system verify the transaction (i.e., the information of the excitation object added in the blockchain), and the transaction can be stored in the blockchain only after the verification of the other nodes is successful.
And 2.2) sharing the account book, wherein the shared account book is used for providing functions of operations such as storage, query and modification of account data, record data of the operations on the account data are sent to other nodes in the block chain system, and after the other nodes verify the validity, the record data are stored in a temporary block as a response for acknowledging that the account data are valid, and confirmation can be sent to the node initiating the operations.
2.3) Intelligent contracts, computerized agreements, which can enforce the terms of a contract, implemented by codes deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions according to actual business requirement codes, such as querying the logistics status of goods purchased by a buyer, transferring the buyer's electronic money to the merchant's address after the buyer signs for the goods; of course, smart contracts are not limited to executing contracts for trading, but may also execute contracts that process received information. For example, when a specific condition is satisfied, the incentive object triggers the intelligent contract to execute an incentive mechanism according to the specification of the contract, such as issuing a corresponding benefit or bonus to the incentive object.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks. The block chain in the present application is a prize exchanging block chain, for example, prize exchanging code data of each lottery drawing object is recorded in the block chain during prize exchanging.
Referring to fig. 2, fig. 2 is a schematic diagram of a Block Structure (Block Structure) provided in an exemplary embodiment of the present application, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain. The block may include information such as a time stamp at the time of block generation. A blockchain, which is essentially a decentralized database, is a string of data blocks associated using cryptography, each data block containing relevant information for verifying the validity of the information (anti-counterfeiting) and generating the next block.
Fig. 3 is a schematic structural diagram of a blockchain system according to an exemplary embodiment of the present application. The system includes a plurality of servers 101 and a plurality of storage devices 102, where the plurality of servers 101 may be configured with the same blockchain, that is, the plurality of servers 101 may form a blockchain system, and each server 101 is a node in the blockchain system. Optionally, the nodes in the blockchain system include a master accounting node and other nodes, and any node in the blockchain system can become the master accounting node. The plurality of servers 101 may be a plurality of servers of the same organization, or may be a plurality of servers belonging to different organizations, for example, servers of various departments of a hospital may be included in the blockchain system; servers of various departments of the company may be included in the blockchain system, and of course, servers of stock exchanges, servers of banks, and the like may be included in the blockchain system. Users of various organizations may access the servers of the organizations through the terminals 1011, and the plurality of terminal devices 1011 may be electronic devices capable of accessing the plurality of servers 101, which may be computers, smart phones, tablets, or other electronic devices.
Certainly, in order to perform services such as security verification and rights management, a CA center (Certificate Authority) 103 is configured in the blockchain system and is used to store keys of various organizations, and each server in the blockchain system may obtain the key of each organization from the CA center, such as a public key of any node, to perform processes such as encryption and decryption of data. The plurality of storage devices 102 are used for providing storage services for the plurality of servers 101, and it should be noted that the plurality of storage devices 102 may constitute a distributed storage system for providing storage data in a distributed manner.
In conjunction with the above description, fig. 4 is a flowchart of a method for generating a prize result according to an exemplary embodiment of the present application, for example, the method is applied to any node in a prize block chain system, as shown in fig. 4, the method includes:
step 401, storing the received prize-exchanging intelligent contract into a block chain through a consensus mechanism, where the prize-exchanging intelligent contract includes a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition includes at least one prize-winning code.
Alternatively, the consensus mechanism means that all nodes in the blockchain agree on the same transaction (or message, or event, or transaction), i.e., the transaction is accepted by all nodes and stored in the blockchain.
Optionally, the cashing intelligent contract refers to a contract program which automatically executes a cashing mechanism according to cashing conditions, and comprises an agreement which is agreed by contract participants in the intelligent contract. Optionally, the cashing intelligent contract comprises at least one of information of contract participants (such as information of a publisher publishing the intelligent contract), agreement of the contract (such as winning conditions), execution conditions of the contract (such as cashing conditions) and the like.
Optionally, the lottery function is a function provided in an application program, and the cashing intelligent contract is about an intelligent contract provided by a development end of the application program. The application program may be at least one of a game application program, a social contact application program, an instant messaging application program, a shopping application program, a financial management application program, a multimedia playing application program, a reading application program, an efficiency management application program, and the like, which is not limited in this embodiment of the present application.
Illustratively, the lottery function is taken as an example of a function provided in a game application program, a developer of the game application program formulates a prize-exchanging intelligent contract, defines a prize-winning code in the intelligent contract, and a reward mode corresponding to the prize-winning code, the developer sends the prize-exchanging intelligent contract to a prize-exchanging block chain system, any node in the prize-exchanging block chain system receives the prize-exchanging intelligent contract and broadcasts the prize-exchanging intelligent contract to other nodes, the content of the broadcast message is to store the prize-exchanging intelligent contract into a block chain, the other nodes verify the authenticity and validity of the prize-exchanging intelligent contract after receiving the broadcast message, and when the other nodes verify the prize-exchanging intelligent contract in the broadcast message, the block chain system stores the prize-exchanging intelligent contract into the block chain. The verification mode of the cashing intelligent contract is that a node which initiates broadcasting uses a private key corresponding to the node to carry out electronic signature, and other nodes use a public key corresponding to the node to verify the electronic signature.
Optionally, when any node in the blockchain system receives the rewarding intelligent contract, a block corresponding to the rewarding intelligent contract is generated, and the block includes a block hash value corresponding to the rewarding condition.
Optionally, the redemption conditions include at least one winning code for matching with a redemption code held by an account participating in the drawing. Optionally, the prize exchanging condition further includes a prize exchanging time limit, and the prize exchanging time limit is used for limiting the prize opening time and/or the latest prize exchanging time.
Step 402, storing the received prize exchanging information into a block chain through a consensus mechanism, wherein the prize exchanging information comprises at least one target prize exchanging code and a target account number holding the target prize exchanging code.
Alternatively, the target prize exchanging code is a prize exchanging code extracted by the target account in the lottery function in the application, and it is schematically described that the application is implemented as a game application, the target prize exchanging code may be a prize exchanging code extracted by the target account after the game application completes the game stage, may be a prize exchanging code extracted in the lottery activity in the game application, or may be a prize exchanging code obtained by purchasing in the game application, and the obtaining manner of the prize exchanging code is not limited in the embodiment of the present application.
Optionally, after the target account obtains the target prize exchanging code, the game server generates prize exchanging information according to the target account and the target prize exchanging code, and optionally, the game server may be implemented as a node in a prize exchanging block chain system, or may be implemented as an independent server. When the game server is realized as a node in a prize exchanging block chain system, after prize exchanging information is generated according to the target account number and the target prize exchanging code, the received prize exchanging information is directly stored in a block chain through a consensus mechanism; when the game server is realized as an independent server, the game server is accessed into the prize exchanging blockchain system, and the game server sends the prize exchanging information to any node in the prize exchanging blockchain system after the prize exchanging information is generated.
Optionally, a node in the prize exchanging block chain system generates a target block according to the received prize exchanging information, the target block includes a first hash value of the target prize exchanging code, and when the number of nodes in the prize exchanging block chain system that pass verification of the target block is greater than the required number of nodes, the target block is stored in the block chain.
Optionally, after receiving the prize exchanging information, the node that receives the prize exchanging information generates a target block according to the prize exchanging information, broadcasts the target block, and after receiving the broadcast message, other nodes verify the target node and verify the authenticity and validity of the target block, and when other nodes verify the target in the broadcast message, the block chain system stores the target block into the block chain. The target block is verified in a way that the node initiating the broadcast uses a private key corresponding to the node to perform electronic signature, and other nodes use a public key corresponding to the node to verify the electronic signature.
Optionally, when the target block is verified, it is further required to determine that the target prize redemption code in the target block is not repeated with prize redemption codes already acquired by other account numbers, that is, after the target block is acquired by the node, a history block already stored in the block chain is acquired, where the history block includes a history hash value corresponding to the history prize redemption code already stored before the prize redemption information is received, and when the history hash value does not include a hash value repeated with the first hash value, it is determined that the target block is verified.
And step 403, sending prize exchanging result information to the target account according to the prize exchanging condition, wherein the prize exchanging result information comprises the matching condition of the target prize exchanging code held by the target account and the prize winning code.
Optionally, the prize exchanging result information includes at least one of prize winning information and prize winning information, and when the target prize exchanging code held by the target account number matches with the prize winning code, the prize winning information is sent to the target account number, and when the target prize exchanging code held by the target account number does not match with the prize winning code, the prize winning information is sent to the target account number. Optionally, the target prize exchanging code held by the target account may include a plurality of prize exchanging codes, and if some of the prize exchanging codes match the winning codes and some of the prize exchanging codes do not match the winning codes, the prize winning information is sent to the target account for the prize exchanging code matching the winning codes, and optionally, the prize winning information may also be sent to the target account for the prize exchanging code not matching the winning codes.
Optionally, the prize exchanging result information may be directly fed back to the target account after the blockchain system acquires the prize exchanging information, or may be fed back to the target account after the prize exchanging deadline starts after the blockchain system acquires the prize exchanging information sent by all accounts, which is not limited in this embodiment.
And step 404, storing the prize exchange result information into the block chain through a consensus mechanism.
Optionally, after the prize exchanging result information is stored in the block chain through a consensus mechanism, the prize exchanging result information is irreversible information, and the account can check the prize exchanging result information.
In summary, in the method for generating an award exchanging result provided by this embodiment, the winning code is set in the award exchanging smart contract, the award exchanging smart contract is stored in the award exchanging blockchain system, when the target account number obtains the target award exchanging code, the matching condition between the award exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account number is the award exchanging result, and since the data in the blockchain system is irreversible, the award exchanging result is generated in this way, and the reliability of the award exchanging result is improved.
Illustratively, the process of generating the prize result is shown in fig. 5, and is described by way of example as the process applied to a game application, and the process includes:
step 501, publishing an intelligent contract in the game.
Optionally, after setting up the intelligent contract, the game developer issues the intelligent contract into the blockchain system and publishes the intelligent contract in the game, wherein the intelligent contract comprises a cashing condition.
At step 502, the player obtains a redemption ticket.
Optionally, the player obtains a lottery ticket in the game application by completing the gaming node, drawing, purchasing, etc., the lottery ticket having a lottery code corresponding thereto.
In step 503, the game system automatically wins the prize when the game system reaches the moment of drawing the prize.
Optionally, a lottery drawing time is agreed in the smart contract, and when the game system reaches the lottery drawing time, the prize drawing code on the prize drawing coupon acquired by the player is matched with the prize drawing code.
At step 504, the player redeems the prize against the gaming system.
Alternatively, when the prize exchanging code on the prize exchanging ticket of the player is identical with the winning code, the player is exchanged with the prize.
Referring to fig. 6, which is a schematic diagram of a drawing contract interface provided in an exemplary embodiment of the present application, as shown in fig. 6, a drawing contract interface 600 includes a contract display area 610, in which a drawing condition is displayed, including a drawing time and a drawing target, as shown in fig. 6, the drawing time is 6 months, 18 days, 12: 00, the winning prize is a block chain hash value, and optionally, the contract display area 610 further includes a prize exchange code held by the target account, when the system time reaches the winning time, that is, reaches 6 months, 18 days, 12: 00, the prize is won from the target account, when the prize exchanging code of the target account is consistent with the hash value in the prize drawing result, the target account wins, as shown in a winning interface 620, and when the prize exchanging code of the target account is inconsistent with the hash value in the prize drawing result, the target account is not won, as shown in a winning interface 630.
In an alternative embodiment, the prize-exchanging result is obtained by matching the first hash value of the target prize-exchanging code with the second hash value of the winning code, fig. 7 is a flowchart of a prize-exchanging result generating method provided by another exemplary embodiment of the disclosure, for example, the method is applied to any node in a prize-exchanging block chain system, as shown in fig. 7, and the method includes:
step 701, storing the received prize-exchanging intelligent contract into a block chain through a consensus mechanism, wherein the prize-exchanging intelligent contract comprises a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition comprises at least one prize-winning code.
Alternatively, the consensus mechanism means that all nodes in the blockchain agree on the same transaction (or message, or event, or transaction), i.e., the transaction is accepted by all nodes and stored in the blockchain.
Optionally, when any node in the blockchain system receives the rewarding intelligent contract, a block corresponding to the rewarding intelligent contract is generated, and the block includes a block hash value corresponding to the rewarding condition.
Optionally, the redemption conditions include at least one winning code for matching with a redemption code held by an account participating in the drawing. Optionally, the prize exchanging condition further includes a prize exchanging time limit, and the prize exchanging time limit is used for limiting the prize opening time and/or the latest prize exchanging time.
Step 702, generating a target block according to the received prize exchanging information, wherein the target block comprises a first hash value of the target prize exchanging code.
Optionally, when a target block is generated according to the prize exchanging information, a hash value is generated according to the prize exchanging information through a hash function, and the hash value is stored in the block, wherein the hash value corresponding to the prize exchanging information includes a first hash value corresponding to the target prize exchanging code and a hash value corresponding to the target account. Alternatively, a hash function is a method of creating a digital fingerprint from data, which compresses the data into a digest so that the amount of data becomes small and the format of the data is fixed. Alternatively, the hash function mixes the data shuffled to recreate a fingerprint called a hash value, which is typically represented by a short string of random letters and numbers.
Optionally, the first hash value of the target prize-exchanging code is used for matching with the second hash value corresponding to the prize-winning code.
In step 703, when the number of nodes passing the verification of the target block in the prize exchanging block chain system is greater than the required number of nodes, the target block is stored in the block chain.
Optionally, after receiving the prize exchanging information, the node that receives the prize exchanging information generates a target block according to the prize exchanging information, broadcasts the target block, and after receiving the broadcast message, other nodes verify the target node and verify the authenticity and validity of the target block, and when other nodes verify the target in the broadcast message, the block chain system stores the target block into the block chain. The target block is verified in a way that the node initiating the broadcast uses a private key corresponding to the node to perform electronic signature, and other nodes use a public key corresponding to the node to verify the electronic signature.
Step 704, receiving a prize exchanging request sent by the target account, where the prize exchanging request corresponds to the request time.
Optionally, the request time may be carried in the prize exchanging request when the target account sends the prize exchanging request, or may be obtained by the node according to the system time when the node receives the prize exchanging request.
Optionally, the prize exchanging condition further includes a prize exchanging time limit, and the prize exchanging time limit is used for limiting the prize opening time and/or the latest prize exchanging time. Optionally, the target block further includes a hash value corresponding to the prize exchange deadline, the prize exchange deadline is confirmed through the hash value, and the request time is verified according to the prize exchange deadline.
Step 705, when the request time is within the prize exchanging deadline, matching a second hash value corresponding to the prize winning code in the block hash values with the first hash value of the target prize exchanging code.
Optionally, when the request time is within the prize exchanging deadline, prize exchanging result information is sent to the target account according to the matching condition of the prize winning code and the target prize exchanging code, optionally, the prize exchanging result information comprises at least one of prize winning information and prize losing information, when the prize winning code is matched with the target prize exchanging code, the prize winning information is sent to the target account, and when the prize winning code is not matched with the target prize exchanging code, the prize losing information is sent to the target account.
And step 706, when the first hash value is consistent with the second hash value, sending winning information to the target account.
Optionally, when the first hash value is consistent with the second hash value, that is, the winning code is matched with the target winning code; when the first hash value is not consistent with the second hash value, the winning code is not matched with the target winning code.
And step 707, when the first hash value is not consistent with the second hash value, sending the loser information to the target account.
It should be noted that, the step 706 and the step 707 are two parallel steps, and only the step 706 may be executed, only the step 707 may be executed, or the step 706 and the step 707 may be executed simultaneously, for example: the target account number correspondingly holds a plurality of prize-exchanging codes, wherein part of the prize-exchanging codes are matched with the prize-winning codes, and other prize-exchanging codes are not matched with the prize-winning codes.
And step 708, storing the prize exchange result information into the block chain through a consensus mechanism.
Optionally, after the prize exchanging result information is stored in the block chain through a consensus mechanism, the prize exchanging result information is irreversible information, and the account can check the prize exchanging result information.
In summary, in the method for generating an award exchanging result provided by this embodiment, the winning code is set in the award exchanging smart contract, the award exchanging smart contract is stored in the award exchanging blockchain system, when the target account number obtains the target award exchanging code, the matching condition between the award exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account number is the award exchanging result, and since the data in the blockchain system is irreversible, the award exchanging result is generated in this way, and the reliability of the award exchanging result is improved.
In the method provided by the embodiment, the prize exchanging condition is set in the prize exchanging intelligent contract, and the prize exchanging deadline is set in the prize exchanging condition, so that the prize exchanging information of the target account is awarded within the prize exchanging deadline, and the problem that the prize exchanging process occupies node resources due to long-term effectiveness when the prize exchanging deadline is not met is avoided.
In an alternative embodiment, the foregoing rewarding intelligent contract is obtained by contract address query, fig. 8 is a flowchart of a method for generating a rewarding result provided in another exemplary embodiment of the present application, for example, the method is applied to any node in a rewarding block chain system, as shown in fig. 8, and the method includes:
step 801, storing the received prize-exchanging intelligent contract into a block chain through a consensus mechanism, wherein the prize-exchanging intelligent contract comprises a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition comprises at least one prize-winning code.
Alternatively, the consensus mechanism means that all nodes in the blockchain agree on the same transaction (or message, or event, or transaction), i.e., the transaction is accepted by all nodes and stored in the blockchain.
Optionally, when any node in the blockchain system receives the rewarding intelligent contract, a block corresponding to the rewarding intelligent contract is generated, and the block includes a block hash value corresponding to the rewarding condition.
Optionally, the redemption conditions include at least one winning code for matching with a redemption code held by an account participating in the drawing. Optionally, the prize exchanging condition further includes a prize exchanging time limit, and the prize exchanging time limit is used for limiting the prize opening time and/or the latest prize exchanging time.
And step 802, sending successful adding information of the cashing intelligent contract to the lottery drawing account, wherein the successful adding information carries the contract address of the cashing intelligent contract in the block chain.
Optionally, the lottery account is an account having lottery authority, and the lottery account includes a target account.
Optionally, after the block corresponding to the rewarding intelligent contract is added to the block chain, the successful adding information is generated, and the storage address of the rewarding intelligent contract in the block chain is used as a contract address to be sent to the lottery drawing account, so that the lottery drawing account can query the rewarding intelligent contract from the block chain through the contract address during rewarding.
Step 803, storing the received prize exchanging information into a block chain through a consensus mechanism, wherein the prize exchanging information includes at least one target prize exchanging code and a target account number holding the target prize exchanging code.
Optionally, a node in the prize exchanging block chain system generates a target block according to the received prize exchanging information, the target block includes a first hash value of the target prize exchanging code, and when the number of nodes in the prize exchanging block chain system that pass verification of the target block is greater than the required number of nodes, the target block is stored in the block chain.
Optionally, after receiving the prize exchanging information, the node that receives the prize exchanging information generates a target block according to the prize exchanging information, broadcasts the target block, and after receiving the broadcast message, other nodes verify the target node and verify the authenticity and validity of the target block, and when other nodes verify the target in the broadcast message, the block chain system stores the target block into the block chain. The target block is verified in a way that the node initiating the broadcast uses a private key corresponding to the node to perform electronic signature, and other nodes use a public key corresponding to the node to verify the electronic signature.
Step 804, receiving a prize exchanging request sent by the target account, wherein the prize exchanging request includes a contract address.
Optionally, when a prize is required to be exchanged through the target prize exchanging code, the target account first obtains a contract address from the successful adding information, generates a prize exchanging request according to the contract address, and adds the contract address to the prize exchanging request, where the contract address is used to query a prize exchanging intelligent contract, so as to obtain an intercom condition in the prize exchanging intelligent contract.
Step 805, inquiring the cashing intelligent contract from the block chain according to the contract address to obtain the cashing condition.
Step 806, sending prize exchanging result information to the target account according to the prize exchanging condition, wherein the prize exchanging result information comprises the matching condition of the target prize exchanging code held by the target account and the prize winning code.
Optionally, the prize exchanging result information includes at least one of prize winning information and prize winning information, and when the target prize exchanging code held by the target account number matches with the prize winning code, the prize winning information is sent to the target account number, and when the target prize exchanging code held by the target account number does not match with the prize winning code, the prize winning information is sent to the target account number. Optionally, the target prize exchanging code held by the target account may include a plurality of prize exchanging codes, and if some of the prize exchanging codes match the winning codes and some of the prize exchanging codes do not match the winning codes, the prize winning information is sent to the target account for the prize exchanging code matching the winning codes, and optionally, the prize winning information may also be sent to the target account for the prize exchanging code not matching the winning codes.
Optionally, the prize exchanging result information may be directly fed back to the target account after the blockchain system acquires the prize exchanging information, or may be fed back to the target account after the prize exchanging deadline starts after the blockchain system acquires the prize exchanging information sent by all accounts, which is not limited in this embodiment.
In step 807, the prize exchange result information is stored in the block chain through a consensus mechanism.
Optionally, after the prize exchanging result information is stored in the block chain through a consensus mechanism, the prize exchanging result information is irreversible information, and the account can check the prize exchanging result information.
In summary, in the method for generating an award exchanging result provided by this embodiment, the winning code is set in the award exchanging smart contract, the award exchanging smart contract is stored in the award exchanging blockchain system, when the target account number obtains the target award exchanging code, the matching condition between the award exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account number is the award exchanging result, and since the data in the blockchain system is irreversible, the award exchanging result is generated in this way, and the reliability of the award exchanging result is improved.
In the method provided by the embodiment, the adding success message is sent to the lottery drawing account, and the adding success message includes the contract address of the lottery drawing intelligent contract in the block chain, so that the lottery drawing account inquires the lottery drawing intelligent contract through the contract address in the lottery drawing process, and obtains the lottery drawing condition, thereby improving the lottery drawing efficiency.
Fig. 9 is a flowchart of a method for generating a prize redemption result according to another exemplary embodiment of the present application, which is described by way of example as being applied to a game application, and as shown in fig. 9, the method includes:
in step 901, an intelligent contract is published in the game.
Optionally, after setting up the intelligent contract, the game developer issues the intelligent contract into the blockchain system and publishes the intelligent contract in the game, wherein the intelligent contract comprises a cashing condition.
At step 902, the player obtains a redemption ticket.
Optionally, the player obtains a lottery ticket in the game application by completing the gaming node, drawing, purchasing, etc., the lottery ticket having a lottery code corresponding thereto.
At step 903, player information and redemption ticket information are recorded on the blockchain.
Alternatively, the information of the player and the information of the lottery ticket acquired by the player are recorded on the blockchain, and when the player wins the prize, the information of the player and the lottery ticket held by the player are directly acquired from the blockchain, and the lottery ticket is matched with the prize drawing code, so that whether the player wins the prize is determined.
And 904, when the prize-winning moment is reached, taking the hash value of the intelligent contract block as a prize-winning number.
In step 905, the player queries for a winning prize via the contract address.
Optionally, when the player inquires about the winning prize, the intelligent contract is inquired according to the contract address and matched with the held prize exchanging code through the hash value of the intelligent contract block.
The player redeems the system, step 906.
In summary, in the method for generating an award exchanging result provided by this embodiment, the winning code is set in the award exchanging smart contract, the award exchanging smart contract is stored in the award exchanging blockchain system, when the target account number obtains the target award exchanging code, the matching condition between the award exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account number is the award exchanging result, and since the data in the blockchain system is irreversible, the award exchanging result is generated in this way, and the reliability of the award exchanging result is improved.
Fig. 10 is a block diagram of a prize result generation device according to an exemplary embodiment of the present application, which is described by way of example as being applied to any node in a prize block chain system, and as shown in fig. 10, the device includes: a storage module 1010 and a transmission module 1020;
the storage module 1010 is configured to store a received prize-exchanging intelligent contract into a block chain through a consensus mechanism, where the prize-exchanging intelligent contract includes a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition includes at least one prize-winning code;
the storage module 1010 is further configured to store, by using the consensus mechanism, the received prize exchanging information into the block chain, where the prize exchanging information includes at least one target prize exchanging code and a target account holding the target prize exchanging code;
a sending module 1020, configured to send prize exchanging result information to a target account according to the prize exchanging condition, where the prize exchanging result information includes a matching condition between the target prize exchanging code held by the target account and the prize winning code;
the storage module 1010 is further configured to store the prize redemption result information into the block chain through the consensus mechanism.
In an optional embodiment, the storage module 1010 is further configured to generate a target block according to the received prize exchanging information, where the target block includes a first hash value of the target prize exchanging code; and when the number of nodes which pass the verification of the target block in the prize exchanging block chain system is greater than the required number of nodes, storing the target block into the block chain.
In an alternative embodiment, as shown in fig. 11, the apparatus further comprises:
an obtaining module 1030, configured to obtain a history block stored in the block chain, where the history block includes a history hash value corresponding to a history award exchanging code stored before the award exchanging information is received;
a determining module 1040, configured to determine that the target block is verified when the historical hash value does not include a hash value that is duplicate to the first hash value.
In an optional embodiment, the apparatus further comprises:
a matching module 1050, configured to match a second hash value corresponding to the winning code in the chunk hash values with the first hash value of the target winning code;
the sending module 1020 is further configured to send winning information to the target account when the first hash value is consistent with the second hash value;
the sending module 1020 is further configured to send the loser information to the target account when the first hash value is inconsistent with the second hash value.
In an optional embodiment, the prize exchanging condition further comprises a prize exchanging period;
the device further comprises:
a receiving module 1060, configured to receive a prize exchanging request sent by the target account, where the prize exchanging request corresponds to a request time;
the sending module 1020 is further configured to send the prize exchanging result information to the target account according to a matching condition between the prize winning code and the target prize exchanging code when the request time is within the prize exchanging deadline.
In an optional embodiment, the sending module 1020 is further configured to send, to a lottery account, information of success of adding the cashing intelligent contract, where the information of success of adding carries a contract address of the cashing intelligent contract in the block chain, where the lottery account is an account having a lottery authority, and the lottery account includes the target account.
In an optional embodiment, the apparatus further comprises:
a receiving module 1060, configured to receive a prize-exchanging request sent by the target account, where the prize-exchanging request includes the contract address; and inquiring the prize-exchanging intelligent contract from the block chain according to the contract address to obtain the prize-exchanging condition.
In summary, the apparatus for generating a prize-exchanging result according to this embodiment sets a prize-exchanging code in a prize-exchanging intelligent contract, stores the prize-exchanging intelligent contract in a prize-exchanging blockchain system, and verifies a matching condition between the prize-exchanging code and the prize-exchanging code in the blockchain system when a target account number obtains the target prize-exchanging code, thereby determining whether the target account number is a prize-exchanging result.
It should be noted that: the prize-exchanging result generating device provided in the above embodiment is only illustrated by dividing the functional modules, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the prize result generation device provided in the above embodiment and the prize result generation method embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Fig. 12 shows a schematic structural diagram of a server according to an exemplary embodiment of the present application. The server may be the server shown in fig. 3. Specifically, the method comprises the following steps:
the server 1200 includes a Central Processing Unit (CPU) 1201, a system Memory 1204 including a Random Access Memory (RAM) 1202 and a Read Only Memory (ROM) 1203, and a system bus 1205 connecting the system Memory 1204 and the Central Processing Unit 1201. The server 1200 also includes a basic Input/Output System 1206 for facilitating information transfer between devices within the computer, and a mass storage device 1207 for storing an operating System 1213, application programs 1214, and other program modules 1215.
The basic input/output system 1206 includes a display 1208 for displaying information and an input device 1209, such as a mouse, keyboard, etc., for user input of information. Wherein a display 1208 and an input device 1209 are connected to the central processing unit 1201 through an input-output controller 1210 coupled to the system bus 1205. The basic input/output system 1206 may also include an input/output controller 1210 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 1210 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1207 is connected to the central processing unit 1201 through a mass storage controller (not shown) connected to the system bus 1205. The mass storage device 1207 and its associated computer-readable media provide non-volatile storage for the server 1200. That is, the mass storage device 1207 may include a computer-readable medium (not shown) such as a hard disk or Compact disk Read Only Memory (CD-ROM) drive.
Without loss of generality, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash Memory or other solid state Memory technology, CD-ROM, Digital Versatile Disks (DVD), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 1204 and mass storage device 1207 described above may be collectively referred to as memory.
According to various embodiments of the present application, the server 1200 may also operate as a remote computer connected to a network through a network, such as the Internet. That is, the server 1200 may be connected to the network 1212 through a network interface unit 1211 connected to the system bus 1205, or the network interface unit 1211 may be used to connect to other types of networks or remote computer systems (not shown).
The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.
Embodiments of the present application further provide a computer device, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the method for generating a redemption result provided by the above method embodiments.
Embodiments of the present application further provide a computer-readable storage medium, on which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the method for generating a redemption result provided by the above method embodiments.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A method for generating a prize-exchanging result, applied to any node in a prize-exchanging block chain system, the method comprising:
storing a received prize-exchanging intelligent contract into a block chain through a consensus mechanism, wherein the prize-exchanging intelligent contract comprises a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition comprises at least one prize-winning code;
storing received prize exchanging information into the block chain through the consensus mechanism, wherein the prize exchanging information comprises at least one target prize exchanging code and a target account number holding the target prize exchanging code;
sending prize exchanging result information to a target account according to the prize exchanging condition, wherein the prize exchanging result information comprises the matching condition of the target prize exchanging code held by the target account and the prize winning code;
and storing the prize exchange result information into the block chain through the consensus mechanism.
2. The method of claim 1, wherein storing the received redemption information into the blockchain via the consensus mechanism comprises:
generating a target block according to the received prize exchanging information, wherein the target block comprises a first hash value of the target prize exchanging code;
and when the number of nodes which pass the verification of the target block in the prize exchanging block chain system is greater than the required number of nodes, storing the target block into the block chain.
3. The method of claim 2, further comprising:
acquiring a history block stored in the block chain, wherein the history block comprises a history hash value corresponding to a history prize exchanging code stored before the prize exchanging information is received;
and when the historical hash value does not contain the hash value which is repeated with the first hash value, determining that the target block is verified.
4. The method of claim 2, wherein the sending of prize redemption result information to the target account number according to the prize redemption condition comprises:
matching a second hash value corresponding to the winning code in the block hash values with the first hash value of the target winning code;
when the first hash value is consistent with the second hash value, sending winning information to the target account;
and when the first hash value is inconsistent with the second hash value, sending the loser information to the target account.
5. The method according to any one of claims 1 to 4, wherein the prize-exchanging condition further includes a prize-exchanging period;
the step of sending prize exchanging result information to the target account according to the prize exchanging conditions comprises the following steps:
receiving a prize exchanging request sent by the target account, wherein the prize exchanging request corresponds to a request moment;
and when the request moment is within the prize exchanging deadline, the prize exchanging result information is sent to the target account according to the matching condition of the prize winning codes and the target prize exchanging codes.
6. The method according to any one of claims 1 to 4, wherein after storing the received redemption intelligent contract into a blockchain through a consensus mechanism, further comprising:
and sending successful adding information of the lottery intelligent contract to a lottery account, wherein the successful adding information carries a contract address of the lottery intelligent contract in the block chain, the lottery account is an account with lottery authority, and the lottery account comprises the target account.
7. The method of claim 6, wherein before sending the prize redemption result information to the target account according to the prize redemption condition, the method further comprises:
receiving a prize exchanging request sent by the target account, wherein the prize exchanging request comprises the contract address;
and inquiring the prize-exchanging intelligent contract from the block chain according to the contract address to obtain the prize-exchanging condition.
8. An apparatus for generating a prize result, applied to any node in a prize block chain system, the apparatus comprising:
the storage module is used for storing the received prize-exchanging intelligent contract into a block chain through a consensus mechanism, wherein the prize-exchanging intelligent contract comprises a block hash value corresponding to a prize-exchanging condition, and the prize-exchanging condition comprises at least one prize-winning code;
the storage module is further configured to store the received prize exchanging information into the block chain through the consensus mechanism, where the prize exchanging information includes at least one target prize exchanging code and a target account holding the target prize exchanging code;
the transmission module is used for transmitting prize exchanging result information to a target account according to the prize exchanging condition, wherein the prize exchanging result information comprises the matching condition of the target prize exchanging code held by the target account and the prize winning code;
the storage module is further configured to store the prize redemption result information into the block chain through the consensus mechanism.
9. The apparatus of claim 8, wherein the storage module is further configured to generate a target block according to the received prize exchanging information, and the target block includes a first hash value of the target prize exchanging code; and when the number of nodes which pass the verification of the target block in the prize exchanging block chain system is greater than the required number of nodes, storing the target block into the block chain.
10. The apparatus of claim 9, further comprising:
the obtaining module is used for obtaining a history block stored in the block chain, wherein the history block comprises a history hash value corresponding to a history prize exchanging code stored before the prize exchanging information is received;
and the determining module is used for determining that the target block passes the verification when the historical hash value does not contain the hash value which is repeated with the first hash value.
11. The apparatus of claim 9, further comprising:
the matching module is used for matching a second hash value corresponding to the winning code in the block hash values with the first hash value of the target winning code;
the sending module is further used for sending winning information to the target account when the first hash value is consistent with the second hash value;
and the sending module is also used for sending the information of losing a prize to the target account when the first hash value is inconsistent with the second hash value.
12. The apparatus according to any one of claims 8 to 11, wherein the prize-exchanging condition further includes a prize-exchanging term;
the device further comprises:
the receiving module is used for receiving a prize exchanging request sent by the target account, and the prize exchanging request corresponds to a request moment;
and the sending module is further used for sending the prize exchanging result information to the target account according to the matching condition of the prize winning codes and the target prize exchanging codes when the request moment is within the prize exchanging deadline.
13. The apparatus according to any one of claims 8 to 11, wherein the sending module is further configured to send, to a lottery account number, information of success of adding the cashing intelligent contract, where the information of success of adding carries a contract address of the cashing intelligent contract in the block chain, where the lottery account number is an account number with lottery authority, and the lottery account number includes the target account number.
14. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by the processor to implement a method of generating a redemption result according to any one of claims 1 to 7.
15. A computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement a method of generating a redemption result according to any one of claims 1 to 7.
CN201911039552.2A 2019-10-29 2019-10-29 Method, device and equipment for generating prize exchanging result and readable storage medium Active CN112734455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911039552.2A CN112734455B (en) 2019-10-29 2019-10-29 Method, device and equipment for generating prize exchanging result and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911039552.2A CN112734455B (en) 2019-10-29 2019-10-29 Method, device and equipment for generating prize exchanging result and readable storage medium

Publications (2)

Publication Number Publication Date
CN112734455A true CN112734455A (en) 2021-04-30
CN112734455B CN112734455B (en) 2023-09-05

Family

ID=75588959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911039552.2A Active CN112734455B (en) 2019-10-29 2019-10-29 Method, device and equipment for generating prize exchanging result and readable storage medium

Country Status (1)

Country Link
CN (1) CN112734455B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108447014A (en) * 2018-03-19 2018-08-24 成都零光量子科技有限公司 A kind of block chain lottery industry method and system
KR101928087B1 (en) * 2018-01-03 2019-02-26 한국조폐공사 Method for managing on-line lottery based on blockchain and server using the same
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN109615422A (en) * 2018-11-29 2019-04-12 哈希未来(北京)科技有限公司 Competing pumping method, system and storage medium based on block chain
CN109672693A (en) * 2019-02-02 2019-04-23 江苏通付盾科技有限公司 Lottery rewarding method and device based on block chain
CN109767271A (en) * 2019-01-18 2019-05-17 众安信息技术服务有限公司 Lottery drawing method and equipment based on block chain
US20190180307A1 (en) * 2017-12-08 2019-06-13 UnVig, LLC Systems and methods for rewarding users of a social network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190180307A1 (en) * 2017-12-08 2019-06-13 UnVig, LLC Systems and methods for rewarding users of a social network
KR101928087B1 (en) * 2018-01-03 2019-02-26 한국조폐공사 Method for managing on-line lottery based on blockchain and server using the same
CN108447014A (en) * 2018-03-19 2018-08-24 成都零光量子科技有限公司 A kind of block chain lottery industry method and system
CN109389399A (en) * 2018-10-18 2019-02-26 深圳前海乐寻坊区块链科技有限公司 Lottery industry method, apparatus, computer equipment and storage medium based on block chain
CN109615422A (en) * 2018-11-29 2019-04-12 哈希未来(北京)科技有限公司 Competing pumping method, system and storage medium based on block chain
CN109767271A (en) * 2019-01-18 2019-05-17 众安信息技术服务有限公司 Lottery drawing method and equipment based on block chain
CN109672693A (en) * 2019-02-02 2019-04-23 江苏通付盾科技有限公司 Lottery rewarding method and device based on block chain

Also Published As

Publication number Publication date
CN112734455B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
Ghosh et al. Security of Cryptocurrencies in blockchain technology: State-of-art, challenges and future prospects
Belotti et al. A vademecum on blockchain technologies: When, which, and how
Du et al. An optimized consortium blockchain for medical information sharing
CN110380858B (en) Method and system for processing game consensus protocol of block chain
CN110599173B (en) Block chain consensus node determination method, device, equipment and storage medium
US10949511B2 (en) Multicomputer processing for data authentication using a blockchain approach
US20190280875A1 (en) Systems and methods for blockchain-based digital lottery ticket generation and distribution
JP7075393B2 (en) Systems and methods realized by blockchain
CN110796449B (en) Transaction processing method, system, medium and computing device
CN110599348B (en) Method, device, equipment and storage medium for stock right incentive
Alzahrani et al. A new product anti‐counterfeiting blockchain using a truly decentralized dynamic consensus protocol
CN111369730B (en) Voting processing method and device based on block chain
Zhu et al. Hybrid blockchain design for privacy preserving crowdsourcing platform
CN111915349A (en) Cross-platform integral using system and method based on block chain
CN113221191B (en) Block chain-based data evidence storage method, device, equipment and storage medium
CN110599331A (en) Debt charging system, method, device and storage medium based on block chain
CN111402033A (en) Asset information management method and device based on block chain
CN110738783A (en) System, method, device, equipment and readable storage medium for updating voting data
CN111340628A (en) Asset information management method and device based on block chain
CN115705571A (en) Protecting privacy of auditable accounts
Cai et al. Introduction to blockchain basics
CN111444416A (en) Method, system and device for popularizing financial business
Masseport et al. Proof of usage: User-centric consensus for data provision and exchange
CN115913734A (en) User authority management method, device and equipment applied to alliance chain
CN112734455B (en) Method, device and equipment for generating prize exchanging result and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40042554

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant