CN111311386A - Block chain-based bead shaking method and system, electronic device and storage medium - Google Patents

Block chain-based bead shaking method and system, electronic device and storage medium Download PDF

Info

Publication number
CN111311386A
CN111311386A CN202010061144.3A CN202010061144A CN111311386A CN 111311386 A CN111311386 A CN 111311386A CN 202010061144 A CN202010061144 A CN 202010061144A CN 111311386 A CN111311386 A CN 111311386A
Authority
CN
China
Prior art keywords
random number
participants
participant
bead shaking
shaking
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
CN202010061144.3A
Other languages
Chinese (zh)
Inventor
刘恩科
王梦寒
贾牧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010061144.3A priority Critical patent/CN111311386A/en
Priority to PCT/CN2020/087662 priority patent/WO2021142972A1/en
Publication of CN111311386A publication Critical patent/CN111311386A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/08Auctions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/16Real estate
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C15/00Generating random numbers; Lottery apparatus
    • G07C15/006Generating random numbers; Lottery apparatus electronically

Landscapes

  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Accounting & Taxation (AREA)
  • Computational Mathematics (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention belongs to the technical field of block chains, and relates to a block chain-based bead shaking method, a bead shaking system, electronic equipment and a computer-readable storage medium. In the bead shaking method, firstly, a random number is respectively provided by a publisher and a participant, a sequence table of the participant is made, then the random numbers are subjected to XOR operation or summation operation, then the operation result or the hash value of the operation result and the number of the participants in the sequence table are subjected to complementation operation, and the complementation operation value is the serial number of the participant selected in the bead shaking of the round. The final selection result of the bead shaking method is determined by all random numbers, the final selection result can be changed by the change of any random number, and the final selection result can be appointed only by controlling all random numbers, so that the condition that a publisher operates the bead shaking result is avoided, and the fairness of bead shaking is improved.

Description

Block chain-based bead shaking method and system, electronic device and storage medium
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method, a system, an electronic device, and a computer-readable storage medium for shaking beads based on a blockchain.
Background
A bead shaking method is often adopted to select an agency in the bidding process of a government or a business. The traditional bead shaking method is characterized in that beads with numbers are placed in a bead shaking machine, after the bead shaking machine is started, a plurality of beads with numbers roll in a transparent circular container, field personnel supervise numbers thrown out of the bead shaking machine, and the process is called bead shaking. However, since the process needs a lot of time and has low working efficiency, many on-line bead shaking software appears, such bead shaking software usually generates a random number to select a participant participating in bead shaking, and the software of the centralized system is easily hijacked by people or operated by people, so that the bead shaking process is not fair and fair.
The block chain is an internet database technology, and essentially, a plurality of block chain nodes participate together, and a distributed account book technology with data non-falsification and open and reliable results is realized through a multi-party storage and calculation mode.
Disclosure of Invention
The invention provides a bead shaking method based on a block chain, a bead shaking system, electronic equipment and a computer readable storage medium, which aim to solve the problem that bead shaking software in the prior art is easy to hijack by people or results of manual operation are not fair and fair enough in a bead shaking process.
In order to achieve the above object, a first aspect of the present invention provides a block chain-based bead shaking method, comprising:
step S1, the publisher shows the bead-shaking rules;
step S2, the issuing party and each participating party respectively select a random number RiI is a natural number greater than 0, and then the random number R is addediHash ofUploading the value to the block chain, and sequencing all the participants according to the time of uploading the hash value by all the participants to generate a sequence table;
step S3, the issuing party and each participating party use the random number RiUploading to a block chain;
step S4, providing random numbers R for the participants and the issuers in the sequence listiCarrying out XOR operation or summation operation, and then carrying out complementation operation on the result of the XOR operation or the summation operation or the hash value of the result and the number of the participants in the sequence table, wherein the numerical value obtained by the complementation operation is the serial number of the participant selected in the round of bead shaking;
step S5, removing the selected participators in the step S4 from the sequence table, updating the sequence table, and then repeating the step S4 to obtain the serial numbers of the participators selected in a new round of bead shaking;
step S6, repeat steps S4 and S5 until the desired number of participants are selected.
Further, the bead shaking fine screen comprises a blacklist and a white list participating in bead shaking activities and the number of required participants; before generating the sequence table, firstly verifying whether the participant is in the white list, if not, rejecting the participant, if so, verifying whether the participant is in the black list, if so, rejecting the participant, otherwise, rejecting the participant, if not, determining that the participant is a valid participant, and finally, sorting all valid participants according to the time for uploading the hash value.
Furthermore, if the number of the effective participants is not more than the number of the participants required in the bead shaking fine rule, stopping bead shaking; and if the number of the effective participants is larger than the number of the participants required in the bead shaking fine rule, continuing to shake the beads.
Further, the issuing party and each participating party respectively select a random number RiThe specific method comprises the following steps: firstly, the issuing party and each participating party respectively generate one according to the system timeSystem random number, then adding a personal random number on the basis of respective system random number by said issuing party and each participator to form final random number Ri
Further, the random numbers R provided to the participating party and the issuing party in the order list in step S4iBefore carrying out XOR operation or summation operation, the random number R is also subjected toiThe verification is carried out, and the specific verification method comprises the following steps: calculating the random numbers R uploaded by the issuing party and each participating party in the step S3iAnd the random number R uploaded in step S2iThe hash values are compared, if the hash values are the same, the verification is passed, and if the hash values are different, the random number R is provediHas been modified and then the bead shaking is terminated.
Further, the sequence number of the sequence table starts from the number 0 and is incremented by the difference value of 1.
Further, the method for updating the sequence table in step S5 includes: firstly, the serial number of the selected participant in step S4 is removed from the sequence table, and then the values of the serial numbers of the subsequent participants are all subtracted by 1 to obtain an updated sequence table.
In order to achieve the above object, a second aspect of the present invention provides a block chain-based bead shaking system, comprising:
the information release module: the system is used for publishing items to be shaken and fine-rules of the shaken beads and disclosing the process and results of the shaken beads;
the information input module: providing a random number generation program and a hash operation program, wherein the issuing party and the participating party can submit the random number and the hash value of the random number through the information input module;
a data processing module: sorting according to data submitted by participants to generate a participant sequence list, and updating the participant sequence list in real time according to the bead shaking process; and calculating the data submitted by the issuing party and the participating party to obtain the selected participating party, and sending the calculation process and result to the information issuing module for displaying.
In order to achieve the above object, a third aspect of the present invention provides an electronic apparatus comprising:
a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor when executing the computer program implementing:
the blockchain-based bead shaking method described above.
In order to achieve the above object, a fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, realizes:
the blockchain-based bead shaking method described above.
According to the above description and practice, the bead shaking method based on the block chain of the present invention includes that firstly, a random number is provided by each of the issuing party and each of the participating parties, then a sequence table of the participating parties is made, then the random numbers are subjected to xor operation or summation operation, then the operation result or the hash value of the operation result and the number of the participating parties in the sequence table are subjected to remainder operation, and the value of the remainder operation is the serial number of the participating party selected in the bead shaking of the current round. The final selection result of the bead shaking method is determined by all random numbers, the final selection result can be changed by the change of any random number, the final selection result can be appointed only by controlling all random numbers, but any party participating in bead shaking activities cannot know all random numbers, so that the condition of manipulating the bead shaking result is avoided, and the bead shaking fairness is improved.
In addition, in the bead shaking method, before the random number is operated, the random number is firstly verified, whether the random number is provided by an initial publisher or a participant is verified, and the random number can be prevented from being changed in the background by any party participating in bead shaking. In addition, the random number of the issuing party is introduced in the operation process, rather than the random number of the participating party is operated singly, the communication behavior among all the participating parties can be avoided, and the fairness of the bead shaking activity is improved. In addition, the random number R submitted by the participator and the publisher in the bead shaking methodiAll are provided independently, the final value is not influenced by any other party and does not existThe condition of random numbers is appointed in advance, so that the bead shaking process is fairer and more fair.
Drawings
FIG. 1 is a flow chart of a blockchain-based bead shaking method as contemplated in one embodiment of the present invention.
FIG. 2 is a schematic diagram of a block chain based bead shaking system as contemplated in one embodiment of the present invention.
Detailed Description
Exemplary embodiments will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the present disclosure, the terms "include", "arrange", "disposed" and "disposed" are used to mean open-ended inclusion, and mean that there may be additional elements/components/etc. in addition to the listed elements/components/etc.; the terms "first," "second," and the like are used merely as labels, and are not limiting as to the number or order of their objects.
In an exemplary embodiment of the disclosure, a bead shaking method based on a block chain technology is provided, which is applied to an intelligent terminal device having a certain storage space, a connectable network and participating in a block chain. Specifically, the intelligent terminal device can be various electronic terminal devices such as a mobile phone, a tablet computer, a notebook computer, a PDA, an ore machine and the like, which have certain storage space, can be connected with a network and participate in a block chain.
Referring to fig. 1, the block chain based bead shaking method mainly comprises the following steps:
and step S1, the publisher shows the bead-shaking rule. The bead-shaking rules may include the content of the item represented by the bead-shaking activity, the number of participants required for the item, and the black list and white list of the participants involved in the bead-shaking activity.
The white list contains a list of parties with qualifications required to implement the project, and the black list contains a list of parties prohibited from participating in the project.
Step S2, the issuing party and each participating party respectively select a random number RiI is a natural number greater than 0, and then the random number R is addediUploading the hash value to a block chain, and sequencing all the participants according to the time of uploading the hash value by all the participants to generate a sequence table.
In the step, the issuing party and each participant register on the terminal equipment, the respective names are recorded in the terminal equipment, and the equipment is used for generating a system random number, the system random number can be automatically generated by the equipment according to a random number generation program and the time of the system, so that the numerical values of the issuing party and each participant are ensured to be different. The issuing party and each participating party can add a personal random number on the basis of the system random number to form a final random number Ri. The random number RiCan be considered to be provided by the publisher and each participant individually, and no one else/organization/device can change its value. Random number RiThe system random number and the personal random number are added, so that the random number generation program can be prevented from being modified manually, and the generated random number is an artificially specified random number. And the random number RiThe hash value of (2) can be calculated by using a hash algorithm such as MD4 or MD 5.
Before the parties are sorted, the parties need to be verified to see if they are within the blacklist and the whitelist. Firstly, verifying whether the participator is in the white list, if not, rejecting the participator, if so, verifying whether the participator is in the black list, otherwise, rejecting the participator, if not, determining the participator is a valid participator, and finally, sorting all valid participators according to the time for uploading the hash value. In addition, if the number of the effective participants is not more than the number of the participants required in the bead shaking fine rule, stopping bead shaking; and if the number of the effective participants is larger than the number of the participants required in the bead shaking fine rule, continuing to shake the beads.
In addition, the sequence number of the sequence table starts with the number 0 and is incremented by the difference value of 1. For example, if five valid participants are finally verified, the sequence numbers in the sequence table are 0, 1, 2, 3, and 4 in order.
Step S3, the issuing party and each participating party use the random number RiUploading into the block chain.
Step S4, providing random numbers R for the participants and the issuers in the sequence listiAnd performing XOR operation or summation operation, and then performing complementation operation on the result of the XOR operation or the summation operation or the hash value of the result and the number of the participants in the sequence table, wherein the obtained numerical value of the complementation operation is the serial number of the participants selected in the round of bead shaking.
It is noted that in this step, the random numbers R provided to the participants and the issuers in the order listiBefore carrying out XOR operation or summation operation, the random number R is also subjected toiThe verification is carried out, and the specific verification method comprises the following steps: calculating the random numbers R uploaded by the issuing party and each participating party in the step S3iThe hash value of (1), the hash algorithm used here is the same as the hash algorithm in step S2, and then the random number R uploaded in step S2iThe hash values are compared, if the hash values are the same, the verification is passed, and if the hash values are different, the random number R is provediHas been modified and then the bead shaking is terminated. Through the verification of the step, the situation that the random number of the issuing party and each participating party modifies the random number can be avoided, and meanwhile, the situation that the random number is modified by a system background after each party uploads the random number can also be avoided.
And S5, removing the selected participants from the sequence table in the step S4, updating the sequence table, and repeating the step S4 to select the serial numbers of the participants selected in a new round of bead shaking.
Specifically, the method for updating the sequence table comprises the following steps: firstly, the serial number of the selected participant in step S4 is removed from the sequence table, and then the values of the serial numbers of the subsequent participants are all subtracted by 1 to obtain an updated sequence table. For example, if the participant with sequence number 2 in the sequence table is selected, it is removed from the sequence table, and the sequence numbers of the participants with original sequence numbers 3 and 4 are updated to 2 and 3, and at this time, the sequence numbers of the new sequence table are 0, 1, 2 and 3 in sequence.
Step S6, repeat steps S4 and S5 until the desired number of participants are selected.
The final selected participant in the bead shaking method is obtained by a series of operations of random numbers provided by the issuing party and each participant, and the operation method and the operation process are uploaded to the block chain and are disclosed, so that the high bead shaking process is ensured to be open and transparent, and no dark box operation exists. Since the final result is determined by all random numbers, the publisher needs to acquire all random numbers in order to specify the final participant, and change the random numbers so that a participant becomes the final bead-selecting result. In the bead shaking method, before the random number is operated, the random number is firstly verified, whether the random number is provided by an initial publisher or a participant is verified, and the random number is prevented from being changed by any party participating in bead shaking in the background. In the operation process in step S4, the random number of the issuing party is introduced instead of operating the random numbers of the participating parties singly, so that the collusion behavior among the participating parties can be avoided, and the fairness of the bead shaking activity is improved. The data generated in each bead shaking process is uploaded to the block chain, so that the whole bead shaking process can be traced,prevent any party participating in the activity of shaking the beads from having cheating behaviors. In addition, random numbers R submitted by participants and issuers in the bead shaking methodiThe ball-shaking device is provided independently, the final value is not influenced by any other party, the condition of appointing random numbers in advance does not exist, and the process of shaking the ball is more fair and fair.
The above method will be described in detail below by taking a court as an example of bidding. In this example, the court needs to evaluate a certain property, and a bidding announcement is issued for this purpose, A, B, C, D, E, F six evaluation institutions participate in the bidding, and the court finally needs only two evaluation institutions for evaluation work, so that a bead shaking is performed to select two evaluation institutions from the six evaluation institutions. In addition, in order to increase the fairness of bead shaking, a house property owner G and a notarization department H are introduced, and the specific bead shaking method comprises the following steps:
firstly, when a court issues a bead-shaking rule, two evaluation mechanisms are clearly needed in the rule, a white list with property evaluation qualification and a blacklist subjected to punishment by a property evaluation association are disclosed, in the example, the six evaluation mechanisms are all in the white list, and the blacklist comprises an evaluation mechanism F.
Then, the court, each evaluation institution, the owner G of the house property and the notarization office H register on the terminal device having the bead shaking system, the respective names are entered therein, and one random number R is selected respectivelyiAnd i is a natural number greater than 0. In order to make the operation more clear, the random number in this example is chosen to be a smaller value, where R is1Random number, R, provided for court1=100;R2Random number, R, provided for the owner G of the property2=200;R3Random number, R, provided for notarization department H3=300;R4Random number, R, supplied to evaluation organization A4=10;R5Random number, R, supplied to evaluation entity B5=20;R6Random number, R, supplied to evaluation facility C6=30;R7Random number, R, supplied to evaluation facility D7=40;R8To evaluateRandom number, R, supplied by mechanism E8=50;R9Random number, R, supplied to evaluation facility F960. Then, the hash value of the random number is calculated according to the hash algorithm of MD4, which is as follows:
Hash(R1)=ad57366865126e55649ecb23ae1d48887544976efea46a48eb5d85a6eeb4d306;
Hash(R2)=27badc983df1780b60c2b3fa9d3a19a00e46aac798451f0febdca52920faaddf;
Hash(R3)=983bd614bb5afece5ab3b6023f71147cd7b6bc2314f9d27af7422541c6558389;
Hash(R4)=4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5;
Hash(R5)=f5ca38f748a1d6eaf726b8a42fb575c3c71f1864a8143301782de13da2d9202b;
Hash(R6)=624b60c58c9d8bfb6ff1886c2fd605d2adeb6ea4da576068201b6c6958ce93f4;
Hash(R7)=d59eced1ded07f84c145592f65bdf854358e009c5cd705f5215bf18697fed103;
Hash(R8)=1a6562590ef19d1045d06c4055742d38288e9e6dcd71ccde5cee80f1d5a774eb;
Hash(R9)=9ecb23ae11045d06c4055742d38288eaf726b8a42fb575f1d54f1e52642080fe。
and uploading the hash values of the random numbers to the block chain respectively by the court, each evaluation institution, the owner G of the house property and the notarization department H. And then, checking whether the evaluation mechanism is in the blacklist and the white list, checking that the evaluation mechanism F is in the blacklist, and rejecting the bead shaking activity. The final number of valid evaluation facilities was 5, which was greater than the number required by the court of law, 2, thus continuing the bead shaking activity. And sequencing all participants according to the time for uploading the hash value by each effective evaluation mechanism to generate a sequence table. The sequence table is shown in table 1 in this example.
Table 1:
serial number Evaluation organization
0 B
1 A
2 D
3 C
4 E
Then, the courts, the owners G of the properties, the notarization departments H and the evaluation organizations A to E respectively use the random numbers R1~R8Uploading into the block chain.
Then, random numbers R uploaded by the owners G and the notarization departments H of the courts and the real estate and the evaluation institutions A-E are calculated according to the Hash algorithm of the MD41~R8Comparing the calculated result with the hash values uploaded by the prior courthouse, house owner G, notarization department H and evaluation institutions A-E, if the calculated result is different from the hash value uploaded by the prior courthouse, the random number is proved to be changed, the bead shaking activity is stopped, and if the calculated result is the same as the hash value uploaded by the prior courthouse, house owner G, notarization department H and evaluation institutions A-E, the random number is proved to be not changed, and the bead shaking activity is continued.
Then, for the random number R1~R8Carrying out summation operation, and carrying out complementation operation on the result of the summation operation and the number of the evaluation mechanisms in the table 1, wherein the complementation operation value is the participant selected by the rolling ball in the current roundThe serial number of (2). The specific operation is as follows: r1+R2+R3+R4+R5+R6+R7+R8750; and performing a complementation operation on 750 and 5, wherein the remainder is 0, and selecting an evaluation mechanism B in the ball shaking process.
Evaluation institution B then culls from table 1 and updates table 1 to generate table 2:
table 2:
serial number Evaluation organization
0 A
1 D
2 C
3 E
And then, carrying out summation operation on the remaining random numbers, and carrying out complementation operation on the result of the summation operation and the number of the evaluation mechanisms in the table 2, wherein the complementation operation value is the serial number of the participant selected in the round of bead shaking. The specific operation is as follows: r1+R2+R3+R4+R6+R7+R8730; and performing a complementation operation on 730 and 4, wherein the remainder is 2, and selecting an evaluation mechanism C in the ball shaking process. Two evaluation facilities required by the court have been selected so far, which are the evaluation facility B and the evaluation facility C, respectively.
Furthermore, in an exemplary embodiment of the present disclosure, a block chain based bead shaking system is also provided. Referring to fig. 2, the block chain based bead shaking system comprises: the system comprises an information issuing module, a login module and a data processing module. Wherein:
the information release module: the method is used for publishing items to be shaken and fine shaken beads, and disclosing the shaking process and results. The information published by the module is uploaded to the block chain through a program, and data are guaranteed not to be tampered.
The information input module: and providing a random number generation program and a hash operation program, wherein the publisher and the participant can submit respective random numbers and hash values of the random numbers after registration is carried out by the information entry module. And the random number and the hash value thereof are sent to a data processing module for subsequent operation.
A data processing module: sorting according to data submitted by participants to generate a participant sequence list, and updating the participant sequence list in real time according to the bead shaking process; and calculating the data submitted by the issuing party and the participating party to obtain the selected participating party, and sending the calculation process and result to the information issuing module for displaying. The module ranks a number of active participants based on the time of the hash value submitted by the active participants to generate a sequence table.
It should be noted that although several modules of a blockchain based bead system are mentioned in the above detailed description, such partitioning is not mandatory. Indeed, the features and functionality of two or more of the modules described above may be embodied in one module, in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module described above may be further divided into embodiments by a plurality of modules.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. The electronic device is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention. The electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: at least one processing unit, at least one memory unit, a bus connecting different system components (including the memory unit and the processing unit), and a display unit.
Wherein the storage unit stores program code executable by the processing unit to cause the processing unit to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification.
The memory unit may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM) and/or a cache memory unit, and may further include a read only memory unit (ROM).
The storage unit may also include a program/utility having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The bus may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface. Also, the electronic device may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via a network adapter. The network adapter communicates with other modules of the electronic device over the bus. It should be understood that other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Further, in an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when said program product is run on the terminal device.
The program product for implementing the above method in the present invention may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A block chain-based bead shaking method is characterized by comprising the following steps:
step S1, the publisher shows the bead-shaking rules;
step S2, the issuing party and each participating party respectively select a random number RiI is a natural number greater than 0, and then the random number R is addediUploading the hash value to the block chain, and sequencing all participants according to the time of uploading the hash value by all participants to generate a sequence table;
step S3, the issuing party and each participating party use the random number RiUploading to a block chain;
step S4, providing random numbers R for the participants and the issuers in the sequence listiCarrying out XOR operation or summation operation, and then carrying out complementation operation on the result of the XOR operation or the summation operation or the hash value of the result and the number of the participants in the sequence table, wherein the numerical value obtained by the complementation operation is the serial number of the participant selected in the round of bead shaking;
step S5, removing the selected participators in the step S4 from the sequence table, updating the sequence table, and then repeating the step S4 to obtain the serial numbers of the participators selected in a new round of bead shaking;
step S6, repeat steps S4 and S5 until the desired number of participants are selected.
2. The blockchain-based bead shaking method of claim 1, wherein the bead shaking particles include a blacklist and a whitelist of participating in bead shaking activities and a number of required participants; before generating the sequence table, firstly verifying whether the participant is in the white list, if not, rejecting the participant, if so, verifying whether the participant is in the black list, if so, rejecting the participant, otherwise, rejecting the participant, if not, determining that the participant is a valid participant, and finally, sorting all valid participants according to the time for uploading the hash value.
3. The blockchain-based bead shaking method according to claim 2, wherein bead shaking is terminated if the number of active participants is not greater than the number of participants required in the bead-shaking procedure; and if the number of the effective participants is larger than the number of the participants required in the bead shaking fine rule, continuing to shake the beads.
4. The blockchain-based bead shaking method of claim 1, wherein the issuing party and each participating party respectively select a random number RiThe specific method comprises the following steps: firstly, the issuing party and each participating party respectively generate a system random number according to the system time, and then the issuing party and each participating party add a personal random number on the basis of the respective system random numbers to form a final random number Ri
5. The blockchain-based bead shaking method according to claim 4, wherein the random numbers R provided to the participant and the issuer in the order list in step S4iBefore carrying out XOR operation or summation operation, the random number R is also subjected toiThe verification is carried out, and the specific verification method comprises the following steps: calculating the random numbers R uploaded by the issuing party and each participating party in the step S3iAnd the random number R uploaded in step S2iThe hash values are compared, if the hash values are the same, the verification is passed, and if the hash values are different, the random number R is provediHas been modified and then the bead shaking is terminated.
6. The blockchain-based bead shaking method of claim 1, wherein the ordinal number of the sequence table is incremented by a difference of 1 starting with a number 0.
7. The blockchain-based bead shaking method of claim 6, wherein the sequence table updating method in step S5 is: firstly, the serial number of the selected participant in step S4 is removed from the sequence table, and then the values of the serial numbers of the subsequent participants are all subtracted by 1 to obtain an updated sequence table.
8. A block chain based bead shaking system, comprising:
the information release module: the system is used for publishing items to be shaken and fine-rules of the shaken beads and disclosing the process and results of the shaken beads;
the information input module: providing a random number generation program and a hash operation program, wherein the issuing party and the participating party can submit the random number and the hash value of the random number through the information input module;
a data processing module: sorting according to data submitted by participants to generate a participant sequence list, and updating the participant sequence list in real time according to the bead shaking process; and calculating the data submitted by the issuing party and the participating party to obtain the selected participating party, and sending the calculation process and result to the information issuing module for displaying.
9. An electronic device, comprising:
a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor when executing the computer program implementing:
the blockchain-based bead shaking method of any one of claims 1 to 7.
10. A computer-readable storage medium, having a computer program stored thereon, the computer program, when executed by a processor, implementing:
the blockchain-based bead shaking method of any one of claims 1 to 7.
CN202010061144.3A 2020-01-19 2020-01-19 Block chain-based bead shaking method and system, electronic device and storage medium Pending CN111311386A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010061144.3A CN111311386A (en) 2020-01-19 2020-01-19 Block chain-based bead shaking method and system, electronic device and storage medium
PCT/CN2020/087662 WO2021142972A1 (en) 2020-01-19 2020-04-29 Blockchain-based rolling-ball lottery method and system, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010061144.3A CN111311386A (en) 2020-01-19 2020-01-19 Block chain-based bead shaking method and system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN111311386A true CN111311386A (en) 2020-06-19

