CN114915428A - Alliance chain suitable for circulation steel is traceed to source - Google Patents

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

Info

Publication number
CN114915428A
CN114915428A CN202210838457.4A CN202210838457A CN114915428A CN 114915428 A CN114915428 A CN 114915428A CN 202210838457 A CN202210838457 A CN 202210838457A CN 114915428 A CN114915428 A CN 114915428A
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.)
Granted
Application number
CN202210838457.4A
Other languages
Chinese (zh)
Other versions
CN114915428B (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 the source of circulating steel, and belongs to the field of alliance chain accounting for fixed commodities and a whole industrial 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 problem, which causes the loss or mismatch of database information; (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 returned 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 account book with hundreds of GB of Merlot greatly improves the threshold of a new network access node.
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 device, 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 chainiThe contribution of each node;
Figure 181478DEST_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) Represents the second in the calculation backboneiA node and ajThe distance between nodes;
Figure 305554DEST_PATH_IMAGE003
denotes the second in the main chainiEach node stores a performance index for each of the nodes,Store(i) Denotes the second in the main chainiThe 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 to 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 the second in the main chainiEach node transmits a data amount indicator,
Figure 612129DEST_PATH_IMAGE005
denotes the second in the main chainiThe amount of ledger data uploaded by each node,
Figure 993169DEST_PATH_IMAGE006
denotes the second in the main chainiThe data volume of the account book downloaded by each node;
Figure 405040DEST_PATH_IMAGE007
denotes the second in the main chainiEach 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 the second in the main chainiThe 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 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 183639DEST_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 in the main chain the firstiThe 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 content of the first and second substances,
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
it is indicated 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 schematic view of a main chain block structure;
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.
A 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 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;
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.
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 side chain field is additionally arranged in a main chain Block head, the field value in the main chain Block is 00, the main chain Block structure is shown in FIG. 1, Previous _ Hash in the figure represents the Hash value of the Previous Block, Block _ Number represents the 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 the 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 steel product factories, processing factories, B2B trading platforms, terminal merchants 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 the 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/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 nodes) 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 Contribution (Contribution of nodes) 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 aggressiveness index, and a 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 chainiIndividual nodes store performance metrics, particularlyiThe storage capacity of the individual nodes remains in storage,Store(i) Denotes the second in the main chainiThe 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 to 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 a data amount indicator,
Figure 285780DEST_PATH_IMAGE005
denotes the second in the main chainiThe amount of ledger data uploaded by each node,
Figure 888537DEST_PATH_IMAGE006
denotes the second in the main chainiAnd (4) the data volume of the account book downloaded by each node. For an active node that is often online, it must perform data synchronization multiple times with downloaded ledger data and ledger data distributed to other nodes higher than for an inactive network node.
Figure 857761DEST_PATH_IMAGE007
Denotes the second in the main chainiAn individual node response access aggressiveness index describing how aggressively a node responds to access functions,
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 the individual nodes is made,P(i) Denotes in the main chain the firstiThe block-producing probability of each node,
Figure 993632DEST_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 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 the storage side chain block, and the field value in the storage side chain block 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 have signed the information, each storage node transfers the outdated steel information to the storage side chain for storage by adopting an atom chain crossing 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 block interval of the cross-chain block according to the two items of 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 andVBATinversely proportional, when the block generation interval is realized in a concrete way, other factor parameters are also considered,
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 is 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 transaction to other storage side chain nodes;
6) after receiving the cross-chain transaction, the storage side chain node verifies that the common recognition proportion and the current time of the storage side chain node simultaneously meet M2 of N2 (assuming that N2 storage side chain nodes participate in common recognition verification, and if M2 nodes complete verification, the transaction passes verification) are less than TimeLock _ over, the storage side chain node applies the transaction modification to the current account and returns confirmation information to the cross-chain link point;
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 fails to run, 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 traceability system is used for traceability, the access side chain receives traceability requests of common merchants or tourists.
The access side chain adopts a committee consensus algorithm, a special sidechain field is set 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, and does not need to download a complete main chain account book or add the main chain account book 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 among the nodes of the access side chain and keeping synchronous updating with the main chain account in time, 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 visited sideline network as a visited sideline node, a processing flow of initiating a request for tracing to a specific steel may be as follows:
A1) after receiving a request (source tracing request), an access 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) after other access side chain nodes receive the access request, if the local nodes have corresponding steel information, the other access side chain nodes return the steel information to the requested node, and if the local nodes do not have the corresponding steel information, the other access side chain nodes continue to forward the request information;
A3) in the area access side-chain network, non-outdated steel information can be inquired certainly, so that all requests can be replied only by traversing the whole area network under the worst condition. Meanwhile, a main chain node which is arranged near the center of the region exists in the region, and the main chain node can also respond to the request, so that the response time can be further shortened;
A4) and if the main chain node in the region verifies that the user is accessed by outdated steel information after receiving the request, applying for resource scheduling to the storage side chain, wherein the storage side chain transfers the outdated steel information to the main chain for access 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) assuming that the user wishes to access the steel information of the blocks 2, 4, 5, 6, 7, a request is sent to the access side chain node A;
12) the access side chain node A retrieves local adjacent accounts to obtain blocks 5 and 6, directly feeds the blocks 5 and 6 back to the user, and sends requests for accessing the blocks 2, 4 and 7 to the access side chain nodes B and C according to the principle of proximity;
13) the access side chain node B retrieves a local adjacent account book to obtain a block 7, feeds the block 7 back to a user through the access side chain node A, and sends requests for accessing the blocks 2 and 4 to the 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, C are 3 nodes in the access side chain, and since the other nodes are farther away than the main chain node F, the request is not forwarded to the other nodes, but is directly forwarded to the main chain node F;
14) the main chain node F searches the block 4, and feeds the block 4 back to the user by accessing the side chain node B and accessing the 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 product 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 (8)

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 the main chain and the storage side chain adopt a PoS consensus algorithm, and nodes of the storage side chain are 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;
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 suitable for tracing to the source of a circulating steel product according to claim 1, wherein in the main chain, the next production block node is determined according to the node contribution and the 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.
3. A federation chain for traceability of circulating steel material as claimed in claim 2 wherein the calculation formula of the node contribution is:
Figure 214688DEST_PATH_IMAGE001
wherein the content of the first and second substances,CON(i) Denotes the second in the main chainiThe contribution of each node;
Figure 90019DEST_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) Represents the second in the calculation backboneiA node and ajThe distance between each node;
Figure 620488DEST_PATH_IMAGE003
denotes the second in the main chainiEach node stores a performance index for each of the nodes,Store(i) Denotes the second in the main chainiThe 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 to representStore all (i)- Store(i) The weight of (a) is determined,P 2 to representStore all (i)/Store(i) The weight of (c);
Figure 763500DEST_PATH_IMAGE004
denotes the second in the main chainiEach node transmits a data amount indicator,
Figure 577873DEST_PATH_IMAGE005
denotes the second in the main chainiThe amount of ledger data uploaded by each node,
Figure 151068DEST_PATH_IMAGE006
denotes the second in the main chainiThe data volume of the account book downloaded by each node;
Figure 355784DEST_PATH_IMAGE007
denotes the second in the main chainiThe individual node responds to the access aggressiveness indicator,
Figure 554684DEST_PATH_IMAGE008
denotes in the main chain the firstiThe access request received by the individual node is,
Figure 223563DEST_PATH_IMAGE009
denotes the second in the main chainiThe access request responded by each node;
Figure 964729DEST_PATH_IMAGE010
respectively represent
Figure 719059DEST_PATH_IMAGE011
The weight of (c).
4. A federation chain for traceability of circulating steel products as claimed in claim 2 wherein the predetermined rule is:
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.
5. A federation chain suitable for tracing to the source of circulating steel products as claimed in claim 4 wherein the calculation formula for the block probability is:
Figure 456071DEST_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-producing probability of each node,
Figure 730188DEST_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 160033DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 149461DEST_PATH_IMAGE015
representing a birth massbThe target value is,
Figure 424584DEST_PATH_IMAGE016
representing a birth massb-1 target value, blockb-1 represents the last produced block,
Figure 818788DEST_PATH_IMAGE017
it is indicated that the hash value is calculated,Npresentation control
Figure 91637DEST_PATH_IMAGE015
The parameter of the magnitude of the operation value, mod, represents the integer division remainder.
6. A federation chain for traceability of steel products for flow-through according to claim 1 wherein in the storage side chain the production block spacing decreases with increasing speed of block height of the main chain and increasing average transaction time.
7. A federation chain for traceability of circulating steel material as claimed in claim 1 further including a plurality of access sidechains;
the access side chain is connected with the nearby main chain node of 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.
8. 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 true CN114915428A (en) 2022-08-16
CN114915428B 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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490282A (en) * 2019-08-21 2019-11-22 湖南道业信息科技有限公司 Source tracing method, device of tracing to the source, traceability system and storage medium
CN111292097A (en) * 2019-12-30 2020-06-16 山东爱城市网信息技术有限公司 Supply chain tracing method, equipment and medium based on block chain
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
CN112380179A (en) * 2020-12-14 2021-02-19 河钢数字技术股份有限公司 Block chain-based steel supply chain information secret sharing method and system
US20210157875A1 (en) * 2018-10-26 2021-05-27 Advanced New Technologies Co., Ltd. Blockchain-based cross-chain data access method and apparatus
CN113010906A (en) * 2021-04-12 2021-06-22 福建省海峡信息技术有限公司 Credible data tracing method and system based on block chain
WO2021120253A1 (en) * 2019-12-16 2021-06-24 郑杰骞 Data storage method and verification method for blockchain structure, blockchain structure implementation method, blockchain-structured system, device, and medium
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
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

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210157875A1 (en) * 2018-10-26 2021-05-27 Advanced New Technologies Co., Ltd. Blockchain-based cross-chain data access method and apparatus
CN110490282A (en) * 2019-08-21 2019-11-22 湖南道业信息科技有限公司 Source tracing method, device of tracing to the source, traceability system and storage medium
WO2021120253A1 (en) * 2019-12-16 2021-06-24 郑杰骞 Data storage method and verification method for blockchain structure, blockchain structure implementation method, blockchain-structured system, device, and medium
CN111292097A (en) * 2019-12-30 2020-06-16 山东爱城市网信息技术有限公司 Supply chain tracing method, equipment and medium based on block chain
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
CN112380179A (en) * 2020-12-14 2021-02-19 河钢数字技术股份有限公司 Block chain-based steel supply chain information secret sharing method and system
CN113010906A (en) * 2021-04-12 2021-06-22 福建省海峡信息技术有限公司 Credible data tracing method and system based on block chain
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
CN114490808A (en) * 2021-12-29 2022-05-13 深圳供电局有限公司 Data tracing method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GOWIND MISRA ET AL: "Real-time supply chain tracing using blockchain from cloud-based computing portal", 《2021 6TH INTERNATIONAL CONFERENCE ON INNOVATIVE TECHNOLOGY IN INTELLIGENT SYSTEM AND INDUSTRIAL APPLICATIONS (CITISIA)》 *
张燕丽等: "基于主从联盟链结构的农产品供应链追溯系统方案设计", 《计算机应用研究》 *

