WO2020248602A1 - 基于区块链的关系绑定方法、装置及设备 - Google Patents

基于区块链的关系绑定方法、装置及设备 Download PDF

Info

Publication number
WO2020248602A1
WO2020248602A1 PCT/CN2020/071592 CN2020071592W WO2020248602A1 WO 2020248602 A1 WO2020248602 A1 WO 2020248602A1 CN 2020071592 W CN2020071592 W CN 2020071592W WO 2020248602 A1 WO2020248602 A1 WO 2020248602A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
relationship
binding
label
blockchain
Prior art date
Application number
PCT/CN2020/071592
Other languages
English (en)
French (fr)
Inventor
邹雪晴
夏思禹
曹雷
王进成
Original Assignee
创新先进技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 创新先进技术有限公司 filed Critical 创新先进技术有限公司
Priority to US16/877,337 priority Critical patent/US10909252B2/en
Publication of WO2020248602A1 publication Critical patent/WO2020248602A1/zh

Links

Images

Classifications

    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Definitions

  • This application relates to the field of blockchain technology, and in particular to a method, device, and equipment for relationship binding based on blockchain.
  • the way to determine the relationship between people is mostly for the staff of relevant institutions to participate in the identification, and it is maintained by a centralized identity management system; however, manual authentication will inevitably lead to the risk of misoperation, and it is centralized.
  • the database has problems such as data loss, data tampering, and data islands, which can lead to more complicated situations such as bigamy and inability to determine blood relationship.
  • the purpose of one or more embodiments of this specification is to provide a blockchain-based relationship binding method, device, and equipment.
  • Based on the smart contract in the blockchain there is not only no human interference in the relationship binding process, but also The characteristics of the blockchain technology make the binding process of the relationship visible to multiple parties, ensuring the authenticity and validity of the relationship binding; and writing the relationship binding record into the blockchain ensures that the relationship binding record cannot be tampered with.
  • the openness of checkability effectively avoids problems such as data loss, data fraud, and data islands.
  • One or more embodiments of this specification provide a blockchain-based relationship binding method, including:
  • relationship binding request sent by a first user, where the relationship binding request includes: user information of a second user to be bound with the first user, and the first user and the second user The relationship label of the relationship to be bound;
  • One or more embodiments of this specification provide a blockchain-based relationship binding device, including:
  • the receiving module is configured to receive a relationship binding request sent by a first user, where the relationship binding request includes: user information of a second user to be bound with the first user, and the first user and The relationship label of the relationship to be bound by the second user;
  • a binding module configured to call a smart contract in the blockchain, and perform binding processing on the first user and the second user in the relationship corresponding to the relationship tag based on the smart contract;
  • a generating module configured to generate a binding record of the relationship between the first user and the second user according to the user information if the binding is successful;
  • the writing module is used to write the relationship binding record into the blockchain.
  • One or more embodiments of this specification provide a blockchain-based relationship binding device, including: a processor; and a memory arranged to store computer-executable instructions that when executed make The processor implements the steps of the blockchain-based relationship binding method described above.
  • One or more embodiments of this specification provide a storage medium for storing computer-executable instructions that, when executed, realize the steps of the blockchain-based relationship binding method described above.
  • the relationship binding request when a relationship binding request sent by a first user is received, the relationship binding request includes the relationship binding request with the first user.
  • Perform binding processing on the relationship and when the binding is successful, generate a relationship binding record between the first user and the second user according to the user information of the second user, and write the relationship binding record into the blockchain.
  • FIG. 1 is a schematic diagram of a scenario of a blockchain-based relationship binding system provided by one or more embodiments of this specification;
  • FIG. 2 is a schematic diagram of the first flow of a blockchain-based relationship binding method provided by one or more embodiments of this specification;
  • FIG. 3 is a first detailed diagram of step 1042 provided in one or more embodiments of this specification.
  • FIG. 4 is a second detailed diagram of step 1042 provided in one or more embodiments of this specification.
  • FIG. 5 is a schematic diagram of the second flow of a blockchain-based relationship binding method provided by one or more embodiments of this specification;
  • FIG. 6 is a schematic diagram of the module composition of a blockchain-based relationship binding device provided by one or more embodiments of this specification;
  • FIG. 7 is a schematic structural diagram of a blockchain-based relationship binding device provided by one or more embodiments of this specification.
  • One or more embodiments of this specification provide a blockchain-based relationship binding method, device, and equipment.
  • the relationship binding between different users is realized, not only during the binding process.
  • the relationship binding method can be applied to private chains, public chains, and alliance chains.
  • the requesting party for relationship binding is called the first user, and the first user operates the first client; the user to be bound with the first user is called the second user, and the second user operates The second client; where the first client and the second client can be mobile phones, tablet computers, desktop computers, portable notebook computers, etc.
  • the first user can also be the second user, and the second user can also be the first user.
  • the first client can also be the second client.
  • the second client can also be the first client.
  • Figure 1 is a schematic diagram of an application scenario of a blockchain-based relationship binding system provided by one or more embodiments of this specification.
  • the system includes: a first client, a second client, and relationship binding Node; where the first user operates the first client, the second user operates the second client, both the first client and the second client communicate with the relationship binding node through a wireless network, the first client, the second Both the client and the relationship binding node are connected to the blockchain;
  • the blockchain-based relationship binding process includes:
  • the first client In response to the relationship binding event triggered by the first user, the first client generates a relationship binding request, and sends the generated relationship binding request to the relationship binding node to request a relationship between the first user and the second user Binding relationship; wherein, the relationship binding request includes the user information of the second user to be bound with the first user, and the relationship label of the relationship to be bound between the first user and the second user; in the embodiment of this specification, the user Information is used to identify a unique user, such as user information for blockchain account information, user ID number, etc.; relationship identification includes the relationship type of the relationship to be bound and the user to be bound in the relationship to be bound The format of the identity information and relationship label can be set according to actual needs.
  • the format of the relationship label may be "relationship type: identity information of the first user-identity information of the second user", for example, the relationship label "father-daughter: father-daughter" indicates that the first user requests to bind the second user Father-daughter relationship, and the identity information of the first user in the father-daughter relationship is the father, and the identity information of the second user in the father-daughter relationship is the daughter.
  • the relationship in the embodiments of this specification includes husband and wife relationship, blood relationship, friend relationship, cooperative relationship, employment relationship, etc. between users;
  • the relationship binding node receives the relationship binding request sent by the first client, obtains the user information of the first user, and calls the smart contract in the blockchain. Based on the smart contract, the relationship binding request includes the second The user information of the user is valid; then determine the type of relationship label included in the relationship binding request.
  • relationship label is a relationship label of a one-to-one binding relationship
  • relationship label is a relationship label of a one-to-one binding relationship
  • the relationship label is a one-to-many binding relationship
  • the binding relationship confirmation request is sent to the second client
  • the relationship label is the relationship label of the many-to-many binding relationship
  • the binding relationship confirmation request is sent to the second client; where the first identity and the second identity are in different bindings
  • the relationship is different. For example, in a father-daughter relationship, the daughter is the first status and the father is the second status; for another example, in an employment relationship where only
  • the second client receives the binding confirmation request sent by the relationship binding node, displays prompt information, and when obtaining the confirmation message submitted by the second user, sends confirmation response data to the relationship binding node;
  • the relationship binding node obtains the confirmation response data sent by the second client, it binds the first user and the second user with the relationship corresponding to the relationship label, and generates a relationship binding record; where the relationship binding
  • the predetermined record includes the user information of the first user, the user information of the second user, and the relationship label.
  • the relationship binding record includes the blockchain account information of the first user, the blockchain account information of the second user, and the relationship label;
  • the relationship binding record may also include information such as the relationship binding time;
  • the relationship binding node writes the generated relationship binding record into the blockchain for users with query authority to perform relationship query.
  • the relationship binding process based on the smart contract in the blockchain, the relationship binding between different users is realized. Not only is there no artificial interference in the binding process, but also visible to multiple parties, ensuring the authenticity and authenticity of the binding relationship. Effectiveness; At the same time, by storing the relationship binding record in the blockchain, it ensures the immutability and openness of the data on the chain, effectively avoiding data loss, data fraud, data islands and other issues.
  • Figure 2 is a schematic flow chart of a blockchain-based relationship binding method provided by one or more embodiments of this specification.
  • the method in Figure 2 can be executed by the relationship binding node connected to the blockchain in Figure 1, such as As shown in Figure 2, the method includes the following steps:
  • Step S102 Receive a relationship binding request sent by the first user, where the relationship binding request includes: user information of the second user to be bound with the first user, and the relationship to be bound between the first user and the second user 'S relationship label;
  • the relationship binding request sent by the first user operating the first client is received, and the user information of the first user is obtained; wherein the user information is used to identify a unique user, such as the user information is blockchain account information, The ID number of the user, etc.; the format of the relationship label can be "relationship type: identity information of the first user-identity information of the second user", for example, the relationship label "father-daughter: father-daughter" indicates that the first user requests and the first user The second user binds the father-daughter relationship, and the identity information of the first user in the father-daughter relationship is the father, and the identity information of the second user in the father-daughter relationship is the daughter.
  • the relationship in the embodiment of this specification includes husband and wife relationship, blood relationship, friend relationship, cooperative relationship, employment relationship, etc. between users.
  • Step S104 invoking the smart contract in the blockchain, and binding the first user and the second user to the relationship corresponding to the relationship label based on the smart contract;
  • the relationship binding node calls the smart contract in the blockchain, based on the smart contract, first checks the binding condition, and when the detection result is that the binding condition is met, the first A user and a second user are bound in a relationship corresponding to the relationship label.
  • Step S106 if the binding is successful, generate a binding record of the relationship between the first user and the second user according to the user information of the second user;
  • generating the relationship binding record between the first user and the second user according to the user information of the second user includes: associating and recording the user information of the first user, the user information of the second user, and the relationship label, and The recorded information serves as a binding record of the relationship between the first user and the second user.
  • the recorded information serves as a binding record of the relationship between the first user and the second user.
  • the first user's blockchain account information, the second user's blockchain account information, and the relationship tag are associated and recorded, and the recorded information is used as the relationship binding record between the first user and the second user .
  • the relationship binding record is generated based on the user information that uniquely identifies the user, ensuring the uniqueness between the user and the relationship, and avoiding the problem of relationship confusion.
  • relationship binding record may also include information such as the relationship binding time, which can be set according to needs in actual applications.
  • Step S108 Write the relationship binding record into the blockchain.
  • the relationship binding node uploads the generated relationship binding record to the blockchain for storage, so that users with query authority can query the relationship between users in the blockchain; because the relationship binding record on the chain is Encrypted storage in the form of ciphertext, therefore, users with query authority can operate the client to obtain the decryption key and verification hash to find the corresponding ciphertext form of the relationship binding record in the blockchain based on the verification hash , And use the decryption key to decrypt the relationship binding record in ciphertext form to obtain the relationship binding record in plaintext form. Furthermore, since the blockchain technology is non-tamperable, and the relationship binding record is written into the blockchain after being witnessed by multiple parties, it can be ensured that the result of the relationship binding uploaded to the blockchain cannot be tampered with. The authenticity of the data is guaranteed.
  • the relationship binding request upon receiving the relationship binding request sent by the first user, includes user information of the second user to be bound with the first user, and the first user and The relationship label of the relationship to be bound by the second user calls the smart contract in the blockchain. Based on the smart contract, the first user and the second user are bound with the relationship corresponding to the relationship label, and when the binding is successful, The relationship binding record between the first user and the second user is generated according to the user information of the second user, and the relationship binding record is written into the blockchain.
  • step S104 includes:
  • Step S1042 call the smart contract in the blockchain, and determine whether the first user and the second user meet the binding conditions based on the smart contract;
  • Step S1044 If the first user and the second user meet the binding condition, the first user and the second user are bound in a relationship corresponding to the relationship label.
  • step S1042 it is determined whether the first user and the second user are satisfied based on the smart contract.
  • the binding conditions include: if it is determined that the user information of the second user is valid based on the smart contract and the confirmation response data sent by the second user is obtained, it is determined that the first user and the second user meet the binding conditions.
  • the method also includes:
  • a request for confirming the binding relationship is sent to the second user, and the confirmation response data sent by the second user is obtained.
  • the request for confirming the binding relationship is generated according to the relationship tag and the user information of the first user, and the second client corresponding to the user information of the second user is determined according to the corresponding relationship between the prestored user information and the client.
  • the request for confirming the binding relationship is sent to the determined second client; when the second client monitors the request for confirming the binding relationship, a prompt message is displayed to prompt the second user to confirm whether the relationship corresponds to the first user's binding relationship label
  • the second client receives the confirmation message submitted by the second user, it sends confirmation response data to the relationship binding node; the relationship binding node receives the confirmation response data sent by the second client.
  • the binding request may also include message information, which may be preset message information, or information agreed upon by the first user and the second user, as the first user and
  • the prompt information between the second users may also be information edited by the first user, such as greetings, blessings, etc.
  • the method also includes:
  • a request for confirming the binding relationship is sent to the second user, and the confirmation response data sent by the second user is obtained.
  • generating a binding relationship confirmation request based on the message information, the relationship tag, and the user information of the first user, and determining the second client corresponding to the user information of the second user according to the correspondence between the prestored user information and the client, and The generated binding confirmation request is sent to the determined second client; when the second client monitors the binding confirmation request, a prompt message is displayed to prompt the second user to confirm whether the binding relationship with the first user label
  • the second client receives the confirmation message submitted by the second user, it sends confirmation response data to the relationship binding node; the relationship binding node receives the confirmation response data sent by the second client.
  • a request for confirming the binding relationship is sent to the second user including the relationship label and the user information of the first user, or the confirmation including the message information, the relationship label and the user information of the first user is sent Binding the relationship request to the second user, and obtaining the confirmation response data sent by the second user, effectively avoids the occurrence of false relationships and damage to the interests of the second user caused by the second user's ignorance.
  • the relationship binding node will be in a waiting state for a long time.
  • the above-mentioned obtaining confirmation response data sent by the second user includes: It is determined whether the confirmation response data sent by the second user is obtained within the preset time period, if yes, the subsequent operation is continued, and if not, the binding failure information is sent to the first user.
  • the binding relationship is divided in the embodiment of this specification, including one-to-one binding relationship, one-to-many binding relationship, and many-to-many binding.
  • the relationship and use it as the attribute of the relationship for example, the husband and wife relationship is a one-to-one binding relationship, the father-daughter relationship is a one-to-many binding relationship, and the teacher-student relationship is a many-to-many binding relationship.
  • determining whether the first user and the second user meet the binding conditions based on the smart contract in step S1042 also includes: It is determined that the second user does not have a relationship corresponding to any user binding relationship label, and then it is determined that the first user and the second user meet the binding condition;
  • step S1042 determines whether the first user and the second user meet the binding conditions based on the smart contract, and further includes: if the second user is determined based on the smart contract The user is in the first identity in the relationship corresponding to the relationship label, and it is determined that the second user is not bound to the relationship corresponding to the relationship label with any user, then it is determined that the first user and the second user meet the binding condition.
  • the first identity is different in different relationships. For example, in a father-daughter relationship, a father can have multiple daughters, but each daughter can only have one father. The daughter is the first identity and the father is the second. Identity.
  • the method further includes: sending binding failure information to the first user.
  • step S1042 may include:
  • Step S1042-1 call the smart contract, and judge whether the user information of the second user is valid based on the smart contract, if yes, execute step S1042-2, otherwise send a user information error message to the first user;
  • the judgment result is yes, it is determined that the user information included in the binding request is valid, and if the judgment result is no, it is determined that the binding request includes The user information for is invalid.
  • Step S1042-2 Determine the type of the relationship label included in the relationship binding request. If the relationship label is a one-to-one binding relationship, step S1042-3 is executed. If the relationship label is a one-to-many binding relationship, Label, perform step S1042-4, if the relationship label is a relationship label of a many-to-many binding relationship, perform step S1042-6;
  • the smart contract contains the corresponding relationship between the relationship label and the relationship, and the corresponding relationship between each relationship and the relationship attribute.
  • the relationship between the relationship label included in the relationship binding request is determined, according to The corresponding relationship between each relationship and the relationship attribute, determine the relationship attribute of the relationship corresponding to the relationship label included in the relationship binding request, and determine the type of the relationship label according to the relationship attribute; or, the standard for determining the type of the relationship label contained in the smart contract, According to the determination standard, the type of relationship label included in the binding request is determined.
  • Step S1042-3, determine whether the second user has bound the relationship corresponding to the relationship label, if yes, send a binding failure message to the first user, otherwise, perform step S1042-6;
  • the local database of the relationship binding node stores the bound relationships, such as storing a relationship list of the user dimension, that is, a relationship list of each user, and the relationship list includes the relationship information that the user has bound to.
  • Information such as the user information of the user, the user information of the user that the user has bound to, the relationship type of the relationship that the user has bound to, and the identity information of the user in the bound relationship.
  • step S1042-3 includes searching the relationship list of the second user in the local database according to the user information of the second user, and determining whether the relationship list of the second user includes the relationship corresponding to the relationship label included in the binding request, if yes , It is determined that the second user has bound the relationship corresponding to the relationship label, and if not, it is determined that the second user has not bound the relationship corresponding to the relationship label.
  • the user information of the first user is USER6, the relationship label included in the binding request is "husband and wife: wife-husband", the user information of the second user is USRE1, and the relationship label is determined to be a one-to-one binding relationship. Then, the above relationship list is found according to the user information USRE1 of the second user, and the relationship list does not include the husband and wife relationship, then step S1042-6 is executed.
  • relationship list is not limited to the above form, and it can be set according to the needs in actual applications.
  • Step S1042-4 determine the identity of the second user in the relationship corresponding to the relationship label, if it is the first identity, perform step S1042-5, if it is the second identity, perform step S1042-6;
  • the identity of the second user in the relationship corresponding to the relationship label is determined according to the identity information included in the relationship label. For example, according to the relationship label "father-daughter: father-daughter", it can be determined that the identity information of the second user is daughter.
  • Step S1042-5 determine whether the second user has bound the relationship corresponding to the relationship label, if yes, send a binding failure message to the first user, otherwise perform step S1042-6;
  • the implementation method of this step is the same as the implementation method of step S1042-3, and will not be repeated here.
  • Step S1042-6 according to the relationship label and the user information of the first user, send a binding relationship confirmation request to the second user; or, according to the description information, relationship label, and user information of the first user, send a binding relationship confirmation request to Second user
  • Step S1042-7 It is judged whether the response data sent by the second user is obtained within the preset time, if yes, step S1042-8 is executed, otherwise, the binding failure message is sent to the first user;
  • the preset duration can be set according to actual needs, for example, 2 minutes.
  • Step S1042-8 Determine the type of the acquired response data. If it is the confirmation response data, perform step S1044. If it is the rejection response data, send the second user refuse binding message to the first user.
  • the validity of the bound relationship is ensured sexuality and accuracy avoid relationship conflicts and unnecessary troubles caused by relationship conflicts.
  • FIG. 5 is a schematic flowchart of the blockchain-based binding method provided by another embodiment of this specification, as shown in FIG. 5 On the basis of Figure 2, this method also includes the following steps:
  • Step S110 Save the relationship label in the local database
  • the relationship list of the first user is searched in the local database according to the user information of the first user, the relationship label included in the relationship binding request is saved in the relationship list of the first user, and the relationship list is stored according to the user information of the second user.
  • the local database searches for the relationship list of the second user, and saves the relationship label included in the relationship binding request to the relationship list of the second user.
  • the relationship between the first user and the second user is recorded locally. It should be pointed out that, depending on the style of the relationship list, other information can also be stored in the relationship list. Such as storing the user information of the bound user, the identity information of the user in the bound relationship, etc. Therefore, after each successful binding relationship, the corresponding relationship label is saved in the corresponding relationship list, which ensures that the relationship in the relationship list is updated in time and has timeliness.
  • the updated relationship list of the second user is as follows:
  • step 110 can also be executed simultaneously with step 106, or step 110 can also be executed simultaneously with step 108.
  • the relationship binding request when the relationship binding request sent by the first user is received, the relationship binding request includes the user information of the second user to be bound with the first user, and the first user and the second user to be bound
  • the relationship label of the relationship calls the smart contract in the blockchain, and based on the smart contract, the first user and the second user are bound to the relationship corresponding to the relationship label, and when the binding is successful, the first user and the second user are generated
  • the relationship binding record between users, and the relationship binding record is written into the blockchain.
  • FIG. 6 is a schematic diagram of the module composition of a blockchain-based relationship binding device provided by one or more embodiments of this specification.
  • the device is used to implement the blockchain-based relationship binding method described in Figures 2 to 5, such as As shown in Figure 6, the device includes:
  • the receiving module 61 is configured to receive a relationship binding request sent by a first user, where the relationship binding request includes: user information of a second user to be bound with the first user, and the first user A relationship label of the relationship to be bound with the second user;
  • the binding module 62 is configured to call a smart contract in the blockchain, and perform binding processing on the first user and the second user in the relationship corresponding to the relationship tag based on the smart contract;
  • a generating module 63 configured to generate a binding record of the relationship between the first user and the second user according to the user information if the binding is successful;
  • the writing module 64 is configured to write the relationship binding record into the blockchain.
  • the binding process of the relationship is visible to many parties, ensuring the binding The authenticity and validity of the established relationship; at the same time, it also ensures the immutability and openness of the data on the chain, effectively avoiding data loss, data fraud, data islanding and other issues.
  • the binding module 62 is specifically configured to:
  • the binding module 62 is further specifically configured to:
  • the relationship label is a relationship label of a one-to-one binding relationship
  • the binding module 62 is also specifically used for:
  • the relationship label is a one-to-many binding relationship
  • the binding module 62 is also specifically used for:
  • the binding module 62 is further specifically configured to:
  • the binding request also includes message information, and the binding module 62 is further specifically used for:
  • the relationship tag According to the message information, the relationship tag, and the user information of the first user, send a binding relationship confirmation request to the second user, and obtain confirmation response data sent by the second user.
  • the generating module 64 is specifically used for:
  • the user information of the first user, the user information of the second user, and the relationship tag are associated and recorded, and the recorded information is bound as the relationship between the first user and the second user recording.
  • the device further includes a storage module for:
  • the binding module 62 After the binding module 62 binds the first user and the second user with the relationship corresponding to the relationship tag based on the smart contract, the relationship tag is saved in a local database.
  • the blockchain-based relationship binding device can receive a binding request sent by a first user, where the binding request includes the user of the second user to be bound to the first user Information, and the relationship label of the relationship to be bound between the first user and the second user; call the smart contract in the blockchain, and bind the first user and the second user to the relationship corresponding to the relationship label based on the smart contract; And when the binding is successful, the relationship binding record between the first user and the second user is generated according to the user information of the second user; the relationship binding record is written into the blockchain.
  • one or more embodiments of this specification also provide a blockchain-based relationship binding device, which is used to perform the above
  • the relationship binding method based on blockchain is shown in Figure 7.
  • Blockchain-based relationship binding devices can have relatively large differences due to different configurations or performances. They can include one or more processors 701 and a memory 702.
  • the memory 702 can store one or more storage applications or data. Among them, the memory 702 may be short-term storage or persistent storage.
  • the application program stored in the memory 702 may include one or more modules (not shown in the figure), and each module may include a series of computer-executable instructions in a blockchain-based relationship binding device.
  • the processor 701 may be configured to communicate with the memory 702, and execute a series of computer executable instructions in the memory 702 on the blockchain-based relationship binding device.
  • the blockchain-based relationship binding device may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input and output interfaces 705, one or more keyboards 706, and so on.
  • the blockchain-based relationship binding device includes a memory and one or more programs.
  • One or more programs are stored in the memory, and the one or more programs may include one or more programs.
  • the one or more programs include Perform the following computer executable instructions:
  • relationship binding request sent by a first user, where the relationship binding request includes: user information of a second user to be bound with the first user, and the first user and the second user The relationship label of the relationship to be bound;
  • binding If the binding is successful, generating a binding record of the relationship between the first user and the second user according to the user information;
  • the binding process of the relationship is visible to many parties, ensuring the binding The authenticity and validity of the established relationship; at the same time, it also ensures the immutability and openness of the data on the chain, effectively avoiding problems such as data loss, data fraud, and data islands.
  • the binding processing of the first user and the second user in the relationship corresponding to the relationship tag based on the smart contract includes:
  • the determining whether the first user and the second user meet the binding condition based on the smart contract includes:
  • the relationship label is a one-to-one binding relationship
  • the smart contract is used to determine whether the first user and the second user meet the binding requirements.
  • the relationship label is a one-to-many binding relationship
  • the determining whether the first user and the second user meet the binding condition based on the smart contract further includes:
  • the method further includes:
  • the binding request further includes message information, and the method further includes:
  • the relationship tag According to the message information, the relationship tag, and the user information of the first user, send a binding relationship confirmation request to the second user, and obtain confirmation response data sent by the second user.
  • the generating the relationship binding record between the first user and the second user according to the user information includes:
  • the user information of the first user, the user information of the second user, and the relationship tag are associated and recorded, and the recorded information is bound as the relationship between the first user and the second user recording.
  • the method further includes:
  • the blockchain-based relationship binding device can receive a relationship binding request sent by a first user, wherein the relationship binding request includes a second user to be bound with the first user.
  • User information of the user, and the relationship label of the relationship to be bound between the first user and the second user call the smart contract in the blockchain, and bind the first user and the second user with the relationship corresponding to the relationship label based on the smart contract
  • When the binding is successful generate a relationship binding record between the first user and the second user according to the user information of the second user; write the relationship binding record into the blockchain.
  • one or more embodiments of this specification also provide a storage medium for storing computer-executable instructions.
  • the storage medium may be a U disk, an optical disk, a hard disk, etc.
  • the computer executable instructions stored in the storage medium can realize the following process when executed by the processor:
  • relationship binding request sent by a first user, where the relationship binding request includes: user information of a second user to be bound with the first user, and the first user and the second user The relationship label of the relationship to be bound;
  • binding If the binding is successful, generating a binding record of the relationship between the first user and the second user according to the user information;
  • the binding process of the relationship is visible to many parties, ensuring the binding The authenticity and validity of the established relationship; at the same time, it also ensures the immutability and openness of the data on the chain, effectively avoiding problems such as data loss, data fraud, and data islands.
  • the first user and the second user are bound in the relationship corresponding to the relationship tag based on the smart contract Processing, including:
  • the determining whether the first user and the second user meet the binding condition based on the smart contract includes:
  • the relationship label is a relationship label of a one-to-one binding relationship
  • the first user and the user are determined based on the smart contract.
  • Whether the second user meets the binding conditions also includes:
  • the relationship label is a one-to-many binding relationship
  • the determining whether the first user and the second user meet the binding condition based on the smart contract further includes:
  • the method further includes:
  • the binding request further includes message information, and the method further includes:
  • the relationship tag According to the message information, the relationship tag, and the user information of the first user, send a binding relationship confirmation request to the second user, and obtain confirmation response data sent by the second user.
  • generating the relationship binding record between the first user and the second user according to the user information includes:
  • the user information of the first user, the user information of the second user, and the relationship tag are associated and recorded, and the recorded information is bound as the relationship between the first user and the second user recording.
  • the first user and the second user are bound in the relationship corresponding to the relationship tag based on the smart contract After processing, it also includes:
  • the computer executable instructions stored in the storage medium provided by one or more embodiments of this specification When executed by a processor, they receive a relationship binding request sent by a first user, where the relationship binding request includes a relationship to be bound with the first user The user information of the second user, and the relationship label of the relationship to be bound between the first user and the second user; call the smart contract in the blockchain, based on the smart contract, the first user and the second user are corresponding to the relationship label The relationship is bound; and when the binding is successful, a relationship binding record between the first user and the second user is generated according to the user information of the second user; the relationship binding record is written into the blockchain.
  • a programmable logic device Programmable Logic Device, PLD
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Altera Hardware Description Language
  • HDCal JHDL
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller can be implemented in any suitable manner.
  • the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers.
  • controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as a part of the memory control logic.
  • controller in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for implementing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
  • a typical implementation device is a computer.
  • the computer may be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
  • the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, 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.
  • 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, magnetic tape magnetic disk storage 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.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • This application can also be practiced in distributed computing environments. In these distributed computing environments, remote processing devices connected through a communication network perform tasks.
  • program modules can be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种基于区块链的关系绑定方法、装置及设备,其中方法包括:接收第一用户发送的绑定请求,其中,绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签(S102);调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理(S104);若绑定成功,则根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录(S106);将关系绑定记录写入区块链中(S108)。该方法利用区块链技术确保了绑定的关系的真实性和有效性,以及关系绑定记录的不可篡改性和公开可查性,避免了数据丢失、数据造假、数据孤岛等问题。

