Data processing method and device based on block chain, electronic equipment and storage medium

By generating and storing blockchain accounts and public keys in blockchain smart contracts and supporting public key updates, the account loss problem caused by private key loss is solved, and the security of blockchain accounts and assets is achieved.

CN120567404APending Publication Date: 2025-08-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410218588.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

During the process of creating a blockchain account, the loss of private keys leads to the loss of blockchain accounts, reducing the security of accounts and assets. It is difficult for the existing technology to effectively solve the problem of private key loss.

Method used

The blockchain account is generated through a blockchain smart contract, and the account is associated with the public key to store it, supporting the update of the public key, and the change of the public key is realized. Users can retrieve the private key by modifying the public key after the private key is lost to ensure the security of the account.

Benefits of technology

Even if the private key is lost, the control of the blockchain account can be retrieved by modifying the public key, improving the security of the blockchain account and assets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120567404A_ABST
    Figure CN120567404A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device based on a block chain, electronic equipment and a storage medium, and the method comprises the steps: calling a block chain smart contract to generate a block chain account according to an account creation request, obtaining a public key of the block chain account according to the account creation request, and storing the public key of the block chain account in the block chain smart contract; the block chain account and the public key of the block chain account are stored in the block chain smart contract in an associated manner; and then, a public key updating request initiated for the block chain account is acquired, and a target public key of the block chain account is acquired according to the public key updating request, so that a public key associated with the block chain account in the block chain smart contract is updated to the target public key. According to the technical scheme provided by the embodiment of the invention, the security of a block chain account and assets in the account can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and specifically to a blockchain-based data processing method and device, electronic device, storage medium, and program product. Background Art

[0002] Blockchain technology is a decentralized distributed database technology with many characteristics such as decentralization, openness, transparency, immutability, and trustworthiness. It is suitable for various application scenarios with high demands on data reliability.

[0003] In related technologies, during the process of creating a blockchain account, a key pair corresponding to the blockchain account will be generated to ensure the security of transactions. The private key is the only credential for blockchain account operations and is kept by the user, while the public key is stored by the blockchain system. Once the private key is lost, the blockchain account will be lost, causing the user to lose control of the blockchain account, thereby reducing the security of the blockchain account and the assets in the account. Summary of the Invention

[0004] The embodiments of the present application provide a blockchain-based data processing method and device, electronic device, storage medium, and program product, which can improve the security of blockchain accounts and assets in the accounts.

[0005] According to one aspect of an embodiment of the present application, a blockchain-based data processing method is provided, the method comprising:

[0006] Based on the account creation request, the blockchain smart contract is called to generate a blockchain account;

[0007] Obtaining the public key of the blockchain account according to the account creation request, and associating the blockchain account and the public key of the blockchain account and storing them in the blockchain smart contract;

[0008] Obtaining a public key update request initiated for the blockchain account, and obtaining a target public key of the blockchain account according to the public key update request;

[0009] Updating the public key associated with the blockchain account in the blockchain smart contract to the target public key According to one aspect of an embodiment of the present application, a blockchain-based data processing method is provided, which receives an account creation request and sends the account creation request to a blockchain node, so that the blockchain node calls the blockchain smart contract to generate a blockchain account according to the account creation request, obtains the public key of the blockchain account according to the account creation request, and associates the blockchain account and the public key of the blockchain account with each other and stores them in the blockchain smart contract;

[0010] Receive a public key update request initiated for the blockchain account, and send the public key update request to the blockchain node, so that the blockchain node obtains the target public key of the blockchain account according to the public key update request, and updates the public key associated with the blockchain account in the blockchain smart contract to the target public key.

[0011] According to one aspect of an embodiment of the present application, a blockchain-based data processing device is provided, the device comprising:

[0012] A calling module is configured to call a blockchain smart contract to generate a blockchain account according to an account creation request;

[0013] a storage module configured to obtain the public key of the blockchain account according to the account creation request, and store the blockchain account and the public key of the blockchain account in association with the blockchain smart contract;

[0014] an acquisition module configured to acquire a public key update request initiated for the blockchain account, and acquire a target public key of the blockchain account according to the public key update request;

[0015] An update module is configured to update the public key associated with the blockchain account in the blockchain smart contract to the target public key.

[0016] In an exemplary embodiment, based on the aforementioned scheme, the update module is specifically configured to: obtain the target identity authentication method corresponding to the blockchain account from the blockchain smart contract, and verify whether the update requester of the public key update request matches the owner of the blockchain account according to the target identity authentication method, and obtain an identity authentication result; if the identity authentication result indicates that the update requester matches the owner of the blockchain account, then update the public key associated with the blockchain account in the blockchain smart contract according to the target public key.

[0017] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the blockchain smart contract contains ciphertext data obtained by encrypting the target identity authentication method based on an encryption key, the update module is specifically configured to: obtain the ciphertext data from the blockchain smart contract, and decrypt the ciphertext data according to the decryption key corresponding to the encryption key to obtain the plaintext data of the target identity authentication method; based on the plaintext data of the target identity authentication method, verify whether the update requester matches the owner of the blockchain account to obtain the identity authentication result.

[0018] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the encryption key is generated according to the node certificate of the blockchain node, the update module is specifically configured to: obtain the node certificate of the blockchain node, and generate the decryption key according to the node certificate; decrypt the ciphertext data according to the decryption key to obtain the plaintext data of the target identity authentication method.

[0019] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the target identity authentication method includes the security algorithm information corresponding to the belonging party, the update module is specifically configured to: obtain algorithm input data and first algorithm output data from the update requester; wherein, the first algorithm output data is the algorithm output data corresponding to the algorithm input data calculated by the update requester calling the security algorithm; call the algorithm matching the security algorithm information, calculate the algorithm output data corresponding to the algorithm input data, and obtain the second algorithm output data; compare the first algorithm output data with the second algorithm output data, and determine the identity authentication result based on the comparison result.

[0020] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the algorithm input data includes the generation time of the public key update request, the update module is specifically configured to: calculate the time difference between the generation time of the public key update request and the current time; if the comparison result indicates that the first algorithm output data matches the second algorithm output data, and the time difference is less than or equal to the set time difference threshold, then determine that the identity authentication result is that the update requester matches the owner of the blockchain account.

[0021] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the communication address of the belonging party is included in the target identity authentication method, the update module is specifically configured to: generate verification information, and send the verification information to the belonging party according to the communication address of the belonging party; obtain feedback information from the update requester regarding the verification information; if the verification information matches the feedback information, it is determined that the identity authentication result is that the update requester matches the belonging party of the blockchain account.

[0022] In an exemplary embodiment, based on the aforementioned scheme, the storage module is specifically configured to: search for the target identity authentication method selected by the owner of the blockchain account from multiple identity authentication methods according to the account creation request; and associate and store the blockchain account, the public key of the blockchain account, and the target identity authentication method in the blockchain smart contract.

[0023] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the blockchain smart contract contains the set public key of the verifier, the update module is specifically configured to: search for the public key of the verifier from the blockchain smart contract, and obtain the signature data generated according to the private key of the verifier from the public key update request; verify the signature data according to the found public key of the verifier; if the verification is successful, update the public key associated with the blockchain account in the blockchain smart contract according to the target public key.

[0024] In an exemplary embodiment, based on the aforementioned scheme, the device also includes a transaction module configured to: receive a transaction request for the blockchain account; wherein the transaction request includes signature data generated based on the private key of the blockchain account; search for the public key associated with the blockchain account from the blockchain smart contract, and verify the signature data included in the transaction request based on the found public key; if the signature data included in the transaction request is successfully verified, execute the transaction request.

[0025] According to one aspect of an embodiment of the present application, a blockchain-based data processing device is provided, the device comprising:

[0026] a first transceiver module configured to receive an account creation request and send the account creation request to a blockchain node, so that the blockchain node calls a blockchain smart contract to generate a blockchain account according to the account creation request, obtains a public key of the blockchain account according to the account creation request, and associates and stores the blockchain account and the public key of the blockchain account in the blockchain smart contract;

[0027] The second transceiver module is configured to receive a public key update request initiated for the blockchain account and send the public key update request to the blockchain node, so that the blockchain node obtains the target public key of the blockchain account according to the public key update request and updates the public key associated with the blockchain account in the blockchain smart contract to the target public key.

[0028] In an exemplary embodiment, based on the aforementioned scheme, the second transceiver module is specifically configured to: search for the target blockchain interface corresponding to the blockchain system to which the blockchain account belongs from the blockchain interfaces corresponding to multiple blockchain systems, and obtain the target identity authentication method corresponding to the blockchain account from the blockchain smart contract through the target blockchain interface; according to the target identity authentication method, verify whether the update requester of the public key update request matches the owner of the blockchain account to obtain an identity authentication result; if the identity authentication result indicates that the update requester matches the owner of the blockchain account, the public key update request is sent to the blockchain node.

[0029] According to one aspect of an embodiment of the present application, an electronic device is provided, including:

[0030] one or more processors;

[0031] The storage device is used to store one or more computer programs, and when the one or more computer programs are executed by the one or more processors, the electronic device implements the method as described above.

[0032] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor of an electronic device, the electronic device implements the method as described above.

[0033] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method as described above is implemented.

[0034] In the technical solution provided in the embodiments of the present application, a blockchain account can be generated by calling a blockchain smart contract according to an account creation request, the public key of the blockchain account can be obtained according to the account creation request, and the blockchain account and the public key of the blockchain account can be associated and stored in the blockchain smart contract; then, a public key update request initiated for the blockchain account is obtained, and the target public key of the blockchain account is obtained according to the public key update request, so as to update the public key associated with the blockchain account in the blockchain smart contract to the target public key. Compared with the related technology, a blockchain account is generated by a blockchain smart contract, and the blockchain account and the public key of the blockchain account are stored in the blockchain smart contract, so that the public key of the blockchain account can be changed. The public key of the blockchain account can be updated subsequently according to the public key update request. In this way, even if the user loses the private key of the blockchain account, the private key of the blockchain account can be modified by modifying the public key of the blockchain account. Therefore, in the case of loss of the private key, the blockchain account can be retrieved by modifying the private key, thereby ensuring the security of the blockchain account and the assets in the account.

[0035] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a schematic diagram of an implementation environment shown in an exemplary embodiment of the present application;

[0037] Figure 2 This is a flowchart of a data processing method based on blockchain, shown in an exemplary embodiment of the present application;

[0038] Figure 3is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0039] Figure 4 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0040] Figure 5 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0041] Figure 6 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0042] Figure 7 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0043] Figure 8 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0044] Figure 9 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0045] Figure 10 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0046] Figure 11 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0047] Figure 12 is a block diagram illustrating a transaction request initiation according to another exemplary embodiment of the present application;

[0048] Figure 13 This is a flowchart of a data processing method based on blockchain, shown in an exemplary embodiment of the present application;

[0049] Figure 14 is a flowchart of a data processing method based on blockchain shown in another exemplary embodiment of the present application;

[0050] Figure 15 is a schematic diagram of an implementation environment shown in an exemplary embodiment of the present application;

[0051] Figure 16 is a schematic diagram of an account creation process shown in an exemplary embodiment of the present application;

[0052] Figure 17is a schematic diagram of a public key update process shown in an exemplary embodiment of the present application;

[0053] Figure 18 is a schematic diagram of an account creation process shown in another exemplary embodiment of the present application;

[0054] Figure 19 is a schematic diagram of a public key update process shown in another exemplary embodiment of the present application;

[0055] Figure 20 This is a schematic diagram of the structure of a blockchain-based data processing device shown in an exemplary embodiment of the present application;

[0056] Figure 21 is a structural diagram of a blockchain-based data processing device shown in another exemplary embodiment of the present application;

[0057] Figure 22 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0058] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0059] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0060] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0061] It should also be noted that the term "plurality" used in this application refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0062] The technical solutions of the embodiments of this application relate to the field of blockchain technology. Before introducing the technical solutions of the embodiments of this application, a brief introduction to blockchain technology is given.

[0063] Blockchain technology is a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a series of data blocks linked using cryptographic methods. Each block contains information about a batch of online transactions, used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product and service layer, and the application service layer.

[0064] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operational testing. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the corresponding relationship between the user's real identity and the blockchain address (authority management), etc., and under authorization, it supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration, issuance, triggering and execution of contracts. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the contract logic is triggered by calling keys or other events to trigger execution. The contract logic is completed, and the contract upgrade and cancellation functions are also provided. The operation detection module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarms, network status detection, node device health status detection, etc.

[0065] The platform's product service layer provides the basic capabilities and implementation framework for typical applications. Developers can build on these basic capabilities, overlay business features, and complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.

[0066] The technical solutions of the embodiments of this application specifically involve blockchain technology. The technical solutions of the embodiments of this application are described in detail below:

[0067] In the related art, during the process of creating a blockchain account, a key pair corresponding to the blockchain account is generated to ensure the security of the transaction. Among them, the private key is the only credential for blockchain account operations and is saved by the user. The public key is stored by the blockchain system and is used to authenticate the operations initiated on the blockchain account based on the private key. Only after the verification is passed can the corresponding operation be performed. Once the private key is lost, the operations initiated on the blockchain account cannot pass the public key verification, making the public key invalid and the blockchain account lost. The user loses control of the blockchain account, reducing the security of the blockchain account and the assets in the account. Although in the related art, the probability of private key loss can be reduced by manually backing up the private key, or by setting a mnemonic phrase to retrieve the private key, the probability of private key loss is still very high, which makes the probability of public key invalid higher. Based on this, the embodiments of the present application provide a data processing method and device based on blockchain, an electronic device, a storage medium, and a program product that can improve the security of blockchain accounts and assets in the account.

[0068] See also Figure 1 , Figure 1 This is a schematic diagram of an implementation environment involved in the present application, which includes a client 110 and a blockchain system 120. The blockchain system 120 includes multiple blockchain nodes 121. Multiple blockchain nodes 121 can transmit data based on a point-to-point protocol (or other communication protocols). The blockchain nodes 121 can be deployed in terminal devices or servers. Terminal devices may include but are not limited to smartphones, tablets, laptops, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, remote driving terminals, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. This does not limit the specific forms of terminal devices and servers. The client 110 can be deployed on a terminal device or server. It provides an interactive channel between users (account requesters, update requesters, etc.) and the blockchain system. It can include the blockchain system's Software Development Kit (SDK), thereby enabling communication with the blockchain system through the SDK. To enable users to interact with multiple blockchain systems through the client, the client can deploy SDKs corresponding to multiple blockchain systems.

[0069] Exemplarily, the account requester may initiate an account creation request in the client 110, and the client 110 may send the account creation request to any blockchain node 121. After the blockchain node 121 receives the account creation request, it may call the blockchain smart contract to generate a blockchain account, and obtain the public key of the blockchain account according to the account creation request, so as to associate the blockchain account and the public key of the blockchain account and store them in the blockchain smart contract; then, the update requester may initiate a public key update request for the blockchain account in the client 110, and the client 110 may send the public key update request to any blockchain node 121. After the blockchain node 121 receives the public key update request, it may obtain the target public key of the blockchain account according to the public key update request, thereby updating the public key associated with the blockchain account in the blockchain smart contract to the target public key, thereby updating the public key of the blockchain account, and thus updating the private key of the blockchain account. In the event that the private key is lost, the blockchain account can be retrieved by modifying the private key, thereby ensuring the security of the blockchain account and the assets in the account.

[0070] It should be noted that this application involves blockchain accounts, public keys and other user-related data. When the method of this application is applied to specific products or technologies, the user's permission or consent must be obtained, and the extraction, use and processing of relevant data must comply with local security standards and local laws and regulations.

[0071] See also Figure 2 , Figure 2 This is a flowchart of a data processing method based on blockchain, which is shown in an exemplary embodiment of the present application. Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0072] like Figure 2 As shown, in an exemplary embodiment, the blockchain-based data processing method may include steps S210-S240, which are described in detail as follows:

[0073] Step S210: Based on the account creation request, call the blockchain smart contract to generate a blockchain account.

[0074] It should be noted that an account requester can initiate an account creation request, where an account creation request is used to request the creation of a blockchain account. The account requester refers to the party that needs to create a blockchain account, which can be a blockchain user. The account requester can initiate the account creation request in a client, which can then send the account creation request to the blockchain node. The client can be a mini-program, a native application, or a non-native application, such as a blockchain wallet application. In another optional example, a randomly generated number can be used as the blockchain account.

[0075] A blockchain smart contract is a computer protocol designed to disseminate, verify or execute contracts in an information-based manner. The blockchain smart contract contains an account generation method, and a blockchain account can be generated according to the account generation method.

[0076] A blockchain account is a user's address in a blockchain system, used to store and trade resources (e.g., tokens) used by the user in the blockchain system. Different blockchain systems issue different tokens.

[0077] After receiving the account creation request, the blockchain smart contract can be called to generate a blockchain account.

[0078] Among them, the specific method of generating a blockchain account can be flexibly set according to actual needs. In an optional example, the public key of the blockchain account can be obtained first, and the blockchain account can be generated based on the public key of the blockchain account, wherein the public key of the blockchain account is used to verify the signature data generated based on the private key of the blockchain account. The private key of the blockchain account is the user's identity identification credential in the blockchain system. Based on the private key, the blockchain account can be used to perform resource transactions, balance inquiries and other operations. The private key of the blockchain account can be managed and stored by the owner of the blockchain account or the custodian of the owner. The key pair corresponding to the public key and private key of the blockchain account can be generated by the blockchain node according to the account creation request after receiving the account creation request, wherein the owner of the blockchain account is the owner of the blockchain account; or, the key pair can also be generated by the client according to the account creation request after obtaining the account creation request. Under this condition, the client can add the public key of the blockchain to the account creation request so that the blockchain node obtains the public key of the blockchain from the account creation request.

[0079] In another optional example, a number may be randomly generated as a blockchain account.

[0080] Step S220: Obtain the public key of the blockchain account according to the account creation request, and associate the blockchain account and the public key of the blockchain account with each other and store them in the blockchain smart contract.

[0081] After a blockchain account is created, the public key of the blockchain account can be obtained according to the account creation request, the blockchain account and the public key of the blockchain account can be associated, and the association relationship can be stored in the blockchain smart contract. In other words, the blockchain smart contract contains the association relationship between the blockchain account and the public key of the blockchain account.