Family

ID=71146838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010061144.3A Pending CN111311386A (en) 2020-01-19 2020-01-19 Block chain-based bead shaking method and system, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN111311386A (en)
WO (1) WO2021142972A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022184137A1 (en) * 2021-03-03 2022-09-09 中国人民银行数字货币研究所 Method and apparatus for generating random numbers in blockchain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615422A (en) * 2018-11-29 2019-04-12 哈希未来(北京)科技有限公司 Competing pumping method, system and storage medium based on block chain
CN110223440A (en) * 2019-06-13 2019-09-10 北京艾摩瑞策科技有限公司 A kind of random number of shaking method and apparatus of application block chain
CN110365479A (en) * 2019-07-11 2019-10-22 湖南天河国云科技有限公司 Random digit generation method and device based on block chain
CN110445603A (en) * 2019-06-28 2019-11-12 成都鹰翔天际科技有限公司 A kind of decentralization random digit generation method
CN110515591A (en) * 2019-08-05 2019-11-29 湖南天河国云科技有限公司 Random digit generation method and device based on block chain

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109360091B (en) * 2018-08-30 2020-09-01 阿里巴巴集团控股有限公司 Random object selection method and device based on block chain
CN110351083A (en) * 2019-07-16 2019-10-18 深圳市网心科技有限公司 Stochastic source generation method, electronic equipment, system and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615422A (en) * 2018-11-29 2019-04-12 哈希未来(北京)科技有限公司 Competing pumping method, system and storage medium based on block chain
CN110223440A (en) * 2019-06-13 2019-09-10 北京艾摩瑞策科技有限公司 A kind of random number of shaking method and apparatus of application block chain
CN110445603A (en) * 2019-06-28 2019-11-12 成都鹰翔天际科技有限公司 A kind of decentralization random digit generation method
CN110365479A (en) * 2019-07-11 2019-10-22 湖南天河国云科技有限公司 Random digit generation method and device based on block chain
CN110515591A (en) * 2019-08-05 2019-11-29 湖南天河国云科技有限公司 Random digit generation method and device based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022184137A1 (en) * 2021-03-03 2022-09-09 中国人民银行数字货币研究所 Method and apparatus for generating random numbers in blockchain

