WO2019036831A1 - Information selection method, apparatus, electronic device and computer-readable storage medium - Google Patents

Information selection method, apparatus, electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2019036831A1
WO2019036831A1 PCT/CN2017/098249 CN2017098249W WO2019036831A1 WO 2019036831 A1 WO2019036831 A1 WO 2019036831A1 CN 2017098249 W CN2017098249 W CN 2017098249W WO 2019036831 A1 WO2019036831 A1 WO 2019036831A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
blockchain
user
block
user information
Prior art date
Application number
PCT/CN2017/098249
Other languages
French (fr)
Chinese (zh)
Inventor
陈敏
Original Assignee
达闼科技成都有限公司
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 达闼科技成都有限公司 filed Critical 达闼科技成都有限公司
Priority to PCT/CN2017/098249 priority Critical patent/WO2019036831A1/en
Priority to CN201780001835.0A priority patent/CN107820690B/en
Publication of WO2019036831A1 publication Critical patent/WO2019036831A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0872Generation of secret information including derivation or calculation of cryptographic keys or passwords using geo-location information, e.g. location data, time, relative position or proximity to other entities

Definitions

  • the present disclosure relates to the field of data processing, and in particular, to an information selection method, apparatus, electronic device, and computer readable storage medium.
  • the "shake” method generally includes: an offline shake and an online shake.
  • the method of shaking the number under the line is generally carried out by using a shake box, or using a computer for on-site extraction to obtain a shake result.
  • the online rocking method is generally based on the set rocking rule, and the shaking result is obtained by the computer.
  • the method of the lottery in the related art cannot be made open and transparent due to the setting of the lottery rule and the announcement of the result of the lottery. Therefore, the fairness and fairness of the lottery cannot be achieved.
  • An object of the present disclosure is to provide an information selection method, apparatus, electronic device, and computer readable storage medium to solve the problems in the related art.
  • the present disclosure provides an information selection method, which is applied to a blockchain node device, and the method includes: acquiring user information of a user participating in information selection;
  • the target information is selected in the user information stored in the blockchain.
  • an information selection apparatus for a blockchain node device, including:
  • An information obtaining module configured to acquire user information of a user participating in the information selection
  • a storage module for storing user information in a blockchain
  • the selecting module is configured to select an algorithm according to information stored in the blockchain, and select target information in the user information stored in the blockchain.
  • a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method of the first aspect described above.
  • an electronic device including:
  • the user information and the selected target information of the participating information selection cannot be falsified, and can not be forged and recorded in the blockchain; the information selection algorithm is stored in the blockchain, and all participants can supervise the information selection. Fair and just.
  • FIG. 1 is a schematic diagram showing a data structure of a block in a blockchain according to an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of an information selection system according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flow chart of an information selection method according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic flow chart of storing user information in a blockchain in an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of storing information selection algorithm information in a blockchain according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of an information selection result announcement by a query method according to an embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart of a gift issuance according to an information selection algorithm according to an embodiment of the present disclosure
  • FIG. 8 is a schematic flowchart of selecting target information in an embodiment of the present disclosure.
  • FIG. 9 is a schematic flow chart of performing a public kindergarten shake number according to an information selection method according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of an information selection apparatus according to an embodiment of the present disclosure.
  • FIG. 11 is a block diagram of an apparatus for an information selection method according to an embodiment of the present disclosure.
  • a blockchain is a decentralized distributed database system in which all node devices in a blockchain network participate in maintenance. It is composed of a series of data blocks generated by cryptography, and each block is a blockchain. One block. According to the order of the generation time, the blocks are linked together in an orderly manner to form a data chain, which is aptly called a blockchain.
  • Block chain node device A node device in a blockchain network may be referred to as a blockchain node device, wherein the blockchain network is based on a P2P (Peer to Peer) network, and each participating transaction and block storage, The verified and forwarded P2P network node devices are all node devices in a blockchain network.
  • P2P Peer to Peer
  • the user identity in the blockchain is represented by a public key, and the private key corresponding to the public key is mastered by the user and not posted to the network.
  • the public key is hashed and encoded to become an "address", the "address” is the account address, represents the user, and can be published at will.
  • Blockchain data writing The blockchain node device writes data to the blockchain by issuing a "transaction" to the blockchain network.
  • the transaction contains the user's use of their private key Easy signature to prove the identity of the user.
  • the transaction is recorded by the “miner” (block chain node device that implements the PoW consensus competition mechanism) into the generated new block, and then released to the blockchain network, and verified and passed by other blockchain node devices, the transaction data is Is written to the blockchain.
  • the shake number can be implemented by means of a smart contract of a blockchain.
  • the block 100 in the blockchain includes a block header 101 and a block body 102.
  • the block body 102 records all transaction information for a period of time before.
  • the block header 101 includes: a parent block hash value, a Merkel root, a time stamp, a random number, and the like.
  • the value of the Merkel root is calculated by hashing the data stored on the entire tree.
  • the leaf node device with the Merkel root as the root node device is used to store account information.
  • the leaf node device 110 is an account node device that stores account information
  • each account node device includes: a transaction number field, an account balance field, a code hash field, a storage root field, and the like.
  • the transaction number field is used to record the number of transactions initiated from the account.
  • the Account Balance field is used to record the account balance for this account.
  • the code hash field is used to record the code hash of the smart contract and point to the smart contract code. If the account is not a smart contract account, the code hash field is empty.
  • the storage root field is the root node device for another tree, which is the internal data storage space for the smart contract account.
  • a smart contract can be deployed on a blockchain by a blockchain node device that is bound to a smart contract account.
  • the deployed smart contract will have its own address on the blockchain.
  • the process of deploying a smart contract that is, the process by which the blockchain node device writes the compiled smart contract call bytecode into a block on the blockchain in the form of a publish transaction. Once the smart contract is deployed, it will be stored in the appropriate block and the contract address will be assigned.
  • a blockchain node device storing a complete blockchain or block header, after determining the address of the smart contract, by time or event driving (for example, executing a corresponding instruction message), the smart contract can be activated, thereby reading Information stored in a smart contract, or information generated after a program that reads a smart contract runs.
  • information in a smart contract can be changed, for example, modified, replaced And delete and so on.
  • Changes to data in smart contracts are achieved through "transactions". In order to ensure information security, only the account with the corresponding change permission can change the information in the smart contract.
  • the following method can be implemented: when the block chain node device requests to read the information in the smart contract, the signature is provided.
  • the signature can be verified in the smart contract, the verification is passed, the smart contract is activated, and the corresponding information is returned to the blockchain node device.
  • the signature may be performed by using the private key of the account bound to the blockchain node device, or may be signed in a pre-negotiated manner.
  • the smart contract in the block of the blockchain includes: a data providing contract for storing user information of the user participating in the information selection, an information selection contract for executing the information selection algorithm, and A listening contract that outputs target information.
  • FIG. 2 is a schematic structural diagram of an information selection system according to an embodiment of the present disclosure.
  • the information selection system includes a plurality of blockchain node devices 201.
  • These blockchain node devices can be implemented in various forms, for example, mobile phones, smart phones, notebook computers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), servers, mining machines. (A device that can perform PoW (Proof Of Work) consensus competition mechanism, etc.).
  • the above data providing contract, information selection contract, and monitoring contract can be deployed to the blockchain through the blockchain node device 201.
  • FIG. 3 is a schematic flowchart diagram of an information selection method according to an embodiment of the present disclosure.
  • step S31 user information of the user participating in the selection of the information is acquired.
  • the user information may include one or more of the following information: identity information of the user, communication information of the user, employee number of the user, invitation number, and the like.
  • identity information of the user for example, may be the user's ID number, passport number, and the like.
  • User communication information For the user's mobile phone number, social account number, etc.
  • the employee's employee number can be the employee number of the company or organization in which the user is located.
  • the invitation number may be a document code uniformly distributed by the organizer for the participation of the information, for example, an 8-digit certificate code.
  • user information of a user can be obtained by:
  • Method 1 The information registration is performed by the information registration end and sent to the blockchain node device.
  • the information registration end can be an electronic device having data processing and communication functions. Registration can be realized by recording and storing user information by means of forms, text records, and the like.
  • the information registration end stops registering the user information.
  • the user information registered by the information registration end is audited through the information review terminal.
  • the information auditing end sends the approved user information to the blockchain node device.
  • the information registration end and the information review end can be the same electronic device.
  • Method 2 The blockchain node device registers as user information as the information registration end. User information is registered as described in the above manner. In some embodiments, the blockchain node device also reviews the registered user information as the information review terminal.
  • step S32 the user information is stored in the blockchain.
  • the block chain node device After the block chain node device obtains the user information, the user information is stored in the block of the blockchain.
  • user information may be stored in a blockchain in a smart contract.
  • the blockchain node device compiles the user information into a smart contract call bytecode and writes the compiled smart contract call bytecode into a block on the blockchain in the form of a publish transaction.
  • all the registered user information is stored in the same smart contract, and the user information may also be stored in different smart contracts.
  • User information can be stored in smart contracts in an array. Smart contracts that store user information provide contracts for data.
  • user information is protected in order to protect the security and privacy of user information.
  • the preset rule is a hash algorithm
  • the user information is converted according to the hash algorithm, and the hash value corresponding to the user information is obtained, and the obtained hash value is stored in the data providing contract.
  • the hash algorithm may be a SHA3 algorithm that converts the identity information, the communication information, and the preset password in the user information into corresponding hash values, and stores the hash value as user information in the data providing contract.
  • storing user information in a blockchain includes:
  • step S41 the user information is converted into a hash value for each user's user information.
  • step S42 the first smart contract call bytecode is obtained according to the hash value corresponding to each user.
  • step S43 the first smart contract call bytecode is sent as transaction data to one or more blockchain node devices in the blockchain network to write the first smart contract call bytecode to the zone.
  • the first smart contract call bytecode is sent as transaction data to one or more blockchain node devices in the blockchain network to write the first smart contract call bytecode to the zone.
  • the zone In a block of blockchain.
  • user information may also be published directly to the blockchain network as a "transaction" by the blockchain node device, thereby enabling storage of user information into the blockchain.
  • the embodiment of the present disclosure can store user information in a blockchain, which can prevent user information from being tampered with and improve information security.
  • the data providing contract may also record more information, such as registration time of user information, adder of user information, and the like.
  • the adder may be an identifier of the information registration end that receives the user information or an identifier of the operator who operates the information registration end.
  • the registration time may be the time at which the user information is registered.
  • a rights account can be set up, and the block chain node device with the rights account can make changes to the user information and deploy the data providing contract.
  • all blockchain node devices can make changes to user information and perform data distribution contract deployment.
  • step S33 the target information is selected from the user information stored in the blockchain according to the information selection algorithm stored in the blockchain.
  • the information selection algorithm is stored in the block in the form of a smart contract.
  • a second smart contract call bytecode is obtained according to the information selection algorithm.
  • the second smart contract call bytecode is sent as transaction data to one or more blockchain node devices in the blockchain network to write the second smart contract call bytecode to the zone.
  • the information selection algorithm is compiled into a smart contract call bytecode.
  • the compiled smart contract call bytecode is written by the blockchain node device into a block of the blockchain by issuing a transaction.
  • a smart contract that stores an information selection algorithm is a contract for information selection.
  • all of the blockchain node devices in the blockchain have information selection rights, and the information selection contract can be activated to perform information selection.
  • the rights information and the information selection algorithm are stored together in an information selection contract.
  • Permission information is used to specify a user with permissions to activate an information selection contract.
  • the control of the information selection authority can be implemented by setting a rights account. That is, the privilege account is set, and the blockchain node device of the privilege account is bound, and the information selection contract can be activated, and the information selection is performed.
  • the information selection algorithm may be: sorting the registration time of the user information; and selecting the user information sorted within the preset range as the target information.
  • the preset range here can be determined according to the target number of target information selected.
  • the information selection algorithm may be: randomly selecting target information in the user information according to a preset random selection algorithm.
  • the random selection algorithm may be: randomly selecting from the user information according to the number of user information and the target number of the target information selected to obtain the target information.
  • the information selection algorithm may be: generating a random number according to a hash value of a block in the blockchain and a generation time of the block, and a target according to the random number and the target information to be selected.
  • the quantity, in the user information stored in the blockchain iteratively selects the target information. When the number of selected target information reaches the target number, the iterative selection ends.
  • each user information corresponds to a weight value, and the weight value is calculated as information.
  • the parameters of the method are used. If the weight value of a user information is 4, the number of user information can be increased from 1 to 4. The weight value of the user information is positively correlated with the probability that the user information is selected.
  • the weight value can be set according to the actual situation. For example, for the mobile phone number in the user information, the weight value can be determined according to the tail number of the mobile phone number, and the weight value of the user information whose tail number is “0” is set to be higher than the tail number. The weight value of the user information of "1".
  • the information selection algorithm in the information selection contract can be flexibly changed according to actual needs, and adapted to different information selection scenarios. After making changes to the information selection algorithm, you can redeploy the changed information to select the contract into the blockchain as described above.
  • the information selection contract including the authority information and the information selection algorithm is stored in the blockchain, the information selection process can be prevented from being manipulated, and the information selection is fair and fair.
  • the information selection algorithm is stored in a smart contract manner, and the information selection algorithm can be flexibly changed according to the applicable scene selected by the information, and redeployed into the blockchain, thereby adapting to different scenarios.
  • the embodiment of the present disclosure further includes storing the target information in the block of the blockchain to prevent the target information from being tampered with, and further ensuring the fairness and fairness of the information selection.
  • the target information is stored in the block of the blockchain and can be implemented by issuing a transaction.
  • the method further includes: after selecting the target information, sending the target information to the destination end, where the destination end includes at least one of the following devices: the electronic device bound by the user participating in the information selection, and the user information is selected.
  • the information selection result may be published in an active publication manner, and the target information is sent to the destination end:
  • a smart contract for outputting target information may be referred to as a listening contract.
  • the listening contract is a contract for outputting target information, and target information that can be output when the target information is received and activated.
  • the output target information includes: sending the target information to the destination end.
  • the query device can receive the query message Information, and according to the query information, obtain the query results.
  • the display device may display the target information to publish the information selection result.
  • the information selection result may be published by using a query method:
  • step S61 the query information sent by the querying device is received.
  • step S62 according to the query information, the selection result of the user to be queried is queried in the block storing the target information.
  • step S63 the queried selection result is sent to the querying device.
  • the query information sent by the querying device may include: user information of the user to be queried.
  • the node device in the blockchain performs a query in the selected target information stored in the block according to the received query information, and returns the query result to the query end.
  • the returned query result may be “already selected”, “admitted”, and the like.
  • the returned query result may be “not selected”, “not admitted”, and the like.
  • the query result sent to the query terminal may also be all the selected user information.
  • the method further includes: when the user acquires the corresponding resource according to the target information, verifying the user information.
  • Resources can be commodities, degrees, license plates, and more. Verification is to query whether the user information is in the selected target information. When the verification passes, the corresponding resources are allocated to the corresponding users.
  • the user information and the selected target information of the participating information selection are not falsified, and are not forged and recorded in the blockchain.
  • the information selection algorithm is publicly released to the blockchain, and all participants can supervise the fairness and fairness of information selection.
  • the information selection algorithm can be flexibly implemented to meet different information selection requirements.
  • a gift is issued according to the above information selection method.
  • step S71 the user conducts a commodity transaction to generate order information.
  • step S72 user information of the user who participated in the selection of the information is acquired according to the commodity transaction information of the user.
  • the gift issuance is based on the user's occurrence of the commodity transaction, and therefore, the user information is the user's order information.
  • the order information includes: the order transaction time, the identity information of the order transaction user or the communication information.
  • step S73 the user information is stored in the blockchain.
  • the merchant's server registers as the information registration terminal with the generated order information.
  • the registration order information is stopped.
  • the blockchain node device adds the order information registered by the merchant's server to the data supply contract of the blockchain. If the merchant's server is a blockchain node device, after compiling the order information into a smart contract call bytecode, the order information is stored in the blockchain by issuing a transaction. If the merchant's server is not a blockchain node device, it sends the order information to a blockchain node device, and the blockchain node device stores the order information in the blockchain.
  • step S74 when the time period is set, the registered order information is filtered to obtain valid order information.
  • the server filters the registered order information to obtain valid order information.
  • the valid order information may be the order information in which the user does not return the goods, or the valid order information is the order information in which the order transaction amount exceeds the preset value.
  • the user information corresponding to the valid order information is followed by the subsequent information selection step.
  • step S75 the algorithm is selected according to the information stored in the blockchain, and the target information is selected in the user information.
  • step S76 gift issuance is performed based on the target information.
  • step S75 includes:
  • step S81 the target number of target information that needs to be selected is determined.
  • step S82 the hash value Hb of the block header of a block in the blockchain is obtained.
  • the hash value of the block header of the previous block when the execution execution information selection contract is activated is obtained.
  • step S83 a random number is acquired according to the equations (1) and (2).
  • sha3 is a hash algorithm
  • Hb is a hash value of the obtained block header
  • % is a remainder operation.
  • the user information in the data providing contract is represented by an array Orders, where Orders.length is the length of the array.
  • User information, N is the target quantity.
  • OrdersI is the number in the array of the last selected user information.
  • step S84 the target information is iteratively selected in the user information stored in the blockchain according to the first to Nth random numbers.
  • step S83 loop iteration is performed until the target number of pieces of user information is selected.
  • the selected user information is stored in the block of the blockchain to prevent it from being changed.
  • the selected user information may be stored in an array. If User A's user information is in an array, it indicates that the user information is selected.
  • the merchant's server may query the blockchain node device for the selected user information. If the service area of the merchant is a blockchain node device, it can obtain the selected user information by activating the information selection contract.
  • the server of the merchant may further display the selected user information or send the reminder information to the user corresponding to the selected user information.
  • the embodiment of the present disclosure can send the gift to the user corresponding to the target information according to the selected target information, so as to ensure fairness and fairness of the gift sending.
  • a public kindergarten shake number is performed according to the above information selection method.
  • step S91 the user information required for the rocking number is acquired.
  • the user information may be the child's ID number, name, date of birth, place of residence information, and the like.
  • the user information of the child can be verified and verified according to the registration conditions of the kindergarten.
  • Registration conditions include: restrictions on the date of birth, restrictions on the place of residence, etc. For example, will be born The date is matched with the birth date limit in the registration conditions, and the date of birth is limited.
  • step S92 the user information is converted and stored in the data providing contract.
  • the data providing contract may be divided into a plurality of data structures, and each data structure is used to store user information corresponding to a kindergarten.
  • a hash value is generated according to the account number and name in the user information: sha3 (account number + name), and the hash value is added to the data provision contract Data Contract B corresponding to the public kindergarten data structure.
  • sha3 account number + name
  • the hash value is added to the data provision contract Data Contract B corresponding to the public kindergarten data structure.
  • all registered user information can also be saved locally for later query of the shake result.
  • step S93 the information selection contract is activated to perform information selection.
  • the registration of new user information is stopped. If there are 10 public kindergartens in the data supply contract, there are a total of 2000 user information. Then, when the lottery starts, the information selection contract can be implemented for each public kindergarten according to the information selection method described in the above embodiment. Each public kindergarten can set its own number of recruitment targets.
  • step S94 the information selection result is published.
  • the information selection contract prohibits anyone from modifying the lottery result data.
  • the relevant institution is notified to announce the result.
  • Conditional places can be combined with third-party applications to directly notify parents of children.
  • the data providing contract and the information selection contract are all in the public blockchain, and the parent parent can query the client through the online program of the relevant institution or the third party public blockchain to query the data of the corresponding contract.
  • the entire lottery process is guaranteed to be open and transparent.
  • the account book When the child is enrolled, the account book is required to regenerate the hash feature value. Only the feature value is eligible for registration in the lottery result. Admission data, shake method and shake number are not available The tampering is permanently stored in the blockchain for later review.
  • an embodiment of the present disclosure further provides an information selection apparatus, which is applied to a blockchain node device, and includes:
  • the information obtaining module 1001 is configured to acquire user information of a user participating in the information selection
  • a storage module 1002 configured to store user information in a blockchain
  • the selecting module 1003 is configured to select an algorithm according to information stored in the blockchain, and select target information in the user information stored in the blockchain.
  • the storage module includes:
  • a conversion submodule configured to convert the user information into a hash value for each user information
  • Obtaining a submodule configured to obtain a first smart contract call bytecode according to a hash value corresponding to each user
  • a transaction sending submodule configured to send the first smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to use the first smart contract call word
  • the section code is written into a block of the blockchain.
  • the selecting module comprises:
  • a random number generation submodule configured to generate a random number according to a hash value of a block in the blockchain and a generation time of the block;
  • the iterative selection sub-module is configured to iteratively select the target information in the user information stored in the blockchain according to the random number and the target number of the target information to be selected.
  • the selecting module comprises:
  • a hash value obtaining module obtaining a hash value of a block header of a block in the blockchain
  • a first random number obtaining module configured to obtain a first random number according to sha3(Hb+Orders.length)%Orders.length;
  • a second random number obtaining module configured to obtain second to Nth random numbers according to sha3(Hb+Orders.length+OrdersI)%Orders.length, where sha3 is a hash algorithm; Hb is a obtained block The hash value of the block header; Orders.length is the length of the array storing the user information Degrees; OrdersI is the number of the last selected user information in the array; N is the target number of user information to be selected; % is the remainder operation;
  • a selecting module configured to iteratively select the target information in the user information stored in the blockchain according to the first to Nth random numbers.
  • the apparatus further includes:
  • the information sending module is configured to: after the target information is selected, send the target information to the destination end, where the destination end includes at least one of the following devices: an electronic device bound by a user participating in the information selection, The electronic device to which the user information is selected is bound, the configured query device, and the display device.
  • the apparatus further includes:
  • a target information storage module configured to store the target information in a block of a blockchain.
  • the apparatus further includes:
  • the receiving module is configured to receive the query information sent by the querying device, where the query information includes: user information of the user to be queried;
  • a querying module configured to query, according to the query information, a selection result of the user to be queried in a block in which the target information is stored;
  • the query result sending module is configured to send the selected result of the query to the querying device.
  • the apparatus further includes:
  • the target information writing module is configured to, after selecting the target information, write the target information as a parameter into a smart contract for outputting the target information.
  • the apparatus further includes:
  • An obtaining module configured to acquire a second smart contract call byte code according to the information selection algorithm
  • a transaction sending module configured to send the second smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to invoke the second smart contract call byte
  • the code is written into a block of the blockchain.
  • the embodiment of the present disclosure further provides a computer readable storage medium having stored thereon a computer program, the program being executed by the processor to implement the step of the information selection method.
  • An embodiment of the present disclosure further provides an electronic device comprising: the computer readable storage medium described above; and one or more processors for executing a program in the computer readable storage medium.
  • the apparatus may be provided as a block chain node device including at least a processor 1101, a memory 1102, and a communication component 1103.
  • the memory 1102 is configured to store operating systems, various types of data to support operations at the blockchain node device, such as may include any application or method for operating on the blockchain node device. Instructions, as well as application-related data.
  • the memory 1102 also stores block header information or block header information in which a block chain is stored.
  • the processor 1101 is configured to control overall operations of the blockchain node device, perform information processing, and the like. In an embodiment of the present disclosure, the processor 1101 can control the operation of smart contracts in the blocks in the blockchain.
  • the communication component 1103 is used for wired or wireless communication between the blockchain node device and other devices.
  • Wireless communication such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G or 5G, or a combination of one or more of them, so that the corresponding communication component 312 can Including: Wi-Fi module, Bluetooth module, NFC module, 2G module, 3G module, 4G module or 5G module, or a combination of one or several of them.
  • the blockchain node device can establish a communication connection with the information registration end, the information review end, the destination end, and the like.
  • the blockchain node device may also include multimedia components (eg, touch screen, microphone, speakers, etc.) and input/output interfaces, etc., to implement corresponding functions.
  • multimedia components eg, touch screen, microphone, speakers, etc.
  • input/output interfaces etc.

