Disclosure of Invention
In order to overcome the above disadvantages in the prior art, an object of the present application is to provide an address book backup method applied to an address book backup system, where the address book backup system includes a blockchain network composed of a user node and a plurality of contract running nodes, and the contract running nodes pre-store a correspondence between an identity of a user and a public key; the method comprises the following steps:
the user node issues an address book modification request to the block chain network, wherein the address book modification request comprises an identity of a user and an address book modification item encrypted by a public key of the user;
at least one contract running node in the block chain network searches a corresponding public key according to the identity in the address book modification request through a pre-configured block chain intelligent contract to decrypt and verify the encrypted address book modification item;
and after the at least one contract running node passes the verification, generating an address book modification record according to the corresponding relation between the identity and the address book modification item, and synchronizing the address book modification record to other contract running nodes in the block chain network.
Optionally, the method further comprises:
the user node issues an address book acquisition request to the block chain network, wherein the address book acquisition request comprises the identity of the user and signature information generated by a private key of the user;
and at least one contract operation node in the block chain network verifies the address book acquisition request through the intelligent contract of the block chain, searches a corresponding address book modification record according to the identity after the address book acquisition request passes the verification, generates a backup address book and sends the backup address book to the user node.
Optionally, the step of generating, by the contract running node, a backup address book and sending the backup address book to the user node includes:
the contract running node asymmetrically encrypts the backup address book through the public key of the user and then sends the backup address book to the user node;
the method further comprises the following steps:
and the user node decrypts the received encrypted backup address book through a private key of the user, and updates the local address book of the user node according to the decrypted backup address book.
Optionally, the method further comprises:
the user node issues an address book creating request to the block chain network, wherein the address book creating request comprises an identity of a user and an address book to be backed up encrypted by a public key of the user;
at least one contract running node in the block chain network verifies the address book creation request through the intelligent contract;
and after the at least one contract running node passes the verification, allocating a storage space for the user to record the address book to be backed up, and synchronizing the address book to be backed up to other contract running nodes in the block chain network.
Optionally, the blockchain network further comprises a contract check node; the method further comprises the following steps:
one contract running node in the plurality of contract running nodes sends a contract issuing request to a block chain network, wherein the contract issuing request comprises a block chain intelligent contract to be issued;
at least one contract check node in the block chain network checks the block chain intelligent contract to be issued, and the checked block chain intelligent contract is synchronously sent to a contract running node in the block chain network;
and the contract running node receives and runs the verified block chain intelligent contract.
Another objective of the present application is to provide an address book backup system, which includes a block chain network composed of a user node and a plurality of contract running nodes, where the contract running nodes pre-store a correspondence between an identity of a user and a public key;
the user node is used for issuing an address book modification request to the block chain network, wherein the address book modification request comprises an identity of a user and an address book modification item encrypted by a public key of the user;
at least one contract running node in the block chain network is used for searching a corresponding public key according to the identity in the address book modification request through a pre-configured block chain intelligent contract to decrypt and verify the encrypted address book modification item; and after the verification is passed, generating an address book modification record according to the corresponding relation between the identity identification and the address book modification item, and synchronizing the address book modification record to other contract operation nodes in the block chain network.
Optionally, the user node is further configured to issue an address book acquisition request to the block chain network, where the address book acquisition request includes an identity of the user and signature information generated by a private key of the user;
and at least one contract operation node in the block chain network is also used for verifying the address book acquisition request through the intelligent contract of the block chain, searching a corresponding address book modification record according to the identity after the address book acquisition request passes the verification, generating a backup address book and sending the backup address book to the user node.
Optionally, when the contract running node generates a backup address book and sends the backup address book to the user node, the contract running node asymmetrically encrypts the backup address book through the public key of the user and sends the backup address book to the user node;
and the user node decrypts the received encrypted backup address book through a private key of the user, and updates the local address book of the user node according to the decrypted backup address book.
Optionally, the user node is further configured to issue an address book creation request to the blockchain network, where the address book creation request includes an identity of a user and an address book to be backed up encrypted by a public key of the user;
at least one contract running node in the block chain network is further used for verifying the address book creation request through the intelligent contract; and after the verification is passed, allocating a storage space for the user to record the address book to be backed up, and synchronizing the address book to be backed up to other contract operation nodes in the block chain network.
Optionally, the address book backup system further includes a contract check node;
one contract running node in the plurality of contract running nodes is further used for sending a contract issuing request to the blockchain network, wherein the contract issuing request comprises a blockchain intelligent contract to be issued;
at least one contract checking node in the block chain network is used for checking the block chain intelligent contract to be issued and synchronizing the checked block chain intelligent contract to a contract running node in the block chain network;
the contract running node is further used for receiving and running the verified block chain intelligent contract.
Compared with the prior art, the method has the following beneficial effects:
according to the address book backup method and system provided by the embodiment of the application, the address book is backed up in a block chain network in an intelligent contract mode, the risk of data loss can be reduced in a distributed backup mode, and the risk of personal data leakage or falsification can be reduced in an encryption and decryption verification mode through an intelligent contract.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it is further noted that, unless expressly stated or limited otherwise, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Referring to fig. 1, fig. 1 is a schematic diagram of an address book backup system 10 provided in this embodiment, the address book backup system 10 is established on a block chain network composed of a user node 100 and a plurality of contract running nodes 200.
The contract running node 200 may include, but is not limited to, a node provided by a communication operator, a node provided by a manufacturer of a mobile terminal, a node provided by a mobile application service provider, or a node provided by a relevant monitoring part. These contract running nodes 200 may provide directory backup or restore services to users through pre-deployed intelligent contracts.
The user node 100 may include, but is not limited to, a mobile terminal, a tablet, or a personal computer, which needs to perform a backup or recovery service using communication.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for backup of an address book applied to the address book backup system 10 shown in fig. 1, and the method including various steps will be described in detail below.
In this embodiment, a user may register a corresponding relationship between the identifier 300 and a Public Key in the address book backup system 10 by means of pre-registration, and the like, where the Public Key may be generated by a private Key kept secret by the user through a preset algorithm in, for example, Public Key Cryptography Standards (PKCS), and the identifier 300 may be an address generated by multiple hash operations.
In this embodiment, the private key is stored only by a user, and is a unique identity credential of the user on the blockchain network, and the identity 300 is used to identify data backed up by the user in the blockchain network, and anyone other than the user himself cannot access the corresponding stored data. The data encrypted by the public key can only be decrypted by the corresponding private key.
First, in the present embodiment, referring to fig. 2, the backup of the address book in the blockchain network may be performed through steps S110 to S130. Step S110 to step S130 are explained in detail below.
Step S110, the user node 100 issues an address book creation request to the blockchain network, where the address book creation request includes the identity 300 of the user and the address book to be backed up encrypted by the public key of the user.
In this embodiment, when a user needs to perform address book backup for the first time, the address book to be backed up may be encrypted on the user node 100 by using the public key of the user, and then the address book creation request is generated according to the encrypted address book to be backed up and the identity 300 of the user, and is issued on the blockchain network to request to call an operation code of a newly-created address book in the blockchain intelligent contract.
Step S120, at least one contract running node 200 in the block chain network verifies the address book creation request through the intelligent contract.
In this embodiment, at least one contract running node 200 in the blockchain network verifies the received address book creation request, searches for a public key corresponding to the identity identifier 300 in the address book creation request, and decrypts and verifies the encrypted communication to be backed up by using the searched public key.
Step S130, after the at least one contract running node 200 passes the verification, allocating a storage space for the user to record the address book to be backed up, and synchronizing the address book to be backed up to other contract running nodes 200 in the block chain network.
In this embodiment, after the check is passed, the at least one contract running node 200 triggers the intelligent block chain contract, creates a separate storage space for the user, and stores the address book to be backed up in the storage space. Meanwhile, the contract running node 200 synchronizes the address book to be backed up to other contract running nodes 200 in the block chain network, so that the other contract running nodes 200 also store the address book to be backed up.
After the address book is backed up, the user may need to add, modify or delete the backed up address book for various reasons. Therefore, in the present embodiment, referring to fig. 3, the backup address book can be modified through steps S210 to S230.
Step S210, the user node 100 issues an address book modification request to the blockchain network, where the address book modification request includes the identity 300 of the user and an address book modification item encrypted by the public key of the user.
In this embodiment, the user node 100 may only use a modified part in the address book as an address book modification item, then encrypt the address book modification item by using a public key of the user, and issue the encrypted address book modification item and the identity information of the user together as an address book modification request to the blockchain network.
Step S220, at least one contract running node 200 in the blockchain network searches for a corresponding public key according to the identity 300 in the address book modification request through a pre-configured blockchain intelligent contract to decrypt and verify the encrypted address book modification item.
In this embodiment, the contract running node 200 in the blockchain network extracts the identifier 300 in the address book modification request, searches for a corresponding public key according to the identifier 300, and then decrypts and verifies the encrypted address book modification item by using the searched public key.
Step S230, after the at least one contract running node 200 passes the verification, generating an address book modification record according to the correspondence between the identity identifier 300 and the address book modification item, and synchronizing the address book modification record to other contract running nodes 200 in the block chain network.
If the encrypted address book modification item is verified to be passed by the verified contract running node 200, it indicates that the corresponding address book modification request is sent by a real user, and the contract running node 200 generates a corresponding address book modification record and synchronizes to other contract running nodes 200.
Optionally, in this embodiment, all the contract running nodes 200 may verify the address book modification request, and a contract running node 200 that completes verification first synchronizes the address book modification record generated after verification to other contract running nodes 200.
Referring to fig. 4, in the present embodiment, a backup address book may also be obtained through step S310 and step S320, and step S310 and step S320 are described in detail below.
Step S310, the user node 100 issues an address book acquisition request to the blockchain network, where the address book acquisition request includes the identity 300 of the user and signature information generated by the private key of the user.
In this embodiment, when the local address book of the user is damaged or the user replaces the mobile terminal, the previous address book needs to be acquired from the address book backup system 10. At this time, the user node 100 that needs to obtain the backup address book may log in the blockchain network, generate an address book obtaining request including the user id 300, and sign the address book obtaining request with the private key of the user.
In step S320, at least one contract running node 200 in the blockchain network verifies the address book acquisition request through the blockchain intelligent contract, searches for a corresponding address book modification record according to the identity 300 after the address book acquisition request passes the verification, generates a backup address book, and sends the backup address book to the user node 100.
After receiving the address book acquisition request, a contract node in the block chain network searches for a corresponding public key according to the identity 300 carried in the address book acquisition request to verify the signature. If the verification is passed, the contract running node 200 identifies that the address book acquisition request is sent by a real user, generates a backup address book according to the address book modification record of the user before, and sends the backup address book to the user node 100.
Optionally, in order to reveal data in the transmission process, in this embodiment, the contract running node 200 performs asymmetric encryption on the backup address book by using the public key of the user, and then sends the encrypted backup address book to the user node 100.
Then, the user node 100 decrypts the received encrypted backup address book by the private key of the user, and updates the local address book of the user node 100 according to the decrypted backup address book.
In order to ensure the security of the blockchain intelligent contract deployment, intelligent contracts with a leakage are deployed, in this embodiment, the blockchain network may further include a contract check node 400. Referring to fig. 5, the process of deploying the blockchain intelligent contract may pass through step S410, step S420 and step S430.
In step S410, one contract running node 200 of the plurality of contract running nodes 200 sends a contract issuing request to the blockchain network, where the contract issuing request includes a blockchain intelligent contract to be issued.
Step S420, at least one contract check node 400 in the blockchain network checks the to-be-issued blockchain intelligent contract, and synchronizes the checked blockchain intelligent contract to the contract running node 200 in the blockchain network.
In step S430, the contract running node 200 receives and runs the verified intelligent contract of the blockchain.
In this way, the contract check node 400 checks the issued intelligent contract of the blockchain, so that the leaked contracts can be filtered, and the security of data in the blockchain network is improved.
In summary, the address book is backed up in a manner of adopting an intelligent contract in the block chain network, the risk of data loss can be reduced in a distributed backup manner, and the risk of personal data leakage or falsification can be reduced in a manner of carrying out encryption and decryption verification through the intelligent contract.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.