CN114915428B - Alliance chain suitable for circulation steel is traced to source - Google Patents

Alliance chain suitable for circulation steel is traced to source Download PDF

Info

Publication number
CN114915428B
CN114915428B CN202210838457.4A CN202210838457A CN114915428B CN 114915428 B CN114915428 B CN 114915428B CN 202210838457 A CN202210838457 A CN 202210838457A CN 114915428 B CN114915428 B CN 114915428B
Authority
CN
China
Prior art keywords
node
main chain
chain
steel
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210838457.4A
Other languages
Chinese (zh)
Other versions
CN114915428A (en
Inventor
薛红玉
王康
杨威
陈先意
陈卫
丁思哲
郭俊屹
李清昀
章亚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Nangang Shuyi Technology Service Co ltd
Original Assignee
Jiangsu Shuyi Technology Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Shuyi Technology Service Co ltd filed Critical Jiangsu Shuyi Technology Service Co ltd
Priority to CN202210838457.4A priority Critical patent/CN114915428B/en
Publication of CN114915428A publication Critical patent/CN114915428A/en
Application granted granted Critical
Publication of CN114915428B publication Critical patent/CN114915428B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an alliance chain suitable for tracing the source of circulating steel, which adopts a PoS consensus algorithm to replace a PoW consensus algorithm, avoids the waste of computing resources, enhances the transaction throughput, transfers outdated steel information to a storage side chain for storage by setting a special storage side chain, reduces the size of a main chain on the premise of not losing the outdated steel information, avoids wasting a large amount of storage space and time for storing the outdated steel information by a newly-accessed node, and reduces the threshold of the newly-accessed node.

Description

Alliance chain suitable for circulation steel is traced to source
Technical Field
The invention relates to an alliance chain suitable for tracing a source of circulating steel, and belongs to the field of alliance chain accounting for fixed commodities and a whole industry chain.
Background
The method for tracing the source of the circulating steel products refers to the step of tracing and tracing the whole life cycle of the steel products. Currently, the RFID method is mainly used in the industry to record the entry and exit of steel, and the corresponding steel tracing method is generally to query the database records of the entry and exit of steel one by one. The recorded data is stored mainly by a local server and backed up by a cloud. However, with the centralized server storage model, the following problems exist: the server is easy to have single-point failure, so that the database information is lost or mismatched; (II) the authority of the server administrator is not monitored, and the administrator can modify the steel information at will; and (III) the continuous expansion of the industrial scale causes that the tracing access request amount of steel materials to be processed by the system is also increased rapidly, the load pressure of the server is extremely high, the upgrading cost of the centralized server is high, and the costs are borne by upstream manufacturers and are not beneficial to the benign development of related industries.
Based on the problems, the alliance chain technology is introduced into the steel tracing field, and the problems of single-point failure and authority control of the server are effectively solved. However, the existing solution of the alliance chain still has certain problems: the current alliance chain adopts a consensus mechanism of workload attestation (PoW), and under the mechanism, a large amount of computing equipment is used for meaningless large integer decomposition computing, so that computing resources are wasted; secondly, under the existing consensus mechanism, the block production time interval of the alliance chain is long, the throughput of transaction processing is low, and high-frequency access cannot be dealt with; and (III) steel serving as a large circulation commodity has the characteristic of periodic circulation, a large amount of steel can be released from the market every time period, the steel information which is in the use stage and is not circulated is still commonly stored in an account book of the alliance chain network, the rapid increase of the length of the alliance chain and the swelling of the account book are directly caused, and the threshold of a new network access node is greatly improved by hundreds of GB of account books at frequent times.
Disclosure of Invention
The invention provides an alliance chain and a method for tracing a source of circulating steel, and solves the problems of computing resource waste, low transaction processing throughput and high threshold of a new network access node in the alliance chain in the tracing of the circulating steel.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
an alliance chain suitable for tracing the source of circulating steel comprises a main chain and a storage side chain which adopt a PoS consensus algorithm, wherein nodes of the storage side chain are all cross-chain nodes in the main chain at the same time;
main chain: storing steel information of each link in a steel circulation industrial chain;
storage side chain: periodically retrieving outdated steel information in a main chain, and transferring the outdated steel information to self storage; when the steel products are circulated and traced, if the steel product information needing to be visited is stored by the steel product tracing system, the steel product information needing to be visited is transferred to the main chain for storage.
In the main chain, determining a next production block node according to the node contribution and a preset rule; wherein the node contribution is a weighted sum of a node network performance index, a node storage performance index, a node transmission data volume index and a response access positive degree index.
The calculation formula of the node contribution is as follows:
Figure 479494DEST_PATH_IMAGE001
wherein the content of the first and second substances,CON(i) Denotes the second in the main chainiContributions of individual nodes;
Figure 181478DEST_PATH_IMAGE002
denotes in the main chain the firstiThe network performance index of each node is measured,Averageit is indicated that the average value is calculated,Distance(i,j) Represents the second in the calculation backboneiA node and ajThe distance between each node;
Figure 305554DEST_PATH_IMAGE003
denotes in the main chain the firstiEach node stores a performance index that is,Store(i) Denotes in the main chain the firstiThe amount of hard disk storage already used by an individual node,Store all (i) Denotes the second in the main chainiThe total storage capacity of the computers of the individual nodes,P 1 representStore all (i)- Store(i) The weight of (a) is determined,P 2 to representStore all (i)/ Store(i) The weight of (c);
Figure 77201DEST_PATH_IMAGE004
denotes in the main chain the firstiEach node transmits an index of the amount of data,
Figure 612129DEST_PATH_IMAGE005
denotes the second in the main chainiThe amount of ledger data uploaded by each node,
Figure 993169DEST_PATH_IMAGE006
denotes in the main chain the firstiThe data volume of the account book downloaded by each node;
Figure 405040DEST_PATH_IMAGE007
denotes in the main chain the firstiThe individual node responds to the access aggressiveness indicator,
Figure 593927DEST_PATH_IMAGE008
denotes the second in the main chainiThe access request received by the individual node is,
Figure 202500DEST_PATH_IMAGE009
denotes in the main chain the firstiThe access request responded by each node;
Figure 449548DEST_PATH_IMAGE010
respectively represent
Figure 485900DEST_PATH_IMAGE011
The weight of (c).
The preset rule is as follows:
in the main chain, ifiThe probability of the block production of each node reaches the target value of the block production firstlyiEach node is a next block production node;
wherein the block production probability is based oniThe contribution of each node is calculated, and the target value of the production block is calculated according to the hash value of the target value of the production blockAnd (4) obtaining.
The calculation formula of the block generation probability is as follows:
Figure 183639DEST_PATH_IMAGE012
wherein, the first and the second end of the pipe are connected with each other,CON(i) Denotes the second in the main chainiThe contribution of the individual nodes is made,P(i) Denotes the second in the main chainiThe block-producing probability of each node,
Figure 76246DEST_PATH_IMAGE013
representing the blocky spacing in the main chain,trepresenting the time since the last chunk was produced;
the calculation formula of the block production target value is as follows:
Figure 94362DEST_PATH_IMAGE014
wherein, the first and the second end of the pipe are connected with each other,
Figure 198935DEST_PATH_IMAGE015
representing a birth massbThe target value is,
Figure 139078DEST_PATH_IMAGE016
representing a birth massb-1 target value, blockb-1 represents the last produced block,
Figure 165588DEST_PATH_IMAGE017
indicating that the hash value is calculated,Npresentation control
Figure 784132DEST_PATH_IMAGE015
The parameter of the magnitude of the operation value, mod, represents the integer division remainder.
In the storage sidechain, the chunk separation decreases with increasing speed of the chunk height of the main chain and increasing average transaction time.
Also includes a number of access side chains;
the access side chain is connected with a nearby main chain node in the region, a main chain account book is obtained from the connected main chain node, and the main chain account book is segmented and stored in each access side chain node; when the steel circulation traceability system is used for traceability, the access side chain receives traceability requests of common merchants or tourists.
The steel information transfer between the main chain and the storage side chain adopts an atom chain crossing technology.
The invention achieves the following beneficial effects: the PoS consensus algorithm is adopted to replace the PoW consensus algorithm, so that the waste of computing resources is avoided, the transaction processing throughput is enhanced, the outdated steel information is transferred to the storage side chain for storage by arranging the special storage side chain, the size of a main chain is reduced on the premise of not losing the outdated steel information, a large amount of storage space and time are not needed to be wasted by a newly-networked node to store the outdated steel information, and the threshold of the newly-networked node is reduced.
Drawings
FIG. 1 is a block diagram of a main chain;
FIG. 2 is a flow chart of the transfer of backbone obsolete steel information to a storage side chain;
FIG. 3 is a schematic representation of a federation chain node;
FIG. 4 is a flowchart illustrating an example of tracing a steel product.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
An alliance chain suitable for tracing the source of circulating steel comprises a main chain and a storage side chain which adopt a PoS consensus algorithm, wherein nodes of the storage side chain are all cross-chain nodes in the main chain at the same time;
main chain: storing steel information of each link in a steel circulation industrial chain;
storage side chain: periodically retrieving outdated steel information in a main chain, and transferring the outdated steel information to self storage; when the steel products are circulated and traced, if the steel product information needing to be visited is stored by the steel product tracing system, the steel product information needing to be visited is transferred to the main chain for storage.
The alliance chain adopts a PoS consensus algorithm to replace a PoW consensus algorithm, so that the waste of computing resources is avoided, the transaction processing throughput is enhanced, the special storage side chain is arranged, the outdated steel information is transferred to the storage side chain for storage, the size of a main chain is reduced on the premise of not losing the outdated steel information, a large amount of storage space and time are not needed to be wasted by a newly-networked node to store the outdated steel information, and the threshold of the newly-networked node is reduced.
The main chain is built by adopting a PoS consensus algorithm, a special settability field is additionally arranged in a main chain Block head, the field value in a main chain Block is 00, the main chain Block structure is shown in FIG. 1, previous _ Hash in the figure represents a Hash value of a Previous Block, block _ Number represents a Block Number, sidechain represents a side chain identification bit, poS _ Hash represents a PoS Hash value, date represents Block data (including transactions, signatures, read sets, write sets and the like), and Block _ Hash represents a Hash value of the Block.
After the main chain is built, the steel product can be put into early use, at the moment, all links (such as a steel product production plant, a processing plant, a B2B transaction platform, a terminal merchant and the like) in the steel product industrial chain are circulated, are connected to the main chain through own computer equipment, initiate a network access request to the main chain by the identity of a new network access node, and submit registration information (including operation qualification, specific links in the steel product industrial chain, whether to serve as a storage node/an access side chain node and the like). The intelligent contracts deployed on the alliance chain automatically check whether the submitted registration information is complete and the like, then the information is submitted to a special enterprise qualification checking department for verification, after the verification is passed, the enterprise computer accounts submitting the registration information are regarded as nodes in the main chain, and enterprises can select to serve as main chain nodes or serve as main chain nodes and storage side chain nodes simultaneously according to requirements, namely cross-chain nodes.
Regarding the PoS consensus mechanism of the main chain, since the present scheme does not issue digital money, in the main chain, the next production block node is determined according to the node contribution and the preset rule.
The Contribution (Contribution of Node) index comprehensively considers the network performance and the storage performance of each Node and the participation enthusiasm of the Node to the alliance chain system, specifically, the Node network performance index, the Node storage performance index, the Node transmission data volume index and the weighted sum of the response access aggressiveness index, and the specific calculation formula can be as follows:
Figure 870775DEST_PATH_IMAGE001
wherein the content of the first and second substances,CON(i) Denotes the second in the main chainiThe contribution of the individual nodes is made,
Figure 369102DEST_PATH_IMAGE010
respectively represent
Figure 203679DEST_PATH_IMAGE011
The specific weight is a proportional parameter, and can be dynamically adjusted according to the actual situation.
Figure 661467DEST_PATH_IMAGE002
Denotes in the main chain the firstiIndividual node network performance index, specificallyiA node and its nearestnThe average distance of the nodes, characterizing their delay,nthe value is generally set to be 10,Averageit is indicated that the average value is calculated,Distance(i,j) Represents the second in the calculation backboneiA node and ajThe distance between each node can flexibly select the Manhattan distance, the Euclidean distance and the like.
Figure 45411DEST_PATH_IMAGE003
Denotes the second in the main chainiEach node stores a performance index, specificallyiThe storage capacity of the individual nodes remains in storage,Store(i) Denotes in the main chain the firstiThe amount of hard disk storage already used by each node, Store all (i) Denotes in the main chain the firstiThe total storage capacity of the computers of the individual nodes,P 1 representStore all (i)- Store(i) The weight of (a) is determined,P 2 to representStore all (i)/ Store(i) The weight of (c).
Figure 26224DEST_PATH_IMAGE004
Denotes the second in the main chainiEach node transmits an index of the amount of data,
Figure 285780DEST_PATH_IMAGE005
denotes in the main chain the firstiThe amount of ledger data uploaded by each node,
Figure 888537DEST_PATH_IMAGE006
denotes in the main chain the firstiAnd (4) the data volume of the account book downloaded by each node. For an active node that is often online, the ledger data downloaded and distributed to other nodes is necessarily higher than for an inactive network node by performing data synchronization multiple times.
Figure 857761DEST_PATH_IMAGE007
Denotes the second in the main chainiAn individual node response access aggressiveness index for describing how aggressively a node responds to the access function,
Figure 455750DEST_PATH_IMAGE008
denotes the second in the main chainiThe access request received by the individual node is,
Figure 704066DEST_PATH_IMAGE018
denotes the second in the main chainiThe access request responded by each node; the more access requests a node responds to, the higher the proportion of positive responses to the received access requests, and the higher the block probability of the node.
The preset rule is as follows: in the main chain, ifiThe probability of the block production of each node reaches the target value of the block production firstlyiEach node is a next block production node; wherein the block production probability is based oniAnd the contribution of each node is obtained by calculation, and the production block target value is obtained by calculation according to the hash value of the production block target value.
The calculation formula of the block generation probability is as follows:
Figure 999263DEST_PATH_IMAGE012
wherein, the first and the second end of the pipe are connected with each other,CON(i) Denotes the second in the main chainiThe contribution of each of the nodes is calculated,P(i) Denotes the second in the main chainiThe block-producing probability of each node,
Figure 993632DEST_PATH_IMAGE013
representing the blocky spacing in the main chain,trepresenting time since the last block was produced;
the calculation formula of the block production target value is as follows:
Figure 535823DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 232556DEST_PATH_IMAGE015
representing a birth massbThe target value is,
Figure 442695DEST_PATH_IMAGE016
representing a birth massb-1 target value, blockb-1 represents the last produced block,
Figure 399893DEST_PATH_IMAGE017
it is indicated that the hash value is calculated,Npresentation control
Figure 506127DEST_PATH_IMAGE015
Calculating a parameter of value magnitude to avoid
Figure 181566DEST_PATH_IMAGE015
Too large results in no new blocks being generated for a long period of time, mod represents the integer divide and remainder.
Before each new block is produced, each node is based on
Figure 664237DEST_PATH_IMAGE016
The hash value of (1) is calculated by combining the contribution of the hash value with the contribution of the hash value of (1)
Figure 478872DEST_PATH_IMAGE015
And P(i) Following withtIncrease of (2)P(i) Will become larger and reach the target value of the production block first
Figure 552745DEST_PATH_IMAGE015
A node of, i
Figure 313151DEST_PATH_IMAGE019
And elected as the next production block node.
The storage side chain is built by adopting a PoS consensus algorithm with the same main chain, a special sidechain field is additionally arranged in the head of a block of the storage side chain, and the field value in the block of the storage side chain is 10.
And a special time period is set in the storage side chain and used for describing the failure time of the steel information of the main chain, and each time a time period passes, the fact that a certain amount of circulating steel information in the whole main chain account book is outdated and needs to be cleaned is represented.
The storage side chain nodes are all cross-chain nodes and are all located in the main chain, so that the storage side chain can directly execute cross-chain intelligent contract calling on the cross-chain nodes, the intelligent contract conducts source tracing retrieval from the highest block of the main chain, steel information which is not accessed for a long time is screened out, numbers of the steels are packaged into the storage side chain block (with the sidechain value of 10), the steel information is broadcasted through the alliance chain network, the other cross-chain nodes conduct correctness and timeliness verification on the steel information after receiving the steel information, the steel information is signed after the verification is passed, and then the signed information is continuously forwarded. When more than two thirds of nodes in the storage side chain sign the information, each storage node transfers the outdated steel information to the storage side chain for storage by adopting an atom cross-chain technology.
In the storage side chain, a special cycle monitoring intelligent contract is deployed. Since the storage sidechain nodes themselves are already deployed in the main chain, smart contracts on the storage sidechain enable continuous monitoring of the speed of increase of the block height of the main chainVBAnd average transaction timeATAnd flexibly adjusting the inter-block spacing of the inter-chain block according to the two data. Specifically, in the storage side chain, the block interval is reduced along with the increase speed of the block height of the main chain and the increase of the average transaction time, so that the storage side chain is controlled to transfer outdated steel information more quickly, the storage load of the main chain is reduced, and the formula can be expressed as follows:
Figure 84667DEST_PATH_IMAGE020
wherein the content of the first and second substances,
Figure 563928DEST_PATH_IMAGE021
representing the chunk interval in the memory sidechain, the formula being merely to illustrate the chunk interval andVBATin inverse proportion, when the method is implemented, other factor parameters are also considered in the block production interval,
Figure 697450DEST_PATH_IMAGE022
refer to other factor parameters.
When the steel material is circulated and traced, if the steel material information required to be accessed by tracing is stored by the storage side chain, the main chain node initiates a 'move back' transaction request to the storage side chain node, and after the storage side chain node receives the transaction, the steel material information in the storage side chain is re-extracted and transferred back to the main chain through an atom chain crossing technology. Thereafter, the steel information is stored in the main chain ledger until it is again identified as obsolete and transferred back to the storage side chain.
The steel information transfer between the main chain and the storage side chain adopts an atom chain-crossing technology, and taking the outdated steel information transfer of the main chain to the storage side chain as shown in fig. 2 as an example, the specific process can be as follows:
1) The cross-link node collects cross-link transactions into a temporary block, counts modified data items in the account, writes the modified data items into a modified _ List, calculates Hash values of block states before and after modification of related transactions, records the Hash values as Hash _ Origin and Hash _ Update, sets two TimeLock values for the cross-link node after all data are written, wherein the two TimeLock values are TimeLock _ begin and TimeLock _ over (TimeLock _ begin < TimeLock _ over), and finally signs the cross-link node and broadcasts the cross-link node into a main chain network.
2) And after receiving the transaction, the main chain node verifies the cross-chain transaction, uses a private key to sign after the verification is passed, and continuously forwards the cross-chain transaction.
3) After the chain-crossing nodes receive the forwarded chain-crossing transaction and verify that the chain-crossing transaction simultaneously meets the requirement of M1 of N1 (assuming that N1 main chain nodes participate in consensus verification, and if M1 nodes complete verification, the transaction passes verification) and the current time are less than TimeLock _ begin, locking the data items in the transaction and sending the chain-crossing transaction to the storage side chain node;
4) If the main chain node fails to receive the cross-chain transaction meeting the consensus requirement within the TimeLock _ begin time, the data item is automatically unlocked, and the cross-chain transaction is represented to fail to start (the step is all generated locally in the main chain);
5) After receiving the cross-link transaction, the storage side chain node executes the transaction, compares the results before and after execution with Hash _ Origin and Hash _ Update, and if no error exists, signs the transaction and forwards the signed transaction to other storage side chain nodes;
6) After receiving the cross-link transaction, the storage side chain nodes verify that the cross-link transaction simultaneously meets the requirement of M2 of N2 (assuming that N2 storage side chain nodes participate in the common-identification verification, and if M2 nodes complete the verification, the transaction passes the verification) and the common-identification proportion and the current time are less than TimeLock _ over, the transaction is modified and applied to the current account, and confirmation information is returned to the cross-link node;
7) And after receiving the confirmation information, the cross-link point forwards the confirmation information to the main chain network. After receiving the confirmation information, the main chain node verifies the TimeLock _ over, unlocks the corresponding data item and executes deletion operation after the TimeLock _ over is verified;
8) If the main chain node fails to receive the confirmation information in the TimeLock _ over time, representing that the cross-chain transaction operation fails, the lock of the related data item is automatically released, and the modification is abandoned.
Storing the side chain to main chain transfer steel information is the reverse process described above.
When the circulating steel is traced, common commercial tenants or tourist users only need to execute some lightweight operations, aiming at the users, a plurality of access side chains are also arranged in the alliance chain, the access side chains are connected with nearby main chain nodes in the area, main chain accounts are obtained from the connected main chain nodes, and the main chain accounts are segmented and stored in each access side chain node; when the steel circulation is traced, the visiting side chain receives a tracing request of a common merchant or a tourist.
The access side chain adopts a committee consensus algorithm, a special sidechain field is arranged in the head of an access side chain block, the field value in the access side chain block is 11, under the access side chain, a common merchant or a tourist user can complete light-weight operation only by using a small amount of computing resources and storage resources without downloading a complete main chain account book or adding into a consensus process.
Each region independently runs its own access side chain and internal committee consensus mechanism. For an access side chain of a certain area, a complete main chain account book is obtained from a nearby main chain node, and then is divided and stored in each access side chain node in the area, each node needs to independently establish a neighboring account book of itself, and the sum of the neighboring account books of all nodes in the area is ensured to be not lower than two main chain account books (namely, each block in the main chain account book is ensured to be stored by not less than two access side chain nodes in the area).
The internal committee consensus of the access side chain is mainly used for synchronizing the cooperative preservation of the main chain account between the nodes of the access side chain and keeping synchronous updating between the main chain account and the side chain node, and a simple PBFT consensus algorithm is adopted in the committee.
By arranging the special access side chain for common merchants and tourists to use, the part of transactions can be quickly executed by means of the segmentation storage of the account book, so that the access processing burden of the main chain is reduced, the processing delay of the user during query is reduced, and the user experience is optimized.
As shown in fig. 3, after a common merchant or a visitor accesses the access side-chain network as an access side-chain node, a processing flow of initiating a source tracing request for a specific steel may be as follows:
a1 After receiving the request (source tracing request), the visiting side chain node firstly retrieves a local adjacent account book and inquires steel information; if the local steel information exists, the information is directly returned to the user for display; if the corresponding steel information cannot be inquired locally, forwarding the request to other access side chain nodes in the same region;
a2 Other access side chain nodes receive the access request, if the local side chain nodes have corresponding steel information, the steel information is returned to the requested node, and if the local side chain nodes do not have the corresponding steel information, the request information is continuously forwarded;
a3 In a regional access sidelink network, non-outdated steel information must be queried, so that for all requests, a reply can be obtained by traversing the entire regional network in the worst case. Meanwhile, a main chain node arranged near the center of the region exists in the region, and the main chain node also responds to the request, so that the response time can be further shortened;
a4 When the main chain node in the region receives the request, the user is verified to access the outdated steel information, resource scheduling is applied to the storage side chain, and the outdated steel information is transferred to the main chain for access by the storage side chain in an atomic chain crossing mode.
When forwarding is requested, forwarding is performed by using a proximity principle, such as the above tracing process, as shown in fig. 4:
11 Suppose the user wishes to access the steel information of blocks 2, 4, 5, 6, 7, a request is sent to access side node a;
12 Access side chain node a retrieves local neighboring accounts to obtain blocks 5, 6, directly feeds back the blocks 5, 6 to the user, and sends requests for accessing blocks 2, 4, 7 to access side chain nodes B and C according to the principle of proximity;
13 Access side chain node B retrieves local neighbor account book and then obtains block 7, feeds back block 7 to the user through access side chain node a, and sends request for accessing blocks 2 and 4 to main chain node F according to the principle of proximity;
the visiting side chain node C retrieves the local adjacent account book without obtaining the block, and sends the request of visiting the blocks 2 and 4 to the main chain node F according to the principle of proximity;
A. b and C are 3 nodes in an access side chain, and other nodes are farther than a main chain node F, so that the request is not forwarded to other nodes, but is directly forwarded to the main chain node F;
14 Main chain node F retrieves block 4, and feeds back block 4 to the user by accessing side chain node B and accessing side chain node A; and the main chain node F verifies that the block 2 is the outdated steel information, sends a request to the storage side chain and transfers the outdated steel information to the main chain for access.
The alliance chain can effectively reduce the computing pressure of computer equipment in a steel tracing scene, remarkably improve the throughput of transaction processing, reduce the storage threshold of a new network access node and facilitate the use of a user under the condition of not losing the decentralized characteristic and data integrity of the traditional alliance chain.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (7)

