A data processing system based on directed acyclic graph
By using a distributed record data set built with directed acyclic graph in the blockchain system, the credibility of vertices and tips is dynamically adjusted, and the problem of inefficiency of the blockchain system is solved, efficient transaction data recording and verification is achieved, and security and credibility are improved.
Patent Information
- Application Number
- CN202011309066.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-20
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2040-11-20
AI Technical Summary
The existing blockchain systems are inefficient and poor scalability, which is mainly due to the complex consensus mechanism, and the distributed system is difficult to efficiently maintain the chain structure of data.
A data processing system based on directed acyclic graph is adopted to construct a distributed record data set through transaction records between network nodes, and a credibility model of vertices and tips is used to verify and adjust transaction records, dynamically update the distributed record data set, and improve transaction data record and verification efficiency.
Improves the efficiency of transaction data recording and verification, and enhances transaction security and credibility without increasing computing power consumption.
Smart Images

Figure CN114519584B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of blockchain, and in particular to a data processing system based on a directed acyclic graph. Background Art
[0002] Blockchain is a distributed, shared ledger and database characterized by decentralization, immutability, and transparency. These characteristics guarantee the blockchain's integrity and transparency, laying the foundation for trust. A blockchain consists of network nodes, each of which maintains its own records (or ledgers) that are consistent with those of other nodes. However, existing blockchain systems generally have low efficiency, hindering their large-scale expansion. The fundamental reason is that blockchains require a consensus mechanism to maintain the chain-like structure of data, which is difficult to implement in a distributed system. Consequently, the corresponding consensus algorithms are often complex, resulting in low efficiency and poor scalability. Summary of the Invention
[0003] The purpose of the embodiments of the present disclosure is to provide a data processing system based on a directed acyclic graph, which can appropriately adjust its own distributed record data set constructed based on a directed acyclic graph based on the transaction records between network nodes, thereby improving the efficiency of transaction data recording and verification.
[0004] In order to solve the above technical problems, the embodiments of the present disclosure adopt the following technical solutions.
[0005] According to a first aspect of the present disclosure, a data processing system based on a directed acyclic graph is provided, comprising a plurality of network nodes connected via a network, each of the network nodes corresponding to a user terminal. The network nodes store a distributed record dataset, wherein the distributed record dataset records transaction information between the network nodes and is constructed based on a directed acyclic graph comprising a plurality of vertices, each of which represents a transaction record between the corresponding network nodes. The distributed record dataset can be configured such that, for each vertex, if a vertex is referenced by another vertex, a directed edge is established between the vertex and the other vertices; and if the vertex is not referenced by a predetermined number of other vertices, the vertex is converted into a tip vertex. The distributed record dataset can be further configured such that, when a transaction record is generated between the network nodes, the generated transaction record is verified based at least on the credibility of the vertex corresponding to the generated transaction record. Upon successful verification, the vertex corresponding to the generated transaction record is added to the distributed record dataset, and the corresponding network node is caused to respond to the generated transaction record.
[0006] In some embodiments, the credibility of the vertices may be higher than that of the tip vertices. The distributed record data set is configured to adjust the credibility of the vertices and / or the tip vertices using a preset credibility model based on the transaction records generated between the network nodes.
[0007] In some embodiments, the distributed record data set can be further configured to: when transaction records are generated between network nodes, traverse the tip vertices in the directed acyclic graph; obtain the tip vertices that appear a preset number of times during the traversal and have no conflicts, so that the vertices corresponding to the generated transaction records reference them.
[0008] In some embodiments, the transaction record may include information related to transaction judgment. The network node may be further configured to: obtain the transaction record; if the obtained transaction record meets a preset transaction judgment condition, determine that the obtained transaction record has been verified; add the vertex corresponding to the obtained transaction record to the distributed record data set, and update the credibility of the vertex and the vertex it references.
[0009] In some embodiments, the transaction judgment conditions may include at least one of the following: there is no abnormality in the credit of the network node corresponding to the transaction record; the electronic signature of the transaction record is legal; the transaction identification code of the transaction record is valid; the number of transaction records referenced by the transaction record meets the preset conditions; the referenced transaction records have been marked as legal; there is no conflict between the referenced transaction records; there is no transaction record that references itself; the information of the transaction record itself is valid.
[0010] In some embodiments, the credibility of the vertex corresponding to the transaction record may be associated with the credit value of the corresponding network node, and the credit value of the network node is adjusted accordingly with the interactive behavior of the network node.
[0011] In some embodiments, the credit value of the network node may change according to changes in the transaction quantity and transaction time in the corresponding transaction record, and / or the credit value of the network node may be adjusted according to conflicting information in the referenced transaction record.
[0012] In some embodiments, the data processing system may be further configured to reduce the credit value of each network node if at least one of the following situations occurs: other network nodes determine that the transaction record of the network node conflicts with other transaction records; other network nodes determine that conflicts occur between network nodes referenced by the network node; the network node only references verified pass information of other network nodes; the network node has inconsistent information transmission or invalid electronic signature.
[0013] In some embodiments, the network node is further configured to update its own credit value through at least one of the following processes: after the network node has received a predetermined number of transaction records since the last credit value update operation, the network node initiates the operation of updating its own credit value; and / or after the network node recovers from an abnormal state to a normal state, the network node initiates the operation of updating its own credit value.
[0014] In some embodiments, the distributed record data set may be further configured to periodically perform maintenance operations on the stored transaction records, including clearing transaction records that have not been verified for a predetermined period of time and the corresponding vertices.
[0015] In some embodiments, the maintenance operation may further include: removing the genesis vertex in the directed acyclic graph, and using the vertex that generates the transaction record but hides the transaction record as the starting vertex.
[0016] In some embodiments, the data processing system may further include a transaction platform, which randomly allocates the network nodes to the user terminals, so that the users can perform data interaction with the corresponding network nodes through the user terminals.
[0017] In some embodiments, a first contract is further stored in the network node, and the transaction platform interacts with the distributed record data set based on the first contract.
[0018] The beneficial effects of the various embodiments of the present disclosure are: the data processing system can monitor the transaction records between network nodes, effectively verify the transaction records, and can promptly and accurately verify them after the verification is passed; dynamically adjust the distributed record data sets of the network nodes based on the directed acyclic graph construction, so that they are accurately recorded in the distributed record data sets of each network node, thereby improving the efficiency of transaction data recording and verification, and improving the security and credibility of transactions without consuming too much computing power. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a structural diagram of a data processing system based on a directed acyclic graph according to an embodiment of the present application.
[0020] Description of Reference Numerals
[0021] 1-Network node; 2-Distributed record data set; 3-First contract; 4-Trading platform; 5-User end. DETAILED DESCRIPTION
[0022] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0023] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the above description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.
[0024] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.
[0025] These and other characteristics of the present disclosure will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0026] It should also be understood that although the disclosure has been described with reference to certain specific examples, those skilled in the art will readily recognize that many other equivalent forms of the disclosure can be implemented.
[0027] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0028] Specific embodiments of the present disclosure will be described hereinafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repetitive functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant detail. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but rather serve merely as a basis and representative basis for teaching those skilled in the art to variously employ the present disclosure with substantially any suitable detailed structure.
[0029] This description may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," each of which may refer to one or more of the same or different embodiments according to the present disclosure.
[0030] The directed acyclic graph-based data processing system of the disclosed embodiments is applied in a blockchain. The data processing system itself may also be a blockchain. The data processing system includes multiple network nodes 1, and the network nodes 1 can exchange data with each other, for example, via a P2P network. Each network node 1 has a distributed record data set 2, which can record the interaction between the network nodes 1 (including but not limited to transaction status) (the transaction status is correspondingly referred to as accounting, but the recording is not limited to accounting) so that the blockchain can respond correctly to the transaction status.
[0031] The data processing system is described in detail below. A data processing system based on a directed acyclic graph according to an embodiment of the present disclosure is described. Figure 1 As shown, it includes a plurality of network nodes 1 connected via a network (such as but not limited to a P2P network), and each of the network nodes 1 corresponds to a user terminal 5 .
[0032] Network nodes 1 can exchange data through the network. Each network node 1 is a distributed node. Network node 1 corresponds to a user terminal 5, and the user terminal 5 can correspond to a user, so that the user can publish information or exchange data with other users through the user terminal 5. The information of the data interaction is recorded by each network node 1.
[0033] The network node 1 stores a distributed record data set 2, wherein the distributed record data set 2 records transaction information between the network nodes 1 and is constructed based on a directed acyclic graph including multiple vertices, and the vertices represent transaction records between corresponding network nodes 1.
[0034] Specifically, each network node 1 stores a distributed record dataset 2, which records transaction information between all network nodes 1 in the data processing system. The distributed record dataset 2 includes distributed vertices and / or tip vertices. For each vertex in a distributed record dataset 2, if a transaction record is referenced by a sufficient number of new transaction records, the transaction record becomes "approved," corresponding to a vertex. Transaction records that are not "approved" are called tip vertices. Among the vertices, there is a genesis vertex, which can be referenced by other vertices during system initialization. Vertices and / or tip vertices are constructed based on a directed acyclic graph. In graph theory, a directed acyclic graph is defined as G = (V, E), where V is a set of vertices and E is a set of edges. If (u, v) and (v, u) are two edges with opposite directions, then G is a directed graph. A cycle is a directed path starting from a vertex and returning to that vertex. The directed acyclic graph described in this disclosure is a directed graph without such cycles. The directed acyclic graph in this embodiment has vertices and / or tip vertices, and / or tip vertices represent transaction records between corresponding network nodes 1, so that the transaction records can be obtained or corresponding responses can be made through the vertices and / or tip vertices.
[0035] The distributed record data set 2 can be configured as follows: for each vertex, when a vertex is referenced by other vertices, a directed edge is established between the vertex and other vertices; when the vertex is not referenced by a predetermined number of other vertices, the vertex is converted into a tip vertex.
[0036] Specifically, each vertex in the distributed record data set 2 can be referenced by other vertices. For example, the second vertex references the first vertex. The vertices represent transaction records between corresponding network nodes 1. This reference relationship can indicate that the transaction record represented by the first vertex is referenced by the transaction record represented by the second vertex. A directed edge is established between the first vertex and the second vertex, and this directed edge can represent the above-mentioned reference relationship. In addition, if the first vertex is referenced by the second vertex and is also referenced by multiple other vertices at the same time, such as if it is also referenced by other vertices at the same time, but the number of references does not exceed a preset value, then the vertex can be converted into a tip vertex. Of course, as a tip vertex, it can also be converted into a vertex when it is referenced by more than a preset number of vertices.
[0037] The distributed record dataset 2 is further configured to: when a transaction record is generated between network nodes 1, the generated transaction record is verified based on at least the credibility of the pre-processed vertex corresponding to the generated transaction record, and after the verification is passed, the corresponding vertex of the generated transaction record is added to the distributed record dataset 2, and the corresponding network node 1 responds to the generated transaction record.
[0038] Specifically, since each network node 1 contains a distributed record dataset 2, after a transaction record is generated between network nodes 1, distributed record dataset 2 will verify the transaction record. This verification is based on at least the credibility of the vertex corresponding to the generated transaction record (which has not yet been added to distributed record dataset 2), effectively improving transaction security. Verification can be achieved by verifying multiple sub-information, for example, at least one of the following: the actual transaction record info, such as the transaction account, amount, details, and timestamp; the identity ID of network node 1; the transaction identification code mc and the corresponding electronic signature sign, which can be obtained through CASH-CREATEMC(SK,info); the addresses addr1,...,addrr of the referenced transaction, which can be obtained through a tip node selection algorithm; and the electronic signature σ of the message, which can be obtained through SIGN(SK,msg), where msg = (info,ID,mc,sign,addr1,...,addrr). After verifying the above sub-information, if all or the main sub-information can pass verification, the credibility of the vertex corresponding to the transaction record meets the requirements. The corresponding vertex of the generated transaction record is added to the distributed record data set 2, so that all network nodes 1 can record the transaction record. Since the transaction record has passed verification, the network node 1 related to the transaction record responds to the generated transaction record, for example, by transferring transaction funds from one network node 1 to another network node 1, or the related network node 1 completes other tasks corresponding to the transaction record.
[0039] The data processing system can monitor transaction records between network nodes 1, effectively verify the transaction records, and after the verification is passed, it can timely and accurately dynamically adjust the distributed record data set 2 of network node 1 based on the directed acyclic graph, so that it is accurately recorded in the distributed record data set 2 of each network node 1, thereby improving the efficiency of transaction data recording and verification, and improving the security and credibility of transactions without consuming too much computing power.
[0040] In one embodiment of the present disclosure, the credibility of the vertex is higher than that of the tip vertex. The distributed record data set 2 is configured to adjust the credibility of the vertex and / or the tip vertex based on the transaction records generated between the network nodes 1 using a preset credibility model.
[0041] Specifically, the vertices and tip vertices in the distributed record data set 2 have credibility. The credibility of the vertex corresponding to the transaction record is associated with the credit value of the corresponding network node 1, and the credit value of the network node 1 is adjusted accordingly with the interactive behavior of the network node 1. The credibility of the vertex is higher than the credibility of the tip vertex. When data is interacted between network nodes 1, a corresponding transaction record will be generated. The specific content in the transaction record can reflect the relevant information of the credibility of the corresponding vertex and / or the tip vertex. In this embodiment, the preset credibility model is used to analyze the transaction record, and the credibility of the corresponding vertex and / or the tip vertex is adjusted according to the analysis results. The preset credibility model can be pre-constructed according to actual needs, for example, the credibility of the vertex corresponding to the transaction record is adjusted according to the behavior changes of the network node 1 and the reward and punishment mechanism for the behavior.
[0042] The following is an example of a specific embodiment. Each network node i will record the credit value corresponding to each network node j in the data processing system, which is recorded as credit i (j) credit i (j) is a value between 0 and 1. Network nodes are divided into four groups according to the following criteria:
[0043] K h ={j:H≤credit i (j)≤1};
[0044] K f ={j:0.5≤credit i (j) <H};
[0045] K l ={j:L≤credit i (j)<0.5};
[0046] K s ={j:0≤credit i (j) <L}。
[0047] The parameters can be set to L = 0.2, H = 0.8. i (j) is uniformly stored in the RDMA storage area based on the RDMA service of the network node. If j is an unknown network node 1 that has just joined the network, at the time of initialization, credit i (j) is uniformly set to 0.5. The credit value will change with the behavior of network node 1. The specific reward and punishment mechanism will be explained later.
[0048] Similarly, a credibility can be defined for each transaction record v (corresponding to a vertex). Assume that transaction record u and transaction record v are generated and submitted by network node i and network node j respectively. When network node j generates record v, j sets the initial credibility of v to conf. j (v) Record it:
[0049] conf j (v)←λ·credit j (j);
[0050] In addition, when network node i receives record v submitted by network node j, network node i will also set an initial credibility for transaction record v:
[0051] conf i (v)←λ·credit i (j),
[0052] Here, we can set λ to 0.5. Credibility is a value between 0 and 1, indicating the probability of reaching the "passed" state. The credibility of the genesis vertex is defined as 1.
[0053] Since different network nodes 1 update their credibility in the same way, we omit the subscripts and write them directly as conf and credit to avoid confusion. When v references u, (v,u) will be added to the edge set E, and u's credibility will be updated as follows:
[0054] conf(u)←min(1,conf(u)+λ·credit(j)).
[0055] At the same time, the credibility of other tip vertices w on the directed path from v to the genesis vertex v0 will be updated as follows:
[0056] conf(w)←max(conf(w),conf(u)).
[0057] It can be seen that conf(v) increases monotonically over time. Once it reaches 1, conf(v) is no longer updated.
[0058] Combined with the definition of credibility, if transaction v satisfies the following conditions at the same time, network node 1 will regard transaction v as "passed" and remove it from the vertex set V tip Removed:
[0059] The in-degree d of vertex v - (v) ≥ 2, that is, there are more than two transactions directly referencing v;
[0060] The credibility of transaction v is conf(v) = 1.
[0061] Then the tip vertex set V tip You can write:
[0062] V tip ={v≠v0:d - (v)<2∨conf(v)<1}.
[0063] In addition, the disclosed embodiments involve combining RDMA services and CASH (Counter Assignment Service in Hardware) to improve the system's tolerance to Byzantine errors. These two services can be written into secure hardware, separated from the operating system, limiting the chance of Byzantine errors. RDMA (Remote Direct Memory Access) is a memory data exchange service that is separate from the processor, cache, and operating system. It has the advantages of high throughput, fast data transmission speed, and low latency. It can implement data transmission protocols directly on a network interface card, allowing one device to directly read data stored on another device over the network.
[0064] In one embodiment of the present disclosure, the distributed record data set 2 is further configured to: when a transaction record is generated between network nodes 1, traverse the tip vertices in the directed acyclic graph; obtain the tip vertices that appear a preset number of times during the traversal and have no conflicts, so that the vertices corresponding to the generated transaction records reference them.
[0065] Specifically, conflicting tip vertices should be avoided from being referenced by transaction records. Vertices corresponding to transaction records between network nodes 1 should be encouraged to reference tip vertices that have not conflicted and have appeared frequently, or to reference tip vertices that have conflicted but not more than a preset number of times. This minimizes the impact on the current vertex's credibility. In this embodiment, a traversal of tip vertices is performed to obtain a tip vertex that has appeared a preset number of times and has not conflicted. This preset number can be set based on the actual usage scenario. Once this tip vertex is obtained, it can be referenced by vertices corresponding to the generated transaction records, thus avoiding any impact on the vertex's credibility.
[0066] In conjunction with a specific embodiment, for example, when network node i generates a transaction record v, it needs to select r∈[2,R] old records u1,...,u r For reference. The Weighted Markov Chain Monte Carlo (WMCMC) random traversal algorithm can be used. The algorithm steps are as follows:
[0067] (1) Initialize the tip vertex selection array U[1...Iter]←{⊥,⊥,...,⊥} (the symbol “⊥” represents no value).
[0068] (2) In the it-th traversal:
[0069] ① Select the genesis vertex as the starting position: u←v0;
[0070] ② Find all vertices that reference vertex u: N - (u) = {w∈V:(w,u)∈E};
[0071] ③From N - (u) selects a vertex x, and the selection probability is
[0072] ④ If conf(u) = 1, then directly use vertex x as the moving target: u←x. Otherwise, calculate the moving probability And move as follows:
[0073]
[0074] ⑤If no movement occurs, then U[t]←u and start the t+1th traversal. If movement occurs, return to step ②.
[0075] (3) Stop when the number of traversals it reaches Iter. Select r tip vertices that appear the most frequently in U and do not conflict with each other for reference. If there are less than r, update r and R to the number of all non-conflicting tip vertices in U and reference these tip vertices.
[0076] The maximum number of traversals, Iter, should be set to a large value. This increases the probability of selecting transactions without conflicts and prevents excessively rapid transaction record generation, which could lead to distributed denial of service attacks (DDoS). Here, Iter can be set to 100. Furthermore, as the vertex degree in G increases with r, the degree of transaction parallelism also increases. However, conversely, the more transactions that are performed simultaneously, the greater the probability of conflicts between them. Therefore, R cannot be increased indefinitely. Here, R = 8 is suitable to accommodate the above traversal method.
[0077] In one embodiment of the present disclosure, the transaction record includes information related to transaction judgment.
[0078] The network node 1 is further configured to obtain transaction records. If the obtained transaction records meet preset transaction judgment conditions, the obtained transaction records may be determined to be verified; and the vertex corresponding to the obtained transaction record may be added to the distributed record dataset 2, and the credibility of the vertex and the vertices referenced by the vertex may be updated.
[0079] Specifically, whether a transaction record meets the preset transaction judgment criteria can be determined by summarizing transaction-related information in the transaction record. This information can include the actual transaction record info, such as the transaction account, amount, details, and timestamp; the network node 1 ID; the transaction identification code mc and the corresponding electronic signature sign, which can be obtained through CASH-CREATEMC(SK,info); the addresses addr1,...,addrr of the referenced transaction, which can be obtained through a tip node selection algorithm; and the electronic signature σ of the message, which can be obtained through SIGN(SK,msg), where msg = (info,ID,mc,sign,addr1,...,addrr). If all or most of the above transaction-related information meets the corresponding criteria, the transaction record is considered to meet the preset transaction judgment criteria. The vertex corresponding to the obtained transaction record is then added to the distributed record dataset 2, and the credibility of this vertex and the vertices it references is updated.
[0080] Furthermore, CASH, mentioned above, is primarily used to assign transaction identifiers to transactions. This unique, monotonically increasing identifier, along with a digital signature, prevents nodes from fraudulently submitting previously verified transactions to gain credit. CASH provides two interface services: Generate (CASH-CREATEMC(SK, msg)), which generates a numeric value mc as a transaction identifier for the message msg and returns the digital signature sign; and Verify (CASH-VERIFYMC(PK, msg, mc, sign)), which verifies the validity of the message msg, the transaction identifier mc, and the digital signature sign. If the digital signature sign is invalid or the numeric value mc is out of date, INVALID is returned; otherwise, VALID is returned. SK represents the private key, and PK represents the public key. These public and private keys can be distinguished from those used for encryption, thereby enhancing security.
[0081] In one embodiment, the transaction judgment conditions include at least one of the following: the credit of the network node 1 corresponding to the transaction record is normal; the electronic signature of the transaction record is legal; the transaction identification code of the transaction record is valid; the number of transaction records referenced by the transaction record meets preset conditions; the referenced transaction records have been marked as legal; there are no conflicts between the referenced transaction records; there are no transaction records that reference the transaction record itself; the information in the transaction record itself is valid; etc. If a transaction record meets the above transaction judgment conditions, it can be considered verified. Then, the vertex corresponding to the obtained transaction record can be added to the distributed record dataset 2.
[0082] For example, when network node j receives record v = (msg,σ) sent by i through the Gossip protocol, it will perform the following series of verifications on v:
[0083] Is the credit of network node i abnormal? j (i) Is it less than L? If it is less than L, the network node i is abnormal;
[0084] Call VERIFY(PK, msg, σ) to verify whether the electronic signature σ of the message is legal. If it is illegal, the network node i is abnormal;
[0085] Call CASH-VERIFYMC(PK,info,mc,sign) to verify whether the transaction identification code is authentic and valid. If it is not authentic, the network node i is abnormal;
[0086] Whether the number of references r is greater than or equal to 2, if not, the network node i is abnormal;
[0087] Whether the referenced record has been marked as legal; if not, the network node i is abnormal;
[0088] Is there any conflict between the referenced transactions? If there is a conflict, the network node i is abnormal;
[0089] Whether the transaction of network node i itself is referenced. If it is referenced, network node i is abnormal.
[0090] Whether the transaction record info itself is valid. If invalid, the network node i is abnormal.
[0091] If all of the above verifications pass, the vertex v corresponding to the transaction record is added to the directed acyclic graph, the credibility of vertex v and its referenced vertices is updated, and the tip vertex set Vtip is updated. However, if any of the above verification steps fails, the transaction record is marked as invalid. Through these multiple verification steps, the acquired transaction records can be verified more accurately.
[0092] In one embodiment of the present disclosure, the credit value of each network node 1 in the data processing system is not fixed, and can be adjusted accordingly with the interactive behavior of the network node 1. Specifically, if the behavior of the network node 1 is in compliance with the regulations, its credit value will be increased accordingly, otherwise the credit value will decrease. If the credit value of the network node 1 is low, it needs to be referenced by more transaction records to pass, which reduces the probability of the low-credit network node 1 transaction passing. Therefore, the network node 1 needs to regulate its behavior so that transactions can be carried out more efficiently. In order to be able to dynamically adjust the credit value of the network node 1, a reward and punishment model is set for the credit value of the network node 1 in the present disclosure, and the reward and punishment model can increase or decrease its credit value according to the interactive behavior of the network node 1.
[0093] In one aspect, the credit value of network node 1 changes based on changes in the number of transactions and transaction time in the corresponding transaction record; and / or, the credit value of network node 1 is adjusted based on conflicting information in the referenced transaction record. Specifically, the credit value of network node 1 may increase as the number of transactions and transaction time increase, and / or the credit value of network node 1 may increase based on a decrease in conflicting information in the referenced transaction record.
[0094] On the other hand, the data processing system is further configured to reduce the credit value of each network node 1 if at least one of the following conditions occurs:
[0095] Other network nodes determine that the transaction record of network node 1 conflicts with other transaction records;
[0096] Other network nodes determine that a conflict occurs between network nodes referenced by the network node 1;
[0097] The network node 1 only references the verified pass information of other network nodes;
[0098] The network node 1 has inconsistent information transmission or invalid electronic signature.
[0099] Specifically, if the transaction records of network node 1 conflict with other transaction records, such as account conflicts, signature conflicts, or reference conflicts, the output processing system can lower the credit value of network node 1 based on the information provided by other network nodes, thereby reducing the security risk of other related network nodes. Furthermore, network node 1 can reference other network nodes in the data processing system. If a conflict occurs between the referenced network nodes, the transaction records of network node 1 will inevitably become more untrustworthy, and the data processing system can lower the credit value of network node 1. If network node 1 only references verified information from other network nodes, it can be considered a "lazy node," simply referencing "passed" transaction records, which is not conducive to improving pass efficiency. Therefore, the distributed record dataset 2 can lower the credit value of network node 1 accordingly. If network node 1 experiences inconsistent information transmission or invalid electronic signatures, it can be considered that the interaction behavior of network node 1 may have been erroneous, and the credit value of network node 1 can be lowered accordingly.
[0100] The following is an example of a specific embodiment. When a legal transaction record v submitted by a network node i changes to the "approved" status:
[0101]
[0102] Where S is the transaction amount of transaction record v, t is the time it takes for transaction record v to be approved, and α∈(0,1) is a constant. The larger the transaction amount and the shorter the approval time, the higher the credit value. At the same time, if transaction record v references r other non-conflicting transaction records, the credit value of network node i will also be improved:
[0103] credit(i)←min(1,credit(i)+βlog(r-0.8)),
[0104] Where β∈(0,1) is a constant. The more conflict-free transaction records a network node references, the higher its credit score increases. However, if a node only references one transaction record, its credit score decreases. This incentivizes referencing more transaction records, speeding up transaction approval and improving system efficiency. While referencing more transaction records may increase credit score, it also increases the probability of conflicting references. Therefore, choosing a moderate r value is a more rational approach. Here, α = β = 0.05 is a good choice.
[0105] When other network nodes discover that the transaction record v submitted by network node i conflicts with other transaction records, the credit value of network node i will be adjusted as follows:
[0106] credit(i)←γ·credit(i),
[0107] Where γ∈(0,1) is a constant. If there is a conflict between the transaction records referenced by the transaction record v, the credit value of the network node i will also decrease:
[0108]
[0109] Where ctd is the number of conflicting transactions and δ∈(0,1) is a constant.
[0110] The network node that receives the transaction record v will check whether it references the transaction record of network node i. If so, the credit value of network node i will be reduced:
[0111]
[0112] Where r is the number of transaction records of network node i referenced by transaction record v, and ε∈(0,1) is a constant.
[0113] The problem of "lazy nodes" in data processing systems is that network nodes simply reference transaction records in the "passed" state (or reference the genesis vertex), which is not conducive to improving the efficiency of transaction record approval. Although distributed record dataset 2 allows this behavior, it will reduce the credit value as a penalty for "laziness":
[0114]
[0115] Where apprv is the referenced passed transaction record and ζ∈(0,1) is a constant.
[0116] When other network nodes detect that network node i has other Byzantine errors (such as inconsistent information transmission, invalid electronic signature, etc.), the credit value of network node i is also reduced:
[0117] credit(i)←max(0,credit(i)-η),
[0118] Where η∈(0,1) is a constant.
[0119] The selection of constants reflects the system's tolerance for irregular behaviors of network nodes. Here, we can take γ = 0.95, δ = ε = ζ = 0.8, and η = 0.2.
[0120] In one embodiment of the present disclosure, the network node 1 is further configured to update its own credit value through at least one of the following processes:
[0121] After the network node 1 has received a predetermined number of transaction records since the last credit value update operation, the network node 1 initiates an operation to update its own credit value; and / or
[0122] After the network node 1 recovers from the abnormal state to the normal state, it starts the operation of updating its own credit value.
[0123] Specifically, in order to prevent some network nodes 1 from lagging due to network disconnection or other reasons, the credit value of network node 1 needs to be updated regularly or irregularly in this embodiment. The credit synchronization thread runs independently and does not affect other threads. The following is an explanation with reference to a specific embodiment:
[0124] First, the credit value of network node 1 can be updated regularly and irregularly. Regular synchronization can be triggered when a certain number of new transaction records are received since the last update; irregular synchronization can be triggered after recovery from an abnormal state.
[0125] Although the triggering conditions of the two update operations are different, the update methods have something in common.
[0126] First: Read (such as RDMA read) K h The credit value stored by all nodes k in:
[0127] c k (j)←RDMA-READ(k,credit k (j));
[0128] Second: Credit i (j)(j∈V and i≠j) is updated as:
[0129]
[0130] Third: Credit i (i) Updated to:
[0131]
[0132] Note that the credit value of network node i itself is the credit value of other network nodes k with high credit value. i (i) the average value, and credit i (i) The original value is irrelevant, which can prevent the impact caused by network node 1 tampering with its own credit value.
[0133] In one embodiment of the present disclosure, the distributed record data set 2 is further configured to: regularly perform maintenance operations on the stored transaction records, including clearing transaction records that have not been verified for a predetermined period of time and the corresponding vertices.
[0134] In one embodiment of the present disclosure, the maintenance operation further includes: removing the genesis vertex in the directed acyclic graph, and using the vertex that generates the transaction record but hides the transaction record as the starting vertex.
[0135] Specifically, in order to prevent transaction records (which correspond to vertices, and transaction records can also be regarded as vertices) from taking up too much storage space, network node 1 needs to regularly automatically maintain the distributed record data set 2, omit older transaction records (such as 3 years ago), and clear transaction records that have not been in the "passed" state for a long time (such as 7 days). After maintenance, if the transaction directly referenced by the transaction record v is omitted, the transaction record v is added to the set V0. The maintained ledger no longer has the genesis vertex v0, but starts with the transaction records in the set V0. At the same time, the selection of the tip vertex no longer starts from the genesis vertex v0, but randomly selects a vertex u from the set V0 as the starting position, with a selection probability of
[0136]
[0137] In one embodiment of the present disclosure, the data processing system further includes a transaction platform 4 , which randomly allocates the network nodes 1 to the user terminals 5 , so that the users can perform data interaction with the corresponding network nodes 1 through the user terminals 5 .
[0138] Specifically, the trading platform 4 is set between the user terminal 5 and the network node 1. The network node 1 does not correspond to the user terminal 5 in a fixed manner. Instead, the trading platform 4 randomly assigns the network node 1 to the user terminal 5, thereby further improving the security of data interaction between the user terminal 5 and the data processing system.
[0139] In one embodiment of the present disclosure, the network node 1 further stores a first contract 3 , and the transaction platform 4 performs data interaction with the distributed record data set 2 based on the first contract 3 .
[0140] Specifically, each network node 1 stores a first contract 3 and a distributed record data set 2 , and the trading platform 4 can implement data interaction between the user terminal 5 and the distributed record data set 2 based on the first contract 3 .
[0141] The following is a specific embodiment of the interaction between a buyer and a seller and combined with Figure 1For illustration, the trading platform 4 (which may be P2P) randomly assigns a P2P-based network node 1 to the user terminal 5 for publishing supply and demand requirements, transaction matching and transaction records.
[0142] Transaction matching is automatically performed through the first contract 3. Here, the transaction matching can be performed using the differential k-DoubleAuction (k-DA) algorithm. Buyer b publishes a purchase price demand BP, and seller s publishes a sales price SP. The list of all BPs is sorted in ascending order, and the list of all SPs is sorted in descending order, and then paired in order. If a pair (BP) is found, i ,SP j ) makes BP i ≥SP j , then a transaction occurs between network nodes i and j, and the transaction amount is
[0143] p=kBP i +(1-k)SP j ,
[0144] Where k is a constant in (0,1).
[0145] When a transaction occurs between users, the transaction record is submitted to the data processing system. Once the transaction record is approved, the energy that meets the transaction quota will be transferred from the seller to the buyer, and the corresponding amount of funds will flow from the buyer to the buyer.
[0146] During the transaction process, the energy trading platform 4 of each embodiment of the present disclosure can be used to quickly and effectively implement small-scale, distributed energy transactions without a central information authentication agency, significantly save transaction costs, and ensure the fairness and effectiveness of transactions.
[0147] The above embodiments are merely exemplary embodiments of the present disclosure and are not intended to limit the present disclosure. The scope of protection of the present disclosure is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present disclosure within the essence and scope of protection of the present disclosure, and such modifications or equivalent substitutions shall also be deemed to fall within the scope of protection of the present disclosure.
Claims
1. A data processing system based on a directed acyclic graph, characterized in that: It includes a plurality of network nodes connected via a network, wherein the network nodes correspond to user terminals; The network nodes store a distributed record data set, wherein the distributed record data set records transaction information between the network nodes and is constructed based on a directed acyclic graph including a plurality of vertices, wherein the vertices represent transaction records between corresponding network nodes; The distributed record data set is configured as follows: for each vertex, if a vertex is referenced by other vertices, a directed edge is established between the vertex and the other vertices; if the vertex is not referenced by a predetermined number of other vertices, the vertex is converted into a tip vertex, and the credibility of the vertex is higher than that of the tip vertex; The distributed record data set is further configured to: when a transaction record is generated between network nodes, the generated transaction record is verified at least based on the credibility of the vertex corresponding to the generated transaction record, and after the verification is passed, the corresponding vertex of the generated transaction record is added to the distributed record data set, and the corresponding network node responds to the generated transaction record, the credibility of the vertex corresponding to the transaction record is associated with the credit value of the corresponding network node, and the credit value of the network node is adjusted accordingly with the interactive behavior of the network node.
2. The data processing system according to claim 1, wherein: The distributed record data set is configured to adjust the credibility of the vertices and / or the tip vertices using a preset credibility model based on the transaction records generated between the network nodes.
3. The data processing system according to claim 1, wherein: The distributed record data set is further configured to: traverse the tip vertices in the directed acyclic graph when transaction records are generated between network nodes; obtain the tip vertices that appear a preset number of times during the traversal and have no conflicts, so that the vertices corresponding to the generated transaction records reference them.
4. The data processing system according to claim 1, wherein: The transaction record contains information related to transaction judgment. The network node is further configured to: obtain transaction records; If the acquired transaction record meets the preset transaction judgment condition, determining that the acquired transaction record is verified; A vertex corresponding to the acquired transaction record is added to the distributed record data set, and the credibility of the vertex and the vertex referenced by it is updated.
5. The data processing system according to claim 4, wherein: The transaction judgment conditions include at least one of the following: The credit of the network node corresponding to the transaction record is normal; the electronic signature of the transaction record is legal; the transaction identification code of the transaction record is valid; the number of transaction records referenced by the transaction record meets the preset conditions; the referenced transaction records have been marked as legal; there are no conflicts between the referenced transaction records; there is no transaction record that references itself; and the information of the transaction record itself is valid.
6. The data processing system according to claim 1, wherein: in, The credit value of the network node changes according to changes in the transaction quantity and transaction time in the corresponding transaction record; and / or, The credit value of the network node is adjusted according to the conflicting information of the referenced transaction record.
7. The data processing system according to claim 6, wherein: The data processing system is further configured to reduce the credit value of each network node if at least one of the following conditions occurs: Other network nodes determine that the transaction record of the network node conflicts with other transaction records; other network nodes determine that conflicts occur between network nodes referenced by the network node; This network node only references the verified passed information of other network nodes; this network node has inconsistent information transmission or invalid electronic signature.
8. The data processing system according to claim 1, wherein: The network node is further configured to update its own credit value by at least one of the following processes: After the network node has received a predetermined number of transaction records since its last credit value update operation, the network node initiates an operation to update its own credit value; and / or After the network node recovers from the abnormal state to the normal state, it starts the operation of updating its own credit value.
9. The data processing system according to claim 1, wherein: The distributed record data set is further configured to regularly perform maintenance operations on the stored transaction records, including clearing transaction records that have not been verified for a predetermined period of time and the corresponding vertices.
10. The data processing system according to claim 9, wherein: The maintenance operation further includes: removing the genesis vertex in the directed acyclic graph, and using the vertex that generates the transaction record but hides the transaction record as the starting vertex.
11. The data processing system according to claim 1, wherein: The data processing system further includes a transaction platform, which randomly allocates the network nodes to the user terminals, so that the users can perform data interaction with the corresponding network nodes through the user terminals.
12. The data processing system according to claim 11, wherein: A first contract is also stored in the network node, and the trading platform interacts with the distributed record data set based on the first contract.
Citation Information
Patent Citations
Data storage method based on directed acyclic graph and distributed ledger
CN108769154A
DAG-based whole-network unified trust anchor system, establishment method and authentication method
CN111049658A