[0082] Among them, the specific method of obtaining the public key of the blockchain account according to the account creation request can be flexibly set according to actual needs. In an optional example, if the key pair of the blockchain account is generated by the client, the account creation request includes the public key of the blockchain account, and the public key of the blockchain account can be obtained from the account creation request; in another optional example, if the key pair of the blockchain account is generated by the blockchain node, the blockchain account can generate the key pair of the blockchain account after receiving the account creation request, and obtain the public key of the blockchain account from it.

[0083] Step S230: Obtain a public key update request initiated for the blockchain account, and obtain the target public key of the blockchain account according to the public key update request.

[0084] A public key update request is used to update the public key of a blockchain account. The target public key refers to the updated public key, and the public key update request contains the blockchain account whose public key needs to be updated.

[0085] In situations such as when a blockchain account's private key is lost, the public key associated with the blockchain account can be updated, thereby changing the blockchain account's private key. The update requester can initiate a public key update request for the blockchain account. After receiving the public key update request, the blockchain node can obtain the target public key of the blockchain account based on the public key update request. The update requester is the party that wishes to update the public key of the blockchain account, for example, the blockchain account. The update requester can initiate the public key update request in the client, which then sends the public key update request to the blockchain node.

[0086] The specific method for obtaining the target public key of a blockchain account based on a public key update request can be flexibly set according to actual needs. In one optional example, after receiving the public key update request, the client can generate a new key pair for the blockchain account and add the public key in the new key pair as the target public key to the public key update request, so that the blockchain node obtains the target public key from the public key update request. In another optional example, after receiving the public key update request, the blockchain node can generate a new key pair for the blockchain account and use the public key therein as the target public key. It should be noted that after generating the new key pair for the blockchain account, the private key in the new key pair needs to be provided to the owner of the blockchain account so that the owner of the blockchain account can obtain the new private key of the blockchain account.

[0087] Step S240: Update the public key associated with the blockchain account in the blockchain smart contract to the target public key.

[0088] The blockchain smart contract stores the association between blockchain accounts and public keys. Therefore, after obtaining the target key, the corresponding association can be found from the blockchain smart contract based on the blockchain account, and the public key in the association can be updated to the target public key.

[0089] exist Figure 2 In the illustrated embodiment, a blockchain account is generated through a blockchain smart contract, and the blockchain account and the public key of the blockchain account are stored in the blockchain smart contract, thereby realizing the modifiability of the public key of the blockchain account. The public key of the blockchain account can be subsequently updated according to a public key update request. Since the public key and the private key correspond to each other, when the public key of the blockchain account is updated, the private key of the blockchain account is also updated. In this way, even if the user loses the private key of the blockchain account, the private key of the blockchain account can be modified by modifying the public key of the blockchain account, so that the user can obtain the new private key of the blockchain account and regain control of the blockchain account, thereby avoiding the invalidation of the public key of the blockchain account and ensuring the security of the blockchain account and the assets in the account.

[0090] In an exemplary embodiment, see Figure 3 , Figure 3 is Figure 2 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0091] like Figure 3 As shown, step S240 may include steps S310 to S320, which are described in detail as follows:

[0092] Step S310: Obtain the target identity authentication method corresponding to the blockchain account from the blockchain smart contract, and verify whether the update requester of the public key update request matches the owner of the blockchain account based on the target identity authentication method to obtain the identity authentication result.

[0093] In order to improve the security of blockchain accounts, the blockchain smart contract can include the authentication method corresponding to the blockchain account, that is, the target authentication method, which is used to verify whether the update requester is the owner of the blockchain account during the process of updating the public key of the blockchain account, and thus determine whether to update the public key of the blockchain account based on the verification result.

[0094] Specifically, the target authentication method for different blockchain accounts can be the same. Alternatively, to enhance security, the target authentication method for different blockchain accounts can be different. In this case, the blockchain account, the public key of the blockchain account, and the target authentication method for the blockchain account can be associated and stored in the blockchain smart contract. The specific content of the target authentication method can be flexibly set according to actual needs. In an optional example, the private key of the blockchain account can indicate the user's identity. Therefore, the target authentication method can include verification using the public key associated with the blockchain account in the blockchain smart contract. Correspondingly, the account update request can include signature data generated based on the private key of the blockchain account. The signature data is verified based on the public key associated with the blockchain account. If the verification is successful, it indicates that the update requester is the owner of the blockchain account. If the verification fails, it indicates that the update requester is not the owner of the blockchain account.

[0095] According to the target authentication method obtained from the blockchain smart contract, verify whether the update requester of the public key update request matches the owner of the blockchain account, that is, verify whether the update requester is the owner of the blockchain account, thereby obtaining the authentication result.

[0096] It should be noted that, in this embodiment, the target identity authentication method is stored in the blockchain smart contract. In other embodiments, the target identity authentication method may also be stored in other blockchain smart contracts, or in other areas.

[0097] In step S320, if the identity authentication result indicates that the update requester matches the owner of the blockchain account, the public key associated with the blockchain account in the blockchain smart contract is updated according to the target public key.

[0098] If the update requester matches the owner of the blockchain account, that is, the update requester is the owner of the blockchain account, the public key associated with the blockchain account can be updated based on the target public key. In other words, only the owner of the blockchain account can request to update the public key of the blockchain account.

[0099] Optionally, if the identity authentication result indicates that the update requester does not match the owner of the blockchain account, that is, the update requester is not the owner of the blockchain account, the public key update request is rejected and the public key update fails.

[0100] It should be noted that Figure 3 The specific implementation details of steps S210 to S230 shown in FIG. Figure 2 Steps S210 to S230 are shown and will not be described again here.

[0101] exist Figure 3In the embodiment shown, the public key is updated only when the update requester is verified as the owner of the blockchain account according to the target identity authentication method. In other words, only the owner of the blockchain account can change the public key of the blockchain, thereby ensuring the security of the public key; and the target identity authentication method is deployed in the blockchain smart contract, which can ensure that the identity authentication can be executed, thereby improving the security of the public key.

[0102] In an exemplary embodiment, Figure 4 is Figure 3 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0103] like Figure 4 As shown, under the condition that the blockchain smart contract includes ciphertext data obtained by encrypting the target identity authentication method based on the encryption key, step S310 includes steps S410 to S420, which are detailed as follows:

[0104] Step S410: Obtain ciphertext data from the blockchain smart contract, and decrypt the ciphertext data according to the decryption key corresponding to the encryption key to obtain the plaintext data of the target identity authentication method.

[0105] To prevent the target authentication method from being leaked and potentially tampered with, the blockchain account's public key can be encrypted and stored in a blockchain smart contract. Specifically, the blockchain smart contract contains the encrypted data obtained by encrypting the target authentication method using an encryption key. The specific encryption method can be flexibly set based on actual needs. For example, a symmetric encryption algorithm can be used, where the encryption key and decryption key are the same, or an asymmetric encryption algorithm can be used.

[0106] During the identity verification process, the blockchain node can obtain the ciphertext data of the target identity verification method from the blockchain smart contract and decrypt the ciphertext data using the decryption key corresponding to the encryption key, thereby obtaining the plaintext data of the target identity verification method. The decryption key can be pre-stored in a storage area other than the blockchain smart contract, thereby storing the ciphertext data of the target identity verification method separately from the decryption key. Alternatively, the decryption key can be generated according to a set key generation algorithm after receiving a public key update request. The specific method for generating the decryption key can be flexibly set according to actual needs.

[0107] Step S420: Verify whether the update requester matches the owner of the blockchain account based on the plaintext data of the target identity authentication method to obtain an identity authentication result.

[0108] After obtaining the plaintext data of the target authentication method, it is possible to verify whether the update requester matches the owner of the blockchain account based on the target authentication method.

[0109] It should be noted that Figure 4 The specific implementation details of steps S210 to S230 shown in FIG. Figure 2 Steps S210 to S230 are shown. Figure 4 The specific implementation details of step S320 can be referred to Figure 3 Step S320 shown is not repeated here.

[0110] exist Figure 4 In the embodiment shown, the target identity authentication method is encrypted and stored in the blockchain smart contract, which can prevent the target identity authentication method from being leaked, resulting in the public key of the blockchain account being tampered with and the blockchain account being lost, thereby ensuring the security of the blockchain account and public key.

[0111] In an exemplary embodiment, Figure 5 is Figure 4 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0112] like Figure 5 As shown, under the condition that the encryption key is generated according to the node certificate of the blockchain node, step S410 includes steps S510 to S530, which are described in detail as follows:

[0113] Step S510: Obtain ciphertext data from the blockchain smart contract.

[0114] Among them, according to the blockchain account corresponding to the public key update request, the ciphertext data of the target identity authentication method corresponding to the account can be found from the blockchain smart contract.

[0115] Step S520: Obtain the node certificate of the blockchain node and generate a decryption key based on the node certificate.

[0116] The encryption key is generated based on the node certificate of the blockchain node, so the decryption key can be generated based on the node certificate of the blockchain node.

[0117] Step S530: decrypt the ciphertext data according to the decryption key to obtain the plaintext data of the target identity authentication method.

[0118] The ciphertext data of the target identity authentication method is decrypted according to the decrypted ciphertext, thereby obtaining the plaintext data of the target identity authentication method.

[0119] It should be noted that Figure 5 The specific implementation details of steps S210 to S230 shown in FIG. Figure 2 Steps S210 to S230 are shown, Figure 5 The specific implementation details of step S320 can be referred to Figure 3 As shown in step S320, Figure 5 The specific implementation details of step S420 can be referred to Figure 4 Step S420 shown is not repeated here.

