CN114697350A - Data storage method and storage medium based on block chain - Google Patents

Data storage method and storage medium based on block chain Download PDF

Info

Publication number
CN114697350A
CN114697350A CN202011619614.XA CN202011619614A CN114697350A CN 114697350 A CN114697350 A CN 114697350A CN 202011619614 A CN202011619614 A CN 202011619614A CN 114697350 A CN114697350 A CN 114697350A
Authority
CN
China
Prior art keywords
data
stored
node
block
producer
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.)
Granted
Application number
CN202011619614.XA
Other languages
Chinese (zh)
Other versions
CN114697350B (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.)
Fujian Kaimi Network Science & Technology Co ltd
Original Assignee
Fujian Kaimi Network Science & 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 Fujian Kaimi Network Science & Technology Co ltd filed Critical Fujian Kaimi Network Science & Technology Co ltd
Priority to CN202011619614.XA priority Critical patent/CN114697350B/en
Publication of CN114697350A publication Critical patent/CN114697350A/en
Application granted granted Critical
Publication of CN114697350B publication Critical patent/CN114697350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of block chains, and discloses a data storage method and a storage medium based on a block chain, which comprises the following steps: setting a whole network data node, a light node and a middleware service in a block chain, wherein the light node is used for storing part of block data in the block chain; the middleware service receives the data to be stored and temporarily stores the data in the storage space, and simultaneously encrypts the data to be stored to obtain encrypted data and sends the encrypted data to the data nodes of the whole network; and the whole network data node decrypts the encrypted data to obtain data to be stored, adds the data to the block data and uploads the data to the block chain. The invention effectively reduces the data transmission times, and improves the overall throughput and the throughput efficiency of the block chain. Meanwhile, each light node can only pull the block data of the light node, and the data of other light nodes cannot be checked, so that the protection of sensitive data and confidential data can be well protected under the condition that the data cannot be tampered.

Description

Data storage method and storage medium based on block chain
Technical Field
The present invention relates to the field of block chain technology, and in particular, to a data storage method and a storage medium based on a block chain.
Background
The blockchain technology is decentralized distributed data storage technology, and utilizes a blockchain data structure, a consensus algorithm, cryptography, intelligent contracts and the like to realize the public transparency and the non-falsification of data. The current blockchain technology has found many forms of application in different industries, such as: commodity traceability, digital currency, electronic contracts, government data sharing, and the like. In a blockchain network, the more nodes, the data is not falsifiable and the security is higher, but the increase of the nodes increases the whole network resource overhead and the throughput is reduced. When the patent with application number CN201810458331.8, entitled block chain data transmission method, device, equipment and storage medium, discloses transmitting its own data to other nodes in the block chain system, a part of communication nodes are selected as synchronization nodes by comprehensive analysis according to the characteristics of its own node and the data to be transmitted, and the data to be transmitted is transmitted to the synchronization nodes connected to it, and then the synchronization nodes transmit the data to other nodes in the block chain system. In a patent with application number CN201910426729.8 entitled block chain-based block generation method, apparatus, device, and storage medium, caching resource transfer data through a data cache queue, invoking different processes to extract the cached resource transfer data to generate a block, and adjusting an atomic counter, the block generation method and apparatus meet a high throughput requirement under high-frequency resource transfer and a low latency requirement under low-frequency resource transfer, and improve the block generation efficiency.
However, the existing block chain technology still has the problems that the requirement of a data node on network resources is high and the throughput efficiency is low. In addition, the data in the blockchain nodes are all open and vulnerable, and if confidential data is involved, the property rights of the data cannot be effectively protected.
Disclosure of Invention
Therefore, it is necessary to provide a data storage method based on a block chain, which is used to solve the technical problems of high network resource consumption and low data throughput efficiency of the block chain technology in the prior art, and reduce the cost while ensuring the characteristics of the block chain.
In order to achieve the above object, the present invention provides a data storage method based on a block chain, including the following steps:
setting a whole network data node and a middleware service in a block chain, wherein the whole network data node is used for storing all block data in the block chain;
the middleware service receives data to be stored and temporarily stores the data to be stored in a storage space;
the middleware service judges whether the quantity of the data to be stored in the storage space exceeds a preset value, if so, the data to be stored is encrypted to obtain encrypted data, and the encrypted data is sent to the whole network data node; or the middleware service encrypts the data to be stored at preset time intervals to obtain encrypted data and sends the encrypted data to the whole network data node;
and the whole network data node decrypts the encrypted data, adds the decrypted data into block data, and uploads the block data to a block chain.
Further, the step of encrypting the data to be stored to obtain encrypted data includes:
the middleware service classifies the data to be stored, adds the data to be stored corresponding to the same data producer to the same block data, and then encrypts the block data to obtain encrypted data.
Further, the data to be stored includes a data producer identifier, where the data producer identifier is used to identify a data producer corresponding to the data to be stored;
the adding, by the middleware service, the data to be stored corresponding to the same data producer to the same block data specifically includes: the middleware service adds the data to be stored identified by the same data producer to the same block data.
Further, the obtaining of encrypted data after encrypting the data to be stored specifically includes: carrying out encryption processing and compression processing on the data to be stored to obtain encrypted data;
the encryption processing comprises any one of symmetric encryption, asymmetric encryption and digital certificate encryption;
the compression process employs encoding comprising: huffman coding, LZ77, LZW, LZMA and any one.
Further, the system also comprises light nodes, each light node is connected with more than one data producer, each middleware service is connected with more than one light node, and a mapping relation table of the light nodes and the data producers is stored in all the middleware services; and the light nodes synchronize block data uploaded from the data nodes of the whole network by the middleware service and the data producers connected with the light nodes according to a preset period.
Further, when the data producer backtracks data, a data backtracking request is sent to a light node connected with the data producer backtracking request, the data backtracking request contains a data producer identifier, and the light node returns the data uploaded by the data producer according to the data producer identifier.
Further, when the data producer backtracks data, a data backtracking request is sent to a light node connected with the data producer, the data backtracking request contains a data producer identifier, if relevant data is not retrieved from the light node, the light node sends the data backtracking request to a data node of the whole network through middleware service, the data node of the whole network searches block data containing the data producer identifier and sends the corresponding block data to the light node sending the request through the middleware service, and the light node stores the block data and sends the block data to the corresponding data producer.
Further, the light nodes include a first-level light node and a second-level light node, one first-level light node can connect more than two second-level light nodes, the second-level light nodes are connected with more than one data producer, and when the data producer requests data from the first-level light node or the second-level light nodes, the requested light nodes issue corresponding block data to the data producer.
Further, the light node or data producer can only view each stored or generated tile data.
In order to solve the above technical problem, the present invention provides another technical solution:
a computer storage medium, on which a computer program is stored, which when executed by a processor implements the blockchain-based data storage method according to any of the above-mentioned aspects.
Different from the prior art, the technical scheme is that a whole network data node and a middleware service are arranged in a block chain, the middleware service is used for storing part of block data in the block chain, and in the uplink process of the data, the middleware service can cache the data to be uplink and then compress the uplink in batches, so that the data transmission times are reduced, the whole throughput and the throughput efficiency of the block chain are improved, and meanwhile, the cost is reduced under the condition that the characteristics of the block chain are ensured.
Drawings
FIG. 1 is a flow chart of a method for blockchain-based data storage according to an embodiment;
FIG. 2 is a timing diagram illustrating a key process of the blockchain-based data storage method according to an embodiment;
fig. 3 is a schematic diagram of a network architecture of node distribution in the data storage method based on a blockchain according to the embodiment;
FIG. 4 is a schematic diagram of a computer storage medium according to an embodiment.
Description of reference numerals:
100. a computer storage medium;
Detailed Description
To explain technical contents, structural features, and objects and effects of the technical solutions in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
Referring to fig. 1 to 4, the present embodiment provides a data storage method based on a block chain and a computer storage medium. As shown in fig. 1, the data storage method based on block chains includes the following steps:
s101, a whole network data node and a middleware service are arranged in a block chain, the whole network data node is used for storing all block data in the block chain, the whole network data node is required to be server equipment which is configured to a certain extent, all whole network data nodes in the block chain are equivalent and synchronize all data mutually, all whole network data nodes can serve as data uplink servers through a common identification mechanism and are responsible for uplink of the block data to be uplink to the block chain network, and all whole network data nodes on the block chain network can receive and store the block data through the synchronization mechanism and synchronously forward the received block data to other data nodes. The data stored in each network-wide data node is stored in the form of a "block-chained data structure".
S102, the middleware serves data to be stored and temporarily stores the data to be stored in a storage space. The data to be stored can be sent to the light node by the data production equipment, and the data to be stored can be multimedia data such as characters, audio, images and the like. The storage space is used for temporarily storing data to be stored, and therefore the storage space may also be referred to as a data pool. The data to be stored can be stored in a local data pool of the light node according to a certain data format per line, and the data format can include: JSON, character string, binary, etc. Thereafter, the process proceeds to step S103.
S103, the middleware service judges whether the quantity of the data to be stored in the storage space exceeds a preset value, if so, the data to be stored is encrypted to obtain encrypted data, and the encrypted data is sent to the whole network data node; or the middleware service encrypts the data to be stored at preset time intervals to obtain encrypted data and sends the encrypted data to the whole network data node. The middleware service monitors data to be stored in the storage space, and when the data to be stored in the storage space (i.e. the data pool) reaches a certain data volume (for example, 10M), the middleware service triggers batch processing on the data to be stored, wherein the batch processing includes: 1) encrypting data to be stored; 2) carrying out compression processing on encrypted data obtained after encryption; 3) format the data to be stored, etc., to reduce the size of the data. The encryption process may adopt any one of symmetric encryption (for example, DES, AES), asymmetric encryption (for example, RSA), digital certificate, and the like. The encryption processing comprises the steps of signing data, and the signing algorithm comprises the following steps: RSA, DSA, ECDSA (elliptic curve signature algorithm), or custom signature rules-for example, when signing, the data is connected into a string by alphabetic sorting of parameters of each field in the data, then the allocated private key is added, and then md5 operation is performed, if the block data is: { d:1, b:2, a:3}, private key: test, then the signature is: md5 ("a 3b2d1 test"). The encoding method adopted for the compression of the encrypted data can be as follows: huffman coding, LZ77, LZW, LZMA, etc.
In another embodiment, the middleware service monitors data to be stored in a storage space, encrypts the data to be stored at regular intervals (for example, 10 minutes) to obtain encrypted data, and sends the encrypted data to the data node of the whole network. The encryption processing of the data to be stored and the sending of the data to the whole network data node are the same as the above mode.
And S104, the whole network data node decrypts the encrypted data, adds the decrypted data into block data, and uploads the block data to a block chain network. One of the whole network data nodes is selected as a chaining server through a common identification mechanism in the block chain network, and the whole network data node packages data to be stored generated in a preset time and chains the data to be stored to the block chain network for transmission and storage of other whole network data nodes. After receiving the encrypted data to be stored (namely encrypted data) uploaded by the middleware service, the data node in the whole network decrypts the encrypted data, wherein the decryption is the inverse operation of the encryption, so that the original data to be stored is obtained. In order to enable data to be stored to be identified and stored by other network-wide data nodes in a blockchain, the network-wide data nodes need to add the data to be stored to blockdata and upload the blockdata to a blockchain network. After the block data is uploaded to the block chain network by the whole network data node, other whole network data nodes in the block chain network can receive the block data in the block chain network through a synchronization mechanism and store the block data, and the whole network data node also synchronously forwards the block data to other whole network data nodes, so that the block data is stored in each whole network data node in the block chain.
In the above embodiment, a middleware service is provided, where the middleware service is a section of program code, and the middleware service is supported to be deployed on any node of the blockchain network. In the process of uplink of data, the middleware service can buffer the data to be uplink (namely the data to be stored) and then uplink the data in batches, thereby reducing the times and the number of data transmission, improving the overall throughput and the throughput efficiency of the block chain and solving the problem of low processing efficiency of the current block chain on large data volume. And the middleware service encrypts the data to be stored when uploading the data, so that the transmission confidentiality of the data is effectively improved.
In the above embodiment, a light node may be further added in the blockchain network, the light node is configured to store a part of the blockchain data, and the middleware service may be deployed on the light node and may also be deployed on a data node of the whole network. The light nodes can be electronic network equipment with networking function and data processing capability, such as a PC (personal computer), a gateway and the like with low price and low cost. Different from the data nodes of the whole network, the light nodes only store partial data on the block chain, the light nodes do not store all data on the block chain network, and block data in the light nodes can be converted into files, data tables and the like for storage, so that data backtracking, auditing and other works are facilitated. When new full-network data nodes and light nodes are added into the existing block chain network, the newly added full-network data nodes or light nodes can also perform the following steps S101 to S104. For example, in a digital audiovisual venue (such as KTV), the number of songs on demand is counted and recorded in a block chain. Because a digital audio-visual place often has a plurality of boxes, each box can be independently ordered, thousands of songs can be ordered within one second for thousands of digital audio-visual places in the country, and linking can be performed once every song ordered, so that the frequent block chain linking operation can not be borne completely according to the current network load condition. Therefore, a network server or a gateway server of a digital audio-visual place can be used as a light node, a middleware service is arranged on the gateway server, the middleware service is only responsible for collecting the on-demand times generated by the digital audio-visual place, caching and then chaining in batches, for example, a network management server can transmit the on-demand time-recording information collected in half an hour of the place to a whole network data node at one time, so that the times of receiving data by the whole network data node are greatly reduced, and the times of chaining data are further reduced.
The light nodes can be divided into a multi-level structure, each light node can synchronize the whole network data or part of block data in the upper level light node according to the ownership range, for example, the second level light node can synchronize the block data of the node through the first level or whole network data node. The application scenes are as follows: for national block data, provincial first-level light nodes can be set, and only the block data of the province is synchronized. In addition, a city grade secondary light node can be set, and only the data of the local city block is synchronized.
In an embodiment, the multi-level structure includes a first-level light node and a second-level light node, where one first-level light node may connect to more than two second-level light nodes, each second-level light node connects to more than one data producer, the first-level light node sends stored data to a corresponding second-level light node according to a data producer identifier, and the data producer may directly make a request to the second-level light node connected thereto. In this way, the number of light nodes at each stage can be flexibly increased or reduced, so that the balance between data processing efficiency and cost is formed, and the expansion of various commercial applications is achieved.
In one embodiment, the middleware service unit belongs to the light node, and the middleware service organizes the data to be stored belonging to the same data producer into the same block data as much as possible and uploads the data to be stored into the block chain. Wherein the step of obtaining encrypted data after executing the encryption processing on the data to be stored comprises the following steps:
the method comprises the steps that a data producer (such as a song ordering terminal in a digital audio-visual place) sends data to be stored (such as song on-demand data) to a middleware service, the middleware service receives the data to be stored, the middleware service judges whether the quantity of the data to be stored reaches a preset value or not, and if yes, the data to be stored corresponding to the same middleware service is added to the same block data. The data to be stored includes a data producer identifier, where the data producer identifier is used to identify a data producer corresponding to the data to be stored (that is, which node the data to be stored belongs to, where the data producer identifier is also used when a subsequent light node obtains block data related to the light node from a middleware service);
the adding, by the middleware service, the data to be stored corresponding to the same data producer to the same block specifically includes: the middleware service classifies the data to be stored according to the data producer identification, adds the data to be stored with the same data producer identification into the same block data, and then encrypts the block data to obtain encrypted data.
For example, in one embodiment, each block is composed of block data identified by n data producers (n can be adjusted according to the size of the actual blockchain data size, such as 5), for example: the maximum number of the data stored in each block on the data node is set to be 1000, and only when the number of the data uploaded by the n light nodes reaches 1000, block data uplink is triggered for 1 time (namely transaction submission). In this embodiment, adding the data to be stored corresponding to the same data producer to the same block data has the following advantages:
1) the data throughput of the block chain can be improved (1 block memory needs to be generated for each piece of data before the pieces are combined).
2) When data pulling synchronization is subsequently carried out, the number of synchronous blocks can be reduced, and the synchronization efficiency is improved.
3) The storage cost is reduced, the light nodes synchronously pull the required data as required, and the data does not need to occupy the storage for a long time.
In another embodiment, the middleware service may belong to a whole network data node, the whole network data node receives data to be stored uploaded by the middleware service, the middleware service in the whole network data node judges whether the number of the data to be stored in the storage space exceeds a preset value, if yes, the data of the same data producer is added to the data of the same block according to the data producer identifier, and then the block data is uploaded to a block chain in batch. Or the middleware service adds the data of the same data producer to the same block data at preset time intervals, and then uploads the block data to a block chain in batches.
As shown in fig. 2, a timing diagram of a key process of a block chain network data storage method with a secondary light node structure in an embodiment is shown, where the block chain network data storage method with a secondary light node structure includes the following steps:
s201, data is generated, namely data to be stored is generated, the data to be stored can be generated by equipment such as a smart phone, a notebook computer and a digital audio-visual place management terminal, and the data to be stored can be multimedia data such as characters, audio, video and images. The generated data to be stored is uploaded to a middleware service in the light node.
S202, the middleware service receives the data to be stored and stores the received data to be stored in the data pool. The data to be stored is stored in the data pool of the light node according to a certain data format of each row, and the data format can include: JSON, character string, binary, etc. And meanwhile, automatically monitoring the data pool, starting a plurality of processes to perform batch data processing on the data to be stored when the data pool reaches a certain data volume, such as 10M, or every 10 minutes, wherein the data processing comprises classifying the data to be stored according to data producer identifications, storing the data corresponding to the same data producer in a storage unit as much as possible, encrypting the classified data to be stored to obtain encrypted data, and compressing the encrypted data to obtain a compressed packet. The batch encryption of the data to be stored is the same as the encryption described in the above embodiment, and therefore, the details are not repeated. And then the compressed packets are uploaded to a whole network data node (namely an uplink server) in batches.
S203, after the whole network data node A receives the compressed packet (namely the data to be stored after encryption processing and compression processing), decompressing the compressed packet, then verifying the signature of the data to be stored in the compressed packet, if the signature is wrong, discarding the data, and if the signature is verified to be passed, decrypting the data to be stored after classification on the light node, and finally uploading the classified data to be stored to the block chain network by the whole network data node A. ,
s204, the whole network data node B, the whole network data node C and other whole network data nodes in the block chain synchronously forward the uploaded block data to other data nodes through a synchronization mechanism, so that uplink storage and synchronization of the block data are realized.
S205, for the light node, only the block data under the ownership of the light node needs to be synchronously pulled and stored, for example: the first-level light node or the second-level light node actively pulls the block data in a certain time period with the light node identification on the data node, and simultaneously, the block data can be converted into a data format which can be conveniently read and displayed, for example: and the data can be conveniently backtracked, audited and the like in the forms of files, data tables and the like. In addition, each level of light nodes do not need to store the uplink data to be stored for a long time, so that the utilization rate of local storage is improved, and the storage cost is reduced.
The data storage method based on the block chain can be applied to data storage in different fields and different types, and is a network architecture schematic diagram of the application of the data storage method based on the block chain in the KTV song order counting as shown in FIG. 3. The network architecture schematic diagram includes a KTV song-on-demand device, the on-demand device sends the generated song-on-demand count data (i.e., data to be stored) to a site gateway of the KTV, the site gateway is a light node in the block chain in the above embodiment, and can deploy middleware service, the site gateway encrypts and compresses the song-on-demand count data and sends the song-on-demand count data to an uplink server (i.e., a whole network data node), the uplink server decompresses, signs, verifies and decrypts the song-on-demand count data, and then the song-on-demand count data is processed in batch to form block data to be uplink to the block chain, and the block data is forwarded and stored by other nodes in the block chain through a synchronization mechanism.
As shown in fig. 4, in another embodiment, a computer storage medium 100 is provided, and a computer program is stored on the computer storage medium 100, and when executed by a processor, the computer program implements the block chain based data storage method described in any of the above embodiments.
It should be noted that, although the above embodiments have been described herein, the invention is not limited thereto. Therefore, based on the innovative concepts of the present invention, the technical solutions of the present invention can be directly or indirectly applied to other related technical fields by making changes and modifications to the embodiments described herein, or by using equivalent structures or equivalent processes performed in the content of the present specification and the attached drawings, which are included in the scope of the present invention.

