CN110716982B - Block chain real-time storage method, device, computer equipment and storage medium - Google Patents

Block chain real-time storage method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110716982B
CN110716982B CN201910849650.6A CN201910849650A CN110716982B CN 110716982 B CN110716982 B CN 110716982B CN 201910849650 A CN201910849650 A CN 201910849650A CN 110716982 B CN110716982 B CN 110716982B
Authority
CN
China
Prior art keywords
data
node
blockchain
module
cache
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910849650.6A
Other languages
Chinese (zh)
Other versions
CN110716982A (en
Inventor
林泽全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dianlian Technology Co ltd
Shenzhen Lian Intellectual Property Service Center
Original Assignee
Shenzhen Dianlian Technology Co ltd
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 Shenzhen Dianlian Technology Co ltd filed Critical Shenzhen Dianlian Technology Co ltd
Priority to CN201910849650.6A priority Critical patent/CN110716982B/en
Publication of CN110716982A publication Critical patent/CN110716982A/en
Application granted granted Critical
Publication of CN110716982B publication Critical patent/CN110716982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention discloses a block chain real-time storage method, a device, computer equipment and a storage medium, which belong to the technical field of block chains, and the block chain real-time storage method comprises the following steps: responding to the data change of a first node in a blockchain network, and caching the changed data so that the data is used by the first node before the completion of blockchain synchronization; generating a block from the data buffered by the first node; the block is synchronized to other blockchain nodes in the blockchain network than the first node. Therefore, the delay problem in the use process of the blockchain network is reduced, the risk of data tampering is avoided, the safety of the data is ensured, and the use experience of a user is improved.

Description

Block chain real-time storage method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain real-time storage method, apparatus, computer device, and storage medium.
Background
Because the blockchain in the prior art has the characteristics of disclosure, transparency, non-falsification and the like, the blockchain has a plurality of applications in various industries. However, when the block chain network is used in an actual application system, since the block chain network needs to generate a block from the newly generated data every other preset time, and then synchronize the block into the block chain network, before the block generation is synchronized into the block chain network, the newly generated data of each node in the block chain cannot be used, which causes the problem of high latency, and the user experience of high latency is very poor, so that the user cannot normally use the application system based on the block chain platform.
Disclosure of Invention
Based on the above, in order to solve the technical problem of high delay of the real-time transaction of the blockchain in the related art, the invention provides a real-time storage method, a device, computer equipment and a storage medium of the blockchain.
In a first aspect, a method for storing a blockchain in real time is provided, which is applied to a blockchain network, where each node in the blockchain network includes a cache module, and includes:
responding to the data change of a first node in a blockchain network, and caching the changed data so that the data is used by the first node before the completion of blockchain synchronization;
generating a block from the data buffered by the first node;
the block is synchronized to other blockchain nodes in the blockchain network than the first node.
In one embodiment, after the synchronizing the block to other blockchain nodes in the blockchain network than the first node, the method further includes:
and clearing all the data which are synchronously finished in the data cached by the first node.
In one embodiment, after buffering the changed data in response to a change in the data of a first node in a blockchain network for use by the first node before blockchain synchronization is completed, the method further comprises:
and responding to a data calling request of the first node, and calling the changed data cached by the first node.
In one embodiment, the plurality of buffer modules of the first node, and the step of buffering the changed data in response to the change of the data of the first node in the blockchain network specifically includes:
responding to the data change of a first node in a blockchain network, and inquiring the cache load of each cache module of the blockchain first node;
and selecting a cache module for caching data according to the cache load of each cache module of the first node of the blockchain.
In one embodiment, the step of generating a block of data to be buffered by the first node includes:
encrypting the data cached by the first node;
and packaging the encrypted data to generate a block.
In one embodiment, encrypting the data buffered by the first node specifically includes:
creating a cryptographic module in the first node;
and the data cached by the first node is stored in the cryptographic module in a sealing way, so that the data cached by the first node is synchronized to other nodes in the blockchain network except the first node after being packaged along with the cryptographic module.
In one embodiment, the storing the data cached by the first node in the cryptographic module specifically includes:
splitting the data cached by the first node into cache sub-data the same as the number of the password modules;
storing the cache sub-data in different cipher modules in a one-to-one correspondence manner, wherein each cipher module only stores one cache sub-data;
and generating a storage sequence of the cache sub-data, dynamically encrypting the storage sequence and storing the storage sequence in the first node.
In a second aspect, there is provided a blockchain real-time storage device, comprising:
and a data caching module. The method comprises the steps of responding to data change of a first node in a blockchain network, and caching the changed data so that the data is used by the first node before the completion of blockchain synchronization;
the block generation module is used for generating a block from the data cached by the first node;
and the block synchronization module is used for synchronizing the block to other block chain nodes except the first node in the block chain network.
In a third aspect, a computer device is provided, comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the blockchain real-time storage method described above.
In a fourth aspect, a storage medium storing computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the blockchain real-time storage method described above is provided.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the method, the device, the computer equipment and the storage medium for storing the blockchain in real time, when data are generated by any node in the blockchain network, the cache module of the node is firstly used for caching the data generated by the node so that the node can use the data before the blockchain data are synchronously finished, and therefore, each node can also use the data which are not synchronously finished and are generated by the node before the blockchain data are synchronously finished to process the data, and the situation that the blockchain data are synchronously finished is not needed to wait any more, so that the delay problem in the using process of the blockchain network is reduced, and the using experience of a user is improved. The data are buffered and packaged into blocks at the same time, a program for synchronizing the block chain data is carried out, and after the data synchronization is completed, the data after the synchronization is completed can replace the buffered data, so that the risk of the data being tampered is avoided, and the safety of the data is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
FIG. 1 is a diagram of an implementation environment for a blockchain real-time storage method provided in one embodiment.
Fig. 2 is a flow chart illustrating a blockchain real-time storage method in accordance with an exemplary embodiment.
FIG. 3 is a flow chart of another blockchain real-time storage method according to the corresponding embodiment of FIG. 2.
FIG. 4 is a flow chart of another blockchain real-time storage method according to the corresponding embodiment of FIG. 2.
FIG. 5 is a flowchart showing a specific implementation of step S100 in the blockchain real-time storage method according to the corresponding embodiment of FIG. 2.
FIG. 6 is a flowchart illustrating another implementation of step S200 in the blockchain real-time storage method according to the corresponding embodiment of FIG. 2.
FIG. 7 is a flowchart of another implementation of step S210 in the blockchain real-time storage method according to the corresponding embodiment of FIG. 6.
FIG. 8 is a flowchart illustrating another implementation of step S212 in the blockchain real-time storage method according to the corresponding embodiment of FIG. 6.
FIG. 9 is a block diagram illustrating a blockchain real-time storage device in accordance with an exemplary embodiment.
Fig. 10 schematically illustrates an example block diagram of an electronic device for implementing the blockchain real-time storage method described above.
Fig. 11 schematically illustrates a computer readable storage medium for implementing the blockchain real-time storage method described above.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
FIG. 1 is a diagram of an implementation environment of a blockchain real-time storage method provided in one embodiment, as shown in FIG. 1, in which a plurality of blockchain nodes 100 included in a blockchain network are included
The blockchain nodes 100 constitute a blockchain network for server nodes using the various unit departments of the blockchain system. When the blockchain node 100 generates data change, the changed data is cached, then the cached data is packaged to generate a new block, and after the cached data is generated into the block, the block is synchronized to all nodes in the blockchain network. Because the blockchain node 100 has cached the data prior to the process of generating and synchronizing the data to the blockchain network, the blockchain node 100 may use the data prior to synchronizing the data to the blockchain network when conducting data transactions with other nodes in the blockchain network.
It should be noted that the blockchain node 100 may be, but is not limited to, a desktop server, a mainframe server, a cloud server, a server cluster, and various terminal servers. The blockchain nodes 100 may be connected by a wired, wireless or other communication connection, which is not limited in this disclosure.
As shown in fig. 2, in one embodiment, a blockchain real-time storage method is provided, and the blockchain real-time storage method may be applied to the blockchain node 100, and specifically may include the following steps:
step S100, responding to the data change of a first node in a blockchain network, and caching the changed data so that the data is used by the first node before the blockchain synchronization is completed;
it should be appreciated that the first node or other blockchain node in the method may be any blockchain node 100 in fig. 1.
The scheme mainly aims at solving the problem of high delay in the blockchain network by adding a buffer module in the nodes of the blockchain for buffering data. When the data of the block chain node changes, the changed data is cached through the cache module of the node so as to be used before the data synchronization is completed in the block chain, so that even if the newly changed data in the block chain link point is not synchronized to the block chain network, the cached data can be used for data processing to interact with other nodes, the waiting time for the changed data to be synchronized to the block chain network is not needed, the waiting time is shortened, the problem of high delay of the block chain is solved, the time of a user is saved, and the user experience is improved.
Step S200, generating a block from the data buffered by the first node;
after the data is cached in the corresponding caching module, the cached data can be uplink and synchronized to the blockchain network, and the data to be synchronized is required to be processed in the synchronization process to generate the block. After the data is cached, the changed data is conveniently used before the data is synchronized in the blockchain, and the data is generated into blocks in real time so as to be synchronized into the blockchain network, so that the risk of tampering caused by untimely synchronization of the data after the data is cached can be avoided, and the safety of the data is improved.
Step S300, synchronizing the block to other blockchain nodes in the blockchain network, except the first node.
After the block is generated, the data may be synchronized to other nodes in the blockchain network. At this time, the corresponding data is still cached in the cache node, so that the first node can still be used for the first node, and the first node does not need to wait for the synchronous completion of the blockchain when processing the locally generated data, thereby greatly improving the user experience.
In one embodiment, the first node is a server node in a unit, and when the server node in the unit performs data interaction with another department server node in a same blockchain network, a large amount of data is generated, and at this time, the server node in the unit and the other department server node each buffer data generated by the respective node in a buffer module of the respective node, and when performing data processing, the data in the buffer module of the respective node is directly used for performing data processing. And meanwhile, after the data is cached to the node module, the cached data is synchronized to the blockchain network in real time, so that the risk that the cached data is tampered is avoided, and the safety of the data in the use process of the system is improved.
FIG. 3 illustrates that in one embodiment, following step S300 in the corresponding embodiment of FIG. 2, the blockchain real-time storage method may further include the steps of:
step S400, clearing all the data that have been synchronously completed in the data cached by the first node.
After the data synchronization is completed, the data can be used by the first node even if the data is not cached, and the cached data can be cleared at this time to maximally utilize the cached space, otherwise, after the data caching space is used, other newly generated data cannot be cached continuously.
FIG. 4 illustrates that in one embodiment, following step S100 in the corresponding embodiment of FIG. 2, the blockchain real-time storage method may further include the steps of:
step S101, responding to a data calling request of a first node, and calling changed data cached by the first node.
For example, in one embodiment, a customer conducts a transaction with his own terminal and a banking server, both of which are nodes in a blockchain network. In the transaction process, the client terminal and the bank server can generate a large amount of data, at the moment, the client terminal and the bank server respectively cache the received and generated data to respective cache nodes for caching, and in the transaction process, the data in the cache nodes can be directly called for use if the newly generated data are needed, and the data can be used after the block link points are used after the synchronization of the data is completed.
Optionally, fig. 5 is a detailed description of step S100 in the blockchain real-time storage method according to the corresponding embodiment of fig. 2, where there are a plurality of cache modules of the first node, step S100 may include the following steps:
step S110, responding to the data change of a first node in a blockchain network, and inquiring the cache load of each cache module of the blockchain first node;
step S120, selecting a cache module for data caching according to the cache load of each cache module of the first node of the blockchain.
The buffer load may be the remaining buffer capacity and the buffered capacity of each buffer module, and the selecting method may be to select a buffer module with the smallest buffer load as a buffer module for data, or select one of nodes meeting a predetermined threshold as a module for data buffer. The predetermined storage threshold is, for example, 215KB, 345MB, 46GB, etc., which is not limited herein.
In one embodiment, the buffer load is the buffered capacity of the buffer module, after the first node of the blockchain changes, the buffered capacity of each buffer module of the first node of the blockchain is queried first, and then the buffer module with the minimum buffered capacity is selected as the module for data buffering.
In another embodiment, the buffer load is a remaining buffer capacity of the buffer module, after the first node of the blockchain changes, the remaining buffer capacity of each buffer module of the first node of the blockchain is queried first, then whether the remaining buffer capacity of each buffer module exceeds a predetermined remaining storage threshold value is judged, if the remaining buffer capacity exceeds the predetermined remaining storage threshold value, then a buffer module with the largest stored capacity among the buffer modules with the remaining buffer capacity exceeding the predetermined remaining storage threshold value is selected.
In this embodiment, the predetermined remaining storage threshold is the size of the data to be cached, so that in the use process, the storage space of each cache module can be utilized to the maximum extent, when the storage space of a certain cache module is used, the cached data is directly and synchronously completed, and after all the cached data are synchronously completed, the cached data are timely emptied. Therefore, the situation that the data cannot be emptied in time due to the fact that a large amount of data are generated in the transaction process, but the data cached by each cache module in the blockchain node are not synchronously completed, and therefore the situation of data congestion occurs can be avoided.
Optionally, fig. 6 is a detailed description of step S200 in the blockchain real-time storage method according to the corresponding embodiment of fig. 2, where step S200 may include the following steps:
step S210, encrypting the data cached by the first node;
step S220, packaging the encrypted data to generate a block.
In the scheme, when generating the block, the data to be synchronized needs to be encrypted first, and then the encryption processing is completed and then the packaging processing is carried out, then a block is generated, and then the block can be synchronized. The encryption method is that, for example, the data cached by the first node is randomly divided into a plurality of parts, a character string of the splicing sequence of the data fragments is generated, and then the character string is encrypted through a hash algorithm. The encryption method may also be to directly perform asymmetric encryption on the data. The encryption method can also be to directly encrypt the data randomly and dynamically.
Optionally, fig. 7 is a detailed description of step S210 in the blockchain real-time storage method according to the corresponding embodiment of fig. 6, where step S210 may include the following steps:
step S211, creating a cryptographic module in the first node;
and step S212, the data cached by the first node are stored in the cryptographic module in a sealing mode, so that the data cached by the first node are synchronized to other nodes in the blockchain network except the first node after being packaged along with the cryptographic module.
In the scheme, the encryption mode is to newly establish a cryptographic module in the storage area, and seal the data cached by the first node in the cryptographic module so as to isolate the connection between the data cached by the first node and the outside. The password module has a strict boundary to block the connection between the outside and the inside, if the data cached by the first node in the password module is required to be read, the data cached by the first node can only be read through a specific interface, and the safety of the data cached by the first node is ensured. When the data stored in the first node is stored in the cryptographic module, the data is synchronized with the cryptographic module to all nodes of the blockchain, all the nodes of the blockchain acquire the cryptographic module with a strict boundary, and the data stored in the cryptographic module is verified through a specific interface in the cryptographic module when the data is required to be acquired.
Optionally, fig. 8 is a detailed description of step S212 in the blockchain real-time storage method according to the corresponding embodiment of fig. 7, where step S212 may further include the following steps:
step S2121, splitting the data cached by the first node into cache sub-data with the same number as the number of the password modules;
step S2122, storing the cache sub-data in different cipher modules in a one-to-one correspondence manner, wherein each cipher module stores only one cache sub-data;
step S2123, generating a storage sequence of the cached sub-data, dynamically encrypting the storage sequence, and storing the first node.
In the scheme, when the password modules are created in the first node, a plurality of password modules are created, then the data cached in the first node are split into cache sub-data with the same number as the password modules according to the number of the password modules, then each password module stores one cache sub-data, if the complete data cached in the first node are required to be obtained, the data are required to be read from all the password modules, all the cache sub-data are obtained, and the cache sub-data are spliced in sequence, so that the complete data cached in the first node can be obtained, and the safety of the data storage of the first node is improved.
In one embodiment of the present invention, the dynamic encryption method first needs to acquire the storage sequence and store the storage sequence data so as to process the storage sequence data conveniently, where the storage sequence data may be regarded as a string of character strings stored in a local device. After the storage sequence character strings needing to be encrypted are acquired and stored, carrying out specified abstract operation on the specified characteristic information of the storage sequence, and determining the initial character for encrypting the storage sequence according to the result of the specified abstract operation. And then starting from the initial character, acquiring an encryption key from the storage sequence character string. And then encrypting the storage sequence character string by using the encryption key according to a preset encryption algorithm, wherein the preset algorithm is an algorithm for generating the encryption key. And finally, after encryption is finished, the encrypted storage data character string can be sent to other nodes of the blockchain network.
In this embodiment, the specified feature information may be a string length of the storage sequence, or may be a size of the storage sequence in other embodiments.
The method of the digest operation is, for example, hash operation, random operation, etc., and in this embodiment, the method of the digest operation is calculation by the following formula
B=L mod rand(0,[lnL])
Wherein B is the result of the digest operation, L is the string length of the storage sequence, mod is the remainder function, rand (x, y) is the random function with the definition domain from x to y, x is the rounding function, and ln is the natural logarithm function. The formula can ensure the randomness of the abstract operation result through a random function so as to ensure that the encrypted abstract operation result is not easy to crack, improve the encryption safety, and ensure that the obtained result is not too large through the cooperation of a natural logarithmic function and a rounding function so as to ensure the safety of the subsequent encryption process.
In this embodiment, the method for encrypting the storage sequence string is to extract the storage sequence string from the initial character every predetermined number of bits to a predetermined length, where the predetermined number of bits may be 1 bit, 2 bits, a prime number, etc., and the predetermined length may be the length of the storage sequence string, or may be 20 bits or 304 bits, and the predetermined number of bits and the predetermined length may be set according to specific situations, and the scheme is not limited.
As shown in fig. 9, in one embodiment, a blockchain real-time storage device is provided, and the blockchain real-time storage device may be integrated into the computer device 100, and may specifically include: a data buffer module 110, a block generation module 120, and a block synchronization module 130.
A data caching module 110, configured to respond to a change of data of a first node in a blockchain network, and cache the changed data so that the data is used by the first node before the blockchain synchronization is completed;
a block generating module 120, configured to generate a block from the data buffered by the first node;
a block synchronization module 130 is configured to synchronize the block to other blockchain nodes in the blockchain network than the first node.
The implementation process of the functions and roles of each module in the device is specifically detailed in the implementation process of the corresponding steps in the blockchain real-time storage method, and is not repeated here.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to this embodiment of the present invention is described below with reference to fig. 10. The electronic device 500 shown in fig. 10 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 10, the electronic device 500 is embodied in the form of a general purpose computing device. The components of electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, and a bus 530 connecting the various system components, including the memory unit 520 and the processing unit 510.
Wherein the storage unit stores program code that is executable by the processing unit 510 such that the processing unit 510 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 510 may perform step S110 shown in fig. 2, in response to a change in data of a first node in a blockchain network, cache the changed data so that the data is used by the first node before the blockchain synchronization is completed; step S120, generating a block from the data buffered by the first node; step S130, synchronizing the block to other blockchain nodes in the blockchain network, except the first node.
The storage unit 520 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 5201 and/or cache memory unit 5202, and may further include Read Only Memory (ROM) 5203.
The storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 530 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 500, and/or any device (e.g., router, modem, etc.) that enables the electronic device 500 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 550. Also, electronic device 500 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 560. As shown, network adapter 560 communicates with other modules of electronic device 500 over bus 530. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 11, a program product 600 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (7)

1. A blockchain real-time storage method, which is applied to a blockchain network, wherein each node in the blockchain network comprises a cache module, and the method comprises the following steps:
responding to the data change of a first node in a blockchain network, and caching the changed data so that the data is used by the first node before the blockchain synchronization is completed;
creating a cryptographic module in the first node;
splitting the data cached by the first node into cache sub-data the same as the number of the password modules;
storing the cache sub-data in different cipher modules in a one-to-one correspondence manner, wherein each cipher module only stores one cache sub-data;
generating a storage sequence of the cache sub-data, dynamically encrypting the storage sequence and storing the storage sequence in the first node;
packaging the encrypted data to generate a block so that the data cached by the first node are synchronized to other nodes in the blockchain network except the first node after being packaged along with a password module;
the block is synchronized to other blockchain nodes in the blockchain network than the first node.
2. The method of claim 1, wherein after the synchronizing the block to other blockchain nodes in the blockchain network than the first node, the method further comprises:
and clearing all the data which are synchronously finished in the data cached by the first node.
3. The method of claim 1, wherein after buffering the changed data in response to a change in data of a first node in a blockchain network for use by the first node before blockchain synchronization is completed, the method further comprises:
and responding to a data calling request of the first node, and calling the changed data cached by the first node.
4. The method of claim 1, wherein the first node has a plurality of cache modules, and the step of caching the changed data in response to a change in the data of the first node in the blockchain network specifically comprises:
responding to the data change of a first node in a blockchain network, and inquiring the cache load of each cache module of the first node;
and selecting a cache module for caching data according to the cache load of each cache module of the first node.
5. A blockchain real-time storage device, the device comprising:
the data caching module is used for responding to the data change of a first node in the blockchain network and caching the changed data so that the data is used by the first node before the blockchain synchronization is completed;
a block generation module for creating a cryptographic module in the first node; splitting the data cached by the first node into cache sub-data the same as the number of the password modules; storing the cache sub-data in different cipher modules in a one-to-one correspondence manner, wherein each cipher module only stores one cache sub-data; generating a storage sequence of the cache sub-data, dynamically encrypting the storage sequence and storing the storage sequence in the first node; packaging the encrypted data to generate a block so that the data cached by the first node are synchronized to other nodes in the blockchain network except the first node after being packaged along with a password module;
and the block synchronization module is used for synchronizing the block to other block chain nodes except the first node in the block chain network.
6. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 4.
7. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the method of any of claims 1 to 4.
CN201910849650.6A 2019-09-09 2019-09-09 Block chain real-time storage method, device, computer equipment and storage medium Active CN110716982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910849650.6A CN110716982B (en) 2019-09-09 2019-09-09 Block chain real-time storage method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910849650.6A CN110716982B (en) 2019-09-09 2019-09-09 Block chain real-time storage method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110716982A CN110716982A (en) 2020-01-21
CN110716982B true CN110716982B (en) 2024-02-02

Family

ID=69209754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910849650.6A Active CN110716982B (en) 2019-09-09 2019-09-09 Block chain real-time storage method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110716982B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382463B (en) * 2020-04-02 2022-11-29 中国工商银行股份有限公司 Block chain system and method based on stream data
CN113298653A (en) * 2021-05-27 2021-08-24 李政德 Block chain-based data tampering monitoring method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506664A (en) * 2014-11-24 2015-04-08 小米科技有限责任公司 Domain name system caching method and device
CN109067849A (en) * 2018-07-11 2018-12-21 杨国超 Method of data synchronization based on block
CN109462631A (en) * 2018-08-31 2019-03-12 腾讯科技(深圳)有限公司 Data processing method, device, storage medium and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10126831B2 (en) * 2015-10-16 2018-11-13 Seoul Viosys Co., Ltd. Compact light emitting diode chip, light emitting device and electronic device including the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506664A (en) * 2014-11-24 2015-04-08 小米科技有限责任公司 Domain name system caching method and device
CN109067849A (en) * 2018-07-11 2018-12-21 杨国超 Method of data synchronization based on block
CN109462631A (en) * 2018-08-31 2019-03-12 腾讯科技(深圳)有限公司 Data processing method, device, storage medium and electronic device

Also Published As

Publication number Publication date
CN110716982A (en) 2020-01-21

Similar Documents

Publication Publication Date Title
CN108540459B (en) Data storage method, device, system, electronic equipment and computer readable medium
US10951595B2 (en) Method, system and apparatus for storing website private key plaintext
US10958416B2 (en) Encrypted and compressed data transmission with padding
US11829624B2 (en) Method, device, and computer readable medium for data deduplication
CN110716982B (en) Block chain real-time storage method, device, computer equipment and storage medium
CN112560091B (en) Digital signature method, signature information verification method, related device and electronic equipment
CN110086607B (en) Method and device for rapidly switching deployment key, computer equipment and storage medium
CN112436943B (en) Request deduplication method, device, equipment and storage medium based on big data
CN116070240B (en) Data encryption processing method and device of multi-chip calling mechanism
CN112182108A (en) Block chain based distributed data storage updating method and electronic equipment
CN111046010A (en) Log storage method, device, system, electronic equipment and computer readable medium
CN114362961B (en) Block chain-based account recovery method, device, equipment and storage medium
US11755549B2 (en) Method, electronic device, and computer program product for data processing
CN115277684A (en) File transmission method, device, equipment and storage medium
CN115906177A (en) Aggregate security intersection method and device, electronic equipment and storage medium
US11513913B2 (en) Method for storage management, electronic device, and computer program product
CN111949738A (en) Block chain-based data storage deduplication method, terminal device and storage medium
CN114884714A (en) Task processing method, device, equipment and storage medium
CN113626873B (en) Authentication method, device, electronic equipment and computer readable medium
CN116049837B (en) Trusted computing system and method, electronic equipment and storage medium
CN116910630B (en) User identification information storage method, device, electronic equipment and medium
CN113343269B (en) Encryption method and device
CN116827879A (en) File transmission method and device, storage medium and electronic equipment
CN113783705A (en) Zero knowledge proof method, verification terminal, equipment and storage medium of key
CN116684193A (en) Method and device for accessing national cryptographic system by non-national cryptographic system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240102

Address after: 301, 304, Building 2, COFCO Chuangxin R&D Center, 69 Xingdong Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518000

Applicant after: SHENZHEN DIANLIAN TECHNOLOGY Co.,Ltd.

Address before: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen LIAN intellectual property service center

Effective date of registration: 20240102

Address after: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen LIAN intellectual property service center

Address before: Room 201, building a, No. 1, Qianwan 1st Road, Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong Province

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant