A method and device for chaining business data in a supply chain

By constructing a supply chain alliance chain to verify data records and generate verification data, and using smart contracts to determine accounting nodes, the problems of data tampering and counterfeiting in blockchain management are solved, and the authenticity and trustworthiness of supply chain data are achieved.

CN116318770BActive Publication Date: 2026-04-21湖北省楚天云有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
湖北省楚天云有限公司
Filing Date
2022-11-23
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing blockchain-based supply chain management technologies, the authenticity of data uploaded to the chain is difficult to guarantee, accounting nodes are easily tampered with, leading to counterfeiting, and it is difficult to trace the counterfeiting process.

Method used

By constructing a supply chain consortium blockchain, verifying the current data records of the data nodes to be uploaded to the chain, generating verification data and obtaining a second preset algorithm, using smart contracts to determine the accounting nodes, achieving consensus on the calculation results, and ensuring the authenticity and credibility of the data.

Benefits of technology

It improves the security and authenticity of data on the blockchain, prevents data tampering, significantly reduces the difficulty of external attacks, and enables trusted management of business data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116318770B_ABST
    Figure CN116318770B_ABST
Patent Text Reader

Abstract

The application relates to a business data on-chain method and device in a supply chain, which comprises the following steps: verifying the current data record of a preceding participant node in a supply alliance chain where a data node to be chained is located; generating verification data based on the verified current data record according to a first preset algorithm, and obtaining a second preset algorithm from a preset number of calculation methods based on the verification data; obtaining a ledger node determined by other participant nodes in the supply alliance chain based on a preset accounting calculation task that has been reached a consensus; obtaining a calculation result generated by the other participant nodes based on at least part of parameters in the current data record according to the second preset algorithm; obtaining a consensus result of the calculation result of the other participant nodes determined by the ledger node according to a preset consensus method; and if the consensus is reached, the data to be chained is stored. The application significantly improves the difficulty of external attacks, can avoid human manipulation of the ledger node, and prevents illegal ledger nodes from performing data on-chain storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and apparatus for uploading business data to the blockchain in a supply chain. Background Technology

[0002] Traditional supply chain information management centers on a specific node in the supply chain, such as a manufacturer or sales platform, creating a small-scale information cluster. This is managed centrally using a database to manage information related to that node or link in the supply chain. When it's necessary to understand the entire supply chain, data exchange is conducted through offline communication between different roles or through single-system interface connections.

[0003] Blockchain is a novel application model that integrates computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Applying blockchain technology in the supply chain sector can break down centralized management models and reduce the risk of data falsification in traditional supply chains. Summary of the Invention

[0004] The inventors of this invention have discovered that existing blockchain-based supply chain management technologies, in order to reduce the storage pressure on the blockchain, only record the data of the nodes to be uploaded to the chain within the supply chain. This data record is easily tampered with, making it impossible to guarantee the authenticity of the uploaded data. Furthermore, the ledger nodes for data uploading are easily controlled by certain entities in the supply chain, resulting in data being uploaded to the chain but tampering going undetected, thus leading to counterfeiting. In view of the above problems, this invention provides a method and apparatus for uploading business data in the supply chain to the chain to solve or partially solve these problems. The technical solution proposed by this invention is as follows:

[0005] In a first aspect, the present invention provides a method for uploading business data to the blockchain in a supply chain, comprising:

[0006] Verify the current data records of the prior participating nodes in the supply alliance chain where the data node to be uploaded to the chain is located; the supply alliance chain is a consortium chain based on participating nodes constructed according to the order of the participants in the supply chain;

[0007] If the verification passes, according to the first preset algorithm, verification data is generated based on the current data records of the verified prior participating party nodes, and the second preset algorithm is obtained from a preset number of calculation methods based on the verification data.

[0008] Obtain the nodes of other participants in the supply alliance chain, and determine the accounting nodes based on the pre-defined accounting calculation task that has reached a consensus;

[0009] Obtain the calculation results generated by other participating nodes based on at least some parameters in the current data records of the prior participating nodes according to the second preset algorithm;

[0010] Obtain the consensus result of the other participating nodes on the calculation result, as determined by the accounting node according to a preset consensus method;

[0011] If the consensus result is that a consensus has been reached, then data to be uploaded to the blockchain is generated based on the current data records of the prior participating nodes, the business data of the data nodes to be uploaded to the blockchain, and the calculation result, and the data to be uploaded to the blockchain is stored on the blockchain.

[0012] In one or more embodiments, obtaining the second preset algorithm from a preset number of calculation methods based on the verification data includes:

[0013] Perform integer conversion and modulo operation on the verification data to obtain the modulo remainder;

[0014] Based on the mapping relationship between the preset hash algorithm and the modulo remainder, the calculation method corresponding to the modulo remainder is obtained from the calculation methods of the preset quantity, and used as the second preset algorithm; wherein, the value of the modulus in the modulo operation is the preset quantity.

[0015] In one or more embodiments, the accounting node is obtained by means of:

[0016] Based on smart contracts pre-deployed on the supply chain consortium blockchain, candidate nodes for accounting are determined;

[0017] Obtain nodes that meet the first preset condition from the candidate accounting nodes and use them as candidate accounting nodes;

[0018] Based on the pre-defined accounting calculation task that has been agreed upon, the nodes that meet the second pre-defined conditions among the candidate accounting nodes are selected as the accounting nodes.

[0019] In one or more embodiments, the step of obtaining nodes that meet the second preset condition from the candidate accounting nodes based on a pre-defined accounting calculation task with consensus, and using them as the accounting nodes, includes:

[0020] Obtain the computing power of each candidate accounting node to perform calculations on the consensus-based preset accounting calculation task;

[0021] The node with computing power in a preset number of bits among the candidate accounting nodes is selected as the accounting node.

[0022] The computing power is obtained through Formula 1:

[0023]

[0024] Wherein, t1 is the computation time for the candidate accounting node to upload and calculate the preset accounting calculation task, t2 is the computation time for the candidate accounting node to calculate the preset accounting calculation task for supplying the consortium blockchain network consensus, t3 is the computation time for the standard node to calculate the preset accounting calculation task, t4 is the computation time for the standard node to calculate the preset accounting calculation task for supplying the consortium blockchain network consensus, and M is the preset number of bits.

