CN108769154A - Date storage method based on directed acyclic graph and distributed account book - Google Patents
Date storage method based on directed acyclic graph and distributed account book Download PDFInfo
- Publication number
- CN108769154A CN108769154A CN201810462696.8A CN201810462696A CN108769154A CN 108769154 A CN108769154 A CN 108769154A CN 201810462696 A CN201810462696 A CN 201810462696A CN 108769154 A CN108769154 A CN 108769154A
- Authority
- CN
- China
- Prior art keywords
- data
- stored
- account book
- directed acyclic
- acyclic 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols 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]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/105—Multiple levels of security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Abstract
The present invention provides a kind of date storage method based on directed acyclic graph and distributed account book, including:According to several data to be stored got in synchronization, several directed acyclic graph vertex are created, the quantity of data to be stored is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored and a directed acyclic graph vertex correspondence;It will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.Date storage method provided by the invention based on directed acyclic graph and distributed account book, pass through several data to be stored that will be got in synchronization, according to the structure of directed acyclic graph, it realizes and is efficiently stored in distributed account book, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source demand.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of data based on directed acyclic graph and distributed account book
Storage method.
Background technology
Currently, distributed account book technology is applied to the potentiality that data are traced to the source and is more and more approved and paid close attention to, especially
It is to trace to the source field in product data.Using distributed account book technology carry out product data trace to the source, it can be achieved that network members node it
Between share, replicate and synchronous product data, one of network members node store the product data of generation to distributed account
It in this, and is synchronized in other network members nodes, makes the network members node that other have permission that can read product number
According to guarantee data are uniquely and anti-tamper, eliminate during product finally reaches consumer from production, processing, retail trader and respectively look forward to
The distrust barrier in industry or a human world improves information flow and trading efficiency.
In the prior art, distributed account book technology is all based on block chain structure.Block chain is passed through by the block formed
Chain structure is formed by connecting, and each block includes generation time, current block root cryptographic Hash, previous block root cryptographic Hash and packet
The transaction record contained.In product information traceability system based on block chain, product traceability information adding method is that product is traced to the source
Information is added into according to the circulation sequence of product in block chain successively, and a link information of product is added into block chain
One block, as area's transaction in the block.Can be that product generates uniquely while block chain is added in product information
ID, while unique ID being also added to as the details of product in a block of block chain.Product traceability information is looked into
It askes in step, the details of product is inquired in block chain, and confirm the uniqueness of the ID of product.Each block chain participant
All hold whole block chains, the new reasonable Transaction Information of any participant's addition can all be synchronized to other participants and be held
Block chain in.The person of being also involved in can also check the product information that other participant is added in block chain, realize mesh of tracing to the source
's.
But based on the date storage method of block chain structure distribution account book, the data that single block can store have
It limits and can not extend, in the case where the information stored by single block has reached the upper limit, remaining data information must be arranged
Team waits until that next block generation can just be added cochain.In practical application, the enormous amount of the product data of required record, production
Product intermediate links are complicated, and a large amount of product data information needs to be recorded into block, if product information cannot be added in time
Enter block, queuing can be constantly in and accumulate, ultimately causes the congestion of block chain network.
Invention content
The object of the present invention is to provide a kind of date storage method based on directed acyclic graph and distributed account book, solves
Distributed account book data storage takes longer and the technical issues of network congestion occurs in the prior art.
In order to solve the above-mentioned technical problem, on the one hand, the present invention provides a kind of based on directed acyclic graph and distributed account book
Date storage method, including:
According to several data to be stored got in synchronization, several directed acyclic graph vertex are created, wait depositing
The quantity for storing up data is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored and a directed acyclic graph top
Point corresponds to;
It will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.
On the other hand, the present invention provides a kind of data storage device of directed acyclic graph and distributed account book, including:
Vertex generation module, for according to several data to be stored got in synchronization, creating several to have
To acyclic figure vertex, the quantity of data to be stored is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored
With a directed acyclic graph vertex correspondence;
Memory module, for storing the data to be stored of each vertex correspondence in directed acyclic graph to distributed account book
In.
In another aspect, the present invention provides a kind of electronics stored for the data based on directed acyclic graph and distributed account book
Equipment, including:
Memory and processor, the processor and the memory complete mutual communication by bus;It is described to deposit
Reservoir is stored with the program instruction that can be executed by the processor, and it is above-mentioned that the processor calls described program instruction to be able to carry out
Method.
Another aspect, the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, the meter
Calculation machine program realizes above-mentioned method when being executed by processor.
Date storage method provided by the invention based on directed acyclic graph and distributed account book, by will be in synchronization
Several data to be stored got are realized and are efficiently stored in distributed account book, and energy according to the structure of directed acyclic graph
Enough all information that related data is inquired from distributed account book meet high frequency time, the data of magnanimity are traced to the source demand.
Description of the drawings
Fig. 1 is the date storage method based on directed acyclic graph and distributed account book according to the embodiment of the present invention;
Fig. 2 is the functional stratification schematic diagram according to the product traceability system of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of the directed acyclic graph used according to the distributed account book of the embodiment of the present invention;
Fig. 4 is according to trade transactions content schematic diagram in the directed acyclic graph of the embodiment of the present invention;
Fig. 5 is according to the flow chart for storing product information in the product traceability system of the embodiment of the present invention;
Fig. 6 is according to the flow chart for reading product information in the product traceability system of the embodiment of the present invention;
Fig. 7 is the data storage device based on directed acyclic graph and distributed account book according to the embodiment of the present invention;
Fig. 8 is provided in an embodiment of the present invention for the electronics based on directed acyclic graph and the data storage of distributed account book
The structural schematic diagram of equipment.
Specific implementation mode
In order to keep the purpose, technical scheme and advantage of the embodiment of the present invention clearer, implement below in conjunction with the present invention
Attached drawing in example, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment
It is a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiment of the present invention, those of ordinary skill in the art
The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the date storage method based on directed acyclic graph and distributed account book according to the embodiment of the present invention, such as Fig. 1
Shown, the embodiment of the present invention provides a kind of date storage method based on directed acyclic graph and distributed account book, executive agent
For the data storage device based on directed acyclic graph and distributed account book, which can be set to any one network members section
Point in.The method includes:
Step S101, according to several data to be stored got in synchronization, several directed acyclic graphs are created
Vertex, the quantity of data to be stored is identical with the newly-built quantity on directed acyclic graph vertex, and a data to be stored has with one
To acyclic figure vertex correspondence;
It step S102, will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.
Specifically, in the distributed account book technology that the embodiment of the present invention is provided, there are multiple network members in a network
Node, each network members node hold that there are one distributed account books respectively, and the structure of the distribution account book is directed acyclic graph knot
Structure is stored data into the structure of directed acyclic graph in distributed account book.The network members node having permission can will produce
In raw data storage to the distributed account book held, and distributed account book is updated, while by updated point
Cloth account book synchronizes between other network members nodes, to realize the shared of data in distributed account book, has permission
Network members node can inquire the data in the distributed account book after synchronizing according to permission.Wherein, distributed account book is arrived in storage
In data, can be a trade transactions, can also be the single stepping in a trade transactions, can also be product give birth to
Production, a link in sales process data etc..The user of network members node can be any process of exchange, product
Participant in production process and sales process etc., for example, it may be negotiator, product producer, yield retail trader, logistics public affairs
Department and consumer etc..
First, this method needs to obtain data to be stored, in synchronization if there is several data to be stored needs are deposited
Storage can obtain several data to be stored, and according to several data to be stored got in synchronization, create simultaneously
Several directed acyclic graph vertex, the quantity of data to be stored is identical with the newly-built quantity on directed acyclic graph vertex, and one is waited for
Store data and a directed acyclic graph vertex correspondence.
It then, will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.Thus
Ensure, generate at any time it is to be stored can in time be stored into distributed account book, data to be stored are with oriented
The structure of acyclic figure is stored in distributed account book, a data to be stored and a directed acyclic graph vertex correspondence, even if
There are multiple data to be stored to need to store in synchronization, it is only necessary to create multiple directed acyclic graph vertex, be waited for respectively with multiple
It stores data to correspond, conflict when effectively data can be avoided to store.
Date storage method provided in an embodiment of the present invention based on directed acyclic graph and distributed account book, by will be same
Several data to be stored that one moment got are realized according to the structure of directed acyclic graph and are efficiently stored in distributed account book
In, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source need
It asks.
On the basis of the above embodiments, further, each data to be stored includes at least timestamp and data details
Two parts, wherein timestamp is the time that data to be stored generates, and data details are the particular content of data to be stored.
Specifically, each data to be stored includes at least timestamp and data details two parts, wherein timestamp is to wait depositing
The time that storage data generate rushes to establish directed acyclic graph according to the sequencing of timestamp when preventing data from storing
It is prominent.Data details are the particular content of data to be stored.To facilitate user to pass through in network members querying node distribution account book
The particular content of data.Data details are including but not limited to Transaction Information, product machining information, product unique identification number, matter
Examine authentication information, production responsible person ID, product feature description, product Shipping Information and Distribution logistics information etc..
Date storage method provided in an embodiment of the present invention based on directed acyclic graph and distributed account book, by will be same
Several data to be stored that one moment got are realized according to the structure of directed acyclic graph and are efficiently stored in distributed account book
In, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source need
It asks.
On the basis of the above various embodiments, further, described several numbers to be stored got in synchronization
Each data to be stored in is by the data to be stored after verification, and verification method is as follows:
Judge whether target data to be stored exists with any data in the distributed account book to conflict;
If judgement knows that the target data to be stored does not conflict with any data in the distributed account book, described
Target data to be stored is to pass through the data to be stored after verification.
Specifically, before storing data, need to verify data to be stored, only passes through the number of verification
According to can just be stored.Specific verification method is as follows:
Judge whether target data to be stored exists with any data in distributed account book to conflict, if judging to know that target waits for
Storage data do not conflict with any data in distributed account book, then target data to be stored is to pass through the number to be stored after verification
According to if judging, knowing that target data to be stored exists with any data in distributed account book conflicts, and target data to be stored is tested
Card does not pass through.
For example, in a transaction application scene, if data to be stored is transaction data, a certain user passes through network members
Node by a certain fund, go out by cost, and has been recorded in distributed account book, which thinks the cost funds again
And be recorded in distributed account book, the data storage of this front and back cost twice can clash, then after a cost data
It will not be verified and pass through.For another example in a products in circulation application scenarios, product producer retouches the performance of a product
Information is stated, is recorded in distributed account book, the user of other network members nodes such as logistics company and buyer passes through what is shared
Distributed account book can read the performance description information of the product.In the later stage, if quality problems occurs in the product, manufacturer thinks more
Change original properties of product description information, to shirk responsibility, then new properties of product description information and distributed account book is recorded
In primary products performance description information will clash, new properties of product description information, which will not be verified, to be passed through.
Date storage method provided in an embodiment of the present invention based on directed acyclic graph and distributed account book, by will be same
Several data to be stored that one moment got are realized according to the structure of directed acyclic graph and are efficiently stored in distributed account book
In, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source need
It asks.Meanwhile pass through data storage verification, it can be ensured that data it is unique and anti-tamper.
On the basis of the above various embodiments, further, described several numbers to be stored got in synchronization
Each data to be stored in is by encrypted data, and cipher mode is symmetric cryptography or asymmetric encryption.
Specifically, data are obtained by unrelated node in network members node in order to prevent, need to data to be stored into
Row encryption, encrypted mode are symmetric cryptography or asymmetric encryption.
Symmetric encryption method, that is, all-network member node uses the same encryption key, all-network member node
To check the full content of other network members node institutes interpolation data by key, unrelated network members node is not because have
Even if the key, which obtains the data in distributed account book, can not also parse data content.Asymmetric encryption mode, that is, all nets
Network member node obtains a public key and private key, and public key opens all-network member node, can be carried out to product information
Encryption, private key determine the digital independent permission of the network members node, data content are checked according to private key permission.
Date storage method provided in an embodiment of the present invention based on directed acyclic graph and distributed account book, by will be same
Several data to be stored that one moment got are realized according to the structure of directed acyclic graph and are efficiently stored in distributed account book
In, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source need
It asks.Meanwhile by the way that data are encrypted, the unique and anti-tamper of data is enough ensured.
It is further, described to wait depositing by each vertex correspondence in directed acyclic graph on the basis of the above various embodiments
After storing up in data storage to distributed account book, further include:
The distributed account book is synchronized in other network members nodes.
Specifically, any network members node by encryption and data to be stored storage after verification arriving
After in its distributed account book held, it can be synchronized to immediately in the distributed account book that other network members nodes are held.
To realize that the shared of data in account book, the network members node having permission can inquire the distributed account book after synchronizing according to permission
In data.Even if being distorted to the historical data of the storage in the distributed account book of single network member node, because its
Also there is correct data information in co-net network member node, the data being tampered will not be recognized, so being added to distribution
Product information in formula account book can accomplish unique and can not distort.
Date storage method provided in an embodiment of the present invention based on directed acyclic graph and distributed account book, by will be same
Several data to be stored that one moment got are realized according to the structure of directed acyclic graph and are efficiently stored in distributed account book
In, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source need
It asks.Meanwhile by synchronizing distributed account book between network members node, enough ensuring the unique and anti-tamper of data.
It is further, described to wait depositing by each vertex correspondence in directed acyclic graph on the basis of the above various embodiments
After storing up in data storage to distributed account book, further include:
According to the account information of the user got, the data stored in the distributed account book are read.
Specifically, after distributed account book synchronizes between network members node, user by any one network at
Member's node can read the corresponding data stored in distributed account book according to the permission of oneself.The account information and use of user
The access rights at family are corresponding, that is, possess the user of different access permission, and the data parsing secret key that can be obtained is different, can read
Data in the distributed account book got are also different.
During the data in reading distributed account book, user first has to log in the account information of oneself, system root
Corresponding data are obtained according to account information and parse secret key, then obtain data to be read, are continued using data parsing secret key pair
The data taken are parsed, to read the detailed content of data.
Date storage method provided in an embodiment of the present invention based on directed acyclic graph and distributed account book, by will be same
Several data to be stored that one moment got are realized according to the structure of directed acyclic graph and are efficiently stored in distributed account book
In, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source need
It asks.Meanwhile user can read pair stored in distributed account book by any one network members node according to the permission of oneself
The data answered.
Below by taking product traceability this concrete application as an example, the number based on directed acyclic graph and distributed account book is described in detail
According to storage method.It is specific as follows:
The acquisition of product information, typing and query function may be implemented in product traceability system, and Fig. 2 is to implement according to the present invention
The functional stratification schematic diagram of the product traceability system of example, as shown in Fig. 2, product traceability system can functionally be divided into application
Layer, network layer, data Layer and physical layer, wherein data Layer is applied to based on the distributed account book technology for having the acyclic figure of ring and is led to
Believe layer.
Physical layer includes mainly internet of things sensors, the product information being responsible for during acquisition products in circulation, and by information
It is forwarded to data Layer by network layer, the product data mainly collected include the specifications parameter of temperature, humidity, air pressure and product
Deng.
Network layer includes mainly network structure and agreement, is mainly responsible for the communication protocol (example that sensor uploads sensing data
Such as bluetooth, the tradition such as Zigbee and Lora Internet of Things communication protocol), (P2P is assisted the synchronous communication between distributed account book node
View), consumer to traceability system trace to the source the communication protocol (Http) of request.
Data Layer refers mainly to the database of recording product information, and this system is mainly by directed acyclic graph structures distribution account book
Undertake storage function.All only include the information data in product a certain stage in directed acyclic graph in every trade transactions, thing of merchandising
Business is sent by the network members node for being responsible for the stage, and transaction can be stood once being added into directed acyclic graph and being verified
It is synchronized in the directed acyclic graph of other network members nodes.Even if being usurped to the historical transaction record in single node
Change, because also there being correct Transaction Information in remaining node, will not be recognized, so being added to the production in distributed account book
Product information can accomplish unique and can not distort.
Application layer is mainly responsible for main to tissue or the personal interface for providing the distributed account book of access and application, service object
Manufacturer, retail trader including product and payment person.
After the physical layer of product traceability system collects product information, product information is forwarded to by data Layer by network layer
It is stored, from application layer, all participants to during tracing to the source provide interface, make it through network layer access data Layer, into
The access of row product traceability information data.
Fig. 3 is the structural schematic diagram of the directed acyclic graph used according to the distributed account book of the embodiment of the present invention, such as Fig. 3 institutes
Show, the time sequencing of trade transactions is by left-to-right arrangement, and in directed acyclic graph, the concept of block, all transaction is not present
Record is directly added into directed acyclic graph in the form of independent trade transactions, and all trade transactions constitute oriented nothing
The set of ring figure.If network members node allows a new trade transactions to be added into directed acyclic graph, it is necessary to which first verification has
Two random trade transactions into acyclic figure form directed edge new in directed acyclic graph, new and old transaction thing after being verified
Relationship is verified between business to indicate by directed edge;In the verification process network members node inspection verify merchandise whether with
In directed acyclic graph there is conflict in other transaction, if it find that transaction conflict, network members node will not pass through verification.With
Transaction is continuous to be increased, and being verified few transaction will not be recognized by distributed account book system.
Fig. 4 is according to trade transactions content schematic diagram in the directed acyclic graph of the embodiment of the present invention, in the embodiment of the present invention
Directed acyclic graph is 81 cryptographic Hash directed acyclic graphs, as shown in figure 4, when main each trade transactions include mainly the generation of transaction
Between (timestamp), the cryptographic Hash of current trade transactions, the cryptographic Hash for the first previous trade transactions verified, verified
The cryptographic Hash and Transaction Information details of two previous trade transactions, Transaction Information details include that transaction receives account address, hair
Account address is played, additional message of merchandising.
However, it is noted that the distributed account book to acyclic graph structures can not direct retrieval transaction message details, it is necessary to pass through
The account address search that the cryptographic Hash of current trade transactions or transaction are related to is to the All Activity for meeting searching value.
Unique mark number that the product information can first obtain product before being recorded in directed acyclic graph is (such as logical
Cross bar code, RFIC etc.), product information and number are sent to distributed node together.Distributed node receives number can be first true
Admitting what one has said or done, whether this has been that the product creates retrieval number, if it is not, being first equipment registration retrieval number;If so, being then
Retrieval number increases new product information.Product information is obtained by other irrelevant personnel in distributed account book in order to prevent, node
Transaction Information details (i.e. product information) can be encrypted.
According to functional requirement of tracing to the source, encrypts and symmetric cryptography and asymmet-ric encryption method may be selected.Symmetric encryption method, that is, institute
There is the trace to the source participant of process of participation to use the same encryption key, all participants can check other users by key
The full content for information of tracing to the source is added, even if the non-participant that traces to the source without the key because obtain message in directed acyclic graph
Also content of tracing to the source can not be obtained.The trace to the source participant of process of asymmetric encryption mode, that is, all participation obtains a public key and private
Key, public key open all participants, and product information can be encrypted, and private key determines that the information of the user reads permission,
Content-data of tracing to the source is checked according to private key permission.
Described based in the product traceability system of directed acyclic graph product distribution formula account book, involved participant exists
Unique account is registered in distributed account book, is divided into following a few classes from responsibility functionally participant:
1, product producer:It is responsible for production product, the creation data of record product.Data source is mainly adopted by sensor
Collection, data include but not limited to product machining information, product unique identification number, quality inspection authentication information, production responsible person ID, production
Product feature description etc..
2, products distributor:It is responsible for product being sold to consumer, the sales data of record product is including but not limited to produced
Product Shipping Information, Distribution logistics information etc..
3, consumer:Product is bought from dealer, there is the permission for accessing product specific information.It can only usually check product
Distribution logistics information, product occur safety problem after, can be with the production information of access critical.
Fig. 5 be according in the product traceability system of the embodiment of the present invention store product information flow chart, as shown in figure 5,
The process step of storage product information includes in product traceability system:
1, manufacturer A login accounts in distributed account book become the complete network member section in distributed account book
Point.
2, manufacturer A receiving sensors data and product identification.
3, manufacturer A obtains institute in directed acyclic graph by retrieving specific a certain specific posting address in distributed account book
There are registered product identification and corresponding retrieval number.
4, manufacturer A checks whether the corresponding retrieval of existing product identification is numbered in account book, and if so, executing step
Rapid 5, otherwise, generate unique retrieval number.
5, manufacturer A verifies two in directed acyclic graph newest random transaction, if the verification passes, then executes step
Rapid 6, it otherwise continually looks for other transaction and is verified.
6, manufacturer A is that transaction acceptance address sends a new trade transactions to retrieve number, and transaction additional information is
Encrypted sensing data and product identification, trade transactions insert the hash value of two verified transactions.
7, the transaction that manufacturer A is initiated is passed through by other node verifications, and product information, which uploads, to be completed.
Fig. 6 be according in the product traceability system of the embodiment of the present invention read product information flow chart, as shown in figure 5,
The process step of reading product information includes in product traceability system:
1, consumer B login accounts in distributed account book are accessed distributed by electric business platform (one of account book node)
Account book.
2, consumer obtains the corresponding retrieval number of product identification and can be with the private key of access portion product information.
3, distributed account book retrieval transaction receives the trade transactions that address is retrieval number in consumer B, after obtaining encryption
Information data.
4, consumer B parses encryption data by private key.
5, the distribution logistics information of product is obtained.
The product data source tracing method of directed acyclic graph structures distribution account book technology provided in an embodiment of the present invention utilizes
Distributed account book technology ensures that data are uniquely and anti-tamper, eliminates product and finally reaches consumer's from production, processing, retail trader
The distrust barrier in each enterprise or a human world in the process, improves information flow and trading efficiency.Using directed acyclic diagram form
Account book structure, original block chain structure account book occurs blocking the slow problem of trade confirmation in high frequency time data input.
Product information in account book passes through asymmetric encryption mode, ensure that the safety of product information is not leaked.
Fig. 7 is the data storage device based on directed acyclic graph and distributed account book according to the embodiment of the present invention, such as Fig. 7
Shown, the embodiment of the present invention provides a kind of data storage device based on directed acyclic graph and distributed account book, for completing
The method described in embodiment is stated, vertex generation module 701 and memory module 702 are specifically included, wherein
Vertex generation module 701 is used to, according to several data to be stored got in synchronization, create several
Directed acyclic graph vertex, the quantity of data to be stored is identical with the newly-built quantity on directed acyclic graph vertex, a number to be stored
According to a directed acyclic graph vertex correspondence;
Memory module 702 is used for the data to be stored storage of each vertex correspondence in directed acyclic graph to distributed account book
In.
The embodiment of the present invention provides a kind of data storage device based on directed acyclic graph and distributed account book, for completing
Method described in above-described embodiment, the device provided through this embodiment complete the specific of the method described in above-described embodiment
Step is same as the previously described embodiments, and details are not described herein again.
Data storage device provided in an embodiment of the present invention based on directed acyclic graph and distributed account book, by will be same
Several data to be stored that one moment got are realized according to the structure of directed acyclic graph and are efficiently stored in distributed account book
In, and all information of related data can be inquired from distributed account book, meet high frequency time, the data of magnanimity are traced to the source need
It asks.
Fig. 8 is provided in an embodiment of the present invention for the electronics based on directed acyclic graph and the data storage of distributed account book
The structural schematic diagram of equipment, as shown in figure 8, the equipment includes:Processor 801, memory 802 and bus 803;
Wherein, processor 801 and memory 802 complete mutual communication by the bus 803;
Processor 801 is used to call program instruction in memory 802, is provided with to execute above-mentioned each method embodiment
Method, such as including:
According to several data to be stored got in synchronization, several directed acyclic graph vertex are created, wait depositing
The quantity for storing up data is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored and a directed acyclic graph top
Point corresponds to;
It will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in
Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt
When computer executes, computer is able to carry out the method that above-mentioned each method embodiment is provided, such as including:
According to several data to be stored got in synchronization, several directed acyclic graph vertex are created, wait depositing
The quantity for storing up data is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored and a directed acyclic graph top
Point corresponds to;
It will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage
Medium storing computer instructs, and the computer instruction makes the computer execute the side that above-mentioned each method embodiment is provided
Method, such as including:
According to several data to be stored got in synchronization, several directed acyclic graph vertex are created, wait depositing
The quantity for storing up data is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored and a directed acyclic graph top
Point corresponds to;
It will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer read/write memory medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or light
The various media that can store program code such as disk.
The embodiments such as device and equipment described above are only schematical, wherein described be used as separating component explanation
Unit may or may not be physically separated, the component shown as unit may or may not be
Physical unit, you can be located at a place, or may be distributed over multiple network units.It can be according to the actual needs
Some or all of module therein is selected to achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying
In the case of performing creative labour, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It is realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be expressed in the form of software products in other words, should
Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of ordinary skill in the art that:It still may be used
With technical scheme described in the above embodiments is modified or equivalent replacement of some of the technical features;
And these modifications or replacements, various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (9)
1. a kind of date storage method, which is characterized in that including:
According to several data to be stored got in synchronization, several directed acyclic graph vertex, number to be stored are created
According to quantity it is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored and a directed acyclic graph vertex pair
It answers;
It will be in the data to be stored storage to distributed account book of each vertex correspondence in directed acyclic graph.
2. according to the method described in claim 1, it is characterized in that, each data to be stored includes at least timestamp and data are detailed
Feelings, wherein timestamp is the time that data to be stored generates, and data details are the particular content of data to be stored.
3. according to the method described in claim 1, it is characterized in that, described several numbers to be stored got in synchronization
Each data to be stored in is by the data to be stored after verification, and verification method is as follows:
Judge whether target data to be stored exists with any data in the distributed account book to conflict;
If judgement knows that the target data to be stored does not conflict with any data in the distributed account book, the target
Data to be stored is to pass through the data to be stored after verification.
4. according to the method described in claim 1, it is characterized in that, described several numbers to be stored got in synchronization
Each data to be stored in is by encrypted data, and cipher mode is symmetric cryptography or asymmetric encryption.
5. according to the method described in claim 1, it is characterized in that, described wait depositing by each vertex correspondence in directed acyclic graph
After storing up in data storage to distributed account book, further include:
The distributed account book is synchronized in other network members nodes.
6. according to the method described in claim 1, it is characterized in that, described wait depositing by each vertex correspondence in directed acyclic graph
After storing up in data storage to distributed account book, further include:
According to the account information of the user got, the data stored in the distributed account book are read.
7. a kind of data storage device, which is characterized in that including:
Vertex generation module, for according to several data to be stored got in synchronization, creating several oriented nothings
Ring figure vertex, the quantity of data to be stored is identical with the newly-built quantity on directed acyclic graph vertex, a data to be stored and one
A directed acyclic graph vertex correspondence;
Memory module, for that the data to be stored of each vertex correspondence will be stored into distributed account book in directed acyclic graph.
8. a kind of electronic equipment for data storage, which is characterized in that including:
Memory and processor, the processor and the memory complete mutual communication by bus;The memory
It is stored with the program instruction that can be executed by the processor, the processor calls described program instruction to be able to carry out right such as and wants
Seek 1 to 6 any method.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
The method as described in claim 1 to 6 is any is realized when processor executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810462696.8A CN108769154B (en) | 2018-05-15 | 2018-05-15 | Data storage method based on directed acyclic graph and distributed account book |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810462696.8A CN108769154B (en) | 2018-05-15 | 2018-05-15 | Data storage method based on directed acyclic graph and distributed account book |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108769154A true CN108769154A (en) | 2018-11-06 |
CN108769154B CN108769154B (en) | 2021-01-01 |
Family
ID=64007727
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810462696.8A Active CN108769154B (en) | 2018-05-15 | 2018-05-15 | Data storage method based on directed acyclic graph and distributed account book |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108769154B (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109561100A (en) * | 2018-12-24 | 2019-04-02 | 浙江天脉领域科技有限公司 | Method and system based on the distributed duplexing energized network attacking and defending with artificial intelligence |
CN109672733A (en) * | 2018-12-20 | 2019-04-23 | 众安信息技术服务有限公司 | The account book synchronous method and equipment of block chain based on DAG |
CN109783699A (en) * | 2019-01-29 | 2019-05-21 | 众安信息技术服务有限公司 | Method and apparatus for monitoring the distributed account book of block chain network |
CN109857924A (en) * | 2019-02-28 | 2019-06-07 | 重庆科技学院 | A kind of big data analysis monitor information processing system and method |
CN110569246A (en) * | 2019-07-23 | 2019-12-13 | 腾讯科技(深圳)有限公司 | block chain node information synchronization method and device, computer equipment and storage medium |
CN110580307A (en) * | 2019-08-09 | 2019-12-17 | 北京大学 | Processing method and device for fast statistics |
CN111225008A (en) * | 2018-11-27 | 2020-06-02 | 北京新唐思创教育科技有限公司 | Method, system, terminal and computer program for saving trace information |
WO2020152893A1 (en) * | 2019-01-23 | 2020-07-30 | 株式会社Scalar | Data management system with falsification detectability |
CN111861459A (en) * | 2019-04-28 | 2020-10-30 | 常州一仙智能科技有限公司 | Iota account book optimization system and method based on DPoS consensus algorithm |
CN113396448A (en) * | 2018-12-14 | 2021-09-14 | 大众汽车股份公司 | Method, apparatus and computer program for a vehicle |
CN110489460B (en) * | 2019-08-09 | 2021-09-24 | 北京大学 | Optimization method and system for rapid statistics |
CN113516557A (en) * | 2021-07-14 | 2021-10-19 | 桂林电子科技大学 | Block chain with directed acyclic graph structure and implementation method thereof |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101535955A (en) * | 2005-06-27 | 2009-09-16 | 起元软件有限公司 | Managing parameters for graph-based computations |
CN104182499A (en) * | 2014-08-16 | 2014-12-03 | 成都飞机工业(集团)有限责任公司 | Different structure converting method from AOE (Activity On Edge) network to multi-way tree structure |
US20160253622A1 (en) * | 2015-02-26 | 2016-09-01 | Skuchain, Inc. | Tracking unitization occurring in a supply chain |
CN106130929A (en) * | 2016-06-17 | 2016-11-16 | 众安在线财产保险股份有限公司 | The service message automatic processing method of the Internet based on graph-theoretical algorithm insurance field and system |
CN106293971A (en) * | 2016-08-15 | 2017-01-04 | 张家林 | A kind of method and apparatus of distributed task dispatching |
CN107450972A (en) * | 2017-07-04 | 2017-12-08 | 阿里巴巴集团控股有限公司 | A kind of dispatching method, device and electronic equipment |
CN107656730A (en) * | 2017-09-28 | 2018-02-02 | 链家网(北京)科技有限公司 | The adaptive visualization method and device of distributed software system topological structure |
-
2018
- 2018-05-15 CN CN201810462696.8A patent/CN108769154B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101535955A (en) * | 2005-06-27 | 2009-09-16 | 起元软件有限公司 | Managing parameters for graph-based computations |
CN104182499A (en) * | 2014-08-16 | 2014-12-03 | 成都飞机工业(集团)有限责任公司 | Different structure converting method from AOE (Activity On Edge) network to multi-way tree structure |
US20160253622A1 (en) * | 2015-02-26 | 2016-09-01 | Skuchain, Inc. | Tracking unitization occurring in a supply chain |
CN106130929A (en) * | 2016-06-17 | 2016-11-16 | 众安在线财产保险股份有限公司 | The service message automatic processing method of the Internet based on graph-theoretical algorithm insurance field and system |
CN106293971A (en) * | 2016-08-15 | 2017-01-04 | 张家林 | A kind of method and apparatus of distributed task dispatching |
CN107450972A (en) * | 2017-07-04 | 2017-12-08 | 阿里巴巴集团控股有限公司 | A kind of dispatching method, device and electronic equipment |
CN107656730A (en) * | 2017-09-28 | 2018-02-02 | 链家网(北京)科技有限公司 | The adaptive visualization method and device of distributed software system topological structure |
Non-Patent Citations (7)
Title |
---|
AVINASH LAKSHMAN等: ""Cassandra - A Decentralized Structured Storage System"", 《HTTPS://RESEARCH.CS.CORNELL.EDU/LADIS2009/PAPERS/LAKSHMAN-LADIS2009.PDF》 * |
DAVID MILLS等: ""Distributed ledger technology in payments, clearing, and settlement"", 《HTTPS://PAPERS.SSRN.COM/SOL3/PAPERS.CFM?ABSTRACT_ID=2881204##》 * |
JANUSZ J. SIKORSKI等: ""Blockchain technology in the chemical industry: Machine-to-machine electricity market"", 《APPLIED ENERGY》 * |
佚名: ""Jeff Zhou:DAG高速异步区块链技术"", 《HTTPS://BLOG.CSDN.NET/CHRISTINA_1991/ARTICLE/DETAILS/78951593?UTM_SOURCE=BLOGXGWZ9》 * |
佚名: ""区块链的几大技术障碍"", 《HTTPS://WWW.JIANSHU.COM/P/CA42EEA9601A》 * |
佚名: ""深度解读——TrustNote推动时代变革的高速异步的DAG公有链"", 《HTTPS://ZHUANLAN.ZHIHU.COM/P/33763054》 * |
佚名: ""算法精解:DAG有向无环图"", 《HTTPS://WWW.CNBLOGS.COM/EVSWARD/P/DAG.HTML》 * |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111225008A (en) * | 2018-11-27 | 2020-06-02 | 北京新唐思创教育科技有限公司 | Method, system, terminal and computer program for saving trace information |
CN111225008B (en) * | 2018-11-27 | 2021-09-21 | 北京新唐思创教育科技有限公司 | Method, system, terminal and computer program for saving trace information |
CN113396448B (en) * | 2018-12-14 | 2024-03-01 | 大众汽车股份公司 | Method, apparatus and computer program for a vehicle |
CN113396448A (en) * | 2018-12-14 | 2021-09-14 | 大众汽车股份公司 | Method, apparatus and computer program for a vehicle |
CN109672733B (en) * | 2018-12-20 | 2022-06-07 | 众安信息技术服务有限公司 | Account book synchronization method and device based on DAG block chain |
CN109672733A (en) * | 2018-12-20 | 2019-04-23 | 众安信息技术服务有限公司 | The account book synchronous method and equipment of block chain based on DAG |
CN109561100A (en) * | 2018-12-24 | 2019-04-02 | 浙江天脉领域科技有限公司 | Method and system based on the distributed duplexing energized network attacking and defending with artificial intelligence |
CN109561100B (en) * | 2018-12-24 | 2021-02-12 | 浙江天脉领域科技有限公司 | Method and system for duplex energized network attack and defense based on distributed and artificial intelligence |
WO2020152893A1 (en) * | 2019-01-23 | 2020-07-30 | 株式会社Scalar | Data management system with falsification detectability |
CN109783699A (en) * | 2019-01-29 | 2019-05-21 | 众安信息技术服务有限公司 | Method and apparatus for monitoring the distributed account book of block chain network |
CN109857924A (en) * | 2019-02-28 | 2019-06-07 | 重庆科技学院 | A kind of big data analysis monitor information processing system and method |
CN111861459A (en) * | 2019-04-28 | 2020-10-30 | 常州一仙智能科技有限公司 | Iota account book optimization system and method based on DPoS consensus algorithm |
CN110569246A (en) * | 2019-07-23 | 2019-12-13 | 腾讯科技(深圳)有限公司 | block chain node information synchronization method and device, computer equipment and storage medium |
CN110569246B (en) * | 2019-07-23 | 2022-03-11 | 腾讯科技(深圳)有限公司 | Block chain node information synchronization method and device, computer equipment and storage medium |
CN110489460B (en) * | 2019-08-09 | 2021-09-24 | 北京大学 | Optimization method and system for rapid statistics |
CN110580307B (en) * | 2019-08-09 | 2021-09-24 | 北京大学 | Processing method and device for fast statistics |
CN110580307A (en) * | 2019-08-09 | 2019-12-17 | 北京大学 | Processing method and device for fast statistics |
CN113516557A (en) * | 2021-07-14 | 2021-10-19 | 桂林电子科技大学 | Block chain with directed acyclic graph structure and implementation method thereof |
CN113516557B (en) * | 2021-07-14 | 2022-09-23 | 桂林电子科技大学 | Block chain with directed acyclic graph structure and implementation method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN108769154B (en) | 2021-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108769154A (en) | Date storage method based on directed acyclic graph and distributed account book | |
Liu et al. | A blockchain-based framework of cross-border e-commerce supply chain | |
JP6995762B2 (en) | Cryptographic methods and systems for the secure extraction of data from the blockchain | |
JP2024042037A (en) | Methods and systems for directing exchanges associated with tokens held anonymously on a blockchain | |
CN109447648A (en) | The method of recorded data zone block, accounting nodes and medium in block chain network | |
WO2018222797A1 (en) | Systems and methods for product review management with distributed database | |
TWI723783B (en) | Block chain-based bill real-name receiving method, device and electronic equipment | |
CN106600403A (en) | Asset management method, device and system | |
CN109491996A (en) | For the block generation method of block chain network, block data access method, calculate equipment, storage medium | |
TW202101436A (en) | Anonymous transaction method and device based on ring signature | |
CN110096551A (en) | Credit data storage method, device, equipment and medium based on block chain | |
Zhou et al. | Towards a data-centric view of cloud security | |
CN110275891A (en) | Artificial intelligence software market | |
TW202014926A (en) | Blockchain-based data processing method and apparatus, and electronic device | |
CN110874798A (en) | Network platform based on regional chain and safe communication method thereof | |
US11954094B2 (en) | Database system public trust ledger architecture | |
CN110490640A (en) | Method, apparatus and system for object distribution processor | |
Goswami et al. | E-Governance: a tendering framework using blockchain with active participation of citizens | |
TWI727642B (en) | Method and device for realizing confidential transaction in block chain | |
Lampropoulos et al. | Using blockchains to enable big data analysis of private information | |
CN109345159A (en) | A kind of method for writing data and device, equipment, storage medium | |
CN111245829A (en) | Network platform based on regional chain and safe communication method thereof | |
Ekici et al. | Data cleaning for process mining with smart contract | |
Anandhi et al. | RFID based verifiable ownership transfer protocol using blockchain technology | |
Gries et al. | Using blockchain technology to ensure trustful information flow monitoring in cps |
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 |