Also Published As

Publication number Publication date
CN114915428B (en) 2022-11-18

Similar Documents

Publication Publication Date Title
US9965364B2 (en) Fault tolerant listener registration in the presence of node crashes in a data grid
CN105210062B (en) System scope checkpoint for distributed data base system avoids
CN105190622B (en) Quick collapse for distributed data base system restores
CN101697526A (en) Method and system for load balancing of metadata management in distributed file system
CN106034160B (en) Distributed computing system and method
CN102546782A (en) Distribution system and data operation method thereof
CN103873559A (en) Database all-in-one machine capable of realizing high-speed storage
CN103617199B (en) A kind of method and system operating data
CN103530388A (en) Performance improving data processing method in cloud storage system
CN104462185A (en) Digital library cloud storage system based on mixed structure
CN102984280A (en) Data backup system and method for social cloud storage network application
CN109767274B (en) Method and system for carrying out associated storage on massive invoice data
CN103581332A (en) HDFS framework and pressure decomposition method for NameNodes in HDFS framework
Labouseur et al. Scalable and Robust Management of Dynamic Graph Data.
CN109002543A (en) A kind of method and apparatus of file storage
CN106095957A (en) Cross-domain many wave files synchronous method of distributed file system and device
CN111159140B (en) Data processing method, device, electronic equipment and storage medium
CN109933564A (en) File system management method, device, terminal, the medium of quick rollback are realized based on chained list and N-ary tree construction
WO2018140840A1 (en) Management of cloud-based shared content using predictive cost modeling
CN113342418B (en) Distributed machine learning task unloading method based on block chain
CN110009320B (en) Resource conversion method, device, system, storage medium and computer equipment
CN109271105A (en) Date storage method and distributed storage cluster applied to distributed storage cluster
CN114915428B (en) Alliance chain suitable for circulation steel is traced to source
CN108132759A (en) A kind of method and apparatus that data are managed in file system
Swaroopa et al. An efficient replication management system for HDFS management

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