Supply chain financial data sharing method based on block chain and homomorphic encryption
Through blockchain and homomorphic encryption technology, the problem of insufficient data security in the financing process of small and micro suppliers is solved, the immutability and security of the financing process is realized, financial risks are reduced, and the fund operation of suppliers is met need.
Patent Information
- Application Number
- CN202411062872.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-13
Smart Images

Figure CN119130628A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a supply chain finance data sharing method based on blockchain and homomorphic encryption, which is used in the field of supply chain finance technology. Background Art
[0002] In the manufacturing process of some large-scale equipment, due to the complexity of product manufacturing processes and changes in the market environment, the core enterprise's manufacturing has a long delivery cycle from raw material procurement to processing and production, which makes it difficult for small and micro suppliers to operate normally. Due to the high risk control entry threshold and the need for core enterprise guarantees, traditional offline financing channels have difficulty in obtaining financing through traditional channels and cannot meet the normal capital operation needs of enterprises. Therefore, in order to improve the efficiency of supplier financing, there are some supply chain financing systems on the market, but there are some data security issues: 1. The data of the supply chain platform itself is difficult to prove the real transaction data, and there is a possibility of data tampering; 2. The operating data of core enterprises and supplier transactions is shared with the loan bank system through interfaces, chains or other integrated methods, and there is a possibility of data leakage. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a supply chain financial data sharing method based on blockchain and homomorphic encryption. Through smart contracts based on blockchain technology, distributed identity DID services, and smart contract scheduling robots, the immutability and non-repudiation of the entire supplier financing cycle are realized, reducing financial risks and strengthening the monitoring of the financing process. Through homomorphic encryption, the security of core enterprise and supplier operation data sharing is improved, achieving the purpose of data availability but invisible.
[0004] A technical solution to achieve the above purpose is: a supply chain financial data sharing method based on blockchain and homomorphic encryption, comprising the following steps:
[0005] Step 1, including the buyer's core enterprise access;
[0006] Step 2: Supplier order winning and financing credit approval;
[0007] Step 3: Signing supplier contract and disbursing credit;
[0008] Step 4: The buyer’s core enterprise repays the loan.
[0009] Further, step 1, the buyer's core enterprise access, specifically includes the following steps:
[0010] S10, the supply chain platform receives the buyer's access application, based on DID registration: the bank applies for access through the supply chain platform operation end, and the system automatically registers the access bank on the blockchain trusted platform based on the blockchain distributed identity DID service, generates a distributed digital identity DID, and writes the user's DID identifier, public key Pk, creation time, organization, and user role information; the buyer's core enterprise submits a financing access application through the supply chain platform, and the system automatically generates the buyer's core enterprise DID;
[0011] S11, the supply chain platform uploads revenue information to the chain through homomorphic encryption: Based on the ecc-elgamal multiplication homomorphic encryption algorithm, the supply chain platform generates a key pair of public key Pk1 for encryption and private key Sk1 for decryption for the core enterprise of the buyer. This key pair uniquely corresponds to the enterprise; the supply chain platform stores and uploads revenue information through the DID of the core enterprise of the buyer. The index is the buyer's enterprise number, and the value is the buyer's enterprise number and revenue information
[0012] S12, the smart contract performs multiplication of the buyer's credit limit: the blockchain trusted platform writes the buyer's credit limit smart contract C1, and the smart contract C1 sets the upper limit of the single household and the future growth coefficient to calculate the credit limit of the buyer's core enterprise;
[0013] S13, the bank system approves the buyer's credit limit, notifies the buyer of the access result and uploads it to the chain: the bank system accesses the smart contract C1 to obtain the buyer's total credit limit based on the level and market competitiveness of the core enterprise by passing in the ciphertext parameter value, without knowing the specific operating data of the core enterprise; the bank system stores the approval result on the chain through the bank DID, with the index being the buyer's enterprise number and the value being the buyer's enterprise number, credit limit, credit bank number, and approval time.
[0014] Further, step 2, supplier order winning and financing credit, specifically includes the following steps:
[0015] S20, the supply chain platform receives the supplier's credit application, based on DID registration: the supplier selects the winning notice through the supply chain platform to submit the credit application. The system automatically registers the supplier on the blockchain trusted platform based on the blockchain distributed identity DID service, generates a distributed digital identity DID, and writes the user's DID identifier, public key, creation time, organization, and user role information; the blockchain trusted platform writes the financing business status contract M1, the financing business status contract M1 index is the winning notice number, the value is the winning notice number, the supplier enterprise number, the buyer's core enterprise number, the financing business status, and the credit validity period, and records the current business status as the credit application status;
[0016] S21, the supply chain platform homomorphically encrypts the winning order amount data and uploads it to the chain: Based on the ecc-elgamal multiplication homomorphic encryption algorithm, the supply chain platform generates a key pair of a public key Pk2 for encryption and a private key Sk2 for decryption for the supplier. This key pair is unique to the enterprise; the supply chain platform stores the winning bid information on the chain through the supplier's DID, with the index being the winning bid notice number, and the value being the winning bid notice number, the winning order amount, and the winning bid time;
[0017] S22, the smart contract performs multiplication to calculate the credit limit: the blockchain trusted platform writes the credit limit smart contract C2, and the credit limit smart contract C2 sets the credit limit coefficient to calculate the supplier's credit limit;
[0018] S23, the bank system approves the credit line, notifies the supplier of the credit result and uploads it to the chain: Based on the order information, the bank system accesses the credit line smart contract C2 by passing in the ciphertext parameter value through the bank DID to obtain the credit line value, and accesses the financing business status contract M1 to update the current business status to the credit approval result status, as well as the credit validity period.
[0019] Further, step 3, signing of supplier contract and credit loan, specifically includes the following steps;
[0020] S30, the supply chain platform receives the supplier's credit application, updates the status and uploads it to the chain: the supply chain platform accesses the smart financing business status contract M1 through the supplier's DID, and updates the current business status to the credit application status;
[0021] S31, the supply chain platform uploads the contract order amount data to the chain through homomorphic encryption: based on the homomorphic encryption algorithm, a key pair of public key Pk3 for encryption and private key Sk3 for decryption is generated, and the key pair is uniquely corresponding to the enterprise; the order information is stored on the chain through the supplier DID, with the index being the contract number, and the value being the contract number, contract order amount, and contract signing time;
[0022] S32, the smart contract performs multiplication operation on the credit limit: the blockchain trusted platform writes the credit limit smart contract C3, which first determines whether the current credit time is within the effective period of the winning bid credit, and then calculates the supplier's credit limit;
[0023] S33, the bank system approves the loan amount, notifies the supplier of the loan result and uploads it to the chain: Based on the order information, the bank system accesses the credit limit smart contract C3 by passing in the ciphertext parameter value through the bank DID to obtain the credit limit value, notifies the supplier of the loan amount, and stores the approval result on the chain. The index is the loan contract number, and the value is the loan contract number, loan amount, loan date, loan interest rate and winning notice number.
[0024] Further, step 4, the buyer's core enterprise repays the loan, which specifically includes the following steps:
[0025] S40, the bank system receives the buyer's repayment plan and uploads it to the chain: The bank system receives the buyer's core enterprise repayment plan, and stores and uploads the buyer's repayment plan to the chain through the buyer's core enterprise DID. The index is the repayment plan number, and the value is the repayment plan number, repayment start date, repayment deadline, monthly repayment date, monthly repayment amount, repayment loan contract number, and winning notice number;
[0026] S41, the smart contract automatically triggers deduction according to the repayment plan: the blockchain trusted platform writes the deduction smart contract M2, and the deduction smart contract M2 automatically writes the deduction mark log on the repayment day according to the repayment plan of the buyer's core enterprise through the smart contract scheduling robot. The bank system monitors the execution event of the deduction smart contract M2 and automatically triggers the bank system deduction interface to run;
[0027] S42, the bank receives the deduction result notification, updates the status and uploads it to the chain: if the deduction is successful, the bank system accesses the financing business status contract M1 through the bank DID to record the current business status as normal repayment status; if the deduction fails and no deduction is made after the due date, it is updated to overdue status; the bank system evaluates the supplier's financing credit according to the repayment situation and adjusts the approval result parameters of the supplier's subsequent loans
[0028] The supply chain finance data sharing method based on blockchain and homomorphic encryption of the present invention has the following advantages:
[0029] The execution conditions of traditional smart contract event triggering must be a transaction on the chain and the state changes. The smart contract scheduling robot of the present invention does not need external scheduling triggers, and can more effectively ensure the scheduled execution of smart contracts. The smart contract scheduling robot of the present invention is based on the blockchain time clock server, by setting the timenode node identification and scheduling strategy, the task scheduling strategy includes random, polling, and consistent hashing, continuously monitoring new blocks, scanning the scheduled tasks registered in the contract, and maintaining the task processing queue. According to the scheduling strategy, the task is submitted to the task processing queue, the task processing queue information is stored in the node where the current block is located, and the task information, transaction information, etc. are packaged into the synchronization block, and the task processing queue information is synchronized to each timenode node through the blockchain consensus mechanism.
[0030] The generation of key pairs in the present invention can be managed by the key management KMS service. KMS is used to manage the generation, destruction and recovery of key pairs. Through smart contracts based on blockchain technology, distributed identity DID services, and smart contract scheduling robots, the supplier financing process is immutable and non-repudiable throughout the entire cycle, reducing financial risks and strengthening the monitoring of the financing process. Through homomorphic encryption, the security of core enterprise and supplier operation data sharing is improved, achieving the purpose of data availability but invisible. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of a supply chain finance data sharing method based on blockchain and homomorphic encryption of the present invention;
[0032] Figure 2 It is a schematic diagram of the process of step 1 of the present invention;
[0033] Figure 3 It is a schematic diagram of the process of step 2 of the present invention;
[0034] Figure 4 It is a schematic diagram of the process of step 3 of the present invention;
[0035] Figure 5 Schematic diagram of the process of step 4 of the present invention. DETAILED DESCRIPTION
[0036] In order to better understand the technical solution of the present invention, the following is a detailed description through specific embodiments:
[0037] See also Figure 1 , the present invention provides a data security sharing method in the field of supply chain finance based on blockchain and homomorphic encryption.
[0038] Figure 1 The whole process of supplier financing on the supply chain platform from before lending, during lending to after lending is described, including the following steps:
[0039] Step 1, including the buyer's core enterprise access;
[0040] Step 2: Supplier order winning and financing credit approval;
[0041] Step 3: Signing supplier contract and disbursing credit;
[0042] Step 4: The buyer’s core enterprise repays the loan.
[0043] Figure 2 Step 1 is described, and the implementation of the buyer's core enterprise access is based on blockchain and homomorphic encryption technology to calculate the total credit limit of the buyer's core enterprise, that is, the total credit limit of the supplier of the related transaction. The method includes the following steps:
[0044] S10, the supply chain platform receives the buyer's access application, based on DID registration: the bank applies for access through the supply chain platform operation end, and the system automatically registers the access bank on the blockchain trusted platform based on the blockchain distributed identity DID service, generates a distributed digital identity DID, and writes the user's DID identifier, public key Pk, creation time, organization, and user role related information. The buyer's core enterprise submits a financing access application through the supply chain platform, and the system automatically generates the buyer's core enterprise DID.
[0045] S11, the supply chain platform uploads revenue, turnover rate and other data to the chain through homomorphic encryption: Based on the ecc-elgamal multiplication homomorphic encryption algorithm, the supply chain platform generates a key pair of public key Pk1 for encryption and private key Sk1 for decryption for the core enterprise of the buyer, and one key pair is generated for each enterprise. The result of public key encryption Enc(Pk1, the main operating income of the core enterprise of the buyer in the previous year) is R, and the result of Enc(Pk1, the accounts payable turnover rate of the core enterprise of the buyer) is V. The supply chain platform stores and uploads revenue information through the DID of the core enterprise of the buyer. The index is the buyer enterprise number, and the value is {buyer enterprise number, year, R, V}.
[0046] S12, the smart contract performs multiplication operation on the buyer's credit limit: the blockchain trusted platform writes the buyer's credit limit smart contract C1, C1 sets Enc(Pk1, single-household upper limit) as U, Enc(Pk1, future growth coefficient) as F, and calculates the credit limit of the buyer's core enterprise based on the buyer's credit limit E=Dec(Sk1, minimum value min{R*V*F, U}).
[0047] S13, the bank system approves the buyer's credit limit, notifies the buyer of the access result and uploads it to the chain: the bank system accesses the S12 smart contract C1 to obtain the buyer's total credit limit by passing in the ciphertext U and ciphertext F parameter values according to the level and market competitiveness of the core enterprise, without knowing the specific operating data of the core enterprise. The bank system stores the approval result on the chain through the bank DID, with the index being the buyer's enterprise number and the value being {buyer's enterprise number, credit limit, credit bank number, approval time}.
[0048] Figure 3 The implementation of supplier order winning and financing credit is described based on blockchain and homomorphic encryption technology to calculate the supplier's credit limit. The method includes the following steps:
[0049] S20, the supply chain platform receives the supplier's credit application, based on DID registration: the supplier selects the winning notice through the supply chain platform to submit the credit application. The system automatically registers the supplier on the blockchain trusted platform based on the blockchain distributed identity DID service, generates a distributed digital identity DID, and writes the user's DID identifier, public key, creation time, organization, and user role related information. The blockchain trusted platform writes the financing business status contract M1, the M1 index is the winning notice number, and the value is {winning notice number, supplier enterprise number, buyer core enterprise number, financing business status, credit validity period}, recording the current business status as the credit application status.
[0050] S21, the supply chain platform homomorphically encrypts the winning order amount data and uploads it to the chain: Based on the ecc-elgamal multiplication homomorphic encryption algorithm, the supply chain platform generates a key pair of a public key Pk2 for encryption and a private key Sk2 for decryption for the supplier, and one key pair is generated for each enterprise. The result of public key encryption Enc(Pk2, winning order amount) is B. The supply chain platform stores the winning information on the chain through the supplier's DID, with the index being the winning notice number and the value being {winning notice number, B, winning time}.
[0051] S22, the smart contract performs multiplication to calculate the credit limit: the blockchain trusted platform writes the credit limit smart contract C2, C2 sets Enc(Pk2, credit limit coefficient) as P, and according to the credit limit Ek = minimum value Calculate the supplier's credit limit.
[0052] S23, the bank system approves the credit limit, notifies the supplier of the credit result and uploads it to the chain: Based on the order information, the bank system accesses the S22 smart contract C2 to obtain the Ek value by passing the ciphertext P parameter value through the bank DID, and accesses the S20 smart contract M1 to update the current business status to the credit approval result status, as well as the credit validity period.
[0053] Figure 4 The implementation of supplier contract signing and credit lending is described based on blockchain and homomorphic encryption technology to calculate the supplier's loan amount. The method includes the following steps:
[0054] S30, the supply chain platform receives the supplier's credit application, updates the status and uploads it to the chain: the supply chain platform accesses the S20 smart contract M1 through the supplier's DID and updates the current business status to the credit application status.
[0055] S31, the supply chain platform uploads the contract order amount data to the chain through homomorphic encryption: based on the homomorphic encryption algorithm, a key pair of public key Pk3 for encryption and private key Sk3 for decryption is generated, and one enterprise generates one key pair, the public key encryption Enc(Pk3, contract order amount) is B, and the order information is stored and uploaded to the chain through the supplier DID. The index is the contract number, and the value is {contract number, contract order amount, contract signing time}.
[0056] S32, the smart contract performs multiplication operation on the credit limit: the blockchain trusted platform writes the credit limit smart contract C3, C3 first determines whether the current credit time is within the effective period of the winning credit, and then calculates the supplier's credit limit, and sets Enc(Pk2, credit limit coefficient) to P, which is based on 5.Uk=minimum value min{Dec(Sk2,B*P),Ek}.
[0057] S33, the bank system approves the loan amount, notifies the supplier of the loan result and uploads it to the chain: Based on the order information, the bank system accesses the S32 smart contract C3 to obtain the Uk value by passing the ciphertext P parameter value through the bank DID, notifies the supplier of the loan amount, and stores the approval result on the chain. The index is the loan contract number, and the value is {loan contract number, loan amount, loan date, loan interest rate, winning notice number}
[0058] Figure 5 The method describes how the buyer's repayment is realized based on the blockchain smart contract scheduling robot technology to achieve automatic deduction. The method includes the following steps:
[0059] S40, the banking system receives the buyer's repayment plan and uploads it to the chain: The banking system receives the repayment plan of the buyer's core enterprise, and uploads the buyer's repayment plan to the chain through the buyer's core enterprise DID. The index is the repayment plan number, and the value is {repayment plan number, repayment start date, repayment deadline, monthly repayment date, monthly repayment amount, repayment loan contract number, winning notice number}.
[0060] S41, the smart contract automatically triggers deductions according to the repayment plan: the blockchain trusted platform writes the deduction smart contract M2. M2 automatically writes the deduction mark log on the repayment day based on the repayment plan of the S40 buyer's core enterprise through the smart contract scheduling robot. The bank system monitors the M2 execution event and automatically triggers the bank system deduction interface to run.
[0061] S42, the bank receives the deduction result notification, updates the status and uploads it to the chain: if the deduction is successful, the bank system accesses the S20 smart contract M1 through the bank DID to record the current business status as normal repayment status; if the deduction fails and the overdue payment is not deducted, it is updated to overdue status. The bank system evaluates the supplier's financing credit based on the repayment situation and affects the approval results of the supplier's subsequent loans.
[0062] Those skilled in the art should recognize that the above embodiments are only used to illustrate the present invention, and are not intended to limit the present invention. As long as they are within the spirit of the present invention, any changes or modifications to the above embodiments will fall within the scope of the claims of the present invention.
Claims
1. A supply chain finance data sharing method based on blockchain and homomorphic encryption, characterized in that: The steps include: Step 1, including the buyer's core enterprise access; Step 2: Supplier order winning and financing credit approval; Step 3: Signing supplier contract and disbursing credit; Step 4: The buyer’s core enterprise repays the loan.
2. According to a supply chain financial data sharing method based on blockchain and homomorphic encryption according to claim 1, it is characterized in that: Step 1: Buyer core enterprise access, including the following steps: S10, the supply chain platform receives the buyer's access application, based on DID registration: the bank applies for access through the supply chain platform operation end, and the system automatically registers the access bank on the blockchain trusted platform based on the blockchain distributed identity DID service, generates a distributed digital identity DID, and writes the user's DID identifier, public key Pk, creation time, organization, and user role information; the buyer's core enterprise submits a financing access application through the supply chain platform, and the system automatically generates the buyer's core enterprise DID; S11, the supply chain platform uploads revenue information to the chain through homomorphic encryption: Based on the ecc-elgamal multiplication homomorphic encryption algorithm, the supply chain platform generates a key pair of public key Pk1 for encryption and private key Sk1 for decryption for the core enterprise of the buyer. This key pair uniquely corresponds to the enterprise; the supply chain platform stores and uploads revenue information through the DID of the core enterprise of the buyer. The index is the buyer's enterprise number, and the value is the buyer's enterprise number and revenue information S12, the smart contract performs multiplication of the buyer's credit limit: the blockchain trusted platform writes the buyer's credit limit smart contract C1, and the smart contract C1 sets the upper limit of the single household and the future growth coefficient to calculate the credit limit of the buyer's core enterprise; S13, the bank system approves the buyer's credit limit, notifies the buyer of the access result and uploads it to the chain: the bank system accesses the smart contract C1 to obtain the buyer's total credit limit based on the level and market competitiveness of the core enterprise by passing in the ciphertext parameter value, without knowing the specific operating data of the core enterprise; the bank system stores the approval result on the chain through the bank DID, with the index being the buyer's enterprise number and the value being the buyer's enterprise number, credit limit, credit bank number, and approval time.
3. According to a supply chain financial data sharing method based on blockchain and homomorphic encryption according to claim 1, it is characterized in that: Step 2, supplier order winning and financing credit, specifically includes the following steps: S20, the supply chain platform receives the supplier's credit application, based on DID registration: the supplier selects the winning notice through the supply chain platform to submit the credit application. The system automatically registers the supplier on the blockchain trusted platform based on the blockchain distributed identity DID service, generates a distributed digital identity DID, and writes the user's DID identifier, public key, creation time, organization, and user role information; the blockchain trusted platform writes the financing business status contract M1, the financing business status contract M1 index is the winning notice number, the value is the winning notice number, the supplier enterprise number, the buyer's core enterprise number, the financing business status, and the credit validity period, and records the current business status as the credit application status; S21, the supply chain platform homomorphically encrypts the winning order amount data and uploads it to the chain: Based on the ecc-elgamal multiplication homomorphic encryption algorithm, the supply chain platform generates a key pair of a public key Pk2 for encryption and a private key Sk2 for decryption for the supplier. This key pair is unique to the enterprise; the supply chain platform stores the winning bid information on the chain through the supplier's DID, with the index being the winning bid notice number, and the value being the winning bid notice number, the winning order amount, and the winning bid time; S22, the smart contract performs multiplication to calculate the credit limit: the blockchain trusted platform writes the credit limit smart contract C2, and the credit limit smart contract C2 sets the credit limit coefficient to calculate the supplier's credit limit; S23, the bank system approves the credit line, notifies the supplier of the credit result and uploads it to the chain: Based on the order information, the bank system accesses the credit line smart contract C2 by passing in the ciphertext parameter value through the bank DID to obtain the credit line value, and accesses the financing business status contract M1 to update the current business status to the credit approval result status, as well as the credit validity period.
4. According to a supply chain financial data sharing method based on blockchain and homomorphic encryption according to claim 1, it is characterized in that: Step 3, signing of supplier contract and credit loan, specifically includes the following steps; S30, the supply chain platform receives the supplier's credit application, updates the status and uploads it to the chain: the supply chain platform accesses the smart financing business status contract M1 through the supplier's DID, and updates the current business status to the credit application status; S31, the supply chain platform uploads the contract order amount data to the chain through homomorphic encryption: based on the homomorphic encryption algorithm, a key pair of public key Pk3 for encryption and private key Sk3 for decryption is generated, and the key pair is uniquely corresponding to the enterprise; the order information is stored on the chain through the supplier DID, with the index being the contract number, and the value being the contract number, contract order amount, and contract signing time; S32, the smart contract performs multiplication operation on the credit limit: the blockchain trusted platform writes the credit limit smart contract C3, which first determines whether the current credit time is within the effective period of the winning bid credit, and then calculates the supplier's credit limit; S33, the bank system approves the loan amount, notifies the supplier of the loan result and uploads it to the chain: Based on the order information, the bank system accesses the credit limit smart contract C3 by passing in the ciphertext parameter value through the bank DID to obtain the credit limit value, notifies the supplier of the loan amount, and stores the approval result on the chain. The index is the loan contract number, and the value is the loan contract number, loan amount, loan date, loan interest rate and winning notice number.
5. According to a supply chain financial data sharing method based on blockchain and homomorphic encryption according to claim 1, it is characterized in that: Step 4: The buyer's core enterprise repays the loan, which specifically includes the following steps: S40, the bank system receives the buyer's repayment plan and uploads it to the chain: The bank system receives the buyer's core enterprise repayment plan, and stores and uploads the buyer's repayment plan to the chain through the buyer's core enterprise DID. The index is the repayment plan number, and the value is the repayment plan number, repayment start date, repayment deadline, monthly repayment date, monthly repayment amount, repayment loan contract number, and winning notice number; S41, the smart contract automatically triggers deduction according to the repayment plan: the blockchain trusted platform writes the deduction smart contract M2, and the deduction smart contract M2 automatically writes the deduction mark log on the repayment day according to the repayment plan of the buyer's core enterprise through the smart contract scheduling robot. The bank system monitors the execution event of the deduction smart contract M2 and automatically triggers the bank system deduction interface to run; S42, the bank receives the deduction result notification, updates the status and uploads it to the chain: if the deduction is successful, the bank system accesses the financing business status contract M1 through the bank DID to record the current business status as a normal repayment status; if the deduction fails and no deduction is made overdue, it is updated to an overdue status; the bank system evaluates the supplier's financing credit based on the repayment situation, and adjusts the approval result parameters for the supplier's subsequent loans.