[0120] exist Figure 5 In the embodiment shown, the encryption key and decryption key corresponding to the target identity authentication method are generated based on the node certificate of the blockchain node. Since the node certificate is stable and secure, the security of the encryption key and decryption key can be guaranteed, and the security of the public key can be improved. In addition, the decryption key is generated after receiving the public key update request, which can further improve the security of the decryption key and prevent the decryption key from being obtained by others.

[0121] In an exemplary embodiment, Figure 6 is Figure 3 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0122] like Figure 6 As shown, under the condition that the target identity authentication method includes the security algorithm information corresponding to the home party, step S310 includes steps S610 to S640, wherein steps S610 to S640 are described in detail as follows:

[0123] Step S610: Obtain the target identity authentication method of the blockchain account from the blockchain smart contract.

[0124] Among them, the specific method of obtaining the target identity authentication method can be found in the above records and will not be repeated here.

[0125] Step S620, obtaining algorithm input data and first algorithm output data from the update requester; wherein the first algorithm output data is the algorithm output data corresponding to the algorithm input data calculated by the update requester by calling the security algorithm.

[0126] A security algorithm is used to calculate algorithm output data based on algorithm input data. Different algorithm input data corresponds to different algorithm output data. Security algorithms can include asymmetric encryption algorithms, etc. Types of asymmetric encryption algorithms include but are not limited to Secure Hash Algorithm (SHA), Elliptic Curve Cryptography (ECC), RSA, etc., among which RSA is an encryption algorithm.

[0127] The target identity authentication method may be based on a security algorithm. The security algorithm may be selected by the blockchain account's owner or pre-negotiated between the blockchain account's owner and the blockchain node. For example, the security algorithm may be added to the account creation request during the account creation process. The security algorithm information is used to describe the security algorithm, and the security algorithm can be found based on the security algorithm information. The security algorithm information may include at least one of the security algorithm itself and identification information of the security algorithm. The identification information of the security algorithm includes, but is not limited to, the identification number of the security algorithm.

[0128] During the identity verification process, the update requester can obtain algorithm input data and invoke a security algorithm to calculate algorithm output data corresponding to the algorithm input data, thereby obtaining first algorithm output data. The specific content of the algorithm input data can be flexibly configured based on actual needs. Optionally, to enhance security, the algorithm input data can include both fixed and variable values. The fixed value can be stored in the blockchain smart contract. A variable value refers to a value that varies across different identity verification processes, and can, for example, be a random number, system time, or the like.

[0129] The blockchain node may obtain the algorithm input data and the first algorithm output data from the update requester for identity verification. The algorithm input data and the first algorithm output data may be sent to the blockchain node via the client.

[0130] Optionally, the algorithm input data and the first algorithm output data may be sent to the blockchain node via a public key update request. That is, the public key update request includes the algorithm input data and the first algorithm output data, and the blockchain node obtains the algorithm input data and the first algorithm output data from the public key update request. Of course, the algorithm input data and the first algorithm output data may be sent to the blockchain node via other means.

[0131] Step S630: Call the algorithm that matches the security algorithm information, calculate the algorithm output data corresponding to the algorithm input data, and obtain second algorithm output data.

[0132] After receiving the algorithm input data and the first algorithm output data, the security algorithm information corresponding to the blockchain account can be extracted from the blockchain smart contract, and the algorithm can be searched according to the security algorithm information. The algorithm output data corresponding to the algorithm input data is calculated by the found algorithm to obtain the second algorithm output data.

[0133] Step S640: Compare the output data of the first algorithm with the output data of the second algorithm, and determine the identity authentication result based on the comparison result.

[0134] If the update requester is the owner of the blockchain account, it will know the security algorithm corresponding to the blockchain account, and thus call the same algorithm as the security algorithm of the blockchain account to calculate the first algorithm output data. That is to say, if the update requester is the owner of the blockchain account, the first algorithm output data matches the second algorithm output data. Therefore, the first algorithm output data and the second algorithm output data can be compared to determine the identity authentication result based on the comparison result. If the first algorithm output data is different from the second algorithm output data, the update requester does not match the owner of the blockchain account; if the first algorithm output data is the same as the second algorithm output data, it can be directly determined that the update requester matches the owner of the blockchain account, or it can be further determined whether the update requester matches the owner of the blockchain account.

[0135] It should be noted that Figure 6 The specific implementation details of steps S210 to S230 shown in FIG. Figure 2 Steps S210 to S230 are shown, Figure 6 The specific implementation details of step S320 can be referred to Figure 3 Step S320 shown is not repeated here.

[0136] exist Figure 6 In the illustrated embodiment, identity authentication is performed using a security algorithm, which can verify whether the update requester is the owner of the blockchain account when the private key of the blockchain account is lost, thereby improving security.

[0137] In an exemplary embodiment, see Figure 7 , Figure 7 is Figure 6 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0138] like Figure 7As shown, under the condition that the algorithm input data includes the generation time of the public key update request, step S640 includes steps S710 to S730, which are described in detail as follows:

[0139] Step S710: Compare the output data of the first algorithm with the output data of the second algorithm to obtain a comparison result.

[0140] It should be noted that, in this embodiment, step S710 is executed first and then step S720 is executed. In actual application, step S710 and step S720 can be executed at the same time, or step S720 can be executed first and then step S710. This embodiment does not limit the order of execution of step S710 and step S720.

[0141] Step S720: Calculate the time difference between the generation time of the public key update request and the current time.

[0142] The generation time of the public key update request includes the time when the update requester initiates the public key update request. An algorithm matching the security algorithm information can be called to calculate the second algorithm output data corresponding to the generation time of the public key update request.

[0143] To avoid replay attacks, the time difference between the generation time of the public key update request and the current time can be calculated.

[0144] In step S730, if the comparison result indicates that the output data of the first algorithm matches the output data of the second algorithm, and the time difference is less than or equal to the set time difference threshold, the identity authentication result is determined to be that the update requester matches the owner of the blockchain account.

[0145] If the output data of the first algorithm matches the output data of the second algorithm, and the time difference is less than or equal to the set time difference threshold, it is determined that the update requester matches the owner of the blockchain account.

[0146] Optionally, you can first determine whether the time difference is less than or equal to the set time difference threshold. If so, call the algorithm that matches the security algorithm information, calculate the second algorithm output data, and determine whether the first algorithm output data matches the second algorithm output data.

[0147] Optionally, if the output data of the first algorithm matches the output data of the second algorithm, but the time difference is greater than a set time difference threshold, the identity authentication result is determined to be that the update requester does not match the owner of the blockchain account.

[0148] It should be noted that Figure 7 The specific implementation details of steps S210 to S230 shown in FIG. Figure 2 Steps S210 to S230 are shown, Figure 7The specific implementation details of step S310 and step S330 can be referred to Figure 3 Step S310 and step S330 shown, Figure 7 The specific implementation details of steps S610 to S630 shown in FIG. Figure 6 Steps S610 to S630 shown are not repeated here.

[0149] exist Figure 7 In the illustrated embodiment, the algorithm input data includes the generation time of the public key update request, so that the algorithm input data of different public key update requests are different, thereby improving the accuracy of identity authentication. Moreover, only when the first algorithm output data matches the second algorithm output data and the time difference between the reception time of the public key update request and the current time is less than or equal to the set time difference threshold, is it determined that the update requester matches the owner of the blockchain account. This can improve the real-time nature of identity authentication, prevent others from using the algorithm input data and the first algorithm output data to change the public key, and avoid replay attacks.

[0150] In an exemplary embodiment, see Figure 8 , Figure 8 is Figure 3 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0151] like Figure 8 As shown, under the condition that the target identity authentication method includes the communication address of the home party, step S310 includes steps S810 to S840, which are described in detail as follows:

[0152] Step S810: Obtain the target identity authentication method corresponding to the blockchain account from the blockchain smart contract.

[0153] Under the condition that the target identity authentication method includes the communication address of the owner, the target identity authentication method can be obtained from the blockchain smart contract, thereby obtaining the communication address of the owner of the blockchain account.

[0154] Step S820: Generate verification information, and send the verification information to the home party according to the home party's communication address.

[0155] The target identity verification method may include the home party's communication address. Verification information is sent to the home party via this communication address. Based on the update requester's response to the verification information, the update requester and the home party are verified to be a match. Communication addresses include, but are not limited to, phone numbers and email addresses. Verification information includes, but is not limited to, verification codes and questions.

[0156] During the identity verification process, the blockchain node can generate verification information and send the verification information to the communication address of the owner. If the verification information is a verification code, the verification information can be randomly generated. If the verification information is a question, to ensure security, the verification information can be a question randomly selected from a question library.

[0157] Step S830: Obtain feedback information from the update requester regarding the verification information.

[0158] After sending the verification information to the owner, the update requester can obtain feedback information about the verification information. This feedback information can be sent to the blockchain node through the client.

[0159] Step S840: If the verification information matches the feedback information, it is determined that the identity authentication result is that the update requester matches the owner of the blockchain account.

