CN114697350B - Data storage method and storage medium based on blockchain - Google Patents

Data storage method and storage medium based on blockchain Download PDF

Info

Publication number
CN114697350B
CN114697350B CN202011619614.XA CN202011619614A CN114697350B CN 114697350 B CN114697350 B CN 114697350B CN 202011619614 A CN202011619614 A CN 202011619614A CN 114697350 B CN114697350 B CN 114697350B
Authority
CN
China
Prior art keywords
data
node
stored
block
light node
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
CN202011619614.XA
Other languages
Chinese (zh)
Other versions
CN114697350A (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 blockchains, and discloses a data storage method and a storage medium based on blockchains, wherein the method comprises the following steps: setting a full-network data node, a light node and a middleware service in a block chain, wherein the light node is used for storing partial block data in the block chain; the middleware service receives data to be stored and temporarily stores the data in a storage space, and simultaneously encrypts the data to be stored to obtain encrypted data and sends the encrypted data to the whole network data node; the full network data node decrypts the encrypted data to obtain data to be stored, and adds the data to the block data to upload the data to the block chain. The invention effectively reduces the data transmission times and improves the overall throughput and throughput efficiency of the block chain. Meanwhile, each light node can only pull the block data of the light node, so that other light node data cannot be checked, and 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 blockchain
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain-based data storage method and a storage medium.
Background
The blockchain technology is a decentralised distributed data storage technology, and the blockchain technology utilizes a blockchain data structure, a consensus algorithm, cryptography, intelligent contracts and the like to realize that the data is transparent in disclosure and can not be tampered. Current blockchain technology has found many forms of application in different industries, such as: commodity tracing, digital currency, electronic contracts, government data sharing and the like. In a blockchain network, the more nodes are data-less and the higher the security is, but increasing the nodes increases the cost of the whole network resource and reduces the throughput. In the patent with the application number of CN201810458331.8 and named as a blockchain data transmission method, device, equipment and storage medium, when data of the self is transmitted to other nodes in a blockchain system, a communication node is selected as a synchronous node through comprehensive analysis according to the characteristics of the self and the data to be transmitted, the data to be transmitted is transmitted to the synchronous node connected with the communication node, and then the synchronous node transmits the data to other nodes in the blockchain system. In the patent with the application number of CN201910426729.8 and the name of block generation method, device, equipment and storage medium based on blockchain, the method, device and equipment for generating the block by caching resource transfer data through a data cache queue, calling different processes to extract the cached resource transfer data to generate the block, and adjusting an atomic counter, thereby meeting the high throughput requirement under high-frequency resource transfer and the low delay requirement under low-frequency resource transfer and improving the efficiency of generating the block.
However, the existing blockchain technology still has the problems of high requirement of data nodes on network resources and low throughput efficiency. In addition, the data in the blockchain nodes are all public and easy to attack, 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 blockchain, which is used for solving the technical problems of high consumption of network resources and low data throughput efficiency in the blockchain technology in the prior art, and reducing the cost under the condition of ensuring the characteristics of the blockchain.
In order to achieve the above object, the present invention provides a data storage method based on a blockchain, comprising the steps of:
setting a full-network data node and middleware service in a block chain, wherein the full-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 full-network data node; or the middleware service encrypts the data to be stored at intervals of preset time to obtain encrypted data, and sends the encrypted data to the whole network data node;
the full 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 obtaining the encrypted data after the data to be stored is encrypted includes the steps of:
the middleware service classifies the data to be stored, adds the data to be stored corresponding to the same data producer into the same block data, and then encrypts the block data to obtain encrypted data.
Further, the data to be stored comprises a data producer identifier, and the data producer identifier is used for identifying a data producer corresponding to the data to be stored;
the middleware service adds the data to be stored corresponding to the same data producer to the same block data, which specifically comprises the following steps: the middleware service adds the data to be stored identified by the same data producer to the same block data.
Further, the encrypting the data to be stored to obtain the encrypted data specifically includes: encrypting and compressing 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 a code comprising: huffman coding, LZ77, LZW, LZMA and any one of them.
Further, the system further 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; the light node synchronizes the block data uploaded by the data producer connected with the light node from the whole network data node through the middleware service according to a preset period.
Further, when the data producer backtracks data, a data backtracking request is sent to the light node connected with the data producer, the data backtracking request contains the data producer identification, and the light node returns the data uploaded by the data producer according to the data producer identification.
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 identification, if the light node does not retrieve relevant data, the light node sends the data backtracking request to a full-network data node through middleware service, the full-network data node searches block data containing the data producer identification, and sends corresponding block data to the light node sending the request through middleware service, and the light node stores the block data and sends the block data to the corresponding data producer.
Further, the light nodes comprise a first-level light node and a second-level light node, one first-level light node can be connected with more than two second-level light nodes, the second-level light node is 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 node, the requested light node transmits corresponding block data to the data producer.
Further, the light node or data producer can only view each stored or produced block data.
In order to solve the technical problems, the invention provides another technical scheme:
a computer storage medium having stored thereon a computer program which when executed by a processor implements a blockchain-based data storage method according to any of the above aspects.
Compared with the prior art, the technical scheme is characterized in that the full-network data node and the middleware service are arranged in the blockchain, the middleware service is used for storing part of the blockchain data, and in the process of uploading the data, the middleware service can buffer the data to be uploaded and compress the uplinks in batches, so that the data transmission times are reduced, the overall throughput and the throughput efficiency of the blockchain are improved, and meanwhile, the cost is reduced under the condition of guaranteeing the characteristics of the blockchain.
Drawings
FIG. 1 is a flow chart of a blockchain-based data storage method in accordance with an embodiment;
FIG. 2 is a timing diagram of a key flow of a blockchain-based data storage method in accordance with the embodiments;
FIG. 3 is a schematic diagram of a network architecture of node distribution in a blockchain-based data storage method according to an embodiment;
fig. 4 is a schematic diagram of a computer storage medium according to an embodiment.
Reference numerals illustrate:
100. a computer storage medium;
Detailed Description
In order to describe the technical content, constructional features, achieved objects and effects of the technical solution in detail, the following description is made in connection with the specific embodiments in conjunction with the accompanying drawings.
Referring to fig. 1 to 4, the present embodiment provides a data storage method and a computer storage medium based on a blockchain. As shown in fig. 1, the blockchain-based data storage method includes the steps of:
s101, setting full-network data nodes and middleware services in a block chain, wherein the full-network data nodes are used for storing all block data in the block chain, the full-network data nodes are required to reach server equipment with certain configuration, all the full-network data nodes in the block chain are peer-to-peer and synchronize all data mutually, all the full-network data nodes can be used as a data uplink server through a consensus mechanism and are responsible for uplink of the block data to be uplink to the block chain network, all the full-network data nodes on the block chain network can receive and store the block data through a synchronization mechanism, and the received block data are synchronously forwarded to other data nodes. The data stored in each full network data node is stored in the form of a "block chain data structure".
S102, the middleware serves the 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 frequency, images and the like. The storage space is used for temporarily storing data to be stored, and thus 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 of each row, and the data format can comprise: JSON, string, binary, etc. After that, the process advances 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 (such as 10M), the data to be stored is triggered to be processed in batches, wherein the batch processing comprises: 1) Encrypting the data to be stored; 2) Compressing the encrypted data obtained after encryption; 3) Formatting the data to be stored, etc., to reduce the size of the data. The encryption process may employ any one of symmetric encryption (e.g., DES, AES), asymmetric encryption (e.g., RSA), digital certificates, and the like. The encryption processing comprises signing the data, wherein the signing algorithm comprises the following steps: RSA, DSA, ECDSA (elliptic curve signing algorithm), or custom signing rules-for example, when signing, a string of character strings is formed by alphabetically ordering the parameters of each field in the data, and then the assigned private key is added, and then md5 operation is performed, for example, the block data is: { d:1, b:2, a:3}, private key: test, then sign: md5 ("a 3b2d1 test"). The encoding mode adopted for compressing the encrypted data can be as follows: huffman coding, LZ77, LZW, LZMA, and the like.
In another embodiment, the middleware service monitors data to be stored in the storage space, encrypts the data to be stored at regular intervals (for example, at 10 minutes) to obtain encrypted data, and sends the encrypted data to the all-network data node. The encryption processing and the sending of the data to be stored to the whole network data node are the same as the above mode.
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. And selecting one of the full-network data nodes as a uplink server through a consensus mechanism in the blockchain network, packaging the data to be stored generated in a preset time by the full-network data node, and uploading the packaged data to the blockchain network for transmission and storage of other full-network data nodes. And after receiving the encrypted data to be stored (namely the encrypted data) uploaded by the middleware service, the full-network data node carries out decryption processing on the encrypted data, wherein the decryption processing is the inverse operation of the encryption processing, so that the original data to be stored is obtained. In order for the data to be stored to be identified and stored by other full network data nodes in the blockchain, the full network data nodes need to add the data to be stored to the blockdata and upload the blockdata to the blockchain network. After the full-network data node uploads the block data to the block chain network, other full-network data nodes in the block chain network can receive the block data in the block chain network and store the block data through a synchronization mechanism, and the full-network data node synchronously forwards the block data to other full-network data nodes, so that the block data is stored in all the full-network data nodes in the block chain.
In the above embodiment, a middleware service is provided, where the middleware service is a piece of program code, and the middleware service supports deployment on any node of the blockchain network. In the data uplink process, the middleware service can buffer the data to be uplink (namely the data to be stored) and then uplink the data in batches, so that the number of data transmission times and the number of data transmission times are reduced, the overall throughput and the throughput efficiency of the block chain are improved, and the problem that the current block chain has low processing efficiency on large data amount is solved. And the middleware service encrypts the data to be stored when uploading the data, so that the confidentiality of data transmission is effectively improved.
In the above embodiment, a light node may be further added to the blockchain network, where the light node is configured to store part of the blockchain data, and the middleware service may be deployed on the light node or on a full-network data node. The light node can be an electronic network device with networking function and data processing capability, such as a PC (personal computer) with low price and a gateway with low cost. Different from the whole network data node, the light node only stores partial data on the block chain, the light node does not store all data on the block chain network, and the block data in the light node can be converted into files, data tables and the like for storage, so that the work of data backtracking, auditing and the like is convenient. When a new full-network data node and a light node join an existing blockchain network, the new full-network data node or the light node may also perform the following steps S101 to S104. For example, in a digital audiovisual venue (e.g., KTV), the number of songs on demand is counted and recorded to the blockchain. Because a digital audiovisual site often has a plurality of boxes, each box can be independently requested, thousands of singing requests can be generated within one second for thousands of nationwide digital audiovisual sites, and if one singing request is generated, one time of linking is performed, so that the frequent blockchain linking operation cannot be borne at all according to the current network load condition. Therefore, the network server or the gateway server of the digital audio-visual place can be used as a light node, and the gateway server is provided with a middleware service which is only responsible for collecting the order-broadcast times generated by the digital audio-visual place and caching and then linking the order-broadcast times in batches, for example, the network management server can transmit the order-broadcast information collected by the local place for half an hour to the whole network data node once, thereby greatly reducing the times of receiving data by the whole network data node and further reducing the times of data linking.
The light nodes can be divided into a multi-level structure, each light node can synchronize full-network data or partial block data in the upper light nodes according to the ownership range, for example, the two-level light nodes can synchronize the block data of the node through the one-level or full-network data nodes. The application scene is as follows: for nationwide block data, a level one light node of a provincial level can be set, and only the local provincial block data is synchronized. In addition, a market level two-level light node can be arranged to only synchronize the local market block data.
In an embodiment, the multi-level structure includes a first-level light node and a second-level light node, one first-level light node can be connected with more than two second-level light nodes, each second-level light node is connected with more than one data producer, the first-level light node sends stored data to the corresponding second-level light node according to the identification of the data producer, and the data producer can directly request the second-level light node connected with the first-level light node. In this way, the number of the light nodes at each level can be increased or reduced flexibly, so that balance is formed in data processing efficiency and cost, and various commercial applications can be expanded.
In one embodiment, the middleware service part belongs to the light node, and the middleware service manages the data to be stored belonging to the same data producer into the same block data and uploads the data to the block chain. Wherein the step of obtaining the encrypted data after the step of performing the encryption processing on the data to be stored includes the steps of:
the method comprises the steps that a data producer (such as a song requesting terminal in a digital audiovisual place) sends data to be stored (such as song requesting 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, and if yes, the data to be stored corresponding to the same middleware service are added into the same block data. The data to be stored comprises a data producer identifier, wherein the data producer identifier is used for identifying a data producer corresponding to the data to be stored (namely, which node the data to be stored is owned by, and the data producer identifier can also be used when a subsequent light node takes block data related to the light node to a middleware service);
the middleware service adds the data to be stored corresponding to the same data producer to the same block specifically comprises the following steps: the middleware service classifies the data to be stored according to the data producer identification, adds the data to be stored of 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 n data producer identities (n may be adjusted according to the actual blockchain data size, such as 5) of block data, for example: and setting the maximum number of storage blocks on the data nodes as 1000 pieces of data, and triggering 1-time block data uplink (namely transaction submission) only when the number of data uploaded by n light nodes reaches 1000 pieces. 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 blockchain can be improved (1 block store per piece of data needs to be generated before the number of pieces are combined).
2) When the data pulling synchronization is carried out later, the number of the synchronization blocks can be reduced, and the synchronization efficiency is improved.
3) The storage cost is reduced, the light nodes synchronously pull the needed data according to the needs, and the data does not need to occupy and store for a long time.
In another embodiment, the middleware service may be located in a full-network data node, where the full-network data node receives data to be stored uploaded by the middleware service, and the middleware service in the full-network data node determines whether the number of the data to be stored in the storage space exceeds a preset value, if yes, adds data of a same data producer to the same block data according to a data producer identifier, and then uploads the block data to a blockchain in batches. Or the middleware service adds the data of the same data producer into the same block data at preset time intervals, and then uploads the block data to a block chain in batches.
Referring to fig. 2, a timing diagram of a key flow of a two-level light node architecture blockchain network data storage method according to an embodiment includes the following steps:
s201, generating data, namely generating data to be stored, wherein the data to be stored can be generated by equipment such as a smart phone, a notebook computer, a digital audiovisual place management terminal and the like, 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 data to be stored and stores the received data to be stored in a data pool. The data to be stored is stored in a data pool of the light node according to a certain data format of each row, and the data format can comprise: JSON, string, binary, etc. And meanwhile, the data pool is automatically monitored, when the data pool reaches a certain data volume, such as 10M, or every 10 minutes, a plurality of processes are started to perform batch data processing on the data to be stored, the data processing comprises classifying the data to be stored according to the identification of a data producer, so that the data corresponding to the same data producer is stored in a storage unit as much as possible, then the classified data to be stored is subjected to encryption processing to obtain encrypted data, and the encrypted data is compressed to obtain a compressed packet. The encryption processing performed on the data to be stored in batches is the same as the encryption processing described in the above embodiment, so that a description thereof will not be repeated. The compressed packets are then uploaded to the full network data node (i.e., the uplink server) in bulk.
S203, after receiving the compressed packet (namely the data to be stored after encryption processing and compression processing), the full-network data node A decompresses the compressed packet, verifies the signature of the data to be stored in the compressed packet, discards the data if the signature is wrong, decrypts the data if the signature verification is passed, further obtains the data to be stored after classification on the light node, and finally uploads the data to be stored after classification to the blockchain network by the full-network data node A. ,
s204, the full-network data node B, the full-network data node C and other full-network data nodes in the block chain synchronously forward the uploaded block data to other data nodes through a synchronization mechanism, so that the uplink storage and synchronization of the block data are realized.
S205, only the block data under the ownership of the light node needs to be synchronously pulled and stored for the light node, for example: the primary light node or the secondary light node actively pulls block data with the light node identifier in a certain period of time on the data node, and meanwhile, the block data can be converted into a data format which can be conveniently read and displayed, for example: files, data tables and the like, and data backtracking, auditing and the like can be conveniently performed. In addition, the light nodes at all levels do not need to store the uplink data to be stored locally 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 blockchain can be applied to different fields and different types of data storage, and as shown in fig. 3, the network architecture diagram of the application of the data storage method based on the blockchain in KTV song order counting is shown. The network architecture schematic diagram comprises KTV song order equipment, the order equipment sends the generated song order count data (namely data to be stored) to a place gateway of the KTV, the place gateway is a light node in a blockchain in the embodiment, middleware services can be deployed, the place gateway sends the encrypted and compressed song order count data to a uplink server (namely a whole network data node), the uplink server decompresses, verifies and decrypts the song order count data, and then the batch processing is carried out to form blockdata which is uplink to the blockchain, and other nodes in the blockchain forward and store the blockchain through a synchronous mechanism.
As shown in fig. 4, in another embodiment, there is provided a computer storage medium 100, on which a computer program is stored which, when executed by a processor, implements the blockchain-based data storage method described in any of the above embodiments.
It should be noted that, although the foregoing embodiments have been described herein, the scope of the present invention is not limited thereby. Therefore, based on the innovative concepts of the present invention, alterations and modifications to the embodiments described herein, or equivalent structures or equivalent flow transformations made by the present description and drawings, apply the above technical solution, directly or indirectly, to other relevant technical fields, all of which are included in the scope of the invention.

