CN114550363A - Block chain-based lottery method and device - Google Patents

Block chain-based lottery method and device Download PDF

Info

Publication number
CN114550363A
CN114550363A CN202210171091.XA CN202210171091A CN114550363A CN 114550363 A CN114550363 A CN 114550363A CN 202210171091 A CN202210171091 A CN 202210171091A CN 114550363 A CN114550363 A CN 114550363A
Authority
CN
China
Prior art keywords
information
activity
block chain
module
storing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210171091.XA
Other languages
Chinese (zh)
Inventor
李辉
林振溪
王青博
李龙龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210171091.XA priority Critical patent/CN114550363A/en
Publication of CN114550363A publication Critical patent/CN114550363A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a block chain-based lottery method and device, and relates to the field of block chains. The method comprises the following steps: issuing a notice of the drawing activity, wherein the notice at least comprises the information of the drawing activity; obtaining the drawing information of a plurality of drawing objects participating in drawing activities, and storing the drawing information to a block chain module; determining a drawing rule of drawing activities, and storing the drawing rule to a block chain module in an intelligent contract form; and executing the intelligent contract, determining a lot-drawing object from the lot-drawing objects based on the lot-drawing information and the lot-drawing rule, obtaining a lot-drawing result, and storing the lot-drawing result to the block chain module. The method and the device solve the technical problems that the existing drawing method is not transparent enough and cannot ensure the fairness of drawing.

Description