[0160] If the update requester is the home party, it will receive the verification information and provide correct feedback based on the verification information. If the update requester is not the home party, it will not be able to obtain the verification information and therefore cannot provide correct feedback. Therefore, the verification information and feedback information can be matched. If the two do not match, it indicates that the update requester and the home party do not match; if the two do match, it can be directly determined that the update requester and the home party match. Optionally, to improve the real-time nature of identity authentication and thus enhance security, the time difference between the time the verification information is sent and the time the feedback information is received can be calculated. If the time difference is less than or equal to a set threshold and the verification information and feedback information match, the update requester and the home party are determined to match. If the time difference is greater than the set threshold, even if the verification information and feedback information match, the update requester and the home party are determined to be non-matching. It is first determined whether the time difference is less than or equal to the set threshold. If so, then the verification information and feedback information are determined to match.

[0161] Among them, the specific judgment method for whether the verification information and the feedback information match can be flexibly set according to actual needs. For example, if the verification information is a verification code, the feedback information contains the verification code. If the verification code in the verification information is consistent with the verification code in the feedback information, the verification information and the feedback information match; if the verification information is a question, the feedback information is the answer to the question. If the answer contained in the feedback information is the correct answer to the question, it is determined that the verification information and the feedback information match. For example, assuming that the verification information is "1+5=?", if the feedback information is "6", the verification information and the feedback information match.

[0162] It should be noted that Figure 8The specific implementation details of steps S210 to S230 shown in FIG. Figure 2 Steps S210 to S230 are shown, Figure 8 The specific implementation details of step S310 can be referred to Figure 3 Step S310 shown is not repeated here.

[0163] exist Figure 8 In the embodiment shown, verification information is sent to the owner based on the communication address of the owner, feedback information of the update requester regarding the verification information is obtained, and whether the update requester matches the owner of the blockchain account is determined based on whether the verification information matches the feedback information. This not only allows verification of whether the update requester is the owner of the blockchain account when the private key is lost, but also simplifies the verification method and saves resources.

[0164] In an exemplary embodiment, see Figure 9 , Figure 9 is Figure 3 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0165] like Figure 9 As shown, step S220 includes steps S910 to S920, which are described in detail as follows:

[0166] Step S910: Obtain the public key of the blockchain account according to the account creation request, and search for the target identity authentication method selected by the owner of the blockchain account from multiple identity authentication methods according to the account creation request.

[0167] In order to improve the security of identity authentication and thus the security of public keys, multiple authentication methods can be pre-set, and the target authentication method selected by the account requester can be selected from the multiple authentication methods according to the account creation request.

[0168] Among them, the specific process of searching for the target identity authentication method based on the account creation request can be flexibly set according to actual needs. For example, in an optional example, the account creation request can include the target identity authentication method, or, after the blockchain node receives the account creation request, it can send a selection request to the account requester through the client, and the selection request includes multiple identity authentication methods, so that the account requester can feedback a selection instruction according to the selection request, and the blockchain node selects the target identity authentication method from the multiple identity authentication methods according to the selection instruction.

[0169] In step S920, the blockchain account, the public key of the blockchain account, and the target identity authentication method are associated and stored in the blockchain smart contract.

[0170] The blockchain account, its public key, and the target authentication method are associated, and then the association is stored in the blockchain smart contract.

[0171] It should be noted that Figure 9 The specific implementation details of step S210 and step S230 can be referred to Figure 2 Step S210 and step S230 shown, Figure 9 The specific implementation details of steps S310 to S320 shown in FIG. Figure 3 Steps S310 to S320 shown are not repeated here.

[0172] exist Figure 9 In the illustrated embodiment, the owner of a blockchain account can select a target authentication method from a variety of authentication methods, thereby enhancing the differentiation of authentication methods and improving security.

[0173] In an exemplary embodiment, see Figure 10 , Figure 10 is Figure 2 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0174] like Figure 10 As shown, under the condition that the blockchain smart contract contains the public key of the set verifier, step S240 includes steps S1010 to S1030, which are described in detail as follows:

[0175] Step S1010: Search the public key of the verifier from the blockchain smart contract, and obtain the signature data generated based on the private key of the verifier from the public key update request.

[0176] To enhance the security of public keys, blockchain smart contracts include the public key of the validator, allowing the validator to determine whether it agrees to the public key update based on the validator's public key. The validator and its number can be flexibly configured based on actual needs. For example, a validator can include a system administrator, a member of a preset role (e.g., a member of an organization with a preset role in the blockchain smart contract who is responsible for modifying the public key), etc. Validators can be added to the blockchain smart contract during deployment and can be added or removed later based on actual needs. Different blockchain accounts can have the same or different validators. There can be multiple validators, thus implementing a multi-signature verification mechanism.

[0177] The public key update request includes signature data generated based on the private key of the authenticator. Optionally, in order to obtain the authenticator's signature data, during the process of generating the public key update request, after the update requester initiates the public key update request in the client, the client can send a signature request to the authenticator. The signature request can include the public key update request. After receiving the signature request, the authenticator can determine whether to sign the public key update request. If so, the authenticator signs the public key update request based on its own private key and sends the signed public key update request to the update requester.

[0178] After receiving a public key update request containing the verifier's signature data, the blockchain node can look up the verifier's public key from the blockchain smart contract.

[0179] Step S1020: Verify the signature data based on the public key of the verifier found.

[0180] The signature data of the authenticator included in the public key update request is verified based on the authenticator's public key.

[0181] Step S1030: If the verification is successful, the public key associated with the blockchain account in the blockchain smart contract is updated according to the target public key.

[0182] If the signature data of the verifier is successfully verified, the public key associated with the blockchain account in the blockchain smart contract can be updated based on the target public key.

[0183] If the signature data of the authenticator is verified and identified, the public key update request may be rejected.

[0184] It should be noted that Figure 10 The specific implementation details of steps S210 to S230 shown in FIG. Figure 2 Steps S210 to S230 are shown and will not be described again here.

[0185] exist Figure 10In the embodiment shown, the authenticator's public key is also used to verify the authenticator's signature data contained in the public key update request. The public key is updated only after the verification is passed. In other words, the update of the public key requires the authenticator's consent, thereby improving security. In addition, the authenticator's public key is stored in the blockchain smart contract, further improving security.

[0186] In an exemplary embodiment, see Figure 11 , Figure 11 is Figure 2 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 121 in the illustrated implementation environment.

[0187] like Figure 11 As shown, the method may further include steps S1110-S1130, which are described in detail as follows:

[0188] Step S1110: Receive a transaction request for a blockchain account; wherein the transaction request includes signature data generated based on a private key of the blockchain account.

[0189] After a blockchain account is created, it can receive transaction requests for the blockchain account. This transaction information includes, but is not limited to, at least one of querying the account balance and transferring account resources. The transaction request can include the blockchain account and signature data generated using the blockchain account's private key. In other words, the transaction request will be signed using the blockchain account's private key.

[0190] Optionally, the transaction requester can initiate the transaction request in the client. For example, see Figure 12 As shown, the software development kit of the blockchain system can be deployed in the client, and the requester can initiate a transaction request for a blockchain account in the blockchain system. When initiating a transaction request, the requester needs to provide the client with the private key of the blockchain account, so that the client signs the transaction request based on the private key of the blockchain account and sends the signed transaction request to the blockchain node through the SDK of the blockchain system.

[0191] Step S1120: Search the public key associated with the blockchain account from the blockchain smart contract, and verify the signature data included in the transaction request based on the found public key.

[0192] In order to verify whether the transaction request is legitimate, the public key associated with the blockchain account can be found from the blockchain smart contract to verify the signature data contained in the transaction request based on the public key.

[0193] Step S1130: If the signature data included in the transaction request is successfully verified, the transaction request is executed.

[0194] If the signature data included in the transaction request is successfully verified, the transaction request is executed. For example, if the transaction request is a request to query an account balance, the balance of the blockchain account is queried from the blockchain system and the balance is sent to the requester of the transaction request.

[0195] Optionally, if the signature data included in the transaction request fails to be verified, the transaction request is rejected.

[0196] It should be noted that Figure 11 The specific implementation details of steps S210 to S240 shown in FIG. Figure 2 Steps S210 to S240 are shown and will not be described again here.

[0197] exist Figure 11 In the illustrated embodiment, after receiving a transaction request from a blockchain account, the public key associated with the blockchain account is obtained from the blockchain smart contract, and the signature data generated based on the private key of the blockchain account contained in the transaction request is verified based on the public key. Since the public key associated with the blockchain account in the blockchain smart contract is changeable, even if the private key of the blockchain account is lost, the private key of the blockchain account can be changed by changing the public key of the blockchain account, thereby realizing transactions on the blockchain account based on the private key of the blockchain account, thereby improving the security of the blockchain account.

[0198] See also Figure 13 , Figure 13 This is a flowchart of a data processing method based on blockchain, which is shown in an exemplary embodiment of the present application. Figure 1 The implementation environment shown, which can be Figure 1 Client 110 in the illustrated implementation environment.

[0199] like Figure 13 As shown, in an exemplary embodiment, the blockchain-based data processing method may include steps S1310-S1320, which are described in detail as follows:

[0200] Step S1310: Receive an account creation request and send the account creation request to a blockchain node, so that the blockchain node calls a blockchain smart contract to generate a blockchain account according to the account creation request, obtains a public key of the blockchain account according to the account creation request, and associates and stores the blockchain account and the public key of the blockchain account in the blockchain smart contract.

[0201] The client can receive an account creation request initiated by the account requester and then send the account creation request to the blockchain node. After receiving the account creation request, the blockchain node can invoke a blockchain smart contract to generate a blockchain account, obtain the blockchain account's public key based on the account creation request, and associate the blockchain account and the blockchain account's public key with the blockchain smart contract. The specific process can be found in the description of the aforementioned embodiment and will not be repeated here.