Claims (10)

1. A data storage method based on a block chain is characterized by comprising the following steps:
setting a whole network data node and a middleware service in a block chain, wherein the whole network data node is used for storing all block data in the block chain;
the middleware service receives data to be stored and temporarily stores the data to be stored in a storage space; the middleware service judges whether the quantity of the data to be stored in the storage space exceeds a preset value, if so, the data to be stored is encrypted to obtain encrypted data, and the encrypted data is sent to the whole network data node; or the middleware service encrypts the data to be stored at preset time intervals to obtain encrypted data and sends the encrypted data to the whole network data node;
and the whole network data node decrypts the encrypted data, adds the decrypted data into block data, and uploads the block data to a block chain.
2. The data storage method based on the blockchain according to claim 1, wherein the step of encrypting the data to be stored to obtain encrypted data comprises:
the middleware service classifies the data to be stored, adds the data to be stored corresponding to the same data producer to the same block data, and then encrypts the block data to obtain encrypted data.
3. The block chain-based data storage method according to claim 2, wherein the data to be stored includes a data producer identifier, and the data producer identifier is used to identify a data producer corresponding to the data to be stored;
the adding, by the middleware service, the data to be stored corresponding to the same data producer to the same block data specifically includes: the middleware service adds the data to be stored identified by the same data producer to the same block data.
4. The block chain-based data storage method according to claim 1, wherein the obtaining of encrypted data after the encryption processing of the data to be stored specifically comprises: carrying out encryption processing and compression processing on the data to be stored to obtain encrypted data;
the encryption processing comprises any one of symmetric encryption, asymmetric encryption and digital certificate encryption;
the compression process employs encoding comprising: huffman coding, LZ77, LZW, LZMA and any one.
5. The blockchain-based data storage method according to claim 1, further comprising light nodes, wherein each light node is connected to more than one data producer, each middleware service is connected to more than one light node, and all middleware services store a mapping relationship table between the light nodes and the data producers; and the light nodes synchronize block data uploaded from the data nodes of the whole network by the middleware service and the data producers connected with the light nodes according to a preset period.
6. The blockchain-based data storage method according to claim 1, wherein when the data producer backtracks data, a data backtracking request is sent to a light node connected to the data producer backtracking request, the data backtracking request includes a data producer identifier, and the light node returns data uploaded by the data producer according to the data producer identifier.
7. The method according to claim 6, wherein when a data producer backtracks data, a data backtracking request is sent to a light node connected to the data producer backtracking request, the data backtracking request includes a data producer identifier, if no relevant data is retrieved from the light node, the light node sends the data backtracking request to a data node in the whole network through a middleware service, the data node in the whole network searches for block data including the data producer identifier, and sends corresponding block data to the light node sending the request through the middleware service, and the light node stores the block data and sends the block data to the corresponding data producer.
8. The blockchain-based data storage method of claim 1, wherein the light nodes include a primary light node and a secondary light node, wherein one primary light node can connect more than two secondary light nodes, the secondary light node is connected to more than one data producer, and when a data producer requests data from a primary light node or a secondary light node, the requested light node issues corresponding block data to the data producer.
9. The blockchain-based data storage method according to one of claims 5 to 8, wherein the light node or data producer can only view each stored or generated blockchain data.
10. A computer storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method for blockchain-based data storage according to any one of claims 1 to 9.
CN202011619614.XA 2020-12-31 2020-12-31 Data storage method and storage medium based on blockchain Active CN114697350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011619614.XA CN114697350B (en) 2020-12-31 2020-12-31 Data storage method and storage medium based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011619614.XA CN114697350B (en) 2020-12-31 2020-12-31 Data storage method and storage medium based on blockchain

