CN114363363B - Data storage method, device, equipment and medium based on multiple chains - Google Patents

Data storage method, device, equipment and medium based on multiple chains Download PDF

Info

Publication number
CN114363363B
CN114363363B CN202111679867.0A CN202111679867A CN114363363B CN 114363363 B CN114363363 B CN 114363363B CN 202111679867 A CN202111679867 A CN 202111679867A CN 114363363 B CN114363363 B CN 114363363B
Authority
CN
China
Prior art keywords
data
mixed
initial
nodes
complete graph
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
CN202111679867.0A
Other languages
Chinese (zh)
Other versions
CN114363363A (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.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian 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 Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Priority to CN202111679867.0A priority Critical patent/CN114363363B/en
Publication of CN114363363A publication Critical patent/CN114363363A/en
Application granted granted Critical
Publication of CN114363363B publication Critical patent/CN114363363B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data storage method, a device, equipment and a medium based on multiple chains, wherein the method comprises the following steps: the method comprises the steps of randomly dividing data to be stored to obtain N parts of initial data, numbering the initial data to generate preset parts of random data, selecting one part of random data to be combined with the initial data for each part of initial data to obtain mixed data, generating the serial numbers of the mixed data according to the serial numbers of the initial data, sequentially selecting the mixed data according to the serial numbers of the mixed data, sequentially storing the selected mixed data on a chain corresponding to nodes of the complete graph in a mode of the complete graph, updating the complete graph when nodes are newly added or deleted, and storing the mixed data according to the number of the nodes of the updated complete graph. When the invention is adopted to send and change the number of the nodes of the multiparty multi-link, the stored data can be updated and distributed rapidly, and the balance of the inter-link data storage is ensured.

Description

Data storage method, device, equipment and medium based on multiple chains
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a data storage method, apparatus, computer device, and medium based on multiple chains.
Background
With the development of blockchain technology, more and more chains, including public chains, alliance chains and private chains, start to be layered, so that interconnection operation between chains and inter-chain data interaction are more and more emphasized and required, meanwhile, in order to meet storage requirements, a plurality of participant nodes are now appeared, each participant node has a storage mechanism (multi-party multi-chain storage) in which one or more chains participate, in the existing mode, when the participant nodes are newly added or withdrawn, the balance of storage data in the multi-party multi-chain storage is destroyed, that is, the holding amount of the multi-party data is difficult to balance, or the data storage is difficult to rebalance, which forms a certain security risk for data integrity, and meanwhile, the efficiency of blockchain transaction is also influenced.
Disclosure of Invention
The embodiment of the invention provides a data storage method, a data storage device, computer equipment and a storage medium based on multiple chains, so as to improve the balance of data storage among each chain on the multiple chains.
In order to solve the above technical problems, an embodiment of the present application provides a data storage method based on multiple chains, including:
randomly dividing data to be stored to obtain N parts of initial data, and numbering the initial data, wherein N is more than or equal to 1 and less than or equal to K, N is an integer, and K is the number of multi-chain nodes for storing the data;
generating a number of parts of random data, wherein the number of random numbers contained in each part of random data is greater than or equal to K;
selecting a piece of random data for each piece of initial data, combining the random data with the initial data to obtain mixed data, and generating the serial number of the mixed data according to the serial number of the initial data;
sequentially selecting mixed data according to the serial number sequence of the mixed data, and sequentially storing the selected mixed data on a chain corresponding to a node of a complete graph in a complete graph mode, wherein the complete graph is G K One for each node;
and when nodes are added or deleted, updating the complete graph, and storing the mixed data according to the number of updated complete graph nodes.
Optionally, the preset number is KN.
Optionally, for each initial data, selecting a random data to be combined with the initial data, and obtaining the mixed data includes:
for each initial data, randomly selecting K data from one piece of random data to serve as data to be mixed corresponding to the initial data;
and mixing the initial data with the data to be mixed corresponding to the initial data to obtain the mixed data.
Optionally, the sequentially selecting the mixed data according to the serial number sequence of the mixed data, and storing the selected mixed data on the chain corresponding to the nodes of the complete graph by adopting a complete graph mode includes:
acquiring the serial number i of the mixed data;
if i is less than or equal to N-1, carrying out data randomization on the mixed data with the number i to obtain processed data;
adding the processed data to the full graph node G i Corresponding data are pointed to the graph, and a data storage block is constructed for storage.
Optionally, the multi-chain based data storage method further comprises:
carrying out hash calculation on the data to be stored to obtain a hash value of the data to be stored;
and releasing the hash value of the data to be stored into each chain of the multiple chains for storage.
Optionally, after updating the complete graph and storing the mixed data according to the updated number of the nodes of the complete graph when the nodes are added or deleted, the multi-chain data storage method comprises the following steps:
reading the mixed data from each complete graph node, and performing data reduction processing to obtain data to be verified;
calculating a hash value of the data to be verified;
and comparing the hash value of the data to be verified with the hash value of the data to be stored, and determining the integrity of the data according to the comparison result.
In order to solve the above technical problem, an embodiment of the present application further provides a data storage device based on multiple chains, including:
the data segmentation module is used for randomly segmenting data to be stored to obtain N initial data and numbering the initial data, wherein N is more than or equal to 1 and less than or equal to K, N is an integer, and K is the number of multi-chain nodes for storing the data;
the data generation module is used for generating random data with preset parts, wherein the number of the random numbers contained in each part of random data is larger than or equal to K;
the data mixing module is used for selecting a piece of random data for each piece of initial data to be combined with the initial data to obtain mixed data, and generating the serial number of the mixed data according to the serial number of the initial data;
the data storage module is used for sequentially selecting the mixed data according to the serial number sequence of the mixed data, and sequentially storing the selected mixed data on a chain corresponding to a node of the complete graph in a complete graph mode, wherein the complete graph is G K One for each node;
and the storage updating module is used for updating the complete graph when the nodes are added or deleted, and storing the mixed data according to the updated number of the nodes of the complete graph.
Optionally, the data mixing module includes:
the data selecting unit is used for randomly selecting K data from one piece of random data aiming at each piece of initial data to serve as data to be mixed corresponding to the initial data;
and the data mixing unit is used for mixing the initial data and the data to be mixed corresponding to the initial data to obtain the mixed data.
Optionally, the data storage module includes:
a number acquisition unit configured to acquire a number i of the mixed data;
a data randomizing unit, configured to randomize the data of the mixed data with the number i if i is less than or equal to N-1, to obtain processed data;
a data storage unit for adding the processing data to the full graph node G i The corresponding data is directed to the graph in which,and constructing a data storage block for storage.
Optionally, the multi-chain based data storage device further comprises:
the first hash calculation module is used for carrying out hash calculation on the data to be stored to obtain a hash value of the data to be stored;
and the hash value storage module is used for publishing the hash value of the data to be stored to each chain in the multi-chain for storage.
Optionally, the multi-chain based data storage device comprises:
the data reduction module is used for reading the mixed data from each complete graph node and carrying out data reduction processing to obtain data to be verified;
the second hash calculation module is used for calculating the hash value of the data to be verified;
and the integrity checking module is used for comparing the hash value of the data to be verified with the hash value of the data to be stored, and determining the integrity of the data according to the comparison result.
In order to solve the above technical problem, the embodiments of the present application further provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the steps of the above multi-chain based data storage method are implemented when the processor executes the computer program.
To solve the above technical problem, embodiments of the present application further provide a computer readable storage medium storing a computer program, which when executed by a processor, implements the steps of the above multi-chain based data storage method.
According to the multi-chain-based data storage method, device, computer equipment and storage medium, N parts of initial data are obtained by randomly dividing data to be stored, the initial data are numbered, a preset part of random data are generated, one part of random data is selected for each part of initial data and combined with the initial data to obtain mixed data, the mixed data are generated according to the serial numbers of the initial data, the mixed data are sequentially selected according to the serial numbers of the mixed data, the selected mixed data are sequentially stored on a chain corresponding to nodes of the complete graph in a mode of the complete graph, when nodes are newly added or deleted, the complete graph is updated, and the mixed data are stored according to the number of the nodes of the updated complete graph. When the number of the nodes of the multiparty multi-link is changed, the stored data is updated and distributed rapidly, and the balance of the inter-link data storage is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a multi-chain based data storage method of the present application;
FIG. 3 is a schematic diagram of one embodiment of a multi-chain based data storage device according to the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, as shown in fig. 1, fig. 1 is a schematic diagram of an application environment of a multi-chain-based data storage method in an embodiment of the present invention, the multi-chain-based data storage method provided in the present application may be applied in an application environment as shown in fig. 1, where a blockchain is composed of a plurality of nodes capable of communicating with each other, each node may be regarded as a block storage, each block storage is used for storing data, all data is contained between data nodes, the block storage data has a complete history record and may be quickly restored and expanded, the regional chain is divided into public chains, private chains and alliance chains, any node is open, each mechanism/node may participate in the computation of the blockchain, and any mechanism/node may download to obtain complete blockchain data, the private chains may not participate in the system, and may not be applied to public, and public data management and open audit or test of a specific mechanism, the alliance chain may participate in each node and all peer to each other, all data may be completely exited from the public and private links may be completely, and a hash function may be further added to a hash chain in a digital system, and a hash function may be further used to store data in a full-based network, and a hash function has a full-of data storage format.
Referring to fig. 2, fig. 2 shows a multi-chain data storage method according to an embodiment of the present invention, and the method is applied in the scenario of fig. 1 for illustration, and is described in detail as follows:
s201: randomly dividing data to be stored to obtain N parts of initial data, and numbering the initial data, wherein N is more than or equal to 1 and less than or equal to K, N is an integer, and K is the number of multi-chain nodes for storing the data.
Specifically, in this embodiment, the parties involved in data storage mainly include a data provider and a data storage party, where the data provider provides data to be stored, the data storage party provides chains for data storage, and each data storage party may be one chain for storage, or may be multiple chains for storage, and specifically may be set according to actual requirements, and each data storage party serves as a node.
The number N obtained after random division can be set according to actual needs, and in this embodiment, N is greater than or equal to 1 and less than or equal to K.
It should be noted that, the length of each initial data obtained by random segmentation in this embodiment is random, that is, the lengths of the initial data may be equal or different, so that the flexibility is higher, and the data segmentation is faster.
S202: generating random data of preset parts, wherein the number of random numbers contained in each part of random data is larger than or equal to K.
Preferably, the preset number is KN, i.e. random data of nonsensical random unequal length are generated for KN shares.
S203: and selecting one piece of random data for each piece of initial data, combining the random data with the initial data to obtain mixed data, and generating the serial number of the mixed data according to the serial number of the initial data.
Specifically, for each initial data, selecting a random data and combining the initial data to obtain mixed data, wherein the steps include:
for each initial data, randomly selecting K data from one piece of random data to serve as data to be mixed corresponding to the initial data;
mixing the initial data and the data to be mixed corresponding to the initial data to obtain mixed data.
It should be noted that, there is no necessary correlation between the K data selected each time, that is, each time, the K data are independently selected, and the selected data to be mixed may or may not overlap.
S204: sequentially selecting mixed data according to the serial number sequence of the mixed data, and sequentially storing the selected mixed data on a chain corresponding to a node of a complete graph in a complete graph mode, wherein the complete graph is G K One for each node.
If the data distribution needs to be hidden, the data is stored under the chain or encrypted and stored on the chain.
Further, sequentially selecting the mixed data according to the serial number sequence of the mixed data, and storing the selected mixed data on a chain corresponding to the nodes of the complete graph by adopting a complete graph mode comprises the following steps:
acquiring a serial number i of the mixed data;
if i is less than or equal to N-1, carrying out data randomization on the mixed data with the number i to obtain processed data;
adding processing data to full graph node G i Corresponding data are pointed to the graph, and a data storage block is constructed for storage.
Wherein the complete graph is a simple undirected graph in which each pair of distinct vertices is connected by exactly one edge. In this embodiment, K nodes are used, each node being an endpoint, to obtain the complete graph G K The complete graph of K endpoints has K endpoints and K (K-1)/2 edges, denoted KN. It should be understood that the number of the devices,when the number of the subsequent nodes changes, the endpoints of the complete graph are correspondingly added or deleted, and meanwhile, the transfer storage of the data corresponding to the nodes can be rapidly realized by utilizing the intercommunication characteristic among the complete graphs, so that the balance of the data is ensured, and the data storage efficiency is improved.
S205: and when nodes are added or deleted, updating the complete graph, and storing the mixed data according to the number of the updated complete graph nodes.
For example, B needs to be added to the original k+1 Node, then need to be at G k G is regenerated on the basis of (a) k+1 And then distributing and storing the newly added data according to the updated complete graph.
Also, for example, B needs to be subtracted from the original i Node B i The data of the nodes can be continuously dispersed into the rest nodes, and the dispersing sequence can be recorded in the B which still exists i Is a kind of medium.
In one embodiment, the multi-chain based data storage method further comprises:
carrying out hash calculation on data to be stored to obtain a hash value of the data to be stored;
the hash value of the data to be stored is issued into each of the multiple chains for storage.
In another embodiment, when a node is added or deleted, the complete graph is updated, and the mixed data is stored according to the updated number of the nodes of the complete graph, and then the multi-chain data storage method comprises the following steps:
reading mixed data from each complete graph node, and performing data reduction processing to obtain data to be verified;
calculating a hash value of the data to be verified;
and comparing the hash value of the data to be verified with the hash value of the data to be stored, and determining the integrity of the data according to the comparison result.
In this embodiment, the data to be stored is randomly segmented to obtain N parts of initial data, and the initial data is numbered to generate a preset number of partsSelecting a part of random data for each part of initial data, combining the random data with the initial data to obtain mixed data, generating the serial number of the mixed data according to the serial number of the initial data, sequentially selecting the mixed data according to the serial number sequence of the mixed data, and sequentially storing the selected mixed data on a chain corresponding to a node of a complete graph by adopting a mode of the complete graph, wherein the complete graph is G K And each node corresponds to one chain, when nodes are added or deleted, the complete graph is updated, and the mixed data is stored according to the number of the updated complete graph nodes. When the number of the nodes of the multiparty multi-link is changed, the stored data is updated and distributed rapidly, and the balance of the inter-link data storage is ensured.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Fig. 3 shows a functional block diagram of a multi-chain based data storage device in one-to-one correspondence with the multi-chain based data storage method of the above embodiment. As shown in fig. 3, the multi-chain based data storage device includes a data dividing module 31, a data generating module 32, a data mixing module 33, a data storage module 34, and a storage updating module 35. The functional modules are described in detail as follows:
the data segmentation module 31 is configured to randomly segment data to be stored to obtain N parts of initial data, and number the initial data, where N is an integer, and K is the number of multiple nodes for storing data;
the data generation module 32 is configured to generate a preset number of pieces of random data, where each piece of random data includes a number of random numbers greater than or equal to K;
the data mixing module 33 is configured to select a piece of random data for each piece of initial data, combine the random data with the initial data to obtain mixed data, and generate a serial number of the mixed data according to the serial number of the initial data;
a data storage module 34 for pressingSequentially selecting mixed data according to the serial number sequence of the mixed data, and sequentially storing the selected mixed data on a chain corresponding to a node of a complete graph by adopting a complete graph mode, wherein the complete graph is G K One for each node;
the storage updating module 35 is configured to update the complete graph when nodes are added or deleted, and store the mixed data according to the updated number of nodes of the complete graph.
Optionally, the data mixing module 33 includes:
the data selecting unit is used for randomly selecting K data from one piece of random data aiming at each piece of initial data, and the K data are used as data to be mixed corresponding to the initial data;
and the data mixing unit is used for mixing the initial data and the data to be mixed corresponding to the initial data to obtain mixed data.
Optionally, the data storage module 34 includes:
a number acquisition unit configured to acquire a number i of the mixed data;
the data randomizing unit is used for randomizing the mixed data with the number i to obtain processed data if i is less than or equal to N-1;
and the data storage unit is used for adding the processing data into the data pointing graph corresponding to the complete graph node Gi, and constructing a data storage block for storage.
Optionally, the multi-chain based data storage device further comprises:
the first hash calculation module is used for carrying out hash calculation on the data to be stored to obtain a hash value of the data to be stored;
and the hash value storage module is used for issuing the hash value of the data to be stored into each of the multiple chains for storage.
Optionally, the multi-chain based data storage device comprises:
the data reduction module is used for reading the mixed data from each complete graph node and carrying out data reduction processing to obtain data to be verified;
the second hash calculation module is used for calculating a hash value of the data to be verified;
and the integrity checking module is used for comparing the hash value of the data to be verified with the hash value of the data to be stored, and determining the integrity of the data according to the comparison result.
For specific limitations on the multi-chain based data storage device, reference may be made to the limitations of the multi-chain based data storage method hereinabove, and no further description is given here. The various modules in the multi-chain based data storage device described above may be implemented in whole or in part in software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only a computer device 4 having a component connection memory 41, a processor 42, a network interface 43 is shown in the figures, but it is understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or D interface display memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used for storing an operating system and various types of application software installed on the computer device 4, such as program code for storing data based on multiple chains. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute a program code stored in the memory 41 or process data, such as a program code for executing control of an electronic file.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
The present application also provides another embodiment, namely, a computer-readable storage medium storing an interface display program executable by at least one processor to cause the at least one processor to perform the steps of the multi-chain based data storage method as described above.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (10)

1. A multi-chain based data storage method, the multi-chain based data storage method comprising:
randomly dividing data to be stored to obtain N parts of initial data, and numbering the initial data, wherein N is more than or equal to 1 and less than or equal to K, N is an integer, and K is the number of multi-chain nodes for storing the data;
generating random data of preset parts, wherein the number of random numbers contained in each part of random data is greater than or equal to K;
selecting a piece of random data for each piece of initial data, combining the random data with the initial data to obtain mixed data, and generating the serial number of the mixed data according to the serial number of the initial data;
sequentially selecting mixed data according to the serial number sequence of the mixed data, and sequentially storing the selected mixed data on a chain corresponding to a node of a complete graph in a complete graph mode, wherein the complete graph is G K One for each node;
and when nodes are added or deleted, updating the complete graph, and storing the mixed data according to the number of updated complete graph nodes.
2. The multi-chain based data storage method of claim 1, wherein the predetermined number of copies is KN.
3. The multi-chain based data storage method of claim 2, wherein selecting a random data for each of the initial data and combining with the initial data to obtain the mixed data comprises:
for each initial data, randomly selecting K data from one piece of random data to serve as data to be mixed corresponding to the initial data;
and mixing the initial data with the data to be mixed corresponding to the initial data to obtain the mixed data.
4. The multi-chain based data storage method as set forth in claim 1, wherein sequentially selecting the mixed data according to the serial number sequence of the mixed data, and storing the selected mixed data on the chain corresponding to the nodes of the complete graph by adopting a complete graph mode comprises:
acquiring the serial number i of the mixed data;
if i is less than or equal to N-1, carrying out data randomization on the mixed data with the number i to obtain processed data;
adding the processed data to the full graph node G i Corresponding data are pointed to the graph, and a data storage block is constructed for storage.
5. The multi-chain based data storage method of any one of claims 1 to 4, further comprising:
carrying out hash calculation on the data to be stored to obtain a hash value of the data to be stored;
and releasing the hash value of the data to be stored into each chain of the multiple chains for storage.
6. The multi-chain based data storage method as claimed in claim 5, wherein after updating the full graph and storing the mixed data by the updated number of nodes of the full graph when the nodes are newly added or deleted, the multi-chain based data storage method comprises:
reading the mixed data from each complete graph node, and performing data reduction processing to obtain data to be verified;
calculating a hash value of the data to be verified;
and comparing the hash value of the data to be verified with the hash value of the data to be stored, and determining the integrity of the data according to the comparison result.
7. A multi-chain based data storage device, the multi-chain based data storage device comprising:
the data segmentation module is used for randomly segmenting data to be stored to obtain N initial data and numbering the initial data, wherein N is more than or equal to 1 and less than or equal to K, N is an integer, and K is the number of multi-chain nodes for storing the data;
the data generation module is used for generating random data with preset parts, wherein the number of the random numbers contained in each part of random data is larger than or equal to K;
the data mixing module is used for selecting a piece of random data for each piece of initial data to be combined with the initial data to obtain mixed data, and generating the serial number of the mixed data according to the serial number of the initial data;
the data storage module is used for sequentially selecting the mixed data according to the serial number sequence of the mixed data, and sequentially storing the selected mixed data on a chain corresponding to a node of the complete graph in a complete graph mode, wherein the complete graph is G K One for each node;
and the storage updating module is used for updating the complete graph when the nodes are added or deleted, and storing the mixed data according to the updated number of the nodes of the complete graph.
8. The multi-chain based data storage device of claim 7, wherein the data mixing module comprises:
the data selecting unit is used for randomly selecting K data from one piece of random data aiming at each piece of initial data to serve as data to be mixed corresponding to the initial data;
and the data mixing unit is used for mixing the initial data and the data to be mixed corresponding to the initial data to obtain the mixed data.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the multi-chain based data storage method according to any of claims 1 to 6 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the multi-chain based data storage method according to any one of claims 1 to 6.
CN202111679867.0A 2021-12-31 2021-12-31 Data storage method, device, equipment and medium based on multiple chains Active CN114363363B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111679867.0A CN114363363B (en) 2021-12-31 2021-12-31 Data storage method, device, equipment and medium based on multiple chains

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111679867.0A CN114363363B (en) 2021-12-31 2021-12-31 Data storage method, device, equipment and medium based on multiple chains

Publications (2)

Publication Number Publication Date
CN114363363A CN114363363A (en) 2022-04-15
CN114363363B true CN114363363B (en) 2024-03-22

Family

ID=81104432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111679867.0A Active CN114363363B (en) 2021-12-31 2021-12-31 Data storage method, device, equipment and medium based on multiple chains

Country Status (1)

Country Link
CN (1) CN114363363B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770154A (en) * 2017-09-22 2018-03-06 中国科学院信息工程研究所 Block chain reliable data storage method, terminal and system based on cloud storage
WO2020022958A1 (en) * 2018-07-27 2020-01-30 Aioz Pte Ltd Method and apparatus for transaction verification in a blockchain-based network
CN110737658A (en) * 2019-09-06 2020-01-31 平安国际智慧城市科技股份有限公司 Data fragment storage method, device, terminal and readable storage medium
CN110990846A (en) * 2019-11-15 2020-04-10 北京连山时代科技有限公司 Information storage method, device and computer readable storage medium
CN111191080A (en) * 2019-08-22 2020-05-22 腾讯科技(深圳)有限公司 Data processing method and device
CN112650812A (en) * 2020-12-22 2021-04-13 深圳壹账通智能科技有限公司 Data fragment storage method and device, computer equipment and storage medium
WO2021227557A1 (en) * 2020-05-15 2021-11-18 苏州浪潮智能科技有限公司 Method and apparatus for storing result of hash algorithm

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770154A (en) * 2017-09-22 2018-03-06 中国科学院信息工程研究所 Block chain reliable data storage method, terminal and system based on cloud storage
WO2020022958A1 (en) * 2018-07-27 2020-01-30 Aioz Pte Ltd Method and apparatus for transaction verification in a blockchain-based network
CN111191080A (en) * 2019-08-22 2020-05-22 腾讯科技(深圳)有限公司 Data processing method and device
CN110737658A (en) * 2019-09-06 2020-01-31 平安国际智慧城市科技股份有限公司 Data fragment storage method, device, terminal and readable storage medium
CN110990846A (en) * 2019-11-15 2020-04-10 北京连山时代科技有限公司 Information storage method, device and computer readable storage medium
WO2021227557A1 (en) * 2020-05-15 2021-11-18 苏州浪潮智能科技有限公司 Method and apparatus for storing result of hash algorithm
CN112650812A (en) * 2020-12-22 2021-04-13 深圳壹账通智能科技有限公司 Data fragment storage method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于联盟区块链的放射源溯源数据存储优化;郭子贤;晋宏博;左敏;张青川;;计算机仿真(06);全文 *

Also Published As

Publication number Publication date
CN114363363A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN110414567B (en) Data processing method and device and electronic equipment
CN110427969B (en) Data processing method and device and electronic equipment
CN113489671B (en) Cross-alliance chain communication method and device based on verifiable random function
CN110400217B (en) Rule change processing method and device for intelligent contract
CN113489584B (en) Method and device for processing random numbers in block chain and electronic equipment
CN107819569A (en) The encryption method and terminal device of log-on message
CN106664308B (en) Device authentication prior to enrollment
CN104133765B (en) The test case sending method of network activity and test case server
CN110391895B (en) Data preprocessing method, ciphertext data acquisition method, device and electronic equipment
CN112202682A (en) Interface flow control method and device, computer equipment and storage medium
CN110460435B (en) Data interaction method and device, server and electronic equipment
CN112163240A (en) Block chain based distributed government affair architecture unifying method and system
CN113055431B (en) Block chain-based industrial big data file efficient chaining method and device
CN113055380A (en) Message processing method and device, electronic equipment and medium
CN110275695A (en) Non-duplicate random code generating method, equipment, storage medium and device
CN112507323A (en) Model training method and device based on unidirectional network and computing equipment
CN114363363B (en) Data storage method, device, equipment and medium based on multiple chains
CN113112270B (en) Data organization method based on block chain
CN115204914A (en) Data storage method, device, equipment and medium for drug anti-counterfeiting tracing source block chain
CN113569278A (en) Data sharing method and related equipment of multi-bidding platform based on block chain
CN111949738A (en) Block chain-based data storage deduplication method, terminal device and storage medium
CN112511361A (en) Model training method and device and computing equipment
CN112291241A (en) Firewall wall opening method, firewall wall opening device and terminal equipment
CN112232639A (en) Statistical method and device and electronic equipment
CN113011459B (en) Model training method, device and computing equipment

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