Cross-chain method, device, storage medium and program product of electronic bill of lading based on blockchain
By introducing a blockchain-based electronic bill of lading cross-chain method in cross-chain communication, and using a trusted execution environment cluster for data authentication and transmission, the security and integrity problems brought about by centralized nodes in traditional cross-chain communication are solved, and higher security and reliability are achieved.
Patent Information
- Application Number
- CN202411715275.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-04
AI Technical Summary
Traditional cross-chain communication relies on centralized nodes, which makes it difficult to ensure the security and integrity of communications. Especially when nodes are attacked or broken, it is difficult to ensure the authenticity and accuracy of cross-chain communications.
The electronic bill of lading cross-chain method based on blockchain is adopted, and the electronic bill of lading data sent by the original blockchain side is received through the cross-chain relay server, and the message voucher is requested from the trusted execution environment cluster to perform data correctness authentication. If the authentication is passed, the message voucher is generated and the data is sent to the target blockchain side.
Through the decentralized trusted execution environment cluster architecture, the risk of attacks or failures of centralized nodes is avoided, and the security and reliability of cross-chain communication is improved.
Smart Images

Figure CN119766483A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based electronic bill of lading cross-chain method, device, storage medium and program product. Background Art
[0002] Traditional cross-chain communication relies on centralized third-party service intermediaries or notary nodes to perform functions such as information transfer and data verification. However, these nodes are often controlled by specific organizations or individuals. Once these nodes are attacked maliciously or have technical failures, the integrity and security of cross-chain communication will be affected. And because the data and information of cross-chain communication are transferred and verified by centralized nodes, these nodes become "black boxes" in the cross-chain communication process. When cross-chain communication involves cross-chain state transfer and settlement between different chain systems, external users cannot directly observe and verify the internal processing process and results of these nodes, making it difficult to ensure the authenticity and accuracy of cross-chain communication, resulting in low security of cross-chain communication.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of this application is to provide a blockchain-based electronic bill of lading cross-chain method, device, storage medium and program product, aiming to solve the technical problem of how to improve the security of cross-chain communication.
[0005] To achieve the above objectives, this application proposes a cross-chain method for electronic bills of lading based on blockchain, the method comprising: Receive the electronic bill of lading data sent by the original blockchain side through the cross-chain relay server, and request the message certificate of the electronic bill of lading data from the trusted execution environment cluster; Authenticating the correctness of the electronic bill of lading data through the trusted execution environment cluster; If the authentication is successful, the message credential is sent to the cross-chain relay server through the trusted execution environment cluster; Based on the message credential, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server.
[0006] In one embodiment, the step of authenticating the correctness of the electronic bill of lading data through the trusted execution environment cluster includes: Obtaining transaction data on the original blockchain side through a service tracking block; Determining whether the transaction data includes the electronic bill of lading data based on a preset data verification mechanism; If the transaction data includes the electronic bill of lading data, the correctness of the electronic bill of lading data is authenticated.
[0007] In one embodiment, the step of sending the electronic bill of lading data to the target blockchain side through the cross-chain relay server based on the message credential includes: Send the message certificate to the original blockchain side through the cross-chain relay server; Performing message verification on the message certificate through the cross-chain bridge contract on the original blockchain side; If the message verification is successful, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server.
[0008] In one embodiment, the step of verifying the message credential through the cross-chain bridge contract on the original blockchain side includes: Obtain the message certificate recorded in the management contract on the original blockchain side through the cross-chain bridge contract on the original blockchain side; Through the cross-chain bridge contract on the original blockchain side, the message certificate received from the cross-chain relay server is compared and verified with the message certificate recorded in the management contract to obtain a message verification result.
[0009] In one embodiment, the method further comprises: Sending electronic bill of lading supplementary data and a supplementary certificate for the electronic bill of lading supplementary data to the cross-chain relay server through the trusted execution environment cluster; Based on the supplementary certificate, the electronic bill of lading supplementary data is sent to the target blockchain side through the cross-chain relay server.
[0010] In one embodiment, the step of sending the electronic bill of lading supplementary data to the target blockchain side through the cross-chain relay server based on the supplementary certificate includes: Sending the supplementary certificate to the target blockchain side through the cross-chain relay server; Performing additional verification on the supplementary certificate through the cross-chain bridge contract on the target blockchain side; If the supplementary verification passes, the electronic bill of lading supplementary data is sent to the target blockchain side through the cross-chain relay server.
[0011] In one embodiment, the step of performing supplementary verification on the supplementary credential through the cross-chain bridge contract on the target blockchain side includes: Obtaining the supplementary certificate recorded in the management contract on the target blockchain side through the cross-chain bridge contract on the target blockchain side; Through the cross-chain bridge contract on the target blockchain side, the supplementary certificate received from the cross-chain relay server is compared and verified with the supplementary certificate recorded in the management contract to obtain a supplementary verification result.
[0012] In addition, to achieve the above-mentioned objectives, the present application also proposes a blockchain-based electronic bill of lading cross-chain device, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the blockchain-based electronic bill of lading cross-chain method as described above.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the cross-chain method of electronic bill of lading based on blockchain are implemented as described above.
[0014] In addition, to achieve the above-mentioned objectives, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the blockchain-based electronic bill of lading cross-chain method as described above.
[0015] The present application provides a cross-chain method for electronic bills of lading based on blockchain, which receives the electronic bill of lading data sent by the original blockchain side through the cross-chain relay server, and requests the message certificate of the electronic bill of lading data from the trusted execution environment cluster, and then authenticates the correctness of the electronic bill of lading data through the trusted execution environment cluster. If the authentication is successful, the message certificate is sent to the cross-chain relay server through the trusted execution environment cluster, and based on the message certificate, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server. The above method adopts a decentralized trusted execution environment cluster architecture to avoid the cross-chain communication risks caused by attacks or failures of centralized nodes, and at the same time, the correctness of the electronic bill of lading data is authenticated through the trusted execution environment cluster, thereby improving the security of cross-chain communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1A flowchart diagram of the first embodiment of the cross-chain method for electronic bill of lading based on blockchain in this application; Figure 2 A flow chart of the second embodiment of the cross-chain method for electronic bill of lading based on blockchain provided in this application; Figure 3 A flowchart diagram of the third embodiment of the cross-chain method for electronic bill of lading based on blockchain in this application; Figure 4 A schematic diagram of the method flow provided for Embodiment 3 of the cross-chain method for electronic bill of lading based on blockchain in this application; Figure 5 A flowchart diagram of the fourth embodiment of the cross-chain method for electronic bill of lading based on blockchain in this application; Figure 6 A schematic diagram of the first method flow provided for Embodiment 4 of the cross-chain method for electronic bill of lading based on blockchain in this application; Figure 7 A schematic diagram of the second method flow provided for Embodiment 4 of the cross-chain method for electronic bill of lading based on blockchain of this application; Figure 8 This is a schematic diagram of the architecture of the electronic bill of lading cross-chain system involved in the blockchain-based electronic bill of lading cross-chain method in the embodiment of the present application; Fig. 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the blockchain-based electronic bill of lading cross-chain method in the embodiment of the present application.
[0019] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0021] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0022] Traditional cross-chain communication relies on centralized third-party service intermediaries or notary nodes to perform functions such as information transfer and data verification. However, these nodes are often controlled by specific organizations or individuals. Once these nodes are attacked maliciously or have technical failures, the integrity and security of cross-chain communication will be affected. And because the data and information of cross-chain communication are transferred and verified by centralized nodes, these nodes become "black boxes" in the cross-chain communication process. When cross-chain communication involves cross-chain state transfer and settlement between different chain systems, external users cannot directly observe and verify the internal processing process and results of these nodes, making it difficult to ensure the authenticity and accuracy of cross-chain communication, resulting in low security of cross-chain communication.
[0023] In view of the above problems, this application proposes a cross-chain method for electronic bills of lading based on blockchain, which receives the electronic bill of lading data sent by the original blockchain side through the cross-chain relay server, and requests the message certificate of the electronic bill of lading data from the trusted execution environment cluster, and then authenticates the correctness of the electronic bill of lading data through the trusted execution environment cluster. If the authentication is successful, the message certificate is sent to the cross-chain relay server through the trusted execution environment cluster, and based on the message certificate, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server. The above method adopts a decentralized trusted execution environment cluster architecture to avoid the cross-chain communication risks caused by attacks or failures of centralized nodes, and at the same time, the correctness of the electronic bill of lading data is authenticated through the trusted execution environment cluster, thereby improving the security of cross-chain communication.
[0024] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the electronic bill of lading cross-chain system as an example to illustrate this embodiment and the following embodiments.
[0025] Based on this, the first embodiment proposed in this application provides a cross-chain method for electronic bills of lading based on blockchain, referring to Figure 1 In this embodiment, the blockchain-based electronic bill of lading cross-chain method includes steps S10 to S40: Step S10, receiving the electronic bill of lading data sent by the original blockchain side through the cross-chain relay server, and requesting the message certificate of the electronic bill of lading data from the trusted execution environment cluster.
[0026] It should be noted that the chain relay server is a transit station connecting different blockchain networks. It is responsible for transmitting data and information between different blockchains, realizing cross-chain communication, supervising cross-chain bridge contracts on each chain, monitoring cross-chain events issued by cross-chain bridge contracts, checking cross-chain events and forwarding them to the cross-chain bridge contract of the target chain. Electronic bill of lading is an electronic cargo transportation certificate built using blockchain technology. It records the entire transportation information of the cargo in the form of electronic data, covering all transportation details from the origin to the destination, including cargo type, quantity, relevant party information, transportation terms, etc., and is real-time and efficient. It is suitable for multiple modes of transportation such as sea, air, and rail transportation. It is used to prove the ownership and control of the cargo and can be transferred electronically. Trusted Execution Environment (TEE) cluster is a secure environment that combines hardware and software to ensure that sensitive data is not leaked or tampered with during the calculation process. TEE cluster is a collection of multiple TEE nodes that can provide a higher degree of reliability and processing power.
[0027] The original blockchain, such as Ethereum, sends the electronic bill of lading data to the cross-chain relay server through specific cross-chain protocols such as Cosmos IBC, Wormhole, etc. The cross-chain relay server receives and parses the electronic bill of lading data, confirms the integrity and source of the electronic bill of lading data, and then initiates a request to the TEE cluster to generate a message certificate for the electronic bill of lading data. A message certificate is a cryptographic proof used to confirm the existence of data and that it has not been tampered with.
[0028] Optionally, the original blockchain side may use Advanced Encryption Standard or Elliptic Curve Cryptography to encrypt the electronic bill of lading data when transmitting the electronic bill of lading data to ensure the security of the data during transmission.
[0029] Optionally, the message credential can be a digital signature, that is, the electronic bill of lading data is signed using the private key on the blockchain side to generate a unique digital signature. The recipient can use the corresponding public key to verify the authenticity of the signature, thereby confirming the source and integrity of the electronic bill of lading data.
[0030] Optionally, a fixed hash value can be generated as a message credential by performing a hash operation on the electronic bill of lading data. Due to the characteristics of the hash function, even if the electronic bill of lading data changes slightly, its hash value will change significantly. Therefore, by comparing the hash value, it can be verified whether the electronic bill of lading data has been tampered with.
[0031] Optionally, the message credential may also include a timestamp of the electronic bill of lading data, which is used to record the time point when the electronic bill of lading data is generated or transmitted, so as to prevent the data from being reused or the time information from being tampered with.
[0032] Step S20: authenticating the correctness of the electronic bill of lading data through the trusted execution environment cluster.
[0033] The TEE cluster can receive the electronic bill of lading data and its related metadata sent by the cross-chain relay server, including a brief description of the electronic bill of lading data, its source, format, version number, etc. Through the metadata, the TEE cluster can understand the structure, content and source of the data, thereby performing more effective verification and processing.
[0034] In the TEE cluster, preset algorithms and rules such as hash verification and digital signature verification are used to authenticate the correctness of electronic bill of lading data to ensure that the data has not been tampered with and complies with business logic.
[0035] Optionally, after receiving the electronic bill of lading data sent by the cross-chain relay server, the TEE cluster calculates the hash value of the received electronic bill of lading data and compares it with the original hash value; or checks whether the digital signature on the electronic bill of lading is valid and whether the identity of the signer is legal, and further verifies the electronic bill of lading one by one according to business rules such as the validity period and transfer conditions of the bill of lading.
[0036] Step S30: If the authentication is successful, the message certificate is sent to the cross-chain relay server through the trusted execution environment cluster.
[0037] If the electronic bill of lading data passes the authentication of the TEE cluster, the TEE cluster will generate a message certificate, which includes the summary of the electronic bill of lading data, the authentication result and the signature of the TEE. The EE cluster will send the message certificate back to the cross-chain relay server as evidence that the electronic bill of lading data has been correctly authenticated. At the same time, a copy of the message certificate will be retained in the TEE cluster for subsequent audits or inquiries.
[0038] Step S40: Based on the message certificate, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server.
[0039] After receiving the message certificate sent by the TEE cluster, the cross-chain relay server parses and verifies the validity of the certificate. If the message certificate is valid, the cross-chain relay server sends the electronic bill of lading data and its related metadata to the target blockchain through the cross-chain protocol. The target blockchain receives and processes this data, records it on the blockchain, and completes the cross-chain transmission.
[0040] Exemplarily, the cross-chain relay server will first encapsulate the received electronic bill of lading data, including converting the data into a specific format, adding necessary metadata such as timestamps, hash values, etc., and encrypting it. According to the characteristics and requirements of the target blockchain, the cross-chain relay server will select the most appropriate cross-chain communication protocol and routing path to establish a stable communication connection with the target blockchain side. For example, when the target blockchain has specific data formats and rule requirements, such as transaction formats, metadata requirements, etc., the cross-chain relay server needs to select a cross-chain communication protocol that can support these formats and rules to ensure the correct storage and processing of the electronic bill of lading data on the target blockchain. After the connection is established, the cross-chain relay server sends the encapsulated electronic bill of lading data to the target blockchain side through the selected cross-chain protocol and routing path.
[0041] Optionally, before sending the electronic bill of lading data to the target blockchain side, the electronic bill of lading data can be format converted and encoded according to the requirements of the target blockchain to improve the efficiency and reliability of cross-chain transmission and reduce risks during the transmission process.
[0042] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 2 , step S20 includes steps S21 to S23: Step S21, obtaining the transaction data on the original blockchain side through the service tracking block.
[0043] It should be noted that the service tracking block is a specific block or data structure in the TEE cluster, which is used to record transaction information related to cross-chain transmission in the blockchain network. The service tracking block can be a dedicated log block or an index structure containing cross-chain transaction information, which can record all cross-chain transactions issued from the original blockchain side. Cross-chain transaction information includes the initiator, recipient, transaction content such as electronic bill of lading data, transaction timestamp, etc. of the cross-chain transaction, ensuring the traceability of cross-chain transactions.
[0044] The cross-chain relay server first queries the service tracking block to obtain all relevant cross-chain transaction records, and finds the specific transaction containing the electronic bill of lading data by matching the transaction identifier or other unique identifier.
[0045] Exemplarily, the service tracking block can establish a connection with the original blockchain side through a light node to obtain the transaction data of the original blockchain side. Among them, the light node does not store the complete blockchain data, but obtains the required information by interacting with the full node (that is, the node that stores the complete blockchain data), which can reduce resource consumption. In the TEE cluster, configure the relevant parameters of the light node, such as the network address, port number, blockchain network type, etc. The light node establishes a connection with the full node in the original blockchain network through the network and sends a transaction data request to the full node. The full node in the original blockchain network will return the corresponding transaction data according to the request of the light node.
[0046] Optionally, the cross-chain relay service can interact with the service tracking block through specific interfaces such as RPC (Remote Procedure Call) interfaces. These specific interfaces can provide the functions of querying, submitting and verifying cross-chain transactions. The cross-chain relay service uses these interfaces to query the cross-chain transaction records recorded in the service tracking block to find the original blockchain side corresponding to the electronic bill of lading data and obtain the transaction data on the original blockchain side.
[0047] Optionally, the service tracking block can also exist in the form of a database, allowing the cross-chain relay service to directly access its data. The cross-chain relay service can use SQL (Structured Query Language) or other database query languages to retrieve the required cross-chain transaction records.
[0048] Optionally, when the service tracking block stores cross-chain transaction information in the form of log files, the cross-chain relay service can read and parse these log files to extract the cross-chain transaction information.
[0049] Step S22: determining whether the transaction data includes the electronic bill of lading data based on a preset data verification mechanism.
[0050] Step S23: If the transaction data includes the electronic bill of lading data, the correctness of the electronic bill of lading data is authenticated.
[0051] It should be noted that the data verification mechanism is a set of predefined rules and algorithms used to verify the authenticity, integrity and compliance of transaction data. Optionally, the data verification mechanism includes hash value matching, digital signature verification, transaction format checking, etc.
[0052] For example, assume that a digital signature data verification mechanism is used for verification. A digital signature allows the sender of a message to sign its message, and the receiver can use the sender's public key to verify the authenticity of the signature. The digital signature verification process includes the following key steps: First, the sender uses its private key to encrypt the message, i.e., the electronic bill of lading data, to generate a digital signature. Then, the sender attaches the digital signature to the message and sends it to the receiver. Finally, the receiver uses the sender's public key to decrypt the digital signature and compare it with the original message, i.e., the transaction data, to verify the authenticity of the signature.
[0053] To better understand the solution provided in this example, this example is further explained in combination with specific application scenarios.
[0054] First, the TEE cluster extracts the digital signature attached to the original blockchain from the received electronic bill of lading data. The digital signature is obtained by encrypting the electronic bill of lading data using the private key on the original blockchain. The TEE cluster decrypts the extracted digital signature using the public key and compares the decrypted electronic bill of lading data with the transaction data on the original blockchain. If the transaction data contains the electronic bill of lading data, it means that the digital signature is authentic, the transaction data comes from a legitimate sender, and has not been tampered with.
[0055] Based on the above embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction, and will not be described in detail later. Figure 3 , step S40 includes steps S41 to S43: Step S41, sending the message certificate to the original blockchain side through the cross-chain relay server.
[0056] The cross-chain relay server receives the message certificate from the TEE cluster and sends it to the original blockchain through a specific cross-chain communication protocol. After receiving the message certificate, the original blockchain prepares for the next step of message verification.
[0057] Step S42, verifying the message certificate through the cross-chain bridge contract on the original blockchain side.
[0058] It should be noted that the cross-chain bridge contract is the submission entry for cross-chain transactions, which can be connected with the management contract on the original blockchain side to verify the message credentials.
[0059] In one possible implementation, refer to Figure 4 , step S42 also includes steps S421~S422: Step S421, obtaining the message certificate recorded in the management contract on the original blockchain side through the cross-chain bridge contract on the original blockchain side.
[0060] It should be noted that the management contract is used in the blockchain to register and maintain the Internet Protocol address, public key address, hardware verification code of the specific TEE service in the TEE cluster, hardware serial number and other information used by the cross-chain relay server, so as to facilitate other contracts to read the relevant information of the TEE cluster in the management contract and ensure the validity of the external TEE service.
[0061] Exemplarily, the cross-chain bridge contract interacts with the management contract of the original blockchain, and obtains the message credential of the corresponding TEE cluster recorded therein by calling the interface or function of the management contract, where the message credential can be the Internet Protocol address, public key address, digital signature, etc. of the corresponding TEE cluster service.
[0062] Step S422: Through the cross-chain bridge contract on the original blockchain side, the message certificate received from the cross-chain relay server is compared and verified with the message certificate recorded in the management contract to obtain a message verification result.
[0063] The cross-chain bridge contract receives the message certificate transmitted by the cross-chain relay server and compares it with the message certificate obtained from the management contract. If the comparison results are consistent, the message verification is passed, indicating that the electronic bill of lading data corresponding to the message certificate has been effectively authenticated by the external TEE service. If they are inconsistent, the verification fails and the relevant cross-chain transactions or operations are deemed invalid.
[0064] In this embodiment, the cross-chain bridge contract compares and verifies the received message credentials with the message credentials recorded in the management contract in the blockchain, which can ensure the authenticity and integrity of the message credentials during the cross-chain process and provide reliable security protection for cross-chain operations.
[0065] Step S43: If the message verification is passed, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server.
[0066] Exemplarily, the cross-chain relay server receives the confirmation signal of the cross-chain bridge contract on the original blockchain side, packages the electronic bill of lading data into a specific format or protocol, and sends the electronic bill of lading data to the target blockchain side through a specific cross-chain communication protocol.
[0067] Based on the above embodiments of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction, and will not be described in detail later. Figure 5 The blockchain-based electronic bill of lading cross-chain method further includes steps S50 to S60: Step S50, sending the electronic bill of lading supplementary data and the supplementary certificate of the electronic bill of lading supplementary data to the cross-chain relay server through the trusted execution environment cluster.
[0068] It should be noted that the supplementary data of the electronic bill of lading refers to the information that supplements or modifies the original electronic bill of lading, which may include new cargo information, consignee information, transportation conditions, etc. The supplementary certificate refers to the certificate that proves the authenticity and integrity of the supplementary data of the electronic bill of lading, which can exist in the form of digital signature, hash value or other encrypted form.
[0069] For example, in the TEE cluster, the trade docking block can interact with other trade business data systems, obtain the electronic bill of lading supplementary data from the trade business data system, and encrypt or sign the electronic bill of lading supplementary data to generate supplementary certificates. The electronic bill of lading supplementary data and supplementary certificates are sent to the cross-chain relay server through the communication channel of the TEE cluster. Step S60: Based on the supplementary certificate, the electronic bill of lading supplementary data is sent to the target blockchain side through the cross-chain relay server.
[0070] After receiving the supplementary data and supplementary voucher of the electronic bill of lading, the cross-chain relay server first verifies the authenticity of the supplementary voucher. If the verification is successful, the cross-chain relay server converts the supplementary data of the electronic bill of lading into a format recognizable by the target blockchain side. The cross-chain relay server sends the converted supplementary data of the electronic bill of lading to the target blockchain side through a cross-chain bridge contract or other mechanisms. After receiving the data, the target blockchain side processes it according to its own consensus mechanism and smart contract logic.
[0071] In one possible implementation, refer to Figure 6 , step S60 includes steps S61 to S63: Step S61, sending the supplementary certificate to the target blockchain side through the cross-chain relay server.
[0072] After receiving the supplementary certificate, the cross-chain relay server securely transmits the supplementary certificate to the target blockchain through its internal mechanisms such as cross-chain protocol, bridging technology, etc. In this process, the cross-chain relay server can convert the format or encrypt the supplementary certificate to ensure its security and compatibility during transmission.
[0073] Step S62, performing supplementary verification on the supplementary certificate through the cross-chain bridge contract on the target blockchain side.
[0074] After receiving the supplementary certificate, the cross-chain bridge contract on the target blockchain side verifies the supplementary certificate according to verification rules such as digital signature verification and hash value comparison.
[0075] Optionally, refer to Figure 7 , step S62 includes steps S621-S622: Step S621, obtaining the supplementary certificate recorded in the management contract on the target blockchain side through the cross-chain bridge contract on the target blockchain side.
[0076] On the target blockchain, there is a management contract dedicated to recording supplementary credentials. When the supplementary credentials need to be verified, the cross-chain bridge contract will first interact with the management contract on the target blockchain to obtain the supplementary credential information recorded therein. This information may include the hash value, digital signature or other unique identifier of the supplementary credential.
[0077] Step S622: Through the cross-chain bridge contract on the target blockchain side, the supplementary certificate received from the cross-chain relay server is compared and verified with the supplementary certificate recorded in the management contract to obtain a supplementary verification result.
[0078] After obtaining the supplementary certificate recorded in the management contract, the cross-chain bridge contract will compare it with the supplementary certificate received from the cross-chain relay server. The comparison may include the hash value, digital signature or other unique identifier of the supplementary certificate. If the two are completely matched, it means that the received supplementary certificate is authentic and valid; otherwise, it may be forged or tampered with.
[0079] Step S63: If the supplementary verification is passed, the electronic bill of lading supplementary data is sent to the target blockchain side through the cross-chain relay server.
[0080] If the supplementary verification of the supplementary voucher passes, the cross-chain relay server transmits the received electronic bill of lading supplementary data to the target blockchain side in an appropriate format and encrypted manner. Optionally, after the supplementary verification passes, the cross-chain relay server transmits the electronic bill of lading supplementary data together with the electronic bill of lading data to the target blockchain side. When the cross-chain relay server receives multiple electronic bill of lading supplementary data, the multiple electronic bill of lading supplementary data can be packaged into a batch and then transmitted to the target blockchain side at one time after the supplementary verification passes.
[0081] In this embodiment, through the transmission of the cross-chain relay server, the verification of the cross-chain bridge contract on the target blockchain side, and the final transmission of the electronic bill of lading supplementary data, the security and integrity of the electronic bill of lading supplementary data during the cross-chain transmission process can be ensured, thereby improving the efficiency and reliability of cross-chain operations.
[0082] For example, in order to help understand the implementation process of the cross-chain method for electronic bill of lading based on blockchain obtained by combining this embodiment with the above embodiments, please refer to Figure 8 , Figure 8 A schematic diagram of the architecture of an electronic bill of lading cross-chain system is provided, specifically: The source chain and the target chain contain a universal electronic bill of lading asset processor, which interacts with other electronic bill of lading contracts to manage assets related to electronic bills of lading, such as asset registration, locking, release, casting and destruction of mapped assets, etc. The cross-chain bridge contract in the source chain and the target chain serves as the submission entry for cross-chain transactions, manages the identity of the cross-chain relay, the submission information of the cross-chain transaction, and connects with the TEE management contract to verify the TEE verification credentials of the cross-chain message. The TEE management contract interacts with the cross-chain bridge contract to assist in verifying and managing TEE-related cross-chain operations.
[0083] The TEE management service module is responsible for managing and maintaining the TEE cluster, including the "TEE remote authentication module" for authenticating the TEE process, the "TEE device management" for managing the status and configuration of the TEE device, and the "TEE interface communication" for providing an interface for TEE to communicate with external systems.
[0084] The TEE cluster contains multiple TEE service instances, each of which is responsible for tracking different blockchain ledger data or interacting with the shipping trade data system. Among them, the chain A, chain B, and chain C tracking modules are responsible for tracking the electronic bill of lading data on chain A, chain B, and chain C respectively.
[0085] The cross-chain relay server is responsible for monitoring the cross-chain bridge contracts on each chain, monitoring the cross-chain events issued by the cross-chain bridge contract through the multi-chain interface, checking the cross-chain events and forwarding them to the cross-chain bridge contract of the target chain. Before forwarding the cross-chain message, the cross-chain relay server can pass the cross-chain message to the TEE cluster through the TEE management service, request the TEE cluster to verify the correctness of the cross-chain message, and return the certificate of the cross-chain message.
[0086] Assuming that a shipping trade user initiates a cross-chain request through the electronic bill of lading cross-chain system, the shipping trade user first needs to log in to the user chain with an on-chain account. After logging in, the user can initiate a cross-chain operation to the original chain through the electronic bill of lading server authorization system. The cross-chain relay server obtains the electronic bill of lading data from the original chain, and sends the electronic bill of lading data to the TEE cluster through the TEE management server. The TEE cluster verifies the electronic bill of lading data and returns the message certificate. The cross-chain relay server receives the message certificate returned by the TEE cluster through the TEE verification certificate receiving module, and sends the message certificate to the cross-chain bridge contract of the original chain. The regulatory approval module in the cross-chain bridge contract of the original chain verifies the message certificate returned by the TEE cluster according to the message certificate recorded in the TEE management contract. At the same time, the TEE cluster interacts with the shipping trade business data system through the shipping trade system docking module, obtains the electronic bill of lading supplementary data, and generates a supplementary certificate for the electronic bill of lading supplementary data. The cross-chain relay server receives the electronic bill of lading supplementary data and supplementary voucher returned by the TEE cluster through the TEE business injection data receiving module, and sends the message voucher to the cross-chain bridge contract of the target chain. The regulatory approval module in the cross-chain bridge contract of the target chain verifies the supplementary voucher returned by the TEE cluster according to the supplementary voucher recorded in the TEE management contract. If the verification is successful, the cross-chain relay server sends the electronic bill of lading data and the electronic bill of lading supplementary data to the target chain to complete the cross-chain communication.
[0087] Users can perform subsequent operations on the cross-chain electronic bill of lading through the electronic bill of lading service. Among them, the electronic bill of lading service module includes a cross-chain transaction assembly module, which is used to assemble and package relevant data and information according to specific rules and formats when transmitting electronic bill of lading data between different blockchain networks; it also includes a task information display module, which is used to display the task progress and status information of the electronic bill of lading transaction to the relevant parties in the electronic bill of lading service.
[0088] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the cross-chain method of electronic bill of lading based on blockchain in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0089] The present application provides a blockchain-based electronic bill of lading cross-chain device, and the blockchain-based electronic bill of lading cross-chain device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the blockchain-based electronic bill of lading cross-chain method in the above-mentioned embodiment one.
[0090] Reference below Fig. 9 , which shows a schematic diagram of the structure of a cross-chain device for electronic bills of lading based on blockchain suitable for implementing the embodiment of the present application. The cross-chain device for electronic bills of lading based on blockchain in the embodiment of the present application may include but is not limited to mobile terminals such as laptops, PADs (Portable Application Description: tablet computers), etc., and fixed terminals such as desktop computers. Fig. 9 The blockchain-based electronic bill of lading cross-chain device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present application.
[0091] like Fig. 9 As shown, the cross-chain device of the electronic bill of lading based on blockchain may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the cross-chain device of the electronic bill of lading based on blockchain are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the blockchain-based electronic bill of lading cross-chain device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a blockchain-based electronic bill of lading cross-chain device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided alternatively.
[0092] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0093] The cross-chain device for electronic bills of lading based on blockchain provided by this application adopts the cross-chain method for electronic bills of lading based on blockchain in the above-mentioned embodiment, which can solve the technical problem of how to improve the security of cross-chain communication. Compared with the prior art, the beneficial effects of the cross-chain device for electronic bills of lading based on blockchain provided by this application are the same as the beneficial effects of the cross-chain method for electronic bills of lading based on blockchain provided by the above-mentioned embodiment, and the other technical features in the cross-chain device for electronic bills of lading based on blockchain are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0094] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0095] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0096] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the blockchain-based electronic bill of lading cross-chain method in the above-mentioned embodiment.
[0097] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0098] The above-mentioned computer-readable storage medium may be included in the cross-chain device of the electronic bill of lading based on blockchain; or it may exist independently without being assembled into the cross-chain device of the electronic bill of lading based on blockchain.
[0099] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the blockchain-based electronic bill of lading cross-chain device, the blockchain-based electronic bill of lading cross-chain device can be used to write computer program codes for performing the operations of the present application in one or more programming languages or a combination thereof. The programming languages include object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, or as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0101] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0102] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned cross-chain method for electronic bills of lading based on blockchain, and can solve the technical problem of how to improve the security of cross-chain communication. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the cross-chain method for electronic bills of lading based on blockchain provided in the above-mentioned embodiment, and will not be repeated here.
[0103] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned blockchain-based electronic bill of lading cross-chain method.
[0104] The computer program product provided by this application can solve the technical problem of how to improve the security of cross-chain communication. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the cross-chain method for electronic bills of lading based on blockchain provided by the above embodiment, which will not be repeated here.
[0105] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A cross-chain method for electronic bill of lading based on blockchain, characterized in that: The method comprises: Receive the electronic bill of lading data sent by the original blockchain side through the cross-chain relay server, and request the message certificate of the electronic bill of lading data from the trusted execution environment cluster; Authenticating the correctness of the electronic bill of lading data through the trusted execution environment cluster; If the authentication is successful, the message credential is sent to the cross-chain relay server through the trusted execution environment cluster; Based on the message credential, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server.
2. The cross-chain method for electronic bill of lading based on blockchain as claimed in claim 1, characterized in that: The step of authenticating the correctness of the electronic bill of lading data through the trusted execution environment cluster includes: Obtaining transaction data on the original blockchain side through a service tracking block; Determining whether the transaction data includes the electronic bill of lading data based on a preset data verification mechanism; If the transaction data includes the electronic bill of lading data, the correctness of the electronic bill of lading data is authenticated.
3. The cross-chain method for electronic bill of lading based on blockchain as claimed in claim 1, characterized in that: The step of sending the electronic bill of lading data to the target blockchain side through the cross-chain relay server based on the message certificate includes: Send the message certificate to the original blockchain side through the cross-chain relay server; Performing message verification on the message certificate through the cross-chain bridge contract on the original blockchain side; If the message verification is successful, the electronic bill of lading data is sent to the target blockchain side through the cross-chain relay server.
4. The cross-chain method for electronic bill of lading based on blockchain as claimed in claim 3, characterized in that: The step of verifying the message certificate through the cross-chain bridge contract on the original blockchain side includes: Obtain the message certificate recorded in the management contract on the original blockchain side through the cross-chain bridge contract on the original blockchain side; Through the cross-chain bridge contract on the original blockchain side, the message certificate received from the cross-chain relay server is compared and verified with the message certificate recorded in the management contract to obtain a message verification result.
5. The cross-chain method for electronic bill of lading based on blockchain as claimed in claim 1, characterized in that: The method further comprises: Sending electronic bill of lading supplementary data and a supplementary certificate for the electronic bill of lading supplementary data to the cross-chain relay server through the trusted execution environment cluster; Based on the supplementary certificate, the electronic bill of lading supplementary data is sent to the target blockchain side through the cross-chain relay server.
6. The cross-chain method for electronic bill of lading based on blockchain as claimed in claim 5, characterized in that: The step of sending the electronic bill of lading supplementary data to the target blockchain side through the cross-chain relay server based on the supplementary certificate includes: Sending the supplementary certificate to the target blockchain side through the cross-chain relay server; Performing additional verification on the supplementary certificate through the cross-chain bridge contract on the target blockchain side; If the supplementary verification passes, the electronic bill of lading supplementary data is sent to the target blockchain side through the cross-chain relay server.
7. The cross-chain method for electronic bill of lading based on blockchain as claimed in claim 6, characterized in that: The step of supplementary verification of the supplementary credential by the cross-chain bridge contract on the target blockchain side includes: Obtaining the supplementary certificate recorded in the management contract on the target blockchain side through the cross-chain bridge contract on the target blockchain side; Through the cross-chain bridge contract on the target blockchain side, the supplementary certificate received from the cross-chain relay server is compared and verified with the supplementary certificate recorded in the management contract to obtain a supplementary verification result.
8. A blockchain-based electronic bill of lading cross-chain device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the blockchain-based electronic bill of lading cross-chain method as described in any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the cross-chain method for electronic bills of lading based on blockchain are implemented as described in any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product includes a computer program, which, when executed by a processor, implements the steps of the blockchain-based electronic bill of lading cross-chain method as described in any one of claims 1 to 7.
Citation Information
Cited By
Bloom filter-based cross-border logistics document existence rapid verification method
CN122064695A