CN112734455B - Method, device and equipment for generating prize exchanging result and readable storage medium - Google Patents

Method, device and equipment for generating prize exchanging result and readable storage medium Download PDF

Info

Publication number
CN112734455B
CN112734455B CN201911039552.2A CN201911039552A CN112734455B CN 112734455 B CN112734455 B CN 112734455B CN 201911039552 A CN201911039552 A CN 201911039552A CN 112734455 B CN112734455 B CN 112734455B
Authority
CN
China
Prior art keywords
lottery
target
code
hash value
redemption
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.)
Active
Application number
CN201911039552.2A
Other languages
Chinese (zh)
Other versions
CN112734455A (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

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 method, a device and equipment for generating a prize exchanging result 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; transmitting the lottery result information to the target account according to the lottery conditions; and storing the prize exchanging result information into the blockchain through a consensus mechanism. The winning code is arranged in the winning intelligent contract, the winning intelligent contract is stored in the winning blockchain system, when the target winning code is acquired by the target account, the matching condition between the winning code and the winning code is verified in the blockchain system, so that whether the target account is a winning result is determined, and the generation of the winning result is performed in the way because the data in the blockchain system are irreversible data, so that the credibility of the winning result is improved.

Description

Method, device and equipment for generating prize exchanging result and readable storage medium
Technical Field
The embodiment of the application relates to the field of blockchains, in particular to a method, a device, equipment and a readable storage medium for generating a prize exchanging result.
Background
The online lottery is an online activity of acquiring lottery codes by a player and extracting one or more lottery codes from all issued lottery codes at lottery time as winning codes of winning, wherein the extraction process of the winning codes is a random extraction process.
In the related art, in the random extraction process of extracting the winning code, the extraction is performed by a random extraction system, which is generated by a developer by setting a random algorithm, the implementation of which is agnostic to the player.
However, when the random extraction process is implemented in the above manner, the implementation manner of the random algorithm is unknown to the player, so that the player cannot know whether the winning code obtained by the extraction is preset or randomly extracted, and the reliability of the random extraction process is low.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for generating a prize exchanging result and a readable storage medium, which can solve the problem of low credibility in a random extraction process. The technical scheme is as follows:
in one aspect, a method for generating a redemption result is provided, which is applied to any node in a redemption blockchain system, and the method includes:
Storing the received lottery ticket exchange intelligent contract into a block chain through a consensus mechanism, wherein the lottery ticket exchange intelligent contract comprises a block hash value corresponding to a lottery ticket exchange condition, and the lottery ticket exchange condition comprises at least one winning code;
storing received redemption information into the blockchain through the consensus mechanism, wherein the redemption information comprises at least one target redemption code and a target account number holding the target redemption code;
transmitting the lottery result information to a target account according to the lottery condition, wherein the lottery result information comprises the matching condition of the target lottery code held by the target account and the winning code;
and storing the prize exchanging result information into the block chain through the consensus mechanism.
In another aspect, there is provided a device for generating a redemption result for use with any node in a redemption blockchain system, the device comprising:
the storage module is used for storing the received rewarding intelligent contract into a block chain through a consensus mechanism, wherein the rewarding intelligent contract comprises block hash values corresponding to rewarding conditions, and the rewarding conditions comprise at least one winning code;
the storage module is further used for storing received lottery information into the blockchain through the consensus mechanism, wherein the lottery information comprises at least one target lottery code and a target account number with the target lottery code;
The sending module is used for sending the lottery result information to the target account according to the lottery conditions, wherein the lottery result information comprises the matching condition of the target lottery code held by the target account and the winning code;
the storage module is further used for storing the prize exchanging result information into the block chain through the consensus mechanism.
In another aspect, a computer device is provided, where the computer device includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or an instruction set, where the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a method for generating a redemption result according to any of the above embodiments of the present application.
In another aspect, a computer readable storage medium is provided, where at least one instruction, at least one program, a code set, or an instruction set is stored, where the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a method for generating a redemption result according to any of the foregoing 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 according to any of the above embodiments of the application.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
the winning code is arranged in the winning intelligent contract, the winning intelligent contract is stored in the winning blockchain system, when the target winning code is acquired by the target account, the matching condition between the winning code and the winning code is verified in the blockchain system, so that whether the target account is a winning result is determined, and the generation of the winning result is performed in the way because the data in the blockchain system are irreversible data, so that the credibility of the winning result is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a distributed system applied to a blockchain system in accordance with an exemplary embodiment of the present application;
FIG. 2 is a schematic diagram of a block structure provided by an exemplary embodiment of the present application;
FIG. 3 illustrates a block chain system architecture diagram provided by an exemplary embodiment of the present application;
FIG. 4 is a flow chart of a method of generating a redemption result provided in one exemplary embodiment of the application;
FIG. 5 is a flow chart of a method for generating a redemption result provided by an exemplary embodiment of the present application applied to a gaming application;
FIG. 6 is a schematic illustration of a drawing contract interface provided by an exemplary embodiment of the 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 flow chart 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 an apparatus for generating a redemption result provided in one exemplary embodiment of the present application;
FIG. 11 is a block diagram of an apparatus for generating a redemption result provided in 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
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
First, the nouns involved in the embodiments of the present application will be described:
blockchain (Blockchain): is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain is essentially a decentralised database, which is a series of data blocks generated by cryptographic methods, each data block containing a batch of information of network transactions 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 blockchain underlying platform may include processing modules for user management, basic services, smart contracts, operation monitoring, and the like. The user management module is responsible for identity information management of all blockchain participants, including maintenance of public and private key generation (account management), key management, maintenance of corresponding relation between the real identity of the user and the blockchain address (authority management) and the like, and under the condition of authorization, supervision and audit of transaction conditions of certain real identities, and provision of rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node devices, is used for verifying the validity of a service request, recording the service request on a storage after the effective request is identified, for a new service request, the basic service firstly analyzes interface adaptation and authenticates the interface adaptation, encrypts service information (identification management) through an identification algorithm, and transmits the encrypted service information to a shared account book (network communication) in a complete and consistent manner, and records and stores the service information; the intelligent contract module is responsible for registering and issuing contracts, triggering contracts and executing contracts, a developer can define contract logic through a certain programming language, issue the contract logic to a blockchain (contract registering), invoke keys or other event triggering execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide a function of registering contract upgrading; the operation monitoring module is mainly responsible for deployment in the product release process, modification of configuration, contract setting, cloud adaptation and visual output of real-time states in product operation, for example: alarms, monitoring network conditions, monitoring node device health status, etc.
The platform product service layer provides basic capabilities and implementation frameworks of typical applications, and developers can complete the blockchain implementation of business logic based on the basic capabilities and the characteristics of the superposition business. The application service layer provides the application service based on the block chain scheme to the business participants for use.
Blockchains can be divided into private chains, alliance chains, and public chains; the federated chain is also referred to as a community blockchain (Consortium Block chains), which refers to a blockchain whose consensus process is controlled by preselected nodes. In a federated chain, all or part of the functions are only opened for node members within the chain, and each blockchain node in the federated chain can customize read-write permissions, query permissions, etc. based on needs.
Consensus mechanism (Consensus mechanism): is a mathematical algorithm for realizing trust establishment and rights acquisition among different nodes in a block chain system. In a blockchain system, the verification and confirmation of a transaction can be completed in a short time through voting of special nodes, and if a plurality of nodes with irrelevant interests can reach consensus for one transaction, all the nodes in the system can be considered to reach consensus for the same.
Intelligent contract: the method is characterized in that the method refers to a contract program which is automatically executed according to specific conditions, and is an important way for a user to interact with a blockchain and realize business logic by utilizing the blockchain. The basic idea of the intelligent contracts is that various contract terms can be embedded into the hardware and software used by us, so that an attacker needs great cost to attack, the intelligent contracts are diffused and stored in a blockchain by the common participation of multiparty users in customizing and utilizing a Peer-to-Peer (P2P) network, and the intelligent combination of the blockchain construction is automatically executed under the triggering condition. For example, each organization may access the data storage system through smart contracts on a blockchain deployed in a server to use the data storage and data querying functions provided by the data storage system. Smart contracts are essentially a set of conventions that are defined, propagated, verified, or executed in digital form, including that contract participants can execute conventions in smart contracts, which also allow trusted transactions to be made without third parties, and which transactions are traceable and irreversible. For example, the method for generating the prize exchanging result provided by the application is executed according to the prize exchanging intelligent contract, whether the prize exchanging code held by the player is consistent with the winning code is determined according to the prize exchanging intelligent contract, and when the prize exchanging code is consistent with the winning code, the player is determined to win the prize.
The system according to the embodiment of the present application may be a distributed system formed by connecting a client and a plurality of nodes (any form of computing device in an access network, such as a server and a user terminal) through a network communication.
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 the blockchain system according to an exemplary embodiment of the present application, the distributed system is formed by a plurality of nodes (arbitrary computing devices in an access network, such as servers and user terminals) and clients, 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, transmission Control Protocol) protocol. In a distributed system, any machine, such as a server, a terminal, may join to become a node, including a hardware layer, an intermediate layer, an operating system layer, and an application layer.
Referring to the functionality of each node in the blockchain system shown in fig. 1, the functions involved include:
1) The routing, the node has basic functions for supporting communication between nodes.
Besides the routing function, the node can also have the following functions:
2) The application is used for being deployed in a block chain to realize specific service according to actual service requirements, recording data related to the realization function to form recorded data, carrying a digital signature in the recorded data to represent the source of task data, sending the recorded data to other nodes in the block chain system, and adding the recorded data into a temporary block when the source and the integrity of the recorded data are verified by the other nodes.
For example, the services implemented by the application include:
2.1 Wallet for providing electronic money transaction functions including initiating transactions, i.e., sending a transaction record of the current transaction to other nodes in the blockchain system, and after verification by the other nodes, storing record data of the transaction in a temporary block of the blockchain in response to acknowledging that the transaction is valid; the wallet also supports the inquiry of electronic money remaining in the electronic money address. For example, the information of the stimulus object to be added is sent to the blockchain system, other nodes in the blockchain system verify the transaction (namely, the information of the stimulus object is added in the blockchain), and after the other nodes verify successfully, the transaction can be stored in the blockchain.
2.2 The shared account book is used for providing the functions of storing, inquiring, modifying and the like of account data, sending record data of the operation on the account data to other nodes in the blockchain system, and after the other nodes verify to be effective, storing the record data into a temporary block as a response for acknowledging that the account data is effective, and also sending confirmation to the node initiating the operation.
2.3 A computerized agreement that can execute the terms of a contract, implemented by code deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions based on actual business demand codes, such as querying the physical distribution status of the goods purchased by the buyer, transferring the electronic money of the buyer to the merchant's address after the buyer signs for the goods; of course, the smart contract is not limited to executing the contract for the transaction, and may execute a contract that processes the received information. For example, when a specific condition is met, the incentive object triggers the smart contract to execute an incentive mechanism according to the rule of the contract, such as issuing corresponding benefits or reddening to the incentive object.
3) The blockchain comprises a series of blocks (blocks) which are connected with each other according to the generated sequence time, the new blocks are not removed once being added into the blockchain, and record data submitted by nodes in the blockchain system are recorded in the blocks. The blockchain in the present application is a redemption blockchain, for example, in the redemption process, the redemption code data for each lottery object is recorded in the blockchain.
Referring to fig. 2, fig. 2 is a schematic diagram of a Block Structure according to an exemplary embodiment of the present application, in which 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. In addition, the block may include information such as a time stamp at the time of block generation. The blockchain is essentially a decentralised database, and is a series of data blocks which are generated by association using a cryptography method, and each data block contains relevant information for verifying the validity (anti-counterfeiting) of the information and generating the next block.
Fig. 3 illustrates a block chain system architecture diagram according to an exemplary embodiment of the present application. The system comprises a plurality of servers 101 and a plurality of storage devices 102, wherein the plurality of servers 101 can be configured with the same blockchain, i.e. the plurality of servers 101 can 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 billing node and other nodes, any of which may become a master billing node. The plurality of servers 101 may be a plurality of servers of the same institution or a plurality of servers belonging to different institutions, for example, a server of each department of a hospital may be included in the blockchain system; the blockchain system may include servers of various departments of the company, although servers of securities exchanges, banks, etc. may also be included in the blockchain system. The user of each organization may access the servers of the organization through a terminal 1011, and the plurality of terminal devices 1011 may be electronic devices capable of accessing the plurality of servers 101, which may be computers, smartphones, tablets, or other electronic devices.
Of course, 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 respective institutions, and respective servers in the blockchain system may obtain keys of respective institutions, such as public keys of any node, from the CA center to perform processes such as encryption and decryption of data. The plurality of storage devices 102 are used to provide 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 connection with the above description, fig. 4 is a flowchart of a method for generating a redemption result according to an exemplary embodiment of the present application, where the method is applied to any node in a redemption blockchain system, as shown in fig. 4, and includes:
step 401, storing the received rewarding intelligent contract into a block chain through a consensus mechanism, wherein the rewarding intelligent contract comprises block hash values corresponding to rewarding conditions, and the rewarding conditions comprise at least one winning code.
Alternatively, the consensus mechanism is that all nodes in the blockchain agree on the same transaction (or information, or event, or transaction), i.e., all nodes agree on the transaction, which is then stored in the blockchain.
Alternatively, the redemption smart contract refers to a contract program that automatically executes a redemption mechanism based on redemption conditions, including agreements for contract participants to execute contracts in the smart contract. Optionally, the redemption smart contract includes at least one of contract participant information (e.g., issuer information for issuing the smart contract), contract agreements (e.g., winning conditions), contract execution conditions (e.g., redemption conditions), and the like.
Optionally, the lottery function is a function provided in an application program, and the lottery intelligence is about an intelligence 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 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 the embodiment of the present application.
Illustratively, the lottery function is taken as a function provided in a game application program for illustration, a developer with the game application program formulates a lottery intelligent contract, a winning code is regulated in the intelligent contract, and a rewarding mode corresponding to the winning code is regulated in the intelligent contract, the developer sends the lottery intelligent contract to a lottery blockchain system, after any node in the lottery blockchain system receives the lottery intelligent contract, the lottery intelligent contract is broadcasted to other nodes, the content of a broadcast message is that the lottery intelligent contract is stored in a blockchain, after other nodes receive the broadcast message, the authenticity and the legality of the lottery intelligent contract are verified, and when the other nodes pass the verification of the lottery intelligent contract in the broadcast message, the blockchain system stores the lottery intelligent contract in a blockchain. The verification mode of the rewarding intelligent contract is that a node initiating 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 redemption intelligent contract, a block corresponding to the redemption intelligent contract is generated, where the block includes a block hash value corresponding to the redemption condition.
Optionally, the redemption condition includes at least one winning code for matching a redemption code held by an account number participating in the lottery. Optionally, the redemption condition further includes a redemption period, where the redemption period is used to limit the time of day of the prize and/or the latest time of day of the prize.
Step 402, storing received redemption information into a blockchain through a consensus mechanism, wherein the redemption information comprises at least one target redemption code and a target account number holding the target redemption code.
Optionally, the target redemption code is a redemption code obtained by extracting a target account number from a lottery function in an application program, and illustratively, the application program is implemented as a game application program, where the target redemption code may be a redemption code obtained by extracting a target account number after completing a game stage in the game application program, may be a redemption code obtained by extracting a lottery activity in the game application program, or may be a redemption code obtained by purchasing in the game application program.
Optionally, after the target account number obtains the target redemption code, the game server generates redemption information according to the target account number and the target redemption code, and optionally, the game server may be implemented as a node in a redemption blockchain system or may be implemented as an independent server. When the game server is realized as a node in the lottery block chain system, after lottery information is generated according to the target account number and the target lottery code, the received lottery information is directly stored into the block chain through a consensus mechanism; when the game server is realized as an independent server, the game server is accessed into the lottery block chain system, and after generating the lottery information, the game server sends the lottery information to any node in the lottery block chain system.
Optionally, the node in the prize-exchanging blockchain system generates a target block according to the received prize-exchanging information, the target block includes a first hash value of a target prize-exchanging code, and when the number of nodes passing verification on the target block in the prize-exchanging blockchain system is greater than the required node number, the target block is stored in the blockchain.
Optionally, after receiving the redemption information, the node that receives the redemption information generates a target block according to the redemption information, broadcasts the target block, and after receiving the broadcast message, other nodes verify the target node, verify the authenticity and validity of the target block, and when other nodes pass the verification of the target in the broadcast message, the blockchain system stores the target block into the blockchain. The verification mode of the target block is that the node initiating the broadcast uses the private key corresponding to the node to carry out electronic signature, and other nodes use the 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 redemption code in the target block is not repeated with the redemption codes acquired by other accounts, that is, after the node acquires the target block, the node acquires a history block stored in the blockchain, where the history block includes a history hash value corresponding to the history redemption code stored before the 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 passes the verification.
Step 403, according to the lottery conditions, the lottery result information is sent to the target account, wherein the lottery result information comprises the matching condition of the target lottery code and the winning code held by the target account.
Optionally, the exchange result information includes at least one of winning information and losing information, when a target exchange code held by the target account is matched with the winning code, the winning information is sent to the target account, and when the target exchange code held by the target account is not matched with the winning code, the losing information is sent to the target account. Optionally, the target redemption code held by the target account may include a plurality of redemption codes, and when a part of the redemption codes are matched with the winning codes and a part of the redemption codes are not matched with the winning codes, the redemption codes matched with the winning codes send winning information to the target account, and optionally, the redemption codes not matched with the winning codes send losing information to the target account.
Optionally, the information of the prize exchanging result may be directly fed back to the target account after the block chain system acquires the prize exchanging information, or may be fed back to the target account after the block chain system acquires the prize exchanging information sent by all accounts, which is not limited in this embodiment.
Step 404, the prize redemption result information is stored in the blockchain via a consensus mechanism.
Optionally, after the prize exchanging result information is stored in the blockchain through a consensus mechanism, the prize exchanging result information is irreversible information, and the account number can check the prize exchanging result information.
In summary, in the method for generating the prize exchanging result provided in this embodiment, the winning code is set in the prize exchanging intelligent contract, and the prize exchanging intelligent contract is stored in the prize exchanging blockchain system, when the target account obtains the target prize exchanging code, the matching condition between the prize exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account is the prize exchanging result, and because the data in the blockchain system is irreversible data, the prize exchanging result is generated in this way, and the credibility of the prize exchanging result is improved.
Illustratively, the process of generating the redemption results is shown in fig. 5, and is described as applied in a gaming application, the process including:
step 501, a smart contract is published in a game.
Optionally, after setting up the smart contract, the game developer issues the smart contract to the blockchain system and publishes the smart contract in the game, where the smart contract includes the redemption conditions.
Step 502, a player obtains a ticket redemption.
Optionally, the player obtains a ticket redemption at the gaming application by completing a game node, drawing, purchasing, etc., the ticket redemption having a corresponding ticket redemption code.
In step 503, the game system automatically wins the prize when the prize is opened.
Optionally, a winning time is agreed in the intelligent contract, and when the game system reaches the winning time, the winning code on the lottery ticket acquired by the player is matched with the winning code.
Step 504, the player awards the prize to the gaming system.
Alternatively, the player is awarded when the redemption code on the player's redemption ticket coincides with the winning code.
Referring to fig. 6, a schematic diagram of a drawing contract interface provided by an exemplary embodiment of the present application is shown in fig. 6, where a contract display area 610 is included in the drawing contract interface 600, and a drawing condition is displayed in the contract display area 610, where a drawing time and a drawing standard are included, and as shown in fig. 6, the drawing time is 6 months and 18 days 12:00, the prize drawing standard is a blockchain hash value, and optionally, the contract display area 610 further includes a prize drawing code held by the target account, when the system time reaches the prize drawing time, that is, reaches 6 months, 18 days and 12:00, a prize is drawn to the target account, when the prize exchanging code held by the target account is consistent with the hash value in the prize drawing result, the target account wins, as shown by a prize drawing interface 620, and when the prize exchanging code held by the target account is inconsistent with the hash value in the prize drawing result, the target account wins, as shown by a prize drawing interface 630.
In an alternative embodiment, the above-mentioned redemption result is obtained by matching a first hash value of a target redemption code with a second hash value of a winning code, and fig. 7 is a flowchart of a method for generating the redemption result according to another exemplary embodiment of the present disclosure, where the method is applied to any node in a redemption blockchain system, as shown in fig. 7, and the method includes:
step 701, storing the received rewarding intelligent contract into a block chain through a consensus mechanism, wherein the rewarding intelligent contract comprises block hash values corresponding to rewarding conditions, and the rewarding conditions comprise at least one winning code.
Alternatively, the consensus mechanism is that all nodes in the blockchain agree on the same transaction (or information, or event, or transaction), i.e., all nodes agree on the transaction, which is then stored in the blockchain.
Optionally, when any node in the blockchain system receives the redemption intelligent contract, a block corresponding to the redemption intelligent contract is generated, where the block includes a block hash value corresponding to the redemption condition.
Optionally, the redemption condition includes at least one winning code for matching a redemption code held by an account number participating in the lottery. Optionally, the redemption condition further includes a redemption period, where the redemption period is used to limit the time of day of the prize and/or the latest time of day of the prize.
Step 702, generating a target block according to the received redemption information, wherein the target block includes a first hash value of a target redemption code.
Optionally, when generating the target block according to the redemption information, generating a hash value according to the redemption information through a hash function, and storing the hash value into the block, wherein the hash value corresponding to the redemption information includes a first hash value corresponding to the target redemption 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 in a random manner, recreating a fingerprint called a hash value, which is typically represented by a string of short random letters and numbers.
Optionally, the first hash value of the target redemption code is used to match a second hash value corresponding to the winning code.
In step 703, when the number of nodes passing the verification on the target block in the redemption blockchain system is greater than the required number of nodes, the target block is stored in the blockchain.
Optionally, after receiving the redemption information, the node that receives the redemption information generates a target block according to the redemption information, broadcasts the target block, and after receiving the broadcast message, other nodes verify the target node, verify the authenticity and validity of the target block, and when other nodes pass the verification of the target in the broadcast message, the blockchain system stores the target block into the blockchain. The verification mode of the target block is that the node initiating the broadcast uses the private key corresponding to the node to carry out electronic signature, and other nodes use the public key corresponding to the node to verify the electronic signature.
Step 704, receiving a redemption request sent by the target account, where the redemption request corresponds to a request time.
Optionally, the request time may be carried in the redemption request when the target account sends the redemption request, or may be acquired according to the system time when the node receives the redemption request.
Optionally, the redemption condition further includes a redemption period, where the redemption period is used to limit the time of day of the prize and/or the latest time of day of the prize. Optionally, the target block further includes a hash value corresponding to the redemption period, and the redemption period is confirmed by the hash value, and the request time is verified according to the redemption period.
Step 705, when the request time is within the redemption period, matching the second hash value corresponding to the winning code in the block hash value with the first hash value of the target redemption code.
Optionally, when the request time is within the exchange period, sending exchange result information to the target account according to the matching condition of the winning code and the target exchange code, optionally, the exchange result information comprises at least one of winning information and losing information, when the winning code is matched with the target exchange code, sending the winning information to the target account, and when the winning code is not matched with the target exchange code, sending the losing information 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 matches the target redemption code; when the first hash value is inconsistent with the second hash value, namely the winning code is not matched with the target redemption code.
And step 707, when the first hash value is inconsistent with the second hash value, sending the prize-losing information to the target account.
It should be noted that, the above step 706 and step 707 are two steps in parallel, and only the step 706 may be performed, only the step 707 may be performed, or the step 706 and the step 707 may be performed simultaneously, for example: the target account correspondingly holds a plurality of lottery numbers, wherein part of the lottery numbers are matched with the winning numbers, and other lottery numbers are not matched with the winning numbers.
Step 708, the redemption result information is stored in the blockchain via a consensus mechanism.
Optionally, after the prize exchanging result information is stored in the blockchain through a consensus mechanism, the prize exchanging result information is irreversible information, and the account number can check the prize exchanging result information.
In summary, in the method for generating the prize exchanging result provided in this embodiment, the winning code is set in the prize exchanging intelligent contract, and the prize exchanging intelligent contract is stored in the prize exchanging blockchain system, when the target account obtains the target prize exchanging code, the matching condition between the prize exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account is the prize exchanging result, and because the data in the blockchain system is irreversible data, the prize exchanging result is generated in this way, and the credibility of the prize exchanging result is improved.
According to the method provided by the embodiment, the lottery conditions are set in the lottery intelligent contracts, and the lottery period is set in the lottery conditions, so that the lottery information of the target account is awarded in the lottery period, and the problem that node resources are occupied due to long-term effectiveness of the lottery process when the lottery period is not found is avoided.
In an alternative embodiment, the above-mentioned intelligent contract for claiming a prize is obtained by searching a contract address, and fig. 8 is a flowchart of a method for generating a prize-claiming result according to another exemplary embodiment of the present application, where the method is applied to any node in a prize-claiming blockchain system, as shown in fig. 8, and the method includes:
step 801, storing the received rewarding intelligent contract into a block chain through a consensus mechanism, wherein the rewarding intelligent contract comprises block hash values corresponding to rewarding conditions, and the rewarding conditions comprise at least one winning code.
Alternatively, the consensus mechanism is that all nodes in the blockchain agree on the same transaction (or information, or event, or transaction), i.e., all nodes agree on the transaction, which is then stored in the blockchain.
Optionally, when any node in the blockchain system receives the redemption intelligent contract, a block corresponding to the redemption intelligent contract is generated, where the block includes a block hash value corresponding to the redemption condition.
Optionally, the redemption condition includes at least one winning code for matching a redemption code held by an account number participating in the lottery. Optionally, the redemption condition further includes a redemption period, where the redemption period is used to limit the time of day of the prize and/or the latest time of day of the prize.
Step 802, sending adding success information of the lottery drawing intelligent contract to the lottery drawing account, wherein the adding success information carries contract addresses of the lottery drawing intelligent contract in a block chain.
Optionally, the lottery account is an account with lottery authority, and the lottery account includes a target account.
Optionally, after adding the block corresponding to the prize-exchanging intelligent contract to the blockchain, generating addition success information, and sending the storage address of the prize-exchanging intelligent contract in the blockchain as a contract address to the lottery account, so that the lottery account can inquire the prize-exchanging intelligent contract from the blockchain through the contract address when exchanging the prize.
Step 803, the received redemption information is stored in the blockchain through a consensus mechanism, wherein the redemption information comprises at least one target redemption code and a target account number holding the target redemption code.
Optionally, the node in the prize-exchanging blockchain system generates a target block according to the received prize-exchanging information, the target block includes a first hash value of a target prize-exchanging code, and when the number of nodes passing verification on the target block in the prize-exchanging blockchain system is greater than the required node number, the target block is stored in the blockchain.
Optionally, after receiving the redemption information, the node that receives the redemption information generates a target block according to the redemption information, broadcasts the target block, and after receiving the broadcast message, other nodes verify the target node, verify the authenticity and validity of the target block, and when other nodes pass the verification of the target in the broadcast message, the blockchain system stores the target block into the blockchain. The verification mode of the target block is that the node initiating the broadcast uses the private key corresponding to the node to carry out electronic signature, and other nodes use the public key corresponding to the node to verify the electronic signature.
Step 804, receiving a redemption request sent by the target account, where the redemption request includes a contract address.
Optionally, when the target account requests to pay through the target pay code, firstly, obtaining a contract address from the successful adding information, generating a pay request according to the contract address, adding the contract address into the pay request, and inquiring the pay intelligent contract by the contract address, thereby obtaining the intercom condition in the pay intelligent contract.
And step 805, inquiring the prize-exchanging intelligent contracts from the blockchain according to the contract address to obtain prize-exchanging conditions.
Step 806, the prize exchanging result information is sent to the target account according to the prize exchanging condition, and the prize exchanging result information includes the matching condition of the target prize exchanging code and the winning code held by the target account.
Optionally, the exchange result information includes at least one of winning information and losing information, when a target exchange code held by the target account is matched with the winning code, the winning information is sent to the target account, and when the target exchange code held by the target account is not matched with the winning code, the losing information is sent to the target account. Optionally, the target redemption code held by the target account may include a plurality of redemption codes, and when a part of the redemption codes are matched with the winning codes and a part of the redemption codes are not matched with the winning codes, the redemption codes matched with the winning codes send winning information to the target account, and optionally, the redemption codes not matched with the winning codes send losing information to the target account.
Optionally, the information of the prize exchanging result may be directly fed back to the target account after the block chain system acquires the prize exchanging information, or may be fed back to the target account after the block chain system acquires the prize exchanging information sent by all accounts, which is not limited in this embodiment.
Step 807, the redemption result information is stored in the blockchain via a consensus mechanism.
Optionally, after the prize exchanging result information is stored in the blockchain through a consensus mechanism, the prize exchanging result information is irreversible information, and the account number can check the prize exchanging result information.
In summary, in the method for generating the prize exchanging result provided in this embodiment, the winning code is set in the prize exchanging intelligent contract, and the prize exchanging intelligent contract is stored in the prize exchanging blockchain system, when the target account obtains the target prize exchanging code, the matching condition between the prize exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account is the prize exchanging result, and because the data in the blockchain system is irreversible data, the prize exchanging result is generated in this way, and the credibility of the prize exchanging result is improved.
According to the method provided by the embodiment, the successful adding information is sent to the lottery account, wherein the successful adding information comprises the contract address of the lottery intelligent contract in the block chain, so that the lottery account inquires the lottery intelligent contract through the contract address in the lottery process, the lottery condition is obtained, and the lottery efficiency is improved.
Fig. 9 is a flowchart of a method for generating a redemption result according to another exemplary embodiment of the present application, where the method is applied to a game application and illustrated in fig. 9, the method includes:
step 901, publishing an intelligent contract within a game.
Optionally, after setting up the smart contract, the game developer issues the smart contract to the blockchain system and publishes the smart contract in the game, where the smart contract includes the redemption conditions.
At step 902, a player obtains a redemption ticket.
Optionally, the player obtains a ticket redemption at the gaming application by completing a game node, drawing, purchasing, etc., the ticket redemption having a corresponding ticket redemption code.
In step 903, player information and ticket redemption information are recorded on the blockchain.
Optionally, the information of the player and the information of the lottery acquired by the player are recorded on the blockchain, and when the lottery is drawn, the information of the player and the lottery held by the player are directly acquired from the blockchain, and the lottery is matched with the lottery drawing code, so that whether the player wins the lottery is determined.
Step 904, when the time of drawing the prize is reached, the hash value of the intelligent contract block is used as the winning number.
In step 905, the player queries the winning situation by contract address.
Optionally, when the player inquires about the winning situation, the intelligent contract is inquired according to the contract address, and the hash value of the intelligent contract block is matched with the held prize-exchanging code.
At step 906, the player awards the prize to the system.
In summary, in the method for generating the prize exchanging result provided in this embodiment, the winning code is set in the prize exchanging intelligent contract, and the prize exchanging intelligent contract is stored in the prize exchanging blockchain system, when the target account obtains the target prize exchanging code, the matching condition between the prize exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account is the prize exchanging result, and because the data in the blockchain system is irreversible data, the prize exchanging result is generated in this way, and the credibility of the prize exchanging result is improved.
Fig. 10 is a block diagram of an apparatus for generating a redemption result according to an exemplary embodiment of the present application, and the apparatus is applied to any node in a redemption blockchain system, as shown in fig. 10, and includes: a storage module 1010 and a transmission module 1020;
A storage module 1010, configured to store, by using a consensus mechanism, the received redemption intelligent contract into a blockchain, where the redemption intelligent contract includes a blockhash value corresponding to a redemption condition, and the redemption condition includes at least one winning code;
the storage module 1010 is further configured to store the received redemption information into the blockchain through the consensus mechanism, where the redemption information includes at least one target redemption code and a target account number that holds the target redemption code;
a sending module 1020, configured to send, according to the redemption condition, redemption result information to a target account, where the redemption result information includes a match between the target redemption code held by the target account and the winning code;
the storage module 1010 is further configured to store the prize redemption result information into the blockchain through the consensus mechanism.
In an optional embodiment, the storage module 1010 is further configured to generate a target block according to the received redemption information, where the target block includes a first hash value of the target redemption code; and when the number of nodes passing the verification of the target block in the prize-exchanging blockchain system is larger than the number of required nodes, storing the target block into the blockchain.
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 blockchain, where the history block includes a history hash value corresponding to a history redemption code stored before the redemption information is received;
a determining module 1040, configured to determine that, when the historical hash value does not include a hash value that overlaps with the first hash value, the target block passes verification.
In an alternative embodiment, the apparatus further comprises:
a matching module 1050, configured to match a second hash value corresponding to the winning code in the block hash values with the first hash value of the target redemption 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 prize-losing information to the target account when the first hash value is inconsistent with the second hash value.
In an alternative embodiment, the redemption conditions further include a redemption period;
the apparatus further comprises:
a receiving module 1060, configured to receive a redemption request sent by the target account, where the redemption request corresponds to a request time;
The sending module 1020 is further configured to send the redemption result information to the target account according to a matching condition of the winning code and the target redemption code when the request time is within the redemption period.
In an optional embodiment, the sending module 1020 is further configured to send, to a lottery account, addition success information of the prize exchanging intelligent contract, where the addition success information carries a contract address of the prize exchanging intelligent contract in the blockchain, where the lottery account is an account having a lottery authority, and the lottery account includes the target account.
In an alternative embodiment, the apparatus further comprises:
a receiving module 1060, configured to receive a redemption request sent by the target account, where the redemption 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 generating device of the prize exchanging result provided in this embodiment sets the winning code in the prize exchanging intelligent contract, and stores the prize exchanging intelligent contract in the prize exchanging blockchain system, when the target account obtains the target prize exchanging code, the matching condition between the prize exchanging code and the winning code is verified in the blockchain system, so as to determine whether the target account is the prize exchanging result.
It should be noted that: the prize exchanging result generating device provided in the above embodiment is only exemplified by the division of the above functional modules, and in practical application, the above functional allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for generating the prize exchanging result provided in the above embodiment and the method embodiment for generating the prize exchanging result belong to the same concept, and detailed implementation processes of the apparatus and the method embodiment are detailed and are not repeated herein.
Fig. 12 is a schematic diagram showing a structure of a server according to an exemplary embodiment of the present application. The server may be the server shown in fig. 3. Specifically, the present application relates to a method for manufacturing a semiconductor device.
The server 1200 includes a central processing unit (CPU, central Processing Unit) 1201, a system Memory 1204 including a random access Memory (RAM, random Access Memory) 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 (I/O system, input Output System) 1206, which helps to transfer information between various 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 both the display 1208 and the input device 1209 are coupled to the central processing unit 1201 via an input-output controller 1210 coupled to a system bus 1205. The basic input/output system 1206 can 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, the 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. Mass storage device 1207 and its associated computer-readable media provide non-volatile storage for server 1200. That is, mass storage device 1207 may include a computer readable medium (not shown), such as a hard disk or compact disc read-only memory (CD-ROM, compact Disc Read Only Memory) drive.
Computer readable media may include computer storage media and communication media without loss of generality. 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, erasable Programmable Read Only Memory), electrically erasable programmable read-only memory (EEPROM, electrically Erasable Programmable Read Only Memory), flash memory or other solid state memory technology, CD-ROM, digital versatile disks (DVD, digital Versatile Disc) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that computer storage media are not limited to the ones described above. The system memory 1204 and mass storage device 1207 described above may be collectively referred to as memory.
According to various embodiments of the application, the server 1200 may also operate by being connected to a remote computer on a network, such as the Internet. That is, the server 1200 may be connected to the network 1212 through a network interface unit 1211 coupled to the system bus 1205, or alternatively, the network interface unit 1211 may be used to connect to other types of networks or remote computer systems (not shown).
The memory also includes one or more programs, one or more programs stored in the memory and configured to be executed by the CPU.
The embodiment of the application also provides a computer device, which comprises a processor and a memory, wherein at least one instruction, at least one section of program, code set or instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the generation method of the prize exchanging result provided by each method embodiment.
The embodiment of the application also provides a computer readable storage medium, which stores at least one instruction, at least one section of program, code set or instruction set, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by a processor to realize the method for generating the prize blending result provided by the above method embodiments.
It should be understood that references herein to "a plurality" are to two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is 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 for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.