Block chain-based lottery method and device
Technical Field
The application relates to the technical field of block chains, in particular to a lottery method and a device based on a block chain.
Background
The commemorative coin is a legal currency which is issued by the country for commemorating important events, outstanding characters, famous and ancient sites, rare animals and plants, sports events and the like in the aspects of politics, history, culture and the like of the international or the home country, comprises common commemorative coins and precious metal commemorative coins, is prepared or refined in quality and is issued in a limited quantity.
As commemorative coins are gradually popular with people in the market, more and more commemorative coins are sold in a mode of reservation drawing lots. However, the current lottery algorithm is realized in a commemorative coin selling system, a seller publishes a lottery rule in advance, the lottery process is not published to the outside, and if relevant personnel intervene the lottery process privately, the lottery process is not easy to find, so that the lottery is unfair, and the enthusiasm of participation of a lottery player is greatly reduced. In addition, since the lottery data is usually stored in the service system in a centralized manner, if the service system is attacked by a hacker, the data is likely to be tampered, and the security of the data is reduced.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a lottery method and a device based on a block chain, and the technical problems that the existing lottery method is not open and transparent enough and cannot guarantee the fairness of lottery are at least solved.
According to an aspect of an embodiment of the present application, there is provided a lot-chain-based drawing method, including: issuing a notice of the drawing activity, wherein the notice at least comprises the information of the drawing activity; obtaining the drawing information of a plurality of drawing objects participating in the drawing activity, and storing the drawing information to a block chain module; determining a drawing rule of the drawing activity, and storing the drawing rule to the block chain module in an intelligent contract form; and executing the intelligent contract, determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rule, obtaining a drawing result, and storing the drawing result to the block chain module.
Optionally, for any drawing object participating in the drawing activity, at least the identity information and the drawing number of the drawing object are obtained, and the identity information and the drawing number are stored in the block chain module as the drawing information of the drawing object.
Optionally, determining a drawing rule of the drawing activity includes: determining a preset base number, the number of participants participating in the drawing activity and the preset drawing number; arranging digits of the preset cardinality in a reverse order to obtain the turnover number; calculating the remainder of the quotient of the turnover number and the number of the participators, and adding 1 to obtain an initial middle-signed number; calculating the quotient of the number of the participators and the preset middle-signed number and rounding to obtain an order; and sequentially determining the central signing numbers of the preset central signing number based on the initial central signing number and the order, wherein the drawing object corresponding to the drawing information matched with the central signing number is the central signing object.
Optionally, the blockchain module is constructed based on a super ledger framework, where the blockchain module at least includes two organizations and a sequencing service node, and each of the organizations at least includes: the system comprises a framework server, a billing node, an endorsement node, an anchor node and a main node.
Optionally, the intelligent contract is called based on an interface corresponding to the super account book frame, and the drawing rule is executed to obtain a drawing number with a preset drawing number; and determining the medium-sign objects with the preset medium-sign quantity based on the medium-sign numbers and the drawing information to obtain the drawing result.
Optionally, in response to a query request of a target object, a query result corresponding to the query request is fed back, where the query request is at least used for requesting to query one of the following information: the drawing activity information, the drawing information and the drawing result.
Optionally, the drawing activity is commemorative coin selling drawing activity, the drawing activity information at least comprises commemorative coin information, after a drawing object is determined from the plurality of drawing objects based on the drawing information and the drawing rule, a binding relationship between the commemorative coin information and the drawing object is established, and the binding relationship is stored in the block chain module.
According to another aspect of the embodiments of the present application, there is also provided a lot drawing device based on a blockchain, including: the release module is used for releasing announcements of the lottery activity, and the announcements at least comprise lottery activity information; the acquisition module is used for acquiring the drawing information of a plurality of drawing objects participating in the drawing activity and storing the drawing information to the block chain module; the determining module is used for determining the drawing rules of the drawing activities and storing the drawing rules to the block chain module in an intelligent contract form; and the execution module is used for executing the intelligent contract, determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rule, obtaining a drawing result and storing the drawing result to the block chain module.
According to another aspect of the embodiments of the present application, there is also provided a processor, configured to execute a program, where the program executes the above-mentioned block chain-based drawing method.
According to another aspect of embodiments of the present application, there is also provided an electronic device, including one or more processors and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the above block chain-based drawing method.
In the embodiment of the application, firstly, a notice of the drawing activity is issued to publish drawing activity information, then, drawing information of a plurality of drawing objects participating in the drawing activity is obtained, and the drawing information is stored in the block chain module; then, determining a drawing rule of drawing activities, and storing the drawing rule to the block chain module in an intelligent contract form; and finally, executing the intelligent contract, determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rule, obtaining a drawing result, and storing the drawing result to the block chain module. The drawing rules are deployed in the block chain module in an intelligent contract mode, so that drawing can be carried out according to the rules, and the possibility that human factors interfere drawing results is eliminated; the drawing process data and the drawing result are stored in the block chain module, so that the drawing data can not be tampered, the transparentization of the drawing process is ensured, and the technical problems that the existing drawing method is not transparent enough and the fairness of drawing can not be ensured are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic structural diagram of a block chain-based drawing system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a blockchain according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of another block chain-based drawing system according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a lottery method based on a blockchain according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a drawing device based on a block chain according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
For a better understanding of the embodiments of the present application, some of the terms or expressions that appear during the description of the embodiments of the present application are to be interpreted as follows:
block chaining techniques: the distributed account book technology comprehensively utilizes the technologies of internet, point-to-point transmission, distributed computer storage, cryptography and the like, behaviors and data in a certain activity are distributed and stored in the distributed account book on a plurality of nodes of a blockchain network according to a blockchain protocol, and the behaviors and the data can be stored in the distributed account book only after being verified by the plurality of nodes together according to the blockchain protocol and effectively achieving consensus. Once the behavior information and the related data are stored in the distributed account book, the behavior information and the related data are difficult to change, the account book data on a certain node cannot be approved by other nodes in the blockchain network after being changed, and cannot be written into an account book commonly maintained by a plurality of nodes, namely, the change is invalid. Even in some special cases, more than 50% of nodes agree to a consensus and agree to update some data or behavior information, the updated behavior and history data will still be stored in the distributed ledger, and the change requires a lot of computing resources and time, making it difficult for a single person or organization to control the whole blockchain network alone to modify the distributed ledger. Meanwhile, data in the distributed account book can be transparent to the whole network, and nodes in any access block chain network can inquire historical data and behaviors. These characteristics of the blockchain ensure the integrity, irreparability, and transparency of the data information in the distributed ledger.
Intelligent contract: the program code stored and run on the blockchain network can be regarded as activity rules and related conventions commonly recognized by related parties participating in a certain activity, and the rules and conventions are expressed in the form of codes and are placed in the blockchain network for execution. The intelligent contracts, once agreed upon and placed on the blockchain network, are also transparent to all active participants and are not alterable. Intelligent contract execution procedures, status, input and output data may also be recorded in the blockchain network, unalterable and transparent to all active participants.
The solution of the present application is described below with reference to preferred examples.
Fig. 1 is a schematic structural diagram of an alternative blockchain-based drawing system according to an embodiment of the present invention, and as shown in fig. 1, the system may be divided into an application module 10 and a blockchain module 12, where:
the application module 10 is configured to issue an announcement of a drawing activity, where the announcement at least includes information of the drawing activity; obtaining the drawing information of a plurality of drawing objects participating in drawing activities, and storing the drawing information to a block chain module; determining a drawing rule of drawing activities, and storing the drawing rule to a block chain module in an intelligent contract form; and executing the intelligent contract, determining a lot-drawing object from the lot-drawing objects based on the lot-drawing information and the lot-drawing rule, obtaining a lot-drawing result, and storing the lot-drawing result to the block chain module. Optionally, the application module 10 may further respond to a query request of the target object, and feed back a query result corresponding to the query request, where the query request is used to request to query at least one of the following information: drawing activity information, drawing information and drawing results.
And the block chain module 12 is used for storing the drawing information, the intelligent contract corresponding to the drawing rule and the drawing result.
In some optional embodiments of the present application, the application module is mainly implemented by a Java program and is configured to process main business logic, the blockchain module is constructed based on a hyper-ledger framework (hyper-ledger Fabric), and the application module performs data interaction with the blockchain module by calling an interface corresponding to the hyper-ledger Fabric.
The HyperLegend Fabric is a private and licensed block chain architecture with high modularization, supports intelligent contracts written by various general programming languages, supports pluggable consensus protocols, and can be customized more effectively to adapt to specific use cases and trust models.
Specifically, the blockchain of the architecture is divided by organizations (organization), each organization has peer nodes bearing different functions, and each organization has a corresponding Fabric-CA server, and all organizations share one orderer cluster, where a node is a communication entity of the blockchain, which is a logical concept, and multiple nodes of different types can run on the same physical server, and generally, the nodes include the following four types:
1. common node peer: the peer nodes can be further divided into a bookkeeping node (commit peer), an endorsement node (endorser peer), a master node (leader peer) and an anchor node (anchor peer) according to the assumed roles.
Accounting node: all peer nodes are accounting nodes and are responsible for verifying transactions in the block of the sequencing service node and maintaining copies of state and general ledgers. The node periodically obtains blocks containing transactions from the ordering service node (orderer) and adds these blocks to the blockchain after verification of the block is issued. The accounting nodes can not be configured through the configuration file, and the related accounting nodes need to be manually specified when the current client or command line initiates a transaction request, and the number of the accounting nodes can be multiple.
An endorsement node: some peer nodes will also perform transactions and sign endorsements on the results, acting as endorsement nodes. The endorsement node is a dynamic role and is bound with a specific chain code. Each chain code sets an endorsement strategy when being instantiated, and specifies which nodes are effective for transaction after endorsement, and the endorsement nodes are only when an application program initiates a transaction endorsement request to the chain code, and are common accounting nodes at other times and only responsible for verifying the transaction and accounting. The endorsement node cannot be specified by the configuration file, but is specified by the client initiating the transaction request, and the number of the endorsement nodes can be more than one.
An anchor node: the peer node may also be an anchor node, which is primarily responsible for exchanging information on behalf of an organization with other organizations. Each organization has an anchor node, which is important for the organization, and if there is a problem with the anchor node, the current organization loses contact with other organizations. The configuration information of the anchor node is configured in a configuration file configx.yaml of the configxgen module, and only one anchor node is available.
A master node: the peer node can also be a master node, can communicate with the sequencing service node, and is responsible for acquiring the latest block from the sequencing service node and synchronizing the blocks inside the organization, and only one master node can exist in the whole organization.
2. Ordering service node orderer: and receiving the transaction containing the endorsement signature, sequencing the unpacked transactions to generate a block, and broadcasting the block to the peer node. The ordering service provides atomic broadcast to ensure that nodes on the same chain receive the same information and have the same logical order.
3. A client node: the client must be connected to a peer node or a sequencing service node to communicate with the blockchain network. And the client submits the transaction proposal to the endorsement node, and when enough endorsements are collected, the transaction proposal is broadcasted to the sequencing service node for sequencing to generate a block.
4. And (3) the CA node: the certificate authority of fabric1.0 consists of a server and a client. And the CA node receives the registration application of the client and returns a registration password for user login so as to obtain the identity certificate. All operations on the blockchain require verification of the user identity.
In some optional embodiments of the present application, the blockchain module includes at least two organizations and one ordering service node, and each organization includes at least: a Fabric-CA server, a billing node, an endorsement node, an anchor node, and a host node. Fig. 2 is a schematic diagram of an optional blockchain constructed based on the HyperLegendr Fabric, in which an application module (application) interacts with a blockchain module by calling an interface program (SDK).
Fig. 3 is a schematic diagram illustrating a more specific block chain-based drawing system. The application module can be divided into a front-end interactive interface and a rear-end application server, wherein the interactive interface is used for providing an operation and query interface for a participant so as to enable the participant to know relevant information in the drawing activity, transmit data to the application server and acquire query data; the application server deploys an application program, after receiving page structured information submitted by an interactive interface, the application server performs service logic processing, stores data (such as basic information of a user, an operation log and the like) which is not directly related to drawing and signing in a relational database, stores data (such as drawing and signing activity information, drawing and signing results and the like) which is related to drawing and signing in a block chain module, and can call an intelligent contract through an interface corresponding to Hyperhedger Fabric, and the intelligent contract directly interacts with the block chain to request for data query or data write-in.
On the basis of the drawing system, the embodiment of the application provides a drawing method based on a block chain, and the method can be applied to the existing drawing system and also can be used as an independent system to be in butt joint with various drawing activity systems and provide services. It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
Fig. 4 is a flowchart illustrating an alternative block chain-based drawing method according to an embodiment of the present application, where as shown in fig. 4, the method at least includes steps S402-S408, where:
step S402, issuing the notice of the drawing activity, wherein the notice at least comprises the information of the drawing activity.
It is understood that before the drawing activity starts, an announcement of the drawing activity may be issued by the application module, where the announcement includes at least: the system comprises drawing item information, drawing entry starting time, drawing entry ending time, drawing rules, preset drawing quantity, drawing result announcement time and other information related to drawing activities. For example, the drawing activity can be a commemorative coin selling drawing activity, and the drawing activity information at least comprises commemorative coin information, and specifically can comprise detailed information such as the face value, the specification weight, the material, the serial number and the like of the commemorative coin.
Step S404, obtaining the drawing information of a plurality of drawing objects participating in the drawing activity, and storing the drawing information to the block chain module.
In order to ensure fairness, after the lottery registration time is over, data participating in the lottery needs to be guaranteed to be unchangeable, so that the lottery process of the participant can be stored in the block link module, and since the data of the block link module has non-tamper-resistance property, the information of the participant can be prevented from being tampered by storing the lottery process of the participant in the block link module. In some optional embodiments of the present application, for any drawing object participating in drawing, at least the identity information and the drawing number of the drawing object are obtained, and the identity information and the drawing number are stored in the block chain module as the drawing information of the drawing object.
Step S406, determining a drawing rule of the drawing activity, and storing the drawing rule to the block chain module in an intelligent contract form.
In some optional embodiments of the present application, the following draw rule algorithm is provided:
1. and determining a preset base number A, the number X of participants who participate in the drawing and a preset middle drawing number M.
The preset base number a can be calculated by the following method: a ═ is (the Shenzhen stock exchange on the last working day of the drawing day is deeply certified to refer to "receive now" exponent × 100) × (the midplane in the Shenzhen stock exchange on the last working day of the drawing day is referred to "receive now" exponent × 100) × 10000; and the historical index quotation query related data of the Shenzhen stock exchange website can be logged, and finally A is an integer and cannot have decimal places.
2. And arranging the digits of the preset base number A in a reverse order to obtain the turnover number B.
3. Calculating the remainder of the quotient of the turnover number B and the number X of the participators, and adding 1 to obtain the initial middle signature number Y1
4. And calculating the quotient of the number of participating people X and the preset middle-signed number M and rounding to obtain the order Z.
5. Based on the number Y of the initial middle label1And sequentially determining M preset middle sign numbers according to the order Z, wherein the Nth middle sign number YN=Y1And N-1 × Z, (N is more than or equal to 1 and less than or equal to M), and the drawing object corresponding to the drawing information matched with the drawing number is the drawing object.
It should be noted that in some cases, the Nth middle-signed number Y may appearNIf the number of participants is more than X, taking N middle-sign numbers YN=Y1+(N-1)*Z-X。
The drawing rule algorithm is deployed in the block chain module in advance in the form of an intelligent contract, and the drawing can be ensured to be performed according to a set rule by using the characteristic that the block chain cannot be tampered.
Step S408, executing the intelligent contract, determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rule, obtaining a drawing result, and storing the drawing result to the block chain module.
Specifically, on the premise of meeting the drawing rules, the application module can call the intelligent contract through an interface corresponding to the Hyperhedger Fabric, and execute the drawing rules to obtain the drawing numbers with the preset drawing number; and then, determining the medium-sign objects with the preset medium-sign number based on the medium-sign numbers to obtain the drawing result. Because the block chain module has the characteristic that data cannot be tampered, the drawing and signing result is stored in the block chain module, and the tracing effect on historical data can be achieved.
Optionally, after the middle sign object is determined, a binding relationship between the commemorative coin information and the middle sign object can be established, and the binding relationship is stored in the blockchain module, for example, the number information of the commemorative coin and the identity information of the middle sign object are bound and stored in the blockchain module, so that the situation that the commemorative coin is sold backwards can be reduced to a great extent.
In order to ensure the openness and transparency of the whole drawing process, the data generated in the whole drawing process can be inquired. Specifically, the application module may respond to a query request of the target object and feed back a query result corresponding to the query request, where the query request is at least used for requesting to query one of the following information: drawing activity information, drawing information and drawing results. For example, the drawing participant can query the relevant block information through the interactive interface provided by the application module to know whether the intelligent contract is modified or not, whether the drawing data of the participant is correct or not, whether the intelligent contract is correctly executed or not, and the final drawing result.
In the embodiment of the application, the drawing rules are deployed in the block chain module in an intelligent contract mode, so that drawing can be carried out according to the rules, and the possibility that human factors interfere drawing results is eliminated; the data of the drawing process and the drawing result are stored in the block chain module, so that the drawing data can not be tampered, and the transparence of the drawing process is ensured; by using the mode of multiple accounts, the realization mode of the traditional business system for storing business data in a centralized way is avoided, and the safety of the data is improved; the method and the device effectively solve the technical problems that the existing drawing method is not transparent enough and cannot ensure the fairness of drawing.
According to an embodiment of the present application, there is also provided a drawing device for implementing the drawing method based on the blockchain, as shown in fig. 5, the device at least includes an issuing module 50, an obtaining module 52, a determining module 54 and an executing module 56, where:
the publishing module 50 is configured to publish a notice of the drawing activity, where the notice at least includes information of the drawing activity.
Before the drawing activity begins, the publishing module 50 may publish a drawing activity advertisement, which includes at least: the system comprises drawing item information, drawing entry starting time, drawing entry ending time, drawing rules, preset drawing quantity, drawing result announcement time and other information related to drawing activities. For example, the drawing activity can be a commemorative coin selling drawing activity, and the drawing activity information at least comprises commemorative coin information, and specifically can comprise detailed information such as the face value, the specification weight, the material, the serial number and the like of the commemorative coin.
The obtaining module 52 is configured to obtain the drawing information of the plurality of drawing objects participating in the drawing activity, and store the drawing information in the blockchain module.
In some optional embodiments of the present application, for any drawing object participating in drawing, the obtaining module 52 at least obtains the identity information and the drawing number of the drawing object, and stores the identity information and the drawing number as the drawing information of the drawing object in the block chain module. Specifically, in order to ensure fairness, after the end of the drawing registration time, data participating in drawing needs to be guaranteed to be unchangeable, and therefore, the drawing process of the participant can be stored in the blockchain module, and since the data of the blockchain module has non-tamper property, by storing the drawing process of the participant in the blockchain module, the information of the participant can be prevented from being tampered.
And the determining module 54 is used for determining the drawing rules of the drawing activities and storing the drawing rules to the block chain module in the form of intelligent contracts.
In some optional embodiments of the present application, the following lottery rule algorithm is provided:
1. and determining a preset base number A, the number X of participants who participate in the drawing and a preset middle drawing number M.
The preset base number a can be calculated by the following method: a ═ is (the Shenzhen stock exchange on the last working day of the drawing day is deeply certified to refer to "receive now" exponent × 100) × (the midplane in the Shenzhen stock exchange on the last working day of the drawing day is referred to "receive now" exponent × 100) × 10000; and the historical index quotation query related data of the Shenzhen stock exchange website can be logged, and finally A is an integer and cannot have decimal places.
2. And arranging the digits of the preset base number A in a reverse order to obtain the turnover number B.
3. Calculating the remainder of the quotient of the turnover number B and the number X of the participators, and adding 1 to obtain the initial middle signature number Y1
4. And calculating the quotient of the number of participating people X and the preset middle-signed number M and rounding to obtain the order Z.
5. Based on the number Y of the initial middle label1And sequentially determining M preset middle-signed numbers according to the order Z, wherein the Nth middle-signed number YN=Y1And N-1 × Z, (N is more than or equal to 1 and less than or equal to M), and the drawing object corresponding to the drawing information matched with the drawing number is the drawing object.
It should be noted that in some cases, the Nth middle-signed number Y may appearNIf the number of participants is more than X, taking N middle-sign numbers YN=Y1+(N-1)*Z-X。
The determining module 54 deploys the determined drawing rule algorithm in the blockchain module in advance in the form of an intelligent contract, and by using the property that the blockchain cannot be tampered, it can be ensured that the drawing is performed according to the established rule.
And the execution module 56 is used for executing the intelligent contract, determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rule, obtaining a drawing result, and storing the drawing result to the block chain module.
On the premise of meeting the drawing rule, the execution module 56 may call the intelligent contract through the interface corresponding to the hyper leader Fabric, and execute the drawing rule to obtain the drawing number of the preset drawing number; and then, confirming the medium-signed objects with preset medium-signed quantity based on the medium-signed numbers to obtain drawing results. Because the block chain module has the characteristic that data cannot be tampered, the drawing and signing result is stored in the block chain module, and the tracing effect on historical data can be achieved.
Optionally, after the middle sign object is determined, a binding relationship between the commemorative coin information and the middle sign object can be established, and the binding relationship is stored in the blockchain module, for example, the number information of the commemorative coin and the identity information of the middle sign object are bound and stored in the blockchain module, so that the situation that the commemorative coin is sold backwards can be reduced to a great extent.
In order to ensure the disclosure and transparency of the whole drawing process, the data generated in the whole drawing process can be queried, and therefore, the apparatus may further include a query module 58 configured to respond to a query request of a target object and feed back a query result corresponding to the query request, where the query request is at least used for requesting to query one of the following information: drawing activity information, drawing information and drawing results.
According to an embodiment of the present application, there is also provided a computer-readable storage medium, on which a program is stored, which when executed by a processor implements the above-mentioned block chain-based drawing method.
According to an embodiment of the present application, there is also provided a processor configured to execute a program, where the program executes the above block chain-based drawing method.
According to the embodiment of the present application, there is also provided an electronic device, an optional structure of which is shown in fig. 6, the electronic device 60 includes one or more processors 600 and a memory 602, the memory 602 is used for storing one or more programs, and the processor 600 is used for executing the programs, where when the programs are executed by the processor 600, the processor 600 implements the above-mentioned tile chain-based drawing method.
Specifically, when the program runs, the following steps can be executed: issuing a notice of the drawing activity, wherein the notice at least comprises the information of the drawing activity; obtaining the drawing information of a plurality of drawing objects participating in drawing activities, and storing the drawing information to a block chain module; determining a drawing rule of drawing activities, and storing the drawing rule to a block chain module in an intelligent contract form; and executing the intelligent contract, determining a lot-drawing object from the lot-drawing objects based on the lot-drawing information and the lot-drawing rule, obtaining a lot-drawing result, and storing the lot-drawing result to the block chain module.
Optionally, the following steps may also be executed when the program runs: responding to a query request of a target object, and feeding back a query result corresponding to the query request, wherein the query request is at least used for requesting to query one of the following information: drawing activity information, drawing information and drawing results.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, electronic devices according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A lot drawing method based on a block chain is characterized by comprising the following steps:
issuing a notice of the drawing activity, wherein the notice at least comprises the information of the drawing activity;
obtaining the drawing information of a plurality of drawing objects participating in the drawing activity, and storing the drawing information to a block chain module;
determining a drawing rule of the drawing activity, and storing the drawing rule to the block chain module in an intelligent contract form;
and executing the intelligent contract, determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rule, obtaining a drawing result, and storing the drawing result to the block chain module.
2. The method of claim 1, wherein obtaining drawing information for a plurality of drawing objects participating in the drawing activity and storing the drawing information to a blockchain module comprises:
and for any drawing object participating in the drawing activity, at least acquiring the identity information and the drawing number of the drawing object, and storing the identity information and the drawing number into the block chain module as the drawing information of the drawing object.
3. The method of claim 1, wherein determining a drawing rule for the drawing activity comprises:
determining a preset base number, the number of participants participating in the drawing activity and the preset drawing number;
arranging digits of the preset cardinality in a reverse order to obtain the turnover number;
calculating the remainder of the quotient of the turnover number and the number of the participators, and adding 1 to obtain an initial middle-signed number;
calculating the quotient of the number of the participators and the preset middle-signed number and rounding to obtain an order;
and sequentially determining the central signing numbers of the preset central signing number based on the initial central signing number and the order, wherein the drawing object corresponding to the drawing information matched with the central signing number is the central signing object.
4. The method of claim 1, wherein the blockchain module is constructed based on a hyper-ledger framework, wherein the blockchain module comprises at least two organizations and one sequencing service node, and each of the organizations comprises at least: the system comprises a framework server, a billing node, an endorsement node, an anchor node and a main node.
5. The method of claim 4, wherein executing the smart contract to determine a draw object from the plurality of draw objects based on the draw information and the draw rules to obtain a draw result comprises:
calling the intelligent contract based on an interface corresponding to the super account book frame, and executing the drawing rule to obtain a drawing number with a preset drawing number;
and determining the medium-sign objects with the preset medium-sign quantity based on the medium-sign numbers and the drawing information to obtain the drawing result.
6. The method of claim 1, wherein the drawing activity is a commemorative coin issue drawing activity, wherein the drawing activity information includes at least commemorative coin information, and wherein after determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rules, the method further comprises:
and establishing a binding relationship between the commemorative coin information and the middle sign object, and storing the binding relationship to the block chain module.
7. The method of claim 1, further comprising:
responding to a query request of a target object, and feeding back a query result corresponding to the query request, wherein the query request is at least used for requesting to query one of the following information: the drawing activity information, the drawing information and the drawing result.
8. A lot device based on block chain, characterized by, includes:
the release module is used for releasing announcements of the lottery activity, and the announcements at least comprise lottery activity information;
the acquisition module is used for acquiring the drawing information of a plurality of drawing objects participating in the drawing activity and storing the drawing information to the block chain module;
the determining module is used for determining the drawing rules of the drawing activities and storing the drawing rules to the block chain module in an intelligent contract form;
and the execution module is used for executing the intelligent contract, determining a drawing object from the plurality of drawing objects based on the drawing information and the drawing rule, obtaining a drawing result and storing the drawing result to the block chain module.
9. A processor, configured to execute a program, wherein the program is configured to execute the block chain-based drawing method according to any one of claims 1 to 7 when the program is executed.
10. An electronic device comprising one or more processors and memory storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the blockchain based draw method of any one of claims 1 to 7.
CN202210171091.XA 2022-02-23 2022-02-23 Block chain-based lottery method and device Pending CN114550363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210171091.XA CN114550363A (en) 2022-02-23 2022-02-23 Block chain-based lottery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210171091.XA CN114550363A (en) 2022-02-23 2022-02-23 Block chain-based lottery method and device