Claims (7)

1. A blockchain-based data storage method, comprising the steps of:
setting a full-network data node, a light node and a middleware service in a block chain, wherein the full-network data node is used for storing all block data in the block chain, and the light node is used for storing part of block data in the block chain;
the middleware service is a section of program code and supports deployment on a light node or a full-network data node; the middleware service receives data to be stored and temporarily stores the data to be stored in a storage space;
when the middleware service part belongs to a full network data node, 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 full network data node; or the middleware service encrypts the data to be stored at intervals of preset time to obtain encrypted data, and sends the encrypted data to the whole network data node;
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;
when the middleware service part belongs to the light node, the middleware service regulates the data to be stored, which belong to the same data producer, into the same block data and uploads the same block data into a block chain.
2. The blockchain-based data storage method of claim 1, wherein the encrypting the data to be stored to obtain the encrypted data specifically comprises: encrypting and compressing 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 a code comprising: huffman coding, LZ77, LZW, LZMA and any one of them.
3. The blockchain-based data storage method of claim 1, wherein 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, and the light node returns the data uploaded by the data producer according to the data producer identifier.
4. A blockchain-based data storage method according to claim 3, wherein 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 no relevant data is retrieved in the light node, the light node sends a data backtracking request to a whole network data node through middleware service, the whole network data node searches for block data containing the data producer identifier, and sends corresponding block data to the requesting light node through middleware service, and the light node stores the block data and sends the block data to the corresponding data producer.
5. The blockchain-based data storage method of claim 1, wherein the light nodes include a primary light node and a secondary light node, one primary light node being connectable to more than two secondary light nodes, the secondary light node being connected to more than one data producer, the requested light node issuing corresponding block data to the data producer when the data producer requests data from the primary light node or the secondary light node.
6. The blockchain-based data storage method of any of claims 1-5, wherein the light node or data producer can only view each stored or produced block data.
7. A computer storage medium having stored thereon a computer program which when executed by a processor implements a blockchain-based data storage method as claimed in any of claims 1-6.
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 CN114697350A (en) 2022-07-01
CN114697350B true 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6326173B1 (en) * 2017-10-31 2018-05-16 株式会社インフォマート Data transmission / reception system and data transmission / reception method
CN111600720A (en) * 2020-05-20 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10437630B2 (en) * 2016-04-10 2019-10-08 Bank Of America Corporation System for transforming large scale electronic processing using application block chain and multi-structured data stores
CN111917864B (en) * 2017-02-22 2023-08-22 创新先进技术有限公司 Service verification method and device
CN109191144B (en) * 2018-08-03 2022-07-01 食品安全与营养(贵州)信息科技有限公司 Laboratory information service management system based on block chain and working method
CN109521956B (en) * 2018-10-18 2022-03-18 上海达家迎信息科技有限公司 Cloud storage method, device, equipment and storage medium based on block chain
CN109347868B (en) * 2018-11-27 2021-06-08 咪咕文化科技有限公司 Information verification method, device and storage medium
US10505726B1 (en) * 2018-12-07 2019-12-10 Nike, Inc. System and method for providing cryptographically secured digital assets
CN109783077B (en) * 2018-12-14 2023-07-11 平安科技(深圳)有限公司 Block chain system, middleware system thereof, data uplink method and storage medium
CN110826082A (en) * 2019-09-29 2020-02-21 核芯互联科技(青岛)有限公司 Privacy protection method and device for block chain
CN111597567B (en) * 2020-05-14 2022-03-04 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN112737916B (en) * 2020-11-23 2022-01-07 腾讯科技(深圳)有限公司 Data processing method based on block chain network and related device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6326173B1 (en) * 2017-10-31 2018-05-16 株式会社インフォマート Data transmission / reception system and data transmission / reception method
CN111600720A (en) * 2020-05-20 2020-08-28 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium

Also Published As

Publication number Publication date
CN114697350A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US9648027B2 (en) Segment authentication for dynamic adaptive streaming
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
US10764261B2 (en) System and method for enabling a scalable public-key infrastructure on a smart grid network
Zhang et al. Towards secure data distribution systems in mobile cloud computing
US11303617B2 (en) Methods and apparatuses for oblivious transfer using trusted environment
CN112732695B (en) Cloud storage data security deduplication method based on block chain
Ma et al. A new private information encryption method in internet of things under cloud computing environment
CN112532389B (en) Smart power grid lightweight privacy protection data aggregation method based on block chain
CN112632129A (en) Code stream data management method, device and storage medium
CN104601681A (en) File fragmentation processing method and device
CN111711611A (en) Data processing method, device, medium, equipment and application based on block chain
WO2019020194A1 (en) Data stream integrity
US8380983B2 (en) File encryption system and method
CN115514568A (en) Block chain-based power information safety system and method
Wang et al. Preserving scheme for user’s confidential information in smart grid based on digital watermark and asymmetric encryption
Cairns et al. Flexible data authentication evaluated for the smart grid
Bian et al. Data integrity audit based on data blinding for cloud and fog environment
CN114697350B (en) Data storage method and storage medium based on blockchain
CN112217862A (en) Data communication method, device, terminal equipment and storage medium
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
CN112187750B (en) Information encryption method and system based on Internet
CN110598043B (en) Video processing method, device, computer equipment and storage medium
Yang et al. A source authentication scheme based on message recovery digital signature for multicast

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