[0025] In one or more embodiments, the step of obtaining nodes that meet the second preset condition from the candidate accounting nodes based on a pre-defined accounting calculation task with consensus, and using them as the accounting nodes, includes:

[0026] Obtain the computing power of each candidate accounting node to perform calculations on the consensus-based preset accounting calculation task;

[0027] Obtain the hash result of the hash operation performed on the calculation result by each of the candidate accounting nodes;

[0028] Random numbers are generated for each of the candidate accounting nodes based on the hash result and the computing power.

[0029] Calculate the average of the random numbers of each candidate accounting node, and obtain the candidate accounting node corresponding to the random number closest to the average.

[0030] Obtain the consensus results of other participating nodes on the candidate accounting node corresponding to the random number closest to the average value. If the consensus result is that a consensus has been reached, then the candidate accounting node is adopted as the accounting node.

[0031] In one or more embodiments, verifying the current data records of prior participating nodes in the supply consortium blockchain where the data node to be uploaded to the blockchain resides includes:

[0032] Obtain the current data records of the prior participating nodes in the supply consortium blockchain where the data node to be uploaded to the blockchain is located, as well as the blockchain upload records; wherein, the blockchain upload records are generated based on the prior data records according to a third preset algorithm;

[0033] According to the third preset algorithm, the current data calculation result is generated based on the acquired current data record;

[0034] If the current data calculation result is consistent with the on-chain record of the consortium blockchain, the following steps are executed: according to the first preset algorithm, based on the current data record of the verified prior participating node, generating verification data, and obtaining the second preset algorithm from a preset number of calculation methods based on the verification data.

[0035] In one or more embodiments, before obtaining the calculation results generated by other participating nodes based on at least some parameters in the current data records of the prior participating nodes according to the second preset algorithm, the method further includes:

[0036] Obtain the verification results of other participating nodes, which verify the current data records of the prior participating nodes and the business data of the data nodes to be uploaded to the chain, according to a preset verification algorithm; wherein, the preset verification algorithm is determined based on the business data requirements or business data verification standards of the other participating nodes;

[0037] If the verification result is successful, the step of obtaining the calculation results generated by other participating nodes based on at least some parameters in the current data record of the prior participating node according to the second preset algorithm is executed.

[0038] Secondly, the present invention provides a device for uploading business data to the blockchain in a supply chain, comprising:

[0039] The verification module is used to verify the current data records of the prior participating party nodes in the supply alliance chain where the data node to be uploaded to the chain is located; the supply alliance chain is a consortium chain based on participating party nodes constructed according to the order of the participating parties in the supply chain.

[0040] The first calculation module is used to generate verification data based on the current data records of the verified prior participating party nodes according to the first preset algorithm if the verification is successful, and to obtain the second preset algorithm from a preset number of calculation methods based on the verification data.

[0041] The first execution module is used to obtain the nodes of other participants in the supply alliance chain, and the accounting nodes determined based on the pre-defined accounting calculation task that has been agreed upon.

[0042] The second calculation module is used to obtain the calculation results generated by other participating nodes according to the second preset algorithm based on at least some parameters in the current data record of the prior participating node;

[0043] The second execution module is used to obtain the consensus result of the other participating nodes on the calculation result, as determined by the accounting node according to the preset consensus method;

[0044] The third execution module is used to generate data to be uploaded to the chain based on the current data records of the prior participating party nodes, the business data of the data nodes to be uploaded to the chain, and the calculation results if the consensus result is that a consensus has been reached, and to upload and store the data to be uploaded to the chain.

[0045] Thirdly, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0046] Memory, used to store computer programs;

[0047] When a processor executes a program stored in memory, it implements the steps of the supply chain business data uplink method as described in the first aspect.

[0048] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the supply chain business data uplink method as described in the first aspect.

[0049] The supply chain business data uploading method provided by this invention obtains the nodes of other participating parties in the supply consortium blockchain before each business data upload. The node is determined based on a pre-defined, consensus-based accounting calculation task, ensuring the randomness of the accounting nodes and significantly increasing the difficulty of external attacks. This avoids human manipulation of accounting nodes and prevents unauthorized data storage on the blockchain, thus contributing to system security. By verifying the current data records of prior participating parties in the supply consortium blockchain where the data to be uploaded resides, the authenticity of the current data records of prior participating parties can be verified. After successful verification, verification data is generated based on the verified current data records of prior participating parties according to a first pre-defined algorithm. A second pre-defined algorithm is then obtained from a preset number of calculation methods based on the verification data. This achieves automatic execution of the second pre-defined algorithm selection via smart contracts. The second pre-defined algorithm is obtained by calculating the verification data obtained from the current data records, thus solving the problem that existing fixed hash algorithms are easily attacked and identified, and enhancing system security. By obtaining the calculation results generated by other participating nodes based on at least a portion of the business data in the current data records of the prior participating nodes according to the second preset algorithm, and obtaining the consensus results of other participating nodes on the calculation results, the business data can be verified, which can effectively prevent the business data itself from being tampered with and ensure the authenticity and trustworthiness of the data on the chain. Attached Figure Description

[0050] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0051] Figure 1 This is a flowchart illustrating the method for uploading business data to the blockchain in the supply chain provided by the present invention.

[0052] Figure 2 This is a flowchart illustrating the accounting node determination method of the present invention;

[0053] Figure 3 This is a schematic diagram of the structure of the supply chain business data uploading device provided by the present invention;

[0054] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0055] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0056] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0057] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0058] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0059] Existing blockchain-based supply chain management technologies, in an effort to reduce storage pressure, only upload data to the blockchain based on consensus. This data consists of the hash values ​​of product information and business data corresponding to a specific link in the supply chain. Furthermore, consensus is only reached on the hash values ​​of the business data, without cross-validation of the hash calculation process and results. The ledger nodes for data upload are easily controlled by certain entities in the supply chain, leading to undetected data tampering despite being uploaded, resulting in counterfeiting and making it difficult to trace the fraudulent activities. Therefore, this invention provides a method for uploading business data to the blockchain in the supply chain, such as... Figure 1 As shown, it includes:

