Off-chain data source credibility authentication method and system based on cross-chain mechanism
By introducing cross -chain mechanisms and dual chain structures in the blockchain system, the credibility authentication of the data source and the credibility verification of the data on the chain of data are solved. Data security of blockchain applications.
Patent Information
- Application Number
- CN202411350634.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-28
AI Technical Summary
Existing blockchain technology is difficult to ensure the credibility of off-chain data, which makes it difficult to eliminate untrusted data after being put on the chain, affecting the data security of blockchain applications.
Using a cross-chain mechanism-based chain data source credibility certification method, through the dual chain structure and cross-chain collaboration of the "certification chain-business chain '" Essence
Effectively solve the problem of data source certification assessment in the terminal side chain, ensure the credibility of the data chain, and enhance the data security of blockchain applications.
Smart Images

Figure CN119382855A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of on-chain and off-chain collaboration of blockchain data, and in particular to a method and system for authenticating the credibility of off-chain data sources based on a cross-chain mechanism. Background Art
[0002] Blockchain technology has the characteristics of distributed consensus, immutability, and traceability. It is an important supporting technology for trusted infrastructure in the digital economy and has been widely used. However, the blockchain distributed ledger confirmation mechanism can only guarantee the immutability of on-chain data, but it is difficult to guarantee the credibility of data before it is uploaded to the chain. If there are untrusted data sources off the chain in the system that provide untrusted data, once the untrusted data is stored on the chain, it will be shared and transmitted indiscriminately by the blockchain, and its impact will be amplified and difficult to eliminate, thus posing a severe challenge to data security in blockchain applications.
[0003] At present, the data on-chain of the blockchain system is divided into two ways: platform-side on-chain and terminal-side on-chain. Among them, the platform-side on-chain is to directly on-chain the data under the supervision of the platform, and its credibility is endorsed by the platform; while the terminal-side on-chain is to on-chain the data through the peer data source, which has the problem of data source credibility authentication. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, this application proposes a method and system for authenticating the credibility of off-chain data sources based on a cross-chain mechanism, and utilizes the data on-chain business credibility authentication model of chain-governed chain based on the cross-chain collaboration of "authentication chain-business chain" to solve the problem of data source credibility authentication and evaluation in the terminal-side on-chain.
[0005] The technical solution adopted by the present invention is as follows:
[0006] An off-chain data source credibility authentication system based on a cross-chain mechanism, including a data source authentication layer, a business layer, and an authentication engine;
[0007] The data source authentication layer includes an authentication chain and an authentication chain smart contract, and the authentication chain stores the identity authentication information of the data source;
[0008] The business layer includes a business chain and a business chain smart contract, and the business chain stores business data;
[0009] The authentication engine realizes forward cross-chain and reverse cross-chain between the authentication chain and the business chain through a cross-chain mechanism. The forward cross-chain realizes cross-chain data transmission from the authentication chain to the business chain, which is used for the business chain to confirm the credibility of the data source; the reverse cross-chain realizes cross-chain data transmission from the business chain to the authentication chain, which is used to update the trusted data of the data source.
[0010] Furthermore, during the data on-chain stage, the authentication engine synchronizes the information in the authentication chain to the business chain through a cross-chain mechanism, and verifies the credibility of the data source based on the identity authentication information of the data source; for the data provided by the data source that has passed the credibility verification, an unalterable credibility label is added and submitted to the business chain smart contract for on-chain storage.
[0011] Furthermore, during the data source registration phase, the authentication engine identifies the data source and stores the data source's identity authentication information in the authentication chain.
[0012] Furthermore, the process of implementing the cross-chain mechanism interaction is as follows:
[0013] ① The authentication engine triggers authentication to the cross-chain gateway, and the cross-chain gateway initiates cross-chain according to the request type;
[0014] ② If it is a forward cross-chain, the cross-chain gateway initiates a credit status query to the authentication cross-chain gateway and enters ③; if it is a reverse cross-chain, the cross-chain gateway requests the business cross-chain gateway to update the credit status and enters ⑦;
[0015] ③ The authentication chain cross-chain gateway submits a query to the authentication chain smart contract to conduct a trust query;
[0016] ④The authentication chain returns the credit status to the authentication chain cross-chain gateway;
[0017] ⑤ Run the cross-chain algorithm and return data that conforms to the target chain format to the business cross-chain gateway;
[0018] ⑥ After completing the authentication information attachment (i.e. adding an unalterable credibility tag), call the business chain smart contract to submit the business chain;
[0019] ⑦The business chain returns the updated credit status to the business cross-chain gateway;
[0020] ⑧Run the cross-chain algorithm and perform reverse cross-chain, that is, the business cross-chain gateway transmits the updated credit status to the authentication chain cross-chain gateway;
[0021] ⑨Call the authentication chain to update the authentication chain smart contract and complete the credit status update.
[0022] Furthermore, the cross-chain algorithm selects a cross-chain algorithm of a side chain, a relay chain, a hash lock or a notary mechanism.
[0023] A method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism includes the following steps:
[0024] Step 1: During initialization, the data source sends a registration request to the authentication engine;
[0025] Step 2: After the authentication engine identifies the identity of the data source, it calls the authentication chain smart contract to store the identity authentication information corresponding to the data source on the chain and store it in the authentication chain;
[0026] Step 3: The data source initiates a request to upload business data to the business chain.
[0027] Step 4: The business chain smart contract queries the authentication engine for the trustworthiness of the data source and initiates cross-chain access between the authentication chain and the business chain through the cross-chain mechanism;
[0028] Step 5: Retrieve the trust status corresponding to the on-chain data source in the authentication chain, return the queried authentication status and trustworthiness, and import them into the business chain;
[0029] Step 6: The business chain smart contract adds the received authentication status and trust to the current business to achieve trusted data on-chain;
[0030] Step 7: After the chain is completed, the business log data is generated, the authentication status and trust value are updated, and the authentication status corresponding to the data source in the authentication chain is updated through reverse cross-chain.
[0031] Furthermore, the first identification of the data source is done by the administrator.
[0032] Furthermore, the data authentication algorithm in the data source registration phase is: data source i submits a unique identifier d i Register with the authentication chain. The authentication chain smart contract verifies the legitimacy of the data source i and then stores it on the chain. The legitimacy verification process is completed by the business administrator. Set the registration timestamp as Tr i , the public key is Pk i , hash function H, the authentication data and its hash value d i ||Tr i ||Pk i ||H(d i ||Tr i ||Pk i ) on-chain storage.
[0033] Furthermore, the data authentication algorithm in the application stage of business data on-chain is: the business data submitted by data source i contains a digital signature of the data, and its format is: T i ||Ts i ||E(T i ,Sk i ), where T i Ts is the business data index currently applied for on-chain by data source i. i Apply for timestamp for business data on the chain, Sk i is the private key of data source i, and E is the public key encryption algorithm.
[0034] Furthermore, the data authentication algorithm in the data source authentication phase is as follows: the business chain smart contract extracts the application timestamp Ts from the application data i and the encrypted transaction index C i =E(T i ,Sk i ), use the authentication information returned by the cross-chain for verification, which is divided into the following steps:
[0035] Step 1: Verify the validity of the authentication information: Extract d i ||Tr i ||Pk i , use the hash function H to calculate H(d i ||Tr i ||Pk i ) and compare it with the received information. If the consistency is confirmed, go to step 2, otherwise exit and return "Authentication Information Error";
[0036] Step 2: Calculate the validity period: Set the validity period to T. If Ts i -Tr i <T, indicating that it is within the valid range of authentication, and proceed to step 3; otherwise, exit and return to "Exceeded the valid period of authentication".
[0037] Step 3: Use the public key Pk i Decrypting transaction index: Calculating T i =D(C i ,Sk i ), if the decryption is successful, the transaction index T i Submit the business chain to the chain.
[0038] Beneficial effects of the present invention:
[0039] (1) The present invention proposes a method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism, which uses a dual-chain structure of an authentication chain and a business chain to upload the trusted data of the data source to the chain. The present invention deploys the authentication chain and the business chain in parallel, which are relatively independent and only interact at the cross-chain level. It has the characteristics of secure isolation and non-intrusiveness, and does not affect the existing chain structure and consensus algorithm.
[0040] (2) The authentication business and the on-chain business in the present invention are independent of each other but interrelated, which not only avoids the mutual influence between supervision and business, but also ensures the universality of the blockchain authentication structure, and realizes flexible, accurate, efficient and sustainable data source credibility authentication.
[0041] (3) The present invention realizes the data chain business credibility authentication mode of cross-chain collaboration of "authentication chain-business chain" and chain governance through forward cross-chain and reverse cross-chain methods, which can effectively solve the problem of data source credibility authentication and evaluation in the terminal side chain in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a system architecture diagram.
[0043] Figure 2 It is the data source authentication process.
[0044] Figure 3 This is a diagram of the forward cross-chain and reverse cross-chain architecture. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0046] Combined with Figure 1 ,The present invention designs an off-chain data source credibility authentication system based on a cross-chain mechanism, including a data source authentication layer, a business layer and an authentication engine;
[0047] The data source authentication layer includes an authentication chain and an authentication chain smart contract, and the authentication chain stores the identity authentication information of the data source;
[0048] The business layer includes a business chain and a business chain smart contract, and the business chain stores business data;
[0049] The authentication engine is used to identify the data source, and realize forward cross-chain and reverse cross-chain between the authentication chain and the business chain through the cross-chain mechanism. The forward cross-chain realizes cross-chain data transmission from the authentication chain to the business chain, which is used for the business chain to confirm the credibility of the data source; the reverse cross-chain realizes cross-chain data transmission from the business chain to the authentication chain, which is used to update the trusted data of the data source.
[0050] Furthermore, the business chain smart contract interacts with the authentication chain through a cross-chain mechanism to obtain the credit status of the current data source, and can also submit the behavior of the malicious data source to the authentication chain for evidence storage through the cross-chain mechanism.
[0051] Furthermore, during the data source registration phase, the identity authentication information of the data source is stored in the authentication chain.
[0052] Furthermore, during the data on-chain stage, the authentication engine synchronizes the identity authentication information in the authentication chain to the business chain through a cross-chain mechanism; the business chain verifies the credibility of the data source based on the identity authentication information. For the data provided by the data source that has passed the credibility verification, an unalterable credibility label is added and submitted to the business chain smart contract for on-chain storage.
[0053] like Figure 3 As shown, the specific process of the cross-chain mechanism in the present invention is as follows:
[0054] ① The authentication engine triggers authentication to the cross-chain gateway, and the cross-chain gateway initiates cross-chain according to the request type;
[0055] ② If it is a forward cross-chain, the cross-chain gateway initiates a credit status query to the authentication cross-chain gateway and enters ③. This process will obtain the credit status data of the corresponding data source stored on the authentication chain through the cross-chain; if it is a reverse cross-chain, the cross-chain gateway requests the business cross-chain gateway to update the credit status and enter ⑦. This process will update the latest credit status of the corresponding data source to the authentication chain through the cross-chain;
[0056] ③ The authentication chain cross-chain gateway submits a query to the authentication chain smart contract to conduct a trust query;
[0057] ④The authentication chain returns the credit status information to the authentication chain cross-chain gateway;
[0058] ⑤ Run cross-chain algorithms such as side chain, relay chain, hash locking, notary mechanism, etc. (implementers can choose by themselves), and return data that conforms to the target chain format to the business cross-chain gateway;
[0059] ⑥After completing the authentication information attachment, call the business chain smart contract to submit the business chain;
[0060] ⑦The business chain returns the updated credit status to the business cross-chain gateway;
[0061] ⑧Run cross-chain algorithms such as side chain, relay chain, hash locking, notary mechanism (implementers can choose by themselves) to conduct reverse cross-chain, that is, the business cross-chain gateway transmits the updated credit status to the certification chain cross-chain gateway;
[0062] ⑨Call the authentication chain to update the authentication chain smart contract and complete the credit status update.
[0063] Example 2
[0064] Combined with Figure 2 ,This method proposes a method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism, and its process is as follows:
[0065] Step 1: During initialization, the data source sends a registration request to the authentication engine.
[0066] Step 2: After the authentication engine identifies the identity of the data source, it calls the authentication chain smart contract to store the identity authentication information corresponding to the data source on the chain and store it in the authentication chain. It should be noted that the first identity identification of the data source is completed by the administrator.
[0067] Step 3: The data source initiates a request to upload business data to the business chain.
[0068] Step 4: The business chain smart contract queries the authentication engine for the trustworthiness of the data source and initiates cross-chain access between the authentication chain and the business chain through the cross-chain mechanism.
[0069] Step 5: Retrieve the credit status of the data source on the chain in the authentication chain, return the queried authentication status and trustworthiness, and import them into the business chain.
[0070] Step 6: The business chain smart contract will attach the received authentication status and trust to the current business to achieve trusted data on-chain.
[0071] Step 7: After the chain is completed, the business log data is generated, the authentication status and trust value are updated, and the authentication status corresponding to the data source in the authentication chain is updated through reverse cross-chain.
[0072] Furthermore, the data authentication algorithm includes the following stages:
[0073] (1) Data source registration phase: Data source i submits a unique identifier d i Register with the authentication chain. The authentication chain smart contract verifies the legitimacy of the data source i and then stores it on the chain. The legitimacy verification process is completed by the business administrator. Let the registration timestamp be Tr i , the public key is Pk i , hash function H, the authentication data and its hash value d i ||Tr i ||Pk i ||H(d i ||Tr i ||Pk i ) on-chain storage.
[0074] (2) Business data on-chain application stage: The business data submitted by data source i includes a digital signature on the data, and its format is as follows: i ||Ts i ||E(T i ,Sk i ), where T i Ts is the business data index currently applied for on-chain by data source i. i Apply for timestamp for business data on the chain, Sk i is the private key of data source i, and E is the public key encryption algorithm.
[0075] (3) Data source authentication phase: The business chain smart contract extracts the application timestamp Ts from the application data i and the encrypted transaction index C i =E(T i ,Sk i ), use the authentication information returned by the cross-chain for verification, which is divided into the following steps:
[0076] Step 1: Verify the validity of the authentication information. Extract d i ||Tr i ||Pk i , use the hash function H to calculate H(d i ||Tr i ||Pk i ) and compare it with the received information. If the consistency is confirmed, go to step 2, otherwise exit and return "Authentication Information Error".
[0077] Step 2: Calculate the validity period. Set the validity period to T. If Ts i -Tr i <T, indicating that it is within the valid range of authentication, and proceed to step 3; otherwise, exit and return to "Exceeded the valid period of authentication".
[0078] Step 3: Use the public key Pk i Decrypt transaction index. Calculate T i =D(C i ,Sk i ), if the decryption is successful, the transaction index T i Submit the business chain to the chain.
[0079] The addition of the cross-chain authentication status is to synthesize and encapsulate the business data and authentication data. The credit status addition includes two parts: business data index and authentication status data, that is, adding an unalterable credibility label. The specific data format is as follows:
[0080]
[0081] In the above table:
[0082] On-chain business number: the unique identifier of the on-chain business, generated when the on-chain is initiated;
[0083] Data source identifier: the data source identifier involved in the on-chain business;
[0084] Dataset index: the index of the dataset currently on the chain;
[0085] Forward cross-chain business index:
[0086] Record the binding information of data and authentication status in the forward cross-chain business, which is obtained by hash calculation of the up-chain business number (UPID) and the cross-chain business identifier:
[0087] PCCB_ID=Hash(UPID||CCID)
[0088] Among them, CCID is the cross-chain business identifier;
[0089] Certification Status:
[0090] Record the data source authentication status obtained from the authentication chain:
[0091] Trust: records the trust value corresponding to the data source obtained from the authentication chain. The value range is: [0, 100].
[0092] state Certified Unauthenticated Whitelist blacklist Status 1 0 2 -1
[0093] The reverse cross-chain updates the authentication data according to the current data source on-chain performance, specifically including the corresponding data items in the historical credit database and the policy library. The update process and update data format are as follows:
[0094] (1) Update process
[0095] The status of a data source that has not completed authentication for the first time is "unauthenticated" and does not have the authority to upload to the chain. It is necessary to complete the authentication process in the authentication chain. After the authentication process is successfully executed, the authentication status is updated to "authenticated".
[0096] Certification status update:
[0097] After the data source with the permission to upload to the chain completes the upload, the credit status is updated, including the following situations:
[0098] Before update After Update The certification validity period has been reached Certified Unauthenticated Normal data source Certified Certified High-trust data source Certified Whitelist Low-trust data sources Certified blacklist
[0099] The trust level thresholds are set by the administrator.
[0100] Trust Update:
[0101] The trust index ranges from [0, 100]. The trust of the data source is 50 at the time of initialization. Each time the data is uploaded to the chain, it is evaluated based on the quality of the data provided (the evaluation method is set by the administrator), and the trust value is updated based on the evaluation results.
[0102] (2) Updated data includes on-chain business information and updated credit status data in the following format:
[0103]
[0104] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.
Claims
1. An off-chain data source credibility authentication system based on a cross-chain mechanism, characterized in that: Includes data source authentication layer, business layer and authentication engine; The data source authentication layer includes an authentication chain and an authentication chain smart contract, and the authentication chain stores the identity authentication information of the data source; The business layer includes a business chain and a business chain smart contract, and the business chain stores business data; The authentication engine realizes forward cross-chain and reverse cross-chain between the authentication chain and the business chain through a cross-chain mechanism. The forward cross-chain realizes cross-chain data transmission from the authentication chain to the business chain, which is used for the business chain to confirm the credibility of the data source; the reverse cross-chain realizes cross-chain data transmission from the business chain to the authentication chain, which is used to update the trusted data of the data source.
2. According to claim 1, a cross-chain mechanism-based off-chain data source credibility authentication system is characterized in that: During the data on-chain stage, the authentication engine synchronizes the information in the authentication chain to the business chain through a cross-chain mechanism, and verifies the credibility of the data source based on the identity authentication information of the data source; For data provided by data sources that have passed credibility verification, add a tamper-proof credibility label and submit the business chain smart contract for on-chain storage.
3. According to claim 1, a cross-chain mechanism-based off-chain data source credibility authentication system is characterized in that: During the data source registration phase, the authentication engine identifies the data source and stores the data source's identity authentication information in the authentication chain.
4. According to claim 1, a cross-chain mechanism-based off-chain data source credibility authentication system is characterized in that: The process of implementing the cross-chain mechanism interaction is as follows: ① The authentication engine triggers authentication to the cross-chain gateway, and the cross-chain gateway initiates cross-chain according to the request type; ② If it is a forward cross-chain, the cross-chain gateway initiates a credit status query to the authentication cross-chain gateway. The credit status includes the authentication status and trustworthiness, and then proceeds to ③; If it is a reverse cross-chain, the cross-chain gateway requests the business cross-chain gateway to update the credit status and enter ⑦; ③ The authentication chain cross-chain gateway submits a query to the authentication chain smart contract to conduct a trust query; ④The authentication chain returns the trust to the authentication chain cross-chain gateway; ⑤ Run the cross-chain algorithm and return data that conforms to the target chain format to the business cross-chain gateway; ⑥After completing the authentication information attachment, call the business chain smart contract to submit the business chain; ⑦The business chain returns the updated credit status to the business cross-chain gateway; ⑧Run the cross-chain algorithm and perform reverse cross-chain, that is, the business cross-chain gateway transmits the updated credit status to the authentication chain cross-chain gateway; ⑨Call the authentication chain to update the authentication chain smart contract and complete the credit status update.
5. According to claim 4, a cross-chain mechanism-based off-chain data source credibility authentication system is characterized in that: The cross-chain algorithm selects a cross-chain algorithm of a side chain, a relay chain, a hash lock or a notary mechanism.
6. A method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism, characterized in that: Based on the off-chain data source credibility authentication system based on the cross-chain mechanism as claimed in claim 1, the authentication method includes the following steps: Step 1: During initialization, the data source sends a registration request to the authentication engine; Step 2: After the authentication engine identifies the identity of the data source, it calls the authentication chain smart contract to store the identity authentication information corresponding to the data source on the chain and store it in the authentication chain; Step 3: The data source initiates a request to upload business data to the business chain. Step 4: The business chain smart contract queries the authentication engine for the trustworthiness of the data source and initiates cross-chain access between the authentication chain and the business chain through the cross-chain mechanism; Step 5: Retrieve the credit status of the data source on the chain in the authentication chain, return the queried authentication status and trustworthiness, and import them into the business chain; Step 6: The business chain smart contract adds the received authentication status and trust to the current business to achieve trusted data on-chain; Step 7: After the chain is completed, the business log data is generated, the authentication status and trust value are updated, and the authentication status corresponding to the data source in the authentication chain is updated through reverse cross-chain.
7. According to claim 6, a method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism is characterized in that: The initial identification of the data source is done by the administrator.
8. According to claim 6, a method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism is characterized in that: The data authentication algorithm in the data source registration phase is: data source i submits a unique identifier d i Register with the authentication chain. The authentication chain smart contract verifies the legitimacy of the data source i and stores it on the chain. The legitimacy verification process is completed by the business administrator. Set the registration timestamp as Tr i , the public key is Pk i , hash function H, the authentication data and its hash value d i ||Tr i ||Pk i ||H(d i ||Tr i ||Pk i ) on-chain storage.
9. According to claim 8, a method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism is characterized in that: The data authentication algorithm in the application stage of business data on-chain is: the business data submitted by data source i contains a digital signature of the data, and its format is: i ||Ts i ||E(T i ,Sk i ), where T i Ts is the business data index currently applied for on-chain by data source i. i Apply for timestamp for business data on chain, Sk i is the private key of data source i, and E is the public key encryption algorithm.
10. According to claim 9, a method for authenticating the credibility of off-chain data sources based on a cross-chain mechanism is characterized in that: The data authentication algorithm in the data source authentication phase is: the business chain smart contract extracts the application timestamp Ts from the application data i and the encrypted transaction index C i =E(T i ,Sk i ), use the authentication information returned by the cross-chain for verification, which is divided into the following steps: Step 1: Verify the validity of the authentication information: Extract d i ||Tr i ||Pk i , use the hash function H to calculate H(d i ||Tr i ||Pk i ) and compare it with the received information. If the consistency is confirmed, go to step 2, otherwise exit and return "Authentication Information Error"; Step 2: Calculate the validity period: Set the validity period to T. If Ts i -Tr i <T, indicating that it is within the valid range of authentication, and proceed to step 3; otherwise, exit and return to "Exceeded the valid period of authentication". Step 3: Use the public key Pk i Decrypting transaction index: Calculating T i =D(C i ,Sk i ), if the decryption is successful, the transaction index T i Submit the business chain to the chain.