Smart contract business card method, device, equipment and storage medium based on blockchain

Through the blockchain-based smart contract business card method, the problem of insufficient data timeliness, accuracy and security in the existing electronic business card generation methods is solved, and higher data security and accuracy are achieved.

CN114417374BActive Publication Date: 2025-04-11WEIWEI SHANGHAI NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111639480.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-04-11
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

Existing electronic business card generation methods cannot ensure the timeliness and accuracy of user-related data, and their security is not high enough.

Method used

The smart contract business card method based on blockchain is adopted. By obtaining user basic information and blockchain account, the user account is activated, the organization information is indexed, and the encryption algorithm and hash algorithm are used to generate encryption keys and hash values, which are written into the business card to ensure the security of the data.

Benefits of technology

It has achieved the security improvement of business card generation, ensured the timeliness and accuracy of user data, and prevented data tampering and leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114417374B_ABST
    Figure CN114417374B_ABST
Patent Text Reader

Abstract

The present invention relates to blockchain technology, and discloses a smart contract business card method based on blockchain, including: when a user blockchain account is activated, indexing the organization information of the organization to which the user blockchain account belongs, writing the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information into multiple account fields of the initial business card respectively, generating an encryption key and its corresponding decryption key, using the encryption key to encrypt the personal information in the user basic information to obtain encrypted information, calculating the hash value of the personal information, writing the hash value, the encryption key, and the encrypted information into the content field in the initial business card, and using the public key of the organization account and the public key of the employee account to encrypt the decryption key and write it into the field respectively, to obtain the user business card. The present invention also proposes a smart contract business card device, electronic device, and storage medium based on blockchain. The present invention can solve the problem that the security of business card generation is not high enough.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based smart contract business card method, device, electronic device and computer-readable storage medium. Background Art

[0002] Business cards have always played an indispensable role in work and social activities in all walks of life. When facing customers, you have to hand over your business card. However, with the change of consumption patterns and the popularization of the Internet, face-to-face marketing is no longer the only method. Many users are gradually using the Internet to provide another consumption model, and electronic business cards have also emerged in response to the consumption model of the Internet.

[0003] The existing electronic business card generation method usually obtains user-related data from the merchant's database and generates an electronic business card based on the existing business card template. This method cannot ensure the timeliness of user-related data and the accuracy of generating electronic business cards. At the same time, the security of generating business cards based on user-related data is not high enough. Summary of the invention

[0004] The present invention provides a blockchain-based smart contract business card method, device and computer-readable storage medium, the main purpose of which is to solve the problem of insufficient security in business card generation.

[0005] To achieve the above purpose, the present invention provides a blockchain-based smart contract business card method, comprising:

[0006] Obtaining basic user information and user blockchain account, and activating the user blockchain account;

[0007] After the user blockchain account is activated, the organization information of the organization to which the user blockchain account belongs is indexed, and the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information are respectively written into multiple account fields of the pre-built initial business card;

[0008] Generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information;

[0009] Calculating a hash value of the personal information based on a preset hash algorithm, and writing the hash value, the encryption key and the encryption information into a content field in the initial business card;

[0010] Writing the institution account number in the institution information into the account number field in the initial business card, encrypting the decryption key using the public key corresponding to the institution account number, and writing the encrypted first ciphertext into the ciphertext field corresponding to the account number field;

[0011] The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain a user business card.

[0012] Optionally, the activating the user blockchain account includes:

[0013] Query the corresponding user according to the user blockchain account, and obtain the public key corresponding to the user;

[0014] Write the public key and the user blockchain account into the activated account list on the preset blockchain.

[0015] Optionally, the calculating the hash value of the personal information based on a preset hash algorithm includes:

[0016] Determining whether the size of the personal information meets the preset filling requirements;

[0017] If the size of the personal information meets the filling requirement, then adding the value of the first digit at the end of the personal information to obtain first filling data;

[0018] If the size of the personal information does not meet the filling requirement, padding the personal information to obtain second filling data;

[0019] The first filling data or the second filling data is input into a preset hash function buffer for data processing to obtain a hash value corresponding to the personal information.

[0020] Optionally, after obtaining the user's business card, the method further includes:

[0021] Obtaining an instruction for performing a business card operation on the user's business card, and parsing and processing the instruction;

[0022] When the parsed instruction is to share a business card, a business card sharing operation is performed on the user's business card according to the user's blockchain account; or

[0023] When the parsed instruction is to update the business card, use the organization blockchain account to perform a business card update operation on the user business card; or

[0024] When the parsed instruction is to destroy the business card, the status field in the user business card is set to destroyed using the organization blockchain account.

[0025] Optionally, performing a business card sharing operation on the user business card according to the user blockchain account includes:

[0026] Obtain the account of the sharing object, and query the public key corresponding to the account of the sharing object based on the activated account list on the blockchain;

[0027] Searching the encrypted ciphertext corresponding to the user blockchain account in the user business card, and decrypting the encrypted ciphertext using the private key of the user blockchain account to obtain a decrypted ciphertext;

[0028] The account number of the sharing object is written into the account number field of the user business card, and the decrypted ciphertext is encrypted using the public key corresponding to the account number of the sharing object, and the encrypted decrypted ciphertext is stored in the ciphertext field corresponding to the account number field to obtain a shared business card.

[0029] Optionally, performing a business card update operation on the user business card using the organization blockchain account includes:

[0030] Performing a hash operation on the pre-acquired information to be updated to obtain standard update information, and writing the standard update information into the hash value field of the user business card;

[0031] The encryption key in the user business card is read using the organization blockchain account, and the information to be updated is encrypted using the encryption key, and the encrypted information to be updated is written into the information field in the user business card to obtain an updated business card.

[0032] Optionally, the generating an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm includes:

[0033] Obtaining a preset generator, a cyclic group, and an order corresponding to the cyclic group;

[0034] Constructing a cyclic interval based on the cyclic group order, and arbitrarily selecting a random number in the cyclic interval;

[0035] Calculate the discrete number corresponding to the generator according to a preset discrete formula;

[0036] An encryption key is constructed according to the discrete number, the generator, the random number and the order, and the random number is used as the decryption key.

[0037] In order to solve the above problems, the present invention also provides a smart contract business card device based on blockchain, the device comprising:

[0038] An account activation module is used to obtain basic user information and user blockchain account, and activate the user blockchain account;

[0039] A field filling module is used to index the organization information of the organization to which the user blockchain account belongs after the user blockchain account is activated, and write the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information into multiple account fields of the pre-built initial business card respectively;

[0040] A key generation module, used to generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information;

[0041] A business card creation module is used to calculate the hash value of the personal information based on a preset hash algorithm, and write the hash value, the encryption key and the encrypted information into the content field of the initial business card, write the institution account in the institution information into the account field in the initial business card, and use the public key corresponding to the institution account to encrypt the decryption key, write the encrypted first ciphertext into the ciphertext field corresponding to the account field, encrypt the decryption key using the public key corresponding to the user account in the user basic information, write the encrypted second ciphertext and the user account into the field, and obtain a user business card.

[0042] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0043] at least one processor; and,

[0044] a memory communicatively connected to the at least one processor; wherein,

[0045] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned blockchain-based smart contract business card method.

[0046] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned blockchain-based smart contract business card method.

[0047] The embodiment of the present invention generates an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, uses the encryption key to encrypt personal information in the user basic information to obtain encrypted information, uses the encryption key to encrypt personal information and saves the data on the chain to ensure the security of key data, uses the public key corresponding to the institutional account to encrypt the decryption key, writes the encrypted ciphertext into the ciphertext field corresponding to the account field, and ensures that only the holder corresponding to the institutional account can view the decryption key, so that the plaintext can be decrypted. The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain the user business card. Therefore, the blockchain-based smart contract business card method, device, electronic device and computer-readable storage medium proposed in the present invention can solve the problem of insufficient security in business card generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A flowchart of a smart contract business card method based on blockchain provided by one embodiment of the present invention;

[0049] Figure 2 A functional module diagram of a blockchain-based smart contract business card device provided by one embodiment of the present invention;

[0050] Figure 3 A schematic diagram of the structure of an electronic device for implementing the blockchain-based smart contract business card method provided by one embodiment of the present invention.

[0051] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0053] The embodiment of the present application provides a smart contract business card method based on blockchain. The execution subject of the smart contract business card method based on blockchain includes but is not limited to at least one of the electronic devices such as the server, terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the smart contract business card method based on blockchain can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0054] Reference Figure 1 FIG. 1 is a flow chart of a smart contract business card method based on blockchain provided by an embodiment of the present invention. In this embodiment, the smart contract business card method based on blockchain includes:

[0055] S1. Obtain basic user information and user blockchain account, and activate the user blockchain account.

[0056] In an embodiment of the present invention, the basic user information may be basic information of multiple employees in a company, such as employee name, position, email address, employee ID, and contact information, etc. The basic user information may be obtained from a third-party database, wherein the third-party database is a database that stores a large amount of user-related information to achieve centralized control and management of data.

[0057] Specifically, the activation process of the user blockchain account includes:

[0058] Query the corresponding user according to the user blockchain account, and obtain the public key corresponding to the user;

[0059] Write the public key and the user blockchain account into the activated account list on the preset blockchain.

[0060] In detail, the user needs to activate his own blockchain account. The activation process is to write the user's own blockchain account and the corresponding public key into the activation account list on the blockchain. The activation account list contains multiple accounts, public keys and status. Among them, the blockchain includes the first blockchain node, the second blockchain node, the third blockchain node, the N-1th blockchain node, and the Nth blockchain node, where N is a positive integer and the value of N can be preset. Each blockchain node is interconnected to form a cross-blockchain network. Information can be transmitted between each blockchain node and updated synchronously.

[0061] S2. After the user blockchain account has been activated, the organization information of the organization to which the user blockchain account belongs is indexed, and the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information are respectively written into multiple account fields of the pre-built initial business card.

[0062] In an embodiment of the present invention, after the user blockchain account is activated, the organization information of the organization to which the user blockchain account belongs is indexed, wherein the user blockchain account is the employee's blockchain account, and the organization information of the organization to which the user blockchain account belongs is the company information of the employee's company, and the company information includes but is not limited to the organization's blockchain account.