[0060] S101. Verify the current data records of the prior participating party nodes in the supply alliance chain where the data node to be uploaded to the chain is located; the supply alliance chain is a consortium chain based on participating party nodes constructed according to the order of participating parties in the supply chain, and the order refers to the process sequence of each participating party in the supply chain.

[0061] The construction process of the supply chain alliance chain is as follows: the participants submit registration information on the blockchain service platform, and after the registration is approved, role permissions are assigned. The alliance chain based on the participants' nodes is constructed according to the order of the participants in the supply chain, and the participants' information is stored on the chain.

[0062] The participants include: upstream suppliers, core enterprises, downstream distributors, warehousing and logistics companies, financial institutions and other funders, government regulatory departments and credit reporting agencies, etc.

[0063] The information of the participants includes: registration information, identity information, role information, permission information, business information, signed agreement information, registered device hardware information, registered device software information, registered device database information, and registered device operating system information, etc.

[0064] The process of verifying the current data record of the prior participating nodes in the supply chain of the data node to be uploaded to the chain includes: determining the prior participating nodes of the data node to be uploaded to the chain, and obtaining the current data record of each participating node; according to the order of the participants in the supply chain, starting from the first prior participating node, verifying the current data record of the first prior participating node; if the current data record of the first prior participating node is verified, then verifying the current data record of the next prior participating node, until the current data record of the last prior participating node is successfully verified.

[0065] S102. If the verification is successful, according to the first preset algorithm, based on the current data records of the verified prior participating party nodes, verification data is generated, and based on the verification data, the second preset algorithm is obtained from a preset number of calculation methods.

[0066] S103. Obtain the accounting node determined by the preset accounting calculation task based on consensus in the supply alliance chain;

[0067] Other participating nodes elect and vote for the accounting node from the candidate accounting nodes based on the pre-defined accounting calculation task that has been agreed upon;

[0068] S104. Obtain the calculation results generated by other participating nodes based on at least a portion of the business data in the current data records of the prior participating nodes according to the second preset algorithm;

[0069] Once the data node to be added to the blockchain sends a data upload request, other participating nodes, upon receiving the request, verify the identity, role, and permissions of the data node to be added, grant it access to the supply chain consortium blockchain, and distribute a unique private key corresponding to its public key. The data node to be added uses its private key to encrypt and sign at least a portion of the business data containing verifiable parameters, and broadcasts the encrypted data. Other participating nodes receive the encrypted data containing at least a portion of the business data containing verifiable parameters, verify the signature, and decrypt it to obtain the decrypted data containing at least a portion of the business data containing verifiable parameters. Based on the decrypted data containing at least a portion of the business data containing verifiable parameters, the other participating nodes generate a calculation result according to a second preset algorithm.

[0070] When data nodes upload data used in the consensus phase, they can upload either partial business data containing verifiable parameters or all business data containing verifiable parameters. This example illustrates uploading partial business data containing verifiable parameters:

[0071] (1) The data node to be uploaded to the chain calculates a first verification data group based on the partial business data containing verifiable parameters according to the first calculation method. The number of the first verification data groups is at least 2. The partial business data containing verifiable parameters and the first calculation method are published on the supply chain consortium chain network. After consensus by other participating nodes in the supply chain consortium chain, the data is stored in the supply chain consortium chain. The verifiable verification parameters include: participant identity information, role information, signed agreement information, device hardware information, device software information, device database information, device operating system information, etc., business occurrence time, business occurrence location, business execution conditions, and business execution results, etc.

[0072] (2) Other participating nodes receive the first calculation method and verifiable parameters corresponding to some business data, obtain the second calculation method corresponding to the verifiable parameters based on the verifiable parameters, and calculate the corresponding second verification data group (i.e. the above calculation result) based on the some business data according to the second calculation method.

[0073] (3) Other participating nodes submit the second verification data set to the supply chain network.

[0074] (4) The consortium blockchain network reaches a consensus on the second verification data group submitted by other participating nodes. If the threshold condition for consensus is met, the second verification data group is used as the data to be uploaded to the blockchain by the data node to be uploaded.

[0075] (5) Other participating nodes submit the second verification data set to the consortium blockchain network. Depending on business needs, the number of times other participating nodes can submit the second verification data set to the supply consortium blockchain network can be limited, such as once, so that the data nodes waiting to be uploaded to the chain provide real business data.

[0076] This invention allows data nodes to send only a portion of business data containing verifiable parameters, thus avoiding data security issues caused by sending sensitive data and effectively protecting data privacy.

[0077] S105. Obtain the consensus result of the other participating nodes on the calculation result, as determined by the accounting node according to the preset consensus method;

[0078] Other participating nodes broadcast the calculation results on the supply chain network, and each other participating node votes on the calculation results. The ledger node records the voting results to determine the consensus result.

[0079] S106. If the consensus result is that a consensus has been reached, then data to be uploaded to the chain is generated based on the current data records of the prior participating nodes, the business data of the data nodes to be uploaded to the chain, and the calculation result, and the data to be uploaded to the chain is stored on the chain.

[0080] In this embodiment of the invention, the other participating nodes refer to the members of the supply consortium blockchain other than the data nodes to be uploaded to the chain.

[0081] The supply chain business data uploading method provided by this invention obtains candidate accounting nodes determined by a pre-defined accounting calculation task based on consensus in the supply alliance chain before each business data upload, and then elects the accounting node from the candidate accounting nodes by voting. This ensures the randomness of the accounting nodes, significantly increases the difficulty of external attacks, avoids human manipulation of accounting nodes, prevents illegal accounting nodes from uploading data to the chain, and helps maintain system security. By verifying the current data records of the prior participating nodes in the supply alliance chain where the data node to be uploaded is located, the authenticity of the current data records of the prior participating nodes can be verified. After verification, verification data is generated based on the verified current data records of the prior participating nodes according to a first preset algorithm, and a second preset algorithm is obtained from a preset number of calculation methods based on the verification data. This realizes the automatic execution of the selection of the second preset algorithm through smart contracts. The second preset algorithm is obtained by calculating the verification data obtained based on the current data records of the prior participating nodes, that is, the second preset algorithm is calculated based on the current data records. This solves the problem that existing fixed hash algorithms are easily attacked and identified, and enhances system security. Then, the calculation results generated by other participating nodes according to the second preset algorithm based on at least part of the business data of the current data record of the prior participating node are obtained, and the consensus results of the other participating nodes on the calculation results are obtained to realize the verification of business data. This can effectively prevent the business data itself from being tampered with and ensure the authenticity and trustworthiness of the data on the chain.