Abstract

An information selection method, an apparatus, an electronic device and a computer-readable storage medium, the method comprising : acquiring user information of a user participating in information selection (S31); storing the user information in a blockchain (S32); according to an information selection algorithm stored in the blockchain, selecting target information from the user information stored in the blockchain (S33). Using the present method, information of a user participating in information selection and selected target information are recorded in a blockchain in a manner such that they cannot be tampered with and cannot be counterfeited, enabling all participants to monitor fairness and impartiality of the information selection.

Description

信息选取方法、装置、电子设备及计算机可读存储介质Information selection method, device, electronic device and computer readable storage medium 技术领域Technical field
本公开涉及数据处理领域,具体地,涉及一种信息选取方法、装置、电子设备及计算机可读存储介质。The present disclosure relates to the field of data processing, and in particular, to an information selection method, apparatus, electronic device, and computer readable storage medium.
背景技术Background technique
在进行资源(例如,车牌、房屋、学位等)分配时,通过“摇号”的方式可以保证公平和公正。“摇号”方式一般包括:线下摇号和线上摇号。In the allocation of resources (for example, license plates, houses, degrees, etc.), fairness and justice can be guaranteed by means of "shake". The "shake" method generally includes: an offline shake and an online shake.
线下摇号方式,一般采用摇号箱抽取,或利用计算机进行现场抽取等获取摇号结果。线上摇号方式,一般是根据设定好的摇号规则,通过计算机对参摇者进行抽取获取摇号结果。The method of shaking the number under the line is generally carried out by using a shake box, or using a computer for on-site extraction to obtain a shake result. The online rocking method is generally based on the set rocking rule, and the shaking result is obtained by the computer.
相关技术中的摇号方式,由于摇号规则的设置、摇号结果的公布等都不能做到公开透明,因此,不能做到摇号的公平公正。The method of the lottery in the related art cannot be made open and transparent due to the setting of the lottery rule and the announcement of the result of the lottery. Therefore, the fairness and fairness of the lottery cannot be achieved.
发明内容Summary of the invention
本公开的目的是提供一种信息选取方法、装置、电子设备及计算机可读存储介质,以解决相关技术中存在的问题。An object of the present disclosure is to provide an information selection method, apparatus, electronic device, and computer readable storage medium to solve the problems in the related art.
为了实现上述目的,第一方面,本公开提供一种信息选取方法,应用于区块链节点设备,所述方法包括:获取参与信息选取的用户的用户信息;In order to achieve the above object, in a first aspect, the present disclosure provides an information selection method, which is applied to a blockchain node device, and the method includes: acquiring user information of a user participating in information selection;
将用户信息存储到区块链中;Store user information in a blockchain;
根据区块链中存储的信息选取算法,在存储到区块链中的所述用户信息中选取出目标信息。According to the information selection algorithm stored in the blockchain, the target information is selected in the user information stored in the blockchain.
第二方面,提供一种信息选取装置,应用于区块链节点设备,包括:In a second aspect, an information selection apparatus is provided for a blockchain node device, including:
信息获取模块,用于获取参与信息选取的用户的用户信息;An information obtaining module, configured to acquire user information of a user participating in the information selection;
存储模块,用于将用户信息存储到区块链中; a storage module for storing user information in a blockchain;
选取模块,用于根据区块链中存储的信息选取算法,在存储到区块链中的所述用户信息中选取出目标信息。The selecting module is configured to select an algorithm according to information stored in the blockchain, and select target information in the user information stored in the blockchain.
第三方面,提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述第一方面所述方法的步骤。In a third aspect, a computer readable storage medium is provided having stored thereon a computer program that, when executed by a processor, implements the steps of the method of the first aspect described above.
第四方面,提供一种电子设备,包括:In a fourth aspect, an electronic device is provided, including:
上述第三方面所述的计算机可读存储介质;以及The computer readable storage medium of the above third aspect;
一个或者多个处理器,用于执行所述计算机可读存储介质中的程序One or more processors for executing a program in the computer readable storage medium
通过上述技术方案,将参与信息选取的用户信息和选取出的目标信息不可篡改,不可伪造的记录到区块链中;信息选取算法存储于区块链中,所有参与者都可以监督信息选取的公平与公正。Through the above technical solution, the user information and the selected target information of the participating information selection cannot be falsified, and can not be forged and recorded in the blockchain; the information selection algorithm is stored in the blockchain, and all participants can supervise the information selection. Fair and just.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description which follows.
附图说明DRAWINGS
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:The drawings are intended to provide a further understanding of the disclosure, and are in the In the drawing:
图1是本公开一实施例的区块链中的区块的数据结构示意图;1 is a schematic diagram showing a data structure of a block in a blockchain according to an embodiment of the present disclosure;
图2是本公开一实施例的信息选取系统的结构示意图;2 is a schematic structural diagram of an information selection system according to an embodiment of the present disclosure;
图3是本公开一实施例的信息选取方法的流程示意图;3 is a schematic flow chart of an information selection method according to an embodiment of the present disclosure;
图4是本公开的一实施例中,将用户信息存储到区块链中的流程示意图;4 is a schematic flow chart of storing user information in a blockchain in an embodiment of the present disclosure;
图5是本公开的一实施例中,将信息选取算法息存储到区块链中的流程示意图;FIG. 5 is a schematic flowchart of storing information selection algorithm information in a blockchain according to an embodiment of the present disclosure; FIG.
图6是本公开一实施例通过查询方式进行信息选取结果公布的流程示意图;6 is a schematic flowchart of an information selection result announcement by a query method according to an embodiment of the present disclosure;
图7是本公开一实施例中,根据信息选取算法进行礼品发放的流程示意图;FIG. 7 is a schematic flowchart of a gift issuance according to an information selection algorithm according to an embodiment of the present disclosure; FIG.
图8是本公开一实施例中,选取目标信息的流程示意图; FIG. 8 is a schematic flowchart of selecting target information in an embodiment of the present disclosure; FIG.
图9是本公开的一实施例中,根据信息选取方法进行公立幼儿园摇号的流程示意图;9 is a schematic flow chart of performing a public kindergarten shake number according to an information selection method according to an embodiment of the present disclosure;
图10是本公开一实施例的信息选取装置示意图;FIG. 10 is a schematic diagram of an information selection apparatus according to an embodiment of the present disclosure; FIG.
图11是本公开一实施例用于信息选取方法的装置的框图。11 is a block diagram of an apparatus for an information selection method according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。The specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are not to be construed
在对本公开提供的信息选取方法、装置、电子设备及计算机可读存储介质进行说明之前,先对本公开各个实施例所涉及的区块链进行介绍。Before describing the information selection method, device, electronic device and computer readable storage medium provided by the present disclosure, the blockchains involved in various embodiments of the present disclosure are first introduced.
区块链是由区块链网络中所有节点设备共同参与维护的去中心化分布式数据库系统,它是由一系列基于密码学方法产生的数据块组成,每个数据块即为区块链中的一个区块。根据产生时间的先后顺序,区块被有序地链接在一起,形成一个数据链条,被形象地称为区块链。下面对区块链网络的一些概念进行介绍。A blockchain is a decentralized distributed database system in which all node devices in a blockchain network participate in maintenance. It is composed of a series of data blocks generated by cryptography, and each block is a blockchain. One block. According to the order of the generation time, the blocks are linked together in an orderly manner to form a data chain, which is aptly called a blockchain. Some concepts of the blockchain network are introduced below.
区块链节点设备:区块链网络中的节点设备可以称为区块链节点设备,其中区块链网络基于P2P(Peer to Peer,对等网络)网络,每个参与交易和区块存储、验证、转发的P2P网络节点设备都是一个区块链网络中的节点设备。Block chain node device: A node device in a blockchain network may be referred to as a blockchain node device, wherein the blockchain network is based on a P2P (Peer to Peer) network, and each participating transaction and block storage, The verified and forwarded P2P network node devices are all node devices in a blockchain network.
用户身份:区块链中的用户身份使用公钥表示,公钥所对应的私钥由用户掌握而不发布到网络。在一些实施例中,公钥通过哈希和编码后成为“地址”,“地址”即为账户地址,代表了用户,并可随意发布。用户身份和区块链节点设备不存在一一对应关系,用户可以在任意一个区块链节点设备上使用自己的私钥。User identity: The user identity in the blockchain is represented by a public key, and the private key corresponding to the public key is mastered by the user and not posted to the network. In some embodiments, the public key is hashed and encoded to become an "address", the "address" is the account address, represents the user, and can be published at will. There is no one-to-one correspondence between the user identity and the blockchain node device. The user can use his own private key on any blockchain node device.
区块链数据写入:区块链节点设备通过向区块链网络发布“交易”(Transaction)实现向区块链写入数据。交易中包含用户使用自己私钥对交 易的签名,以证明用户的身份。交易被“矿工”(执行PoW共识竞争机制的区块链节点设备)记录入产生的新区块,然后发布到区块链网络,并被其他区块链节点设备验证通过和接受后,交易数据即被写入区块链。Blockchain data writing: The blockchain node device writes data to the blockchain by issuing a "transaction" to the blockchain network. The transaction contains the user's use of their private key Easy signature to prove the identity of the user. The transaction is recorded by the “miner” (block chain node device that implements the PoW consensus competition mechanism) into the generated new block, and then released to the blockchain network, and verified and passed by other blockchain node devices, the transaction data is Is written to the blockchain.
在本公开的一实施例中,可通过区块链的智能合约的方式,实现摇号。In an embodiment of the present disclosure, the shake number can be implemented by means of a smart contract of a blockchain.
参见图1,为本公开一实施例的区块链中的区块的数据结构示意图。区块链中的区块100包括:区块头101和区块主体102。区块主体102记录前一段时间内的所有交易信息。区块头101包括:父区块哈希值、默克尔树根、时间戳、随机数等字段。1 is a schematic diagram of a data structure of a block in a blockchain according to an embodiment of the present disclosure. The block 100 in the blockchain includes a block header 101 and a block body 102. The block body 102 records all transaction information for a period of time before. The block header 101 includes: a parent block hash value, a Merkel root, a time stamp, a random number, and the like.
其中,默克尔树根的值是对整棵树上保存的数据进行哈希(hash)计算得出的。以默克尔树根为根节点设备的叶节点设备用于存储账户信息。Among them, the value of the Merkel root is calculated by hashing the data stored on the entire tree. The leaf node device with the Merkel root as the root node device is used to store account information.
参见图1,叶节点设备110即为一存储账户信息的账户节点设备,每个账户节点设备中包括:交易数字段、账户余额字段、代码哈希字段、存储根字段等。其中,交易数字段用于记录从账户发起的交易数。账户余额字段用于记录该账户的账户余额。代码哈希字段用于记录智能合约的代码哈希值,并指向智能合约代码。如果账户不是智能合约账户,则代码哈希字段为空。存储根字段是用于另一颗树的根节点设备,该树为智能合约账户的内部数据存储空间。Referring to FIG. 1, the leaf node device 110 is an account node device that stores account information, and each account node device includes: a transaction number field, an account balance field, a code hash field, a storage root field, and the like. The transaction number field is used to record the number of transactions initiated from the account. The Account Balance field is used to record the account balance for this account. The code hash field is used to record the code hash of the smart contract and point to the smart contract code. If the account is not a smart contract account, the code hash field is empty. The storage root field is the root node device for another tree, which is the internal data storage space for the smart contract account.
智能合约可被绑定了智能合约账户的区块链节点设备部署在区块链上,部署好的智能合约会在区块链上拥有“自己的地址”。部署智能合约的过程,即区块链节点设备将编译好的智能合约调用字节码通过发布交易的形式写入到区块链上的一区块中的过程。智能合约被部署后,将被存储到相应的区块中,并分配合约地址。A smart contract can be deployed on a blockchain by a blockchain node device that is bound to a smart contract account. The deployed smart contract will have its own address on the blockchain. The process of deploying a smart contract, that is, the process by which the blockchain node device writes the compiled smart contract call bytecode into a block on the blockchain in the form of a publish transaction. Once the smart contract is deployed, it will be stored in the appropriate block and the contract address will be assigned.
存储有完整的区块链或区块头的区块链节点设备,确定智能合约的地址后,通过时间或事件驱动(例如,执行相应的指令消息),可激活智能合约,由此,读取到智能合约中存储的相关信息,或读取到智能合约的程序运行后生成的信息。A blockchain node device storing a complete blockchain or block header, after determining the address of the smart contract, by time or event driving (for example, executing a corresponding instruction message), the smart contract can be activated, thereby reading Information stored in a smart contract, or information generated after a program that reads a smart contract runs.
本公开的一实施例中,智能合约中的信息可被更改,例如,修改、替换 和删除等。对智能合约中数据的更改通过“交易”的方式实现。为了保证信息安全,只有具有相应的更改权限的账户才能对智能合约中的信息进行更改。In an embodiment of the present disclosure, information in a smart contract can be changed, for example, modified, replaced And delete and so on. Changes to data in smart contracts are achieved through "transactions". In order to ensure information security, only the account with the corresponding change permission can change the information in the smart contract.
对于智能合约的读权限控制,可采用如下方式实现:区块链节点设备请求读取智能合约中的信息时,提供签名。该签名可在智能合约中进行验证,验证通过,才激活智能合约,并返回相应信息给区块链节点设备。签名可采用区块链节点设备所绑定的账户的私钥进行,也可采用预先协商好的方式进行签名。For the read permission control of the smart contract, the following method can be implemented: when the block chain node device requests to read the information in the smart contract, the signature is provided. The signature can be verified in the smart contract, the verification is passed, the smart contract is activated, and the corresponding information is returned to the blockchain node device. The signature may be performed by using the private key of the account bound to the blockchain node device, or may be signed in a pre-negotiated manner.
同时,还可以叠加采用私有链或许可链作为智能合约的区块链基础平台,进一步提高读权限的控制。即只有绑定有经过许可或认证的账户的区块链节点设备才能组成区块链网络,形成私有链或许可链,从而进一步保证了智能合约的安全性,提高网络安全性。At the same time, it is also possible to superimpose the use of a private chain or a license chain as a blockchain base platform for smart contracts, further improving the control of read permissions. That is, only the blockchain node device with the licensed or authenticated account can form a blockchain network to form a private chain or a license chain, thereby further ensuring the security of the smart contract and improving the network security.
在本公开的实施例中,区块链的区块中的智能合约包括:用于存储参与信息选取的用户的用户信息的数据提供合约、用于执行信息选取算法的信息选取合约,以及用于输出目标信息的监听合约。In an embodiment of the present disclosure, the smart contract in the block of the blockchain includes: a data providing contract for storing user information of the user participating in the information selection, an information selection contract for executing the information selection algorithm, and A listening contract that outputs target information.
参见图2,为本公开一实施例的信息选取系统的结构示意图。2 is a schematic structural diagram of an information selection system according to an embodiment of the present disclosure.
信息选取系统包括多个区块链节点设备201。这些区块链节点设备可以各种形式来实施,例如,可以为手机、智能电话、笔记本电脑、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、服务器、矿机(即可执行PoW(Proof Of Work,工作证明)共识竞争机制的设备)等。The information selection system includes a plurality of blockchain node devices 201. These blockchain node devices can be implemented in various forms, for example, mobile phones, smart phones, notebook computers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), servers, mining machines. (A device that can perform PoW (Proof Of Work) consensus competition mechanism, etc.).
上述数据提供合约、信息选取合约,以及监听合约,可通过区块链节点设备201部署到区块链中。The above data providing contract, information selection contract, and monitoring contract can be deployed to the blockchain through the blockchain node device 201.
参见图3,为本公开一实施例的信息选取方法的流程示意图。FIG. 3 is a schematic flowchart diagram of an information selection method according to an embodiment of the present disclosure.
在步骤S31中,获取参与信息选取的用户的用户信息。In step S31, user information of the user participating in the selection of the information is acquired.
在本公开的一实施例中,用户信息可包括以下信息中的一者或多者:用户的身份信息、用户的通讯信息、用户的员工编号、邀请编号等。用户的身份信息,例如,可为用户的身份证号码、护照号码等。用户的通信信息,可 为用户的手机号码、社交账号等。用户的员工编号可为用户所在公司或相关组织的员工编号。邀请编号可为由摇号主办方统一发布的,用于参与信息选取的凭证码,例如,8位数字组成的凭证码。In an embodiment of the present disclosure, the user information may include one or more of the following information: identity information of the user, communication information of the user, employee number of the user, invitation number, and the like. The identity information of the user, for example, may be the user's ID number, passport number, and the like. User communication information, For the user's mobile phone number, social account number, etc. The employee's employee number can be the employee number of the company or organization in which the user is located. The invitation number may be a document code uniformly distributed by the organizer for the participation of the information, for example, an 8-digit certificate code.
在本公开的实施例中,可通过以下方式获取用户的用户信息:In an embodiment of the present disclosure, user information of a user can be obtained by:
方式一:由信息登记端,对用户信息进行登记,并发送给区块链节点设备。Method 1: The information registration is performed by the information registration end and sent to the blockchain node device.
信息登记端可为具有数据处理和通信功能的电子设备。登记,可通过表格、文字记录等方式对用户信息进行记录和存储来实现。The information registration end can be an electronic device having data processing and communication functions. Registration can be realized by recording and storing user information by means of forms, text records, and the like.
在一个实施例中,当设定的时间到时,或获取的用户信息的数量达到设定值时,信息登记端停止进行用户信息的登记。In one embodiment, when the set time expires, or the number of acquired user information reaches the set value, the information registration end stops registering the user information.
在一个实施例中,进一步,通过信息审核端,对信息登记端登记的用户信息进行审核。信息审核端将审核通过的用户信息发送给区块链节点设备。信息登记端和信息审核端可为同一电子设备。In an embodiment, further, the user information registered by the information registration end is audited through the information review terminal. The information auditing end sends the approved user information to the blockchain node device. The information registration end and the information review end can be the same electronic device.
方式二:区块链节点设备作为信息登记端,对用户信息进行登记。如上述方式一所述,对用户信息进行登记。在一些实施例中,区块链节点设备还作为上述信息审核端,对登记的用户信息进行审核。Method 2: The blockchain node device registers as user information as the information registration end. User information is registered as described in the above manner. In some embodiments, the blockchain node device also reviews the registered user information as the information review terminal.
在步骤S32中,将用户信息存储到区块链中。In step S32, the user information is stored in the blockchain.
区块链节点设备获取到用户信息后,将用户信息存储到区块链的区块中。After the block chain node device obtains the user information, the user information is stored in the block of the blockchain.
在本公开的一实施例中,可将用户信息以智能合约的方式存储到区块链中。区块链节点设备将用户信息编译为智能合约调用字节码,并将编译好的智能合约调用字节码通过发布交易的形式写入到区块链上的一区块中。在本公开的实施例中,将登记的所有用户信息存储到同一智能合约中,也可将用户信息分别存储到不同的智能合约中。In an embodiment of the present disclosure, user information may be stored in a blockchain in a smart contract. The blockchain node device compiles the user information into a smart contract call bytecode and writes the compiled smart contract call bytecode into a block on the blockchain in the form of a publish transaction. In the embodiment of the present disclosure, all the registered user information is stored in the same smart contract, and the user information may also be stored in different smart contracts.
用户信息可以数组的方式存储到智能合约中。存储有用户信息的智能合约为数据提供合约。User information can be stored in smart contracts in an array. Smart contracts that store user information provide contracts for data.
在本公开的一实施例中,为了保护用户信息的安全和隐私,将用户信息 按照预设规则进行转换后,再存储到区块链的区块中。在一个实施例中,预设规则为哈希算法,则将用户信息按照哈希算法进行转换后,得到用户信息对应的哈希值,并将得到的哈希值存储到数据提供合约中。例如,哈希算法可为SHA3算法,将用户信息中的身份信息、通讯信息和预设口令转换为对应的哈希值,并将该哈希值作为用户信息存储到数据提供合约中。In an embodiment of the present disclosure, user information is protected in order to protect the security and privacy of user information. After the conversion according to the preset rules, it is stored in the block of the blockchain. In one embodiment, the preset rule is a hash algorithm, and the user information is converted according to the hash algorithm, and the hash value corresponding to the user information is obtained, and the obtained hash value is stored in the data providing contract. For example, the hash algorithm may be a SHA3 algorithm that converts the identity information, the communication information, and the preset password in the user information into corresponding hash values, and stores the hash value as user information in the data providing contract.
参见图4,在本公开的一实施例中,将用户信息存储到区块链中,包括:Referring to FIG. 4, in an embodiment of the present disclosure, storing user information in a blockchain includes:
在步骤S41中,对于每个用户的用户信息,将该用户信息转换为哈希值。In step S41, the user information is converted into a hash value for each user's user information.
在步骤S42中,根据每个用户对应的哈希值,获取第一智能合约调用字节码。In step S42, the first smart contract call bytecode is obtained according to the hash value corresponding to each user.
在步骤S43中,将第一智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将第一智能合约调用字节码写入到区块链的一区块中。In step S43, the first smart contract call bytecode is sent as transaction data to one or more blockchain node devices in the blockchain network to write the first smart contract call bytecode to the zone. In a block of blockchain.
在一些实施例中,也可由区块链节点设备直接将用户信息作为“交易”发布到区块链网络,由此,实现将用户信息存储到区块链中。In some embodiments, user information may also be published directly to the blockchain network as a "transaction" by the blockchain node device, thereby enabling storage of user information into the blockchain.
由此,本公开实施例可将用户信息存储到区块链中,可以防止用户信息被篡改,提高信息安全性。Thus, the embodiment of the present disclosure can store user information in a blockchain, which can prevent user information from being tampered with and improve information security.
在本公开的实施例中,除了用户信息,数据提供合约还可以记录更多的信息,例如,用户信息的登记时间、用户信息的添加者等。添加者,可为接收用户信息的信息登记端的标识或操作该信息登记端的操作者的标识。登记时间可为用户信息被登记的时刻。In an embodiment of the present disclosure, in addition to user information, the data providing contract may also record more information, such as registration time of user information, adder of user information, and the like. The adder may be an identifier of the information registration end that receives the user information or an identifier of the operator who operates the information registration end. The registration time may be the time at which the user information is registered.
在一个实施例中,可设置一权限账户,具有权限账户的区块链节点设备可对用户信息进行更改,以及进行数据提供合约的部署。在一些实施例中,也可以不作任何限制,所有的区块链节点设备都可以对用户信息进行更改,以及进行数据提供据合约的部署。In one embodiment, a rights account can be set up, and the block chain node device with the rights account can make changes to the user information and deploy the data providing contract. In some embodiments, without limitation, all blockchain node devices can make changes to user information and perform data distribution contract deployment.
在步骤S33中,根据区块链中存储的信息选取算法,在存储到区块链中的用户信息中选取出目标信息。In step S33, the target information is selected from the user information stored in the blockchain according to the information selection algorithm stored in the blockchain.
在本公开的一实施例中,信息选取算法以智能合约的方式存储在区块 链的区块中。参见图5,在步骤S51中,根据信息选取算法,获取第二智能合约调用字节码。在步骤S52中,将第二智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将第二智能合约调用字节码写入到区块链的一区块中。由此,信息选取算法被编译为智能合约调用字节码。编译好的智能合约调用字节码,被区块链节点设备通过发布交易的形式写入到区块链的一区块中。存储有信息选取算法的智能合约为信息选取合约。In an embodiment of the present disclosure, the information selection algorithm is stored in the block in the form of a smart contract. In the block of the chain. Referring to FIG. 5, in step S51, a second smart contract call bytecode is obtained according to the information selection algorithm. In step S52, the second smart contract call bytecode is sent as transaction data to one or more blockchain node devices in the blockchain network to write the second smart contract call bytecode to the zone. In a block of blockchain. Thus, the information selection algorithm is compiled into a smart contract call bytecode. The compiled smart contract call bytecode is written by the blockchain node device into a block of the blockchain by issuing a transaction. A smart contract that stores an information selection algorithm is a contract for information selection.
在一些实施例中,区块链中的所有区块链节点设备均具有信息选取权限,可激活信息选取合约,执行信息选取。In some embodiments, all of the blockchain node devices in the blockchain have information selection rights, and the information selection contract can be activated to perform information selection.
在一些实施例中,将权限信息和信息选取算法一起存储到信息选取合约中。权限信息用于指定具有权限的用户才能激活信息选取合约。在本公开的实施例中,可通过设置权限账户的方式实现信息选取权限的控制。即设置权限账户,绑定了权限账户的区块链节点设备,可激活信息选取合约,执行信息选取。In some embodiments, the rights information and the information selection algorithm are stored together in an information selection contract. Permission information is used to specify a user with permissions to activate an information selection contract. In the embodiment of the present disclosure, the control of the information selection authority can be implemented by setting a rights account. That is, the privilege account is set, and the blockchain node device of the privilege account is bound, and the information selection contract can be activated, and the information selection is performed.
信息选取合约被激活后,根据信息选取合约中的信息选取算法对用户信息进行选取。在一个实施例中,信息选取算法可为:将用户信息的登记时间进行排序;将排序在预设范围内的用户信息,选取为目标信息。这里的预设范围可根据需要选取的目标信息的目标数量确定。After the information selection contract is activated, the user information is selected according to the information selection algorithm in the information selection contract. In an embodiment, the information selection algorithm may be: sorting the registration time of the user information; and selecting the user information sorted within the preset range as the target information. The preset range here can be determined according to the target number of target information selected.
在另一个实施例中,信息选取算法可为:根据预设的随机选择算法,在用户信息中随机选取出目标信息。随机选择算法可为:根据用户信息的数量和需要选取出的目标信息的目标数量,从用户信息中进行随机选取,得到目标信息。In another embodiment, the information selection algorithm may be: randomly selecting target information in the user information according to a preset random selection algorithm. The random selection algorithm may be: randomly selecting from the user information according to the number of user information and the target number of the target information selected to obtain the target information.
在一个实施例中,信息选取算法可为:根据区块链中一区块的哈希值和该区块的产生时间,生成随机数,以及,根据随机数和需选取出的目标信息的目标数量,在存储到区块链中的用户信息中,迭代选取出目标信息。当选取的目标信息的数量达到目标数量时,迭代选取结束。In an embodiment, the information selection algorithm may be: generating a random number according to a hash value of a block in the blockchain and a generation time of the block, and a target according to the random number and the target information to be selected. The quantity, in the user information stored in the blockchain, iteratively selects the target information. When the number of selected target information reaches the target number, the iterative selection ends.
在一个实施例中,每个用户信息对应一权重值,权重值作为信息选取算 法的参数使用。若一用户信息的权重值为4,则可将该用户信息的数量从1增加为4。用户信息的权重值与该用户信息被选取到的概率正相关。In one embodiment, each user information corresponds to a weight value, and the weight value is calculated as information. The parameters of the method are used. If the weight value of a user information is 4, the number of user information can be increased from 1 to 4. The weight value of the user information is positively correlated with the probability that the user information is selected.
权重值可根据实际情况进行设置,例如,对于用户信息中的手机号码,可根据手机号码的尾号来确定权重值,将尾号为“0”的用户信息的权重值设置为高于尾号为“1”的用户信息的权重值。The weight value can be set according to the actual situation. For example, for the mobile phone number in the user information, the weight value can be determined according to the tail number of the mobile phone number, and the weight value of the user information whose tail number is “0” is set to be higher than the tail number. The weight value of the user information of "1".
在本公开的实施例中,信息选取合约中的信息选取算法可根据实际需求进行灵活更改,适应不同的信息选取场景。对信息选取算法进行更改后,可按照上述方式,重新部署更改后的信息选取合约到区块链中。In the embodiment of the present disclosure, the information selection algorithm in the information selection contract can be flexibly changed according to actual needs, and adapted to different information selection scenarios. After making changes to the information selection algorithm, you can redeploy the changed information to select the contract into the blockchain as described above.
在本公开的实施例中,由于包括了权限信息和信息选取算法的信息选取合约存储到了区块链中,可防止信息选取过程被操控,保证信息选取的公正和公平。另一方面,通过智能合约的方式存储信息选取算法,可灵活根据信息选取的适用场景,对信息选取算法进行更改,并重新部署到区块链中,从而可适应不同的场景。In the embodiment of the present disclosure, since the information selection contract including the authority information and the information selection algorithm is stored in the blockchain, the information selection process can be prevented from being manipulated, and the information selection is fair and fair. On the other hand, the information selection algorithm is stored in a smart contract manner, and the information selection algorithm can be flexibly changed according to the applicable scene selected by the information, and redeployed into the blockchain, thereby adapting to different scenarios.
获取到目标信息后,本公开实施例还包括,将目标信息存储到区块链的区块中,以防止目标信息被篡改,进一步保证信息选取的公平和公正。将目标信息存储到区块链的区块中,可通过发布交易的方式实现。After obtaining the target information, the embodiment of the present disclosure further includes storing the target information in the block of the blockchain to prevent the target information from being tampered with, and further ensuring the fairness and fairness of the information selection. The target information is stored in the block of the blockchain and can be implemented by issuing a transaction.
在一个实施例中,还包括:当选取出目标信息后,将目标信息发送给目的端,目的端包括以下设备中的至少一者:参与信息选取的用户所绑定的电子设备,用户信息被选取的用户所绑定的电子设备,被配置的查询设备,显示设备。In an embodiment, the method further includes: after selecting the target information, sending the target information to the destination end, where the destination end includes at least one of the following devices: the electronic device bound by the user participating in the information selection, and the user information is selected. The electronic device to which the user is bound, the configured device to query, and the display device.
在本公开的一实施例中,可采用主动公布方式公布信息选取结果,将目标信息发送给目的端:In an embodiment of the present disclosure, the information selection result may be published in an active publication manner, and the target information is sent to the destination end:
当信息选取合约被激活,选取出目标信息后,将目标信息作为参数,写入到用于输出目标信息的智能合约中。用于输出目标信息的智能合约,例如,可称为监听合约。监听合约为用于输出目标信息的合约,当接收到目标信息且被激活时,可输出的目标信息。输出目标信息包括:将目标信息发送给上述目的端。当目标信息被发送给配置的查询设备时,查询设备可接收查询信 息,并根据查询信息,获取查询结果。当目标信息被发送给配置的显示设备时,显示设备可显示目标信息,以公布信息选取结果。When the information selection contract is activated, the target information is selected, and the target information is written as a parameter to the smart contract for outputting the target information. A smart contract for outputting target information, for example, may be referred to as a listening contract. The listening contract is a contract for outputting target information, and target information that can be output when the target information is received and activated. The output target information includes: sending the target information to the destination end. When the target information is sent to the configured query device, the query device can receive the query message Information, and according to the query information, obtain the query results. When the target information is transmitted to the configured display device, the display device may display the target information to publish the information selection result.
在本公开的另一实施例中,可采用查询方式公布信息选取结果:In another embodiment of the present disclosure, the information selection result may be published by using a query method:
参见图6,在步骤S61中,接收查询设备发送的查询信息。在步骤S62中,根据查询信息,在存储目标信息的区块中查询待查询用户的选取结果。在步骤S63中,将查询到的选取结果发送给查询设备。Referring to FIG. 6, in step S61, the query information sent by the querying device is received. In step S62, according to the query information, the selection result of the user to be queried is queried in the block storing the target information. In step S63, the queried selection result is sent to the querying device.
在一个实施例中,查询设备发送的查询信息可包括:待查询用户的用户信息。区块链中的节点设备,根据接收到的查询信息,在区块中存储的被选取的目标信息中进行查询,并将查询结果返回给查询端。当待查询用户的用户信息在被选取的目标信息中时,返回的查询结果可为“已被选取”、“录取”等。当待查询用户的用户信息未在被选取的目标信息中时,返回的查询结果可为“未选取”、“未录取”等。In an embodiment, the query information sent by the querying device may include: user information of the user to be queried. The node device in the blockchain performs a query in the selected target information stored in the block according to the received query information, and returns the query result to the query end. When the user information of the user to be queried is in the selected target information, the returned query result may be “already selected”, “admitted”, and the like. When the user information of the user to be queried is not in the selected target information, the returned query result may be “not selected”, “not admitted”, and the like.
在一些实施例中,当区块链节点设备接收到查询信息时,向查询端发送的查询结果也可为所有已被选取的用户信息。In some embodiments, when the block chain node device receives the query information, the query result sent to the query terminal may also be all the selected user information.
在本公开的一实施例中,还包括:当用户根据目标信息,获取相应的资源时,对用户信息进行验证。资源可为商品、学位、车牌等等。验证即查询用户信息是否在选取出的目标信息中。当验证通过时,将相应的资源分配给对应的用户。In an embodiment of the present disclosure, the method further includes: when the user acquires the corresponding resource according to the target information, verifying the user information. Resources can be commodities, degrees, license plates, and more. Verification is to query whether the user information is in the selected target information. When the verification passes, the corresponding resources are allocated to the corresponding users.
本公开实施例中,参与信息选取的用户信息和选取出的目标信息不可篡改,不可伪造的记录到区块链中。同时,信息选取算法公开发布到区块链上,所有参与者都可以监督信息选取的公平与公正。信息选取算法可以灵活实现,以满足不同的信息选取需求。In the embodiment of the present disclosure, the user information and the selected target information of the participating information selection are not falsified, and are not forged and recorded in the blockchain. At the same time, the information selection algorithm is publicly released to the blockchain, and all participants can supervise the fairness and fairness of information selection. The information selection algorithm can be flexibly implemented to meet different information selection requirements.
参见图7,在本公开的一实施例中,根据上述信息选取方法进行礼品的发放。Referring to FIG. 7, in an embodiment of the present disclosure, a gift is issued according to the above information selection method.
在步骤S71中,用户进行商品交易,产生订单信息。In step S71, the user conducts a commodity transaction to generate order information.
在步骤S72中,根据用户的商品交易信息,获取参与信息选取的用户的用户信息。 In step S72, user information of the user who participated in the selection of the information is acquired according to the commodity transaction information of the user.
在该实施例中,礼品发放是基于用户发生商品交易,因此,用户信息为用户的订单信息。In this embodiment, the gift issuance is based on the user's occurrence of the commodity transaction, and therefore, the user information is the user's order information.
当用户进行商品交易且交易成功时,产生订单信息。订单信息包括:订单交易时间、订单交易用户的身份信息或通讯信息。When the user conducts a commodity transaction and the transaction is successful, the order information is generated. The order information includes: the order transaction time, the identity information of the order transaction user or the communication information.
在步骤S73中,将用户信息存储到区块链中。In step S73, the user information is stored in the blockchain.
在设定的时间段内(例如,商家设定的活动期间),商家的服务器作为信息登记端,对产生的订单信息进行登记。当设定的时间段结束时,停止登记订单信息。区块链节点设备将商家的服务器登记的订单信息,加入区块链的数据提供合约中。若商家的服务器是区块链节点设备,则其将订单信息编译为智能合约调用字节码后,通过发布交易的方式,将订单信息存储到区块链中。若商家的服务器不是区块链节点设备,则其将订单信息发送给一区块链节点设备,由该区块链节点设备将订单信息存储到区块链中。During the set time period (for example, during the event set by the merchant), the merchant's server registers as the information registration terminal with the generated order information. When the set time period ends, the registration order information is stopped. The blockchain node device adds the order information registered by the merchant's server to the data supply contract of the blockchain. If the merchant's server is a blockchain node device, after compiling the order information into a smart contract call bytecode, the order information is stored in the blockchain by issuing a transaction. If the merchant's server is not a blockchain node device, it sends the order information to a blockchain node device, and the blockchain node device stores the order information in the blockchain.
在步骤S74中,设定时间段到时,对登记的订单信息进行筛选,获取有效的订单信息。In step S74, when the time period is set, the registered order information is filtered to obtain valid order information.
在一个实施例中,服务器对登记的订单信息进行筛选,获取有效的订单信息。例如,有效的订单信息可为用户未发生退货的订单信息,或者有效的订单信息为订单交易金额超过预设值的订单信息。有效订单信息所对应的用户信息,才进行后续的信息选取步骤。In one embodiment, the server filters the registered order information to obtain valid order information. For example, the valid order information may be the order information in which the user does not return the goods, or the valid order information is the order information in which the order transaction amount exceeds the preset value. The user information corresponding to the valid order information is followed by the subsequent information selection step.
在步骤S75中,根据区块链中存储的信息选取算法,在用户信息中选取出目标信息。In step S75, the algorithm is selected according to the information stored in the blockchain, and the target information is selected in the user information.
在步骤S76中,根据目标信息,进行礼品发放。In step S76, gift issuance is performed based on the target information.
参见图8,在本公开的一实施例中,步骤S75包括:Referring to FIG. 8, in an embodiment of the present disclosure, step S75 includes:
在步骤S81中,确定需要选取的目标信息的目标数量。In step S81, the target number of target information that needs to be selected is determined.
在步骤S82中,获取区块链中一区块的区块头的哈希值Hb。In step S82, the hash value Hb of the block header of a block in the blockchain is obtained.
在一个实施例中,获取激活执行信息选取合约时前一区块的区块头的哈希值。In one embodiment, the hash value of the block header of the previous block when the execution execution information selection contract is activated is obtained.
在步骤S83中,按照式(1)和式(2),获取随机数。 In step S83, a random number is acquired according to the equations (1) and (2).
sha3(Hb+Orders.length)%Orders.length  (1)Sha3(Hb+Orders.length)%Orders.length (1)
其中,sha3为哈希算法;Hb为获取的区块头的哈希值;%为取余运算。将数据提供合约中的用户信息以数组Orders形式表示,其中,Orders.length为数组的长度。首次获取随机数时采用的式(1),当根据式(1)从用户信息中选取出了第一个用户信息后,根据式(2)获取第二至第N个随机数,以选取N个用户信息,N为目标数量。Where sha3 is a hash algorithm; Hb is a hash value of the obtained block header; % is a remainder operation. The user information in the data providing contract is represented by an array Orders, where Orders.length is the length of the array. The formula (1) used when the random number is first acquired, after the first user information is selected from the user information according to the formula (1), the second to Nth random numbers are obtained according to the formula (2) to select N. User information, N is the target quantity.
sha3(Hb+Orders.length+OrdersI)%Orders.length  (2)Sha3(Hb+Orders.length+OrdersI)%Orders.length (2)
其中,OrdersI为上一次选中的用户信息的在数组中的编号。Among them, OrdersI is the number in the array of the last selected user information.
在步骤S84中,根据第一至第N个随机数,在存储到区块链中的用户信息中迭代选取出目标信息。In step S84, the target information is iteratively selected in the user information stored in the blockchain according to the first to Nth random numbers.
按照步骤S83中获取的随机数,进行循环迭代,直到选取出目标数量个用户信息。选取出的用户信息存储到区块链的区块中,防止被更改。According to the random number obtained in step S83, loop iteration is performed until the target number of pieces of user information is selected. The selected user information is stored in the block of the blockchain to prevent it from being changed.
在本公开的实施例中,可以用数组的方式存储选取出的用户信息。如果用户A的用户信息在数组中,则表明该用户信息被选中。In an embodiment of the present disclosure, the selected user information may be stored in an array. If User A's user information is in an array, it indicates that the user information is selected.
在一个实施例中,若商家的服务器不是区块链节点设备,则商家的服务器可向区块链节点设备查询获得选取出的用户信息。若商家的服务区是区块链节点设备,则其可通过激活信息选取合约获得选取出的用户信息。In one embodiment, if the merchant's server is not a blockchain node device, the merchant's server may query the blockchain node device for the selected user information. If the service area of the merchant is a blockchain node device, it can obtain the selected user information by activating the information selection contract.
商家的服务器可进一步的,将选取出的用户信息进行显示,或者向被选取出的用户信息所对应的用户发送提醒信息。The server of the merchant may further display the selected user information or send the reminder information to the user corresponding to the selected user information.
由此,本公开实施例可以根据选取出的目标信息,将礼品发送给目标信息对应的用户,以可保证礼品发送的公平和公正。Therefore, the embodiment of the present disclosure can send the gift to the user corresponding to the target information according to the selected target information, so as to ensure fairness and fairness of the gift sending.
参见图9,在本公开的一实施例中,根据上述信息选取方法进行公立幼儿园摇号。Referring to FIG. 9, in an embodiment of the present disclosure, a public kindergarten shake number is performed according to the above information selection method.
在步骤S91中,获取摇号所需的用户信息。在该实施例中,用户信息可为幼儿的身份证号码、姓名、出生日期、居住地信息等。In step S91, the user information required for the rocking number is acquired. In this embodiment, the user information may be the child's ID number, name, date of birth, place of residence information, and the like.
在该实施例中,可根据幼儿园的报名条件,对幼儿的用户信息进行审核验证。报名条件包括:出生日期的限制、居住地信息限制等。例如,将出生 日期与报名条件中的出生日期限制进行匹配,满足出生日期的限制,则审核通过。In this embodiment, the user information of the child can be verified and verified according to the registration conditions of the kindergarten. Registration conditions include: restrictions on the date of birth, restrictions on the place of residence, etc. For example, will be born The date is matched with the birth date limit in the registration conditions, and the date of birth is limited.
在步骤S92中,将用户信息进行转换后,存储到数据提供合约中。In step S92, the user information is converted and stored in the data providing contract.
由于同一信息选取合约,可适用于多个幼儿园的摇号。因此,本公开实施例中,可将数据提供合约分为多个数据结构,每个数据结构用于存储一个幼儿园所对应的用户信息。Due to the same information selection contract, it can be applied to the numbering of multiple kindergartens. Therefore, in the embodiment of the present disclosure, the data providing contract may be divided into a plurality of data structures, and each data structure is used to store user information corresponding to a kindergarten.
例如,根据用户信息中的户口号码和姓名生成一个hash值:sha3(户口号码+姓名),该hash值加入数据提供合约Data Contract B对应公立幼儿园数据结构中。同时,也可在本地对所有登记的用户信息进行保存,以便以后查询摇号结果。For example, a hash value is generated according to the account number and name in the user information: sha3 (account number + name), and the hash value is added to the data provision contract Data Contract B corresponding to the public kindergarten data structure. At the same time, all registered user information can also be saved locally for later query of the shake result.
在本公开的实施例中,为了防止同一用户信息被添加到多个幼儿园对应的数据提供合约中。在将用户信息加入数据提供智能合约时,先查询该用户信息是否已添加至其他幼儿园数据结构中,若已添加则禁止再加入。In an embodiment of the present disclosure, in order to prevent the same user information from being added to a plurality of kindergarten corresponding data providing contracts. When adding user information to the data to provide a smart contract, first check whether the user information has been added to other kindergarten data structures, and if it has been added, it is forbidden to join.
在步骤S93中,激活信息选取合约,进行信息选取。In step S93, the information selection contract is activated to perform information selection.
当设定的登记时间到时,停止登记新的用户信息。若数据提供合约中共有10个公立幼儿园,总共2000个用户信息。则,摇号开始时,信息选取合约可按上述实施例所述的信息选取方法,为每家公立幼儿园实施摇号。每家公立幼儿园可设置自己的招收目标数量。When the set registration time expires, the registration of new user information is stopped. If there are 10 public kindergartens in the data supply contract, there are a total of 2000 user information. Then, when the lottery starts, the information selection contract can be implemented for each public kindergarten according to the information selection method described in the above embodiment. Each public kindergarten can set its own number of recruitment targets.
在步骤S94中,公布信息选取结果。In step S94, the information selection result is published.
摇号结束,则信息选取合约禁止任何人再修改摇号结果数据。摇号结果检测合约获取信息选取合约的结果后,通知相关机构公布结果。有条件的地方可以结合第三方应用,直接通知幼儿家长。When the lottery is over, the information selection contract prohibits anyone from modifying the lottery result data. After the result of the selection of the contract is obtained by the lottery result test contract, the relevant institution is notified to announce the result. Conditional places can be combined with third-party applications to directly notify parents of children.
在一个实施例中,数据提供合约和信息选取合约都在公共区块链上,幼儿家长可以通过相关机构在线程序或者第三方公共区块链查询客户端,查询对应合约的数据。由此,保证整个摇号流程公开,透明。In one embodiment, the data providing contract and the information selection contract are all in the public blockchain, and the parent parent can query the client through the online program of the relevant institution or the third party public blockchain to query the data of the corresponding contract. Thus, the entire lottery process is guaranteed to be open and transparent.
当幼儿报名时,需提供户口本,重新生成hash特征值,只有特征值在摇号结果中,才有资格报名。入学摇号数据,摇号方法以及摇号结果不可 篡改的永久保存在区块链中,可供以后审查。When the child is enrolled, the account book is required to regenerate the hash feature value. Only the feature value is eligible for registration in the lottery result. Admission data, shake method and shake number are not available The tampering is permanently stored in the blockchain for later review.
参见图10,相应的,本公开实施例还提供一种信息选取装置,应用于区块链节点设备,包括:Referring to FIG. 10, correspondingly, an embodiment of the present disclosure further provides an information selection apparatus, which is applied to a blockchain node device, and includes:
信息获取模块1001,用于获取参与信息选取的用户的用户信息;The information obtaining module 1001 is configured to acquire user information of a user participating in the information selection;
存储模块1002,用于将用户信息存储到区块链中;a storage module 1002, configured to store user information in a blockchain;
选取模块1003,用于根据区块链中存储的信息选取算法,在存储到区块链中的所述用户信息中选取出目标信息。The selecting module 1003 is configured to select an algorithm according to information stored in the blockchain, and select target information in the user information stored in the blockchain.
在一个实施例中,所述存储模块包括:In an embodiment, the storage module includes:
转换子模块,用于对于每个用户的用户信息,将该用户信息转换为哈希值;a conversion submodule, configured to convert the user information into a hash value for each user information;
获取子模块,用于根据每个用户对应的哈希值,获取第一智能合约调用字节码;Obtaining a submodule, configured to obtain a first smart contract call bytecode according to a hash value corresponding to each user;
交易发送子模块,用于将所述第一智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将所述第一智能合约调用字节码写入到区块链的一区块中。a transaction sending submodule, configured to send the first smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to use the first smart contract call word The section code is written into a block of the blockchain.
在一个实施例中,所述选取模块包括:In an embodiment, the selecting module comprises:
随机数生成子模块,用于根据区块链中一区块的哈希值和该区块的产生时间,生成随机数;a random number generation submodule, configured to generate a random number according to a hash value of a block in the blockchain and a generation time of the block;
迭代选取子模块,用于根据所述随机数和需选取出的目标信息的目标数量,在存储到区块链中的所述用户信息中迭代选取出所述目标信息。The iterative selection sub-module is configured to iteratively select the target information in the user information stored in the blockchain according to the random number and the target number of the target information to be selected.
在一个实施例中,所述选取模块包括:In an embodiment, the selecting module comprises:
哈希值获取模块;获取区块链中一区块的区块头的哈希值;a hash value obtaining module; obtaining a hash value of a block header of a block in the blockchain;
第一随机数获取模块,用于按照sha3(Hb+Orders.length)%Orders.length获取第一个随机数;a first random number obtaining module, configured to obtain a first random number according to sha3(Hb+Orders.length)%Orders.length;
第二随机数获取模块,用于按照sha3(Hb+Orders.length+OrdersI)%Orders.length,获取第二至第N个随机数,其中,sha3为哈希算法;Hb为获取的区块的区块头的哈希值;Orders.length为存储所述用户信息的数组的长 度;OrdersI为上一次选中的用户信息的在所述数组中的编号;N为需选取出的用户信息的目标数量;%为取余运算;a second random number obtaining module, configured to obtain second to Nth random numbers according to sha3(Hb+Orders.length+OrdersI)%Orders.length, where sha3 is a hash algorithm; Hb is a obtained block The hash value of the block header; Orders.length is the length of the array storing the user information Degrees; OrdersI is the number of the last selected user information in the array; N is the target number of user information to be selected; % is the remainder operation;
选取模块,用于根据所述第一至第N个随机数,在存储到区块链中的所述用户信息中迭代选取出所述目标信息。And a selecting module, configured to iteratively select the target information in the user information stored in the blockchain according to the first to Nth random numbers.
在一个实施例中,所述装置还包括:In one embodiment, the apparatus further includes:
信息发送模块,用于在选取出所述目标信息后,将所述目标信息发送给目的端,所述目的端包括以下设备中的至少一者:参与信息选取的用户所绑定的电子设备,用户信息被选取的用户所绑定的电子设备,被配置的查询设备,显示设备。The information sending module is configured to: after the target information is selected, send the target information to the destination end, where the destination end includes at least one of the following devices: an electronic device bound by a user participating in the information selection, The electronic device to which the user information is selected is bound, the configured query device, and the display device.
在一个实施例中,所述装置还包括:In one embodiment, the apparatus further includes:
目标信息存储模块,用于将所述目标信息存储到区块链的区块中。And a target information storage module, configured to store the target information in a block of a blockchain.
在一个实施例中,所述装置还包括:In one embodiment, the apparatus further includes:
接收模块,用于接收查询设备发送的查询信息,所述查询信息中包括:待查询用户的用户信息;The receiving module is configured to receive the query information sent by the querying device, where the query information includes: user information of the user to be queried;
查询模块,用于根据所述查询信息,在存储所述目标信息的区块中查询所述待查询用户的选取结果;a querying module, configured to query, according to the query information, a selection result of the user to be queried in a block in which the target information is stored;
查询结果发送模块,用于将查询到的所述选取结果发送给所述查询设备。The query result sending module is configured to send the selected result of the query to the querying device.
在一个实施例中,所述装置还包括:In one embodiment, the apparatus further includes:
目标信息写入模块,用于在选取出所述目标信息后,将所述目标信息作为参数,写入到用于输出所述目标信息的智能合约中。The target information writing module is configured to, after selecting the target information, write the target information as a parameter into a smart contract for outputting the target information.
在一个实施例中,所述装置还包括:In one embodiment, the apparatus further includes:
获取模块,用于根据所述信息选取算法,获取第二智能合约调用字节码;An obtaining module, configured to acquire a second smart contract call byte code according to the information selection algorithm;
交易发送模块,用于将所述第二智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将所述第二智能合约调用字节码写入到区块链的一区块中。a transaction sending module, configured to send the second smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to invoke the second smart contract call byte The code is written into a block of the blockchain.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有 关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the apparatus in the above embodiment, the specific manner in which each module performs an operation is already in existence. The detailed description of the embodiment of the method is not described in detail herein.
本公开实施例还提供,一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述信息选取方法的步骤。The embodiment of the present disclosure further provides a computer readable storage medium having stored thereon a computer program, the program being executed by the processor to implement the step of the information selection method.
本公开实施例还提供,一种电子设备,包括:上述的计算机可读存储介质;以及一个或者多个处理器,用于执行所述计算机可读存储介质中的程序。An embodiment of the present disclosure further provides an electronic device comprising: the computer readable storage medium described above; and one or more processors for executing a program in the computer readable storage medium.
参见图11,为本公开一实施例用于信息选取方法的装置的框图。该装置可被提供为区块链节点设备,其至少包括:处理器1101、存储器1102和通信组件1103。其中,存储器1102用于存储操作系统,各种类型的数据以支持在该区块链节点设备的操作,这些数据,例如可以包括用于在区块链节点设备上操作的任何应用程序或方法的指令,以及应用程序相关的数据。Referring to FIG. 11, a block diagram of an apparatus for selecting an information according to an embodiment of the present disclosure is shown. The apparatus may be provided as a block chain node device including at least a processor 1101, a memory 1102, and a communication component 1103. Wherein, the memory 1102 is configured to store operating systems, various types of data to support operations at the blockchain node device, such as may include any application or method for operating on the blockchain node device. Instructions, as well as application-related data.
存储器1102还存储有完整区块链或存储有区块链的区块头信息。The memory 1102 also stores block header information or block header information in which a block chain is stored.
处理器1101用于控制该区块链节点设备的整体操作,进行信息处理等。在本公开的一实施例中,处理器1101可控制区块链中的区块中的智能合约的运行。The processor 1101 is configured to control overall operations of the blockchain node device, perform information processing, and the like. In an embodiment of the present disclosure, the processor 1101 can control the operation of smart contracts in the blocks in the blockchain.
通信组件1103用于该区块链节点设备与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G、4G或5G,或它们中的一种或几种的组合,因此相应的该通信组件312可以包括:Wi-Fi模块,蓝牙模块,NFC模块,2G模块,3G模块,4G模块或5G模块,或它们中的一种或几种的组合。The communication component 1103 is used for wired or wireless communication between the blockchain node device and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G or 5G, or a combination of one or more of them, so that the corresponding communication component 312 can Including: Wi-Fi module, Bluetooth module, NFC module, 2G module, 3G module, 4G module or 5G module, or a combination of one or several of them.
在本公开的实施例中,通过通信组件1103,区块链节点设备可与信息登记端、信息审核端、目的端等等建立通信连接。In an embodiment of the present disclosure, through the communication component 1103, the blockchain node device can establish a communication connection with the information registration end, the information review end, the destination end, and the like.
此外,区块链节点设备还可包括多媒体组件(例如,触摸屏、麦克风、扬声器等)和输入/输出接口等,以实现相应的功能。In addition, the blockchain node device may also include multimedia components (eg, touch screen, microphone, speakers, etc.) and input/output interfaces, etc., to implement corresponding functions.
以上结合附图详细描述了本公开的优选实施方式,但是,本公开并不限于上述实施方式中的具体细节,在本公开的技术构思范围内,可以对本公开的技术方案进行多种简单变型,这些简单变型均属于本公开的保护范 围。The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solutions of the present disclosure within the scope of the technical idea of the present disclosure. These simple variants belong to the protection scope of the present disclosure. Wai.
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合。为了避免不必要的重复,本公开对各种可能的组合方式不再另行说明。It should be further noted that the specific technical features described in the above specific embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not be further described in various possible combinations.
此外,本公开的各种不同的实施方式之间也可以进行任意组合,只要其不违背本公开的思想,其同样应当视为本公开所公开的内容。 In addition, any combination of various embodiments of the present disclosure may be made as long as it does not deviate from the idea of the present disclosure, and should also be regarded as the disclosure of the present disclosure.

Claims (20)

  1. 一种信息选取方法,应用于区块链节点设备,其特征在于,包括:An information selection method is applied to a blockchain node device, which is characterized in that:
    获取参与信息选取的用户的用户信息;Obtaining user information of the user participating in the selection of the information;
    将用户信息存储到区块链中;Store user information in a blockchain;
    根据区块链中存储的信息选取算法,在存储到区块链中的所述用户信息中选取出目标信息。According to the information selection algorithm stored in the blockchain, the target information is selected in the user information stored in the blockchain.
  2. 根据权利要求1所述的方法,其特征在于,所述将用户信息存储到区块链中,包括:The method of claim 1 wherein said storing user information in a blockchain comprises:
    对于每个用户的用户信息,将该用户信息转换为哈希值;Converting the user information to a hash value for each user's user information;
    根据每个用户对应的哈希值,获取第一智能合约调用字节码;Obtaining a first smart contract call bytecode according to a hash value corresponding to each user;
    将所述第一智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将所述第一智能合约调用字节码写入到区块链的一区块中。Transmitting the first smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to write the first smart contract call bytecode to the block In a block of the chain.
  3. 根据权利要求1所述的方法,其特征在于,所述根据区块链中存储的信息选取算法,在存储到区块链中的所述用户信息中选取出目标信息,包括:The method according to claim 1, wherein the selecting the target information according to the information selection algorithm stored in the blockchain and the user information stored in the blockchain comprises:
    根据区块链中一区块的哈希值和该区块的产生时间,生成随机数;Generating a random number according to a hash value of a block in the blockchain and a generation time of the block;
    根据所述随机数和需选取出的目标信息的目标数量,在存储到区块链中的所述用户信息中迭代选取出所述目标信息。And selecting the target information in the user information stored in the blockchain according to the random number and the target number of the target information to be selected.
  4. 根据权利要求1所述的方法,其特征在于,所述根据区块链中存储的信息选取算法,在存储到区块链中的所述用户信息中选取出目标信息,包括:The method according to claim 1, wherein the selecting the target information according to the information selection algorithm stored in the blockchain and the user information stored in the blockchain comprises:
    获取区块链中一区块的区块头的哈希值;Obtaining a hash value of a block header of a block in the blockchain;
    按照sha3(Hb+Orders.length)%Orders.length获取第一个随机数; Obtain the first random number according to sha3(Hb+Orders.length)%Orders.length;
    按照sha3(Hb+Orders.length+OrdersI)%Orders.length,获取第二至第N个随机数;其中,sha3为哈希算法;Hb为获取的区块的区块头的哈希值;Orders.length为存储所述用户信息的数组的长度;OrdersI为上一次选中的用户信息的在所述数组中的编号;N为需选取出的用户信息的目标数量;%为取余运算;Obtain second to Nth random numbers according to sha3(Hb+Orders.length+OrdersI)%Orders.length; where sha3 is a hash algorithm; Hb is a hash value of the block header of the obtained block; Orders. Length is the length of the array in which the user information is stored; OrdersI is the number of the last selected user information in the array; N is the target number of user information to be selected; % is the remainder operation;
    根据所述第一至第N个随机数,在存储到区块链中的所述用户信息中迭代选取出所述目标信息。And selecting, according to the first to Nth random numbers, the target information in the user information stored in the blockchain.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    当选取出所述目标信息后,将所述目标信息发送给目的端,所述目的端包括以下设备中的至少一者:参与信息选取的用户所绑定的电子设备,用户信息被选取的用户所绑定的电子设备,被配置的查询设备,显示设备。After the target information is selected, the target information is sent to the destination end, and the destination end includes at least one of the following devices: an electronic device bound by a user participating in the information selection, and a user selected by the user information. Bind electronic device, configured query device, display device.
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    将所述目标信息存储到区块链的区块中。The target information is stored in a block of a blockchain.
  7. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, wherein the method further comprises:
    接收查询设备发送的查询信息,所述查询信息中包括:待查询用户的用户信息;Receiving the query information sent by the querying device, where the query information includes: user information of the user to be queried;
    根据所述查询信息,在存储所述目标信息的区块中查询所述待查询用户的选取结果;Querying, according to the query information, a selection result of the user to be queried in a block in which the target information is stored;
    将查询到的所述选取结果发送给所述查询设备。Sending the selected result of the query to the querying device.
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    选取出所述目标信息后,将所述目标信息作为参数,写入到用于输出所述目标信息的智能合约中。 After the target information is selected, the target information is written as a parameter into a smart contract for outputting the target information.
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    根据所述信息选取算法,获取第二智能合约调用字节码;Obtaining a second smart contract call byte code according to the information selection algorithm;
    将所述第二智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将所述第二智能合约调用字节码写入到区块链的一区块中。Transmitting the second smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to write the second smart contract call bytecode to the block In a block of the chain.
  10. 一种信息选取装置,应用于区块链节点设备,其特征在于,包括:An information selection device is applied to a blockchain node device, and is characterized in that:
    信息获取模块,用于获取参与信息选取的用户的用户信息;An information obtaining module, configured to acquire user information of a user participating in the information selection;
    存储模块,用于将用户信息存储到区块链中;a storage module for storing user information in a blockchain;
    选取模块,用于根据区块链中存储的信息选取算法,在存储到区块链中的所述用户信息中选取出目标信息。The selecting module is configured to select an algorithm according to information stored in the blockchain, and select target information in the user information stored in the blockchain.
  11. 根据权利要求10所述的装置,其特征在于,所述存储模块包括:The device according to claim 10, wherein the storage module comprises:
    转换子模块,用于对于每个用户的用户信息,将该用户信息转换为哈希值;a conversion submodule, configured to convert the user information into a hash value for each user information;
    获取子模块,用于根据每个用户对应的哈希值,获取第一智能合约调用字节码;Obtaining a submodule, configured to obtain a first smart contract call bytecode according to a hash value corresponding to each user;
    交易发送子模块,用于将所述第一智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将所述第一智能合约调用字节码写入到区块链的一区块中。a transaction sending submodule, configured to send the first smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to use the first smart contract call word The section code is written into a block of the blockchain.
  12. 根据权利要求10所述的装置,其特征在于,所述选取模块包括:The device according to claim 10, wherein the selection module comprises:
    随机数生成子模块,用于根据区块链中一区块的哈希值和该区块的产生时间,生成随机数;a random number generation submodule, configured to generate a random number according to a hash value of a block in the blockchain and a generation time of the block;
    迭代选取子模块,用于根据所述随机数和需选取出的目标信息的目标数量,在存储到区块链中的所述用户信息中迭代选取出所述目标信息。 The iterative selection sub-module is configured to iteratively select the target information in the user information stored in the blockchain according to the random number and the target number of the target information to be selected.
  13. 根据权利要求10所述的装置,其特征在于,所述选取模块包括:The device according to claim 10, wherein the selection module comprises:
    哈希值获取模块;获取区块链中一区块的区块头的哈希值;a hash value obtaining module; obtaining a hash value of a block header of a block in the blockchain;
    第一随机数获取模块,用于按照sha3(Hb+Orders.length)%Orders.length获取第一个随机数;a first random number obtaining module, configured to obtain a first random number according to sha3(Hb+Orders.length)%Orders.length;
    第二随机数获取模块,用于按照sha3(Hb+Orders.length+OrdersI)%Orders.length,获取第二至第N个随机数,其中,sha3为哈希算法;Hb为获取的区块的区块头的哈希值;Orders.length为存储所述用户信息的数组的长度;OrdersI为上一次选中的用户信息的在所述数组中的编号;N为需选取出的用户信息的目标数量;%为取余运算;a second random number obtaining module, configured to obtain second to Nth random numbers according to sha3(Hb+Orders.length+OrdersI)%Orders.length, where sha3 is a hash algorithm; Hb is a obtained block a hash value of the block header; Orders.length is the length of the array storing the user information; OrdersI is the number of the last selected user information in the array; N is the target number of the user information to be selected; % is the remainder operation;
    选取模块,用于根据所述第一至第N个随机数,在存储到区块链中的所述用户信息中迭代选取出所述目标信息。And a selecting module, configured to iteratively select the target information in the user information stored in the blockchain according to the first to Nth random numbers.
  14. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The device according to claim 10, wherein the device further comprises:
    信息发送模块,用于在选取出所述目标信息后,将所述目标信息发送给目的端,所述目的端包括以下设备中的至少一者:参与信息选取的用户所绑定的电子设备,用户信息被选取的用户所绑定的电子设备,被配置的查询设备,显示设备。The information sending module is configured to: after the target information is selected, send the target information to the destination end, where the destination end includes at least one of the following devices: an electronic device bound by a user participating in the information selection, The electronic device to which the user information is selected is bound, the configured query device, and the display device.
  15. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The device according to claim 10, wherein the device further comprises:
    目标信息存储模块,用于将所述目标信息存储到区块链的区块中。And a target information storage module, configured to store the target information in a block of a blockchain.
  16. 根据权利要求15所述的装置,其特征在于,所述装置还包括:The device according to claim 15, wherein the device further comprises:
    接收模块,用于接收查询设备发送的查询信息,所述查询信息中包括:待查询用户的用户信息;The receiving module is configured to receive the query information sent by the querying device, where the query information includes: user information of the user to be queried;
    查询模块,用于根据所述查询信息,在存储所述目标信息的区块中查询所述待查询用户的选取结果;a querying module, configured to query, according to the query information, a selection result of the user to be queried in a block in which the target information is stored;
    查询结果发送模块,用于将查询到的所述选取结果发送给所述查询设 备。a query result sending module, configured to send the selected result of the query to the query setting Ready.
  17. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The device according to claim 10, wherein the device further comprises:
    目标信息写入模块,用于在选取出所述目标信息后,将所述目标信息作为参数,写入到用于输出所述目标信息的智能合约中。The target information writing module is configured to, after selecting the target information, write the target information as a parameter into a smart contract for outputting the target information.
  18. 根据权利要求10所述的装置,其特征在于,所述装置还包括:The device according to claim 10, wherein the device further comprises:
    获取模块,用于根据所述信息选取算法,获取第二智能合约调用字节码;An obtaining module, configured to acquire a second smart contract call byte code according to the information selection algorithm;
    交易发送模块,用于将所述第二智能合约调用字节码作为交易数据,发送给区块链网络中的一个或多个区块链节点设备,以将所述第二智能合约调用字节码写入到区块链的一区块中。a transaction sending module, configured to send the second smart contract call bytecode as transaction data to one or more blockchain node devices in the blockchain network to invoke the second smart contract call byte The code is written into a block of the blockchain.
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现权利要求1-9中任一项所述方法的步骤。A computer readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the steps of the method of any of claims 1-9.
  20. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    权利要求19中所述的计算机可读存储介质;以及The computer readable storage medium of claim 19;
    一个或者多个处理器,用于执行所述计算机可读存储介质中的程序。 One or more processors for executing a program in the computer readable storage medium.
PCT/CN2017/098249 2017-08-21 2017-08-21 Information selection method, apparatus, electronic device and computer-readable storage medium WO2019036831A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/098249 WO2019036831A1 (en) 2017-08-21 2017-08-21 Information selection method, apparatus, electronic device and computer-readable storage medium
CN201780001835.0A CN107820690B (en) 2017-08-21 2017-08-21 Information selection method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/098249 WO2019036831A1 (en) 2017-08-21 2017-08-21 Information selection method, apparatus, electronic device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2019036831A1 true WO2019036831A1 (en) 2019-02-28

Family

ID=61606894

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098249 WO2019036831A1 (en) 2017-08-21 2017-08-21 Information selection method, apparatus, electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN107820690B (en)
WO (1) WO2019036831A1 (en)

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520307A (en) * 2018-03-31 2018-09-11 深圳慧通商务有限公司 Data processing method and relevant apparatus
CN108648323B (en) * 2018-05-10 2021-02-19 广州市申迪计算机系统有限公司 Target information selection method and device, computer equipment and storage medium
CN108846298A (en) * 2018-05-23 2018-11-20 马佳明 A kind of altering detecting method and relevant device of file content
CN108764701A (en) * 2018-05-23 2018-11-06 深圳市元征科技股份有限公司 A kind of degree resource allocation publicity method, system and equipment and storage medium
CN108776838A (en) * 2018-06-01 2018-11-09 深圳市轱辘汽车维修技术有限公司 A kind of vehicle maintenance businessman matching process and relevant apparatus
CN110610418B (en) * 2018-06-15 2022-05-31 中数智创科技有限公司 Transaction state query method, system, device and storage medium based on block chain
CN108831001B (en) * 2018-06-25 2021-06-18 北京奇虎科技有限公司 Block chain-based node random selection method, system, node and electronic equipment
WO2020000198A1 (en) * 2018-06-26 2020-01-02 深圳齐心集团股份有限公司 Block chain-based attendance system
CN109146679B (en) 2018-06-29 2023-11-10 创新先进技术有限公司 Intelligent contract calling method and device based on block chain and electronic equipment
CN109242677A (en) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 Object select method and device, electronic equipment
CN109448211B (en) * 2018-09-18 2022-06-17 平安科技(深圳)有限公司 License plate issuing method, device, medium and equipment based on big data
CN110932859B (en) * 2018-09-20 2021-06-15 北大方正集团有限公司 User information processing method, device and equipment and readable storage medium
TW202016743A (en) 2018-10-25 2020-05-01 財團法人資訊工業策進會 Data processing apparatus and data processing method for internet of things system
CN109615370A (en) * 2018-10-25 2019-04-12 阿里巴巴集团控股有限公司 Object select method and device, electronic equipment
CN109584432B (en) * 2018-10-26 2020-06-30 阿里巴巴集团控股有限公司 Object selection method and device and electronic equipment
CN109660514B (en) * 2018-11-15 2020-06-09 苏宁易购集团股份有限公司 Implementation method of intelligent equipment system, intelligent equipment control method and system
CN109542455B (en) * 2018-11-29 2021-08-06 杭州复杂美科技有限公司 Contract execution method, contract reduction method, device, and storage medium
CN109767271B (en) * 2019-01-18 2023-07-04 众安信息技术服务有限公司 Lottery method and equipment based on block chain
CN109831501B (en) * 2019-01-30 2020-09-29 京东数字科技控股有限公司 Information distribution method and system based on block chain
CN109862136A (en) * 2019-03-19 2019-06-07 全链通有限公司 Group communication method, block chain node and medium based on domain name block chain
CN110336672B (en) * 2019-04-29 2020-07-28 山东工商学院 Method, system and storage medium for citizen privacy protection based on zero-knowledge proof
CN110197708B (en) * 2019-06-05 2023-01-24 重庆邮电大学 Block chain migration and storage method for electronic medical record
CN111709595A (en) * 2019-12-16 2020-09-25 航天信息股份有限公司 Method and system for allocating resources based on block chain technology
CN111009068B (en) * 2019-12-18 2021-09-17 中体彩科技发展有限公司 Lottery drawing number generation method and system based on block chain
CN113468271A (en) * 2020-10-20 2021-10-01 支付宝(杭州)信息技术有限公司 Method and device for managing storage space of intelligent contract account
CN112418856A (en) * 2020-11-25 2021-02-26 政采云有限公司 Number shaking method, device, block chain, equipment and computer storage medium
CN115796869B (en) * 2022-11-24 2024-01-19 元疆(广州)供应链管理合伙企业(有限合伙) Commodity data processing method and device based on intelligent digital contract

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893042A (en) * 2016-03-31 2016-08-24 北京航空航天大学 Intelligent contract implementation method based on block chain
CN105976248A (en) * 2016-04-29 2016-09-28 邓迪 Crowd funding lotting method and system
CN106453407A (en) * 2016-11-23 2017-02-22 江苏通付盾科技有限公司 Identity authentication method based on block chain, authentication server and user terminal
CN106504097A (en) * 2016-11-09 2017-03-15 北京金股链科技有限公司 A kind for the treatment of method and apparatus of assets information
CN106529946A (en) * 2016-11-01 2017-03-22 北京金股链科技有限公司 Method for realizing user identity digitalization based on block chain
US20170200147A1 (en) * 2016-01-08 2017-07-13 Akbar Ali Ansari System and the computer methods of issuing, transferring and manipulating value or gift cards using blockchain technology

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150379510A1 (en) * 2012-07-10 2015-12-31 Stanley Benjamin Smith Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain.
CN106230851B (en) * 2016-08-29 2019-12-13 中金云金融(北京)大数据科技股份有限公司 Data security method and system based on block chain
CN106598579B (en) * 2016-12-06 2020-12-25 北京果仁宝科技有限公司 Method and apparatus for integrating dynamic type programming language on blockchain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170200147A1 (en) * 2016-01-08 2017-07-13 Akbar Ali Ansari System and the computer methods of issuing, transferring and manipulating value or gift cards using blockchain technology
CN105893042A (en) * 2016-03-31 2016-08-24 北京航空航天大学 Intelligent contract implementation method based on block chain
CN105976248A (en) * 2016-04-29 2016-09-28 邓迪 Crowd funding lotting method and system
CN106529946A (en) * 2016-11-01 2017-03-22 北京金股链科技有限公司 Method for realizing user identity digitalization based on block chain
CN106504097A (en) * 2016-11-09 2017-03-15 北京金股链科技有限公司 A kind for the treatment of method and apparatus of assets information
CN106453407A (en) * 2016-11-23 2017-02-22 江苏通付盾科技有限公司 Identity authentication method based on block chain, authentication server and user terminal

Also Published As

Publication number Publication date
CN107820690B (en) 2020-11-10
CN107820690A (en) 2018-03-20

Similar Documents

Publication Publication Date Title
WO2019036831A1 (en) Information selection method, apparatus, electronic device and computer-readable storage medium
Kannengießer et al. Trade-offs between distributed ledger technology characteristics
US11917051B2 (en) Systems and methods for storage, generation and verification of tokens used to control access to a resource
JP6877448B2 (en) Methods and systems for guaranteeing computer software using distributed hash tables and blockchain
JP7210466B2 (en) Systems and methods for distributing data records using blockchain
TWI771618B (en) Method and device for distribution of copyright of works based on blockchain
CN110166442B (en) Data processing method and device based on block chain
WO2020082883A1 (en) Object selection method and device and electronic device
WO2021017443A1 (en) Blockchain-based bill number allocation method and apparatus, and electronic device
TW202008195A (en) Benefit distribution method and device, electronic device
JP7264878B6 (en) Improved time-locking technology to protect resources in blockchain
Zambrano et al. Unpacking the disruptive potential of blockchain technology for human development
CN111126950A (en) Service processing method, device and equipment based on block chain
JP2021524962A (en) Automatic data projection to smart contract groups on the blockchain
CN110334153B (en) Authorization method, system, device and equipment in block chain type account book
TWI706663B (en) Data storage method and system based on multiple blockchain networks
CN111985007A (en) Contract signing and executing method and device based on block chain
CN110020945B (en) Data reading method and system based on multiple block chain networks
US20200076573A1 (en) Special relationships in a blockchain
CN111260488B (en) Data processing method and device and readable storage medium
TW202016778A (en) A method and system for issuing program questions, answer code, and answering code verification
Lamkoti et al. Certificate verification using blockchain and generation of transcript
Christodoulou et al. Developing more reliable news sources by utilizing the blockchain technology to combat fake news
CN113221165B (en) User element authentication method and device based on block chain
CN113542405A (en) Block chain-based network communication system, method, device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17922640

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17922640

Country of ref document: EP

Kind code of ref document: A1