Blockchain cross-chain method, device, storage medium and electronic equipment
By constructing a trust relationship between candidate notary offices and transaction participants in the blockchain system, calculating credibility, and selecting a trusted notary office, the problem of the lack of inter-chain interconnection mechanism and cross-chain interoperability security risks in the blockchain system is solved, and more secure cross-chain transaction processing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEUSOFT CORP
- Filing Date
- 2021-12-01
- Publication Date
- 2026-06-02
AI Technical Summary
The lack of a unified inter-chain interconnection mechanism in existing blockchain systems has led to an unhealthy development of the blockchain technology application ecosystem, and cross-chain interoperability through notaries poses security risks.
By establishing a trust relationship between candidate notary offices and transaction participants, the credibility of each candidate notary office is calculated, and the notary office with the highest credibility is selected to execute cross-chain transactions. Digital identity credentials are used for verification to ensure the security of cross-chain transactions.
It enhances the security of cross-chain transactions by selecting a trusted notary for cross-chain operations, thereby reducing security risks and ensuring the validity and traceability of cross-chain transactions.
Smart Images

Figure CN114140117B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of blockchain technology, and more specifically, to a blockchain cross-chain method, apparatus, storage medium, and electronic device. Background Technology
[0002] Blockchain is a technology that enables the collective maintenance of a reliable database in a decentralized and trustless manner. It stores transactions that occur within a certain period of time in units of blocks, and uses cryptographic algorithms to connect these blocks in chronological order, forming a chain-like data structure.
[0003] Most current blockchain systems are independent and vertically closed, lacking a unified inter-chain interconnection mechanism. This severely restricts the healthy development of blockchain technology and its application ecosystem, leading to the emergence of cross-chain technology. For example, some technologies can facilitate cross-chain interoperability through notaries. However, such methods also pose significant security risks. Summary of the Invention
[0004] The purpose of this disclosure is to provide a blockchain cross-chain method, apparatus, storage medium, and electronic device to solve the aforementioned related technical problems.
[0005] To achieve the above objectives, according to a first aspect of the present disclosure, a blockchain cross-chain method is provided, comprising:
[0006] In response to cross-chain transaction requests, multiple candidate notary offices are obtained;
[0007] Establish trust relationships between the multiple candidate notary offices and the multiple first transaction participants;
[0008] The credibility of each candidate notary office is calculated based on the trust association relationship;
[0009] Based on the credibility of each candidate notary office, a target notary office is determined from the plurality of candidate notary offices, the target notary office being used to execute the cross-chain transaction associated with the cross-chain transaction request.
[0010] Optionally, the candidate notary office is authenticated by an identity verification terminal, which is determined by a cross-chain member set. This cross-chain member set includes at least some members of each blockchain network participating in the cross-chain process. The step of constructing a trust association between the multiple candidate notary offices and the multiple first transaction participants includes:
[0011] For each candidate notary office, determine one or more authentication terminals that are trusted for that candidate notary office;
[0012] For each authentication endpoint, identify one or more first transaction participants who trust that authentication endpoint;
[0013] The trust relationship is established based on the trust relationship between the candidate notary and the identity verification end, and the trust relationship between the identity verification end and the first transaction participant.
[0014] Optionally, the method is applied to cross-chain participating nodes, and the method further includes:
[0015] Send an authentication request to the target notary office;
[0016] The system receives a digital identity credential sent by the target notary office. The digital identity credential is issued by an identity verification terminal associated with the target notary office. After issuing the digital identity credential, the identity verification terminal saves the digital identity credential to the blockchain of the digital identity blockchain network.
[0017] Access the digital identity blockchain network to verify the digital identity credential;
[0018] If the verification is successful, the cross-chain transaction is executed through the target notary terminal.
[0019] Optionally, calculating the credibility of each candidate notary office through the trust association includes:
[0020] For each node in the trust relationship, update the node's trustworthiness based on the hub value of other nodes that trust that node;
[0021] For each node in the trust relationship, update the node's hub value based on the trustworthiness of other nodes trusted by that node.
[0022] Optionally, the method further includes:
[0023] Obtain historical cross-chain transaction data from the multiple candidate notary offices;
[0024] Multiple second transaction participants were identified based on the aforementioned historical cross-chain transaction data;
[0025] Establish transaction association relationships between the multiple candidate notary offices and the multiple second transaction participants;
[0026] The transaction credibility of each candidate notary office is calculated based on the transaction relationship.
[0027] The step of determining the target notary office from the plurality of candidate notary offices based on the credibility of each candidate notary office includes:
[0028] For each candidate notary office, a weighted value is calculated between the credibility of the candidate notary office and the credibility of the transaction to obtain a weighted credibility.
[0029] From the multiple candidate notary offices, a target notary office whose weighted credibility meets the threshold condition is determined.
[0030] Optionally, before calculating the weighted value of the credibility of the candidate notary office and the credibility of the transaction, the method further includes:
[0031] For each candidate notary terminal, a first weight value is calculated based on the number of target historical cross-chain transactions in which the candidate notary terminal participates and the measurement parameters of each target historical cross-chain transaction.
[0032] For each candidate notary office, the first weight value of the candidate notary office and the transaction credibility are calculated to obtain the first calculated value.
[0033] Update the transaction credibility of the candidate notary office to the first calculated value.
[0034] Optionally, calculating the transaction credibility of each candidate notary office through the transaction association includes:
[0035] For each node in the transaction association, the transaction credibility of that node is updated based on the hub value of the first target node that initiated the transaction to that node;
[0036] For each node in the transaction association, the hub value of that node is updated based on the transaction credibility of the receiving node of the transaction initiated by that node.
[0037] Optionally, the method further includes:
[0038] For each of the second transaction participants, determine the number of historical cross-chain transactions in which the second transaction participant has participated, and obtain a second calculated value; and,
[0039] The second weight value of the second transaction participant is obtained by calculating the ratio of the second calculated value to the total number of historical cross-chain transactions.
[0040] For each node in the transaction association, updating the transaction credibility of that node based on the hub value of the first target node that initiated the transaction to that node includes:
[0041] The hub value and the second weight value of each first target node are weighted and calculated.
[0042] The transaction credibility of the nodes in the transaction association is updated based on the weighted calculation results.
[0043] According to a second aspect of the present disclosure, a blockchain cross-chain device is provided, comprising:
[0044] The first acquisition module is used to acquire multiple candidate notary offices in response to cross-chain transaction requests;
[0045] The trust relationship building module is used to build trust relationships between the multiple candidate notary offices and the multiple first transaction participants.
[0046] The first calculation module is used to calculate the credibility of each candidate notary office through the trust association relationship;
[0047] The first determining module is used to determine a target notary office from the plurality of candidate notary offices based on the credibility of each candidate notary office, the target notary office being used to execute the cross-chain transaction associated with the cross-chain transaction request.
[0048] Optionally, the candidate notary office is authenticated by an identity verification office, which is determined by a cross-chain member set, the cross-chain member set including at least some members of each blockchain network participating in the cross-chain process, and the trust relationship building module includes:
[0049] The first determining submodule is used to determine one or more authentication terminals that are trusted for each of the candidate notary terminals.
[0050] The second determining submodule is used to determine, for each of the authentication terminals, one or more first transaction participants who trust the authentication terminal;
[0051] The first construction submodule is used to establish the trust association relationship based on the trust relationship between the candidate notary and the identity verification end, and the trust relationship between the identity verification end and the first transaction participant.
[0052] Optionally, the device is applied to cross-chain participating nodes, and the device further includes:
[0053] The first sending module is used to send an authentication request to the target notary office;
[0054] The first receiving module is used to receive the digital identity certificate sent by the target notary office. The digital identity certificate is issued by the identity verification terminal associated with the target notary office. After issuing the digital identity certificate, the identity verification terminal saves the digital identity certificate to the blockchain of the digital identity blockchain network.
[0055] An identity verification module is used to access the digital identity blockchain network and verify the digital identity credential.
[0056] The execution module is used to execute the cross-chain transaction through the target notary terminal if the verification is successful.
[0057] Optionally, the first computing module includes:
[0058] The first update submodule is used to update the trustworthiness of each node in the trust relationship based on the hub value of other nodes that trust the node.
[0059] The second update submodule is used to update the hub value of each node in the trust relationship based on the trustworthiness of other nodes trusted by that node.
[0060] Optionally, the device further includes:
[0061] The second acquisition module is used to acquire historical cross-chain transaction data of the multiple candidate notary terminals;
[0062] The second determination module is used to determine multiple second transaction participants based on the historical cross-chain transaction data;
[0063] A transaction relationship building module is used to establish transaction association relationships between the multiple candidate notary offices and the multiple second transaction participants;
[0064] The second calculation module is used to calculate the transaction credibility of each of the candidate notary offices through the transaction association relationship;
[0065] The first determining module includes:
[0066] The first calculation submodule is used to calculate the weighted value of the credibility of the candidate notary office and the credibility of the transaction for each candidate notary office, so as to obtain the weighted credibility.
[0067] The third determination submodule is used to determine the target notary office whose weighted credibility meets the threshold condition from the multiple candidate notary offices.
[0068] Optionally, the device further includes:
[0069] The third calculation module is used to calculate the first weight value of each candidate notary office for each candidate notary office before the first calculation submodule calculates the weighted value of the credibility of the candidate notary office and the credibility of the transaction. This is done based on the number of target historical cross-chain transactions in which the candidate notary office participates and the measurement parameters of each target historical cross-chain transaction.
[0070] The fourth calculation module is used to calculate the product of the first weight value of each candidate notary office and the transaction credibility for each candidate notary office, so as to obtain the first calculated value.
[0071] The credibility update module is used to update the transaction credibility of the candidate notary office to the first calculated value.
[0072] Optionally, the second computing module includes:
[0073] The third update submodule is used to update the transaction credibility of each node in the transaction association based on the hub value of the first target node that initiated the transaction to that node.
[0074] The fourth update submodule is used to update the hub value of each node in the transaction association based on the transaction credibility of the receiving node of the transaction initiated by that node.
[0075] Optionally, the device further includes:
[0076] The third determining module is used to determine, for each of the second transaction participants, the number of historical cross-chain transactions in which the second transaction participant has participated, and to obtain a second calculated value; and,
[0077] The fifth calculation module is used to calculate the ratio of the second calculated value to the total number of historical cross-chain transactions, and obtain the second weight value of the second transaction participant;
[0078] The third update submodule includes:
[0079] The first calculation subunit is used to perform weighted calculation of the hub value and the second weight value of each first target node;
[0080] The first update subunit is used to update the transaction credibility of the node in the transaction association based on the weighted calculation result.
[0081] According to a third aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method described in any of the first aspects above.
[0082] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising:
[0083] A memory on which computer programs are stored;
[0084] A processor for executing the computer program in the memory to implement the steps of the method described in any of the first aspects above.
[0085] The above technical solution, when conducting cross-chain transactions, can acquire multiple candidate notary offices and establish trust relationships between these candidate notary offices and multiple first-party transaction participants. In this way, the credibility of each candidate notary office can be calculated through these trust relationships, and then a target notary office can be determined from among the multiple candidate notary offices based on the credibility of each candidate notary office. For example, the candidate notary office with the highest credibility can be selected as the target notary office, and cross-chain transactions can be executed through the target notary office. The above technical solution calculates the credibility of the notary office based on the trust relationships between the notary office and the transaction participants, thereby selecting a trustworthy notary office and contributing to improved security of cross-chain transactions.
[0086] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0087] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:
[0088] Figure 1 This is a flowchart illustrating an exemplary embodiment of a blockchain cross-chain method.
[0089] Figure 2 This is an exemplary embodiment of the present disclosure illustrating an authentication process for a notary office.
[0090] Figure 3 This is a schematic diagram illustrating a trust association relationship as shown in an exemplary embodiment of this disclosure.
[0091] Figure 4 This is a flowchart illustrating an exemplary embodiment of a blockchain cross-chain method.
[0092] Figure 5 This is a schematic diagram illustrating a trust association relationship as shown in an exemplary embodiment of this disclosure.
[0093] Figure 6 This is a flowchart illustrating an exemplary embodiment of a blockchain cross-chain method.
[0094] Figure 7 This is a flowchart illustrating an exemplary embodiment of a blockchain cross-chain method.
[0095] Figure 8 This is a schematic diagram illustrating a transaction relationship as shown in an exemplary embodiment of this disclosure.
[0096] Figure 9This is a block diagram of a blockchain cross-chain device shown in an exemplary embodiment of this disclosure.
[0097] Figure 10 This is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. Detailed Implementation
[0098] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0099] Before introducing the blockchain cross-chain method, apparatus, storage medium, and electronic device disclosed herein, the application scenarios of this disclosure will first be introduced. To achieve interoperability between blockchain networks, a mutually trusted third party can be used as a notary in relevant scenarios to coordinate cross-chain transactions. However, this approach also increases the security risks of the blockchain network. When the introduced notary is untrustworthy, conducting cross-chain transactions through the notary may lead to serious security problems.
[0100] Therefore, this disclosure provides a blockchain cross-chain method. Figure 1 This is a flowchart illustrating a blockchain cross-chain method, as shown in this disclosure. Figure 1 The method includes:
[0101] In step 11, in response to the cross-chain transaction request, multiple candidate notary offices are obtained.
[0102] It should be noted that the described cross-chain method can be applied to cross-chain participants or to third-party service devices (such as blockchain service nodes). Taking the application of the method to a service device as an example, the service device can receive cross-chain transaction requests from cross-chain participants and obtain multiple candidate notary terminals.
[0103] In some implementation scenarios, the cross-chain transaction request may also include metrics of interest to the cross-chain participants, such as cross-chain transaction processing time, number of cross-chain transactions, etc. In this case, the service device can also obtain the multiple candidate notary terminals based on the metrics of interest to the cross-chain participants.
[0104] For example, when the focus metric is transaction processing time, the service device can sort multiple notary offices based on the processing time of cross-chain transactions. As an example, the service device can select a preset number of notary offices with shorter processing times from the sorted list to obtain the candidate notary offices.
[0105] In step 12, a trust relationship is established between the multiple candidate notary offices and the multiple first transaction participants.
[0106] For example, in one possible implementation, the candidate notary is authenticated by an identity verification end, which is determined by a cross-chain member set.
[0107] Here, with Figure 2 The following is an example of an authentication process using a notary office. The cross-chain member set can include at least some members of the various blockchain networks participating in the cross-chain process. The cross-chain member set has permissions within the cross-chain network, such as selecting an identity verification terminal, canceling the digital identities of network members, and reviewing the notary office. Figure 2 In the example, the digital identities of the cross-chain member set are stored on the Distributed Digital Identity (DID) Chain.
[0108] The identity verification terminal can be an authoritative institution used to verify the authenticity of the notary office and select a trusted notary office. The identity verification terminal has the authority to issue and reclaim verifiable digital identity credentials for the notary office within the cross-chain network. For example, when issuing a digital identity credential, the identity verification terminal can save the issued digital identity credential to the digital identity blockchain for evidence preservation and traceability. Alternatively, the identity verification terminal's digital identity can also be stored on the DID chain.
[0109] The notary office can be a third-party organization used to coordinate and process received cross-chain transactions within the cross-chain network, ensuring the secure, efficient, and orderly conduct of cross-chain transactions and guaranteeing consistency between the cross-chain parties. The digital identity of the notary office can also be stored on the DID chain.
[0110] In this context, the step 12, which involves establishing a trust relationship between the multiple candidate notary offices and the multiple first transaction participants, includes:
[0111] For each candidate notary office, determine one or more authentication offices that trust that candidate notary office; for each authentication office, determine one or more first transaction participants that trust that authentication office.
[0112] by Figure 2 For example, with candidate notary terminals C1, C2, and C3, it is possible to determine that the identity verification terminal B1 of candidate notary terminals C1 and C3, and the identity verification terminal B2 of candidate notary terminals C2 and C3, are trusted. Furthermore, it should be understood that if identity verification terminal B1 is selected by the cross-chain member set, then members in each blockchain network participating in the selection of identity verification terminal B1 can also trust said identity verification terminal B1. In this way, multiple first transaction participants who trust identity verification terminals B1 and B2 can be identified.
[0113] Next, the trust relationship can be established based on the trust relationship between the candidate notary and the identity verification end, and the trust relationship between the identity verification end and the first transaction participant.
[0114] Figure 3 This is a schematic diagram of a trust relationship as shown in this disclosure, that is, a trust relationship constructed based on the above example as follows: Figure 3 As shown. Among them, x1 and x2 are the first transaction participants in the trusted authentication terminal B1, and x3 is the first transaction participant in the trusted authentication terminal B2. x1, x2, and x3 are not... Figure 2 As shown in the image.
[0115] Furthermore, it should be noted that in some implementation scenarios, the cross-chain member set can directly verify and select the notary office without going through an identity verification terminal (e.g., when the cross-chain member set can obtain notary office information). In this case, the trust association may also exclude the identity verification terminal, and this disclosure does not impose any restrictions on this.
[0116] In step 13, the credibility of each candidate notary office is calculated through the trust association relationship.
[0117] Figure 4 This is a flowchart of a blockchain cross-chain method shown in this disclosure. In one possible implementation, calculating the credibility of each candidate notary office through the trust association includes:
[0118] S131, For each node in the trust relationship, update the trustworthiness of the node based on the hub value of other nodes that trust the node;
[0119] S132, for each node in the trust relationship, update the hub value of the node based on the trustworthiness of other nodes trusted by the node.
[0120] It is worth noting that if a node in the trust relationship is trusted by a large number of other nodes, it indicates that the node has a high level of trustworthiness (or authority); conversely, if the trustworthiness of other nodes trusted by a node in the trust relationship is high, it indicates that the node has a high level of trust authority. Taking the authentication end as an example, if the trustworthiness of other notary offices trusted by the authentication end is high, it can be determined that the authentication end has a high probability of selecting a trustworthy notary office. Here, this disclosure uses a hub value to describe the trust authority of a node.
[0121] Here Figure 5The diagram illustrating a trust relationship demonstrates the calculation process for the trustworthiness. In practice, the trustworthiness A and hub value H of each node a1, a2, and a3 in the trust relationship can be calculated using the following formula:
[0122]
[0123]
[0124] In this context, "→" represents a trust relationship, and v→u means that node v trusts node u. The trust and hub values of nodes a1, a2, and a3 are initially set to 1.
[0125] Thus, based on the above calculation formula, Figure 5 The credibility A of each node and the hub value H are calculated and updated, and the process is as follows:
[0126] Combination Figure 5 Since nodes a1 and a2 are not trusted by any node, A(a1) and A(a2) are both updated to 0, that is, A(a1) = A(a2) = 0;
[0127] Node a3 is trusted by nodes a1 and a2, so the trustworthiness A(a3) of node a3 is updated to A(a3) = H(a1) + H(a2) = 2, where the values of H(a1) and H(a2) are both the initial value 1;
[0128] After the trustworthiness of node a3 is updated and determined, the hub values of nodes a1 and a2 can be calculated and updated, i.e., H(a1) = H(a2) = A(a3) = 2. Since node a3 does not trust any node, H(a3) is updated to 0, i.e., H(a3) = 0.
[0129] Similarly, it can also be calculated using the above formula. Figure 3 The credibility A and hub value H of each node are defined. In some implementation scenarios, after each iteration updates the credibility A and hub value H of a node, the credibility A and hub value H can be normalized. As an example, the normalization method is as follows:
[0130]
[0131]
[0132] Wherein, base is the set of nodes in the trust relationship. The specific calculation method can be referred to the HITS (Hyperlink-Induced Topic Search) algorithm, which will not be elaborated in this disclosure.
[0133] In step 14, a target notary office is determined from the plurality of candidate notary offices based on the credibility of each candidate notary office. The target notary office is used to execute the cross-chain transaction associated with the cross-chain transaction request.
[0134] For example, the candidate notary with the highest credibility can be used as the target notary, and cross-chain transactions can be conducted based on the target notary. The implementation method for conducting cross-chain transactions through the notary can be found in relevant technical descriptions; for the sake of brevity, the applicant will not elaborate further.
[0135] The above technical solution, when conducting cross-chain transactions, can acquire multiple candidate notary offices and establish trust relationships between these candidate notary offices and multiple first-party transaction participants. In this way, the credibility of each candidate notary office can be calculated through these trust relationships, and then a target notary office can be determined from the multiple candidate notary offices based on the credibility of each candidate notary office. For example, the candidate notary office with the highest credibility can be selected as the target notary office, and cross-chain transactions can be executed through the target notary office. The above technical solution calculates the credibility of the notary office based on the trust relationships between the notary office and the transaction participants, thereby selecting a trustworthy notary office and contributing to improved security of cross-chain transactions.
[0136] Figure 6 This is a flowchart illustrating a blockchain cross-chain method disclosed herein, which is applied to cross-chain participating nodes, with reference to... Figure 6 The method is in Figure 1 In addition to:
[0137] S15, send an identity verification request to the target notary office;
[0138] S16, Receive the digital identity certificate sent by the target notary terminal.
[0139] The digital identity credential is issued by an authentication terminal associated with the target notary office. After issuing the digital identity credential, the authentication terminal stores it in the blockchain of the digital identity blockchain network. In specific implementations, the digital identity credential may include, for example, the digital signature of the authentication terminal, the types of cross-chain transactions that the target notary office can execute, the scope of cross-chain transactions, the validity period of the target notary office, etc.
[0140] S17, access the digital identity blockchain network to verify the digital identity credential.
[0141] Continuing with the above example, the cross-chain participant can, for instance, access the digital identity blockchain network, obtain the digital identity certificate of the target notary office stored in the digital identity blockchain, and compare and verify it with the digital identity certificate sent by the target notary office. In some implementation scenarios, the cross-chain participant can also obtain the public key information of the identity authentication terminal from the digital identity blockchain and verify the digital signature in the digital identity certificate sent by the target notary office using the public key.
[0142] S18, if the verification is successful, execute the cross-chain transaction through the target notary terminal.
[0143] The aforementioned technical solution issues digital identity credentials to the MuBao notary office and stores these credentials in a digital identity blockchain network. This allows cross-chain participants to access the digital identity blockchain network before conducting cross-chain transactions to verify the target notary office's digital identity credentials. This method verifies the target notary office's identity, further ensuring its trustworthiness. Furthermore, storing the digital identity credentials in the digital identity blockchain guarantees the validity and traceability of the target notary office's identity, helping to reduce security risks.
[0144] Figure 7 This is a flowchart illustrating a blockchain cross-chain method, as shown in this disclosure. Figure 7 The method includes:
[0145] S71, in response to cross-chain transaction requests, obtains multiple candidate notary terminals.
[0146] S72, establish a trust relationship between the multiple candidate notary offices and the multiple first transaction participants.
[0147] S73, calculate the credibility of each candidate notary office through the trust association relationship.
[0148] S74, Obtain historical cross-chain transaction data from the multiple candidate notary terminals.
[0149] S75, determine multiple second transaction participants based on the historical cross-chain transaction data. The second transaction participants can be transaction participants who interacted with any of the candidate notary terminals in historical cross-chain transactions.
[0150] S76, Establish transaction association relationships between the multiple candidate notary offices and the multiple second transaction participants.
[0151] Figure 8This is a schematic diagram illustrating a transaction relationship, where x1-x8 represent second-party participants in the transaction, z1-z4 represent candidate notary offices, and the arrows indicate the transaction relationship. For example, if x1 points to z1 and z2, it means that second-party participant x1 has conducted cross-chain transactions through candidate notary offices z1 and z2. If z1 points to x1, x3, x4, and x7, it means that z1 has provided cross-chain services to the aforementioned second-party participants x1, x3, x4, and x7.
[0152] S77, calculate the transaction credibility of each candidate notary office through the transaction association relationship.
[0153] As one possible implementation, calculating the transaction credibility of each candidate notary office through the transaction association includes:
[0154] For each node in the transaction association, the transaction credibility of that node is updated based on the hub value of the first target node that initiated the transaction to that node;
[0155] For each node in the transaction association, the hub value of that node is updated based on the transaction credibility of the receiving node of the transaction initiated by that node.
[0156] For example, the transaction credibility A and hub value H of each node in the transaction association can be calculated using the following formula.
[0157]
[0158]
[0159] Here, "→" represents a transaction relationship; v→u means node v initiates a cross-chain transaction to node u. The calculation methods for transaction trustworthiness A and hub value H can also be found in the section on... Figure 1 The embodiments described herein are presented in detail below. For the sake of brevity, this disclosure will not elaborate further.
[0160] In one possible implementation, the weight values of the transaction participants can also be considered when calculating the transaction credibility of a node.
[0161] In this case, the method further includes:
[0162] For each of the second transaction participants, determine the number of historical cross-chain transactions in which the second transaction participant has participated to obtain a second calculated value; and calculate the ratio of the second calculated value to the total number of historical cross-chain transactions to obtain a second weight value for the second transaction participant.
[0163] Here, when the number of cross-chain transactions participated in by the second transaction participant is large, the second weight value of the second transaction participant can be large. For example, the second weight value can be calculated using the following formula:
[0164] w i =n i / N
[0165] Among them, w i Let n be the second weight value of the i-th second transaction participant. i Let N be the number of cross-chain transactions participated in by the i-th second transaction participant, and N be the number of historical cross-chain transactions obtained from the multiple candidate notary terminals. In some implementation scenarios, initiating a cross-chain transaction and receiving a cross-chain transaction can be counted as one transaction each.
[0166] In this case, updating the transaction credibility of each node in the transaction association based on the hub value of the first target node that initiated the transaction to that node includes:
[0167] The hub value and the second weight value of each first target node are weighted and calculated, and the transaction credibility of the node in the transaction association is updated according to the weighted calculation result.
[0168] The weighted calculation formula is as follows:
[0169]
[0170] Among them, A(u j H(v) represents the transaction credibility (or transaction authority) of the j-th candidate notary office. i ) represents the hub value of the i-th second trading participant, and wi represents the second weight value of the i-th second trading participant.
[0171] The above technical solution can also consider the weight of the second transaction participant when calculating the transaction credibility of each node in the transaction relationship, thereby improving the accuracy of the calculated transaction credibility.
[0172] In one possible implementation, the weight value of the notary office may also be considered when calculating the transaction credibility of a node. In this case, before step S78, the method further includes:
[0173] For each candidate notary terminal, a first weight value is calculated based on the number of target historical cross-chain transactions in which the candidate notary terminal has participated, and the measurement parameters of each target historical cross-chain transaction. Here, the measurement parameters may be, for example, the completion time of the cross-chain transaction, the evaluation value of the transaction participants on the cross-chain transaction, etc.
[0174] For example, in some implementation scenarios, the first weight value of the candidate notary office can be calculated using the following formula:
[0175]
[0176] Where S is the first weight value, N is the number of historical cross-chain transactions of the candidate notary, ti is the cross-chain transaction completion time, and gi is the evaluation parameter of the notary by the second transaction participant in this cross-chain transaction. The evaluation parameter can be presented in the form of a score (or grade), and the score can be, for example, from 1 to 5.
[0177] In this way, for each candidate notary office, the product of the first weight value of the candidate notary office and the transaction credibility can be calculated to obtain a first calculated value, and the transaction credibility of the candidate notary office can be updated to the first calculated value.
[0178] The aforementioned technical solution also considers the weight of the notary office (calculated based on the number of historical cross-chain transactions and the measurement parameters of historical cross-chain transactions) when calculating the transaction credibility of each node in the transaction relationship. In this way, the accuracy of the calculated transaction credibility can be improved.
[0179] It is worth noting that the above embodiments exemplify the calculation process of transaction credibility of this disclosure from the perspectives of considering a first weight value from the notary and a second weight value from the transaction participants, respectively. However, those skilled in the art will know that in specific implementations, both the first weight value from the notary and the second weight value from the transaction participants can be considered simultaneously, thereby further improving the accuracy of the calculated transaction credibility. Furthermore, the aforementioned first and second weight values can be calculated and updated periodically, with the calculation period being, for example, daily, weekly, etc., to ensure the accuracy of the transaction credibility.
[0180] S78. For each candidate notary office, calculate the weighted value of the candidate notary office's credibility and the transaction credibility to obtain a weighted credibility. For example, in some implementation scenarios, the credibility of the candidate notary office and the transaction credibility can be averaged to obtain the weighted credibility. In other implementation scenarios, different weights can be set for the credibility of the candidate notary office and the transaction credibility according to application requirements to obtain the weighted credibility.
[0181] S79, determine the target notary office from the plurality of candidate notary offices whose weighted credibility meets the threshold condition. For example, the candidate notary office with the highest weighted credibility can be selected as the target notary office.
[0182] The aforementioned technical solution calculates the credibility of the notary office based on the trust relationship between the notary office and the transaction participants, and calculates the transaction credibility of the notary office based on the transaction relationship between the notary office and the transaction participants. In this way, a weighted credibility of the candidate notary office can be calculated by combining the credibility of the candidate notary office and the transaction credibility, and then a trustworthy target notary office can be selected based on the weighted credibility. This approach improves the reliability of the selected notary office and helps enhance the security of cross-chain transactions.
[0183] Based on the same inventive concept, this disclosure also provides a blockchain cross-chain device. Figure 9 This is a block diagram of a blockchain cross-chain device shown in this disclosure, with reference to... Figure 9 The device 900 includes:
[0184] The first acquisition module 901 is used to acquire multiple candidate notary terminals in response to cross-chain transaction requests;
[0185] The trust relationship building module 902 is used to build trust relationships between the multiple candidate notary offices and the multiple first transaction participants;
[0186] The first calculation module 903 is used to calculate the credibility of each of the candidate notary offices through the trust association relationship;
[0187] The first determining module 904 is used to determine a target notary office from the plurality of candidate notary offices based on the credibility of each candidate notary office, the target notary office being used to execute the cross-chain transaction associated with the cross-chain transaction request.
[0188] The above technical solution, when conducting cross-chain transactions, can acquire multiple candidate notary offices and establish trust relationships between these candidate notary offices and multiple first-party transaction participants. In this way, the credibility of each candidate notary office can be calculated through these trust relationships, and then a target notary office can be determined from the multiple candidate notary offices based on the credibility of each candidate notary office. For example, the candidate notary office with the highest credibility can be selected as the target notary office, and cross-chain transactions can be executed through the target notary office. The above technical solution calculates the credibility of the notary office based on the trust relationships between the notary office and the transaction participants, thereby selecting a trustworthy notary office and contributing to improved security of cross-chain transactions.
[0189] Optionally, the candidate notary office is authenticated by an identity verification office, which is determined by a cross-chain member set, the cross-chain member set including at least some members of each blockchain network participating in the cross-chain process, and the trust relationship building module includes:
[0190] The first determining submodule is used to determine one or more authentication terminals that are trusted for each of the candidate notary terminals.
[0191] The second determining submodule is used to determine, for each of the authentication terminals, one or more first transaction participants who trust the authentication terminal;
[0192] The first construction submodule is used to establish the trust association relationship based on the trust relationship between the candidate notary and the identity verification end, and the trust relationship between the identity verification end and the first transaction participant.
[0193] Optionally, the device is applied to cross-chain participating nodes, and the device further includes:
[0194] The first sending module is used to send an authentication request to the target notary office;
[0195] The first receiving module is used to receive the digital identity certificate sent by the target notary office. The digital identity certificate is issued by the identity verification terminal associated with the target notary office. After issuing the digital identity certificate, the identity verification terminal saves the digital identity certificate to the blockchain of the digital identity blockchain network.
[0196] An identity verification module is used to access the digital identity blockchain network and verify the digital identity credential.
[0197] The execution module is used to execute the cross-chain transaction through the target notary terminal if the verification is successful.
[0198] Optionally, the first computing module includes:
[0199] The first update submodule is used to update the trustworthiness of each node in the trust relationship based on the hub value of other nodes that trust the node.
[0200] The second update submodule is used to update the hub value of each node in the trust relationship based on the trustworthiness of other nodes trusted by that node.
[0201] Optionally, the device further includes:
[0202] The second acquisition module is used to acquire historical cross-chain transaction data of the multiple candidate notary terminals;
[0203] The second determination module is used to determine multiple second transaction participants based on the historical cross-chain transaction data;
[0204] A transaction relationship building module is used to establish transaction association relationships between the multiple candidate notary offices and the multiple second transaction participants;
[0205] The second calculation module is used to calculate the transaction credibility of each of the candidate notary offices through the transaction association relationship;
[0206] The first determining module includes:
[0207] The first calculation submodule is used to calculate the weighted value of the credibility of the candidate notary office and the credibility of the transaction for each candidate notary office, so as to obtain the weighted credibility.
[0208] The third determination submodule is used to determine the target notary office whose weighted credibility meets the threshold condition from the multiple candidate notary offices.
[0209] Optionally, the device further includes:
[0210] The third calculation module is used to calculate the first weight value of each candidate notary office for each candidate notary office before the first calculation submodule calculates the weighted value of the credibility of the candidate notary office and the credibility of the transaction. This is done based on the number of target historical cross-chain transactions in which the candidate notary office participates and the measurement parameters of each target historical cross-chain transaction.
[0211] The fourth calculation module is used to calculate the product of the first weight value of each candidate notary office and the transaction credibility for each candidate notary office, so as to obtain the first calculated value.
[0212] The credibility update module is used to update the transaction credibility of the candidate notary office to the first calculated value.
[0213] Optionally, the second computing module includes:
[0214] The third update submodule is used to update the transaction credibility of each node in the transaction association based on the hub value of the first target node that initiated the transaction to that node.
[0215] The fourth update submodule is used to update the hub value of each node in the transaction association based on the transaction credibility of the receiving node of the transaction initiated by that node.
[0216] Optionally, the device further includes:
[0217] The third determining module is used to determine, for each of the second transaction participants, the number of historical cross-chain transactions in which the second transaction participant has participated, and to obtain a second calculated value; and,
[0218] The fifth calculation module is used to calculate the ratio of the second calculated value to the total number of historical cross-chain transactions, and obtain the second weight value of the second transaction participant;
[0219] The third update submodule includes:
[0220] The first calculation subunit is used to perform weighted calculation of the hub value and the second weight value of each first target node;
[0221] The first update subunit is used to update the transaction credibility of the node in the transaction association based on the weighted calculation result.
[0222] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0223] This disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the blockchain cross-chain method provided in this disclosure.
[0224] This disclosure also provides an electronic device, including:
[0225] A memory on which computer programs are stored;
[0226] A processor for executing the computer program in the memory to implement the steps of the blockchain cross-chain method provided in this disclosure.
[0227] Figure 10 This is a block diagram illustrating an electronic device 1000 according to an exemplary embodiment. For example... Figure 10 As shown, the electronic device 1000 may include: a processor 1001 and a memory 1002. The electronic device 1000 may also include one or more of a multimedia component 1003, an input / output (I / O) interface 1004, and a communication component 1005.
[0228] The processor 1001 controls the overall operation of the electronic device 1000 to complete all or part of the steps in the aforementioned blockchain cross-chain method. The memory 1002 stores various types of data to support the operation of the electronic device 1000. This data may include, for example, instructions for any application or method operating on the electronic device 1000, and application-related data such as contact data, sent and received messages, images, audio, video, etc. The memory 1002 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, disk, or optical disk. Multimedia component 1003 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 1002 or transmitted via communication component 1005. The audio component also includes at least one speaker for outputting audio signals. I / O interface 1004 provides an interface between processor 1001 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 1005 is used for wired or wireless communication between the electronic device 1000 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 1005 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0229] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the aforementioned blockchain cross-chain method.
[0230] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the blockchain cross-chain method described above. For example, the computer-readable storage medium may be the memory 1002 including the program instructions described above, which may be executed by the processor 1001 of the electronic device 1000 to complete the blockchain cross-chain method described above.
[0231] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the above-described blockchain cross-chain method when executed by the programmable device.
[0232] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0233] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0234] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A blockchain cross-chain method, characterized in that, include: In response to cross-chain transaction requests, multiple candidate notary offices are obtained; Establish trust relationships between the multiple candidate notary offices and the multiple first transaction participants; The credibility of each candidate notary office is calculated based on the trust association relationship; Based on the credibility of each candidate notary office, a target notary office is determined from the plurality of candidate notary offices, and the target notary office is used to execute the cross-chain transaction associated with the cross-chain transaction request; The step of calculating the credibility of each candidate notary office through the trust association includes: For each node in the trust relationship, update the node's trustworthiness based on the hub value of other nodes that trust that node; For each node in the trust relationship, update the hub value of that node based on the trustworthiness of other nodes trusted by that node; The candidate notary terminals are authenticated by an identity verification terminal, which is determined by a cross-chain member set. This cross-chain member set includes at least some members of each blockchain network participating in the cross-chain process. The process of constructing trust relationships between the multiple candidate notary terminals and the multiple first transaction participants includes: For each candidate notary office, determine one or more authentication terminals that are trusted for that candidate notary office; For each authentication endpoint, identify one or more first transaction participants who trust that authentication endpoint; The trust relationship is established based on the trust relationship between the candidate notary and the identity verification end, and the trust relationship between the identity verification end and the first transaction participant.
2. The method according to claim 1, characterized in that, The method is applied to cross-chain participating nodes, and the method further includes: Send an authentication request to the target notary office; The system receives a digital identity credential sent by the target notary office. The digital identity credential is issued by an identity verification terminal associated with the target notary office. After issuing the digital identity credential, the identity verification terminal saves the digital identity credential to the blockchain of the digital identity blockchain network. Access the digital identity blockchain network to verify the digital identity credential; If the verification is successful, the cross-chain transaction is executed through the target notary terminal.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Obtain historical cross-chain transaction data from the multiple candidate notary offices; Multiple second transaction participants were identified based on the aforementioned historical cross-chain transaction data; Establish transaction association relationships between the multiple candidate notary offices and the multiple second transaction participants; The transaction credibility of each candidate notary office is calculated based on the transaction relationship. The step of determining the target notary office from the plurality of candidate notary offices based on the credibility of each candidate notary office includes: For each candidate notary office, a weighted value is calculated between the credibility of the candidate notary office and the credibility of the transaction to obtain a weighted credibility. From the multiple candidate notary offices, a target notary office whose weighted credibility meets the threshold condition is determined.
4. The method according to claim 3, characterized in that, Before calculating the weighted value of the credibility of the candidate notary office and the credibility of the transaction, the method further includes: For each candidate notary terminal, a first weight value is calculated based on the number of target historical cross-chain transactions in which the candidate notary terminal participates and the measurement parameters of each target historical cross-chain transaction. For each candidate notary office, the first weight value of the candidate notary office and the transaction credibility are calculated to obtain the first calculated value. Update the transaction credibility of the candidate notary office to the first calculated value.
5. The method according to claim 3, characterized in that, The calculation of the transaction credibility of each candidate notary office based on the transaction relationship includes: For each node in the transaction association, the transaction credibility of that node is updated based on the hub value of the first target node that initiated the transaction to that node; For each node in the transaction association, the hub value of that node is updated based on the transaction credibility of the receiving node of the transaction initiated by that node.
6. The method according to claim 5, characterized in that, The method further includes: For each of the second transaction participants, determine the number of historical cross-chain transactions in which the second transaction participant has participated to obtain a second calculated value; and calculate the ratio of the second calculated value to the total number of historical cross-chain transactions to obtain the second weight value of the second transaction participant. For each node in the transaction association, updating the transaction credibility of that node based on the hub value of the first target node that initiated the transaction to that node includes: The hub value and the second weight value of each first target node are weighted and calculated. The transaction credibility of the nodes in the transaction association is updated based on the weighted calculation results.
7. A blockchain cross-chain device, characterized in that, include: The first acquisition module is used to acquire multiple candidate notary offices in response to cross-chain transaction requests; The trust relationship building module is used to build trust relationships between the multiple candidate notary offices and the multiple first transaction participants. The first calculation module is used to calculate the credibility of each candidate notary office through the trust association relationship; The first determining module is used to determine a target notary office from the plurality of candidate notary offices based on the credibility of each candidate notary office, wherein the target notary office is used to execute the cross-chain transaction associated with the cross-chain transaction request; The first computing module includes: The first update submodule is used to update the trustworthiness of each node in the trust relationship based on the hub value of other nodes that trust the node. The second update submodule is used to update the hub value of each node in the trust relationship based on the trustworthiness of other nodes trusted by that node. The candidate notary is authenticated by an identity verification terminal, which is determined by a cross-chain member set. This cross-chain member set includes at least some members of each blockchain network participating in the cross-chain process. The trust relationship building module includes: The first determining submodule is used to determine one or more authentication terminals that are trusted for each of the candidate notary terminals. The second determining submodule is used to determine, for each of the authentication terminals, one or more first transaction participants who trust the authentication terminal; The first construction submodule is used to establish the trust association relationship based on the trust relationship between the candidate notary and the identity verification end, and the trust relationship between the identity verification end and the first transaction participant.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-6.
9. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-6.