[0082] The method for putting business data on the blockchain in the supply chain provided by this invention can effectively prevent the data itself from being tampered with by using all on-chain and off-chain data before the supply chain link in which the supply chain participants are located, thus ensuring the authenticity and reliability of the data put on the blockchain. It also enables the rapid location and tracking of risk data. Furthermore, by building a supply alliance blockchain, it effectively manages the participants in the supply chain, thereby ensuring the authenticity and reliability of the supply chain data put on the blockchain and realizing the trustworthy management of the supply chain.

[0083] In one embodiment, step S102 above, which involves obtaining a second preset algorithm from a preset number of calculation methods based on the verification data, includes:

[0084] S201. Perform integer conversion and modulo operation on the verification data to obtain the modulo remainder;

[0085] S203. Based on the mapping relationship between the preset hash algorithm and the modulo remainder, obtain the calculation method corresponding to the modulo remainder from the calculation methods of the preset quantity, and use it as the second preset algorithm; wherein, the value of the modulus in the modulo operation is the preset quantity.

[0086] As a specific embodiment, for example, the currently acquired business data A3-1 is calculated using a preset first calculation method (i.e., the aforementioned first preset algorithm) to obtain the business data hash value hash A3-1C (i.e., the aforementioned verification data). The following explanation uses the example where both the first preset algorithm and the second preset algorithm are hash algorithms:

[0087] Assuming business data A3-1 is "Event Location: XX", the hash value (i.e., the verification data mentioned above) is calculated using the SHA256 hash algorithm (the first preset algorithm mentioned above). Then, an integer conversion is performed to obtain: [141 107 195 244 151 183 235 172 214 190 180 3 169 238 26 88 18 167 156 149 207 223 75 93 183 3 84 151 83 161 120 158];

[0089] The sum is converted to integer data 4567. Then, a modulo operation is performed (the modulus of the modulo operation is the number of preset hash algorithms, such as 5), i.e., 4567 mod 5. Based on the modulo remainder 2 and Table 1, the calculation method with the sequence number 3 is obtained. Therefore, the second preset algorithm selected based on business data A3-1 is the SHA256 hash algorithm.

[0090] Serial Number 1 2 3 4 5 Hash algorithm MD3 MD5 SHA256 SHA384 SHA512 Modulo remainder 0 1 2 3 4

[0091] Table 1

[0092] The process of determining the second preset algorithm described above is executed through a smart contract deployed on the supply chain consortium blockchain. The smart contract automatically executes the selection of the second preset algorithm and the calculation of the hash value of the business data uploaded to the blockchain, ensuring that the second preset algorithm can be traced through the blockchain network. Calculating the second preset algorithm based on business data solves the problem of existing fixed hash algorithms being easily attacked and identified, thus enhancing system security. This invention is not limited to consensus on the hash value of business data; rather, it selects the hash value calculation method (i.e., the second preset algorithm) based on the hash value of the business data (i.e., verification data), and records the selected second preset algorithm and the calculation result obtained by calculating the verification data using the second preset algorithm on the blockchain. Therefore, cross-validation of the calculation process and results of the business data can be achieved.

[0093] In one embodiment, the accounting node is obtained by means of:

[0094] S301. Based on the smart contracts pre-deployed on the supply chain alliance chain, determine the candidate nodes for accounting;

[0095] The smart contract is deployed on the supply chain consortium blockchain, and the participating nodes are elected to obtain the accounting candidate nodes based on the smart contract.

[0096] S302. Obtain the nodes that meet the first preset conditions from the candidate accounting nodes and use them as candidate accounting nodes;

[0097] Other participating nodes in the supply chain vote on the candidate accounting nodes to obtain n candidate accounting nodes that meet the first preset condition.

[0098] S303. Based on the pre-defined accounting calculation task with consensus, obtain the node that meets the second pre-defined condition from the candidate accounting nodes and use it as the accounting node.

[0099] Each candidate accounting node that meets the first preset condition performs the calculation of the preset accounting calculation task that has been agreed upon, and obtains the node that meets the second preset condition from among the candidate accounting nodes that meet the first preset condition, and uses it as the accounting node.

[0100] In one embodiment, step S303 above, which involves obtaining nodes from the candidate accounting nodes that meet the second preset condition based on a consensus-based preset accounting calculation task, as the accounting nodes, includes:

[0101] S3031a. Obtain the computing power of each candidate accounting node to perform calculations on the consensus-based preset accounting calculation task;

[0102] Each candidate ledger node that meets the first preset condition performs the calculation of the preset ledger calculation task that has been agreed upon, and records the computing power corresponding to each candidate ledger node that meets the first preset condition.

[0103] S3032a. Obtain the node whose computing power is located at a preset number of bits from the candidate accounting nodes, and use it as the accounting node;

[0104] Select candidate accounting nodes with computing power at the preset number of bits as accounting nodes.

[0105] The computing power is obtained through Formula 1:

[0106]

[0107] Wherein, t1 is the computation time for the candidate accounting node to upload and calculate the preset accounting calculation task, t2 is the computation time for the candidate accounting node to calculate the preset accounting calculation task for supplying the consortium blockchain network consensus, t3 is the computation time for the standard node to calculate the preset accounting calculation task, t4 is the computation time for the standard node to calculate the preset accounting calculation task for supplying the consortium blockchain network consensus, M is the preset number of bits, and the standard node refers to a node with preset computing capabilities.

[0108] The present invention can set the task difficulty of a preset accounting calculation task, obtain the calculation ability of each candidate accounting node for the preset accounting calculation task of the task difficulty, and determine the accounting node based on the calculation ability.