[0202] Optionally, after receiving an account creation request initiated by an account requester, the client can generate a key pair, send the private key in the key pair as the private key of the blockchain account to the account requester, which will be kept by the account requester, and add the public key in the key pair as the public key of the blockchain account to the account creation request, so that the blockchain node can obtain the public key from the account creation request.

[0203] Among them, considering that the key systems in different blockchain systems are different, the client can search for the target blockchain system to which the blockchain account to be created belongs from multiple blockchain systems, and generate a key pair based on the key system in the target blockchain system.

[0204] Step S1320: Receive a public key update request initiated for a blockchain account, and send the public key update request to a blockchain node, so that the blockchain node obtains the target public key of the blockchain account according to the public key update request, and updates the public key associated with the blockchain account in the blockchain smart contract to the target public key.

[0205] After creating a blockchain account, the client can receive a public key update request for the blockchain account initiated by the update requester, and send the public key update request to the blockchain node, so that the blockchain node updates the public key of the blockchain account according to the public key update request. The specific update method can be found in the records of the aforementioned embodiment and will not be repeated here.

[0206] Optionally, after receiving a public key update request for a blockchain account, the client can generate a new key pair for the blockchain account, add the public key in the new key pair as the target public key to the public key update request, and send the public key update request with the target public key to the blockchain node, so that the blockchain node obtains the target public key from the public key update request. Considering that key systems vary across different blockchain systems, the client can search for the target blockchain system to which the desired blockchain account belongs from multiple blockchain systems and generate a target key pair based on the key system of the target blockchain system.

[0207] exist Figure 13In the illustrated embodiment, a blockchain account is generated through a blockchain smart contract, and the blockchain account and the public key of the blockchain account are stored in the blockchain smart contract, thereby realizing the modifiability of the public key of the blockchain account. The public key of the blockchain account can be subsequently updated according to a public key update request. In this way, even if the user loses the private key of the blockchain account, the private key of the blockchain account can be modified by modifying the public key of the blockchain account. Therefore, in the event of the loss of the private key, the blockchain account can be retrieved by modifying the private key, thereby ensuring the security of the blockchain account and the assets in the account.

[0208] In an exemplary embodiment, see Figure 14 , Figure 14 is Figure 13 A data processing method based on blockchain is proposed based on the above. This method can be applied to Figure 1 The implementation environment shown, which can be Figure 1 Blockchain node 131 in the illustrated implementation environment.

[0209] like Figure 14 As shown, step S1320 includes steps S1410-S1440, which are described in detail as follows:

[0210] Step S1410: Receive a public key update request initiated for a blockchain account.

[0211] The update requester can initiate a public key update request for a blockchain account in the blockchain account.

[0212] Step S1420: Search the target blockchain interface corresponding to the blockchain system to which the blockchain account belongs from the blockchain interfaces corresponding to the multiple blockchain systems respectively, and obtain the target identity authentication method corresponding to the blockchain account from the blockchain smart contract through the target blockchain interface.

[0213] The client is deployed with blockchain interfaces corresponding to multiple blockchain systems. These interfaces enable communication between the client and the blockchain system, thereby enabling interaction between the requester and the blockchain system. For example, account creation requests, public key update requests, and transaction requests can be sent to the blockchain node in the corresponding blockchain system through the blockchain interface. This allows the requester to interact with multiple blockchain systems through the client without having to log in to each blockchain system separately, improving the convenience of interaction. The blockchain interface can be implemented through an SDK. The client can be a blockchain wallet client.

[0214] In order to improve the security of the public key, the blockchain smart contract includes a target identity authentication method corresponding to the blockchain account. The specific content of the target identity authentication method can be found in the description of the aforementioned embodiment and will not be repeated here.

[0215] Before updating the public key of a blockchain account, a verification can be performed based on the target identity verification method to determine whether the update requester matches the owner of the blockchain account. This verification can be performed by a blockchain node, for example, in steps S310-S320. In this embodiment, this verification is performed by a client. After receiving the account update request, the client can search for the blockchain system to which the blockchain account belongs from multiple blockchain systems, use the blockchain interface of the searched blockchain system as the target blockchain interface, and query the blockchain smart contract for the target identity verification method of the blockchain account through the target blockchain interface.

[0216] Step S1430: Verify whether the update requester of the public key update request matches the owner of the blockchain account according to the target identity authentication method, and obtain the identity authentication result.

[0217] According to the target identity authentication method, verify whether the update requester matches the owner of the blockchain account. The specific verification method can be found in the description of the aforementioned embodiment and will not be repeated here.

[0218] In step S1440, if the identity authentication result indicates that the update requester matches the owner of the blockchain account, the public key update request is sent to the blockchain node.

[0219] If the update requester matches the owner of the blockchain account, the public key update request is sent to the blockchain node, so that the blockchain node updates the public key associated with the blockchain account according to the public key update request.

[0220] Optionally, if the update requester does not match the owner of the blockchain account, the public key update request is rejected.

[0221] It should be noted that Figure 14 The specific implementation details of step S1410 can be referred to Figure 14 Step S1410 shown is not repeated here.

[0222] exist Figure 14 In the illustrated embodiment, the client includes blockchain interfaces corresponding to multiple blockchain systems, allowing users to interact with different blockchain systems through the client, thereby improving convenience. Moreover, before updating the public key of the blockchain, it will verify whether the update requester of the public key update request matches the owner of the blockchain account based on the target identity authentication method. If so, the public key update request will be sent to the blockchain node to enable the blockchain node to update the public key of the blockchain account, thereby improving security.

[0223] In order to better understand the present invention, a specific example is used here to introduce the data processing method based on blockchain. Figure 15 As shown, the implementation environment of this embodiment includes a client and multiple blockchain systems, such as the Ethereum blockchain system and the commercial distributed blockchain operating system (Enterprise Operation System, EOS). The client includes the SDK of each blockchain system, such as the SDK of the Ethereum blockchain system, the SDK of EOS, and the SDK of other blockchain systems. The client communicates with the corresponding blockchain system through the SDK. The client can be used to create a key pair for the requesting party (user) in the blockchain system, that is, to create a key pair corresponding to the user's blockchain account in the blockchain system. Considering that different blockchain systems have different key systems, the client can create a key pair for the blockchain account based on the key system of the blockchain system to which the blockchain account belongs, for example, creating a key pair corresponding to the Ethereum blockchain system, creating a key pair corresponding to the EOS blockchain system, and so on.

[0224] To update the public key of a blockchain account, a blockchain smart contract is configured. The blockchain smart contract includes an account creation method and a public key update method. The account creation method is used to create a blockchain account and associate and store the blockchain account and its corresponding public key in the blockchain smart contract. The public key update method is used to update the public key associated with the blockchain account. The blockchain account can be deployed in a blockchain system that requires public key update functionality.

[0225] In the process of creating a blockchain account, see Figure 16 As shown, when a user wants to create a blockchain account in a blockchain system, he can initiate an account creation request in the client. The client generates a key pair based on the key system of the blockchain system according to the account creation request, and adds the public key in the key pair as the public key of the blockchain account to the account creation request. The account creation request is sent to the blockchain node of the blockchain system through the SDK of the blockchain system. The blockchain node then calls the blockchain smart contract to generate a blockchain account, associates the public key of the blockchain account with the blockchain account, and stores the associated blockchain account and public key in the blockchain smart contract. Among them, Figure 16 In the example, the public key of the generated key pair is PK01, the private key is SK01, and the blockchain account is 0x001. In the blockchain smart contract, the blockchain account 0x001 is associated with the public key PK01 and stored.

[0226] After a blockchain account is created, if the user forgets the private key of the blockchain account, or if other users want to change the public key of the blockchain account, see Figure 17As shown, the user can initiate a public key update request for a blockchain account in the client. The client generates a new key pair based on the key system in the blockchain system to which the blockchain account belongs, and adds the public key in the new key pair as the target public key of the blockchain account to the public key update request. The public key update request is sent to the blockchain node through the SDK of the blockchain system. The blockchain node calls the public key update method in the blockchain smart contract to update the public key associated with the blockchain account to the target public key. Figure 17 In the example, the public key in the new key pair is PK02 and the private key is SK02. In the blockchain smart contract, the public key associated with the blockchain account 0x001 is updated from PK01 to PK02.

[0227] During the update process, in order to improve security, the blockchain smart contract contains the public key of the system administrator or the member of the preset role. After obtaining the public key update request initiated by the user, the client can send the public key update request to the system administrator or the member of the preset role, and the system administrator or the member of the preset role uses his or her own private key to sign the public key update request. Alternatively, the client can obtain the private key of the system administrator or the member of the preset role, and use the private key to sign the public key update request, and send the signed public key update request to the blockchain node. The blockchain node uses the public key of the system administrator or the member of the preset role contained in the blockchain smart contract to verify the signature data contained in the public key update request. The public key is updated only after the verification is successful, thereby improving the security of the public key through the multi-signature mechanism.

[0228] Optionally, if any organization or institution can initiate a public key update request for the public key of a blockchain account, it will cause the organization or institution to privately modify the public key of the blockchain account, resulting in the theft of the blockchain account. Therefore, it is set that only the owner of the blockchain account can initiate a public key update request. Considering that if the owner forgets the private key of the blockchain account, the owner cannot prove that it is the owner of the blockchain account, therefore, see Figure 18 As shown, during the account creation process, after a user initiates an account creation request, the client can also determine the target authentication method during key pair generation. This target authentication method can be selected by the user and then stored in the blockchain smart contract. During the update process of the blockchain account's public key, after receiving the public key update request, the blockchain node can verify whether the update initiator is the owner of the blockchain account based on the target authentication method. If so, the public key is updated.

[0229] The target identity authentication method includes but is not limited to at least one of the following methods:

[0230] The first method is to provide the mobile phone number and email address of the owner of the blockchain account during the account creation process. During the identity verification process, verification information is sent to the mobile phone number or email address, and feedback information entered by the update requester through the client is received. If the verification information matches the feedback information, the update requester is determined to be the owner of the blockchain account.

[0231] The second one, see Figure 19 As shown, during the account creation process, the owner can set a security algorithm (e.g., SHA1) and a reference key (e.g., PKMN), and store the security algorithm and reference key in the blockchain smart contract. During the modification of the public key, the update requester can call the security algorithm in the client, use the reference key and the generation time of the public key update request as the algorithm input data, calculate the corresponding algorithm output data, and obtain the first password; add the first password and generation time to the public key update request and send it to the blockchain node. The blockchain node calls the security algorithm stored in the blockchain smart contract, uses the generation time and reference key as input, calculates the corresponding algorithm output data, obtains the second password, and determines whether the first password and the second password are consistent. If they are consistent, it is determined that the update requester is the owner of the blockchain account and the identity authentication is successful; if they are inconsistent, it is determined that the update requester is not the owner of the blockchain account and the identity authentication fails.

[0232] Optionally, in order to ensure the security of the security algorithm itself, the node certificate of the blockchain node can be used to generate an encryption key, and the encryption key can be used to encrypt the security algorithm to obtain the ciphertext data of the security algorithm, and then the ciphertext data of the security algorithm is stored in the blockchain smart contract; during the identity authentication process, the ciphertext data of the security algorithm is found from the blockchain smart contract, and a decryption key is generated based on the node certificate of the blockchain node, the security algorithm is decrypted using the decryption key, and the second password is calculated based on the plaintext data of the security algorithm obtained by decryption.

[0233] Optionally, after receiving the public key update request, you can first determine whether the time difference between the generation time and the current time is less than or equal to the set time difference threshold. If so, calculate the second password and determine whether the first password and the second password are consistent. If they are consistent, the identity authentication is successful, thereby avoiding replay attacks.

[0234] Optionally, during the public key update process, the multi-signature mechanism and identity authentication can be combined to determine whether to update the public key. If the multi-signature verification is successful, the target identity authentication method can be used for verification. If the identity authentication is successful, the public key can be updated.

[0235] It should be noted that the steps in this embodiment have been described in detail in the previous embodiments and will not be repeated here.

[0236] Through the solution provided in this embodiment, the public key of a blockchain account can be changed, so that when a user loses the private key of a blockchain account, the user can change the private key of the blockchain account by changing the public key of the blockchain account, thereby regaining control of the blockchain account and improving the security of the blockchain account and the resources in the account. In addition, before changing the public key of the blockchain account, identity verification is performed to ensure the security of the public key.

[0237] See also Figure 20 , Figure 20 This is a block diagram of a data processing device based on blockchain, as shown in an exemplary embodiment of the present application. Figure 20 As shown, the device includes:

[0238] The calling module 2001 is configured to call the blockchain smart contract to generate a blockchain account according to the account creation request;

[0239] The storage module 2002 is configured to obtain the public key of the blockchain account according to the account creation request, and store the blockchain account and the public key of the blockchain account in association with the blockchain smart contract;

[0240] An acquisition module 2003 is configured to acquire a public key update request initiated for a blockchain account, and acquire a target public key of the blockchain account according to the public key update request;

[0241] The update module 2004 is configured to update the public key associated with the blockchain account in the blockchain smart contract to the target public key.

[0242] In an exemplary embodiment, based on the aforementioned scheme, the update module 2004 is specifically configured to: obtain the target identity authentication method corresponding to the blockchain account from the blockchain smart contract, and verify whether the update requester of the public key update request matches the owner of the blockchain account according to the target identity authentication method, and obtain an identity authentication result; if the identity authentication result indicates that the update requester matches the owner of the blockchain account, then update the public key associated with the blockchain account in the blockchain smart contract according to the target public key.

[0243] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the blockchain smart contract contains ciphertext data obtained by encrypting the target identity authentication method based on the encryption key, the update module 2004 is specifically configured as follows: obtaining the ciphertext data from the blockchain smart contract, and decrypting the ciphertext data according to the decryption key corresponding to the encryption key to obtain the plaintext data of the target identity authentication method; based on the plaintext data of the target identity authentication method, verifying whether the update requester matches the owner of the blockchain account to obtain the identity authentication result.

[0244] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the encryption key is generated according to the node certificate of the blockchain node, the update module 2004 is specifically configured to: obtain the node certificate of the blockchain node, and generate a decryption key based on the node certificate; decrypt the ciphertext data according to the decryption key to obtain the plaintext data of the target identity authentication method.

[0245] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the target identity authentication method includes the security algorithm information corresponding to the belonging party, the update module 2004 is specifically configured as follows: obtaining algorithm input data and first algorithm output data from the update requester; wherein the first algorithm output data is the algorithm output data corresponding to the algorithm input data calculated by the update requester calling the security algorithm; calling the algorithm matching the security algorithm information, calculating the algorithm output data corresponding to the algorithm input data, and obtaining the second algorithm output data; comparing the first algorithm output data with the second algorithm output data, and determining the identity authentication result based on the comparison result.

[0246] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the algorithm input data includes the generation time of the public key update request, the update module 2004 is specifically configured to: calculate the time difference between the generation time of the public key update request and the current time; if the comparison result indicates that the first algorithm output data matches the second algorithm output data, and the time difference is less than or equal to the set time difference threshold, then determine that the identity authentication result is that the update requester matches the owner of the blockchain account.

[0247] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the target identity authentication method includes the communication address of the owner, the update module 2004 is specifically configured to: generate verification information, and send the verification information to the owner based on the communication address of the owner; obtain feedback information from the update requester regarding the verification information; if the verification information matches the feedback information, it is determined that the identity authentication result is that the update requester matches the owner of the blockchain account.

[0248] In an exemplary embodiment, based on the aforementioned scheme, the storage module 2002 is specifically configured to: search for the target identity authentication method selected by the owner of the blockchain account from multiple identity authentication methods according to the account creation request; and associate and store the blockchain account, the public key of the blockchain account, and the target identity authentication method in the blockchain smart contract.

[0249] In an exemplary embodiment, based on the aforementioned scheme, under the condition that the blockchain smart contract contains the set public key of the verifier, the update module 2004 is specifically configured as follows: searching for the public key of the verifier from the blockchain smart contract, and obtaining the signature data generated according to the private key of the verifier from the public key update request; verifying the signature data according to the found public key of the verifier; if the verification is successful, updating the public key associated with the blockchain account in the blockchain smart contract according to the target public key.

[0250] In an exemplary embodiment, based on the aforementioned scheme, the device also includes a transaction module configured to: receive a transaction request for a blockchain account; wherein the transaction request includes signature data generated based on the private key of the blockchain account; search for the public key associated with the blockchain account from the blockchain smart contract, and verify the signature data included in the transaction request based on the found public key; if the signature data included in the transaction request is successfully verified, execute the transaction request.

[0251] It should be noted that Figure 20 The provided blockchain-based data processing device and the blockchain-based data processing method corresponding to the blockchain node provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here.

[0252] See also Figure 21 , Figure 21 This is a block diagram of a data processing device based on blockchain, shown in an exemplary embodiment of the present application. The blockchain system includes a first consensus node and a second consensus node, and the device is configured at the second consensus node. Figure 21 As shown, the device includes:

[0253] The first transceiver module 2101 is configured to receive an account creation request and send the account creation request to a blockchain node, so that the blockchain node calls a blockchain smart contract to generate a blockchain account according to the account creation request, obtains a public key of the blockchain account according to the account creation request, and associates and stores the blockchain account and the public key of the blockchain account in the blockchain smart contract;

[0254] The second transceiver module 2102 is configured to receive a public key update request initiated for a blockchain account and send the public key update request to the blockchain node, so that the blockchain node obtains the target public key of the blockchain account according to the public key update request and updates the public key associated with the blockchain account in the blockchain smart contract to the target public key.

[0255] In an exemplary embodiment, based on the aforementioned scheme, the second transceiver module 2102 is specifically configured as follows: from the blockchain interfaces corresponding to multiple blockchain systems, find the target blockchain interface corresponding to the blockchain system to which the blockchain account belongs, and obtain the target identity authentication method corresponding to the blockchain account from the blockchain smart contract through the target blockchain interface; according to the target identity authentication method, verify whether the update requester of the public key update request matches the owner of the blockchain account, and obtain the identity authentication result; if the identity authentication result indicates that the update requester matches the owner of the blockchain account, the public key update request is sent to the blockchain node.

[0256] It should be noted that Figure 21 The provided blockchain-based data processing device and the blockchain-based data processing method corresponding to the client provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here.

[0257] An embodiment of the present application further provides an electronic device, comprising: one or more processors; and a storage device for storing one or more computer programs. When the one or more computer programs are executed by the one or more processors, the electronic device implements the blockchain-based data processing method provided in each of the above embodiments.

[0258] Figure 22 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown.

[0259] It should be noted that Figure 22 The computer system 2200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0260] like Figure 22 As shown, the computer system 2200 includes a central processing unit (CPU) 2201, which can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 2202 or the computer program loaded from the storage part 2208 to the random access memory (RAM) 2203, such as executing the data processing method based on the blockchain in the above embodiment. Various computer programs and data required for system operation are also stored in the RAM 2203. The CPU 2201, ROM 2202 and RAM 2203 are connected to each other through the bus 2204. The input / output (I / O) interface 2205 is also connected to the bus 2204.

[0261] In some embodiments, the following components are connected to the I / O interface 2205: an input section 2206 including a keyboard, a mouse, and the like; an output section 2207 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 2208 including a hard disk; and a communication section 2209 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 2209 performs communication processing via a network such as the Internet. A drive 2210 is also connected to the I / O interface 2205 as needed. Removable media 2211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is installed in the drive 2210 as needed, so that computer programs read therefrom can be installed into the storage section 2208 as needed.

[0262] In particular, according to an embodiment of the present application, a computer program that implements a blockchain-based data processing method can be carried on a computer-readable medium, which can be downloaded and installed from a network through the communication part 2209, and / or installed from a removable medium 2211.

[0263] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a computer program that can be used by or in combination with an instruction execution system, device or device. A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program, and such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer program embodied in the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0264] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.

[0265] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0266] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor of an electronic device, the computer program enables the electronic device to implement the aforementioned blockchain-based data processing method. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device.

[0267] Another aspect of the present application provides a computer program product, comprising a computer program that, when executed by a processor, implements the blockchain-based data processing methods provided in each of the aforementioned embodiments. The computer program may be stored in a computer-readable storage medium. The computer program product may be a product, such as an app (application, mobile software), a webpage, or a mini-program; alternatively, the computer program product may be a storage medium, device, terminal, or virtual machine containing the computer program.

[0268] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. Ordinary technicians in this field can easily make corresponding changes or modifications based on the main ideas and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A data processing method based on blockchain, characterized in that: The method comprises: Based on the account creation request, the blockchain smart contract is called to generate a blockchain account; Obtaining the public key of the blockchain account according to the account creation request, and associating the blockchain account and the public key of the blockchain account and storing them in the blockchain smart contract; Obtaining a public key update request initiated for the blockchain account, and obtaining a target public key of the blockchain account according to the public key update request; Update the public key associated with the blockchain account in the blockchain smart contract to the target public key.

2. The method according to claim 1, wherein Updating the public key associated with the blockchain account in the blockchain smart contract to the target public key includes: Obtaining a target identity authentication method corresponding to the blockchain account from the blockchain smart contract, and verifying, based on the target identity authentication method, whether the update requester of the public key update request matches the owner of the blockchain account, thereby obtaining an identity authentication result; If the identity authentication result indicates that the update requester matches the owner of the blockchain account, the public key associated with the blockchain account in the blockchain smart contract is updated according to the target public key.

3. The method according to claim 2, wherein The blockchain smart contract includes ciphertext data obtained by encrypting the target identity authentication method based on an encryption key; The obtaining of a target identity authentication method corresponding to the blockchain account from the blockchain smart contract, and verifying, based on the target identity authentication method, whether the update requester of the public key update request matches the owner of the blockchain account, to obtain an identity authentication result, includes: Obtain the ciphertext data from the blockchain smart contract, and decrypt the ciphertext data according to the decryption key corresponding to the encryption key to obtain the plaintext data of the target identity authentication method; According to the plaintext data of the target identity authentication method, verify whether the update requester matches the owner of the blockchain account to obtain the identity authentication result.

4. The method according to claim 3, wherein The encryption key is generated based on the node certificate of the blockchain node; The decrypting the ciphertext data according to the decryption key corresponding to the encryption key to obtain the plaintext data of the target identity authentication method includes: Obtaining a node certificate of the blockchain node, and generating the decryption key according to the node certificate; The ciphertext data is decrypted according to the decryption key to obtain the plaintext data of the target identity authentication method.

5. The method according to claim 2, wherein The target identity authentication method includes security algorithm information corresponding to the home party; The step of verifying, according to the target identity authentication method, whether the update requester of the public key update request matches the owner of the blockchain account, and obtaining an identity authentication result includes: Acquire algorithm input data and first algorithm output data from the update requester; wherein the first algorithm output data is algorithm output data corresponding to the algorithm input data calculated by the update requester by calling a security algorithm; Invoking an algorithm that matches the security algorithm information, calculating algorithm output data corresponding to the algorithm input data, and obtaining second algorithm output data; The first algorithm output data is compared with the second algorithm output data, and the identity authentication result is determined based on the comparison result.

6. The method according to claim 5, wherein The algorithm input data includes the generation time of the public key update request; Determining the identity verification result according to the comparison result includes: Calculating the time difference between the generation time of the public key update request and the current time; If the comparison result indicates that the first algorithm output data matches the second algorithm output data, and the time difference is less than or equal to the set time difference threshold, then the identity authentication result is determined to be that the update requester matches the owner of the blockchain account.

7. The method according to claim 2, wherein The target identity authentication method includes the communication address of the home party; The step of verifying, according to the target identity authentication method, whether the update requester of the public key update request matches the owner of the blockchain account, and obtaining an identity authentication result includes: generating verification information, and sending the verification information to the home party according to the communication address of the home party; Obtaining feedback information from the update requester regarding the verification information; If the verification information matches the feedback information, it is determined that the identity authentication result is that the update requester matches the owner of the blockchain account.

8. The method according to claim 2, wherein The associating and storing the blockchain account and the public key of the blockchain account in the blockchain smart contract includes: According to the account creation request, searching for the target identity authentication method selected by the owner of the blockchain account from multiple identity authentication methods; The blockchain account, the public key of the blockchain account, and the target identity authentication method are associated and stored in the blockchain smart contract.

9. The method according to claim 1, wherein The blockchain smart contract contains the public key of the set verifier; Updating the public key associated with the blockchain account in the blockchain smart contract to the target public key includes: Searching for the public key of the verifier from the blockchain smart contract, and obtaining signature data generated based on the private key of the verifier from the public key update request; Verifying the signature data according to the found public key of the verifier; If the verification is successful, the public key associated with the blockchain account in the blockchain smart contract is updated according to the target public key.

10. The method according to any one of claims 1 to 9, wherein The method further comprises: Receiving a transaction request for the blockchain account; wherein the transaction request includes signature data generated based on the private key of the blockchain account; Searching for the public key associated with the blockchain account from the blockchain smart contract, and verifying the signature data included in the transaction request based on the found public key; If the signature data included in the transaction request is successfully verified, the transaction request is executed.

11. A data processing method based on blockchain, characterized in that: The method further comprises: Receive an account creation request and send the account creation request to a blockchain node, so that the blockchain node calls a blockchain smart contract to generate a blockchain account according to the account creation request, obtains a public key of the blockchain account according to the account creation request, and associates and stores the blockchain account and the public key of the blockchain account in the blockchain smart contract; Receive a public key update request initiated for the blockchain account, and send the public key update request to the blockchain node, so that the blockchain node obtains the target public key of the blockchain account according to the public key update request, and updates the public key associated with the blockchain account in the blockchain smart contract to the target public key.

12. The method according to claim 11, wherein The sending the public key update request to the blockchain node includes: Searching for a target blockchain interface corresponding to the blockchain system to which the blockchain account belongs from the blockchain interfaces corresponding to the multiple blockchain systems, and obtaining a target identity authentication method corresponding to the blockchain account from the blockchain smart contract through the target blockchain interface; Verify, according to the target identity authentication method, whether the update requester of the public key update request matches the owner of the blockchain account, and obtain an identity authentication result; If the identity authentication result indicates that the update requester matches the owner of the blockchain account, the public key update request is sent to the blockchain node.

13. A data processing device based on blockchain, characterized in that: The device comprises: A calling module is configured to call a blockchain smart contract to generate a blockchain account according to an account creation request; a storage module configured to obtain the public key of the blockchain account according to the account creation request, and store the blockchain account and the public key of the blockchain account in association with the blockchain smart contract; an acquisition module configured to acquire a public key update request initiated for the blockchain account, and acquire a target public key of the blockchain account according to the public key update request; An update module is configured to update the public key associated with the blockchain account in the blockchain smart contract to the target public key.

14. A data processing device based on blockchain, characterized in that: The device comprises: a first transceiver module configured to receive an account creation request and send the account creation request to a blockchain node, so that the blockchain node calls a blockchain smart contract to generate a blockchain account according to the account creation request, obtains a public key of the blockchain account according to the account creation request, and associates and stores the blockchain account and the public key of the blockchain account in the blockchain smart contract; The second transceiver module is configured to receive a public key update request initiated for the blockchain account and send the public key update request to the blockchain node, so that the blockchain node obtains the target public key of the blockchain account according to the public key update request and updates the public key associated with the blockchain account in the blockchain smart contract to the target public key.

15. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the method according to any one of claims 1 to 12.

16. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor of an electronic device, the electronic device is enabled to implement the method according to any one of claims 1 to 12.

17. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 12 when being executed by a processor.