Description

基于区块链的关系绑定方法、装置及设备 技术领域
本申请涉及区块链技术领域,尤其涉及一种基于区块链的关系绑定方法、装置及设备。
背景技术
生活中,人与人之间存在各种关系,如血缘关系、法定关系、合作关系、雇佣关系等;在一些情况中,根据已有的关系可以解决一些问题,例如可以根据血缘关系救助病人,可以根据法定关系确定人物身份等。
当前,人与人之间关系的确定方式,多为相关机构的工作人员参与认定,并由中心化的身份管理系统维护;然而人工参与认证不可避免的会有误操作的风险,并且中心化的数据库存在数据丢失、数据篡改、数据孤岛等问题,而由此会引发重婚、无法确定血缘关系等更为复杂的情况。
发明内容
本说明书一个或多个实施例的目的是提供一种基于区块链的关系绑定方法、装置及设备,基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,且基于区块链技术的特性使得关系的绑定过程多方可见,确保了关系绑定的真实性和有效性;而且将关系绑定记录写入区块链,确保了关系绑定记录的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
为解决上述技术问题,本说明书一个或多个实施例是这样实现的:
本说明书一个或多个实施例提供了一种基于区块链的关系绑定方法,包括:
接收第一用户发送的关系绑定请求,其中,所述关系绑定请求包括:与所述第一用户待绑定的第二用户的用户信息,以及所述第一用户和所述第二用户待绑定的关系的关系标签;
调用区块链中的智能合约,基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理;
若绑定成功,则根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑 定记录;
将所述关系绑定记录写入所述区块链中。
本说明书一个或多个实施例提供了一种基于区块链的关系绑定装置,包括:
接收模块,用于接收第一用户发送的关系绑定请求,其中,所述关系绑定请求包括:与所述第一用户待绑定的第二用户的用户信息,以及所述第一用户和所述第二用户待绑定的关系的关系标签;
绑定模块,用于调用区块链中的智能合约,基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理;
生成模块,用于若绑定成功,则根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录;
写入模块,用于将所述关系绑定记录写入所述区块链中。
本说明书一个或多个实施例提供了一种基于区块链的关系绑定设备,包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器实现上述所述的基于区块链的关系绑定方法的步骤。
本说明书一个或多个实施例提供了一种存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被执行时实现上述所述的基于区块链的关系绑定方法的步骤。
本说明书一个或多个实施例中的基于区块链的关系绑定方法、装置及设备,在接收到第一用户发送的关系绑定请求时,其中关系绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签,调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理,并在绑定成功时,根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录,将该关系绑定记录写入区块链中。可见,基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
附图说明
为了更清楚地说明本说明书一个或多个实施例或现有技术中的技术方案,下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本说明书一个或多个实施例提供的一种基于区块链的关系绑定系统的场景示意图;
图2为本说明书一个或多个实施例提供的一种基于区块链的关系绑定方法的第一种流程示意图;
图3为本说明书一个或多个实施例提供的步骤1042的第一种细化图;
图4为本说明书一个或多个实施例提供的步骤1042的第二种细化图;
图5为本说明书一个或多个实施例提供的一种基于区块链的关系绑定方法的第二种流程示意图;
图6为本说明书一个或多个实施例提供的一种基于区块链的关系绑定装置的模块组成示意图;
图7为本说明书一个或多个实施例提供的一种基于区块链的关系绑定设备的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书一个或多个实施例中的技术方案,下面将结合本说明书一个或多个实施例中的附图,对本说明书一个或多个实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书一个或多个实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请的保护范围。
本说明书一个或多个实施例提供了一种基于区块链的关系绑定方法、装置及设备,基于区块链中的智能合约实现了不同用户之间的关系绑定,不仅绑定过程中没有人工干扰且多方可见,确保了绑定的关系的真实性和有效性;而且通过将关系绑定记录保存至区块链中,确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。其中,关系绑定方法可应用于私有链,也可应用于公有链,还可应用于联盟链。
为便于区分,本申请中将进行关系绑定的请求方称为第一用户,第一用户操作第一客户端;将与第一用户待绑定的用户称为第二用户,第二用户操作第二客户端;其中,第一客户端和第二客户端可以为手机、平板电脑、台式计算机、便携笔记本式计算机等。应当理解的是,在不同的关系绑定场景中,第一用户还可以为第二用户,第二用户还可以为第一用户,相应的,第一客户端还可以为第二客户端,第二客户端还可以为第一客户端。
图1为本说明书一个或多个实施例提供的基于区块链的关系绑定系统的应用场景示意图,如图1所示,该系统包括:第一客户端、第二客户端和关系绑定节点;其中,第一用户操作第一客户端,第二用户操作第二客户端,第一客户端和第二客户端均通过无线网络与关系绑定节点通信连接,第一客户端、第二客户端和关系绑定节点均接入区块链;基于区块链的关系绑定过程包括:
(1)响应于第一用户触发的关系绑定事件,第一客户端生成关系绑定请求,向关系绑定节点发送生成的关系绑定请求,以请求在第一用户与第二用户之间绑定关系;其中,关系绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签;本说明书实施例中,用户信息用于标识唯一的用户,如用户信息为区块链账户信息、用户的身份证件号码等;关系标识包括待绑定的关系的关系类型和待绑定的用户在该待绑定的关系中的身份信息,关系标签的格式可以在实际应用中根据需要自行设定。作为示例,关系标签的格式可以为“关系类型:第一用户的身份信息-第二用户的身份信息”,如关系标签“父女:父-女”表示第一用户请求与第二用户绑定父女关系,且第一用户在父女关系中的身份信息为父亲,第二用户在父女关系中的身份信息为女儿。进一步的,本说明书实施例中的关系包括用户之间的夫妻关系、血缘关系、好友关系、合作关系、雇佣关系等;
(2)关系绑定节点接收第一客户端发送的关系绑定请求,获取第一用户的用户信息,并调用区块链中的智能合约,基于智能合约首先确定关系绑定请求包括的第二用户的用户信息有效;然后确定关系绑定请求包括的关系标签的类型,在关系标签为一对一绑定关系的关系标签时,若确定第二用户未与任何用户绑定该关系标签对应的关系,则发送确认绑定关系请求给第二客户端;在关系标签为一对多绑定关系的关系标签时,若确定第二用户在该关系标签对应的关系中处于第一身份,并且确定第二用户未与任何用户绑定该关系标签对应的关系,则发送确认绑定关系请求给第二客户端;若确定第二用户在该关系标签对应的关系中处于第二身份,则发送确认绑定关系请求给第二客户端;在关 系标签为多对多绑定关系的关系标签时,发送确认绑定关系请求给第二客户端;其中,第一身份和第二身份在不同的绑定关系中有所不同,例如,在父女关系中,女儿为第一身份,父亲为第二身份;又如,对于只能受雇于一个雇主的雇佣关系中,雇员为第一身份,雇主为第二身份;
(3)第二客户端接收关系绑定节点发送的确认绑定关系请求,显示提示信息,并在获取到第二用户提交的确认消息时,发送确认响应数据给关系绑定节点;
(4)若关系绑定节点获取到第二客户端发送的确认响应数据,则对第一用户和第二用户以关系标签对应的关系进行绑定,并生成关系绑定记录;其中,关系绑定记录包括第一用户的用户信息、第二用户的用户信息、以及关系标签,如关系绑定记录包括第一用户的区块链账户信息、第二用户的区块链账户信息以及关系标签;关系绑定记录还可以包括关系绑定时间等信息;
(5)关系绑定节点将生成的关系绑定记录写入区块链,以供有查询权限的用户进行关系查询。
在上述关系绑定过程中,基于区块链中的智能合约实现了不同用户之间的关系绑定,不仅绑定过程中没有人工干扰不仅且多方可见,确保了绑定的关系的真实性和有效性;同时,通过将关系绑定记录保存至区块链中,确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
图2为本说明书一个或多个实施例提供的基于区块链的关系绑定方法的流程示意图,图2中的方法能够由图1中接入区块链中的关系绑定节点执行,如图2所示,该方法包括以下步骤:
步骤S102,接收第一用户发送的关系绑定请求,其中,关系绑定请求包括:与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签;
具体的,接收第一用户操作其第一客户端发送的关系绑定请求,并获取第一用户的用户信息;其中,用户信息用于标识唯一的用户,如用户信息为区块链账户信息、用户的身份证件号码等;关系标签的格式可以为“关系类型:第一用户的身份信息-第二用户的身份信息”,如关系标签“父女:父-女”表示第一用户请求与第二用户绑定父女关系,且第一用户在父女关系中的身份信息为父亲,第二用户在父女关系中的身份信息为女儿。进一步的,本说明书实施例中的关系包括用户之间的夫妻关系、血缘关系、好友关系、合作关系、雇佣关系等。
步骤S104,调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理;
为了确保绑定的关系的真实性和有效性,关系绑定节点调用区块链中的智能合约,基于智能合约首先对绑定条件进行检测,并在检测结果为满足绑定条件时,对第一用户和第二用户以关系标签对应的关系进行绑定。
步骤S106,若绑定成功,则根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录;
其中,根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录,包括:将第一用户的用户信息、第二用户的用户信息、以及关系标签进行关联记录,将记录的信息作为第一用户和第二用户之间的关系绑定记录。例如,将第一用户的区块链账户信息、第二用户的区块链账户信息、以及关系标签进行关联记录,并将记录的信息作为第一用户和第二用户之间的关系绑定记录。由此,根据唯一标识用户的用户信息生成关系绑定记录,确保了用户与关系之间的唯一性,避免了出现关系混乱的问题。
需要指出的是,关系绑定记录还可以包括关系绑定时间等信息,其在实际应用中可以根据需要自行设定。
步骤S108,将关系绑定记录写入区块链中。
具体的,关系绑定节点将生成的关系绑定记录上传至区块链进行存储,以供具有查询权限的用户在区块链中查询用户之间的关系;由于上链的关系绑定记录是以密文形式进行加密存储,因此,具有查询权限的用户可以操作客户端获取解密密钥和核验哈希,以根据该核验哈希在区块链中查找对应的密文形式的关系绑定记录,并采用该解密密钥对查找的密文形式的关系绑定记录解密,得到明文形式的关系绑定记录。进一步的,由于区块链技术具有不可篡改性,且关系绑定记录是经过多方见证后写入区块链的,因此,可以保证上传至区块链中的关系绑定结果无法被篡改,从而保证了数据的真实性。
本说明书一个或多个实施例中,在接收到第一用户发送的关系绑定请求时,其中关系绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签,调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理,并在绑定成功时,根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录,将该关系绑定记录写入区块链中。可见,通过本说明书中的实施例,基于区块链中的智能合约,不仅关系的绑定过程中没有人工 干扰,且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
本说明书一个或多个实施例中,为确保绑定的关系的真实性和有效性,如图3所示,步骤S104包括:
步骤S1042,调用区块链中的智能合约,基于智能合约确定第一用户与第二用户是否满足绑定条件;
步骤S1044,若第一用户与第二用户满足绑定条件,则对第一用户和第二用户以关系标签对应的关系进行绑定。
考虑到关系绑定请求包括的第二用户的用户信息可能为无效的用户信息或错误的用户信息,使得绑定的关系没有意义,以及在第二用户不知情的情况下,在第一用户与第二用户之间绑定关系,存在虚假关系以及损害第二用户利益的风险;对此,本说明书一个或多个实施例中,步骤S1042中基于智能合约确定第一用户与第二用户是否满足绑定条件,包括:若基于智能合约确定第二用户的用户信息有效,并且获取到第二用户发送的确认响应数据,则确定第一用户与第二用户满足绑定条件。与之相对应的,方法还包括:
根据关系标签、第一用户的用户信息,发送确认绑定关系请求给第二用户,并获取第二用户发送的确认响应数据。具体而言,根据关系标签和第一用户的用户信息生成确认绑定关系请求,以及根据预存的用户信息与客户端的对应关系,确定第二用户的用户信息对应的第二客户端,将生成的确认绑定关系请求发送给确定的第二客户端;当第二客户端监测到确认绑定关系请求时,显示提示信息,以提示第二用户确认是否与第一用户绑定关系标签对应的关系,当第二客户端接收到第二用户提交的确认消息时,发送确认响应数据给关系绑定节点;关系绑定节点接收第二客户端发送的确认响应数据。
本说明书一个或多个实施例中,绑定请求还可以包括留言信息,该留言信息可以为预设的留言信息,也可以为第一用户与第二用户约定的信息,以作为第一用户和第二用户之间的提示信息,还可以为第一用户自行编辑的信息,如问候语、祝福语等。与之相对应的,方法还包括:
根据留言信息、关系标签、第一用户的用户信息,发送确认绑定关系请求给第二用户,并获取第二用户发送的确认响应数据。具体而言,根据留言信息、关系标签和第一 用户的用户信息生成确认绑定关系请求,以及根据预存的用户信息与客户端的对应关系,确定第二用户的用户信息对应的第二客户端,将生成的确认绑定关系请求发送给确定的第二客户端;当第二客户端监测到确认绑定关系请求时,显示提示信息,以提示第二用户确认是否与第一用户绑定关系标签对应的关系,当第二客户端接收到第二用户提交的确认消息时,发送确认响应数据给关系绑定节点;关系绑定节点接收第二客户端发送的确认响应数据。
本说明书一个或多个实施例中,通过发送包括关系标签以及第一用户的用户信息的确认绑定关系请求给第二用户,或者发送包括留言信息、关系标签以及第一用户的用户信息的确认绑定关系请求给第二用户,并获取第二用户发送的确认响应数据,有效的避免了因第二用户不知情而导致的虚假关系以及损害第二用户利益等现象的出现。
考虑到在第二用户没有及时确认与第一用户绑定关系标签对应的关系时,会使关系绑定节点长时间处于等待状态,基于此,上述获取第二用户发送的确认响应数据,包括:判断在预设时长内是否获取到第二用户发送的确认响应数据,若是,则继续执行后续操作,若否,则发送绑定失败信息给第一用户。
由于在实际生活中每个关系对应的用户身份以及用户数量不同,本说明书实施例中将绑定的关系进行划分,包括一对一绑定关系、一对多绑定关系、以及多对多绑定关系,并将其作为关系的属性;例如,夫妻关系为一对一绑定关系,父女关系为一对多绑定关系,师生关系为多对多绑定关系。
进一步的,当绑定请求包括的关系标签为一对一绑定关系的关系标签时,步骤S1042中基于智能合约确定第一用户和第二用户是否满足绑定条件,还包括:若基于智能合约确定第二用户未与任何用户绑定关系标签对应的关系,则确定第一用户和第二用户满足绑定条件;
当绑定请求包括的关系标签为一对多绑定关系的关系标签时,步骤S1042中基于智能合约确定第一用户和第二用户是否满足绑定条件,还包括:若基于智能合约确定第二用户在关系标签对应的关系中处于第一身份,并且确定第二用户未与任何用户绑定该关系标签对应的关系,则确定第一用户和第二用户满足绑定条件。其中,第一身份在不同的关系中有所不同,例如,在父女关系中,一个父亲可以有多个女儿,但每个女儿只能有一个父亲,女儿为第一身份,父亲为第二身份。
本说明书实施例中,针对不同属性的关系,采用不同的方式确认第一用户与第二用 户是否满足绑定条件,避免了绑定的关系不合理,以及关系冲突等问题。
进一步的,在确定第一用户与第二用户不满足绑定条件时,还包括:发送绑定失败信息给第一用户。
在一个具体的实施例中,如图4所示,步骤S1042可以包括:
步骤S1042-1,调用智能合约,基于智能合约判断第二用户的用户信息是否有效,是则执行步骤S1042-2,否则发送用户信息错误消息给第一用户;
具体的,判断预先存储的用户信息中是否含有关系绑定请求包括的用户信息,若判断结果为是,则确定绑定请求包括的用户信息有效,若判断结果为否,则确定绑定请求包括的用户信息无效。
步骤S1042-2,判断关系绑定请求包括的关系标签的类型,若关系标签为一对一绑定关系的关系标签,则执行步骤S1042-3,若关系标签为一对多绑定关系的关系标签,则执行步骤S1042-4,若关系标签为多对多绑定关系的关系标签,则执行步骤S1042-6;
具体的,智能合约中含有关系标签与关系的对应关系,以及每个关系与关系属性的对应关系,根据该关系标签与关系的对应关系,确定关系绑定请求包括的关系标签对应的关系,根据每个关系与关系属性的对应关系,确定关系绑定请求包括的关系标签对应的关系的关系属性,根据该关系属性确定关系标签的类型;或者,智能合约中含有关系标签的类型的确定标准,根据该确定标准,确定绑定请求包括的关系标签的类型。
步骤S1042-3,判断第二用户是否已绑定了关系标签对应的关系,是则发送绑定失败消息给第一用户,否则执行步骤S1042-6;
本说明书实施例中,关系绑定节点的本地数据库中存储有已绑定的关系,如存储用户维度的关系列表,即每个用户的关系列表,该关系列表中包括用户已绑定的关系的信息,如该用户的用户信息、该用户已绑定用户的用户信息、该用户已绑定的关系的关系类型、该用户在已绑定的关系中的身份信息等。相应的,步骤S1042-3包括,根据第二用户的用户信息在本地数据库中查找第二用户的关系列表,判断第二用户的关系列表中是否包括绑定请求包括的关系标签对应的关系,若是,则确定第二用户已绑定该关系标签对应的关系,若否,则确定第二用户未绑定该关系标签对应的关系。
其中,关系列表的一个示例如下所示:
Figure PCTCN2020071592-appb-000001
例如,第一用户的用户信息为USER6,绑定请求包括的关系标签为“夫妻:妻-夫”,第二用户的用户信息为USRE1,确定关系标签为一对一绑定关系的关系标签,则根据第二用户的用户信息USRE1查找到上述关系列表,且该关系列表中不包括夫妻关系,则执行步骤S1042-6。
需要指出的是,关系列表不限为上述形式,其可以在实际应用中根据需要自行设定。
步骤S1042-4,判断第二用户在关系标签对应的关系中所处的身份,如为第一身份,则执行步骤S1042-5,如为第二身份,则执行步骤S1042-6;
具体的,根据关系标签中包括的身份信息确定第二用户在关系标签对应的关系中所处的身份,例如,根据关系标签“父女:父-女”,可以确定第二用户的身份信息为女儿。
步骤S1042-5,判断第二用户是否已绑定关系标签对应的关系,是则发送绑定失败消息给第一用户,否则执行步骤S1042-6;
本步骤的实现方法,与步骤S1042-3的实现方法相同,在此不再赘述。
步骤S1042-6,根据关系标签、第一用户的用户信息,发送确认绑定关系请求给第二用户;或者,根据描述信息、关系标签、第一用户的用户信息,发送确认绑定关系请求给第二用户;
步骤S1042-7,判断预设时长内是否获取到第二用户发送的响应数据,是则执行步骤S1042-8,否则发送绑定失败信息给第一用户;
其中,预设时长可以在实际应用中根据需要自行设定,例如为2分钟。
步骤S1042-8,判断获取的响应数据的类型,如为确认响应数据,则执行步骤S1044,如为拒绝响应数据,则发送第二用户拒绝绑定消息给第一用户。
由此,通过判断第二用户的用户信息的有效性、第二用户是否可以绑定关系标签对应的关系、以及第二用户是否确认绑定关系标签对应的关系,确保了绑定的关系的有效性和准确性,避免了关系冲突,以及因关系冲突带来的不必要的麻烦。
进一步的,为使关系绑定节点的本地数据库中存储的关系的信息具有时效性,图5 为本说明书另一实施例提供的基于区块链的绑定方法的流程示意图,如图5所示,该方法在图2的基础上,还包括以下步骤:
步骤S110:将关系标签保存至本地数据库中;
具体的,根据第一用户的用户信息在本地数据库中查找第一用户的关系列表,将关系绑定请求包括的关系标签保存至第一用户的关系列表中,以及根据第二用户的用户信息在本地数据库中查找第二用户的关系列表,将关系绑定请求包括的关系标签保存至第二用户的关系列表中。在关系列表中存储了关系标签之后,本地相应记录下了第一用户和第二用户之间的关系,需要指出的是,根据关系列表的样式的不同,还可以在关系列表中存储其他信息,如存储已绑定用户的用户信息、用户在已绑定的关系中的身份信息等。由此,在每次绑定关系成功之后,将对应的关系标签保存至对应的关系列表中,确保了关系列表中关系的及时更新,具有时效性。作为示例,更新后的第二用户的上述关系列表如下所示:
Figure PCTCN2020071592-appb-000002
需要指出的,步骤110与步骤106和步骤108的执行顺序可以互换,步骤110还可以与步骤106同时执行,或者步骤110还可以与步骤108同时执行。
由此,在接收到第一用户发送的关系绑定请求时,其中关系绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签,调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理,并在绑定成功时,生成第一用户和第二用户之间的关系绑定记录,将该关系绑定记录写入区块链中。可见,本说明书实施例中,基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
对应上述图2至图5描述的基于区块链的关系绑定方法,基于相同的技术构思,本说明书一个或多个实施例还提供一种基于区块链的关系绑定装置。图6为本说明书一个或多个实施例提供的基于区块链的关系绑定装置的模块组成示意图,该装置用于执行图 2至图5描述的基于区块链的关系绑定方法,如图6所示,该装置包括:
接收模块61,用于接收第一用户发送的关系绑定请求,其中,所述关系绑定请求包括:与所述第一用户待绑定的第二用户的用户信息,以及所述第一用户和所述第二用户待绑定的关系的关系标签;
绑定模块62,用于调用区块链中的智能合约,基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理;
生成模块63,用于若绑定成功,则根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录;
写入模块64,用于将所述关系绑定记录写入所述区块链中。
本说明书一个或多个实施例中,基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
可选地,绑定模块62具体用于:
基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件;
若是,则对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定。
可选地,绑定模块62,进一步具体用于:
若基于所述智能合约确定所述第二用户的用户信息有效,并且获取到所述第二用户发送的确认响应数据,则确定所述第一用户和所述第二用户满足绑定条件。
可选地,关系标签为一对一绑定关系的关系标签,对应的,绑定模块62,还具体用于:
若基于所述智能合约确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件;
可选地,关系标签为一对多绑定关系的关系标签,对应的,绑定模块62,还具体用于:
若基于所述智能合约确定所述第二用户在所述关系标签对应的关系中处于第一身份,并且确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述 第一用户和所述第二用户满足绑定条件。
可选地,绑定模块62,进一步具体用于:
根据所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据;或者,
绑定请求还包括留言信息,绑定模块62,进一步具体用于:
根据所述留言信息、所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据。
可选地,生成模块64,具体用于:
将所述第一用户的用户信息、所述第二用户的用户信息、以及所述关系标签进行关联记录,将记录的信息作为所述第一用户和所述第二用户之间的关系绑定记录。
可选地,装置还包括保存模块,用于:
在绑定模块62基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理之后,将所述关系标签保存至本地数据库中。
本说明书一个或多个实施例提供的基于区块链的关系绑定装置,能够接收第一用户发送的绑定请求,其中,绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签;调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理;并在绑定成功时,根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录;将该关系绑定记录写入区块链中。其基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,而且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
需要说明的是,本申请中关于基于区块链的关系绑定装置的实施例与本申请中关于基于区块链的关系绑定方法的实施例基于同一发明构思,因此该实施例的具体实施可以参见前述对应的基于区块链的关系绑定方法的实施,重复之处不再赘述。
进一步地,对应上述图2至图5所示的方法,基于相同的技术构思,本说明书一个或多个实施例还提供一种基于区块链的关系绑定设备,该设备用于执行上述的基于区块链的关系绑定方法,如图7所示。
基于区块链的关系绑定设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器701和存储器702,存储器702中可以存储有一个或一个以上存储应用程序或数据。其中,存储器702可以是短暂存储或持久存储。存储在存储器702的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括基于区块链的关系绑定设备中的一系列计算机可执行指令。更进一步地,处理器701可以设置为与存储器702通信,在基于区块链的关系绑定设备上执行存储器702中的一系列计算机可执行指令。基于区块链的关系绑定设备还可以包括一个或一个以上电源703,一个或一个以上有线或无线网络接口704,一个或一个以上输入输出接口705,一个或一个以上键盘706等。
在一个具体的实施例中,基于区块链的关系绑定设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对基于区块链的关系绑定设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:
接收第一用户发送的关系绑定请求,其中,所述关系绑定请求包括:与所述第一用户待绑定的第二用户的用户信息,以及所述第一用户和所述第二用户待绑定的关系的关系标签;
调用区块链中的智能合约,基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理;
若绑定成功,则根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录;
将所述关系绑定记录写入所述区块链中。
本说明书一个或多个实施例中,基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,而且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
可选地,计算机可执行指令在被执行时,所述基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理,包括:
基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件;
若是,则对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定。
可选地,计算机可执行指令在被执行时,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,包括:
若基于所述智能合约确定所述第二用户的用户信息有效,并且获取到所述第二用户发送的确认响应数据,则确定所述第一用户和所述第二用户满足绑定条件。
可选地,计算机可执行指令在被执行时,所述关系标签为一对一绑定关系的关系标签,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,还包括:
若基于所述智能合约确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件;
所述关系标签为一对多绑定关系的关系标签,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,还包括:
若基于所述智能合约确定所述第二用户在所述关系标签对应的关系中处于第一身份,并且确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件。
可选地,计算机可执行指令在被执行时,所述方法还包括:
根据所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据;或者,
所述绑定请求还包括留言信息,所述方法还包括:
根据所述留言信息、所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据。
可选地,计算机可执行指令在被执行时,所述根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录,包括:
将所述第一用户的用户信息、所述第二用户的用户信息、以及所述关系标签进行关联记录,将记录的信息作为所述第一用户和所述第二用户之间的关系绑定记录。
可选地,计算机可执行指令在被执行时,所述基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理之后,还包括:
将所述关系标签保存至本地数据库中。
本说明书一个或多个实施例提供的基于区块链的关系绑定设备,能够接收接收第一用户发送的关系绑定请求,其中,关系绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签;调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理;并在绑定成功时,根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录;将该关系绑定记录写入区块链中。其基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,而且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
需要说明的是,本说明书中关于基于区块链的关系绑定设备的实施例与本说明书中关于基于区块链的关系绑定方法的实施例基于同一发明构思,因此该实施例的具体实施可以参见前述对应的基于区块链的关系绑定方法的实施,重复之处不再赘述。
进一步地,对应上述图2至图5所示的方法,基于相同的技术构思,本说明书一个或多个实施例还提供了一种存储介质,用于存储计算机可执行指令,一个具体的实施例中,该存储介质可以为U盘、光盘、硬盘等,该存储介质存储的计算机可执行指令在被处理器执行时,能实现以下流程:
接收第一用户发送的关系绑定请求,其中,所述关系绑定请求包括:与所述第一用户待绑定的第二用户的用户信息,以及所述第一用户和所述第二用户待绑定的关系的关系标签;
调用区块链中的智能合约,基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理;
若绑定成功,则根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录;
将所述关系绑定记录写入所述区块链中。
本说明书一个或多个实施例中,基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,而且基于区块链技术的特性使得关系的绑定过程多方可见,确保了绑定的关系的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理,包括:
基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件;
若是,则对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,包括:
若基于所述智能合约确定所述第二用户的用户信息有效,并且获取到所述第二用户发送的确认响应数据,则确定所述第一用户和所述第二用户满足绑定条件。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述关系标签为一对一绑定关系的关系标签,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,还包括:
若基于所述智能合约确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件;
所述关系标签为一对多绑定关系的关系标签,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,还包括:
若基于所述智能合约确定所述第二用户在所述关系标签对应的关系中处于第一身份,并且确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述方法还包括:
根据所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据;或者,
所述绑定请求还包括留言信息,所述方法还包括:
根据所述留言信息、所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录,包括:
将所述第一用户的用户信息、所述第二用户的用户信息、以及所述关系标签进行关联记录,将记录的信息作为所述第一用户和所述第二用户之间的关系绑定记录。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理之后,还包括:
将所述关系标签保存至本地数据库中。
本说明书一个或多个实施例提供的存储介质存储的计算机可执行指令在被处理器执行时,接收第一用户发送的关系绑定请求,其中,关系绑定请求包括与第一用户待绑定的第二用户的用户信息,以及第一用户和第二用户待绑定的关系的关系标签;调用区块链中的智能合约,基于智能合约对第一用户和第二用户以关系标签对应的关系进行绑定处理;并在绑定成功时,根据第二用户的用户信息生成第一用户和第二用户之间的关系绑定记录;将该关系绑定记录写入区块链中。其基于区块链中的智能合约,不仅关系的绑定过程中没有人工干扰,而且基于区块链技术的特性使得关系的绑定过程多方可见,确保了关系绑定的真实性和有效性;同时,还确保了上链数据的不可篡改性以及公开可查性,有效的避免了数据丢失、数据造假、数据孤岛等问题。
需要说明的是,本申请中关于存储介质的实施例与本申请中关于基于区块链的关系绑定方法的实施例基于同一发明构思,因此该实施例的具体实施可以参见前述对应的基于区块链的关系绑定方法的实施,重复之处不再赘述。
在20世纪70年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并 非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实 施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑 可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (14)

  1. 一种基于区块链的关系绑定方法,包括:
    接收第一用户发送的关系绑定请求,其中,所述关系绑定请求包括:与所述第一用户待绑定的第二用户的用户信息,以及所述第一用户和所述第二用户待绑定的关系的关系标签;
    调用区块链中的智能合约,基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理;
    若绑定成功,则根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录;
    将所述关系绑定记录写入所述区块链中。
  2. 根据权利要求1所述的方法,所述基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理,包括:
    基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件;
    若是,则对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定。
  3. 根据权利要求2所述的方法,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,包括:
    若基于所述智能合约确定所述第二用户的用户信息有效,并且获取到所述第二用户发送的确认响应数据,则确定所述第一用户和所述第二用户满足绑定条件。
  4. 根据权利要求3所述的方法,所述关系标签为一对一绑定关系的关系标签,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,还包括:
    若基于所述智能合约确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件;
    所述关系标签为一对多绑定关系的关系标签,所述基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件,还包括:
    若基于所述智能合约确定所述第二用户在所述关系标签对应的关系中处于第一身份,并且确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件。
  5. 根据权利要求3所述的方法,还包括:
    根据所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据;或者,
    所述绑定请求还包括留言信息,所述方法还包括:
    根据所述留言信息、所述关系标签、所述第一用户的用户信息,发送确认绑定关系请求给所述第二用户,并获取所述第二用户发送的确认响应数据。
  6. 根据权利要求1-5任一项所述的方法,所述根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录,包括:
    将所述第一用户的用户信息、所述第二用户的用户信息、以及所述关系标签进行关联记录,将记录的信息作为所述第一用户和所述第二用户之间的关系绑定记录。
  7. 根据权利要求1-5任一项所述的方法,其特征在于,所述基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理之后,还包括:
    将所述关系标签保存至本地数据库中。
  8. 一种基于区块链的关系绑定装置,其特征在于,包括:
    接收模块,用于接收第一用户发送的关系绑定请求,其中,所述关系绑定请求包括:与所述第一用户待绑定的第二用户的用户信息,以及所述第一用户和所述第二用户待绑定的关系的关系标签;
    绑定模块,用于调用区块链中的智能合约,基于所述智能合约对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定处理;
    生成模块,用于若绑定成功,则根据所述用户信息生成所述第一用户和所述第二用户之间的关系绑定记录;
    写入模块,用于将所述关系绑定记录写入所述区块链中。
  9. 根据权利要8所述的装置,其特征在于,所述绑定模块具体用于:
    基于所述智能合约确定所述第一用户和所述第二用户是否满足绑定条件;
    若是,则对所述第一用户和所述第二用户以所述关系标签对应的关系进行绑定。
  10. 根据权利要求9所述的装置,其特征在于,所述绑定模块,进一步具体用于:
    若基于所述智能合约确定所述第二用户的用户信息有效,并且获取到所述第二用户发送的确认响应数据,则确定所述第一用户和所述第二用户满足绑定条件。
  11. 根据权利要求10所述的装置,其特征在于,所述关系标签为一对一绑定关系的关系标签,所述绑定模块,还具体用于:
    若基于所述智能合约确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第一用户和所述第二用户满足绑定条件;
    所述关系标签为一对多绑定关系的关系标签,所述绑定模块,还具体用于:
    若基于所述智能合约确定所述第二用户在所述关系标签对应的关系中处于第一身份,并且确定所述第二用户未与任何用户绑定所述关系标签对应的关系,则确定所述第 一用户和所述第二用户满足绑定条件。
  12. 根据权利要求8-11任一项所述的装置,其特征在于,所述生成模块,具体用于:
    将所述第一用户的用户信息、所述第二用户的用户信息、以及所述关系标签进行关联记录,将记录的信息作为所述第一用户和所述第二用户之间的关系绑定记录。
  13. 一种基于区块链的关系绑定设备,包括:处理器;以及被安排成存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器实现上述权利要求1至7任一项所述的基于区块链的关系绑定方法的步骤。
  14. 一种存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被执行时实现上述权利要求1至7任一项所述的基于区块链的关系绑定方法的步骤。