Publications (1)

Publication Number Publication Date
CN114550363A true CN114550363A (en) 2022-05-27

Family

ID=81677382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210171091.XA Pending CN114550363A (en) 2022-02-23 2022-02-23 Block chain-based lottery method and device

Country Status (1)

Country Link
CN (1) CN114550363A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114998013A (en) * 2022-06-01 2022-09-02 湖南天河文链科技有限公司 NFT-based digital collection transaction method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology
CN107742352A (en) * 2017-09-20 2018-02-27 黄玉宇 Decentralization lot/queuing strategy and system based on block chain and intelligent contract
CN107862782A (en) * 2017-10-27 2018-03-30 链家网(北京)科技有限公司 Drawing method and device based on ether mill block chain
CN110084651A (en) * 2019-05-07 2019-08-02 百度在线网络技术(北京)有限公司 A kind of lottery drawing method based on block chain, device and terminal
TWM587780U (en) * 2019-05-07 2019-12-11 雷酷資訊科技有限公司 Blockchain electronic ticketing system with random-selected ticket selling and ticket distributing mechanism
CN111009068A (en) * 2019-12-18 2020-04-14 中体彩科技发展有限公司 Lottery drawing number generation method and system based on block chain
US20200201683A1 (en) * 2018-12-24 2020-06-25 LiquidApps Ltd Systems and method for managing memory resources used by smart contracts of a blockchain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology
CN107742352A (en) * 2017-09-20 2018-02-27 黄玉宇 Decentralization lot/queuing strategy and system based on block chain and intelligent contract
CN107862782A (en) * 2017-10-27 2018-03-30 链家网(北京)科技有限公司 Drawing method and device based on ether mill block chain
US20200201683A1 (en) * 2018-12-24 2020-06-25 LiquidApps Ltd Systems and method for managing memory resources used by smart contracts of a blockchain
CN110084651A (en) * 2019-05-07 2019-08-02 百度在线网络技术(北京)有限公司 A kind of lottery drawing method based on block chain, device and terminal
TWM587780U (en) * 2019-05-07 2019-12-11 雷酷資訊科技有限公司 Blockchain electronic ticketing system with random-selected ticket selling and ticket distributing mechanism
CN111009068A (en) * 2019-12-18 2020-04-14 中体彩科技发展有限公司 Lottery drawing number generation method and system based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114998013A (en) * 2022-06-01 2022-09-02 湖南天河文链科技有限公司 NFT-based digital collection transaction method and system

Similar Documents

Publication Publication Date Title
CN109544160B (en) Transaction authenticity verification method and system based on block chain and intelligent contract
US20230254168A1 (en) System and method for controlling asset-related actions via a block chain
US20230069078A1 (en) Systems, devices, and methods for dlt-based data management platforms and data products
JP2024042037A (en) Method and system for directing exchange associated with token held anonymously on blockchain
CN110226168A (en) For providing the system and method for the interface of block chain cloud service
JP2019519014A (en) Method of secure peer-to-peer communication on blockchain
CN107742352A (en) Decentralization lot/queuing strategy and system based on block chain and intelligent contract
WO2019224026A1 (en) Blockchain stochastic timer transaction synchronization
CN110458700A (en) The logical card generation method of one kind, supply chain financial system and electronic equipment
JP7508521B2 (en) Blockchain-based system and method for communicating, storing, and processing data over a blockchain network
CN111861477A (en) Block chain-based post-transaction data processing method and device and computer equipment
CN101841539A (en) Method, device and system for grid resource allocation based on trust
CN110599348B (en) Method, device, equipment and storage medium for stock right incentive
CN112053271B (en) Public service platform data evidence management method and system based on block chain
US20210273780A1 (en) Encrypted blockchain voting system
CN112200567A (en) Resource management method and device based on block chain and electronic equipment
CN112749827A (en) Financial information processing method, device, electronic equipment and storage medium
JP6409115B1 (en) Automatic journal server and automatic journal program
KR102148386B1 (en) Digital Wills Service System Using Blockchain
CN114550363A (en) Block chain-based lottery method and device
CN114742654A (en) Digital asset circulation method, system, electronic device and medium based on alliance chain
CN112200570A (en) Resource distribution method and device based on block chain and electronic equipment
CN110852891A (en) Data processing method and device based on rolling difference and readable storage medium
CN113409075A (en) Point issuing method, device, equipment and storage medium
CN111161074A (en) Block chain account balance model construction method supporting sum locking

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination