WO2021218778A1 - User recommendation based on blockchain - Google Patents

User recommendation based on blockchain Download PDF

Info

Publication number
WO2021218778A1
WO2021218778A1 PCT/CN2021/089043 CN2021089043W WO2021218778A1 WO 2021218778 A1 WO2021218778 A1 WO 2021218778A1 CN 2021089043 W CN2021089043 W CN 2021089043W WO 2021218778 A1 WO2021218778 A1 WO 2021218778A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
personal data
blockchain
service
data
Prior art date
Application number
PCT/CN2021/089043
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 支付宝实验室(新加坡)有限公司
Publication of WO2021218778A1 publication Critical patent/WO2021218778A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular to a method and device for user recommendation based on blockchain, and electronic equipment.
  • Blockchain technology also known as distributed ledger technology, is an emerging technology in which several computing devices participate in "bookkeeping" and jointly maintain a complete distributed database. Because the blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database records, and the rapid data synchronization between computing devices, the blockchain technology has been widely used in many fields. To apply.
  • This specification proposes a block chain-based user recommendation method.
  • the method includes: receiving a data disclosure request initiated by a user after completing a target business, and the data disclosure request includes data from the business data related to the target business Select public personal data; publish the acquired personal data of the user to the blockchain for storage; in response to the operation initiated by the user, store the personal data of the user on the blockchain, Match with the personal data stored by the blockchain that other users choose to disclose when completing the target business to determine whether the personal data of the user and the personal data of the other users contain the same user characteristics; When the personal data of the user and the personal data of any other user contain the same user characteristics, the any other user is recommended to the user.
  • the method further includes: in response to a service request for the target service initiated by a user, performing service verification for the service request, the service verification including verification of the user's identity and verification for the service The authenticity of the request is verified; if the service verification for the user passes, the target service corresponding to the service request is executed, and the service execution result of the target service processing is sent to the user.
  • the service execution result includes and Business data related to the target business.
  • the target business includes a study abroad remittance service, and the same user characteristics include the same remittance recipient in the study abroad remittance service.
  • the personal data of the user stored in the blockchain is matched with the personal data stored in the blockchain that other users choose to disclose when completing the target business, so as to determine the user's personal data Whether the data and the personal data of the other users contain the same user characteristics, including: the personal data of the user stored in the block chain, and the personal data of the user stored in the block chain when the other users complete the remittance for studying abroad
  • the public personal data is selected for matching to determine whether the personal data of the user and the personal data of the other users contain the same remittance recipient.
  • recommending any other user to the user includes: the personal data of the user
  • the personal data of any other user contains the same remittance recipient, recommend any other user to the user.
  • publishing the acquired personal data of the user to the blockchain for storage includes: performing homomorphic encryption on the acquired personal data of the user, and homomorphic encryption of all the obtained personal data of the user.
  • the personal data of the user is published to the blockchain for storage.
  • the device includes: a receiving module that receives a data disclosure request initiated by a user after completing the target business, and the data disclosure request includes information related to the target business. Select the public personal data from the business data of the user; the publishing module, which publishes the acquired personal data of the user to the blockchain for storage; the recommendation module, which in response to the operation initiated by the user, sends the block.
  • the user’s personal data stored in the blockchain is matched with the personal data stored in the blockchain that other users choose to disclose when completing the target business, so as to determine whether the user’s personal data matches the other users’ personal data. Does the personal data contain the same user characteristics.
  • the recommendation module further recommends any other user to the user when the personal data of the user and the personal data of any other user contain the same user characteristics.
  • the receiving module further: in response to a service request for the target service initiated by the user, perform service verification for the service request, and the service verification includes a verification of the user's identity and Verification of the authenticity of the service request; if the service verification for the user passes, execute the target service corresponding to the service request, and send the service execution result of the target service processing to the user, the service execution The result includes business data related to the target business.
  • the target business includes a study abroad remittance service
  • the same user characteristics include the same remittance recipient in the study abroad remittance service.
  • the recommendation module further matches the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the study abroad remittance business, to determine the Whether the personal data of the user and the personal data of the other users include the same remittance recipient.
  • the recommendation module further recommends any other user to the user when the personal data of the user and the personal data of any other user include the same remittance recipient.
  • the publishing module further performs homomorphic encryption on the acquired personal data of the user, and publishes the homomorphic encrypted personal data of the user to the blockchain for storage.
  • the personal data related to the user's execution target business is selected and published and released to the blockchain for storage; and, in response to the user's operation, the user and other users who have been stored in the blockchain
  • the personal data of the user is matched, and other users who have the same user characteristics as the user determined by the match are recommended to the user, providing multiple users performing the same target business with flexible ways and guarantees to establish credible social relationships.
  • FIG. 1 is a flowchart of a method for user recommendation based on blockchain according to an embodiment of this specification
  • FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of this specification.
  • Fig. 3 is a block diagram of a block chain-based user recommendation device provided by an embodiment of the present specification.
  • the steps of the corresponding method may not be executed in the order shown and described in this specification.
  • the method may include more or fewer steps than described in this specification.
  • a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step in other embodiments. describe.
  • Blockchain is generally divided into three types: Public Blockchain, Private Blockchain and Consortium Blockchain.
  • Public Blockchain Private Blockchain
  • Consortium Blockchain there can also be a combination of the above types, such as private chain + consortium chain, consortium chain + public chain, and so on.
  • the public chain is represented by Bitcoin and Ethereum. Participants who join the public chain (also called nodes in the blockchain) can read the data records on the chain, participate in transactions, and compete for the accounting rights of new blocks, etc. . Moreover, each node can freely join or exit the network, and perform related operations.
  • the private chain is the opposite.
  • the write permission of the network is controlled by an organization or institution, and the data read permission is regulated by the organization.
  • a private chain can be a weakly centralized system with strict restrictions on nodes and a small number of nodes. This type of blockchain is more suitable for internal use by specific institutions.
  • Each node in the alliance chain usually has a corresponding entity or organization; nodes are authorized to join the network and form a stakeholder alliance to jointly maintain the operation of the blockchain.
  • the blockchain is usually composed of several blocks.
  • the time stamps corresponding to the creation time of the block are respectively recorded in these blocks, and all the blocks strictly follow the time stamps recorded in the block to form a time-ordered data chain.
  • the real data generated in the physical world it can be constructed into a standard transaction format supported by the blockchain, and then published to the blockchain, and the node devices in the blockchain will perform consensus processing on the received transactions , And after reaching a consensus, the node device as the bookkeeping node in the block chain will package the transaction into the block and carry out persistent storage in the block chain.
  • the consensus algorithms supported in the blockchain can include:
  • the first type of consensus algorithm that is, the consensus algorithm that node devices need to compete for the accounting right of each round of accounting cycle; for example, Proof of Work (POW), Proof of Stake (POS), appointment Consensus algorithms such as Delegated Proof of Stake (DPOS);
  • POW Proof of Work
  • POS Proof of Stake
  • DPOS Delegated Proof of Stake
  • the second type of consensus algorithm is a consensus algorithm that pre-selects accounting nodes for each round of accounting cycles (without competing for accounting rights); for example, practical Byzantine Fault Tolerance (PBFT) and other consensus algorithms.
  • PBFT Byzantine Fault Tolerance
  • all node devices that compete for the right to keep accounts can execute the transaction after receiving the transaction.
  • one node device may win this round of contention for the right to bookkeeping and become the bookkeeping node.
  • the accounting node can package the received transaction with other transactions to generate a candidate block, and send the generated candidate block or the block header of the candidate block to other node devices for consensus.
  • the node device with the right to book accounts has been agreed before this round of bookkeeping. Therefore, after the node device receives the transaction, if it is not the accounting node of this round, it can send the transaction to the accounting node.
  • the transaction can be executed during or before the process of packaging the transaction with other transactions to generate a candidate block.
  • the accounting node After the accounting node generates the candidate block, it can send the candidate block or the block header of the candidate block to other node devices for consensus.
  • the accounting node in this round can package the received transaction to generate a candidate block, and the generated candidate block or the candidate block
  • the header of the block is sent to other node devices for consensus verification. If other node devices receive the candidate block or the block header of the candidate block, and there is no problem after verification, the candidate block can be appended to the end of the original blockchain as the latest block to complete the block chain. Accounting process. In the process of other nodes verifying the new block or block header sent by the accounting node, the transactions contained in the block can also be executed.
  • Ethereum In the field of blockchain, an important concept is Account; taking Ethereum as an example, Ethereum usually divides accounts into external accounts and contract accounts; external accounts are accounts directly controlled by users, also called It is a user account; while a contract account is an account created by a user through an external account and contains the contract code (ie smart contract).
  • the account types supported by the blockchain can also be further extended, which is not particularly limited in this specification.
  • a structure is usually used to maintain the account status of the account.
  • the state of the account related to the transaction in the blockchain will usually also change.
  • the structure of an account usually includes fields such as Balance, Nonce, Code, and Storage. in:
  • the Balance field is used to maintain the current account balance of the account
  • the Nonce field is used to maintain the number of transactions of the account; it is a counter used to ensure that each transaction can be processed and can only be processed once, effectively avoiding replay attacks;
  • the Code field is used to maintain the contract code of the account; in actual applications, the Code field usually only maintains the hash value of the contract code; therefore, the Code field is usually also called the Codehash field.
  • the Storage field is used to maintain the storage content of the account (the default field value is empty); for contract accounts, an independent storage space is usually allocated to store the storage content of the contract account; the independent storage space is usually Call it the account storage of the contract account.
  • the storage content of the contract account is usually constructed as an MPT (Merkle Patricia Trie) tree and the data structure is stored in the above independent storage space; among them, the MPT tree constructed based on the storage content of the contract account is usually also called the Storage tree .
  • the Storage field usually only maintains the root node of the Storage tree; therefore, the Storage field is usually also called the StorageRoot field.
  • the field values of the Code field and the Storage field shown above are all null values.
  • Merkle trees are usually used; or, based on the data structure of Merkle trees, to store and maintain data.
  • MPT tree a variant of Merkle tree
  • Ethereum has designed three MPT trees for the data that needs to be stored and maintained in the blockchain, namely the MPT state tree, the MPT transaction tree and the MPT receipt tree. Among them, in addition to the above three MPT trees, there is actually a Storage tree constructed based on the storage content of the contract account.
  • MPT state tree is an MPT tree organized by the account state data of all accounts in the blockchain
  • MPT transaction tree is an MPT tree organized by transaction data in the blockchain
  • MPT receipt tree Is the MPT tree organized by the receipt of each transaction generated after the transactions in the block are executed.
  • the hash values of the root nodes of the MPT state tree, MPT transaction tree, and MPT receipt tree shown above will all be added to the block header of the corresponding block eventually.
  • the MPT transaction tree and MPT receipt tree correspond to blocks, that is, each block has its own MPT transaction tree and MPT receipt tree.
  • the MPT state tree is a global MPT tree, which does not correspond to a specific block, but covers the account state data of all accounts in the blockchain.
  • the organized MPT transaction tree, MPT receipt tree, and MPT state tree will eventually be stored in a Key-Value database (for example, LevelDB) that uses a multi-level data storage structure.
  • a Key-Value database for example, LevelDB
  • the above-mentioned database with a multi-level data storage structure usually adopts a multi-level data storage structure, which can be divided into n-level data storage; for example, each level of data storage can be set to L0, L1, L2, L3... L(n-1); For all levels of data storage in the above database, the smaller the level number, the higher the level; for example, L0 stores the latest blocks of data, and L1 stores the newest blocks. Block data, and so on.
  • the read and write performance of storage media corresponding to all levels of data storage may also generally have performance differences; for example, the read and write performance of storage media corresponding to data storage with a high level (ie, with a smaller level number) can be higher than the level Low data storage corresponds to the read and write performance of the storage medium.
  • high-level data storage can use storage media with higher storage costs and better storage performance; while low-level data storage can use storage media with low unit cost and larger capacity.
  • the data stored in the database will contain a lot of historical data; moreover, the smaller the block number, the smaller the block number. The older the data, the less important it is. Therefore, in order to reduce the overall storage cost, data of different block heights can usually be "differentiated"; for example, data in a block with a smaller block number can be stored on a storage medium with a lower cost; The data in the block with the larger block number is stored on a storage medium with a higher cost.
  • the balances of the transferor account and transferee account related to the "transfer transaction” (that is, the field value of the Balance field of these accounts) are usually also Will change accordingly.
  • the node device After the transaction of the node device in the latest block generated by the blockchain is completed, because the account status in the current blockchain has changed, the node device needs to use the current account status data of all accounts in the blockchain to Construct the MPT state tree to maintain the latest state of all accounts in the blockchain.
  • each block in the blockchain has a corresponding MPT state tree; the MPT state tree maintains that after the transactions in the block are executed, all accounts in the blockchain are up to date The status of the account.
  • this manual the purpose of this manual is to propose a technical solution that selects and discloses personal data related to the user's execution of the target business and publishes it to the blockchain for storage, and performs user recommendation based on personal data matching.
  • a server that provides users with the target business receives a data disclosure request initiated by the user after completing the target business; wherein the data disclosure request includes selecting personal data to be disclosed from business data related to the target business.
  • the server publishes the acquired personal data of the user to the blockchain for storage; in response to the operation initiated by the user, the personal data of the user stored in the blockchain is combined with the data stored in the blockchain.
  • the server choose to match the disclosed personal data to determine whether the user’s personal data and the other users’ personal data contain the same user characteristics; when the user’s personal data matches any other user’s personal data When the data contains the same user characteristics, any other user is recommended to the user.
  • the personal data related to the user's execution target business is selected and published and released to the blockchain for storage; and, in response to the user's operation, the user and other users who have been stored in the blockchain
  • the personal data of the user is matched, and other users who have the same user characteristics as the user determined by the match are recommended to the user, providing multiple users performing the same target business with flexible ways and guarantees to establish credible social relationships.
  • Figure 1 is a blockchain-based user recommendation method provided by an embodiment of this specification, which is applied to a server that provides users with target services. The method performs the following steps:
  • Step 102 Receive a data disclosure request initiated by the user after completing the target business; wherein the data disclosure request includes selecting personal data to be disclosed from business data related to the target business.
  • Step 104 Publish the acquired personal data of the user to the blockchain for storage.
  • Step 106 In response to the operation initiated by the user, combine the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the target business Matching is performed to determine whether the personal data of the user and the personal data of the other users contain the same user characteristics.
  • Step 108 When the personal data of the user and the personal data of any other user contain the same user characteristics, recommend any other user to the user.
  • the above-mentioned target business can include any type of business.
  • the aforementioned target business may include financial business, medical business, e-commerce business, city service business, cross-border remittance business, etc.
  • the above-mentioned server may include a machine or a cluster of machines that provides the user with the above-mentioned target service; wherein, the above-mentioned server may provide the user with the above-mentioned target service through a corresponding client.
  • the above-mentioned server may include Alipay, Taobao/Tmall, Facebook Cloud, etc. that provide users with financial services, medical services, e-commerce services, urban services, cross-border services, etc. .
  • the above-mentioned server can provide users with the above-mentioned target service through the corresponding client.
  • the above-mentioned server provides users with financial services, medical services, e-commerce services, urban services, cross-border services, etc. Alipay services, Taobao/Tmall services, and Facebook Cloud services; accordingly;
  • the above-mentioned server can provide users with financial services, medical services, e-commerce services, city service services, cross-border remittance services and other services by connecting to the corresponding Alipay client, Taobao/Tmall client, and Facebook Cloud client.
  • the above-mentioned server responds to a user-initiated service request for the above-mentioned target service, and performs service verification for the above-mentioned service request; wherein, the above-mentioned service verification includes the identity verification of the above-mentioned user and the verification of the above-mentioned service request. Authenticity verification.
  • the above-mentioned server responds to a service request for the above-mentioned target service initiated by the user through the above-mentioned client, and performs a service verification for the service request; wherein, the service verification includes a service check based on KYC (Know Your Customer, KYC).
  • KYC Know Your Customer
  • the above-mentioned server executes the target service corresponding to the above-mentioned service request, and sends the service execution result of the above-mentioned target service processing to the user; wherein, the above-mentioned service execution result Including business data related to the target business.
  • the server executes the target service corresponding to the service request and sends the service to the user.
  • the user after completing the above-mentioned target business, the user initiates a data disclosure request to the above-mentioned server through the above-mentioned client; the above-mentioned data disclosure request includes the user's selection of personal data to be disclosed from the business data related to the above-mentioned target business.
  • the above-mentioned personal data may include any type of personal data that the user chooses to disclose from the business data related to the above-mentioned target business.
  • the aforementioned personal data may specifically include personal information related to the aforementioned target business, such as nationality, age, gender, identity document information, contact information, remittance information, school attending, etc. Users can choose to disclose some or all of the above personal data to the public.
  • the above-mentioned server After receiving the above-mentioned data disclosure request initiated by the user after completing the above-mentioned target business, the above-mentioned server will publish the obtained personal data of the above-mentioned user to the blockchain connected to the above-mentioned server for storage; Among them, the type of the above-mentioned blockchain is not specifically limited in this specification.
  • the server performs homomorphic encryption on the acquired personal data of the user, and The personal data of the above-mentioned user after homomorphic encryption is published to the above-mentioned blockchain for storage.
  • the above-mentioned server performs homomorphic encryption on the personal data obtained by the user who chooses to disclose, and publishes the homomorphically encrypted personal data of the user to the above-mentioned blockchain for storage, so as to ensure that the user Personal privacy.
  • the server in addition to publishing the obtained personal data of the user to the block in the blockchain connected to the server, the server can also store the personal data of the user.
  • the storage is based on the smart contract deployed in the blockchain connected to the server.
  • Smart contracts on the blockchain are contracts that can be triggered and executed by transactions on the blockchain. Smart contracts can be defined in the form of codes.
  • Ethereum Taking Ethereum as an example, it supports users to create and call some complex logic in the Ethereum network.
  • Ethereum is a programmable blockchain, and its core is the Ethereum Virtual Machine (EVM), and each Ethereum node can run the EVM.
  • EVM is a Turing complete virtual machine, through which various complex logic can be realized. Users who publish and call smart contracts in Ethereum run on the EVM.
  • EVM directly runs virtual machine code (virtual machine bytecode, hereinafter referred to as "bytecode”), so the smart contract deployed on the blockchain can be bytecode.
  • bytecode virtual machine code
  • each node can execute the transaction in the EVM; among them, the From field of the transaction is used to record the account that initiated the creation of the smart contract
  • the contract code saved in the field value of the Data field of the transaction can be bytecode, and the field value of the To field of the transaction is a null (empty) account.
  • a contract account corresponding to the smart contract appears on the blockchain and has a specific address; the contract code (Code) and account storage (Storage) will be stored in the account storage of the contract account.
  • the behavior of the smart contract is controlled by the contract code, and the account storage of the smart contract saves the state of the contract.
  • smart contracts enable virtual accounts containing contract codes and account storage to be generated on the blockchain.
  • the Data field containing the transaction that created the smart contract can store the bytecode of the smart contract.
  • the bytecode consists of a series of bytes, and each byte can identify an operation.
  • developers can choose a high-level language to write smart contract code instead of directly writing bytecode.
  • high-level languages such as Solidity, Serpent, and LLL languages can be used.
  • smart contract code written in a high-level language it can be compiled by a compiler to generate bytecode that can be deployed on the blockchain.
  • the contract code written with it is very similar to the class in the object-oriented programming language.
  • a variety of members can be declared in a contract, including state variables, functions, function modifiers, and events.
  • the state variable is a value permanently stored in the storage (Storage) field of the smart contract, and is used to save the state of the contract.
  • the server may store the personal data in the form of key-value pairs To the storage tree of the smart contract; among them, the key may specifically be the hash value calculated by a hash algorithm corresponding to the preset variable name of the personal data, and the value may specifically be the hash value calculated by the hash algorithm of the personal data.
  • the above-mentioned user can operate based on the above-mentioned client.
  • users can make friends, post, ask questions, and disclose information through the social section provided by the server through the client.
  • the user can initiate the operation of disclosing the personal data of the above-mentioned user based on the above-mentioned client.
  • the above-mentioned same user characteristics refer to any information with the same content in the above-mentioned personal data that multiple users choose to disclose during the execution of the above-mentioned target business.
  • the above server receives and responds to the above user’s initiation of the operation of publicizing the above user’s personal data, and combines the above user’s personal data stored in the blockchain with the other users’ personal data stored in the blockchain.
  • the above-mentioned target business selects the disclosed personal data for matching to determine whether the above-mentioned user’s personal data and other users’ personal data contain the same user characteristics.
  • the above-mentioned server matches the personal data A1 of user A stored in the blockchain with the personal data B1 that user B chooses to disclose when completing the above-mentioned target business stored in the blockchain to determine A1 Does B1 contain the same user characteristics
  • the above-mentioned server can also determine whether the personal data of the above-mentioned user and the personal data of the above-mentioned other users contain similar user characteristics.
  • User characteristics such as: similar age or similar region.
  • calculation process for matching and determining the same user characteristics can be executed on the blockchain or under the blockchain; when executed on the blockchain, the server can also be pre-created with The smart contract corresponding to the target business executes the same user feature matching logic declared by the smart contract to complete the matching determination of the same user feature for the target business.
  • the above-mentioned server recommends any of the above-mentioned other users to the above-mentioned user.
  • the above server stores the personal data A1 of user A stored in the blockchain.
  • the personal data B1 that user B chooses to disclose when completing the above target business is stored in the blockchain and contains the same user characteristics. B is recommended to user A.
  • the user after obtaining the user recommended by the server, the user can establish a social relationship and social communication with the recommended user through the client.
  • user A After obtaining the user B recommended by the server, user A can initiate the establishment of a social relationship with user B through the client. After the social relationship between user A and user B is established, user A and user B can proceed Social communication such as chat and interaction.
  • Remittance for studying abroad means that when a user is studying in a foreign school, the user is usually required to remit the expenses required for studying abroad to the remittance receiving account designated by the foreign school. Users can make remittances for studying abroad through the study abroad remittance service provided by Alipay.
  • the Alipay server When a user uses the Alipay APP to send remittances to the remittance recipient (for example, the remittance receiving account designated by the school where the user studies abroad), the Alipay server first receives the user’s remittance request for the overseas study remittance business initiated by the user through the Alipay APP.
  • the remittance recipient for example, the remittance receiving account designated by the school where the user studies abroad
  • the remittance request performs the KYC verification of the user’s identity, and verifies whether the remittance recipient and the remittance amount in the remittance request are true and legal; after the verification is passed, the Alipay server executes the study abroad remittance service and sends the user the execution result of the study abroad remittance service ; Among them, the execution result can be the success of the remittance or the failure of the remittance.
  • the user can send the Alipay APP to the Alipay server to disclose the personal data filled in the study abroad remittance business; the Alipay server publishes the obtained personal data of the user to the Alipay server. Blockchain for storage.
  • the Alipay server stores the user’s individual on the blockchain in the background. The data is matched with the personal data that other users choose to disclose. When the matching determines that there are the same user characteristics (for example, the same remittance recipient in the overseas study remittance business of multiple users), the Alipay server recommends the other user to this user user.
  • the user can initiate an application for establishing a social relationship (such as a friend relationship) to the other user.
  • a social relationship such as a friend relationship
  • the user and the other user can further conduct social communications such as friend chat, leave a message, and interact; at the same time, the The social relationship and social communication process established between the user and the other user can also be submitted to the blockchain by the Alipay server for further storage.
  • the Alipay server only recommends users to users who have successfully executed the remittance business for studying abroad, which greatly improves the accuracy of personal privacy protection and user recommendations.
  • the above-mentioned target business can also be the stock trading business provided by Alipay.
  • the Alipay server can make user recommendations based on the personal data that the user chooses to disclose and have the same user characteristics (such as buying the same stock).
  • the remittance services for studying abroad described above are similar, so I won’t repeat them here.
  • the personal data related to the user's execution target business is selected and published and released to the blockchain for storage; and, in response to the user's operation, the user and other users who have been stored in the blockchain
  • the personal data of the user is matched, and other users who have the same user characteristics as the user determined by the match are recommended to the user, providing multiple users performing the same target business with flexible ways and guarantees to establish credible social relationships.
  • this specification also provides an embodiment of a user recommendation device based on blockchain.
  • the embodiment of the block chain-based user recommendation device in this specification can be applied to electronic equipment.
  • the device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware.
  • Taking software implementation as an example as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • FIG. 2 it is a hardware structure diagram of the electronic device where the user recommendation device based on the blockchain of this specification is located, except for the processor, memory, network interface, and In addition to the volatile memory, the electronic device in which the device is located in the embodiment generally may include other hardware according to the actual function of the electronic device, which will not be repeated here.
  • Fig. 3 is a block diagram showing a block chain-based user recommendation device according to an exemplary embodiment of the present specification.
  • the block chain-based user recommendation device 30 can be applied to the electronic device shown in FIG. 2, and the device 30 includes:
  • the receiving module 301 receives a data disclosure request initiated by a user after completing a target business; wherein the data disclosure request includes personal data that is selected to be disclosed from business data related to the target business;
  • the publishing module 302 publishes the acquired personal data of the user to the blockchain for storage
  • the recommendation module 303 in response to the operation initiated by the user, compares the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the target business. The data is matched to determine whether the personal data of the user and the personal data of the other users contain the same user characteristics.
  • the recommendation module 303 is further configured to recommend any other user to the user when the personal data of the user and the personal data of any other user contain the same user characteristics.
  • the receiving module 301 further: in response to a service request for the target service initiated by the user, perform service verification for the service request, and the service verification includes verifying the user's identity. Verify and verify the authenticity of the service request; if the service verification for the user passes, execute the target service corresponding to the service request, and send the service execution result of the target service processing to the user, so The business execution result includes business data related to the target business.
  • the target business includes a study abroad remittance service
  • the same user characteristics include the same remittance recipient in the study abroad remittance service.
  • the recommendation module 303 further: match the personal data of the user stored in the block chain with the personal data stored in the block chain that other users choose to disclose when completing the remittance service for studying abroad. It is determined whether the personal data of the user and the personal data of the other users include the same remittance recipient.
  • the recommendation module 303 further: recommends any other user to the user when the personal data of the user and the personal data of any other user include the same remittance recipient.
  • the publishing module 302 further: performs homomorphic encryption on the acquired personal data of the user, and publishes the homomorphic encrypted personal data of the user to the blockchain for storage.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
  • the computer includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media, can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • the electronic device includes a processor and a memory for storing machine-executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus.
  • the device may also include an external interface to be able to communicate with other devices or components.
  • the data disclosure request includes selecting personal data to be disclosed from the business data related to the target business; publishing the acquired personal data of the user to the blockchain for storage; responding to The operation initiated by the user matches the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the target business to determine Whether the personal data of the user and the personal data of the other users contain the same user characteristics; when the personal data of the user and the personal data of any other user contain the same user characteristics, the personal data of any other user Recommend to the user.
  • the processor by reading and executing the machine executable instructions corresponding to the control logic recommended by the blockchain-based user stored in the memory, the processor is prompted: The service request of the service, the service verification is performed for the service request, and the service verification includes the identity verification of the user and the authenticity verification for the service request; if the service verification is for the user
  • the service execution result includes the service data related to the target service.
  • the target business includes a study abroad remittance service, and the same user characteristics include the same remittance recipient in the study abroad remittance service; by reading and executing the data stored in the memory and based on the block The machine executable instructions corresponding to the control logic recommended by the user of the chain, the processor is prompted:
  • the public personal data is selected for matching to determine whether the personal data of the user and the personal data of the other users contain the same remittance recipient.
  • the processor by reading and executing the machine executable instructions corresponding to the control logic recommended by the blockchain-based user stored in the memory, the processor is prompted to: When the personal data of another user includes the same remittance recipient, recommend any other user to the user.
  • the processor by reading and executing the machine executable instructions corresponding to the control logic recommended by the blockchain-based user stored in the memory, the processor is prompted to: The data performs homomorphic encryption, and the user's personal data after homomorphic encryption is released to the blockchain for storage.
  • first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as second information, and similarly, the second information may also be referred to as first information.
  • word “if” as used herein can be interpreted as "when” or “when” or "in response to determination”.

Abstract

A user recommendation method and apparatus based on a blockchain, and an electronic device. The method may comprise: receiving a data disclosure request that is initiated by a user after he/she completes a target service, wherein the data disclosure request comprises personal data that is chosen to be disclosed from service data related to the target service; publishing the acquired personal data of the user to a blockchain for storage; in response to an operation initiated by the user, matching the personal data of the user stored in the blockchain with personal data that is stored in the blockchain and is chosen to be disclosed when other users complete the target service, so as to determine whether the personal data of the user and the personal data of the other users include the same user characteristic; and when the personal data of the user and the personal data of any other user include the same user characteristic, recommending any of the other users to the user.

Description

基于区块链的用户推荐Blockchain-based user recommendation 技术领域Technical field
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种基于区块链的用户推荐方法及装置、电子设备。One or more embodiments of this specification relate to the field of blockchain technology, and in particular to a method and device for user recommendation based on blockchain, and electronic equipment.
背景技术Background technique
区块链技术,也被称之为分布式账本技术,是一种由若干台计算设备共同参与“记账”,共同维护一份完整的分布式数据库的新兴技术。由于区块链技术具有去中心化、公开透明、每台计算设备可以参与数据库记录、并且各计算设备之间可以快速的进行数据同步的特性,使得区块链技术已在众多的领域中广泛的进行应用。Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices participate in "bookkeeping" and jointly maintain a complete distributed database. Because the blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database records, and the rapid data synchronization between computing devices, the blockchain technology has been widely used in many fields. To apply.
发明内容Summary of the invention
本说明书提出一种基于区块链的用户推荐方法,所述方法包括:接收用户在完成目标业务后,发起的数据公开请求,所述数据公开请求包括从与所述目标业务相关的业务数据中选择公开的个人数据;将获取到的所述用户的个人数据发布至所述区块链进行存储;响应于所述用户发起的操作,将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征;在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户。This specification proposes a block chain-based user recommendation method. The method includes: receiving a data disclosure request initiated by a user after completing a target business, and the data disclosure request includes data from the business data related to the target business Select public personal data; publish the acquired personal data of the user to the blockchain for storage; in response to the operation initiated by the user, store the personal data of the user on the blockchain, Match with the personal data stored by the blockchain that other users choose to disclose when completing the target business to determine whether the personal data of the user and the personal data of the other users contain the same user characteristics; When the personal data of the user and the personal data of any other user contain the same user characteristics, the any other user is recommended to the user.
可选的,还包括:响应于用户发起的针对所述目标业务的业务请求,针对所述业务请求进行业务校验,所述业务校验包括对所述用户的身份校验和针对所述业务请求的真实性校验;如果针对所述用户的业务校验通过,执行与所述业务请求对应的目标业务,并向用户发送所述目标业务处理的业务执行结果,所述业务执行结果包括与所述目标业务相关的业务数据。Optionally, the method further includes: in response to a service request for the target service initiated by a user, performing service verification for the service request, the service verification including verification of the user's identity and verification for the service The authenticity of the request is verified; if the service verification for the user passes, the target service corresponding to the service request is executed, and the service execution result of the target service processing is sent to the user. The service execution result includes and Business data related to the target business.
可选的,所述目标业务包括留学汇款业务,所述相同的用户特征包括所述留学汇款业务中具有的相同的汇款接收方。所述将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征,包括:将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述留学汇款业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的汇款接收方。Optionally, the target business includes a study abroad remittance service, and the same user characteristics include the same remittance recipient in the study abroad remittance service. The personal data of the user stored in the blockchain is matched with the personal data stored in the blockchain that other users choose to disclose when completing the target business, so as to determine the user's personal data Whether the data and the personal data of the other users contain the same user characteristics, including: the personal data of the user stored in the block chain, and the personal data of the user stored in the block chain when the other users complete the remittance for studying abroad During the business, the public personal data is selected for matching to determine whether the personal data of the user and the personal data of the other users contain the same remittance recipient.
可选的,所述在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特 征时,将所述任一其他用户推荐给所述用户,包括:在所述用户的个人数据与任一其他用户的个人数据包含相同的汇款接收方时,将所述任一其他用户推荐给所述用户。Optionally, when the personal data of the user and the personal data of any other user contain the same user characteristics, recommending any other user to the user includes: the personal data of the user When the personal data of any other user contains the same remittance recipient, recommend any other user to the user.
可选的,所述将获取到的所述用户的个人数据发布至所述区块链进行存储,包括:对获取到的所述用户的个人数据执行同态加密,将同态加密后的所述用户的个人数据发布至所述区块链进行存储。Optionally, publishing the acquired personal data of the user to the blockchain for storage includes: performing homomorphic encryption on the acquired personal data of the user, and homomorphic encryption of all the obtained personal data of the user. The personal data of the user is published to the blockchain for storage.
本说明书还提出一种基于区块链的用户推荐装置,所述装置包括:接收模块,接收用户在完成目标业务后,发起的数据公开请求,所述数据公开请求包括从与所述目标业务相关的业务数据中选择公开的个人数据;发布模块,将获取到的所述用户的个人数据发布至所述区块链进行存储;推荐模块,响应于所述用户发起的操作,将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征。This specification also proposes a block chain-based user recommendation device. The device includes: a receiving module that receives a data disclosure request initiated by a user after completing the target business, and the data disclosure request includes information related to the target business. Select the public personal data from the business data of the user; the publishing module, which publishes the acquired personal data of the user to the blockchain for storage; the recommendation module, which in response to the operation initiated by the user, sends the block The user’s personal data stored in the blockchain is matched with the personal data stored in the blockchain that other users choose to disclose when completing the target business, so as to determine whether the user’s personal data matches the other users’ personal data. Does the personal data contain the same user characteristics.
可选地,所述推荐模块进一步在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户。Optionally, the recommendation module further recommends any other user to the user when the personal data of the user and the personal data of any other user contain the same user characteristics.
可选的,所述接收模块进一步:响应于用户发起的针对所述目标业务的业务请求,针对所述业务请求进行业务校验,所述业务校验包括对所述用户的身份校验和针对所述业务请求的真实性校验;如果针对所述用户的业务校验通过,执行与所述业务请求对应的目标业务,并向用户发送所述目标业务处理的业务执行结果,所述业务执行结果包括与所述目标业务相关的业务数据。Optionally, the receiving module further: in response to a service request for the target service initiated by the user, perform service verification for the service request, and the service verification includes a verification of the user's identity and Verification of the authenticity of the service request; if the service verification for the user passes, execute the target service corresponding to the service request, and send the service execution result of the target service processing to the user, the service execution The result includes business data related to the target business.
可选的,所述目标业务包括留学汇款业务,所述相同的用户特征包括所述留学汇款业务中具有的相同的汇款接收方。所述推荐模块进一步将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述留学汇款业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的汇款接收方。Optionally, the target business includes a study abroad remittance service, and the same user characteristics include the same remittance recipient in the study abroad remittance service. The recommendation module further matches the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the study abroad remittance business, to determine the Whether the personal data of the user and the personal data of the other users include the same remittance recipient.
可选的,所述推荐模块进一步在所述用户的个人数据与任一其他用户的个人数据包含相同的汇款接收方时,将所述任一其他用户推荐给所述用户。Optionally, the recommendation module further recommends any other user to the user when the personal data of the user and the personal data of any other user include the same remittance recipient.
可选的,所述发布模块进一步对获取到的所述用户的个人数据执行同态加密,将同态加密后的所述用户的个人数据发布至所述区块链进行存储。Optionally, the publishing module further performs homomorphic encryption on the acquired personal data of the user, and publishes the homomorphic encrypted personal data of the user to the blockchain for storage.
在以上技术方案中,基于将用户的执行目标业务相关的个人数据进行选择公开并发布至区块链进行存储;以及,响应于用户的操作,对已存储于区块链中的用户和其他用户的个人数据进行匹配,将匹配确定的与该用户于包含相同的用户特征的其他用户推荐给该用户,为执行相同目标业务的多个用户提供灵活建立可信社交关系的途径和保障。In the above technical solution, the personal data related to the user's execution target business is selected and published and released to the blockchain for storage; and, in response to the user's operation, the user and other users who have been stored in the blockchain The personal data of the user is matched, and other users who have the same user characteristics as the user determined by the match are recommended to the user, providing multiple users performing the same target business with flexible ways and guarantees to establish credible social relationships.
附图说明Description of the drawings
图1是本说明书一实施例提供的一种基于区块链的用户推荐方法的流程图;FIG. 1 is a flowchart of a method for user recommendation based on blockchain according to an embodiment of this specification;
图2是本说明书一实施例提供的一种电子设备的结构示意图;FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of this specification;
图3是本说明书一实施例提供的一种基于区块链的用户推荐装置的框图。Fig. 3 is a block diagram of a block chain-based user recommendation device provided by an embodiment of the present specification.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with one or more embodiments of this specification. Rather, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。It should be noted that in other embodiments, the steps of the corresponding method may not be executed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step in other embodiments. describe.
为了方便理解,这里先简单介绍下区块链相关的概念和基础原理。In order to facilitate understanding, here is a brief introduction to the concepts and basic principles related to the blockchain.
区块链一般被划分为三种类型:公有链(Public Blockchain),私有链(Private Blockchain)和联盟链(Consortium Blockchain)。此外,还可以有上述多种类型的结合,比如私有链+联盟链、联盟链+公有链等。Blockchain is generally divided into three types: Public Blockchain, Private Blockchain and Consortium Blockchain. In addition, there can also be a combination of the above types, such as private chain + consortium chain, consortium chain + public chain, and so on.
其中,去中心化程度最高的是公有链。公有链以比特币、以太坊为代表,加入公有链的参与者(也可称为区块链中的节点)可以读取链上的数据记录、参与交易、以及竞争新区块的记账权等。而且,各节点可自由加入或者退出网络,并进行相关操作。Among them, the most decentralized one is the public chain. The public chain is represented by Bitcoin and Ethereum. Participants who join the public chain (also called nodes in the blockchain) can read the data records on the chain, participate in transactions, and compete for the accounting rights of new blocks, etc. . Moreover, each node can freely join or exit the network, and perform related operations.
私有链则相反,该网络的写入权限由某个组织或者机构控制,数据读取权限受组织规定。简单来说,私有链可以为一个弱中心化系统,其对节点具有严格限制且节点数量较少。这种类型的区块链更适合于特定机构内部使用。The private chain is the opposite. The write permission of the network is controlled by an organization or institution, and the data read permission is regulated by the organization. In simple terms, a private chain can be a weakly centralized system with strict restrictions on nodes and a small number of nodes. This type of blockchain is more suitable for internal use by specific institutions.
联盟链则是介于公有链以及私有链之间的区块链,可实现“部分去中心化”。联盟链中各个节点通常有与之相对应的实体机构或者组织;节点通过授权加入网络并组成利益相关联盟,共同维护区块链运行。Consortium chain is a block chain between public chain and private chain, which can realize "partial decentralization". Each node in the alliance chain usually has a corresponding entity or organization; nodes are authorized to join the network and form a stakeholder alliance to jointly maintain the operation of the blockchain.
基于区块链的基本特性,区块链通常是由若干个区块构成。在这些区块中分别记录有与该区块的创建时刻对应的时间戳,所有的区块严格按照区块中记录的时间戳,构成一条在时间上有序的数据链条。Based on the basic characteristics of the blockchain, the blockchain is usually composed of several blocks. The time stamps corresponding to the creation time of the block are respectively recorded in these blocks, and all the blocks strictly follow the time stamps recorded in the block to form a time-ordered data chain.
对于物理世界产生的真实数据,可以将其构建成区块链所支持的标准的交易(transaction)格式,然后发布至区块链,由区块链中的节点设备对收到的交易进行共识处理,并在达成共识后,由区块链中作为记账节点的节点设备,将这笔交易打包进区块,在区块链中进行持久化存证。For the real data generated in the physical world, it can be constructed into a standard transaction format supported by the blockchain, and then published to the blockchain, and the node devices in the blockchain will perform consensus processing on the received transactions , And after reaching a consensus, the node device as the bookkeeping node in the block chain will package the transaction into the block and carry out persistent storage in the block chain.
其中,区块链中支持的共识算法可以包括:Among them, the consensus algorithms supported in the blockchain can include:
第一类共识算法,即节点设备需要争夺每一轮的记账周期的记账权的共识算法;例如,工作量证明(Proof of Work,POW)、股权证明(Proof of Stake,POS)、委任权益证明(Delegated Proof of Stake,DPOS)等共识算法;The first type of consensus algorithm, that is, the consensus algorithm that node devices need to compete for the accounting right of each round of accounting cycle; for example, Proof of Work (POW), Proof of Stake (POS), appointment Consensus algorithms such as Delegated Proof of Stake (DPOS);
第二类共识算法,即预先为每一轮记账周期选举记账节点(不需要争夺记账权)的共识算法;例如,实用拜占庭容错(Practical Byzantine Fault Tolerance,PBFT)等共识算法。The second type of consensus algorithm is a consensus algorithm that pre-selects accounting nodes for each round of accounting cycles (without competing for accounting rights); for example, practical Byzantine Fault Tolerance (PBFT) and other consensus algorithms.
在采用第一类共识算法的区块链网络中,争夺记账权的节点设备,都可以在接收到交易后执行该笔交易。争夺记账权的节点设备中可能有一个节点设备在本轮争夺记账权的过程中胜出,成为记账节点。记账节点可以将收到的交易与其它交易一起打包以生成候选区块,并将生成的候选区块或者该候选区块的区块头发送至其它节点设备进行共识。In the blockchain network using the first type of consensus algorithm, all node devices that compete for the right to keep accounts can execute the transaction after receiving the transaction. Among the node devices that compete for the right to bookkeeping, one node device may win this round of contention for the right to bookkeeping and become the bookkeeping node. The accounting node can package the received transaction with other transactions to generate a candidate block, and send the generated candidate block or the block header of the candidate block to other node devices for consensus.
在采用第二类共识算法的区块链网络中,具有记账权的节点设备在本轮记账前已经商定好。因此,节点设备在接收到交易后,如果自身不是本轮的记账节点,则可以将该交易发送至记账节点。对于本轮的记账节点,在将该交易与其它交易一起打包以生成候选区块的过程中或者之前,可以执行该交易。记账节点在生成候选区块后,可以将该候选区块或者该候选区块的区块头发送至其它节点设备进行共识。In the blockchain network using the second type of consensus algorithm, the node device with the right to book accounts has been agreed before this round of bookkeeping. Therefore, after the node device receives the transaction, if it is not the accounting node of this round, it can send the transaction to the accounting node. For the billing node of this round, the transaction can be executed during or before the process of packaging the transaction with other transactions to generate a candidate block. After the accounting node generates the candidate block, it can send the candidate block or the block header of the candidate block to other node devices for consensus.
如上所述,无论区块链采用以上示出的哪种共识算法,本轮的记账节点都可以将接收到的交易打包以生成候选区块,并将生成的候选区块或者该候选区块的区块头发送至其它节点设备进行共识验证。如果其它节点设备接收到候选区块或者该候选区块的区块头后,经验证没有问题,可以将该候选区块作为最新区块追加到原有的区块链末尾,从而完成区块链的记账过程。其它节点验证记账节点发来的新的区块或区块头的过程中,也可以执行该区块中的包含的交易。As mentioned above, no matter which consensus algorithm shown above is adopted by the blockchain, the accounting node in this round can package the received transaction to generate a candidate block, and the generated candidate block or the candidate block The header of the block is sent to other node devices for consensus verification. If other node devices receive the candidate block or the block header of the candidate block, and there is no problem after verification, the candidate block can be appended to the end of the original blockchain as the latest block to complete the block chain. Accounting process. In the process of other nodes verifying the new block or block header sent by the accounting node, the transactions contained in the block can also be executed.
在区块链领域,有一个重要的概念就是账户(Account);以以太坊为例,以太坊通常将账户划分为外部账户和合约账户两类;外部账户就是由用户直接控制的账户,也称之为用户账户;而合约账户则是由用户通过外部账户创建的,包含合约代码的账户(即智能合约)。In the field of blockchain, an important concept is Account; taking Ethereum as an example, Ethereum usually divides accounts into external accounts and contract accounts; external accounts are accounts directly controlled by users, also called It is a user account; while a contract account is an account created by a user through an external account and contains the contract code (ie smart contract).
当然,对于一些基于以太坊的架构而衍生出的区块链模型(比如蚂蚁区块链),还可以对区块链支持的账户类型,进行进一步的扩展,在本说明书中不进行特别限定。Of course, for some blockchain models derived from the Ethereum architecture (such as the Ant blockchain), the account types supported by the blockchain can also be further extended, which is not particularly limited in this specification.
对于区块链中的账户而言,通常会通过一个结构体,来维护账户的账户状态。当区 块中的交易被执行后,区块链中与该交易相关的账户的状态通常也会发生变化。For accounts in the blockchain, a structure is usually used to maintain the account status of the account. When the transaction in the block is executed, the state of the account related to the transaction in the blockchain will usually also change.
以以太坊为例,账户的结构体通常包括Balance,Nonce,Code和Storage等字段。其中:Taking Ethereum as an example, the structure of an account usually includes fields such as Balance, Nonce, Code, and Storage. in:
Balance字段,用于维护账户目前的账户余额;The Balance field is used to maintain the current account balance of the account;
Nonce字段,用于维护该账户的交易次数;它是用于保障每笔交易能且只能被处理一次的计数器,有效避免重放攻击;The Nonce field is used to maintain the number of transactions of the account; it is a counter used to ensure that each transaction can be processed and can only be processed once, effectively avoiding replay attacks;
Code字段,用于维护该账户的合约代码;在实际应用中,Code字段中通常仅维护合约代码的hash值;因而,Code字段通常也称之为Codehash字段。The Code field is used to maintain the contract code of the account; in actual applications, the Code field usually only maintains the hash value of the contract code; therefore, the Code field is usually also called the Codehash field.
Storage字段,用于维护该账户的存储内容(默认字段值为空);对于合约账户而言,通常会分配一个独立的存储空间,用以存储该合约账户的存储内容;该独立的存储空间通常称之为该合约账户的账户存储。合约账户的存储内容通常会构建成MPT(Merkle Patricia Trie)树的数据结构存储在上述独立的存储空间之中;其中,基于合约账户的存储内容构建成的MPT树,通常也称之为Storage树。而Storage字段通常仅维护该Storage树的根节点;因此,Storage字段通常也称之为StorageRoot字段。The Storage field is used to maintain the storage content of the account (the default field value is empty); for contract accounts, an independent storage space is usually allocated to store the storage content of the contract account; the independent storage space is usually Call it the account storage of the contract account. The storage content of the contract account is usually constructed as an MPT (Merkle Patricia Trie) tree and the data structure is stored in the above independent storage space; among them, the MPT tree constructed based on the storage content of the contract account is usually also called the Storage tree . The Storage field usually only maintains the root node of the Storage tree; therefore, the Storage field is usually also called the StorageRoot field.
其中,对于外部账户而言,以上示出的Code字段和Storage字段的字段值均为空值。Among them, for the external account, the field values of the Code field and the Storage field shown above are all null values.
对于大多数区块链模型,通常都会使用Merkle树;或者,基于Merkle树的数据结构,来存储和维护数据。以以太坊为例,以太坊使用了MPT树(一种Merkle树变种),作为数据组织形式,用来组织和管理账户状态、交易信息等重要数据。For most blockchain models, Merkle trees are usually used; or, based on the data structure of Merkle trees, to store and maintain data. Take Ethereum as an example. Ethereum uses MPT tree (a variant of Merkle tree) as a form of data organization to organize and manage important data such as account status and transaction information.
以太坊针对区块链中需要存储和维护的数据,设计了三棵MPT树,分别是MPT状态树、MPT交易树和MPT收据树。其中,除了以上三棵MPT树以外,实际上还存在一棵基于合约账户的存储内容构建的Storage树。Ethereum has designed three MPT trees for the data that needs to be stored and maintained in the blockchain, namely the MPT state tree, the MPT transaction tree and the MPT receipt tree. Among them, in addition to the above three MPT trees, there is actually a Storage tree constructed based on the storage content of the contract account.
MPT状态树,是由区块链中所有账户的账户状态(state)数据组织成的MPT树;MPT交易树,是由区块链中的交易(transaction)数据组织成的MPT树;MPT收据树,是区块中的交易在执行完毕后生成的与每笔交易对应的交易(receipt)收据组织成的MPT树。以上示出的MPT状态树、MPT交易树和MPT收据树的根节点的hash值,最终都会被添加至对应区块的区块头中。MPT state tree is an MPT tree organized by the account state data of all accounts in the blockchain; MPT transaction tree is an MPT tree organized by transaction data in the blockchain; MPT receipt tree , Is the MPT tree organized by the receipt of each transaction generated after the transactions in the block are executed. The hash values of the root nodes of the MPT state tree, MPT transaction tree, and MPT receipt tree shown above will all be added to the block header of the corresponding block eventually.
其中,MPT交易树和MPT收据树均与区块相对应,即每一个区块都有自己的MPT交易树和MPT收据树。而MPT状态树是一个全局的MPT树,并不与某一个特定的区块相对应,而是涵盖了区块链中所有账户的账户状态数据。Among them, the MPT transaction tree and MPT receipt tree correspond to blocks, that is, each block has its own MPT transaction tree and MPT receipt tree. The MPT state tree is a global MPT tree, which does not correspond to a specific block, but covers the account state data of all accounts in the blockchain.
对于组织成的MPT交易树、MPT收据树和MPT状态树,最终都会在采用多级数据存储结构的Key-Value型数据库(比如,LevelDB)中进行存储。The organized MPT transaction tree, MPT receipt tree, and MPT state tree will eventually be stored in a Key-Value database (for example, LevelDB) that uses a multi-level data storage structure.
而采用多级数据存储结构的上述数据库,通常采用多级数据存储的结构,可以被划 分为n级数据存储;例如,各级数据存储可以依次设为L0,L1,L2,L3....L(n-1);对于上述数据库中的各级数据存储而言,等级编号越小通常级别越高;例如,L0存储的是最新的若干区块的数据,L1存储的是次新的若干区块的数据,以此类推。The above-mentioned database with a multi-level data storage structure usually adopts a multi-level data storage structure, which can be divided into n-level data storage; for example, each level of data storage can be set to L0, L1, L2, L3... L(n-1); For all levels of data storage in the above database, the smaller the level number, the higher the level; for example, L0 stores the latest blocks of data, and L1 stores the newest blocks. Block data, and so on.
其中,各级数据存储对应的存储介质的读写性能,通常也可以存在性能差异;例如,级别高(即等级编号较小的)的数据存储对应的存储介质的读写性能,可以高于级别低的数据存储对应的存储介质的读写性能。在实际应用中,级别高的数据存储,可以使用存储成本较高,存储性能较优的存储介质;而级别低的数据存储,可以使用单位成本低,且容量较大的存储介质。Among them, the read and write performance of storage media corresponding to all levels of data storage may also generally have performance differences; for example, the read and write performance of storage media corresponding to data storage with a high level (ie, with a smaller level number) can be higher than the level Low data storage corresponds to the read and write performance of the storage medium. In practical applications, high-level data storage can use storage media with higher storage costs and better storage performance; while low-level data storage can use storage media with low unit cost and larger capacity.
在实际应用中,随着区块链的区块号的增长(也称之为区块高度),在数据库中存储的数据,会包含很多历史数据;而且,区块号越小的区块中的数据越久远,越不重要。因此,为了降低整体的存储成本,通常可以对不同区块高度的数据进行“区别对待”;例如,可以将区块号较小的区块中的数据,存储至成本较低的存储介质上;而将区块号较大的区块中的数据,存储在成本较高的存储介质上。In practical applications, as the block number of the blockchain increases (also called block height), the data stored in the database will contain a lot of historical data; moreover, the smaller the block number, the smaller the block number. The older the data, the less important it is. Therefore, in order to reduce the overall storage cost, data of different block heights can usually be "differentiated"; for example, data in a block with a smaller block number can be stored on a storage medium with a lower cost; The data in the block with the larger block number is stored on a storage medium with a higher cost.
需要说明的是,区块链每产生一个最新区块,则在该最新区块中的交易被执行之后,区块链中这些被执行交易的相关账户(可以是外部账户也可以是合约账户)的账户状态,通常也会随之发生变化;It should be noted that each time the blockchain generates a newest block, after the transaction in the latest block is executed, the relevant account of the executed transaction in the blockchain (can be an external account or a contract account) The account status of, usually will also change accordingly;
例如,当区块中的一笔“转账交易”执行完毕后,与该“转账交易”相关的转出方账户和转入方账户的余额(即这些账户的Balance字段的字段值),通常也会随之发生变化。For example, when a "transfer transaction" in the block is executed, the balances of the transferor account and transferee account related to the "transfer transaction" (that is, the field value of the Balance field of these accounts) are usually also Will change accordingly.
而节点设备在区块链产生的最新区块中的交易执行完毕后,由于当前区块链中的账户状态发生了变化,因此节点设备需要根据区块链中所有账户当前的账户状态数据,来构建MPT状态树,用于维护区块链中所有账户的最新状态。After the transaction of the node device in the latest block generated by the blockchain is completed, because the account status in the current blockchain has changed, the node device needs to use the current account status data of all accounts in the blockchain to Construct the MPT state tree to maintain the latest state of all accounts in the blockchain.
也即,每当区块链中产生一个最新区块,并且该最新区块中的交易执行完毕后,导致区块链中的账户状态发生了变化,节点设备都需要基于区块链中所有账户最新的账户状态数据,重新构建一棵MPT状态树。换句话说,区块链中每一个区块,都有一个与之对应的MPT状态树;该MPT状态树,维护了在该区块中的交易在执行完毕后,区块链中所有账户最新的账户状态。That is, whenever a newest block is generated in the blockchain, and the transaction in the latest block is executed, the account status in the blockchain changes, and the node device needs to be based on all accounts in the blockchain With the latest account status data, rebuild an MPT status tree. In other words, each block in the blockchain has a corresponding MPT state tree; the MPT state tree maintains that after the transactions in the block are executed, all accounts in the blockchain are up to date The status of the account.
本说明书中,旨在提出一种将用户执行目标业务相关的个人数据进行选择公开并发布至区块链进行存储,并依据个人数据匹配进行用户推荐的技术方案。In this manual, the purpose of this manual is to propose a technical solution that selects and discloses personal data related to the user's execution of the target business and publishes it to the blockchain for storage, and performs user recommendation based on personal data matching.
在实现时,为用户提供目标业务的服务端,接收用户在完成目标业务后,发起的数据公开请求;其中,该数据公开请求包括从与该目标业务相关的业务数据中选择公开的个人数据。In implementation, a server that provides users with the target business receives a data disclosure request initiated by the user after completing the target business; wherein the data disclosure request includes selecting personal data to be disclosed from business data related to the target business.
进一步地,该服务端将获取到的该用户的个人数据发布至区块链进行存储;响应于 该用户发起的操作,将区块链存储的该用户的个人数据,与区块链存储的由其他用户在完成该目标业务时选择公开的个人数据进行匹配,以确定该用户的个人数据与该其他用户的个人数据是否包含相同的用户特征;在该用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将该任一其他用户推荐给该用户。Further, the server publishes the acquired personal data of the user to the blockchain for storage; in response to the operation initiated by the user, the personal data of the user stored in the blockchain is combined with the data stored in the blockchain. When other users complete the target business, they choose to match the disclosed personal data to determine whether the user’s personal data and the other users’ personal data contain the same user characteristics; when the user’s personal data matches any other user’s personal data When the data contains the same user characteristics, any other user is recommended to the user.
在以上技术方案中,基于将用户的执行目标业务相关的个人数据进行选择公开并发布至区块链进行存储;以及,响应于用户的操作,对已存储于区块链中的用户和其他用户的个人数据进行匹配,将匹配确定的与该用户于包含相同的用户特征的其他用户推荐给该用户,为执行相同目标业务的多个用户提供灵活建立可信社交关系的途径和保障。In the above technical solution, the personal data related to the user's execution target business is selected and published and released to the blockchain for storage; and, in response to the user's operation, the user and other users who have been stored in the blockchain The personal data of the user is matched, and other users who have the same user characteristics as the user determined by the match are recommended to the user, providing multiple users performing the same target business with flexible ways and guarantees to establish credible social relationships.
下面通过具体实施例并结合具体的应用场景对本说明书进行描述。This specification will be described below through specific embodiments in combination with specific application scenarios.
请参考图1,图1是本说明书一实施例提供的一种基于区块链的用户推荐方法,应用于为用户提供目标业务的服务端,该方法执行以下步骤:Please refer to Figure 1. Figure 1 is a blockchain-based user recommendation method provided by an embodiment of this specification, which is applied to a server that provides users with target services. The method performs the following steps:
步骤102、接收用户在完成目标业务后,发起的数据公开请求;其中,所述数据公开请求包括从与所述目标业务相关的业务数据中选择公开的个人数据。Step 102: Receive a data disclosure request initiated by the user after completing the target business; wherein the data disclosure request includes selecting personal data to be disclosed from business data related to the target business.
步骤104、将获取到的所述用户的个人数据发布至所述区块链进行存储。Step 104: Publish the acquired personal data of the user to the blockchain for storage.
步骤106、响应于所述用户发起的操作,将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征。Step 106: In response to the operation initiated by the user, combine the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the target business Matching is performed to determine whether the personal data of the user and the personal data of the other users contain the same user characteristics.
步骤108、在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户。Step 108: When the personal data of the user and the personal data of any other user contain the same user characteristics, recommend any other user to the user.
在本说明书中,上述目标业务可以包括任意类型的业务。例如,在实际应用中,上述目标业务可以包括金融业务、医疗业务、电商业务、城市服务业务、跨境汇款业务等。In this specification, the above-mentioned target business can include any type of business. For example, in practical applications, the aforementioned target business may include financial business, medical business, e-commerce business, city service business, cross-border remittance business, etc.
在本说明书中,上述服务端,可以包括为用户提供上述目标服务的机器或机器集群;其中,上述服务端可以通过对应的客户端为用户提供上述目标服务。In this specification, the above-mentioned server may include a machine or a cluster of machines that provides the user with the above-mentioned target service; wherein, the above-mentioned server may provide the user with the above-mentioned target service through a corresponding client.
例如,在实际应用中,上述服务端可以包括为用户提供金融业务、医疗业务、电商业务、城市服务业务、跨境业务等的支付宝服务端、淘宝/天猫服务端、阿里云服务端等。For example, in practical applications, the above-mentioned server may include Alipay, Taobao/Tmall, Alibaba Cloud, etc. that provide users with financial services, medical services, e-commerce services, urban services, cross-border services, etc. .
在本说明书中,上述服务端可以通过对应的客户端为用户提供上述目标业务。In this specification, the above-mentioned server can provide users with the above-mentioned target service through the corresponding client.
例如,在实际应用中,上述服务端为用户提供金融业务、医疗业务、电商业务、城市服务业务、跨境业务等的支付宝服务端、淘宝/天猫服务端、阿里云服务端;相应地,上述服务端可以通过接入对应的支付宝客户端、淘宝/天猫客户端、阿里云客户端,为用户提供金融业务、医疗业务、电商业务、城市服务业务、跨境汇款业务等服务。For example, in practical applications, the above-mentioned server provides users with financial services, medical services, e-commerce services, urban services, cross-border services, etc. Alipay services, Taobao/Tmall services, and Alibaba Cloud services; accordingly; The above-mentioned server can provide users with financial services, medical services, e-commerce services, city service services, cross-border remittance services and other services by connecting to the corresponding Alipay client, Taobao/Tmall client, and Alibaba Cloud client.
在本说明书中,上述服务端响应于用户发起的针对上述目标业务的业务请求,针对上述业务请求进行业务校验;其中,上述业务校验包括对上述用户的身份校验和针对上 述业务请求的真实性校验。In this specification, the above-mentioned server responds to a user-initiated service request for the above-mentioned target service, and performs service verification for the above-mentioned service request; wherein, the above-mentioned service verification includes the identity verification of the above-mentioned user and the verification of the above-mentioned service request. Authenticity verification.
例如,在实现时,上述服务端响应于用户通过上述客户端发起的针对上述目标业务的业务请求,针对该业务请求进行业务校验;其中,该业务校验包括基于KYC(Know Your Customer,KYC)规则对上述用户进行身份校验,以及基于真实性校验方法对该业务请求中信息进行真实性校验;其中,KYC规则相关的身份校验方法和真实性校验方法,在本说明书中不做具体限定。For example, in implementation, the above-mentioned server responds to a service request for the above-mentioned target service initiated by the user through the above-mentioned client, and performs a service verification for the service request; wherein, the service verification includes a service check based on KYC (Know Your Customer, KYC). ) The rules verify the identity of the above-mentioned users and verify the authenticity of the information in the service request based on the authenticity verification method; among them, the identity verification method and authenticity verification method related to the KYC rule are described in this specification There is no specific limitation.
在本说明书中,进一步地,如果针对上述用户的业务校验通过,上述服务端执行与上述业务请求对应的目标业务,并向用户发送上述目标业务处理的业务执行结果;其中,上述业务执行结果包括与该目标业务相关的业务数据。In this specification, further, if the service verification for the above-mentioned user passes, the above-mentioned server executes the target service corresponding to the above-mentioned service request, and sends the service execution result of the above-mentioned target service processing to the user; wherein, the above-mentioned service execution result Including business data related to the target business.
接着以上示例继续举例,如果基于KYC规则对上述用户的身份校验通过,以及针对该业务请求的真实性校验通过,则上述服务端执行与该业务请求对应的目标业务,并向用户发送该目标业务处理的业务执行结果;其中,该业务执行结果包括与该目标业务相关的业务数据。Then the above example continues with the example. If the identity verification of the user is passed based on the KYC rules and the authenticity verification of the service request is passed, the server executes the target service corresponding to the service request and sends the service to the user. The business execution result of the target business processing; where the business execution result includes business data related to the target business.
在本说明书中,用户在完成上述目标业务后,通过上述客户端向上述服务端发起数据公开请求;上述数据公开请求包括用户从与上述目标业务相关的业务数据中选择公开的个人数据。In this specification, after completing the above-mentioned target business, the user initiates a data disclosure request to the above-mentioned server through the above-mentioned client; the above-mentioned data disclosure request includes the user's selection of personal data to be disclosed from the business data related to the above-mentioned target business.
其中,上述个人数据,可以包括用户从与上述目标业务相关的业务数据中选择公开的任何类型的个人数据。The above-mentioned personal data may include any type of personal data that the user chooses to disclose from the business data related to the above-mentioned target business.
例如,上述个人数据具体可以包括与上述目标业务相关的个人信息,比如:国籍、年龄、性别、身份证件信息、联系方式、汇款信息、就读学校等。用户可以选择将上述个人数据中的部分或全部对外公开。For example, the aforementioned personal data may specifically include personal information related to the aforementioned target business, such as nationality, age, gender, identity document information, contact information, remittance information, school attending, etc. Users can choose to disclose some or all of the above personal data to the public.
在本说明书中,在接收到用户在完成上述目标业务后发起的上述数据公开请求后,上述服务端将获取到的上述用户的个人数据,发布至上述服务端对接的区块链中进行存储;其中,上述区块链的类型,在本说明书中不做具体限定。In this manual, after receiving the above-mentioned data disclosure request initiated by the user after completing the above-mentioned target business, the above-mentioned server will publish the obtained personal data of the above-mentioned user to the blockchain connected to the above-mentioned server for storage; Among them, the type of the above-mentioned blockchain is not specifically limited in this specification.
在示出的一种实施方式中,在将获取到的上述用户的个人数据发布至上述区块链进行存储的过程中,上述服务端对获取到的上述用户的个人数据执行同态加密,将同态加密后的上述用户的个人数据发布至上述区块链进行存储。In an embodiment shown, in the process of publishing the acquired personal data of the user to the blockchain for storage, the server performs homomorphic encryption on the acquired personal data of the user, and The personal data of the above-mentioned user after homomorphic encryption is published to the above-mentioned blockchain for storage.
例如,在实际应用中,上述服务端对获取到的用户选择公开的个人数据执行同态加密,将同态加密后的该用户的个人数据发布至上述区块链进行存储,以此来保证用户的个人隐私。For example, in practical applications, the above-mentioned server performs homomorphic encryption on the personal data obtained by the user who chooses to disclose, and publishes the homomorphically encrypted personal data of the user to the above-mentioned blockchain for storage, so as to ensure that the user Personal privacy.
当然,在实际应用中,除了可以将获取到的上述用户的个人数据,发布至上述服务端对接的区块链中区块进行存储外,上述服务端也可以将获取到的上述用户的个人数据,基于上述服务端对接的区块链中部署的智能合约(Smart contract)进行存储。Of course, in actual applications, in addition to publishing the obtained personal data of the user to the block in the blockchain connected to the server, the server can also store the personal data of the user. , The storage is based on the smart contract deployed in the blockchain connected to the server.
为了方便理解,这里简单介绍下智能合约。不论是公有链、私有链还是联盟链,都可能提供智能合约的功能。区块链上的智能合约是在区块链上可以被交易触发执行的合约。智能合约可以通过代码的形式定义。In order to facilitate understanding, here is a brief introduction to smart contracts. Whether it is a public chain, a private chain or a consortium chain, it is possible to provide the function of a smart contract. Smart contracts on the blockchain are contracts that can be triggered and executed by transactions on the blockchain. Smart contracts can be defined in the form of codes.
以以太坊为例,支持用户在以太坊网络中创建并调用一些复杂的逻辑。以太坊作为一个可编程区块链,其核心是以太坊虚拟机(EVM),每个以太坊节点都可以运行EVM。EVM是一个图灵完备的虚拟机,通过它可以实现各种复杂的逻辑。用户在以太坊中发布和调用智能合约就是在EVM上运行的。实际上,EVM直接运行的是虚拟机代码(虚拟机字节码,下简称“字节码”),所以部署在区块链上的智能合约可以是字节码。用户可以将一笔包含创建智能合约信息的交易(Transaction)发送到以太坊网络后,各节点均可以在EVM中执行这笔交易;其中,该交易的From字段用于记录发起创建智能合约的账户的地址,交易的Data字段的字段值保存的合约代码可以是字节码,交易的To字段的字段值为一个null(空)的账户。当节点间通过共识机制达成一致后,这个智能合约成功创建,后续用户可以调用这个智能合约。Taking Ethereum as an example, it supports users to create and call some complex logic in the Ethereum network. Ethereum is a programmable blockchain, and its core is the Ethereum Virtual Machine (EVM), and each Ethereum node can run the EVM. EVM is a Turing complete virtual machine, through which various complex logic can be realized. Users who publish and call smart contracts in Ethereum run on the EVM. In fact, EVM directly runs virtual machine code (virtual machine bytecode, hereinafter referred to as "bytecode"), so the smart contract deployed on the blockchain can be bytecode. After the user can send a transaction containing the information to create a smart contract to the Ethereum network, each node can execute the transaction in the EVM; among them, the From field of the transaction is used to record the account that initiated the creation of the smart contract The contract code saved in the field value of the Data field of the transaction can be bytecode, and the field value of the To field of the transaction is a null (empty) account. After the nodes reach an agreement through the consensus mechanism, the smart contract is successfully created, and subsequent users can call the smart contract.
智能合约创建后,区块链上出现一个与该智能合约对应的合约账户,并拥有一个特定的地址;合约代码(Code)和账户存储(Storage)将保存在该合约账户的账户存储中。智能合约的行为由合约代码控制,而智能合约的账户存储则保存了合约的状态。换句话说,智能合约使得区块链上产生包含合约代码和账户存储的虚拟账户。After the smart contract is created, a contract account corresponding to the smart contract appears on the blockchain and has a specific address; the contract code (Code) and account storage (Storage) will be stored in the account storage of the contract account. The behavior of the smart contract is controlled by the contract code, and the account storage of the smart contract saves the state of the contract. In other words, smart contracts enable virtual accounts containing contract codes and account storage to be generated on the blockchain.
前述提到,包含创建智能合约的交易的Data字段保存的可以是该智能合约的字节码。字节码由一连串的字节组成,每一字节可以标识一个操作。基于开发效率、可读性等多方面考虑,开发者可以不直接书写字节码,而是选择一门高级语言编写智能合约代码。例如,高级语言可以采用诸如Solidity、Serpent、LLL语言等。对于采用高级语言编写的智能合约代码,可以经过编译器编译,生成可以部署到区块链上的字节码。As mentioned above, the Data field containing the transaction that created the smart contract can store the bytecode of the smart contract. The bytecode consists of a series of bytes, and each byte can identify an operation. Based on many considerations such as development efficiency and readability, developers can choose a high-level language to write smart contract code instead of directly writing bytecode. For example, high-level languages such as Solidity, Serpent, and LLL languages can be used. For smart contract code written in a high-level language, it can be compiled by a compiler to generate bytecode that can be deployed on the blockchain.
以Solidity语言为例,用其编写的合约代码与面向对象编程语言中的类(Class)很相似,在一个合约中可以声明多种成员,包括状态变量、函数、函数修改器、事件等。状态变量是永久存储在智能合约的账户存储(Storage)字段中的值,用于保存合约的状态。Taking the Solidity language as an example, the contract code written with it is very similar to the class in the object-oriented programming language. A variety of members can be declared in a contract, including state variables, functions, function modifiers, and events. The state variable is a value permanently stored in the storage (Storage) field of the smart contract, and is used to save the state of the contract.
在示出的一种实施方式中,在将上述用户的个人数据,基于区块链中部署的智能合约存储的过程中,上述服务端可以将该个人数据以key-value键值对的形式存储到智能合约的storage树中;其中,key具体可以是该个人数据对应预设变量名经哈希算法计算得到的hash值,value具体可以是该个人数据经哈希算法计算得到的hash值。In the illustrated embodiment, in the process of storing the personal data of the user based on the smart contract deployed in the blockchain, the server may store the personal data in the form of key-value pairs To the storage tree of the smart contract; among them, the key may specifically be the hash value calculated by a hash algorithm corresponding to the preset variable name of the personal data, and the value may specifically be the hash value calculated by the hash algorithm of the personal data.
在本说明书中,上述用户可以基于上述客户端进行操作。例如,在实际应用中,用户可以通过上述客户端在上述服务端提供的社交板块进行交友、发帖、问答、信息公开等操作。In this specification, the above-mentioned user can operate based on the above-mentioned client. For example, in actual applications, users can make friends, post, ask questions, and disclose information through the social section provided by the server through the client.
在本说明书中,在上述用户的个人数据保存至区块链后,用户可以基于上述客户端 发起将上述用户的个人数据进行公开的操作。In this manual, after the personal data of the above-mentioned user is saved on the blockchain, the user can initiate the operation of disclosing the personal data of the above-mentioned user based on the above-mentioned client.
在本说明书中,上述相同的用户特征,是指在执行上述目标业务过程中,多个用户选择公开的上述个人数据中具有内容相同的任何信息。In this specification, the above-mentioned same user characteristics refer to any information with the same content in the above-mentioned personal data that multiple users choose to disclose during the execution of the above-mentioned target business.
在本说明书中,上述服务端接收并响应于上述用户发起将上述用户的个人数据进行公开的操作,并将区块链存储的上述用户的个人数据,与区块链存储的由其他用户在完成上述目标业务时选择公开的个人数据进行匹配,以确定上述用户的个人数据与其他用户的个人数据是否包含相同的用户特征。In this specification, the above server receives and responds to the above user’s initiation of the operation of publicizing the above user’s personal data, and combines the above user’s personal data stored in the blockchain with the other users’ personal data stored in the blockchain. The above-mentioned target business selects the disclosed personal data for matching to determine whether the above-mentioned user’s personal data and other users’ personal data contain the same user characteristics.
例如,在实际应用中,上述服务端将区块链存储的用户A的个人数据A1,与区块链存储的由用户B在完成上述目标业务时选择公开的个人数据B1进行匹配,以确定A1与B1是否包含相同的用户特征For example, in practical applications, the above-mentioned server matches the personal data A1 of user A stored in the blockchain with the personal data B1 that user B chooses to disclose when completing the above-mentioned target business stored in the blockchain to determine A1 Does B1 contain the same user characteristics
当然,在实际应用中,除了确定上述用户的个人数据与上述其他用户的个人数据是否包含相同的用户特征外,上述服务端也可以确定上述用户的个人数据与上述其他用户的个人数据是否包含相近的用户特征,比如:年龄相近或地域相近等。Of course, in practical applications, in addition to determining whether the personal data of the above-mentioned user and the personal data of the above-mentioned other users contain the same user characteristics, the above-mentioned server can also determine whether the personal data of the above-mentioned user and the personal data of the above-mentioned other users contain similar user characteristics. User characteristics, such as: similar age or similar region.
需要说明的是,匹配确定上述相同的用户特征的计算过程,可以在区块链上执行,也可以在区块链下执行;当在区块链上执行时,上述服务端还可以预先创建与上述目标业务对应的智能合约,执行所述智能合约所声明的上述相同的用户特征匹配的逻辑,以完成针对上述目标业务的上述相同的用户特征的匹配确定。It should be noted that the calculation process for matching and determining the same user characteristics can be executed on the blockchain or under the blockchain; when executed on the blockchain, the server can also be pre-created with The smart contract corresponding to the target business executes the same user feature matching logic declared by the smart contract to complete the matching determination of the same user feature for the target business.
在本说明书中,在上述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,上述服务端将上述任一其他用户推荐给上述用户。In this specification, when the personal data of the above-mentioned user and the personal data of any other user contain the same user characteristics, the above-mentioned server recommends any of the above-mentioned other users to the above-mentioned user.
例如,上述服务端将区块链存储的用户A的个人数据A1区块链存储的由用户B在完成上述目标业务时选择公开的个人数据B1,包含相同的用户特征,则上述服务端将用户B推荐给用户A。For example, the above server stores the personal data A1 of user A stored in the blockchain. The personal data B1 that user B chooses to disclose when completing the above target business is stored in the blockchain and contains the same user characteristics. B is recommended to user A.
在本说明书中,在获得上述服务端推荐的用户后,上述用户可以通过客户端与该推荐的用户建立社交关系和社交通信。In this specification, after obtaining the user recommended by the server, the user can establish a social relationship and social communication with the recommended user through the client.
接着以上示例继续举例,在获得上述服务端推荐的用户B后,用户A可以通过客户端与用户B发起建立社交关系,在用户A和用户B的社交关系建立后,用户A和用户B可以进行聊天、互动等社交通信。The above example continues with the example. After obtaining the user B recommended by the server, user A can initiate the establishment of a social relationship with user B through the client. After the social relationship between user A and user B is established, user A and user B can proceed Social communication such as chat and interaction.
为了方便整体理解,以下以上述目标业务为支付宝提供的留学汇款业务为例,并通过具体的实施例对本说明书的技术方案进行简要描述。In order to facilitate the overall understanding, the following takes the above-mentioned target business as the overseas study remittance service provided by Alipay as an example, and a brief description of the technical solutions in this specification through specific embodiments.
留学汇款是指,当用户在国外学校就读时,通常需要用户在国内将留学所需费用汇款至就读国外学校所指定的汇款接收账号。用户可以通过支付宝提供的留学汇款业务进行留学汇款。Remittance for studying abroad means that when a user is studying in a foreign school, the user is usually required to remit the expenses required for studying abroad to the remittance receiving account designated by the foreign school. Users can make remittances for studying abroad through the study abroad remittance service provided by Alipay.
在用户通过支付宝APP进行向汇款接收方(比如:用户留学就读学校指定的汇款接收账号)进行留学汇款时,支付宝服务端首先接收用户通过支付宝APP发起的针对留学汇款业务的汇款请求(,并对该汇款请求进行用户身份的KYC校验,并验证该汇款请求中的汇款接收方和汇款金额是否真实合法;在验证通过后支付宝服务端执行留学汇款业务,并向用户发送留学汇款业务的执行结果;其中,执行结果可以为汇款成功或汇款失败。When a user uses the Alipay APP to send remittances to the remittance recipient (for example, the remittance receiving account designated by the school where the user studies abroad), the Alipay server first receives the user’s remittance request for the overseas study remittance business initiated by the user through the Alipay APP. The remittance request performs the KYC verification of the user’s identity, and verifies whether the remittance recipient and the remittance amount in the remittance request are true and legal; after the verification is passed, the Alipay server executes the study abroad remittance service and sends the user the execution result of the study abroad remittance service ; Among them, the execution result can be the success of the remittance or the failure of the remittance.
进一步地,在留学汇款业务执行成功后,用户可以支付宝APP向支付宝服务端发送将留学汇款业务中填写的个人数据进行公开的数据公开请求;支付宝服务端将获取到的用户公开的个人数据发布至区块链进行存储。Furthermore, after the overseas study remittance business is successfully executed, the user can send the Alipay APP to the Alipay server to disclose the personal data filled in the study abroad remittance business; the Alipay server publishes the obtained personal data of the user to the Alipay server. Blockchain for storage.
同时,用户还可以通过支付宝APP在支付宝的社交板块(比如:留学圈子)进行发帖、问答、信息公开等操作,响应于用户发起的操作支付宝服务端在后台将区块链存储的该用户的个人数据与由其他用户选择公开的个人数据进行匹配,在匹配确定存在相同的用户特征(比如:多个用户留学汇款业务中具有的相同的汇款接收方)时,支付宝服务端该其他用户推荐给该用户。At the same time, users can also use the Alipay APP to post, ask questions, and disclose information on Alipay’s social section (such as the study abroad circle). In response to user-initiated operations, the Alipay server stores the user’s individual on the blockchain in the background. The data is matched with the personal data that other users choose to disclose. When the matching determines that there are the same user characteristics (for example, the same remittance recipient in the overseas study remittance business of multiple users), the Alipay server recommends the other user to this user user.
进一步地,该用户可以向该其他用户发起建立社交关系(比如:好友关系)的申请,在申请通过后,该用户与该其他用户可以进一步进行好友聊天、留言、互动等社交通信;同时,该用户与该其他用户已建立的社交关系和社交通信过程,也可以被支付宝服务端提交至区块链中进一步保存。Further, the user can initiate an application for establishing a social relationship (such as a friend relationship) to the other user. After the application is approved, the user and the other user can further conduct social communications such as friend chat, leave a message, and interact; at the same time, the The social relationship and social communication process established between the user and the other user can also be submitted to the blockchain by the Alipay server for further storage.
需要说明的时,支付宝服务端只向在留学汇款业务执行成功的用户进行用户推荐,由此极大提高了个人隐私保护以及用户推荐的精准性。When it is necessary to explain, the Alipay server only recommends users to users who have successfully executed the remittance business for studying abroad, which greatly improves the accuracy of personal privacy protection and user recommendations.
通过以上留学汇款业务的实施例可见,一方面,针对留学汇款进行了KYC认证及真实性的认证校验,为用户社交提供可信保障;另一方面,用户可以自主选择公开的个人数据中具体内容,并根据公开的个人数据为用户推荐相关用户,以建立留学汇款社交圈;另一方面,将用户公开的个人数据保存在具有可溯源性和不可篡改性的区块链中,为用户社交提供可靠数据保障,并将留学汇款相关的业务数据与社交逻辑相分离,避免了汇款与社交的强依赖。It can be seen from the above example of the remittance service for studying abroad that, on the one hand, KYC certification and authenticity verification are carried out for the remittance of studying abroad, which provides credible protection for users’ social interaction; on the other hand, users can independently choose specific details in the public personal data. It also recommends relevant users based on public personal data to establish a social circle of remittances for studying abroad; on the other hand, save the public personal data of users in a blockchain with traceability and immutability to socialize users Provide reliable data protection, and separate the business data related to the remittance of studying abroad from the social logic, avoiding the strong dependence on remittance and social interaction.
当然,实际应用中,上述目标业务也可以为支付宝提供的股票交易业务,支付宝服务端可以基于用户选择公开的个人数据,具有相同的用户特征(比如:购买相同股票)进行用户推荐,具体过程与以上描述的留学汇款业务类似,这里不再赘述。Of course, in practical applications, the above-mentioned target business can also be the stock trading business provided by Alipay. The Alipay server can make user recommendations based on the personal data that the user chooses to disclose and have the same user characteristics (such as buying the same stock). The remittance services for studying abroad described above are similar, so I won’t repeat them here.
在以上技术方案中,基于将用户的执行目标业务相关的个人数据进行选择公开并发布至区块链进行存储;以及,响应于用户的操作,对已存储于区块链中的用户和其他用户的个人数据进行匹配,将匹配确定的与该用户于包含相同的用户特征的其他用户推荐给该用户,为执行相同目标业务的多个用户提供灵活建立可信社交关系的途径和保障。In the above technical solution, the personal data related to the user's execution target business is selected and published and released to the blockchain for storage; and, in response to the user's operation, the user and other users who have been stored in the blockchain The personal data of the user is matched, and other users who have the same user characteristics as the user determined by the match are recommended to the user, providing multiple users performing the same target business with flexible ways and guarantees to establish credible social relationships.
与上述方法实施例相对应,本说明书还提供了一种基于区块链的用户推荐装置的实 施例。Corresponding to the above method embodiment, this specification also provides an embodiment of a user recommendation device based on blockchain.
本说明书的基于区块链的用户推荐装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。The embodiment of the block chain-based user recommendation device in this specification can be applied to electronic equipment. The device embodiments can be implemented by software, or can be implemented by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
从硬件层面而言,如图2所示,为本说明书的基于区块链的用户推荐装置所在电子设备的一种硬件结构图,除了图2所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。From the perspective of hardware, as shown in Figure 2, it is a hardware structure diagram of the electronic device where the user recommendation device based on the blockchain of this specification is located, except for the processor, memory, network interface, and In addition to the volatile memory, the electronic device in which the device is located in the embodiment generally may include other hardware according to the actual function of the electronic device, which will not be repeated here.
图3是本说明书一示例性实施例示出的一种基于区块链的用户推荐装置的框图。Fig. 3 is a block diagram showing a block chain-based user recommendation device according to an exemplary embodiment of the present specification.
请参考图3,所述基于区块链的用户推荐装置30可以应用在前述图2所示的电子设备中,所述装置30包括:Please refer to FIG. 3, the block chain-based user recommendation device 30 can be applied to the electronic device shown in FIG. 2, and the device 30 includes:
接收模块301,接收用户在完成目标业务后,发起的数据公开请求;其中,所述数据公开请求包括从与所述目标业务相关的业务数据中选择公开的个人数据;The receiving module 301 receives a data disclosure request initiated by a user after completing a target business; wherein the data disclosure request includes personal data that is selected to be disclosed from business data related to the target business;
发布模块302,将获取到的所述用户的个人数据发布至所述区块链进行存储;The publishing module 302 publishes the acquired personal data of the user to the blockchain for storage;
推荐模块303,响应于所述用户发起的操作,将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征。The recommendation module 303, in response to the operation initiated by the user, compares the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the target business. The data is matched to determine whether the personal data of the user and the personal data of the other users contain the same user characteristics.
所述推荐模块303进一步,在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户。The recommendation module 303 is further configured to recommend any other user to the user when the personal data of the user and the personal data of any other user contain the same user characteristics.
在本实施例中,所述接收模块301进一步:响应于用户发起的针对所述目标业务的业务请求,针对所述业务请求进行业务校验,所述业务校验包括对所述用户的身份校验和针对所述业务请求的真实性校验;如果针对所述用户的业务校验通过,执行与所述业务请求对应的目标业务,并向用户发送所述目标业务处理的业务执行结果,所述业务执行结果包括与所述目标业务相关的业务数据。In this embodiment, the receiving module 301 further: in response to a service request for the target service initiated by the user, perform service verification for the service request, and the service verification includes verifying the user's identity. Verify and verify the authenticity of the service request; if the service verification for the user passes, execute the target service corresponding to the service request, and send the service execution result of the target service processing to the user, so The business execution result includes business data related to the target business.
在本实施例中,所述目标业务包括留学汇款业务,所述相同的用户特征包括所述留学汇款业务中具有的相同的汇款接收方。所述推荐模块303进一步:将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述留学汇款业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的汇款接收方。In this embodiment, the target business includes a study abroad remittance service, and the same user characteristics include the same remittance recipient in the study abroad remittance service. The recommendation module 303 further: match the personal data of the user stored in the block chain with the personal data stored in the block chain that other users choose to disclose when completing the remittance service for studying abroad. It is determined whether the personal data of the user and the personal data of the other users include the same remittance recipient.
在本实施例中,所述推荐模块303进一步:在所述用户的个人数据与任一其他用户的个人数据包含相同的汇款接收方时,将所述任一其他用户推荐给所述用户。In this embodiment, the recommendation module 303 further: recommends any other user to the user when the personal data of the user and the personal data of any other user include the same remittance recipient.
在本实施例中,所述发布模块302进一步:对获取到的所述用户的个人数据执行同态加密,将同态加密后的所述用户的个人数据发布至所述区块链进行存储。In this embodiment, the publishing module 302 further: performs homomorphic encryption on the acquired personal data of the user, and publishes the homomorphic encrypted personal data of the user to the blockchain for storage.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The systems, devices, modules, or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. The specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。In a typical configuration, the computer includes one or more processors (CPU), input/output interfaces, network interfaces, and memory. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media, can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
与上述方法实施例相对应,本说明书还提供了一种电子设备的实施例。该电子设备包括:处理器以及用于存储机器可执行指令的存储器;其中,处理器和存储器通常通过内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。Corresponding to the foregoing method embodiment, this specification also provides an embodiment of an electronic device. The electronic device includes a processor and a memory for storing machine-executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus. In other possible implementation manners, the device may also include an external interface to be able to communicate with other devices or components.
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的用户推荐的控制逻辑对应的机器可执行指令,所述处理器被促使:接收用户在完成目标业务后,发起的数据公开请求,所述数据公开请求包括从与所述目标业务相关的业务数据中选择公开的个人数据;将获取到的所述用户的个人数据发布至所述区块链进行存储;响应于所述用户发起的操作,将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征;在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户。In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic recommended by the blockchain-based user stored in the memory, the processor is prompted to: The data disclosure request includes selecting personal data to be disclosed from the business data related to the target business; publishing the acquired personal data of the user to the blockchain for storage; responding to The operation initiated by the user matches the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the target business to determine Whether the personal data of the user and the personal data of the other users contain the same user characteristics; when the personal data of the user and the personal data of any other user contain the same user characteristics, the personal data of any other user Recommend to the user.
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的用户推荐的控制逻辑对应的机器可执行指令,所述处理器被促使:响应于用户发起的针对所述目标 业务的业务请求,针对所述业务请求进行业务校验,所述业务校验包括对所述用户的身份校验和针对所述业务请求的真实性校验;如果针对所述用户的业务校验通过,执行与所述业务请求对应的目标业务,并向用户发送所述目标业务处理的业务执行结果,所述业务执行结果包括与所述目标业务相关的业务数据。In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic recommended by the blockchain-based user stored in the memory, the processor is prompted: The service request of the service, the service verification is performed for the service request, and the service verification includes the identity verification of the user and the authenticity verification for the service request; if the service verification is for the user By executing the target service corresponding to the service request, and sending the service execution result of the target service processing to the user, the service execution result includes the service data related to the target service.
在本实施例中,所述目标业务包括留学汇款业务,所述相同的用户特征包括所述留学汇款业务中具有的相同的汇款接收方;通过读取并执行所述存储器存储的与基于区块链的用户推荐的控制逻辑对应的机器可执行指令,所述处理器被促使:将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述留学汇款业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的汇款接收方。In this embodiment, the target business includes a study abroad remittance service, and the same user characteristics include the same remittance recipient in the study abroad remittance service; by reading and executing the data stored in the memory and based on the block The machine executable instructions corresponding to the control logic recommended by the user of the chain, the processor is prompted: When the study abroad remittance business is described, the public personal data is selected for matching to determine whether the personal data of the user and the personal data of the other users contain the same remittance recipient.
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的用户推荐的控制逻辑对应的机器可执行指令,所述处理器被促使:在所述用户的个人数据与任一其他用户的个人数据包含相同的汇款接收方时,将所述任一其他用户推荐给所述用户。In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic recommended by the blockchain-based user stored in the memory, the processor is prompted to: When the personal data of another user includes the same remittance recipient, recommend any other user to the user.
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的用户推荐的控制逻辑对应的机器可执行指令,所述处理器被促使:对获取到的所述用户的个人数据执行同态加密,将同态加密后的所述用户的个人数据发布至所述区块链进行存储。In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic recommended by the blockchain-based user stored in the memory, the processor is prompted to: The data performs homomorphic encryption, and the user's personal data after homomorphic encryption is released to the blockchain for storage.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or equipment including a series of elements includes not only those elements, but also Other elements that are not explicitly listed, or also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than in the embodiments and still achieve desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown in order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and/or" as used herein refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可 以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determination".
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。The above descriptions are only preferred embodiments of one or more embodiments of this specification, and are not intended to limit one or more embodiments of this specification. All within the spirit and principle of one or more embodiments of this specification, Any modification, equivalent replacement, improvement, etc. made should be included in the protection scope of one or more embodiments of this specification.

Claims (11)

  1. 一种基于区块链的用户推荐方法,包括:A user recommendation method based on blockchain, including:
    接收用户在完成目标业务后,发起的数据公开请求,所述数据公开请求包括从与所述目标业务相关的业务数据中选择公开的个人数据;Receiving a data disclosure request initiated by a user after completing a target business, where the data disclosure request includes personal data selected for disclosure from business data related to the target business;
    将获取到的所述用户的个人数据发布至所述区块链进行存储;Publish the acquired personal data of the user to the blockchain for storage;
    响应于所述用户发起的操作,将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征;In response to the operation initiated by the user, the personal data of the user stored in the blockchain is matched with the personal data stored in the blockchain that other users choose to disclose when completing the target business, To determine whether the personal data of the user and the personal data of the other users contain the same user characteristics;
    在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户。When the personal data of the user and the personal data of any other user contain the same user characteristics, the any other user is recommended to the user.
  2. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    响应于用户发起的针对所述目标业务的业务请求,针对所述业务请求进行业务校验;其中,所述业务校验包括对所述用户的身份校验和针对所述业务请求的真实性校验;In response to a service request for the target service initiated by a user, a service verification is performed on the service request; wherein the service verification includes verification of the user's identity and verification of the authenticity of the service request. Test
    如果针对所述用户的业务校验通过,执行与所述业务请求对应的目标业务,并向用户发送所述目标业务处理的业务执行结果,所述业务执行结果包括与所述目标业务相关的业务数据。If the service verification for the user passes, execute the target service corresponding to the service request, and send the service execution result of the target service processing to the user, and the service execution result includes the service related to the target service data.
  3. 根据权利要求1所述的方法,The method according to claim 1,
    所述目标业务包括留学汇款业务,The target business includes overseas study remittance business,
    所述相同的用户特征包括所述留学汇款业务中具有的相同的汇款接收方;The same user characteristics include the same remittance receiver in the study abroad remittance business;
    所述将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征,包括:The personal data of the user stored in the blockchain is matched with the personal data stored in the blockchain that other users choose to disclose when completing the target business, so as to determine the user's personal data Whether the data and the personal data of other users contain the same user characteristics, including:
    将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述留学汇款业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的汇款接收方。Match the user's personal data stored in the blockchain with the personal data that other users choose to disclose when completing the study abroad remittance business, which is stored in the blockchain, to determine the user's personal data Whether the personal data of other users includes the same remittance recipient.
  4. 根据权利要求3所述的方法,所述在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户,包括:The method according to claim 3, wherein when the personal data of the user and the personal data of any other user contain the same user characteristics, recommending any other user to the user includes:
    在所述用户的个人数据与任一其他用户的个人数据包含相同的汇款接收方时,将所述任一其他用户推荐给所述用户。When the personal data of the user and the personal data of any other user include the same remittance recipient, the any other user is recommended to the user.
  5. 根据权利要求1所述的方法,所述将获取到的所述用户的个人数据发布至所述区块链进行存储,包括:The method according to claim 1, wherein the publishing the acquired personal data of the user to the blockchain for storage includes:
    对获取到的所述用户的个人数据执行同态加密,将同态加密后的所述用户的个人数据发布至所述区块链进行存储。Perform homomorphic encryption on the acquired personal data of the user, and publish the homomorphic encrypted personal data of the user to the blockchain for storage.
  6. 一种基于区块链的用户推荐装置,包括:A user recommendation device based on blockchain, including:
    接收模块,接收用户在完成目标业务后,发起的数据公开请求,所述数据公开请求包括从与所述目标业务相关的业务数据中选择公开的个人数据;A receiving module, which receives a data disclosure request initiated by a user after completing a target business, the data disclosure request includes selecting personal data to be disclosed from business data related to the target business;
    发布模块,将获取到的所述用户的个人数据发布至所述区块链进行存储;A publishing module, which publishes the acquired personal data of the user to the blockchain for storage;
    推荐模块,响应于所述用户发起的操作,将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述目标业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的用户特征;The recommendation module, in response to the operation initiated by the user, combines the personal data of the user stored in the blockchain with the personal data stored in the blockchain that other users choose to disclose when completing the target business Matching to determine whether the personal data of the user and the personal data of the other users contain the same user characteristics;
    所述推荐模块进一步,在所述用户的个人数据与任一其他用户的个人数据包含相同的用户特征时,将所述任一其他用户推荐给所述用户。The recommendation module is further configured to recommend any other user to the user when the personal data of the user and the personal data of any other user contain the same user characteristics.
  7. 根据权利要求6所述的装置,所述接收模块进一步:According to the device of claim 6, the receiving module further:
    响应于用户发起的针对所述目标业务的业务请求,针对所述业务请求进行业务校验;其中,所述业务校验包括对所述用户的身份校验和针对所述业务请求的真实性校验;In response to a service request for the target service initiated by a user, a service verification is performed on the service request; wherein the service verification includes verification of the user's identity and verification of the authenticity of the service request. Test
    如果针对所述用户的业务校验通过,执行与所述业务请求对应的目标业务,并向用户发送所述目标业务处理的业务执行结果,所述业务执行结果包括与所述目标业务相关的业务数据。If the service verification for the user passes, execute the target service corresponding to the service request, and send the service execution result of the target service processing to the user, and the service execution result includes the service related to the target service data.
  8. 根据权利要求6所述的装置,The device according to claim 6,
    所述目标业务包括留学汇款业务,The target business includes overseas study remittance business,
    所述相同的用户特征包括所述留学汇款业务中具有的相同的汇款接收方;The same user characteristics include the same remittance receiver in the study abroad remittance business;
    所述推荐模块进一步:The recommendation module further:
    将所述区块链存储的所述用户的个人数据,与所述区块链存储的由其他用户在完成所述留学汇款业务时选择公开的个人数据进行匹配,以确定所述用户的个人数据与所述其他用户的个人数据是否包含相同的汇款接收方。Match the user's personal data stored in the blockchain with the personal data that other users choose to disclose when completing the study abroad remittance business, which is stored in the blockchain, to determine the user's personal data Whether the personal data of other users includes the same remittance recipient.
  9. 根据权利要求8所述的装置,所述推荐模块进一步:According to the device of claim 8, the recommendation module further:
    在所述用户的个人数据与任一其他用户的个人数据包含相同的汇款接收方时,将所述任一其他用户推荐给所述用户。When the personal data of the user and the personal data of any other user include the same remittance recipient, the any other user is recommended to the user.
  10. 根据权利要求6所述的装置,所述发布模块进一步:The device according to claim 6, wherein the publishing module further:
    对获取到的所述用户的个人数据执行同态加密,将同态加密后的所述用户的个人数据发布至所述区块链进行存储。Perform homomorphic encryption on the acquired personal data of the user, and publish the homomorphic encrypted personal data of the user to the blockchain for storage.
  11. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求1-5中任一项所述的方法。Wherein, the processor executes the executable instruction to implement the method according to any one of claims 1-5.
PCT/CN2021/089043 2020-04-26 2021-04-22 User recommendation based on blockchain WO2021218778A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010338324.1A CN111523052A (en) 2020-04-26 2020-04-26 Block chain-based user recommendation method and device and electronic equipment
CN202010338324.1 2020-04-26

Publications (1)

Publication Number Publication Date
WO2021218778A1 true WO2021218778A1 (en) 2021-11-04

Family

ID=71910593

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/089043 WO2021218778A1 (en) 2020-04-26 2021-04-22 User recommendation based on blockchain

Country Status (2)

Country Link
CN (1) CN111523052A (en)
WO (1) WO2021218778A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523052A (en) * 2020-04-26 2020-08-11 支付宝实验室(新加坡)有限公司 Block chain-based user recommendation method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180165585A1 (en) * 2016-12-09 2018-06-14 Cognitive Scale, Inc. Method for Providing Procurement Related Cognitive Insights Using Blockchains
CN109165354A (en) * 2018-08-08 2019-01-08 苏州酷外文化传媒有限公司 Blind date friend-making matching process and device based on block chain
CN110909259A (en) * 2019-11-27 2020-03-24 腾讯科技(深圳)有限公司 Block chain-based user recommendation method, device, equipment and storage medium
CN111523052A (en) * 2020-04-26 2020-08-11 支付宝实验室(新加坡)有限公司 Block chain-based user recommendation method and device and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11270263B2 (en) * 2013-09-12 2022-03-08 Netspective Communications Llc Blockchain-based crowdsourced initiatives tracking system
CN109670947A (en) * 2018-03-12 2019-04-23 北京格泰科网络技术有限责任公司 A kind of patent operation plateform system and application method based on patent application installment business
CN109977152A (en) * 2019-04-03 2019-07-05 翟红鹰 Intelligent Matching method, system and storage medium based on block chain technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180165585A1 (en) * 2016-12-09 2018-06-14 Cognitive Scale, Inc. Method for Providing Procurement Related Cognitive Insights Using Blockchains
CN109165354A (en) * 2018-08-08 2019-01-08 苏州酷外文化传媒有限公司 Blind date friend-making matching process and device based on block chain
CN110909259A (en) * 2019-11-27 2020-03-24 腾讯科技(深圳)有限公司 Block chain-based user recommendation method, device, equipment and storage medium
CN111523052A (en) * 2020-04-26 2020-08-11 支付宝实验室(新加坡)有限公司 Block chain-based user recommendation method and device and electronic equipment

Also Published As

Publication number Publication date
CN111523052A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN110471984B (en) Service processing method and device based on block chain and electronic equipment
US11336589B2 (en) Allocating virtual resource based on blockchain
US11195231B2 (en) Transaction processing in a service blockchain
CN110765200B (en) Asset procurement method and device based on block chain and electronic equipment
CN110706114B (en) Block chain-based default asset processing method and device and electronic equipment
US11556924B2 (en) Blockchain-based payment withholding and agreement signing method, apparatus, and electronic device
TWI733349B (en) Block chain-based bill number distribution method, device and electronic equipment
CN111539731A (en) Block chain-based federal learning method and device and electronic equipment
WO2021017437A1 (en) Blockchain-based note verification method and apparatus, electronic device, and storage medium
US11429983B2 (en) Blockchain-based bill write-off method, apparatus, electronic device, and storage medium
US11443307B2 (en) Cross-border resource transfer authenticity verification method, device and electronic equipment
WO2021017439A1 (en) Block chain-based electronic bill number application method and apparatus, and electronic device
CN111383117A (en) Asset management method and device based on block chain and electronic equipment
US10733583B2 (en) Blockchain-based withholding operations
CN111738724B (en) Cross-border resource transfer authenticity auditing method and device, and electronic equipment
WO2022077186A1 (en) Execution method and apparatus for smart contract in blockchain, and electronic device
EP3961453B1 (en) Method and apparatus for invoking smart contract, electronic device, and storage medium
CN111639125A (en) Resource circulation method and device based on block chain
CN111383119A (en) Asset management method and device based on block chain and electronic equipment
US10789628B2 (en) Blockchain-based bill number allocation method, apparatus and electronic device
CN112100588A (en) Block chain-based digital seal application method and device and electronic equipment
WO2021218778A1 (en) User recommendation based on blockchain

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: 21796120

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: 21796120

Country of ref document: EP

Kind code of ref document: A1