Also Published As

Publication number Publication date
WO2021142972A1 (en) 2021-07-22

Similar Documents

Publication Publication Date Title
US11790456B1 (en) Gamification of renter's/homeowner's insurance products
CN107862782A (en) Drawing method and device based on ether mill block chain
Fritz-Morgenthal et al. Financial risk management and explainable, trustworthy, responsible AI
CN107341730A (en) A kind of method and device that fund is declared using digital draft
Gilman Poverty lawgorithms: a poverty lawyer’s guide to fighting automated decision-making harms on low-income communities
CN111311386A (en) Block chain-based bead shaking method and system, electronic device and storage medium
US11874639B2 (en) Auditor system and method for a building management system environment
Ugland Expanding media law and policy education: Confronting power, defining freedom, awakening participation
US20210264477A1 (en) Determining a nexus score of physical assets using data analysis
CN113610504A (en) Data processing method and device, computer equipment and storage medium
Kovalev et al. Formalization of the software module development using matrix forms
Hundt Making No Secrets About It
Lotfian et al. Auto-filtering validation in citizen science biodiversity monitoring: A case study
US8826166B2 (en) Evaluating and comparing the requirements of a task with the capabilities of an entity
Mitchell et al. Advanced software testing-vol. 3: Guide to the istqb advanced certification as an advanced technical test analyst
Weir et al. Interlinked Computing in 2040: Safety, Truth, Ownership, and Accountability
CN116894133B (en) Project service page display method, device, equipment and computer readable medium
CN116187956B (en) Method and system for generating bidding documents
Flanagan Marketing high tech: lessons for everyone
Nasrul et al. Resolution of Family Disputes in Administration of Estate by Amanah Raya Berhad
Mavetera et al. An investigation of a specific system development methodology for business process reengineering
CN112734389A (en) Human resource management method, system, storage medium and electronic device
Dayasindhu Wipro Infotech's Pivot From Computer Hardware to R&D Services for IT
Nagy The taming of civil society
Srivastava et al. Capacity requirement planning using petri dynamics

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