Claims (11)

1. A method of generating a redemption result, applied to any node in a redemption blockchain system, the method comprising:
storing the received lottery ticket exchange intelligent contract into a block chain through a consensus mechanism, wherein the lottery ticket exchange intelligent contract comprises block hash values corresponding to lottery ticket exchange conditions, the lottery ticket exchange conditions comprise at least one winning code and a lottery ticket exchange period, the winning code is used for matching with a lottery ticket exchange code held by an account number participating in lottery, and the lottery ticket exchange period is used for limiting the lottery ticket exchange time;
Transmitting successful adding information of the intelligent lottery exchange contract to a lottery drawing account, wherein the successful adding information carries a contract address of the intelligent lottery exchange contract in the block chain, and the lottery drawing account is an account with lottery drawing authority;
generating a target block according to received lottery information, wherein the lottery information comprises at least one target lottery code and a target account number holding the target lottery code, the target block comprises a first hash value of the target lottery code, and the lottery account number comprises the target account number;
when the number of nodes passing the verification of the target block in the prize-exchanging blockchain system is larger than the number of required nodes, storing the target block into the blockchain;
under the condition that the current moment reaches the lottery drawing moment, lottery drawing result information is sent to the target account according to the lottery drawing condition, wherein the lottery drawing result information comprises the matching condition of a first hash value and a second hash value of the target lottery drawing code held by the target account, and the second hash value refers to the hash value corresponding to the lottery drawing code in the block hash value;
and storing the prize exchanging result information into the block chain through the consensus mechanism.
2. The method according to claim 1, wherein the method further comprises:
acquiring a history block stored in the block chain, wherein the history block comprises a history hash value corresponding to a history lottery code stored before the lottery 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 passes verification.
3. The method of claim 1, wherein the sending the redemption result information to the target account according to the redemption conditions includes:
matching a second hash value corresponding to the winning code in the block hash value with the first hash value of the target redemption code;
when the first hash value is consistent with the second hash value, winning information is sent to the target account;
and when the first hash value is inconsistent with the second hash value, sending the prize-losing information to the target account.
4. A method according to any one of claims 1 to 3, wherein, in the case that the current time reaches the time of drawing, sending the redemption result information to the target account according to the redemption condition includes:
Receiving a prize exchanging request sent by the target account, wherein the prize exchanging request corresponds to a request moment;
and when the request time is within the prize exchanging period, sending the prize exchanging result information to the target account according to the matching condition of the winning code and the target prize exchanging code.
5. A method according to any one of claims 1 to 3, further comprising, before said transmitting the redemption result information to the target account according to the redemption conditions:
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.
6. A device for generating a redemption result, applied to any node in a redemption blockchain system, the device comprising:
the storage module is used for storing the received lottery intelligent contract into a block chain through a consensus mechanism, wherein the lottery intelligent contract comprises block hash values corresponding to lottery conditions, the lottery conditions comprise at least one winning code and a lottery period, the winning code is used for matching with a lottery code held by an account number participating in lottery, and the lottery period is used for limiting the lottery moment;
The system comprises a transmitting module, a lottery account number generation module and a lottery processing module, wherein the transmitting module is used for transmitting addition success information of the lottery exchange intelligent contract to the lottery account number, the addition success information carries contract addresses of the lottery exchange intelligent contract in the block chain, the lottery account number is an account number with lottery authority, and a lottery opening contract interface corresponding to the lottery account number comprises the block hash value;
the storage module is further used for generating a target block according to received lottery information, wherein the lottery information comprises at least one target lottery code and a target account number holding the target lottery code, the target block comprises a first hash value of the target lottery code, and the lottery account number comprises the target account number;
the storage module is further used for storing the target block into the block chain when the number of nodes passing verification on the target block in the prize exchanging block chain system is larger than the number of required nodes;
the sending module is configured to send, when the current time reaches a winning time, a redemption result message to the target account according to the redemption condition, where the redemption result message includes a matching condition of a first hash value of the target redemption code held by the target account and a second hash value, and the second hash value is a hash value corresponding to the winning code in the block hash value;
The storage module is further used for storing the prize exchanging result information into the block chain through the consensus mechanism.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the acquisition module is used for acquiring a history block stored in the block chain, wherein the history block comprises a history hash value corresponding to a history lottery code stored before the lottery information is received;
and the determining module is used for determining that the target block passes verification when the historical hash value does not contain the hash value which is repeated with the first hash value.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the matching module is used for matching a second hash value corresponding to the winning code in the block hash value with the first hash value of the target redemption code;
the sending module is further configured to send winning information to the target account when the first hash value is consistent with the second hash value;
and the sending module is further used for sending the winning information to the target account when the first hash value is inconsistent with the second hash value.
9. The apparatus according to any one of claims 6 to 8, further comprising:
the receiving module is used for receiving a lottery ticket exchanging request sent by the target account, wherein the lottery ticket 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 code and the target prize exchanging code when the request moment is within the prize exchanging period.
10. A computer device comprising a processor and a memory, wherein the memory stores at least one program, the at least one program being loaded and executed by the processor to implement the method of generating a redemption result of any one of claims 1 to 5.
11. A computer-readable storage medium, wherein at least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement the method for generating a redemption result according to any one of claims 1 to 5.
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 CN112734455A (en) 2021-04-30
CN112734455B true 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 (6)

* 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

Family Cites Families (1)

* 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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN112734455A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
Du et al. An optimized consortium blockchain for medical information sharing
US20220263671A1 (en) Data processing method, apparatus, and device, blockchain system, and computer-readable storage medium
US10949511B2 (en) Multicomputer processing for data authentication using a blockchain approach
JP7075393B2 (en) Systems and methods realized by blockchain
CN110870254A (en) Distributed private subspace blockchain data structure with secure access restriction management
CN110585715A (en) Game data processing method, device, equipment and storage medium based on block chain
CN110599173A (en) Block chain consensus node determination method, device, equipment and storage medium
CN110796449B (en) Transaction processing method, system, medium and computing device
US20200074778A1 (en) Decentralized talent discovery via blockchain
CN110599348B (en) Method, device, equipment and storage medium for stock right incentive
CN111369730B (en) Voting processing method and device based on block chain
Zhu et al. Hybrid blockchain design for privacy preserving crowdsourcing platform
CN110737723B (en) Method, device and equipment for getting card ticket and storage medium
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
CN111915349A (en) Cross-platform integral using system and method based on block chain
CN110738783A (en) System, method, device, equipment and readable storage medium for updating voting data
CN112908442A (en) Medical data sharing method, device, equipment and computer readable medium
JPWO2018088475A1 (en) Electronic authentication method and program
CN111339550A (en) Comment information credibility method based on block chain technology
CN112801778A (en) Federated bad asset blockchain
Zhao Graph-based forensic investigation of bitcoin transactions
KR20210046982A (en) Project Management Platform
Bilal et al. Blockchain technology: Opportunities & challenges

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