Publications (2)

Publication Number Publication Date
CN114697350A true CN114697350A (en) 2022-07-01
CN114697350B CN114697350B (en) 2023-06-27

Family

ID=82134445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011619614.XA Active CN114697350B (en) 2020-12-31 2020-12-31 Data storage method and storage medium based on blockchain

Country Status (1)

Country Link
CN (1) CN114697350B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170293503A1 (en) * 2016-04-10 2017-10-12 Bank Of America Corporation System for transforming large scale electronic processing using application block chain and multi-structured data stores
JP6326173B1 (en) * 2017-10-31 2018-05-16 株式会社インフォマート Data transmission / reception system and data transmission / reception method
US20180240114A1 (en) * 2017-02-22 2018-08-23 Alibaba Group Holding Limited Transaction verification in a consensus network
CN109191144A (en) * 2018-08-03 2019-01-11 食品安全与营养(贵州)信息科技有限公司 A kind of laboratory information business management system and working method based on block chain
CN109347868A (en) * 2018-11-27 2019-02-15 咪咕文化科技有限公司 A kind of Information Authentication method, apparatus and storage medium
CN109521956A (en) * 2018-10-18 2019-03-26 上海达家迎信息科技有限公司 A kind of cloud storage method, apparatus, equipment and storage medium based on block chain
CN109783077A (en) * 2018-12-14 2019-05-21 平安科技(深圳)有限公司 Block catenary system and its middleware system, data cochain method, storage medium
US10505726B1 (en) * 2018-12-07 2019-12-10 Nike, Inc. System and method for providing cryptographically secured digital assets
CN110826082A (en) * 2019-09-29 2020-02-21 核芯互联科技(青岛)有限公司 Privacy protection method and device for block chain
CN111597567A (en) * 2020-05-14 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN111600720A (en) * 2020-05-20 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium
CN112104517A (en) * 2020-11-23 2020-12-18 腾讯科技(深圳)有限公司 Data processing method based on block chain network and related device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170293503A1 (en) * 2016-04-10 2017-10-12 Bank Of America Corporation System for transforming large scale electronic processing using application block chain and multi-structured data stores
US20180240114A1 (en) * 2017-02-22 2018-08-23 Alibaba Group Holding Limited Transaction verification in a consensus network
JP6326173B1 (en) * 2017-10-31 2018-05-16 株式会社インフォマート Data transmission / reception system and data transmission / reception method
CN109191144A (en) * 2018-08-03 2019-01-11 食品安全与营养(贵州)信息科技有限公司 A kind of laboratory information business management system and working method based on block chain
CN109521956A (en) * 2018-10-18 2019-03-26 上海达家迎信息科技有限公司 A kind of cloud storage method, apparatus, equipment and storage medium based on block chain
CN109347868A (en) * 2018-11-27 2019-02-15 咪咕文化科技有限公司 A kind of Information Authentication method, apparatus and storage medium
US10505726B1 (en) * 2018-12-07 2019-12-10 Nike, Inc. System and method for providing cryptographically secured digital assets
CN109783077A (en) * 2018-12-14 2019-05-21 平安科技(深圳)有限公司 Block catenary system and its middleware system, data cochain method, storage medium
CN110826082A (en) * 2019-09-29 2020-02-21 核芯互联科技(青岛)有限公司 Privacy protection method and device for block chain
CN111597567A (en) * 2020-05-14 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN111600720A (en) * 2020-05-20 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium
CN112104517A (en) * 2020-11-23 2020-12-18 腾讯科技(深圳)有限公司 Data processing method based on block chain network and related device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曹辉: "基于区块链技术的脑卒中电子病历数据存储系统研究", 《中国优秀硕士学位论文全文数据库 (医药卫生科技辑)》, pages 070 - 158 *