[0063] Specifically, the user blockchain account, the user identifier in the user basic information, and the institution blockchain account in the institution information are respectively written into multiple account fields of the pre-built initial business card, wherein the pre-built initial business card contains multiple pre-set account fields, for example, an id field, an issuer field, an owner field, a status field, and an info-hash field, an encrypt_key field, and an info (ciphertext) field in content.

[0064] For example, the user blockchain account is written into the owner field, the institution blockchain account is written into the issuer field, the user identifier in the user basic information, i.e., the employee ID, is written into the id field, and the status field is set to activated.

[0065] S3. Generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information.

[0066] In an embodiment of the present invention, an encryption key and a decryption key corresponding to the encryption key are generated based on a preset encryption algorithm, and the encryption key is used to encrypt the personal information in the user basic information, so as to further ensure the security of the storage of the user basic information. The encryption algorithm can generally be divided into a symmetric encryption algorithm and an asymmetric encryption algorithm, wherein the symmetric encryption algorithm refers to the use of the same key for both encryption and decryption, such as a DES encryption algorithm or an AES encryption algorithm. The asymmetric encryption algorithm requires two keys, a public key and a private key. The public key and the private key are a pair. If the data is encrypted with the public key, it can only be decrypted with the corresponding private key. The asymmetric encryption algorithm includes but is not limited to the RSA algorithm, the DH algorithm, and the national secret SM2 algorithm.

[0067] In one embodiment of the present invention, the step of generating an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm includes:

[0068] Obtaining a preset generator, a cyclic group, and an order corresponding to the cyclic group;

[0069] Constructing a cyclic interval based on the cyclic group order, and arbitrarily selecting a random number in the cyclic interval;

[0070] Calculate the discrete number corresponding to the generator according to a preset discrete formula;

[0071] An encryption key is constructed according to the discrete number, the generator, the random number and the order, and the random number is used as the decryption key.

[0072] In detail, in the embodiment of the present invention, the encryption algorithm used is the ElGamal encryption algorithm, a preset generator g and a q-order cyclic group G are obtained, a cyclic interval {1, ..., q-1} is constructed based on the cyclic group order q, and a random number x is randomly selected from the cyclic interval as a random number, and the discrete formula h = g is used. x Calculate the discrete number corresponding to the generator, and construct the encryption key (h, g, x, q) using the discrete number h, the generator g, the random number x and the order q, and let the random number x be the decryption key.

[0073] In another embodiment of the present invention, the generating of an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm includes:

[0074] Randomly obtain two different prime numbers;

[0075] Asymmetric calculation processing is performed on the prime numbers respectively to obtain an encryption key and a decryption key.

[0076] Specifically, the asymmetric calculation processing is performed on the prime numbers respectively to obtain an encryption key and a decryption key, including:

[0077] For two different prime numbers p and q obtained randomly, calculate the product n = pq,

[0078] Choose one that satisfies An integer e is obtained, and the integer e is used as an encryption key;

[0079] Choose one that satisfies An integer d is obtained, and the integer d is used as a decryption key.

[0080] In detail, the encryption algorithm used in the embodiment of the present invention is the RSA algorithm.

[0081] The encrypted information can only be decrypted using the corresponding decryption key. The existence of the decryption key ensures that the data can be decrypted only when the decryption key is obtained, and the data cannot be viewed or decrypted without the decryption key.

[0082] Specifically, the encryption key is used to encrypt the personal information in the user basic information to obtain encrypted information. The personal information in the user basic information is the employee's name, position, and email address.

[0083] S4. Calculate the hash value of the personal information based on a preset hash algorithm, and write the hash value, the encryption key and the encryption information into the content field of the initial business card.

[0084] In the embodiment of the present invention, the hash algorithm can convert a data into a mark, and the mark has a very close relationship with each byte in the data before the conversion. The hash algorithm includes the MD4 (Message Digest, message digest algorithm 4) algorithm, the hash function (Message Digest, message digest algorithm 5) algorithm and the SHA-1 (Secure Hash Algorithm 1, secure hash algorithm 1) algorithm, wherein, in this solution, the hash function algorithm can be used to calculate the hash value of the personal information. The hash function algorithm, a widely used cryptographic hash function, can generate a 128-bit hash value to ensure the integrity and consistency of information transmission.

[0085] Specifically, the calculating the hash value of the personal information based on a preset hash algorithm includes:

[0086] Determining whether the size of the personal information meets the preset filling requirements;

[0087] If the size of the personal information meets the filling requirement, then adding the value of the first digit at the end of the personal information to obtain first filling data;

[0088] If the size of the personal information does not meet the filling requirement, padding the personal information to obtain second filling data;

[0089] The first filling data or the second filling data is input into a preset hash function buffer for data processing to obtain a hash value corresponding to the personal information.

[0090] In detail, it is determined whether the size of the personal information meets the preset filling requirement, that is, it is determined whether the result of the size of the personal information modulo 512 is 448. If the size of the personal information meets the filling requirement, that is, the result of the size of the personal information modulo 512 is 448, then a 64-bit value is added to the end of the personal information, and the content of the value is the length of the personal information. If the size of the personal information does not meet the filling requirement, the personal information is padded, wherein the padded process refers to first filling a 1 bit into the concatenated string and then continuing to fill multiple 0 bits until the filling requirement is met.

[0091] Furthermore, the content field in the initial business card includes an info-hash field, an encrypt_key field and an info (ciphertext) field, the encryption key is written into the encrypt_key field, the hash value is written into the info-hash field, and the encrypted information is written into the info (ciphertext) field.

[0092] S5. Write the institution account in the institution information into the account field in the initial business card, encrypt the decryption key using the public key corresponding to the institution account, and write the encrypted first ciphertext into the ciphertext field corresponding to the account field.

[0093] In an embodiment of the present invention, the initial business card also includes a holder_list part, which includes multiple account fields and decrypt_key (ciphertext) fields corresponding to the account fields. Writing the institutional account in the institutional information into the account field in the initial business card means filling in the company account in the account field in the holder_list part, and encrypting the decryption private key using the public key corresponding to the company account, and writing the encrypted first ciphertext into the decrypt_key (ciphertext) field corresponding to the account field containing the company account.

[0094] S6. Encrypt the decryption key using the public key corresponding to the user account in the user basic information, write the encrypted second ciphertext and the user account into the field, and obtain a user business card.

[0095] In an embodiment of the present invention, writing the user account in the user basic information into the field in the initial business card means filling the employee account into the account field in the holder_list part, and encrypting the decryption private key using the public key corresponding to the employee account, and writing the encrypted second ciphertext into the decrypt_key (ciphertext) field corresponding to the account field containing the employee account to obtain the user business card.

[0096] Specifically, after obtaining the user's business card, the method further includes:

[0097] Obtaining an instruction for performing a business card operation on the user's business card, and parsing and processing the instruction;

[0098] When the parsed instruction is to share a business card, a business card sharing operation is performed on the user's business card according to the user's blockchain account; or

[0099] When the parsed instruction is to update the business card, use the organization blockchain account to perform a business card update operation on the user business card; or

[0100] When the parsed instruction is to destroy the business card, the status field in the user business card is set to destroyed using the organization blockchain account.

[0101] Further, performing a business card sharing operation on the user business card according to the user blockchain account includes:

[0102] Obtain the account of the sharing object, and query the public key corresponding to the account of the sharing object based on the activated account list on the blockchain;

[0103] Searching the encrypted ciphertext corresponding to the user blockchain account in the user business card, and decrypting the encrypted ciphertext using the private key of the user blockchain account to obtain a decrypted ciphertext;

[0104] The account number of the sharing object is written into the account number field of the user business card, and the decrypted ciphertext is encrypted using the public key corresponding to the account number of the sharing object, and the encrypted decrypted ciphertext is stored in the ciphertext field corresponding to the account number field to obtain a shared business card.

[0105] In detail, first obtain the account number of the sharing object and search for the account number of the sharing object in the activated account list, set it as pubkeyX, search the encrypted ciphertext corresponding to the user blockchain account number in the user business card, that is, read the corresponding encrypted ciphertext in the holder_list part of the user business card, and use the private key of the owner field storing the user blockchain account number to decrypt the encrypted ciphertext, set the decrypted result to decryptX, fill in the account number of the sharing object in the account field in the holder_list part, encrypt decryptX using pubkeyX, and fill the encrypted ciphertext in the decrypt_key field corresponding to the holder_list.

[0106] Specifically, the using the organization blockchain account to perform a business card update operation on the user business card includes:

[0107] Performing a hash operation on the pre-acquired information to be updated to obtain standard update information, and writing the standard update information into the hash value field of the user business card;

[0108] The encryption key in the user business card is read using the organization blockchain account, and the information to be updated is encrypted using the encryption key, and the encrypted information to be updated is written into the information field in the user business card to obtain an updated business card.

[0109] Among them, since the information on the user's business card may be outdated, such as mobile phone number, company and position, which may become outdated due to changes in real life, in order to ensure the accuracy of the business card, the user's business card needs to be updated. Usually, when an instruction to update the user's business card is received, the user's business card is updated.

[0110] In detail, only the institutional blockchain account, namely the issuer account, can update the business card content, that is, only the company can update the employee's business card content, and the employee cannot update his or her own business card. The Issuer account performs a hash operation on the information to be updated, and writes the result of the hash operation into the info_hash field of the content. The Issuer account reads the encrypt_key field of the content to encrypt the information to be updated, encrypts the information to be updated with the encrypt_key, and then writes the encrypted information to be updated into the info field.

[0111] Furthermore, when the parsed instruction is to destroy the business card, the status field in the user's business card is set to be destroyed using the organization's blockchain account. Among them, only the issuer account can destroy the business card, that is, only the company can destroy the employee's business card, and the employee cannot destroy his own business card.

[0112] The embodiment of the present invention generates an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, uses the encryption key to encrypt personal information in the user basic information to obtain encrypted information, uses the encryption key to encrypt personal information and saves the data on the chain to ensure the security of key data, encrypts the decryption key using the public key corresponding to the institutional account, writes the encrypted ciphertext into the ciphertext field corresponding to the account field, and ensures that only the holder corresponding to the institutional account can view the decryption key, so that the plaintext can be decrypted. The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain a user business card. Therefore, the blockchain-based smart contract business card method proposed in the present invention can solve the problem of insufficient security in business card generation.

[0113] The embodiment of the present invention generates an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, uses the encryption key to encrypt personal information in the user basic information to obtain encrypted information, uses the encryption key to encrypt personal information and saves the data on the chain to ensure the security of key data, encrypts the decryption key using the public key corresponding to the institutional account, writes the encrypted ciphertext into the ciphertext field corresponding to the account field, and ensures that only the holder corresponding to the institutional account can view the decryption key, so that the plaintext can be decrypted. The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain a user business card. Therefore, the blockchain-based smart contract business card method proposed in the present invention can solve the problem of insufficient security in business card generation.

[0114] like Figure 2 , which is a functional module diagram of a blockchain-based smart contract business card device provided by one embodiment of the present invention.

[0115] The blockchain-based smart contract business card device 100 of the present invention can be installed in an electronic device. According to the functions implemented, the blockchain-based smart contract business card device 100 can include an account activation module 101, a field filling module 102, a key generation module 103 and a business card creation module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0116] In this embodiment, the functions of each module / unit are as follows:

[0117] The account activation module 101 is used to obtain basic user information and the user's blockchain account, and activate the user's blockchain account;

[0118] The field filling module 102 is used to index the organization information of the organization to which the user blockchain account belongs after the user blockchain account is activated, and write the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information into multiple account fields of the pre-built initial business card respectively;

[0119] The key generation module 103 is used to generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information;

[0120] The business card creation module 104 is used to calculate the hash value of the personal information based on a preset hash algorithm, and write the hash value, the encryption key and the encrypted information into the content field of the initial business card, write the institution account in the institution information into the account field in the initial business card, and use the public key corresponding to the institution account to encrypt the decryption key, write the encrypted first ciphertext into the ciphertext field corresponding to the account field, encrypt the decryption key using the public key corresponding to the user account in the user basic information, write the encrypted second ciphertext and the user account into the field, and obtain the user business card.

[0121] In detail, the specific implementation of each module of the blockchain-based smart contract business card device 100 is as follows:

[0122] Step 1: Obtain user basic information and user blockchain account, and activate the user blockchain account.

[0123] In an embodiment of the present invention, the basic user information may be basic information of multiple employees in a company, such as employee name, position, email address, employee ID, and contact information, etc. The basic user information may be obtained from a third-party database, wherein the third-party database is a database that stores a large amount of user-related information to achieve centralized control and management of data.

[0124] Specifically, the activation process of the user blockchain account includes:

[0125] Query the corresponding user according to the user blockchain account, and obtain the public key corresponding to the user;

[0126] Write the public key and the user blockchain account into the activated account list on the preset blockchain.

[0127] In detail, the user needs to activate his own blockchain account. The activation process is to write the user's own blockchain account and the corresponding public key into the activation account list on the blockchain. The activation account list contains multiple accounts, public keys and status. Among them, the blockchain includes the first blockchain node, the second blockchain node, the third blockchain node, the N-1th blockchain node, and the Nth blockchain node, where N is a positive integer and the value of N can be preset. Each blockchain node is interconnected to form a cross-blockchain network. Information can be transmitted between each blockchain node and updated synchronously.

[0128] Step 2: After the user blockchain account has been activated, the organization information of the organization to which the user blockchain account belongs is indexed, and the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information are respectively written into multiple account fields of the pre-built initial business card.

[0129] In an embodiment of the present invention, after the user blockchain account is activated, the organization information of the organization to which the user blockchain account belongs is indexed, wherein the user blockchain account is the employee's blockchain account, and the organization information of the organization to which the user blockchain account belongs is the company information of the employee's company, and the company information includes but is not limited to the organization's blockchain account.

[0130] Specifically, the user blockchain account, the user identifier in the user basic information, and the institution blockchain account in the institution information are respectively written into multiple account fields of the pre-built initial business card, wherein the pre-built initial business card contains multiple pre-set account fields, for example, an id field, an issuer field, an owner field, a status field, and an info-hash field, an encrypt_key field, and an info (ciphertext) field in content.

[0131] For example, the user blockchain account is written into the owner field, the institution blockchain account is written into the issuer field, the user identifier in the user basic information, i.e., the employee ID, is written into the id field, and the status field is set to activated.

[0132] Step three: Generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information.

[0133] In an embodiment of the present invention, an encryption key and a decryption key corresponding to the encryption key are generated based on a preset encryption algorithm, and the encryption key is used to encrypt the personal information in the user basic information, so as to further ensure the security of the storage of the user basic information. The encryption algorithm can generally be divided into a symmetric encryption algorithm and an asymmetric encryption algorithm, wherein the symmetric encryption algorithm refers to the use of the same key for both encryption and decryption, such as a DES encryption algorithm or an AES encryption algorithm. The asymmetric encryption algorithm requires two keys, a public key and a private key. The public key and the private key are a pair. If the data is encrypted with the public key, it can only be decrypted with the corresponding private key. The asymmetric encryption algorithm includes but is not limited to the RSA algorithm, the DH algorithm, and the national secret SM2 algorithm.

[0134] In one embodiment of the present invention, the step of generating an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm includes:

[0135] Obtaining a preset generator, a cyclic group, and an order corresponding to the cyclic group;

[0136] Constructing a cyclic interval based on the cyclic group order, and arbitrarily selecting a random number in the cyclic interval;

[0137] Calculate the discrete number corresponding to the generator according to a preset discrete formula;

[0138] An encryption key is constructed according to the discrete number, the generator, the random number and the order, and the random number is used as the decryption key.

[0139] In detail, in the embodiment of the present invention, the encryption algorithm used is the ElGamal encryption algorithm, a preset generator g and a q-order cyclic group G are obtained, a cyclic interval {1, ..., q-1} is constructed based on the cyclic group order q, and a random number x is randomly selected from the cyclic interval as a random number, and the discrete formula h = g is used. xCalculate the discrete number corresponding to the generator, and construct the encryption key (h, g, x, q) using the discrete number h, the generator g, the random number x and the order q, and let the random number x be the decryption key.

[0140] In another embodiment of the present invention, the generating of an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm includes:

[0141] Randomly obtain two different prime numbers;

[0142] Asymmetric calculation processing is performed on the prime numbers respectively to obtain an encryption key and a decryption key.

[0143] Specifically, the asymmetric calculation processing is performed on the prime numbers respectively to obtain an encryption key and a decryption key, including:

[0144] For two different prime numbers p and q obtained randomly, calculate the product n = pq,

[0145] Choose one that satisfies An integer e is obtained, and the integer e is used as an encryption key;

[0146] Choose one that satisfies An integer d is obtained, and the integer d is used as a decryption key.

[0147] In detail, the encryption algorithm used in the embodiment of the present invention is the RSA algorithm.

[0148] The encrypted information can only be decrypted using the corresponding decryption key. The existence of the decryption key ensures that the data can be decrypted only when the decryption key is obtained, and the data cannot be viewed or decrypted without the decryption key.

[0149] Specifically, the encryption key is used to encrypt the personal information in the user basic information to obtain encrypted information. The personal information in the user basic information is the employee's name, position, and email address.

[0150] Step 4: Calculate the hash value of the personal information based on a preset hash algorithm, and write the hash value, the encryption key and the encryption information into the content field of the initial business card.

[0151] In the embodiment of the present invention, the hash algorithm can convert a data into a mark, and the mark has a very close relationship with each byte in the data before the conversion. The hash algorithm includes the MD4 (Message Digest, message digest algorithm 4) algorithm, the hash function (Message Digest, message digest algorithm 5) algorithm and the SHA-1 (Secure Hash Algorithm 1, secure hash algorithm 1) algorithm, wherein, in this solution, the hash function algorithm can be used to calculate the hash value of the personal information. The hash function algorithm, a widely used cryptographic hash function, can generate a 128-bit hash value to ensure the integrity and consistency of information transmission.

[0152] Specifically, the calculating the hash value of the personal information based on a preset hash algorithm includes:

[0153] Determining whether the size of the personal information meets the preset filling requirements;

[0154] If the size of the personal information meets the filling requirement, then adding the value of the first digit at the end of the personal information to obtain first filling data;

[0155] If the size of the personal information does not meet the filling requirement, padding the personal information to obtain second filling data;

[0156] The first filling data or the second filling data is input into a preset hash function buffer for data processing to obtain a hash value corresponding to the personal information.

[0157] In detail, it is determined whether the size of the personal information meets the preset filling requirement, that is, it is determined whether the result of the size of the personal information modulo 512 is 448. If the size of the personal information meets the filling requirement, that is, the result of the size of the personal information modulo 512 is 448, then a 64-bit value is added to the end of the personal information, and the content of the value is the length of the personal information. If the size of the personal information does not meet the filling requirement, the personal information is padded, wherein the padded process refers to first filling a 1 bit into the concatenated string and then continuing to fill multiple 0 bits until the filling requirement is met.

[0158] Furthermore, the content field in the initial business card includes an info-hash field, an encrypt_key field and an info (ciphertext) field, the encryption key is written into the encrypt_key field, the hash value is written into the info-hash field, and the encrypted information is written into the info (ciphertext) field.

[0159] Step 5: Write the institution account in the institution information into the account field in the initial business card, encrypt the decryption key using the public key corresponding to the institution account, and write the encrypted first ciphertext into the ciphertext field corresponding to the account field.

[0160] In an embodiment of the present invention, the initial business card also includes a holder_list part, which includes multiple account fields and decrypt_key (ciphertext) fields corresponding to the account fields. Writing the institutional account in the institutional information into the account field in the initial business card means filling in the company account in the account field in the holder_list part, and encrypting the decryption private key using the public key corresponding to the company account, and writing the encrypted first ciphertext into the decrypt_key (ciphertext) field corresponding to the account field containing the company account.

[0161] Step 6: Encrypt the decryption key using the public key corresponding to the user account in the user basic information, write the encrypted second ciphertext and the user account into the field, and obtain a user business card.

[0162] In an embodiment of the present invention, writing the user account in the user basic information into the field in the initial business card means filling the employee account into the account field in the holder_list part, and encrypting the decryption private key using the public key corresponding to the employee account, and writing the encrypted second ciphertext into the decrypt_key (ciphertext) field corresponding to the account field containing the employee account to obtain the user business card.

[0163] Specifically, after obtaining the user's business card, the method further includes:

[0164] Obtaining an instruction for performing a business card operation on the user's business card, and parsing and processing the instruction;

[0165] When the parsed instruction is to share a business card, a business card sharing operation is performed on the user's business card according to the user's blockchain account; or