[0109] The ledger node determination method provided by this invention determines the computing power of candidate ledger nodes based on their own computing time and the computing time agreed upon by the supply chain consortium blockchain network. Determining the ledger node based on the computing power of the candidate nodes ensures the fairness and accuracy of the right to record transactions, significantly increases the difficulty of external attacks, avoids human manipulation of ledger nodes, prevents unauthorized data storage on the blockchain, and helps maintain system security. Furthermore, selecting ledger nodes according to their computing power effectively utilizes computing resources and ensures the timeliness of data upload. The process of determining ledger nodes involves a smart contract deployed on the supply chain consortium blockchain confirming the ledger node, avoiding human intervention in the selection of ledger nodes and further increasing the difficulty of data forgery.

[0110] In one embodiment, step S303 above, based on a pre-defined accounting calculation task with consensus, obtains nodes from the candidate accounting nodes that meet the second pre-defined condition, and uses these nodes as the accounting nodes. Figure 2 The following are included:

[0111] S3031b: Obtain the computing power of each candidate accounting node to perform calculations on the consensus-based preset accounting calculation task;

[0112] S3032b: Obtain the hash result of the hash operation performed on the calculation result by each of the candidate accounting nodes;

[0113] Each candidate accounting node performs a hash operation on the calculation result to obtain the hash result HASHi;

[0114] S3033b: Generate random numbers for each of the candidate accounting nodes based on the hash result and the computing power;

[0115] A random number Ri is generated based on the hash result HASHi and the computing power Pi of the candidate accounting nodes;

[0116] S3034b: Calculate the average value of the random numbers of each candidate accounting node, and obtain the candidate accounting node corresponding to the random number closest to the average value;

[0117] Other participating nodes each calculate the average value R of all random numbers:

[0118]

[0119] Where R is the average of all random numbers, Ri is the random number generated by a candidate ledger node with computing power Pi, and n is the number of candidate ledger nodes.

[0120] S3035b: Obtain the consensus result of other participating nodes on the candidate accounting node corresponding to the random number closest to the average value. If the consensus result is that a consensus has been reached, then the candidate accounting node is used as the accounting node.

[0121] Other participating nodes reach a consensus by selecting the candidate ledger node Ri that is closest to the average value R. If the consensus is passed, the candidate ledger node Ri that is closest to R becomes the ledger node. The consensus is passed when the proportion of the number of candidate ledger nodes Ri that is closest to the average value R to the number of nodes from other participating nodes is greater than or equal to a preset threshold. This preset threshold can be set according to actual needs, such as 75%.

[0122] This invention determines the accounting node by generating random numbers based on business data and the computing power of candidate accounting nodes. Compared with the random number generation method based solely on timestamps, it is more closely bound to the self-attributes and business attributes of candidate accounting nodes, thereby enhancing the system's data security and data traceability.

[0123] In one embodiment, step S101 above, which involves verifying the current data records of prior participating nodes in the supply consortium blockchain where the data node to be uploaded to the blockchain resides, includes:

[0124] S1011. Obtain the current data record of the prior participating party node in the supply consortium blockchain where the data node to be uploaded to the blockchain is located, as well as the consortium blockchain upload record; wherein, the consortium blockchain upload record is generated based on the prior data record according to a third preset algorithm;

[0125] S1012. Based on the acquired current data record, generate the current data calculation result according to the third preset algorithm.

[0126] S1013. If the current data calculation result is consistent with the on-chain record of the consortium blockchain, execute the steps described in S102 above: according to the first preset algorithm, based on the current data record of the verified prior participating node, generate verification data, and based on the verification data, obtain the second preset algorithm from a preset number of calculation methods.

[0127] As a specific example, assuming the supply chain includes nodes A1-An, when data is uploaded to the blockchain at node A3, the data uploading process is as follows:

[0128] A3 obtains the current data record A1-1 of A1, and the on-chain record Hash-A11 of the consortium blockchain corresponding to data record A1-1; based on the unique identifier of data record A1-1, it obtains Hash-A11 from the supply consortium blockchain based on the unique identifier, wherein Hash-A11 is obtained based on the prior data record according to the first hash algorithm;

[0129] A3 calculates and generates Hash-A12 based on the current data record A1-1 obtained from A1, according to the first hash algorithm;

[0130] Compare Hash-A11 and Hash-A12. If they match, proceed to the next step; if they do not match, send an error message to A1.

[0131] A3 obtains the current data record A2-1 of A2, and the supply alliance chain on-chain record Hash-A21 corresponding to data record A2-1; Hash-A21 is obtained based on the prior data record A2-1 according to the second hash algorithm;

[0132] A3 calculates and generates Hash-A22 based on the data record A2-1 obtained from A2, according to the second hash algorithm.

[0133] Compare Hash-A21 and Hash-A22. If they match, proceed to the next step; if they do not match, send an error message to A2.

[0134] Based on the operation information in this step, A3 obtains data record A3-1 and, according to the selected hash value calculation method (i.e., the second preset algorithm mentioned above), calculates and generates Hash-A31 together with data records A1-1 and A2-1. For example, in chronological order, data records A1-1, A2-1, and A3-1 are concatenated and hashed to obtain Hash-A31. The hash value calculation method can be selected in the same way as the second preset algorithm mentioned above. At this time, the business data is A3-1, and the data to be uploaded to the blockchain is Hash-A31.

[0135] Specifically, the steps for uploading data to the blockchain are as follows:

[0136] Node A3 encrypts, signs, and broadcasts the business data A3-1 corresponding to the supply chain management process;

[0137] Other participating nodes receive encrypted data record A1-1 provided by A1, encrypted data record A2-1 provided by A2, and encrypted business data A3-1 provided by A3. After verification and decryption, they calculate the business data according to the second preset algorithm to obtain the calculation result, and the calculation result awaits consensus.