PCT/CN2020/071592 2019-06-11 2020-01-11 基于区块链的关系绑定方法、装置及设备 WO2020248602A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/877,337 US10909252B2 (en) 2019-06-11 2020-05-18 Blockchain-based relationship binding method, apparatus, and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910502763.9 2019-06-11
CN201910502763.9A CN110334160A (zh) 2019-06-11 2019-06-11 基于区块链的关系绑定方法、装置及设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/877,337 Continuation US10909252B2 (en) 2019-06-11 2020-05-18 Blockchain-based relationship binding method, apparatus, and device

Publications (1)

Publication Number Publication Date
WO2020248602A1 true WO2020248602A1 (zh) 2020-12-17

Family

ID=68140990

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/071592 WO2020248602A1 (zh) 2019-06-11 2020-01-11 基于区块链的关系绑定方法、装置及设备

Country Status (2)

Country Link
CN (1) CN110334160A (zh)
WO (1) WO2020248602A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10909252B2 (en) 2019-06-11 2021-02-02 Advanced New Technologies Co., Ltd. Blockchain-based relationship binding method, apparatus, and device
CN110334160A (zh) * 2019-06-11 2019-10-15 阿里巴巴集团控股有限公司 基于区块链的关系绑定方法、装置及设备
CN112417502B (zh) * 2020-11-18 2022-03-18 中国电子科技集团公司第三十研究所 基于区块链、去中心化部署的分布式即时通讯系统及方法
CN113472543A (zh) * 2021-07-20 2021-10-01 支付宝(杭州)信息技术有限公司 基于区块链的就业数据处理方法、装置、电子设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453415A (zh) * 2016-12-01 2017-02-22 江苏通付盾科技有限公司 基于区块链的设备认证方法、认证服务器及用户设备
CN107563846A (zh) * 2017-08-10 2018-01-09 深圳市易成自动驾驶技术有限公司 共享车辆管理方法、服务器、系统和计算机可读存储介质
WO2018140913A1 (en) * 2017-01-30 2018-08-02 SALT Lending Holdings, Inc. System and method of creating an asset based automated secure agreement
CN109145201A (zh) * 2018-07-26 2019-01-04 百度在线网络技术(北京)有限公司 一种基于区块链的信息管理方法、装置、设备及存储介质
CN109302415A (zh) * 2018-11-09 2019-02-01 四川虹微技术有限公司 一种认证方法、区块链节点及存储介质
CN110334160A (zh) * 2019-06-11 2019-10-15 阿里巴巴集团控股有限公司 基于区块链的关系绑定方法、装置及设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451485B (zh) * 2017-06-02 2020-03-13 创新先进技术有限公司 一种基于区块链的数据处理方法及设备
US20190095585A1 (en) * 2017-09-27 2019-03-28 International Business Machines Corporation Blockchain based proactive chromosomal determination
CN109660352B (zh) * 2018-11-16 2021-12-03 深圳变设龙信息科技有限公司 一种基于区块链的分销关系记录方法、装置及终端设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453415A (zh) * 2016-12-01 2017-02-22 江苏通付盾科技有限公司 基于区块链的设备认证方法、认证服务器及用户设备
WO2018140913A1 (en) * 2017-01-30 2018-08-02 SALT Lending Holdings, Inc. System and method of creating an asset based automated secure agreement
CN107563846A (zh) * 2017-08-10 2018-01-09 深圳市易成自动驾驶技术有限公司 共享车辆管理方法、服务器、系统和计算机可读存储介质
CN109145201A (zh) * 2018-07-26 2019-01-04 百度在线网络技术(北京)有限公司 一种基于区块链的信息管理方法、装置、设备及存储介质
CN109302415A (zh) * 2018-11-09 2019-02-01 四川虹微技术有限公司 一种认证方法、区块链节点及存储介质
CN110334160A (zh) * 2019-06-11 2019-10-15 阿里巴巴集团控股有限公司 基于区块链的关系绑定方法、装置及设备

Also Published As

Publication number Publication date
CN110334160A (zh) 2019-10-15

Similar Documents

Publication Publication Date Title
WO2020248602A1 (zh) 基于区块链的关系绑定方法、装置及设备
TWI748175B (zh) 資料的處理方法、裝置及設備
WO2021068636A1 (zh) 基于区块链的可验证声明的创建方法、装置、设备及系统
TWI706653B (zh) 授權引導的資料處理方法、裝置、處理設備及系統
US11126974B2 (en) Blockchain service data processing
TW201917666A (zh) 資料審計的方法及裝置
KR102238954B1 (ko) 로직 맵을 통한 스마트 계약 데이터베이스의 트래버싱
US9104768B2 (en) Person-based information aggregation
US9544726B2 (en) Adding location names using private frequent location data
TWI705348B (zh) 服務調用方法及裝置
WO2020024650A1 (zh) 数据处理方法和装置、客户端
TW202025057A (zh) 欄位更新方法及裝置、電子設備
US10243934B1 (en) Tracking of web-based document storage requests
US20170149686A1 (en) Resource watermarking and management
TW202018644A (zh) 基於區塊鏈的資料處理方法、裝置和伺服器
TWI686758B (zh) 資料請求處理、詢問消息處理方法、裝置以及設備
CN113127516B (zh) 一种区块链数据的处理方法、装置及设备
CN108959376A (zh) 一种数据处理方法及装置
US11604894B2 (en) Data processing methods, apparatuses, devices, and media
US9531832B2 (en) Migrating social connections from a first profile to a second profile
US10909252B2 (en) Blockchain-based relationship binding method, apparatus, and device
TW201734877A (zh) 基於應用程序的用戶資訊的隱藏方法及裝置
US20230289457A1 (en) Preventing Illicit Data Transfer and Storage
US20220051092A1 (en) System and methods for translating error messages
CN117527319A (zh) 一种基于区块链的业务办理方法、装置及设备

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

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

Country of ref document: EP

Kind code of ref document: A1