1. An alliance chain suitable for tracing the source of circulating steel is characterized by comprising a main chain and a storage side chain, wherein a PoS consensus algorithm is adopted, and nodes of the storage side chain are all chain-crossing nodes in the main chain at the same time;
main chain: storing steel information of each link in a steel circulation industrial chain; in the main chain, determining a next production block node according to the node contribution and a preset rule; the node contribution is the weighted sum of a node network performance index, a node storage performance index, a node transmission data volume index and a response access positive degree index;
storage side chain: periodically retrieving outdated steel information in a main chain, and transferring the outdated steel information to self storage; when the steel products are circulated and traced, if the steel product information needing to be visited is stored by the steel product tracing device, the steel product information needing to be visited is transferred to the main chain for storage.
2. A federation chain for traceability of circulating steel material as claimed in claim 1 wherein the calculation formula of the node contribution is:
Figure DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,CON(i) Denotes the second in the main chainiThe contribution of each node;
Figure 611457DEST_PATH_IMAGE002
denotes the second in the main chainiThe network performance index of each node is measured,Averageit is indicated that the average value is calculated,Distance(i,j) Denotes in the calculation backboneiA node and ajThe distance between nodes;
Figure DEST_PATH_IMAGE003
denotes the second in the main chainiEach node stores a performance index that is,Store(i) Denotes the second in the main chainiThe amount of hard disk storage already used by each node,Store all (i) Denotes in the main chain the firstiThe total storage capacity of the computers of the individual nodes,P 1 to representStore all (i)- Store(i) The weight of (a) is calculated,P 2 to representStore all (i)/ Store(i) The weight of (c);
Figure 92992DEST_PATH_IMAGE004
denotes the second in the main chainiEach node transmits a data amount indicator,
Figure DEST_PATH_IMAGE005
denotes the second in the main chainiThe amount of ledger data uploaded by each node,
Figure 753781DEST_PATH_IMAGE006
denotes the second in the main chainiThe data volume of the account book downloaded by each node;
Figure DEST_PATH_IMAGE007
denotes in the main chain the firstiThe individual node responds to the access aggressiveness indicator,
Figure 771415DEST_PATH_IMAGE008
denotes the second in the main chainiThe access request received by the individual node is,
Figure DEST_PATH_IMAGE009
denotes in the main chain the firstiThe access request responded by each node;
Figure 402DEST_PATH_IMAGE010
respectively represent
Figure DEST_PATH_IMAGE011
The weight of (c).
3. A federation chain suitable for tracing the source of a circulating steel product according to claim 1, wherein the preset rules are:
in the main chain, ifiThe probability of the block production of each node reaches the target value of the block production firstlyiEach node is a next block production node;
wherein the block production probability is based oniAnd the contribution of each node is obtained by calculation, and the production block target value is obtained by calculation according to the hash value of the production block target value.
4. A federation chain for tracing the source of a circulating steel product as claimed in claim 3, wherein the calculation formula for the block probability is:
Figure 533015DEST_PATH_IMAGE012
wherein the content of the first and second substances,CON(i) Denotes the second in the main chainiThe contribution of the individual nodes is made,P(i) Denotes the second in the main chainiThe block probability of each node is calculated,
Figure DEST_PATH_IMAGE013
representing the product block spacing in the main chain,trepresenting the time since the last chunk was produced;
the calculation formula of the yield target value is as follows:
Figure 138440DEST_PATH_IMAGE014
wherein, the first and the second end of the pipe are connected with each other,
Figure DEST_PATH_IMAGE015
representing a birth massbThe target value is a value of a target,
Figure 512046DEST_PATH_IMAGE016
representing a birth massb-1 target value, blockb-1 represents the last produced block,
Figure DEST_PATH_IMAGE017
it is indicated that the hash value is calculated,Npresentation control
Figure 36568DEST_PATH_IMAGE015
The parameter of the magnitude of the operation value, mod, represents the integer division remainder.
5. A federation chain for tracing the origin of flowing steel products, as claimed in claim 1, wherein in the storage side chain, the product block spacing decreases with the speed of increase of the block height of the main chain and the average transaction time.
6. A federation chain for tracing the source of a circulating steel product as claimed in claim 1 further comprising a plurality of access side chains;
the access side chain is connected with a nearby main chain node in the region, a main chain account book is obtained from the connected main chain node, and the main chain account book is segmented and stored in each access side chain node; when the steel circulation traceability system is used for traceability, the access side chain receives traceability requests of common merchants or tourists.
7. A alliance chain suitable for steel circulation tracing according to claim 1 wherein, the steel information transfer between main chain and storage side chain adopts atom chain technology.
CN202210838457.4A 2022-07-18 2022-07-18 Alliance chain suitable for circulation steel is traced to source Active CN114915428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210838457.4A CN114915428B (en) 2022-07-18 2022-07-18 Alliance chain suitable for circulation steel is traced to source

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210838457.4A CN114915428B (en) 2022-07-18 2022-07-18 Alliance chain suitable for circulation steel is traced to source