[0138] In existing data on-chain processes, participants only need to submit their data according to their credit commitments. However, since the data submitted by participants may be falsified—that is, participants submit fake data to the supply chain consensus chain—it is necessary to verify the authenticity and validity of the submitted data. This verification is often done manually. However, in big data scenarios, manually verifying all data is too cumbersome. This leads to situations where, in certain links of the supply chain, such as multiple downstream links, the amount of data requiring verification is enormous, and therefore, data submitted by some upstream participants is not actually verified. Therefore, in one embodiment, before obtaining the calculation results generated by other participating nodes according to the second preset algorithm based on at least some parameters in the current data records of the prior participating nodes in step S104, the following step is also included:

[0139] S401. Obtain the verification results of other participating nodes verifying the current data records of the prior participating nodes and the business data of the data nodes to be uploaded to the chain according to a preset verification algorithm; wherein, the preset verification algorithm is determined based on the business data requirements or business data verification standards of the other participating nodes.

[0140] Other participating nodes receive encrypted data record A1-1 provided by A1, encrypted data record A2-1 provided by A2, and encrypted business data A3-1 provided by A3. After verification and decryption, they obtain decrypted business data. Based on this decrypted business data, and according to their own business data requirements or verification standards, they customize verification parameters for the decrypted business data, i.e., a preset verification algorithm, and verify the decrypted business data using this preset verification algorithm. The verification parameters may include the legal enterprise name, enterprise registration time, administrative penalty records, and whether the enterprise's real estate information is consistent with the legal ownership on the website of the State Housing Administration Bureau, etc.

[0141] S402. If the verification result is that the verification is passed, execute the step of obtaining the calculation result generated by other participating nodes based on at least some parameters in the current data record of the prior participating node according to the second preset algorithm.

[0142] The verification parameters are known only to the other participating nodes performing the verification and are not shared with other participants on the supply chain. Verification information is only disclosed when traceability of the verification results is required. The participating nodes performing the verification only verify all parameters of the business data when necessary. This invention verifies data submitted by nodes to be uploaded to the chain using non-public, custom verification parameters from other participating nodes. Due to the self-defined and non-public nature of the verification parameters, it effectively ensures that nodes to be uploaded to the chain submit genuine data for verification, supporting the achievement of network-wide consensus on the verification results. This improves the feasibility and reliability of data authenticity verification and effectively prevents data submitters from submitting fraudulent data. To support traceability of verification results, the verification parameters and their corresponding input and output information must be stored on the chain.

[0143] Example 2:

[0144] The supply chain consortium consists of n nodes, as shown in Table 2 below:

[0145] A1 A2 A3 A4 … An Manufacturer Warehousing logistics Distribution Distribution retail

[0146] Table 2

[0147] When data is uploaded to the blockchain at logistics node A3, the data upload process is as follows:

[0148] (1) Logistics node A3 obtains data record A2-1 and corresponding verifiable parameters of warehouse node A2, as well as multiple first calculation methods submitted and agreed upon by warehouse node A2 on the supply alliance chain corresponding to data record A2-1; for example, the verifiable parameters of warehouse node A2 include participant name (A2), participant role (warehouse) and business occurrence time.

[0149] The first calculation method is as follows: A preset number of valid data points are taken from data record A2-1. For each valid data point, a hash value is obtained through hash calculation. The hash values ​​of all valid data points are then concatenated to obtain a first array. The preset number is obtained by performing a modulo operation on the current time in nanoseconds. The modulus of the modulo operation is the number of verifiable parameters. Specifically, the modulo remainder is obtained by performing a modulo operation on the current time in nanoseconds, and this remainder is used as the preset number.

[0150] (2) Other participating nodes obtain a second calculation method based on the calculation results of the data corresponding to the verifiable parameters. Specifically, the data corresponding to each verifiable parameter (e.g., the data corresponding to the verifiable parameter - participant name is A2) is hashed to obtain a hash value. The hash values ​​corresponding to each verifiable parameter are combined in order to obtain a value A. The value A is converted to an integer and moduloed to obtain a modulo remainder, where the modulus of the modulo operation is the total number of the first calculation methods.

[0151] As a specific example, q bits of valid data are extracted from data record A2-1. The extracted q bits of valid data are shown in Table 3:

[0152] Valid data 1 Valid data 2 … Valid data q-1 Valid data q

[0153] Table 3

[0154] Each valid data point is hashed to obtain a corresponding hash value, as shown in Table 4. The hash values ​​obtained are the first string segment, the second string segment, ..., the (q-1)th string segment, and the qth string segment. The first to qth strings are concatenated in order to obtain a first array. The first array is converted to an integer and moduloed to obtain the modulo remainder, where the modulus of the modulo operation is the number of the first calculation methods.

[0155] Valid data 1 Valid data 2 … Valid data q-1 Valid data q The first string Second string … The (q-1)th segment of the string The qth segment of the string

[0156] Table 4

[0157] (3) Based on the pre-constructed mapping relationship between the modulo remainder and the first calculation method, determine the corresponding first calculation method based on the modulo remainder obtained by converting the logarithm A to an integer and performing the modulo operation, and use the first calculation method as the second calculation method.

[0158] (4) Other participating nodes perform calculations on data record A2-1 based on the second calculation method to obtain the second array. The second calculation method can be configured according to actual needs. For example, it can be: taking the 1st, 3rd, 7th, 11th, 39th, and 268th valid data from data record A2-1 (or through a parameter definition method, such as obtaining the data retrieval condition based on the arrangement of the corresponding parameter values), performing hash calculations on these valid data to obtain the corresponding hash values, and concatenating the hash values ​​corresponding to each valid data to obtain the second array.

[0159] (5) The supply chain network reaches a consensus on the second array submitted by other participating nodes. If the consensus threshold is met, the second verification data group A2-YI is used as the verification data group for the current stage (logistics node A3), corresponding to the aforementioned data record A2-1. The threshold can be set according to actual needs, such as 67%, 80%, or 100%.

[0160] The relationship between nodes and on-chain data is shown in Table 5:

[0161]

[0162] Table 5

[0163] Hash-A21 Y represents the hash value calculated by logistics node A3 using a hash function on data record A1-1, data record A2-1, and verification data group A2-Y1.

[0164] The on-chain data for logistics node A3 is as follows:

[0165] The verification data group A1-Y1 corresponding to the data record A1-1 of producer node A1;

[0166] Based on the operation information of this step, warehouse node A2 obtains data record A2-1. According to the preset hash calculation method, it calculates and generates hash value Hash-A21Y together with data record A1-1, data record A2-1, and verification data group A1-Y1. At this time, the business data is A2-1, and the data to be uploaded to the chain is Hash-A21Y, which includes the business data of A1, the verification data of A1, and the business data of A2.

[0167] The verification data group A2-Y1 corresponding to the data record A2-1 of warehouse node A2;

[0168] Logistics node A3 obtains data record A3-1 based on the operation information of this step. According to the preset hash calculation method, it calculates and generates Hash-A31Y based on data record A3-1, data record A2-1, and verification data group A2-Y1. At this time, the business data is A3-1, and the data to be uploaded to the chain is Hash-A31Y. Hash-A31Y can also be generated based on data record A3-1, data record A2-1, verification data group A2-Y1, and data record A1-1.

[0169] It should be noted that the above verification data group A1-Y1 is generated by logistics node A3 based on data record A1-1 of manufacturer node A1. Its calculation method is similar to that of the above verification data group A2-Y1, and will not be repeated here.

[0170] This invention further enhances the tamper-proof nature of data by sending the full amount of business data, and other participating nodes obtain a second calculation method for verification based on the verifiable parameters of the business data, thus preventing counterfeiting. Furthermore, if it is necessary to trace the counterfeit node, the supply chain link where the data has been tampered with can be directly located based on the data records stored on the supply alliance chain.

[0171] Based on the same inventive concept, this invention provides a device for uploading business data to the blockchain in a supply chain, such as... Figure 3 As shown, it includes:

[0172] The verification module 501 is used to verify the current data records of the prior participating party nodes in the supply alliance chain where the data node to be uploaded to the chain is located; the supply alliance chain is a consortium chain based on participating party nodes constructed according to the order of the participating parties in the supply chain.

[0173] The first calculation module 502 is used to generate verification data based on the current data records of the verified prior participating party nodes according to the first preset algorithm if the verification is successful, and to obtain the second preset algorithm from a preset number of calculation methods based on the verification data.

[0174] The first execution module 503 is used to obtain the other participating nodes in the supply alliance chain, and the accounting nodes determined based on the pre-defined accounting calculation task that has been agreed upon.

[0175] The second calculation module 504 is used to obtain the calculation results generated by other participating nodes according to the second preset algorithm based on at least some parameters in the current data record of the prior participating node;

[0176] The second execution module 505 is used to obtain the consensus result of the other participating nodes on the calculation result as determined by the accounting node according to the preset consensus method;

[0177] The third execution module 506 is used to generate data to be uploaded to the chain based on the current data records of the prior participating party nodes, the business data of the data nodes to be uploaded to the chain, and the calculation results if the consensus result is that a consensus has been reached, and to upload and store the data to be uploaded to the chain.

[0178] The specific implementation of the supply chain business data uploading device provided in this embodiment of the invention can be referred to the detailed description of the supply chain business data uploading method in the above embodiments. Where the description is repeated, it will not be repeated.

[0179] This invention also provides an electronic device, such as... Figure 4 As shown, it includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0180] Memory 113 is used to store computer programs;

[0181] When the processor 111 executes the program stored in the memory 113, it implements the steps of the supply chain business data uplink method provided in any of the foregoing method embodiments.

[0182] The electronic device provided in this embodiment of the invention has a similar implementation principle and technical effect to the above embodiments, and will not be described again here.

[0183] The aforementioned memory 113 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Memory 113 has storage space for program code used to perform any of the method steps described above. For example, the storage space for program code may include individual program codes for implementing the various steps in the methods described above. This program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, optical discs (CDs), memory cards, or floppy disks. Such computer program products are typically portable or fixed storage units. The storage unit may have storage segments or storage spaces arranged similarly to the memory 113 in the aforementioned electronic device. The program code may, for example, be compressed in a suitable form. Typically, the storage unit includes programs for performing the method steps according to embodiments of the invention, i.e., code that can be read by a processor, which, when run by the electronic device, causes the electronic device to perform the various steps in the methods described above.

[0184] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the supply chain business data uplink method described in any of the foregoing method embodiments.

[0185] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to any embodiment of the present invention.

[0186] According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0187] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "upper," "lower," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention.

[0188] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other. This invention is not limited to any single aspect, nor to any single embodiment, nor to any combination and / or substitution of these aspects and / or embodiments. Each aspect and / or embodiment of this invention can be used alone, or in combination with one or more other aspects and / or other embodiments.

[0189] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for business data chaining in a supply chain, characterized by, include: Verify the current data records of the prior participating nodes in the supply alliance chain where the data node to be uploaded to the chain is located; the supply alliance chain is a consortium chain based on participating nodes constructed according to the order of the participants in the supply chain; If the verification passes, according to the first preset algorithm, verification data is generated based on the current data records of the verified prior participating party nodes, and the second preset algorithm is obtained from a preset number of calculation methods based on the verification data. Obtain the nodes of other participants in the supply chain alliance, and determine the accounting nodes based on the pre-defined accounting calculation task with consensus; the accounting nodes are determined in the following way: Based on smart contracts pre-deployed on the supply chain consortium blockchain, candidate nodes for accounting are determined; The nodes that meet the first preset condition among the candidate accounting nodes are selected by voting from the other participating nodes in the supply chain and then used as candidate accounting nodes. Based on the pre-defined accounting calculation task that has been agreed upon, the nodes that meet the second pre-defined conditions among the candidate accounting nodes are obtained and used as the accounting nodes. The node that satisfies the second preset condition is determined by any of the following methods: Method 1: Obtain the computing power of each candidate accounting node to perform the pre-defined accounting calculation task that has been agreed upon; The node with computing power in a preset number of bits among the candidate accounting nodes is selected as the accounting node. Method 2: Obtain the computing power of each candidate accounting node to perform the pre-defined accounting calculation task that has been agreed upon; Obtain the hash result of the hash operation performed on the calculation result by each of the candidate accounting nodes; Random numbers are generated for each of the candidate accounting nodes based on the hash result and the computing power. Calculate the average of the random numbers of each candidate accounting node, and obtain the candidate accounting node corresponding to the random number closest to the average. Obtain the consensus results of other participating nodes on the candidate accounting node corresponding to the random number closest to the average value. If the consensus result is that a consensus has been reached, then the candidate accounting node is used as the accounting node. Obtain the calculation results generated by other participating nodes based on at least some parameters in the current data records of the prior participating nodes according to the second preset algorithm; Obtain the consensus result of the other participating nodes on the calculation result, as determined by the accounting node according to a preset consensus method; If the consensus result is that a consensus has been reached, then data to be uploaded to the blockchain is generated based on the current data records of the prior participating nodes, the business data of the data nodes to be uploaded to the blockchain, and the calculation result, and the data to be uploaded to the blockchain is stored on the blockchain.