[0166] When the parsed instruction is to update the business card, use the organization blockchain account to perform a business card update operation on the user business card; or

[0167] When the parsed instruction is to destroy the business card, the status field in the user business card is set to destroyed using the organization blockchain account.

[0168] Further, performing a business card sharing operation on the user business card according to the user blockchain account includes:

[0169] Obtain the account of the sharing object, and query the public key corresponding to the account of the sharing object based on the activated account list on the blockchain;

[0170] Searching the encrypted ciphertext corresponding to the user blockchain account in the user business card, and decrypting the encrypted ciphertext using the private key of the user blockchain account to obtain a decrypted ciphertext;

[0171] The account number of the sharing object is written into the account number field of the user business card, and the decrypted ciphertext is encrypted using the public key corresponding to the account number of the sharing object, and the encrypted decrypted ciphertext is stored in the ciphertext field corresponding to the account number field to obtain a shared business card.

[0172] In detail, first obtain the account number of the sharing object and search for the account number of the sharing object in the activated account list, set it as pubkeyX, search the encrypted ciphertext corresponding to the user blockchain account number in the user business card, that is, read the corresponding encrypted ciphertext in the holder_list part of the user business card, and use the private key of the owner field storing the user blockchain account number to decrypt the encrypted ciphertext, set the decrypted result to decryptX, fill in the account number of the sharing object in the account field in the holder_list part, encrypt decryptX using pubkeyX, and fill the encrypted ciphertext in the decrypt_key field corresponding to the holder_list.

[0173] Specifically, the using the organization blockchain account to perform a business card update operation on the user business card includes:

[0174] Performing a hash operation on the pre-acquired information to be updated to obtain standard update information, and writing the standard update information into the hash value field of the user business card;

[0175] The encryption key in the user business card is read using the organization blockchain account, and the information to be updated is encrypted using the encryption key, and the encrypted information to be updated is written into the information field in the user business card to obtain an updated business card.

[0176] Among them, since the information on the user's business card may be outdated, such as mobile phone number, company and position, which may become outdated due to changes in real life, in order to ensure the accuracy of the business card, the user's business card needs to be updated. Usually, when an instruction to update the user's business card is received, the user's business card is updated.

[0177] In detail, only the institutional blockchain account, namely the issuer account, can update the business card content, that is, only the company can update the employee's business card content, and the employee cannot update his or her own business card. The Issuer account performs a hash operation on the information to be updated, and writes the result of the hash operation into the info_hash field of the content. The Issuer account reads the encrypt_key field of the content to encrypt the information to be updated, encrypts the information to be updated with the encrypt_key, and then writes the encrypted information to be updated into the info field.

[0178] Furthermore, when the parsed instruction is to destroy the business card, the status field in the user's business card is set to be destroyed using the organization's blockchain account. Among them, only the issuer account can destroy the business card, that is, only the company can destroy the employee's business card, and the employee cannot destroy his own business card.

[0179] The embodiment of the present invention generates an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, uses the encryption key to encrypt personal information in the user basic information to obtain encrypted information, uses the encryption key to encrypt personal information and saves the data on the chain to ensure the security of key data, encrypts the decryption key using the public key corresponding to the institutional account, writes the encrypted ciphertext into the ciphertext field corresponding to the account field, and ensures that only the holder corresponding to the institutional account can view the decryption key, so that the plaintext can be decrypted. The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain the user business card. Therefore, the blockchain-based smart contract business card device proposed by the present invention can solve the problem of insufficient security in business card generation.

[0180] like Figure 3 , is a schematic diagram of the structure of an electronic device for implementing a blockchain-based smart contract business card method provided by one embodiment of the present invention.

[0181] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a blockchain-based smart contract business card program.

[0182] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a smart contract business card program based on blockchain, etc.), and calls the data stored in the memory 11 to execute various functions of the electronic device and process data.

[0183] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the smart contract business card program based on the blockchain, but also can be used to temporarily store data that has been output or is to be output.

[0184] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0185] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0186] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0187] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0188] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0189] The blockchain-based smart contract business card program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0190] Obtaining basic user information and user blockchain account, and activating the user blockchain account;

[0191] After the user blockchain account is activated, the organization information of the organization to which the user blockchain account belongs is indexed, and the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information are respectively written into multiple account fields of the pre-built initial business card;

[0192] Generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information;

[0193] Calculating a hash value of the personal information based on a preset hash algorithm, and writing the hash value, the encryption key and the encryption information into a content field in the initial business card;

[0194] Writing the institution account number in the institution information into the account number field in the initial business card, encrypting the decryption key using the public key corresponding to the institution account number, and writing the encrypted first ciphertext into the ciphertext field corresponding to the account number field;

[0195] The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain a user business card.

[0196] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0197] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0198] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0199] Obtaining basic user information and user blockchain account, and activating the user blockchain account;

[0200] After the user blockchain account is activated, the organization information of the organization to which the user blockchain account belongs is indexed, and the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information are respectively written into multiple account fields of the pre-built initial business card;

[0201] Generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information;

[0202] Calculating a hash value of the personal information based on a preset hash algorithm, and writing the hash value, the encryption key and the encryption information into a content field in the initial business card;