Publications (2)

Publication Number Publication Date
CN114915428A CN114915428A (en) 2022-08-16
CN114915428B true CN114915428B (en) 2022-11-18

Family

ID=82772779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210838457.4A Active CN114915428B (en) 2022-07-18 2022-07-18 Alliance chain suitable for circulation steel is traced to source

Country Status (1)

Country Link
CN (1) CN114915428B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401927A (en) * 2020-03-31 2020-07-10 綦昱钧 Food label unique code issuing and circulation tracing method based on block chain major-minor chain technology
CN114490808A (en) * 2021-12-29 2022-05-13 深圳供电局有限公司 Data tracing method and device, computer equipment and storage medium
CN114663104A (en) * 2020-12-05 2022-06-24 江苏方芯维信息科技有限公司 PBFT based on block chain product supply chain tracing

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582473A (en) * 2018-10-26 2019-04-05 阿里巴巴集团控股有限公司 Across chain data access method and device based on block chain
CN110490282A (en) * 2019-08-21 2019-11-22 湖南道业信息科技有限公司 Source tracing method, device of tracing to the source, traceability system and storage medium
CN111159288B (en) * 2019-12-16 2023-04-28 郑杰骞 Method, system, device and medium for storing, verifying and realizing chained structure data
CN111292097A (en) * 2019-12-30 2020-06-16 山东爱城市网信息技术有限公司 Supply chain tracing method, equipment and medium based on block chain
CN112380179A (en) * 2020-12-14 2021-02-19 河钢数字技术股份有限公司 Block chain-based steel supply chain information secret sharing method and system
CN113010906B (en) * 2021-04-12 2023-10-27 福建省海峡信息技术有限公司 Trusted data tracing method and system based on blockchain
CN113506117A (en) * 2021-07-15 2021-10-15 上海海洋大学 Aquatic product block chain traceability optimization system and method
CN114374506A (en) * 2021-11-29 2022-04-19 国网辽宁省电力有限公司大连供电公司 Security tracing and sharing supervision method for power data under master-slave alliance link

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111401927A (en) * 2020-03-31 2020-07-10 綦昱钧 Food label unique code issuing and circulation tracing method based on block chain major-minor chain technology
CN114663104A (en) * 2020-12-05 2022-06-24 江苏方芯维信息科技有限公司 PBFT based on block chain product supply chain tracing
CN114490808A (en) * 2021-12-29 2022-05-13 深圳供电局有限公司 Data tracing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114915428A (en) 2022-08-16

Similar Documents

Publication Publication Date Title
US20170242761A1 (en) Fault tolerant listener registration in the presence of node crashes in a data grid
CN106034160B (en) Distributed computing system and method
CN103617199B (en) A kind of method and system operating data
JPWO2013018808A1 (en) Distributed storage system and method
CN100383792C (en) Buffer data base data organization method
CN102984280A (en) Data backup system and method for social cloud storage network application
CN110597835B (en) Transaction data deleting method and device based on blockchain
Labouseur et al. Scalable and Robust Management of Dynamic Graph Data.
CN109767274B (en) Method and system for carrying out associated storage on massive invoice data
CN103412929A (en) Mass data storage method
CN106095957A (en) Cross-domain many wave files synchronous method of distributed file system and device
CN101419600A (en) Data copy mapping method and device based on object-oriented LANGUAGE
CN105681052A (en) Energy-saving method for data center distributed file storage
JP2023541298A (en) Transaction processing methods, systems, devices, equipment, and programs
CN110231915A (en) Data managing method, system, device, computer equipment and storage medium
Liao et al. A QoS-aware dynamic data replica deletion strategy for distributed storage systems under cloud computing environments
CN113902127A (en) Asynchronous federal learning method with block chain enabled
Li et al. Fabric-chain & chain: a blockchain-based electronic document system for supply chain finance
CN113342418B (en) Distributed machine learning task unloading method based on block chain
CN112084201B (en) Distributed account book processing method and device, storage medium and electronic equipment
CN114915428B (en) Alliance chain suitable for circulation steel is traced to source
CN107346342A (en) A kind of file call method calculated based on storage and system
Jiang et al. [Retracted] Evaluation Method of Human Resource Management Efficiency of Chain Retail Enterprises Based on Distributed Database
CN116401270A (en) Data query method, device, computer equipment and storage medium
CN116244610A (en) Distributed query system based on machine learning and optimization method thereof

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
CP03 Change of name, title or address

Address after: X-022, 3rd Floor, Building 3, No. 5, Wangjiang Road, Nanjing Area, China (Jiangsu) Pilot Free Trade Zone, Nanjing, Jiangsu, 210000

Patentee after: Jiangsu Nangang Shuyi Technology Service Co.,Ltd.

Country or region after: China

Address before: X-022, 3rd Floor, Building 3, No. 5, Wangjiang Road, Nanjing Area, China (Jiangsu) Pilot Free Trade Zone, Nanjing, Jiangsu, 210000

Patentee before: Jiangsu Shuyi Technology Service Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address