Also Published As

Publication number Publication date
CN114697350B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
US9787652B2 (en) System and method for signaling segment encryption and key derivation for adaptive streaming
Li et al. Improving security of a chaotic encryption approach
US5673318A (en) Method and apparatus for data authentication in a data communication environment
Armenia et al. A flexible phasor data concentrator design leveraging existing software technologies
US20160197939A1 (en) Segment Authentication for Dynamic Adaptive Streaming
US10764261B2 (en) System and method for enabling a scalable public-key infrastructure on a smart grid network
CN109120998B (en) Media data transmission method, device and storage medium
CN111711611B (en) Data processing method, device, medium, equipment and application based on block chain
US11259082B2 (en) Systems and methods for data processing, storage, and retrieval from a server
CN102100031A (en) Apparatus and method for providing a security service in a user interface
US11303617B2 (en) Methods and apparatuses for oblivious transfer using trusted environment
CN103731258A (en) Method and device for generating secret key
CN106557704B (en) Information and data framework in content-centric networks
US20210089683A1 (en) Data stream integrity
CN106411996B (en) Content negotiation in content-centric networks
CN114697350B (en) Data storage method and storage medium based on blockchain
CN112217862A (en) Data communication method, device, terminal equipment and storage medium
CN116192499A (en) Easily-extensible and traceable data operation recording system and method
CN115499244A (en) Streaming data safe transmission and storage method based on data lake
KR20220170773A (en) Dynamic merkle tree-based message stream generation apparatus, message streaming method and message streaming network system
Somaiya et al. Implementation and evaluation of EMAES–A hybrid encryption algorithm for sharing multimedia files with more security and speed
CN115085926A (en) Data acquisition method and system based on block chain and Internet of things data aggregation gateway
CN106878266A (en) A kind of unstructured data Transmission system
CN112187750A (en) Information encryption method and system based on Internet
CN108933950A (en) Terminal iidentification determines method and device, computer equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant