WO2020232892A1 - 面向区块链的密钥管理方法、装置、设备及存储介质 - Google Patents

面向区块链的密钥管理方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020232892A1
WO2020232892A1 PCT/CN2019/103264 CN2019103264W WO2020232892A1 WO 2020232892 A1 WO2020232892 A1 WO 2020232892A1 CN 2019103264 W CN2019103264 W CN 2019103264W WO 2020232892 A1 WO2020232892 A1 WO 2020232892A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
data
value
blockchain
key data
Prior art date
Application number
PCT/CN2019/103264
Other languages
English (en)
French (fr)
Inventor
闫军
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020232892A1 publication Critical patent/WO2020232892A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of blockchain technology, and in particular to a blockchain-oriented key management method, device, equipment and storage medium.
  • the data saved on the blockchain needs to be encrypted and saved, and when the data on the chain is encrypted and saved, a key will be randomly generated and randomly generated The key is saved in a database.
  • Existing storage schemes write data to the chain while writing the randomly generated key to a database for storage. However, if data is written to the chain, the chain timeout occurs or there is no return due to network reasons.
  • the key stored in a database corresponding to the data written on the chain will be rolled back or the operation of writing the key will not be performed, which will lead to the key of the data Lost, at this time, if the data on the chain corresponding to the lost key is successfully written to the chain, the data on the chain corresponding to the key will not be decrypted due to the loss of the key, and the data cannot be used.
  • the first is to discard the data directly, so that the data becomes garbage and the data is permanently retained on the blockchain; the second is to not roll back the key of the data, that is, use two Transaction so that the data on the chain service and the key storage service are not in the same transaction.
  • the third type is to start asynchronous Thread, that is, rewrite a key after the key of the data is rolled back.
  • the above three methods will produce different problems and consequences. For the first type, if the discarded piece of data is important data, then losing the data will lead to catastrophic consequences, even if the discarded piece of data It is not important data.
  • the embodiments of the present application provide a blockchain-oriented key management method, device, equipment, and storage medium, which can effectively prevent the loss of the key of data on the blockchain and avoid adverse consequences caused by the loss of the data key.
  • an embodiment of the present application provides a blockchain-oriented key management method, which includes: if rollback key data is detected, saving the rolled back key data to a preset key
  • the rolled back key data includes the key and its corresponding key value
  • the key data in the key value database is acquired according to the preset time
  • the key data according to the acquired key data The value judges whether there is data corresponding to the key value on the blockchain; if there is data corresponding to the key value on the blockchain, use the key of the obtained key data to decrypt and the key value Corresponding data and determine whether the decryption is successful; and if the decryption is successful, save the obtained key data in a preset relational database.
  • an embodiment of the present application also provides a blockchain-oriented key management device, which includes: a first storage unit, configured to remove the rolled back key if the rolled back key data is detected The data is stored in a preset key-value database, where the rolled back key data includes the key and its corresponding key; the first obtaining unit obtains the key-value database in the preset time Key data; a first judgment unit for judging whether there is data corresponding to the key value on the blockchain according to the key value of the acquired key data; the first decryption unit is used for if the blockchain There is data corresponding to the key value, and the key of the obtained key data is used to decrypt the data corresponding to the key value and determine whether the decryption is successful; and the second storage unit is configured to: The obtained key data is stored in a preset relational database.
  • an embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the first aspect when the computer program is executed.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions when executed by a processor can The method of implementing the first aspect described above.
  • the embodiments of the application provide a blockchain-oriented key management method, device, equipment, and storage medium.
  • the embodiments of the present application can solve the problems existing in the existing key loss prevention scheme for data on the blockchain.
  • the embodiment of the application uses a key-value database to store the rolled back key data, and judges whether the corresponding data is successfully written into the chain by using the key data stored in the key-value database. If the rolled back key is The data corresponding to the data has been successfully written into the chain, and the rolled back key data is stored in the preset relational database, where there is no transaction conflict between the key-value database and the relational database, so it can be effective Prevent the loss of the key corresponding to the data on the blockchain, and avoid the adverse consequences caused by the loss of the key.
  • FIG. 1 is a schematic flowchart of a blockchain-oriented key management method provided by the first embodiment of this application;
  • FIG. 2 is a schematic flowchart of a blockchain-oriented key management method provided by the second embodiment of this application;
  • FIG. 3 is a schematic flowchart of a blockchain-oriented key management method provided by the third embodiment of this application.
  • FIG. 4 is a schematic block diagram of a blockchain-oriented key management device provided by the first embodiment of this application.
  • FIG. 5 is a schematic block diagram of a blockchain-oriented key management device provided by the second embodiment of this application.
  • FIG. 6 is a schematic block diagram of a blockchain-oriented key management device provided by the third embodiment of this application.
  • FIG. 7 is a schematic block diagram of a computer device provided by an embodiment of the application.
  • FIG. 1 is a schematic flowchart of a blockchain-oriented key management method provided by the first embodiment of this application.
  • the blockchain-oriented key management method can be run on a terminal device with a blockchain system, where the terminal device can be an electronic device such as a smart phone, a tablet computer, or a notebook computer, or an independent server or multiple devices.
  • a server cluster composed of two servers.
  • the blockchain-oriented key management method is applied to a blockchain system.
  • the method may include steps S101 to S105.
  • the data stored in the blockchain system needs to be encrypted and then written to the chain for storage.
  • a key is randomly generated and the corresponding generated key is saved to a relational type.
  • the data stored in the blockchain system is generated by the business system, and the data of the business system will be encrypted by calling the preset privacy middleware before being written to the chain and saved Processing, specifically, will call a preset privacy middleware to convert the data of the business system into data in JSON format for encryption processing.
  • the preset privacy middleware may be, for example, Sparrow privacy middleware, which is an independent system software or service program, between the operating system and software applications, where, Distributed application software can share resources among different technologies by using this privacy middleware.
  • the privacy middleware is located on the client/server operating system and is used to manage computer resources and network communications.
  • JSON JavaScript Object Notation
  • JavaScript object notation JavaScript object notation
  • the JSON data format is not only suitable for humans to read/write, but also suitable for the computer itself to parse and generate.
  • JSON is mainly widely used in programming languages similar to C.
  • the programming languages similar to C include C, C++, C#, Java, JavaScript, Perl, Python, etc.
  • JSON provides the ability to complete data exchange between multiple programming languages. Therefore, JSON is also a very ideal data exchange format.
  • JSON mainly has the following two data structures: The first is a data structure composed of key-value pairs, and this data structure has different implementations in different languages.
  • the second type is an ordered collection data structure.
  • This data structure can be implemented in different programming languages, including list, vector, array, and sequence implementations.
  • the data of the business system calls Sparrow privacy middleware for encryption, that is, the data of the business system is converted into a data structure composed of key-value pairs for encryption processing .
  • the business data format is converted into data of a data structure composed of key-value pairs, and then the value of the data is encrypted, and the encrypted value after the encryption is written together with the key of the data.
  • the key value of the data and the corresponding key randomly generated due to the encryption of the value are stored in a preset relational database, that is, the key data corresponding to the data is saved to a preset
  • the data content stored on the preset blockchain includes the key value of a data and its encrypted value
  • the data content correspondingly stored in the relational database includes the key value of the data.
  • the key used for decryption corresponding to the encrypted value is stored in a preset relational database.
  • the chain timeout or return failure or execution exception When the chain timeout or return failure or execution exception occurs, it will Automatically roll back the key data that has been saved in the preset relational database. However, failure to return or an abnormal situation does not determine that the data has failed to be chained. If the data is successfully uploaded to the chain and the key corresponding to the data is rolled back, the data on the chain will lose the key. Therefore, in this step, if the rolled back key data is detected, the rolled back key data is stored in a preset key value database, where the key data includes the key and its corresponding The key value key. That is, the key data that is rolled back in a preset relational database is stored in a preset key value database, where the rolled back key data includes a key of the data and the key corresponding to the encrypted value .
  • the preset key-value database is a non-relational database, which is suitable for applications that frequently read and write and have a simple data model.
  • the value stored in the key-value database may be a simple scalar value, such as an integer or a Boolean value; or a structured data type, such as a list and JSON structured data.
  • the key-value database usually has a simple query function, such as allowing a piece of data to be found by key-value.
  • the key-value database is a Redis database, which is a high-performance key-value database for storing key data that is rolled back.
  • the Redis database is used because the Redis database can read all the saved key data into the memory, and the access efficiency is very high, and it also supports the persistence of data to the physical disk, even if the Redis database is restarted, all saved The key data will not be lost.
  • Redis database as a database for temporarily storing the key data to be rolled back, has very high performance and can support rich data types, and all operations are atomic, and it also has many important features, such as publishing Subscription and key invalidation, etc.
  • the preset key-value database can also be selected as one of Memcached, Riak, BerkeleyDB, SimpleDB, DynamoDB, Oracle and other databases.
  • the obtaining the key data in the key-value database according to a preset time includes a sub-step: obtaining the key data in the key-value database by calling a JOD timing task.
  • the JOD timing task is a preset timing task used to automatically process some transactions at a fixed time. Specifically, an independent thread is automatically started for timing when the program starts and runs, and a piece of code is automatically executed after the preset time is counted.
  • the preset time is 5 minutes
  • the key-value database is a Redis key-value database
  • the key data in the Redis key-value database is automatically obtained after every 5 minutes.
  • the key data includes the key and its corresponding key value key.
  • the key data in the Redis key-value database is automatically obtained every five minutes, and then the obtained key data is used to search the preset blockchain to find out whether there is any data related to the key data on the blockchain.
  • the key data in the key-value database is acquired every preset time, and then the data corresponding to the key data is searched to determine whether the data corresponding to the key data is successfully wound on the chain according to the acquired key data, which can ensure high success It can effectively prevent misjudgments caused by current network problems or system overload. For example, when an abnormal situation occurs, the key data in the key-value database is immediately obtained, and then the key data The blockchain finds whether the data corresponding to the key data is successfully on the chain. At this moment, if the current network is busy or the network is interrupted, or the system is under excessive pressure, the password cannot be found on the blockchain. The data corresponding to the key data, and then the system will automatically determine that the data is unsuccessful on the chain, but in fact the data is successfully on the chain. Therefore, obtaining the key data every preset time can effectively prevent current network problems or system Misjudgments caused by stress.
  • S103 Determine whether data corresponding to the key value exists on the blockchain according to the key value of the acquired key data.
  • the business data generated by the business system is mainly converted into a data structure composed of key-value pairs for encryption, that is, the business data is converted into data composed of key-value pairs.
  • the preset privacy middleware needs to be called to encrypt the value of the data A to obtain data A of the data structure composed of key-value pairs.
  • the encrypted value of the data A is obtained, and the key of the encrypted value is randomly generated, and then the encrypted value of the data A and the key value key are written into a preset data structure composed of key-value pairs Save on the blockchain, and save the key data of the data A in a preset relational database, that is, the data A saved on the blockchain includes the key value of the data A and its encrypted value, and The key data of the data A stored in the relational database includes the key value key of the data A and the key corresponding to the encrypted value.
  • the key value key of the data A stored on the blockchain and the relational database The saved key data corresponding to the data A has the same key, and all data saved on the blockchain has a unique key value key.
  • the key data of the data A saved in the relational database can be used
  • the key value key of is searched on the blockchain to find whether there is data A that is the same as the key value key. Therefore, in one embodiment, a key data is obtained from the key value database according to a preset time, and the key value key of the obtained key data is used to search on the blockchain to determine whether there is any on the blockchain.
  • the data corresponding to the key value key if there is data corresponding to the key value key, it means that the data was actually successfully written to the chain, but the key data corresponding to the data was rolled back due to some abnormality Therefore, it is necessary to save the rolled back key data in a relational database to prevent the key data from being lost after the rollback.
  • the key data corresponding to the data can be deleted from the key value database, and the data can be downloaded under Re-wind the data when the data is wound.
  • step S103 it can be known from step S103 that the key value key of the key data is used to search the blockchain for whether there is data corresponding to the key value key of the key data, and if the data corresponding to the key value key is found The key of the key data can be used to decrypt the found data and determine whether the decryption is successful, and then it can be determined whether the data corresponding to the key data is successfully written into the chain.
  • the key of the key data successfully decrypts the found data, it indicates that the key of the key data is the key of the found data, and the found data can be decrypted, that is, the The data found has been successfully written into the blockchain. Therefore, at this time, it is only necessary to save the key data corresponding to the found data into a preset relational database, where it is written into the blockchain. The data cannot be deleted, replaced, or modified. If the key is lost, the data will become garbage and cannot be used, and it will be permanently stored on the blockchain. If the key of the key data cannot decrypt the data found, it indicates that the key of the key data is not the key of the data found.
  • this solution saves the rolled back key data into a preset key value database, obtains the key data according to the preset time, and then uses the key value of the obtained key data Search on the preset blockchain to determine whether there is data corresponding to the acquired key data on the blockchain. If you find the data corresponding to the acquired key data, you can use all The key of the obtained key data decrypts the searched data to further confirm that the key of the key data is the key of the data being searched, if it is confirmed that the key of the key data is the key of the data being searched , The rolled back key data can be saved in a preset relational database to effectively prevent the key data from being lost.
  • the embodiments of the present application can overcome the problems existing in the existing key loss prevention scheme for data on the blockchain.
  • the embodiments of the present application can effectively prevent the loss of the key data of the data, and avoid the bad consequences caused by the loss of the key data of the data.
  • the embodiment of the present application can also realize that the entire process of data writing into the chain is handled separately from abnormal transaction processing.
  • the key data that is rolled back due to the abnormal situation can be directly stored in a preset In the key-value database, the key data is automatically obtained according to the preset time, and then according to the obtained key data, whether the data corresponding to the key data is successfully written to the chain is checked, so as to avoid an abnormal situation directly to the block Check whether the data is successfully written to the chain on the chain to avoid misjudgments caused by current network problems or system overload; and in the entire process of data on the chain, separate the on-chain transaction from the exception handling to ensure that the data is on the chain.
  • the normal operation of the chain will not interrupt the transaction of the data on the chain due to an abnormal situation. If an abnormal situation occurs, you only need to write the rolled back key data into the key-value database, and there is no need to do the abnormal situation. Excessive processing can increase the readability of the code, reduce redundant codes, facilitate maintenance, and reduce maintenance costs.
  • FIG. 2 is a schematic flowchart of a blockchain-oriented key management method provided by the second embodiment of this application.
  • the method may include steps S201-S206.
  • the steps S201-S205 are similar to the steps S101-S105 in the foregoing embodiment, and will not be repeated here.
  • the step S206 added in this embodiment will be described in detail below.
  • a key data is obtained from the key value database according to the preset time, and the key value key of the obtained key data is used to search on the blockchain to determine whether there is any on the blockchain.
  • the data corresponding to the key value key if the data corresponding to the key value key of the key data cannot be found on the blockchain, it indicates that the data corresponding to the key data has failed to be written to the blockchain. Therefore, The key data corresponding to the data is deleted from the key-value database, and the data can be re-winded when the data is re-winded next time.
  • a key data is obtained from the key-value database according to the preset time, and the key value key of the obtained key data is used to search on the blockchain to determine whether there is and
  • the data corresponding to the key value key if there is data corresponding to the key value key, it means that the data is actually successfully written to the chain, but the key data corresponding to the data is rolled back due to some abnormality. Therefore, it is necessary to save the rolled back key data in a relational database to prevent the key data from being lost after the rollback.
  • the rolled back key data is saved in a preset relationship In the case of a type database, delete the key data from the key-value database.
  • this solution obtains a key data from the key value database according to the preset time, and uses the key value key of the obtained key data to search on the blockchain to determine whether the blockchain is There is data corresponding to the key. If there is data corresponding to the key, it means that the data was actually successfully written to the chain, but the key data corresponding to the data was rolled back due to some abnormality Therefore, it is necessary to save the rolled back key data in a preset relational database to prevent the key data from being lost after being rolled back.
  • the embodiments of the present application can overcome the problems existing in the existing key loss prevention scheme for data on the blockchain.
  • the embodiments of the present application can effectively prevent the loss of the key data of the data and avoid the adverse consequences caused by the loss of the key data of the data.
  • the embodiment of the present application can also realize that the entire process of data writing into the chain is handled separately from abnormal transaction processing.
  • the key data that is rolled back due to the abnormal situation can be directly stored in a preset In the key-value database, the key data is automatically obtained according to the preset time, and then according to the obtained key data, whether the data corresponding to the key data is successfully written to the chain is checked, so as to avoid an abnormal situation directly to the block Check whether the data is successfully written to the chain on the chain to avoid misjudgments caused by current network problems or system overload; and in the entire process of data on the chain, separate the on-chain transaction from the exception handling to ensure that the data is on the chain. The normal operation of the chain will not interrupt the transaction of the data on the chain due to an abnormal situation.
  • FIG. 3 is a schematic flowchart of a blockchain-oriented key management method provided by the third embodiment of this application. Specifically, as shown in FIG. 3, the method may include steps S301-S310.
  • the steps S301-S306 are similar to the steps S201-S206 in the foregoing embodiment, and will not be repeated here.
  • the steps S307 to S310 added in this embodiment will be described in detail below.
  • the preset privacy middleware may call the write link port of the transaction server through the HTTP protocol, where:
  • the HTTP protocol will return the HTTP return code purposefully, and the HTTP return code can be customized according to the needs of the user's actual application scenario.
  • the HTTP return code indicates a failure
  • the key data stored in the relational database It will be automatically rolled back. For example, if there is a data A write chain, when the data A returns an HTTP return code indicating failure, the key data of the data A will be automatically rolled back.
  • the HTTP return code includes multiple status codes, and the multiple status codes are used to indicate errors that occur when the server processes the request. That is, the multiple status codes are used to indicate errors that occur when multiple systems used in the data upload process process requests. These errors may be errors in the server itself, rather than errors in the request.
  • the multiple status codes can be, for example, 500 (server internal error), 501 (not yet implemented), 502 (error gateway), 503 (service unavailable), 504 (gateway timeout), 505 (HTTP version is not supported), etc. .
  • the time required for the entire process of writing data to the chain can be set to 15 seconds in advance. If the entire process of writing data to the chain takes more than 15 seconds, it is determined that the data entry into the chain has timed out, that is, the If the data fails to enter the chain, an HTTP return code of 504 (gateway timeout) will be returned.
  • the key data will be automatically rolled back when the program cannot continue to execute.
  • step S309 If an abnormality is returned or there is an abnormality in the call, the key data is rolled back and it is determined that the rolled key data is detected. After step S309, step S301 and subsequent steps are executed immediately.
  • the step S301 includes: saving the rolled back key data into a preset key value database, where the rolled back key data includes the key and its corresponding key value.
  • FIG. 4 is a schematic block diagram of a blockchain-oriented key management device 100 provided by the first embodiment of the application.
  • the blockchain-oriented key management device 100 corresponds to the blockchain-oriented key management method shown in FIG.
  • the blockchain-oriented key management device 100 includes a unit for executing the above-mentioned blockchain-oriented key management method.
  • the blockchain-oriented key management device 100 can be configured in a terminal equipped with a blockchain system.
  • the terminal device may be an electronic device such as a smart phone, a tablet computer, or a notebook computer, or it may be an independent server or a server cluster composed of multiple servers.
  • the blockchain-oriented key management method is applied to a blockchain system.
  • the blockchain-oriented key management device 100 includes a first storage unit 101, a first acquisition unit 102, a first judgment unit 103, a first decryption unit 104, and a second storage unit 105.
  • the first storage unit 101 is configured to, if the rolled back key data is detected, save the rolled back key data in a preset key-value database, where the rolled back key data includes the key data. The key and its corresponding key value.
  • the first obtaining unit 102 is configured to obtain key data in the key value database according to a preset time.
  • the first acquiring unit 102 includes: a first acquiring subunit 102a.
  • the first obtaining subunit 102a is configured to obtain the key data in the key value database by calling the JOD timing task.
  • the first determining unit 103 is configured to determine whether data corresponding to the key value exists on the blockchain according to the key value of the obtained key data.
  • the first decryption unit 104 is configured to, if the data corresponding to the key value exists on the blockchain, decrypt the data corresponding to the key value using the key of the obtained key data and determine whether the decryption is successful .
  • the second storage unit 105 is configured to store the obtained key data in a preset relational database if the decryption is successful.
  • FIG. 5 is a schematic block diagram of a blockchain-oriented key management apparatus 200 provided by the second embodiment of the application.
  • a block chain-oriented key management device 200 provided by the second embodiment of the present application adds a first deleting unit 206 on the basis of the foregoing embodiment, that is, the device 200 includes a third The storage unit 201, the second acquisition unit 202, the second judgment unit 203, the second decryption unit 204, the fourth storage unit 205, and the first deletion unit 206.
  • the third storage unit 201, the second acquisition unit 202, the second judgment unit 203, the second decryption unit 204, and the fourth storage unit 205 are the same as the first storage unit 101, the first acquisition unit 102, The first judgment unit 103, the first decryption unit 104, and the second storage unit 105 are similar, and since their application process and corresponding functions are similar to the corresponding units in the foregoing embodiment, they will not be repeated here.
  • the first deleting unit 206 is configured to delete the key data in the key value database if there is no data corresponding to the key value on the blockchain. In addition, the first deleting unit 206 is further configured to delete the key data from the key-value database when the key data that has been rolled back is saved in a preset relational database.
  • FIG. 6 is a schematic block diagram of a blockchain-oriented key management device 300 provided by the third embodiment of this application.
  • a blockchain-oriented key management device 300 provided by the third embodiment of the present application adds a fourth judgment unit 307, a fifth judgment unit 308, and a first The determination unit 309 and the second determination unit 310, that is, the device 300 includes a fifth storage unit 301, a third acquisition unit 302, a third judgment unit 303, a third decryption unit 304, a sixth storage unit 305, and a second deletion unit 306, a fourth determination unit 307, a fifth determination unit 308, a first determination unit 309, and a second determination unit 310.
  • the fifth storage unit 301, the third acquisition unit 302, the third judgment unit 303, the third decryption unit 304, the sixth storage unit 305, and the second deletion unit 306 are the same as the third storage unit 201,
  • the second acquisition unit 202, the second judgment unit 203, the second decryption unit 204, the fourth storage unit 205, and the first deletion unit 206 are similar. Because the application process and corresponding functions are similar to the corresponding units in the above-mentioned embodiment, This will not be repeated here.
  • the fourth determining unit 307 is configured to obtain an HTTP return code and determine whether the return is successful according to the HTTP return code.
  • the fifth judging unit 308 is configured to judge whether there is a call abnormality if the return is successful.
  • the first determination unit 309 is configured to roll back the key data and determine that the rollback of key data is detected if an abnormality is returned or there is a call abnormality.
  • the second determining unit 310 is configured to not roll back the key data and determine that the roll back key data cannot be detected if there is no call abnormality.
  • the above-mentioned apparatus may be implemented in the form of a computer program, and the computer program may be run on the computer device as shown in FIG. 7.
  • the computer device 600 may be a terminal or a server, where the terminal may be an electronic device supporting the operation of the blockchain system, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, and a personal digital assistant.
  • the server is a server that supports the operation of the blockchain system.
  • the server can be an independent server or a server cluster composed of multiple servers.
  • the computer device 600 includes a processor 602, a memory, and a network interface 605 connected through a system bus 601, where the memory may include a non-volatile storage medium 603 and an internal memory 604.
  • the non-volatile storage medium 603 can store an operating system 6031 and a computer program 6032.
  • the computer program 6032 includes program instructions.
  • the processor 602 can execute a blockchain-oriented key management method.
  • the processor 602 is used to provide calculation and control capabilities to support the operation of the entire computer device 600.
  • the internal memory 604 provides an environment for the operation of the computer program 6032 in the non-volatile storage medium 603.
  • the processor 602 can execute a blockchain-oriented key management method .
  • the network interface 605 is used for network communication with other devices.
  • FIG. 7 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation to the computer device 600 to which the solution of the present application is applied.
  • the specific computer device 600 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
  • the processor 602 is configured to run a computer program 6032 stored in the memory to implement the following steps: if rollback key data is detected, save the rolled back key data to a preset key value
  • the rolled back key data includes a key and its corresponding key value
  • the key data in the key value database is obtained according to a preset time; according to the key value of the obtained key data Determine whether there is data corresponding to the key value on the blockchain; if there is data corresponding to the key value on the blockchain, use the obtained key data to decrypt the key corresponding to the key value Determine whether the decryption is successful; and if the decryption is successful, save the obtained key data to a preset relational database.
  • the processor 602 after the processor 602 implements the step of judging whether there is data corresponding to the key value on the blockchain based on the key value of the obtained key data, the processor 602 specifically implements the following steps: The data corresponding to the key value does not exist on the blockchain, and the key data in the key value database is deleted.
  • the processor 602 when the processor 602 implements the step of obtaining the key data in the key-value database according to the preset time, it specifically implements the following steps: obtain the key-value database by calling the JOD timing task Key data.
  • the processor 602 implements the step of saving the rolled back key data in a preset key value database if the rollback key data is detected, the following steps are specifically implemented : Obtain the HTTP return code and determine whether the return is successful according to the HTTP return code; if the return is successful, determine whether there is a call exception; if the return is abnormal or there is a call exception, roll back the key data and determine that the rollback key data is detected ; And if there is no call exception, the key data is not rolled back and it is determined that the roll back key data cannot be detected.
  • the processor 602 after the processor 602 implements the step of storing the obtained key data in a preset relational database if the decryption is successful, it further implements the following step: deleting the key value database The key data in.
  • the key-value database is a Redis database.
  • the processor 602 may be a central processing unit (Central Processing Unit, CPU), and the processor 602 may also be other general-purpose processors, digital signal processors (DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • the computer program includes program instructions, and the computer program can be stored in a storage medium, which is a storage medium.
  • the program instructions are executed by at least one processor in the computer system to implement the process steps of the foregoing method embodiments.
  • this application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, where the computer program includes program instructions.
  • the processor executes the above-mentioned blockchain-oriented key management method.
  • the storage medium is a physical, non-transitory storage medium, such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk that can store program codes. medium.
  • a physical, non-transitory storage medium such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk that can store program codes. medium.
  • the steps in the method of the embodiment of the present application can be adjusted, merged, and deleted in order according to actual needs.
  • the units in the system of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium.
  • the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium It includes several instructions to make a computer device (which may be a personal computer, a terminal, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

本申请公开了面向区块链的密钥管理方法、装置、设备及存储介质,方法包括:若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;根据预设时间获取所述键值数据库中的密钥数据;根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据;以及若存在,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。

Description

面向区块链的密钥管理方法、装置、设备及存储介质
本申请要求于2019年05月22日提交中国专利局、申请号为201910429421.9、申请名称为“面向区块链的密钥管理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链技术领域,尤其涉及一种面向区块链的密钥管理方法、装置、设备及存储介质。
背景技术
在区块链系统保存数据的应用场景中,具体地,在区块链上保存的数据都是需要加密保存的,而对链上数据进行加密保存时,会随机生成密钥,并且将随机生成的密钥保存到一数据库中。现有保存方案都是在向链上写数据的同时,将随机生成的密钥写入到一数据库中保存,然而,如果往链上写数据后,出现入链超时或者因网络原因未有返回亦或者出现网络异常等情况时,保存在一数据库中的与该链上写的数据对应的密钥将会被回滚或者不进行写入密钥这一操作,进而会导致该数据的密钥丢失,此时,若与该被丢失的密钥对应的链上数据成功写入链,那么与该密钥对应的链上数据将会由于丢失密钥而无法解密,该数据也就无法使用。目前常用如下三种处理方案:第一种,直接舍弃该数据,让该数据变成垃圾数据永久保留在该区块链上;第二种,不回滚该数据的密钥,即采用两个事务以使得该数据上链服务与密钥保存服务不在同一个事务中,若出现入链超时或者因网络原因未有返回或异常等情况时,不回滚该密钥;第三种,启动异步线程,即在该数据的密钥回滚后重新写入一条密钥。但是,上述三种做法均会产生不同的问题以及后果,对于第一种,如果被舍弃的这条数据是重要的数据,那么丢失该数据将会导致灾难性后果,即使被舍弃的这条数据不是重要的数据,在链上保存一些垃圾数据也会造成链上存储负担;对于第二种,若采用多个事务分别管理,则对该多个事务的管理会比较麻烦,且若出现异常问题也不容易找到导致该异常问题的根本原因;对于第三种,若启动异步 线程,该做法虽然可以满足密钥不丢失,但是无法确认数据是否成功写入链上,而且启动异步线程可能会出现死锁问题,还会导致系统的并发能力降低。
发明内容
本申请实施例提供了一种面向区块链的密钥管理方法、装置、设备及存储介质,可以有效防止区块链上数据的密钥丢失,避免因丢失数据密钥而导致的不良后果。
第一方面,本申请实施例提供了一种面向区块链的密钥管理方法,其包括:若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;根据预设时间获取所述键值数据库中的密钥数据;根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据;若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;以及若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
第二方面,本申请实施例还提供了一种面向区块链的密钥管理装置,其包括:第一保存单元,用于若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;第一获取单元,根据预设时间获取所述键值数据库中的密钥数据;第一判断单元,用于根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据;第一解密单元,用于若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;以及第二保存单元,用于若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
第三方面,本申请实施例还提供了一种计算机设备,所述计算机设备包括存储器及处理器,所述存储器上存储有计算机程序,所述处理器执行所述计算机程序时实现上述第一方面的方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时可实现上述第一方面的方法。
本申请实施例提供了一种面向区块链的密钥管理方法、装置、设备及存储 介质。本申请实施例能够解决现有防止区块链上的数据的密钥丢失方案中所存在的问题。本申请实施例通过利用键值数据库存储该被回滚的密钥数据,以及通过保存在键值数据库中的密钥数据判断其对应的数据是否成功写入链,若该被回滚的密钥数据对应的数据已经被成功写入链则将该被回滚的密钥数据存储到该预设的关系型数据库中,其中,该键值数据库与该关系型数据库不存在事务冲突,因而可以有效防止区块链上的数据对应的密钥丢失,避免因丢失密钥而导致的不良后果。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请第一实施例提供的一种面向区块链的密钥管理方法的流程示意图;
图2为本申请第二实施例提供的一种面向区块链的密钥管理方法的流程示意图;
图3为本申请第三实施例提供的一种面向区块链的密钥管理方法的流程示意图;
图4为本申请第一实施例提供的一种面向区块链的密钥管理装置的示意性框图;
图5为本申请第二实施例提供的一种面向区块链的密钥管理装置的示意性框图;
图6为本申请第三实施例提供的一种面向区块链的密钥管理装置的示意性框图;以及
图7为本申请实施例提供的一种计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部 的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
请参阅图1,其为本申请第一实施例提供的一种面向区块链的密钥管理方法的示意性流程图。该面向区块链的密钥管理方法可以运行在具备区块链系统的终端设备中,其中,该终端设备可以是智能手机、平板电脑或笔记本电脑等电子设备,也可以是独立的服务器或者多个服务器组成的服务器集群。具体地,该面向区块链的密钥管理方法应用于一区块链系统中,在一实施例中,用于防止区块链上数据的密钥丢失,该方法可包括步骤S101至S105。
S101、若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值。
其中,区块链系统所保存的数据都需要经过加密处理后再写入链上保存的,而对该数据进行加密时,会随机生成密钥,并将对应生成的密钥保存到一关系型数据库中。在一实施例中,例如本实施例中,区块链系统所保存的数据均是由业务系统生成的,业务系统的数据在写入链上保存之前将会调用预设的隐私中间件进行加密处理,具体地,将会调用预设的隐私中间件将所述业务系统的数据转成JSON格式的数据以进行加密处理。
在一实施例中,所述预设的隐私中间件可例如为Sparrow隐私中间件,该Sparrow隐私中间件是一种独立的系统软件或服务程序,介于操作系统和软件应用之间,其中,分布式应用软件通过借助该隐私中间件可以实现在不同的技术之间共享资源。该隐私中间件位于客户端/服务器的操作系统之上,用于管理计 算机资源和网络通讯。
其中,JSON的全称为JavaScript Object Notation,即JavaScript对象符号,它是一种轻量级的数据交换格式。JSON的数据格式既适合人来读/写,也适合计算机本身解析和生成。JSON主要是在类似于C的编程语言中广泛使用,所述类似于C的编程语言包括C、C++、C#、Java、JavaScript、Perl、Python等。JSON提供了在多种编程语言之间完成数据交换的能力,因此,JSON也是一种非常理想的数据交换格式。其中,JSON主要存在如下两种数据结构:第一种为由key-value对组成的数据结构,这种数据结构在不同的语言中存在不同的实现。例如,在JavaScript中为一个对象,在Java中为一种Map结构,在C语言中,则为一个Struct。在其他语言中,可能存在record、dictionary、hash table等实现。第二种为有序集合数据结构,这种数据结构可以在不同编程语言中实现,其中,包括list、vector、数组和序列等实现。
因此,在一实施例中,例如本实施例中,所述业务系统的数据调用Sparrow隐私中间件以进行加密,即将所述业务系统的数据转换成key-value对组成的数据结构以进行加密处理。具体地,将该业务数据格式转换成key-value对组成的数据结构的数据,进而对该数据的value进行加密处理,并将经加密处理后的加密value与该数据的键值key一同写入链上,同时将该数据的键值key以及因对value进行加密处理而随机生成对应的密钥保存到一预设的关系型数据库中,即将该数据对应的密钥数据保存到一预设的关系型数据库中,因此,所述预设的区块链上保存的数据内容包括一数据的键值key及其加密value,而在该关系型数据库对应保存的数据内容包括该数据的键值key及该加密value对应的用于解密的密钥。其中,在业务数据写入链的整个过程中,需要通过HTTP协议与几个系统进行交互,其不可控制的因素较多,当出现上链超时或者返回失败亦或者执行异常等情况时,将会自动回滚该预设的关系型数据库中已保存的密钥数据,然而,返回失败或者出现异常情况并不能判定该数据上链失败。若该数据上链成功,而该数据所对应的密钥被回滚,则会造成该链上数据丢失密钥。因此,在本步骤中,若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,所述密钥数据包括密钥及其所对应的键值key。即将一预设的关系型数据库中被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括一数据的key以及该加密value对应的密钥。
在一实施例中,所述预设的键值数据库为非关系型数据库,适用于频繁读写、拥有简单数据模型的应用。其中,该键值数据库中存储的值可以是简单的标量值,可例如为整数或者布尔值;也可以是结构化数据类型,可例如为列表和JSON结构的数据。另外,该键值数据库通常具有简单的查询功能,例如允许通过键值来查找一条数据。
其中,在一实施例中,例如本实施例中,所述键值数据库为Redis数据库,该Redis数据库是高性能的key-value数据库,用于保存被回滚的密钥数据。采用Redis数据库是由于该Redis数据库可以将保存的所有密钥数据都读到内存当中,且存取效率非常高,并且还支持将数据持久化到物理磁盘中,即使重启该Redis数据库,保存的所有密钥数据也不会丢失。Redis数据库作为暂存该被回滚的密钥数据的数据库,拥有非常高的性能以及可以支持丰富的数据类型,并且所有操作都是原子性的,且还具备很多重要的特性,可例如为发布订阅以及key失效等。当然,在其它实施例中,所述预设的键值数据库也可以选择为Memcached、Riak、BerkeleyDB、SimpleDB、DynamoDB以及甲骨文等数据库中的一种。
S102、根据预设时间获取所述键值数据库中的密钥数据。
具体地,在一实施例中,所述根据预设时间获取所述键值数据库中的密钥数据包括子步骤:通过调用JOD定时任务获取所述键值数据库中的密钥数据。
其中,该JOD定时任务为预先设置的用于定时自动处理一些事务的定时任务,具体地,在程序启动运行时自动启动一独立线程用于计时,当计时到了预设时间后自动执行一段代码以处理一些事情,例如在本实施例中,所述预设时间为5分钟,所述键值数据库为Redis键值数据库,则每计时5分钟后自动获取所述Redis键值数据库中的密钥数据,该密钥数据包括密钥及其对应的键值key。其中,每间隔五分钟自动获取所述Redis键值数据库中的密钥数据,再利用所获取密钥数据到该预设的区块链上查找该区块链上是否存在与所述密钥数据对应的数据,若存在,则表明与该密钥数据对应的数据上链成功,而其密钥数据却被回滚。因此,每间隔预设时间获取所述键值数据库中的密钥数据,进而再根据所获取的密钥数据来查找判断与该密钥数据对应的数据是否成功上链,可以保证较高的成功率,可以有效防止因当前网络问题或者系统压力过重情况下导致的误判,例如,当出现异常情况时,立即获取所述键值数据库中的密钥数据, 再根据所述密钥数据到该区块链上查找与该密钥数据对应的数据是否上链成功,此刻若是由于当前网络繁忙或者网络中断亦或者系统压力过重等原因而导致在该区块链上查找不到与该密钥数据对应的数据,进而系统会自动判定为该数据上链不成功,但实际上该数据却是上链成功,因此,每间隔预设时间获取密钥数据可以有效防止因当前网络问题或者系统压力过重情况下导致的误判。
S103、根据所获取的密钥数据的键值判断区块链上是否存在与该键值对应的数据。
具体地,在一实施例中,主要是将业务系统所产生的业务数据转成key-value对组成的数据结构以进行加密,即将该业务数据转成以key-value对组成的数据结构的数据。例如,存在数据A需进行上链事务,需要调用预设的隐私中间件对该数据A的value进行加密处理以得到key-value对组成的数据结构的数据A,具体地,通过对该数据A进行加密处理后得到该数据A的加密value,并随机生成该加密value的密钥,再将该数据A的加密value与键值key以key-value对组成的数据结构写入到一预设的区块链上保存,以及将该数据A的密钥数据保存到一预设的关系型数据库中,即该区块链上保存的数据A包括该数据A的键值key及其加密value,而该关系型数据库保存的该数据A的密钥数据包括该数据A的键值key及该加密value对应的密钥,其中,该区块链上保存的数据A的键值key与该关系型数据库保存的与该数据A对应的密钥数据的key相同,且在区块链上保存的所有数据均存在唯一对应的键值key,因此,可以利用该关系型数据库保存的数据A的密钥数据的键值key到该区块链上查找是否存在与该键值key相同的数据A。因此,在一实施例中,根据预设时间到键值数据库中获取一密钥数据,利用所获取的密钥数据的键值key到区块链上查找以判断确定该区块链上是否存在与该键值key对应的数据,若存在与该键值key对应的数据,则说明该数据实际上是成功写入链的,但该数据所对应的密钥数据由于某种异常被回滚了,因此,需要将该被回滚的密钥数据保存到关系型数据库中以防止该密钥数据因回滚后被丢失。若不存在与该键值key对应的数据,则说明该数据写入链失败,在一实施例中,可以将该数据所对应的密钥数据从该键值数据库中删除,进而该数据可以在下次数据上链时重新进行上链。
S104、若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密。
具体地,由步骤S103可知,通过该密钥数据的键值key到该区块链上查找是否存在与该密钥数据的键值key对应的数据,若查找到与该键值key对应的数据则可以利用该密钥数据的密钥解密所查找到的数据,并判断是否成功解密,进而可以确定该密钥数据所对应的数据是否成功写入链。
S105、若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
具体地,若该密钥数据的密钥成功解密所查找到的数据,则表明该密钥数据的密钥为该被查找到的数据的密钥,可以解密该被查找到的数据,即该被查找到的数据已经成功写入区块链中,因此,此时只需要将该查找到的数据对应的密钥数据保存到一预设的关系型数据库中,其中,写入区块链中的数据无法被删除、替换、修改,若丢失了密钥,则会变成垃圾数据无法使用,且永久保存在该区块链上。若该密钥数据的密钥无法解密所查找到的数据,则表明该密钥数据的密钥不是该被查找到的数据的密钥。
在上述实施例中,本方案通过将被回滚的密钥数据保存到一预设的键值数据库中,并根据预设时间获取该密钥数据,再利用所获取的密钥数据的键值到预设的区块链上查找,以确定该区块链上是否存在与所获取的密钥数据相对应的数据,若查找到与所获取的密钥数据相对应的数据,则可以利用所获取的密钥数据的密钥解密该被查找的数据以进一步确定该密钥数据的密钥为被查找的数据的密钥,若确定该密钥数据的密钥为被查找的数据的密钥,则可以将该被回滚的密钥数据保存到一预设的关系型数据库中,以有效防止丢失该密钥数据。本申请实施例能够克服现有防止区块链上的数据的密钥丢失方案中所存在的问题。本申请实施例可以有效防止数据的密钥数据丢失,避免因丢失数据的密钥而导致的不良后果。此外,本申请实施例还可以实现数据写入链的整个过程与异常事务处理分开处理,可以在出现异常情况时,直接将因异常情况而导致被回滚的密钥数据存储到一预设的键值数据库中,并根据预设时间自动获取该密钥数据,再根据所获取的密钥数据核对与该密钥数据对应的数据是否成功写入链,避免一出现异常情况直接到该区块链上核对数据是否成功写入链,避免因当前网络问题或者系统压力过重情况下导致的误判;且在数据上链的整个过程中,将上链事务与异常处理分开,可以保证数据上链的正常进行,不会因出现异常情况而中断该数据上链事务,若出现异常情况则只需要将该被回滚的密钥数据写入键值数据库即可,不需要对该异常情况做过多处理,可以增加代码的 可读性,减少冗余代码,方便维护,降低维护成本。
请参阅图2,其为本申请第二实施例提供的一种面向区块链的密钥管理方法的流程示意图。具体地,如图2所示,该方法可包括步骤S201-S206。其中步骤S201-S205与上述实施例中的步骤S101-S105类似,在此不再赘述。下面详细说明本实施例中所增加的步骤S206。
S206、若所述区块链上不存在与所述键值对应的数据,删除所述键值数据库中的所述密钥数据。
具体地,由步骤S203可知,根据预设时间到键值数据库中获取一密钥数据,利用所获取的密钥数据的键值key到区块链上查找以判断确定该区块链上是否存在与该键值key对应的数据,若在该区块链上无法查找到与该密钥数据的键值key对应的数据,则表明该密钥数据对应的数据写入区块链失败,因此,将该数据所对应的密钥数据从该键值数据库中删除,进而该数据可以在下次数据上链时重新进行上链。
此外,由步骤S203可知,根据预设时间到键值数据库中获取一密钥数据,利用所获取的密钥数据的键值key到区块链上查找以判断确定该区块链上是否存在与该键值key对应的数据,若存在与该键值key对应的数据,则说明该数据实际上是成功写入链的,但该数据所对应的密钥数据由于某种异常被回滚了,因此,需要将该被回滚的密钥数据保存到关系型数据库中以防止该密钥数据因回滚后被丢失,其中,当将该被回滚的密钥数据保存到一预设的关系型数据库时,将该密钥数据从键值数据库中删除。
在上述实施例中,本方案通过根据预设时间到键值数据库中获取一密钥数据,利用所获取的密钥数据的键值key到区块链上查找以判断确定该区块链上是否存在与该键值key对应的数据,若存在与该键值key对应的数据,则说明该数据实际上是成功写入链的,但该数据所对应的密钥数据由于某种异常被回滚了,因此,需要将该被回滚的密钥数据保存到一预设的关系型数据库中以防止该密钥数据因回滚后被丢失,其中,当该被回滚的密钥数据保存到该关系型数据库时,将该被回滚的密钥数据从该键值数据库中删除;若不存在与该键值key对应的数据,则说明该数据写入链失败,此刻只需要将该被回滚的密钥数据从该键值数据库中删除即可。本申请实施例能够克服现有防止区块链上的数据的密钥丢失方案中所存在的问题。本申请实施例可以有效防止数据的密钥数据丢 失,避免因丢失数据的密钥而导致的不良后果。此外,本申请实施例还可以实现数据写入链的整个过程与异常事务处理分开处理,可以在出现异常情况时,直接将因异常情况而导致被回滚的密钥数据存储到一预设的键值数据库中,并根据预设时间自动获取该密钥数据,再根据所获取的密钥数据核对与该密钥数据对应的数据是否成功写入链,避免一出现异常情况直接到该区块链上核对数据是否成功写入链,避免因当前网络问题或者系统压力过重情况下导致的误判;且在数据上链的整个过程中,将上链事务与异常处理分开,可以保证数据上链的正常进行,不会因出现异常情况而中断该数据上链事务,若出现异常情况则只需要将该被回滚的密钥数据写入键值数据库即可,不需要对该异常情况做过多处理,当对该异常情况处理过后,只需要将该被回滚的密钥数据从该键值数据库中删除即可,可以避免重复处理异常情况。
请参阅图3,其为本申请第三实施例提供的一种面向区块链的密钥管理方法的流程示意图。具体地,如图3所示,该方法可包括步骤S301-S310。其中步骤S301-S306与上述实施例中的步骤S201-S206类似,在此不再赘述。下面详细说明本实施例中所增加的步骤S307-步骤S310。
S307、获取HTTP返回码并根据所述HTTP返回码判断是否返回成功。
具体地,在业务数据写入链的整个过程中,需要通过HTTP协议与几个系统进行交互,可例如为所述预设的隐私中间件通过HTTP协议调用交易服务器的写入链接口,其中,该HTTP协议将有目的地返回HTTP返回码,并且该HTTP返回码可以根据用户实际应用场景的需求进行自定义设置,当该HTTP返回码表示失败时,保存在该关系型数据库中的密钥数据将会自动回滚,例如,若存在数据A写入链,当该数据A返回表示失败的HTTP返回码时,该数据A的密钥数据将会自动回滚。
其中,所述HTTP返回码包括多个状态码,该多个状态码用于表示服务器在处理请求时发生的错误。即该多个状态码用于表示用于数据上链过程的多个系统在处理请求时发生的错误。这些错误可能是服务器本身的错误,而不是请求出错。所述多个状态码可例如为500(服务器内部错误)、501(尚未实施)、502(错误网关)、503(服务不可用)、504(网关超时)以及505(HTTP版本不受支持)等。其中,在一实施例中,可以事先设置数据写入链的整个过程所需时间为15秒,若数据写入链的整个过程所花费时间超过15秒,则判定该数据入链超时,即该 数据入链失败,将会返回504(网关超时)这一HTTP返回码。
S308、若返回成功,判断是否存在调用异常。
具体地,在一实施例中,若在HTTP协议调用时抛出一异常,使得程序无法继续执行时也会自动回滚密钥数据。
S309、若返回异常或存在调用异常,回滚密钥数据并判定为检测到回滚密钥数据。步骤S309之后,紧接着执行步骤S301及后续步骤。
其中,所述步骤S301包括:将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值。
S310、若不存在调用异常,不回滚密钥数据并判定为检测不到回滚密钥数据。
请参阅图4,其为本申请第一实施例提供的一种面向区块链的密钥管理装置100的示意性框图。如图4所示,该面向区块链的密钥管理装置100对应于图1所示的面向区块链的密钥管理方法。该面向区块链的密钥管理装置100包括用于执行上述面向区块链的密钥管理方法的单元,该面向区块链的密钥管理装置100可以被配置于具备区块链系统的终端设备中。其中,该终端设备可以是智能手机、平板电脑或笔记本电脑等电子设备,也可以是独立的服务器或者多个服务器组成的服务器集群。具体地,该面向区块链的密钥管理方法应用于一区块链系统中。具体地,请参阅图4,该面向区块链的密钥管理装置100包括第一保存单元101、第一获取单元102、第一判断单元103、第一解密单元104以及第二保存单元105。
所述第一保存单元101用于若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值。
所述第一获取单元102用于根据预设时间获取所述键值数据库中的密钥数据。
在一实施例中,第一获取单元102包括:第一获取子单元102a。其中第一获取子单元102a,用于通过调用JOD定时任务获取所述键值数据库中的密钥数据。
所述第一判断单元103用于根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据。
所述第一解密单元104用于若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密。
所述第二保存单元105用于若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述面向区块链的密钥管理装置100和各单元的具体实现过程以及效果,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
请参阅图5,其为本申请第二实施例提供的一种面向区块链的密钥管理装置200的示意性框图。如图5所示,本申请第二实施例提供的一种面向区块链的密钥管理装置200是在上述实施例的基础上增加了第一删除单元206,即所述装置200包括第三保存单元201、第二获取单元202、第二判断单元203、第二解密单元204、第四保存单元205以及第一删除单元206。其中,该第三保存单元201、第二获取单元202、第二判断单元203、第二解密单元204以及第四保存单元205与上述实施例中的第一保存单元101、第一获取单元102、第一判断单元103、第一解密单元104以及第二保存单元105类似,由于其应用过程以及相应功能与上述实施例中所对应的单元类似,在此不再赘述。
所述第一删除单元206用于若所述区块链上不存在与所述键值对应的数据,删除所述键值数据库中的所述密钥数据。此外,所述第一删除单元206还用于当将该被回滚的密钥数据保存到一预设的关系型数据库时,将该密钥数据从键值数据库中删除。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述装置200和各单元的具体实现过程以及效果,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
请参阅图6,其为本申请第三实施例提供的一种面向区块链的密钥管理装置300的示意性框图。如图6所示,本申请第三实施例提供的一种面向区块链的密钥管理装置300是在上述实施例的基础上增加了第四判断单元307、第五判断单元308、第一判定单元309以及第二判定单元310,即所述装置300包括第五保存单元301、第三获取单元302、第三判断单元303、第三解密单元304、第六保存单元305、第二删除单元306、第四判断单元307、第五判断单元308、第 一判定单元309以及第二判定单元310。其中,该第五保存单元301、第三获取单元302、第三判断单元303、第三解密单元304、第六保存单元305以及第二删除单元306与上述实施例中的第三保存单元201、第二获取单元202、第二判断单元203、第二解密单元204、第四保存单元205以及第一删除单元206类似,由于其应用过程以及相应功能与上述实施例中所对应的单元类似,在此不再赘述。
所述第四判断单元307用于获取HTTP返回码并根据所述HTTP返回码判断是否返回成功。
所述第五判断单元308用于若返回成功,判断是否存在调用异常。
所述第一判定单元309用于若返回异常或存在调用异常,回滚密钥数据并判定为检测到回滚密钥数据。
所述第二判定单元310用于若不存在调用异常,不回滚密钥数据并判定为检测不到回滚密钥数据。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述装置300和各单元的具体实现过程以及效果,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
上述装置可以实现为一种计算机程序的形式,该计算机程序可以在如图7所示的计算机设备上运行。
请参阅图7,其为本申请实施例提供的一种计算机设备的示意性框图。该计算机设备600可以是终端,也可以是服务器,其中,终端可以是智能手机、平板电脑、笔记本电脑、台式电脑和个人数字助理等支持区块链系统运行的电子设备。服务器为支持区块链系统运行的服务器,该服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。
参阅图7,该计算机设备600包括通过系统总线601连接的处理器602、存储器以及网络接口605,其中,存储器可以包括非易失性存储介质603和内存储器604。
该非易失性存储介质603可存储操作系统6031和计算机程序6032。该计算机程序6032包括程序指令,该程序指令被执行时,可使得处理器602执行一种面向区块链的密钥管理方法。
该处理器602用于提供计算和控制能力,以支撑整个计算机设备600的运 行。
该内存储器604为非易失性存储介质603中的计算机程序6032的运行提供环境,该计算机程序6032被处理器602执行时,可使得处理器602执行一种面向区块链的密钥管理方法。
该网络接口605用于与其它设备进行网络通信。本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备600的限定,具体的计算机设备600可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器602用于运行存储在存储器中的计算机程序6032,以实现如下步骤:若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;根据预设时间获取所述键值数据库中的密钥数据;根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据;若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;以及若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
在一实施例中,处理器602在实现所述根据所获取的密钥数据的键值判断区块链上是否存在与该键值对应的数据的步骤之后,具体还实现如下步骤:若所述区块链上不存在与所述键值对应的数据,删除所述键值数据库中的所述密钥数据。
在一实施例中,处理器602在实现所述根据预设时间获取所述键值数据库中的密钥数据的步骤时,具体实现如下步骤:通过调用JOD定时任务获取所述键值数据库中的密钥数据。
在一实施例中,处理器602在实现所述若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中的步骤之前,具体还实现如下步骤:获取HTTP返回码并根据所述HTTP返回码判断是否返回成功;若返回成功,判断是否存在调用异常;若返回异常或存在调用异常,回滚密钥数据并判定为检测到回滚密钥数据;以及若不存在调用异常,不回滚密钥数据并判定为检测不到回滚密钥数据。
在一实施例中,处理器602在实现所述若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中的步骤之后,具体还实现如下步骤:删除所述键值数据库中的所述密钥数据。
在一实施例中,处理器602在实现所述面向区块链的密钥管理方法时,所述键值数据库为Redis数据库。
应当理解,在本申请实施例中,处理器602可以是中央处理单元(Central Processing Unit,CPU),该处理器602还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成。该计算机程序包括程序指令,计算机程序可存储于一存储介质中,该存储介质为存储介质。该程序指令被该计算机系统中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。
因此,本申请还提供一种计算机可读存储介质。该计算机可读存储介质存储有计算机程序,其中计算机程序包括程序指令。该程序指令被处理器执行时使处理器执行如上所述的面向区块链的密钥管理方法。
所述存储介质为实体的、非瞬时性的存储介质,例如可以是U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的实体存储介质。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统和方法,可 以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的。例如,各个单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本申请实施例系统中的单元可以根据实际需要进行合并、划分和删减。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种面向区块链的密钥管理方法,包括:
    若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;
    根据预设时间获取所述键值数据库中的密钥数据;
    根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据;
    若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;以及
    若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
  2. 根据权利要求1所述的面向区块链的密钥管理方法,其中,所述根据所获取的密钥数据的键值判断区块链上是否存在与该键值对应的数据的步骤之后,还包括:
    若所述区块链上不存在与所述键值对应的数据,删除所述键值数据库中的所述密钥数据。
  3. 根据权利要求1所述的面向区块链的密钥管理方法,其中,所述根据预设时间获取所述键值数据库中的密钥数据,包括:
    通过调用JOD定时任务获取所述键值数据库中的密钥数据。
  4. 根据权利要求1所述的面向区块链的密钥管理方法,其中,所述若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中的步骤之前,还包括:
    获取HTTP返回码并根据所述HTTP返回码判断是否返回成功;
    若返回成功,判断是否存在调用异常;
    若返回异常或存在调用异常,回滚密钥数据并判定为检测到回滚密钥数据;以及
    若不存在调用异常,不回滚密钥数据并判定为检测不到回滚密钥数据。
  5. 根据权利要求4所述的面向区块链的密钥管理方法,其中,所述HTTP返回码包括多个状态码,所述多个状态码用于表示服务器在处理请求时发生的错误。
  6. 根据权利要求1所述的面向区块链的密钥管理方法,其中,所述若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中的步骤之后,还包括:
    删除所述键值数据库中的所述密钥数据。
  7. 根据权利要求1所述的面向区块链的密钥管理方法,其中,所述键值数据库为Redis数据库。
  8. 根据权利要求1所述的面向区块链的密钥管理方法,其中,所述若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中的步骤之前,还包括:调用预设的隐私中间件将业务系统的数据转成JSON格式的数据以进行加密处理,从而得到相应的密钥数据,并将所述密钥数据保存到一预设的关系型数据库中。
  9. 一种面向区块链的密钥管理装置,包括:
    第一保存单元,用于若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;
    第一获取单元,用于根据预设时间获取所述键值数据库中的密钥数据;
    第一判断单元,用于根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据;
    第一解密单元,用于若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;以及
    第二保存单元,用于若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
  10. 根据权利要求9所述的面向区块链的密钥管理装置,其中,还包括:
    第一删除单元,用于若所述区块链上不存在与所述键值对应的数据,删除所述键值数据库中的所述密钥数据。
  11. 一种计算机设备,其中,所述计算机设备包括存储器及处理器,所述存储器上存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
    若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;
    根据预设时间获取所述键值数据库中的密钥数据;
    根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数 据;
    若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;以及
    若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
  12. 根据权利要求11所述的计算机设备,其中,所述根据所获取的密钥数据的键值判断区块链上是否存在与该键值对应的数据的步骤之后,还包括:
    若所述区块链上不存在与所述键值对应的数据,删除所述键值数据库中的所述密钥数据。
  13. 根据权利要求11所述的计算机设备,其中,所述根据预设时间获取所述键值数据库中的密钥数据,包括:
    通过调用JOD定时任务获取所述键值数据库中的密钥数据。
  14. 根据权利要求11所述的计算机设备,其中,所述若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中的步骤之前,还包括:
    获取HTTP返回码并根据所述HTTP返回码判断是否返回成功;
    若返回成功,判断是否存在调用异常;
    若返回异常或存在调用异常,回滚密钥数据并判定为检测到回滚密钥数据;以及
    若不存在调用异常,不回滚密钥数据并判定为检测不到回滚密钥数据。
  15. 根据权利要求14所述的计算机设备,其中,所述HTTP返回码包括多个状态码,所述多个状态码用于表示服务器在处理请求时发生的错误。
  16. 根据权利要求11所述的计算机设备,其中,所述若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中的步骤之后,还包括:
    删除所述键值数据库中的所述密钥数据。
  17. 根据权利要求11所述的计算机设备,其中,所述键值数据库为Redis数据库。
  18. 根据权利要求11所述的计算机设备,其中,所述若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中的步骤之前,还包括:调用预设的隐私中间件将业务系统的数据转成JSON格式的数据以进行加密处理,从而得到相应的密钥数据,并将所述密钥数据保存到一预设的关系型数据库中。
  19. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算 机程序,所述计算机程序当被处理器执行时可实现以下步骤:
    若检测到回滚密钥数据,将该被回滚的密钥数据保存到一预设的键值数据库中,其中,该被回滚的密钥数据包括密钥及其所对应的键值;
    根据预设时间获取所述键值数据库中的密钥数据;
    根据所获取的密钥数据的键值判断区块链上是否存在与所述键值对应的数据;
    若所述区块链上存在与所述键值对应的数据,利用所获取的密钥数据的密钥解密与所述键值对应的数据并判断是否成功解密;以及
    若成功解密,将所获取的密钥数据保存到一预设的关系型数据库中。
  20. 根据权利要求19所述的存储介质,其中,所述根据所获取的密钥数据的键值判断区块链上是否存在与该键值对应的数据的步骤之后,还包括:
    若所述区块链上不存在与所述键值对应的数据,删除所述键值数据库中的所述密钥数据。
PCT/CN2019/103264 2019-05-22 2019-08-29 面向区块链的密钥管理方法、装置、设备及存储介质 WO2020232892A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910429421.9 2019-05-22
CN201910429421.9A CN110297822B (zh) 2019-05-22 2019-05-22 面向区块链的密钥管理方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020232892A1 true WO2020232892A1 (zh) 2020-11-26

Family

ID=68027065

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103264 WO2020232892A1 (zh) 2019-05-22 2019-08-29 面向区块链的密钥管理方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN110297822B (zh)
WO (1) WO2020232892A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016113B (zh) * 2020-09-28 2024-04-16 同盾控股有限公司 数据加解密方法、装置及系统
CN114615025B (zh) * 2022-02-22 2024-05-03 中国建设银行股份有限公司 一种密钥同步处理方法和装置
CN115334117B (zh) * 2022-08-12 2024-05-03 南方电网科学研究院有限责任公司 一种适用于电力需求响应的数据旁路上链系统及方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180268930A1 (en) * 2015-10-26 2018-09-20 Irm Inc. Method for Building Cloud-Based Medical Image Database for Protection of Patient Information and Reading Medical Image Therefrom
CN108629027A (zh) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 区块链上用户数据库重建方法、装置、设备及介质
CN109101528A (zh) * 2018-06-21 2018-12-28 深圳市买买提信息科技有限公司 数据处理方法、数据处理装置及电子设备
CN109697371A (zh) * 2018-12-12 2019-04-30 泰康保险集团股份有限公司 数据库管理方法、装置、介质及电子设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180173745A1 (en) * 2016-12-21 2018-06-21 At&T Intellectual Property I, L.P. Systems and methods to achieve sequential consistency in replicated states without compromising performance in geo-distributed, replicated services
CN108959523B (zh) * 2018-06-28 2020-07-31 北京首汽智行科技有限公司 一种基于区块链技术的音乐播放方法和播放器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180268930A1 (en) * 2015-10-26 2018-09-20 Irm Inc. Method for Building Cloud-Based Medical Image Database for Protection of Patient Information and Reading Medical Image Therefrom
CN108629027A (zh) * 2018-05-09 2018-10-09 深圳壹账通智能科技有限公司 区块链上用户数据库重建方法、装置、设备及介质
CN109101528A (zh) * 2018-06-21 2018-12-28 深圳市买买提信息科技有限公司 数据处理方法、数据处理装置及电子设备
CN109697371A (zh) * 2018-12-12 2019-04-30 泰康保险集团股份有限公司 数据库管理方法、装置、介质及电子设备

Also Published As

Publication number Publication date
CN110297822A (zh) 2019-10-01
CN110297822B (zh) 2023-06-02

Similar Documents

Publication Publication Date Title
CN109344172B (zh) 一种高并发数据处理方法、装置及客户端服务器
US8954391B2 (en) System and method for supporting transient partition consistency in a distributed data grid
US10382380B1 (en) Workload management service for first-in first-out queues for network-accessible queuing and messaging services
WO2020232892A1 (zh) 面向区块链的密钥管理方法、装置、设备及存储介质
WO2019227689A1 (zh) 数据监控方法、装置、计算机设备及存储介质
US8843580B2 (en) Criteria-based message publication control and feedback in a publish/subscribe messaging environment
US10671589B2 (en) Synergizing real-time and polling connectors for data ingestion
WO2017181872A1 (zh) 数据处理系统以及方法
US9367261B2 (en) Computer system, data management method and data management program
EP2880848B1 (en) Aggregating data in a mediation system
WO2022063284A1 (zh) 数据同步方法、装置、设备及计算机可读介质
US7962782B2 (en) Modifying connection records
US20120215873A1 (en) Failure-controlled message publication and feedback in a publish/subscribe messaging environment
WO2020019724A1 (zh) 服务器中传感器数据的获取方法、获取系统和相关装置
US9514176B2 (en) Database update notification method
US20230030856A1 (en) Distributed table storage processing method, device and system
WO2020233351A1 (zh) 面向区块链的数据管理方法、装置、设备及存储介质
US9069632B2 (en) Message processing
US20140337379A1 (en) Distributed multi-system management
CN112422368A (zh) 基于clickhouse的数据库集群监控方法及系统
JP6583975B1 (ja) データ処理装置、データ処理方法及びプログラム
US11243979B1 (en) Asynchronous propagation of database events
US11138268B2 (en) Systems and methods for improved transactional mainframes
US10185735B2 (en) Distributed database system and a non-transitory computer readable medium
CN108475211B (zh) 无状态系统和用于获得资源的系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19929410

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19929410

Country of ref document: EP

Kind code of ref document: A1