2. The method for business data uplinking in a supply chain according to claim 1, wherein, The step of obtaining a second preset algorithm from a preset number of calculation methods based on the verification data includes: Perform integer conversion and modulo operation on the verification data to obtain the modulo remainder; Based on the mapping relationship between the preset hash algorithm and the modulo remainder, the calculation method corresponding to the modulo remainder is obtained from the calculation methods of the preset quantity, and used as the second preset algorithm; wherein, the value of the modulus in the modulo operation is the preset quantity.

3. The method for business data uplinking in a supply chain according to claim 2, wherein, Acquiring the computing power of each candidate accounting node to perform calculations on the consensus-based preset accounting calculation task includes: Based on Formula 1, the computing power of each candidate accounting node for performing the agreed-upon preset accounting calculation task is determined: , Equation 1 ; wherein, a computing time of the preset accounting calculation task for a candidate accounting node uploaded, a computing time of the preset accounting calculation task for a candidate accounting node providing a consensus of the supply alliance chain network, a computing time of the preset accounting calculation task for a standard node, a computing time of the preset accounting calculation task for a standard node providing a consensus of the supply alliance chain network, is a preset bit number.

4. The method for business data chaining in a supply chain according to any one of claims 1-3, characterized in that, The verification of the current data records of prior participating nodes in the supply consortium blockchain where the data node to be uploaded to the blockchain is located includes: Obtain the current data records of the prior participating nodes in the supply consortium blockchain where the data node to be uploaded to the blockchain is located, as well as the blockchain upload records; wherein, the blockchain upload records are generated based on the prior data records according to the third preset algorithm. According to the third preset algorithm, the current data calculation result is generated based on the acquired current data record; If the current data calculation result is consistent with the on-chain record of the consortium blockchain, the following steps are executed: according to the first preset algorithm, based on the current data record of the verified prior participating node, generating verification data, and obtaining the second preset algorithm from a preset number of calculation methods based on the verification data.

5. The method for business data uplinking in a supply chain according to claim 1, wherein, Before obtaining the calculation results generated by other participating nodes based on at least some parameters in the current data records of the prior participating nodes according to the second preset algorithm, the method further includes: Obtain the verification results of other participating nodes, which verify the current data records of the prior participating nodes and the business data of the data nodes to be uploaded to the chain, according to a preset verification algorithm; wherein, the preset verification algorithm is determined based on the business data requirements or business data verification standards of the other participating nodes; If the verification result is successful, the step of obtaining the calculation results generated by other participating nodes based on at least some parameters in the current data record of the prior participating node according to the second preset algorithm is executed.

6. A device for uploading business data to the blockchain in a supply chain, characterized in that, include: The verification module is used to verify the current data records of the prior participating party nodes in the supply alliance chain where the data node to be uploaded to the chain is located; the supply alliance chain is a consortium chain based on participating party nodes constructed according to the order of the participating parties in the supply chain. The first calculation module is used to generate verification data based on the current data records of the verified prior participating party nodes according to the first preset algorithm if the verification is successful, and to obtain the second preset algorithm from a preset number of calculation methods based on the verification data. The first execution module is used to obtain the nodes of other participants in the supply alliance chain, and the accounting nodes determined based on the pre-defined accounting calculation task that has been agreed upon. The accounting node determination module is used to determine accounting candidate nodes based on smart contracts pre-deployed on the supply chain consortium chain, obtain nodes that meet the first preset condition from the accounting candidate nodes through voting by other participating nodes in the supply chain consortium chain, and obtain nodes that meet the second preset condition from the accounting candidate nodes based on the pre-defined accounting calculation task that has been agreed upon, and obtain the accounting node. The first node confirmation module is used to obtain the computing power of each candidate accounting node to perform the calculation of the consensus-based preset accounting calculation task, and to obtain the node whose computing power is located at a preset number of bits among the candidate accounting nodes as the accounting node. The second node confirmation module is used to obtain the computing power of each candidate accounting node to perform calculations on the pre-defined accounting calculation task that has been agreed upon, obtain the hash result of each candidate accounting node performing a hash operation on the calculation result, generate random numbers for each candidate accounting node based on the hash result and the computing power, calculate the average value of the random numbers of each candidate accounting node, obtain the candidate accounting node corresponding to the random number closest to the average value, obtain the consensus result of other participating nodes on the candidate accounting node corresponding to the random number closest to the average value, and if the consensus result is that a consensus has been reached, then the candidate accounting node is used as the accounting node. The second calculation module is used to obtain the calculation results generated by other participating nodes according to the second preset algorithm based on at least some parameters in the current data record of the prior participating node; The second execution module is used to obtain the consensus result of the other participating nodes on the calculation result, as determined by the accounting node according to the preset consensus method; The third execution module is used to generate data to be uploaded to the chain based on the current data records of the prior participating party nodes, the business data of the data nodes to be uploaded to the chain, and the calculation results if the consensus result is that a consensus has been reached, and to upload and store the data to be uploaded to the chain.

7. An electronic device, comprising: It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the supply chain business data uplink method as described in any one of claims 1-5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the supply chain business data uploading method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Tracing method and system based on blockchain and Internet of Things identifier

    CN108364181A

  • Steel supply chain information secret sharing method and system based on block chain

    CN112380179A