[0203] Writing the institution account number in the institution information into the account number field in the initial business card, encrypting the decryption key using the public key corresponding to the institution account number, and writing the encrypted first ciphertext into the ciphertext field corresponding to the account number field;

[0204] The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain a user business card.

[0205] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0206] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0207] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0208] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0209] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0210] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0211] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0212] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A smart contract business card method based on blockchain, characterized in that: The method comprises: Obtaining basic user information and user blockchain account, and activating the user blockchain account; After the user blockchain account is activated, the organization information of the organization to which the user blockchain account belongs is indexed, and the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information are respectively written into multiple account fields of the pre-built initial business card; Generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information; Calculating a hash value of the personal information based on a preset hash algorithm, and writing the hash value, the encryption key and the encryption information into a content field in the initial business card; Writing the institution account number in the institution information into the account number field in the initial business card, encrypting the decryption key using the public key corresponding to the institution account number, and writing the encrypted first ciphertext into the ciphertext field corresponding to the account number field; The decryption key is encrypted using the public key corresponding to the user account in the user basic information, and the encrypted second ciphertext and the user account are written into the field to obtain a user business card.

2. The blockchain-based smart contract business card method according to claim 1, characterized in that: The activation process of the user blockchain account includes: Query the corresponding user according to the user blockchain account, and obtain the public key corresponding to the user; Write the public key and the user blockchain account into the activated account list on the preset blockchain.

3. The blockchain-based smart contract business card method according to claim 1, characterized in that: The calculating the hash value of the personal information based on a preset hash algorithm includes: Determining whether the size of the personal information meets the preset filling requirements; If the size of the personal information meets the filling requirement, then adding the value of the first digit at the end of the personal information to obtain first filling data; If the size of the personal information does not meet the filling requirement, padding the personal information to obtain second filling data; The first filling data or the second filling data is input into a preset hash function buffer for data processing to obtain a hash value corresponding to the personal information.

4. The blockchain-based smart contract business card method according to claim 1, characterized in that: After obtaining the user's business card, the method further includes: Obtaining an instruction for performing a business card operation on the user's business card, and parsing and processing the instruction; When the parsed instruction is to share a business card, a business card sharing operation is performed on the user's business card according to the user's blockchain account; or When the parsed instruction is to update the business card, use the organization blockchain account to perform a business card update operation on the user business card; or When the parsed instruction is to destroy the business card, the status field in the user business card is set to destroyed using the organization blockchain account.

5. The blockchain-based smart contract business card method according to claim 4, characterized in that: The performing a business card sharing operation on the user business card according to the user blockchain account includes: Obtain the account of the sharing object, and query the public key corresponding to the account of the sharing object based on the activated account list on the blockchain; Searching the encrypted ciphertext corresponding to the user blockchain account in the user business card, and decrypting the encrypted ciphertext using the private key of the user blockchain account to obtain a decrypted ciphertext; The account number of the sharing object is written into the account number field of the user business card, and the decrypted ciphertext is encrypted using the public key corresponding to the account number of the sharing object, and the encrypted decrypted ciphertext is stored in the ciphertext field corresponding to the account number field to obtain a shared business card.

6. The blockchain-based smart contract business card method according to claim 4, characterized in that: The using the organization blockchain account to perform a business card update operation on the user business card includes: Performing a hash operation on the pre-acquired information to be updated to obtain standard update information, and writing the standard update information into the hash value field of the user business card; The encryption key in the user business card is read using the organization blockchain account, and the information to be updated is encrypted using the encryption key, and the encrypted information to be updated is written into the information field in the user business card to obtain an updated business card.

7. The blockchain-based smart contract business card method according to claim 1, characterized in that: The generating of an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm includes: Obtaining a preset generator, a cyclic group, and an order corresponding to the cyclic group; Constructing a cyclic interval based on the cyclic group order, and arbitrarily selecting a random number in the cyclic interval; Calculate the discrete number corresponding to the generator according to a preset discrete formula; An encryption key is constructed according to the discrete number, the generator, the random number and the order, and the random number is used as the decryption key.

8. A smart contract business card device based on blockchain, characterized in that: The device comprises: An account activation module is used to obtain basic user information and user blockchain account, and activate the user blockchain account; A field filling module is used to index the organization information of the organization to which the user blockchain account belongs after the user blockchain account is activated, and write the user blockchain account, the user identifier in the user basic information, and the organization blockchain account in the organization information into multiple account fields of the pre-built initial business card respectively; A key generation module, used to generate an encryption key and a decryption key corresponding to the encryption key based on a preset encryption algorithm, and use the encryption key to encrypt the personal information in the user basic information to obtain encrypted information; A business card creation module is used to calculate the hash value of the personal information based on a preset hash algorithm, and write the hash value, the encryption key and the encrypted information into the content field of the initial business card, write the institution account in the institution information into the account field in the initial business card, and use the public key corresponding to the institution account to encrypt the decryption key, write the encrypted first ciphertext into the ciphertext field corresponding to the account field, encrypt the decryption key using the public key corresponding to the user account in the user basic information, write the encrypted second ciphertext and the user account into the field, and obtain a user business card.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the blockchain-based smart contract business card method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the blockchain-based smart contract business card method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Network server, information storage method, information exchange method, and block chain system

    CN109472161A

  • Portrait business card generation method and device, electronic equipment and storable medium

    CN113793406A