Offline synchronization method, storage method and device of letter of credit data based on blockchain

By synchronizing the letter of credit text to offline databases and using relational databases for data analysis, the problem of blockchain node resources limited and smart contracts not suitable for complex computing is solved, efficient data query and analysis is realized, and the cost and Professional knowledge requirements.

CN112905611BActive Publication Date: 2025-02-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110159706.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-05
Publication Date
2025-02-18
Estimated Expiration
2041-02-05

AI Technical Summary

Technical Problem

Blockchain node resources are limited, and smart contracts are not suitable for complex calculations, such as big data analysis, which makes it difficult for business applications to implement on-chain business data reports statistics, which are inconvenient to operate and have professional knowledge requirements for data analysts.

Method used

By synchronizing letter of credit text to offline database storage, data query and analysis are carried out using the powerful indexing model, association analysis, modeling training and parallel task capabilities of relational databases (such as MySQL).

Benefits of technology

Effectively reduce the cost of blockchain usage, improve on-chain processing efficiency, realize complex query, calculation and analysis of block data off-chain, simplify operations and reduce the requirements for professional knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112905611B_ABST
    Figure CN112905611B_ABST
Patent Text Reader

Abstract

The present invention provides a blockchain-based offline synchronization method, storage method and device for letter of credit data, which belongs to the field of blockchain. The blockchain-based offline synchronization method for letter of credit data is applied to blockchain nodes, including: consensus and on-chain storage of the acquired letter of credit text; and downlinking the letter of credit text to an off-chain database corresponding to the blockchain node. Among them, by synchronizing the letter of credit text to an offline database for storage, the relational database has a powerful index model, association analysis, modeling training, and parallel task capabilities, and can flexibly and comprehensively query and analyze data, synchronize on-chain data to an off-chain relational database, which can effectively reduce the cost of blockchain use, improve on-chain processing efficiency, and realize complex off-chain query, calculation and analysis of block data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based letter of credit data offline synchronization method, storage method and device. Background Art

[0002] In the field of international trade, letters of credit are widely used as the safest and most flexible tool. Letters of credit are an important tool for the cross-regional distribution of credit resources. They have important functions such as risk allocation, credit confirmation, and financing support. They are the basic business of commercial banks and play a vital role in domestic and foreign trade.

[0003] Blockchain technology is gaining attention and application in more and more fields with its technical characteristics of "openness and transparency", "immutability" and "traceability". With the widespread application of blockchain in letter of credit scenarios, business application parties often have the need for on-chain business data report statistics. However, blockchain node resources are limited, and smart contracts are not suitable for complex calculations, such as big data analysis. They can only export the underlying database files on the blockchain from production, and then perform data analysis and statistics. Not only is the operation inconvenient, but it also requires data analysts to have blockchain expertise. Summary of the invention

[0004] In response to the problems in the prior art, the present invention provides an offline synchronization method, storage method and device, electronic device and computer-readable storage medium for letter of credit data on the blockchain, which can at least partially solve the problems existing in the prior art.

[0005] In order to achieve the above object, the present invention adopts the following technical solution:

[0006] In a first aspect, a blockchain-based offline synchronization method for letter of credit data is provided, which is applied to a blockchain node and includes:

[0007] Consensus on the obtained letter of credit text and store it on the chain;

[0008] The letter of credit text is downloaded to the off-chain database corresponding to the blockchain node.

[0009] Furthermore, the step of transferring the letter of credit text to an off-chain database corresponding to the blockchain node includes:

[0010] The letter of credit text is transmitted to the off-chain database corresponding to the blockchain node through the message middleware.

[0011] Furthermore, after receiving the downloaded letter of credit text, the message middleware transmits the letter of credit document to the off-chain database according to the first-in-first-out rule.

[0012] Furthermore, the offline synchronization method of letter of credit data based on blockchain also includes:

[0013] Obtain the letter of credit text broadcast by the off-chain letter of credit issuance node corresponding to the blockchain node.

[0014] Furthermore, the offline synchronization method of letter of credit data based on blockchain also includes:

[0015] Obtain the text of the letter of credit broadcasted to the blockchain by other blockchain nodes on the blockchain.

[0016] In a second aspect, a blockchain-based offline synchronization device for letter of credit data is provided, which is applied to a blockchain node and includes:

[0017] The text consensus storage module is used to reach consensus on the obtained letter of credit text and store it on the chain;

[0018] The data offline synchronization module transmits the letter of credit text to the off-chain database corresponding to the blockchain node.

[0019] In a third aspect, a method for offline storage of letter of credit data based on blockchain is provided, comprising:

[0020] Obtain the letter of credit text data transmitted from the blockchain node;

[0021] The letter of credit text data is interpreted and converted into database DML operation statements;

[0022] Execute the DML operation statement to update the data storage.

[0023] In a fourth aspect, a blockchain-based offline storage device for letter of credit data is provided, comprising:

[0024] The text data acquisition module acquires the letter of credit text data transmitted by the blockchain node;

[0025] A data conversion module, which interprets the letter of credit text data and converts it into a database DML operation statement;

[0026] The data storage update module executes the DML operation statement to update the data storage.

[0027] In a fifth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the above-mentioned blockchain-based letter of credit data offline synchronization method or blockchain-based letter of credit data offline storage method are implemented.

[0028] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned blockchain-based letter of credit data offline synchronization method or blockchain-based letter of credit data offline storage method are implemented.

[0029] The blockchain-based offline synchronization method, storage method and device of letter of credit data provided by the present invention belong to the field of blockchain. The blockchain-based offline synchronization method of letter of credit data is applied to blockchain nodes, including: consensus and on-chain storage of the acquired letter of credit text; downlinking the letter of credit text to the off-chain database corresponding to the blockchain node. Among them, by synchronizing the letter of credit text to the offline database storage, the relational database (such as MySQL) has a powerful index model, association analysis, modeling training, and parallel task capabilities, and can flexibly and comprehensively query and analyze the data, synchronize the on-chain data to the off-chain relational database, which can effectively reduce the cost of blockchain use, improve the on-chain processing efficiency, and realize the complex query, calculation and analysis of block data off-chain.

[0030] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0032] Figure 1 Schematic diagram of the blockchain system architecture in an embodiment of the present invention Figure 1 ;

[0033] Figure 2 It is a structural block diagram of a letter of credit opening node in an embodiment of the present invention;

[0034] Figure 3 This is a schematic diagram of the process of the offline synchronization method of letter of credit data based on blockchain in an embodiment of the present invention. Figure 1 ;

[0035] Figure 4 Schematic diagram of the blockchain system architecture in an embodiment of the present invention Figure 2 ;

[0036] Figure 5 This is a schematic diagram of the process of the offline synchronization method of letter of credit data based on blockchain in an embodiment of the present invention. Figure 2 ;

[0037] Figure 6 This is a schematic diagram of the process of the offline synchronization method of letter of credit data based on blockchain in an embodiment of the present invention. Figure 3 ;

[0038] Figure 7 It is a flowchart of a method for offline storage of letter of credit data based on blockchain in an embodiment of the present invention;

[0039] Figure 8 A structural block diagram of a blockchain node in an embodiment of the present invention is shown;

[0040] Fig. 9 The structure block diagram of the letter of credit data query node in the embodiment of the present invention is shown;

[0041] Fig.10 A technical flow chart in an embodiment of the present invention is shown;

[0042] Fig.11 It is a structural block diagram of a blockchain-based offline synchronization device for letter of credit data in an embodiment of the present invention;

[0043] Fig.12 It is a structural block diagram of an offline storage device for letter of credit data based on blockchain in an embodiment of the present invention;

[0044] Fig.13 4 is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0046] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0047] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatuses.

[0048] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0049] With the widespread application of blockchain in letter of credit scenarios, business users often have the need for on-chain business data report statistics. However, blockchain node resources are limited, and smart contracts are not suitable for complex calculations, such as big data analysis. They can only export the underlying database files on the blockchain from production, and then perform data analysis and statistics. This is not only inconvenient to operate, but also requires data analysts to have blockchain expertise.

[0050] In order to at least partially solve the above-mentioned technical problems in the prior art, the embodiments of the present invention provide a blockchain-based offline synchronization method, storage method and device for letter of credit data, which belongs to the field of blockchain. The blockchain-based offline synchronization method for letter of credit data is applied to blockchain nodes. By synchronizing the letter of credit text to an offline database for storage, a relational database (such as MySQL) has a powerful index model, association analysis, modeling training, and parallel task capabilities, and can flexibly and comprehensively query and analyze data, synchronize on-chain data to an off-chain relational database, which can effectively reduce the cost of using blockchain, improve on-chain processing efficiency, and realize complex query, calculation and analysis of block data off-chain.

[0051] Figure 1 Schematic diagram of the blockchain system architecture in an embodiment of the present invention Figure 1 ;like Figure 1 As shown, the user provides application information to the letter of credit opening node, and the letter of credit opening node is responsible for completing the opening of the letter of credit text and broadcasting the data to the blockchain node consensus.

[0052] The blockchain node is responsible for completing the consensus of the letter of credit document, realizing the data storage on the chain, ensuring the data accuracy and preventing tampering. At the same time, the data is transferred to the off-chain database in real time, which can also be called the letter of credit platform database, for use by the data query node for data analysis or query.

[0053] When there is a need for data analysis or data query on the blockchain, the data query node does not need to directly query the data information of the letter of credit on the blockchain. It only needs to directly query the letter of credit chain information synchronized from the chain in the platform database.

[0054] Among them, the blockchain node executes the offline synchronization method of letter of credit data based on blockchain provided in the embodiment of the present invention, and the off-chain database executes the offline storage method of letter of credit data based on blockchain provided in the embodiment of the present invention.

[0055] Figure 2 : is a structural block diagram of a letter of credit opening node in an embodiment of the present invention; Figure 2 As shown, the letter of credit opening node includes: a letter of credit opening module 11, a letter of credit review module 12 and a blockchain broadcasting module 13. Specifically:

[0056] The letter of credit opening module 11 provides an online information input unit 111, an attachment upload unit 112, and an automatic information input unit 113. The applicant can complete the online application for the letter of credit and input and save the information through the online input unit 111; or upload the application form, contract and other related image materials through the attachment upload unit 112, and the automatic information input unit 113 automatically completes the automatic input and save of the letter of credit information according to the structured data mapping rules, thereby improving the efficiency of letter of credit opening and handling.

[0057] The letter of credit review module 12 is responsible for completing the review and validation of the letter of credit information input by the letter of credit opening module 11. The review and opening of the letter of credit are completed in the banking business system.

[0058] The blockchain broadcast module 13 is responsible for broadcasting the verified and effective letter of credit information to the blockchain node consensus.

[0059] Figure 3 This is a schematic diagram of the process of the offline synchronization method of letter of credit data based on blockchain in an embodiment of the present invention. Figure 1 ;like Figure 3 As shown, the blockchain-based offline synchronization method for letter of credit data may include the following contents:

[0060] Step S100: consensus is reached on the obtained letter of credit text and it is stored on the chain;

[0061] Specifically, the letter of credit text uploaded by the letter of credit opening node is obtained, consensus is reached on the letter of credit text through a smart contract, and the text is stored locally to achieve on-chain storage of the blockchain text.

[0062] Other systems connected to the blockchain platform can quickly and efficiently obtain the letter of credit chain information from the blockchain platform, thereby achieving efficient letter of credit business processing and transmission.

[0063] Step S200: Download the letter of credit text to the off-chain database corresponding to the blockchain node.

[0064] Specifically, after completing the on-chain data storage, the data synchronization mechanism is triggered at the same time, automatically packaging the on-chain letter of credit information into messages and pushing them to the off-chain database for synchronous storage.

[0065] By adopting the above technical solution, by synchronizing the letter of credit text to the offline database storage, the relational database (such as MySQL) has a powerful index model, association analysis, modeling training, and parallel task capabilities, and can flexibly and comprehensively query and analyze the data, and synchronize the on-chain data to the off-chain relational database, which can effectively reduce the cost of blockchain use, improve the on-chain processing efficiency, and realize complex query, calculation and analysis of block data off-chain.

[0066] In an optional embodiment, when executing step S200, the letter of credit text may be transmitted to an off-chain database corresponding to the blockchain node through a message middleware, see Figure 4 .

[0067] Among them, after the message middleware receives the downloaded letter of credit text, it transmits the letter of credit file to the off-chain database according to the first-in-first-out rule.

[0068] Specifically, the blockchain node automatically packages the letter of credit information on the chain into messages and pushes them to the message middleware. After the message middleware receives the letter of credit message pushed down the chain, it stores the message in the message queue according to the first-in-first-out rule, and then automatically distributes and pushes the messages in the message queue according to the pre-set push rules, and pushes them down to the off-chain database (i.e., the letter of credit system application server).

[0069] By adopting the above technical solution, the opening and data synchronization of letters of credit based on blockchain can be realized. By introducing blockchain technology when opening letters of credit, the business processing efficiency of letters of credit can be improved, and the transmission of letter of credit text information on the chain can be realized. At the same time, by synchronously transmitting the data on the chain to the off-chain database through the message middleware, the read and write separation of block data is realized. The query of letter of credit related data can be realized through the off-chain database without the need to query the data directly on the chain, which effectively improves the performance of the blockchain system.

[0070] In an alternative embodiment, see Figure 5 , the blockchain-based offline synchronization method for letter of credit data may also include:

[0071] Step S300: Obtain the letter of credit text broadcast by the off-chain letter of credit opening node corresponding to the blockchain node.

[0072] In another alternative embodiment, see Figure 6 , the blockchain-based offline synchronization method for letter of credit data may also include:

[0073] Step S300': Obtain the letter of credit text broadcasted to the blockchain by other blockchain nodes on the blockchain.

[0074] Among them, the letter of credit text received by the blockchain node and synchronously stored off-chain can be broadcast from other nodes on the blockchain to the blockchain, or it can be uploaded after being opened by the letter of credit opening node off-chain corresponding to the blockchain node. The embodiment of the present invention does not limit this.

[0075] The embodiment of the present invention also provides a blockchain-based offline storage method for letter of credit data, see Figure 7 The blockchain-based offline storage method for letter of credit data may also include the following contents:

[0076] Step S1000: Obtain the letter of credit text data transmitted by the blockchain node;

[0077] Specifically, the letter of credit text data can be directly transmitted by the blockchain node, or it can be transmitted by the blockchain node via the message middleware.

[0078] Step S2000: interpreting the letter of credit text data and converting it into database DML operation statements;

[0079] Step S3000: Execute the DML operation statement to update data storage.

[0080] Among them, by executing DML operation statements, data storage updates are realized, thereby realizing off-chain synchronous storage of letter of credit data.

[0081] It is worth noting that when the blockchain node transmits the letter of credit text data, it can encrypt the data before transmitting it down for security reasons. Based on this, the blockchain-based letter of credit data offline storage method provided by the embodiment of the present invention can also include in step S2000: a step of decrypting the received data.

[0082] Figure 8 The structural block diagram of the blockchain node in the embodiment of the present invention is shown; Figure 8 As shown, the blockchain node includes: a blockchain letter of credit smart contract 21, a message receiving module 22 and a data distribution module 23.

[0083] The blockchain letter of credit smart contract 21 is responsible for processing the uploaded letter of credit text and storing the data in the blockchain database after consensus. Other systems connected to the blockchain platform can quickly and efficiently obtain the letter of credit chain information from the blockchain platform. Efficient letter of credit business processing and transmission are achieved. After the on-chain data storage is completed, the data synchronization mechanism is triggered at the same time, and the on-chain letter of credit information is automatically packaged into messages and pushed to the message middleware

[0084] The message receiving module 22, after receiving the letter of credit message pushed down the chain, the message middleware stores the message in the message queue according to the first-in-first-out rule.

[0085] The data distribution module 23 automatically distributes and pushes the messages in the message queue to the letter of credit system application server according to the preset push rules.

[0086] Here, what is described is the situation where the message middleware runs on the blockchain node. Of course, the message middleware can also be independent of the blockchain node and the off-chain database, or it can run on the off-chain database.

[0087] Fig. 9 FIG. 4 shows a structural block diagram of a letter of credit data query node in an embodiment of the present invention; Fig. 9 As shown, the data query node 03 includes:

[0088] The letter of credit off-chain data storage module 31, after receiving the message pushed down by the message middleware, the letter of credit platform server interprets the data, converts the interpreted data into off-chain database DML operation statements, and then executes the DML statements to update the off-chain database.

[0089] The letter of credit off-chain data access module 32, if the letter of credit service platform needs to access the on-chain data, it does not need to check the data on the chain, but can directly query the off-chain database.

[0090] Among them, this technical solution describes the situation where the off-chain database and query access are on one execution entity. At this time, the data storage module 31 is equivalent to the off-chain database, and the access module is equivalent to the subject of query access.

[0091] Fig.10 1 shows a technical flow chart in an embodiment of the present invention; Fig.10 As shown, the method flow includes the following contents:

[0092] Step S101: The applicant uploads the letter of credit application information;

[0093] Specifically, the application information for opening a letter of credit includes currency, amount, beneficiary, contract and other information, and you apply to the bank to open a letter of credit.

[0094] Step S102: After completing the review of the letter of credit information, the letter of credit platform issues a letter of credit text.

[0095] It is worth mentioning that when opening a letter of credit, you can also generate the text of the letter of credit related confirmation.

[0096] Step S103: Broadcast the text information of the issued letter of credit to the blockchain node consensus.

[0097] Step S104: After the smart contract reaches consensus, the data is stored in the database on the blockchain, which can be used by other systems joining the chain to obtain the letter of credit chain information.

[0098] Specifically, the letter of credit smart contract processes the uploaded letter of credit text and stores the data in the blockchain database after consensus. Other systems connected to the blockchain platform can quickly and efficiently obtain the letter of credit chain information from the blockchain platform, thus achieving efficient letter of credit business processing and transmission.

[0099] Step S105: After completing the on-chain data storage, the data synchronization mechanism is triggered to automatically package the on-chain letter of credit information into messages and push them to the NSQ message middleware.

[0100] Step S106: After receiving the letter of credit message sent from the chain, the message middleware stores the message in the message queue according to the first-in-first-out rule.

[0101] Step S107: the message middleware distributes the messages in the message queue and pushes them down to the application server.

[0102] Specifically, the message middleware automatically distributes and pushes the messages in the message queue according to the pre-set push rules, and pushes them down to the letter of credit system application server.

[0103] Step S108: After receiving the message pushed down by the message middleware, the letter of credit platform service interprets and converts the data.

[0104] Step S109: Convert the data into DML operation statements of the off-chain database, and then execute the DML statements to update the off-chain database.

[0105] Step S110: If the letter of credit service platform needs to access on-chain data, it can directly query the off-chain database to achieve fast on-chain data query.

[0106] Specifically, if the letter of credit service platform needs to access on-chain data, it does not need to go on-chain to check the data, but can directly query the off-chain database. With the help of the powerful engine and retrieval capabilities of the off-chain database, it can provide data consumers with convenient data query and analysis capabilities, while reducing the pressure on data access on the blockchain.

[0107] Based on the same inventive concept, the embodiments of the present application also provide a blockchain-based offline synchronization device for letter of credit data and a blockchain-based offline storage device for letter of credit data, which can be used to implement the method described in the above embodiments, as described in the following embodiments. Since the principles of solving the problem by the blockchain-based offline synchronization device for letter of credit data and the blockchain-based offline storage device for letter of credit data are similar to those of the above methods, the implementation of the blockchain-based offline synchronization device for letter of credit data and the blockchain-based offline storage device for letter of credit data can refer to the implementation of the above methods, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0108] Fig.11 : is a structural block diagram of a blockchain-based offline synchronization device for letter of credit data in an embodiment of the present invention. Fig.11 As shown, the blockchain-based letter of credit data offline synchronization device is applied to a blockchain node, specifically including: a text consensus storage module 10 and a data offline synchronization module 20.

[0109] The text consensus storage module 10 performs consensus on the obtained letter of credit text and stores it on the chain;

[0110] The data offline synchronization module 20 transmits the letter of credit text to the off-chain database corresponding to the blockchain node.

[0111] By adopting the above technical solution, by synchronizing the letter of credit text to the offline database storage, the relational database (such as MySQL) has a powerful index model, association analysis, modeling training, and parallel task capabilities, and can flexibly and comprehensively query and analyze the data, and synchronize the on-chain data to the off-chain relational database, which can effectively reduce the cost of blockchain use, improve the on-chain processing efficiency, and realize complex query, calculation and analysis of block data off-chain.

[0112] Fig.12 : is a structural block diagram of an offline storage device for letter of credit data based on blockchain in an embodiment of the present invention; Fig.12 As shown, the blockchain-based offline storage device for letter of credit data may include: a text data acquisition module 100, a data conversion module 200 and a data storage update module 300.

[0113] The text data acquisition module 100 acquires the letter of credit text data transmitted from the blockchain node;

[0114] The data conversion module 200 interprets the letter of credit text data and converts it into a database DML operation statement;

[0115] The data storage update module 300 executes the DML operation statement to update the data storage.

[0116] Among them, by executing DML operation statements, data storage updates are realized, thereby realizing off-chain synchronous storage of letter of credit data.

[0117] The devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is an electronic device, and the electronic device may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0118] In a typical example, the electronic device specifically includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned blockchain-based offline synchronization method for letter of credit data or the blockchain-based offline storage method for letter of credit data are implemented.

[0119] Reference below Fig.13 , which shows a schematic structural diagram of an electronic device 600 suitable for implementing an embodiment of the present application.

[0120] like Fig.13 As shown, electronic device 600 includes a central processing unit (CPU) 601, which can perform various appropriate operations and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. In RAM 603, various programs and data required for the operation of system 600 are also stored. CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.

[0121] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed as needed as the storage section 608.

[0122] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned blockchain-based offline synchronization method for letter of credit data or the blockchain-based offline storage method for letter of credit data.

[0123] In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 609 , and / or installed from the removable medium 611 .

[0124] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0125] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0126] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0129] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0130] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0131] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0132] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0133] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A blockchain-based offline synchronization method for letter of credit data, characterized in that: Applied to blockchain nodes, including: Consensus on the obtained letter of credit text and store it on the chain; The letter of credit text is transferred to the off-chain database corresponding to the blockchain node; The step of transferring the letter of credit text to an off-chain database corresponding to the blockchain node comprises: transferring the letter of credit text to an off-chain database corresponding to the blockchain node through a message middleware; After receiving the downloaded letter of credit text, the message middleware transmits the letter of credit document to the off-chain database according to the first-in-first-out rule; After the message middleware receives the letter of credit text transmitted from the chain, it transfers the letter of credit document to the off-chain database according to the first-in-first-out rule, including: after the message middleware receives the letter of credit message pushed down from the chain, it stores the message in the message queue according to the first-in-first-out rule, and then automatically distributes and pushes the message in the message queue according to the pre-set push rules, and pushes it down to the off-chain database.

2. The offline synchronization method of letter of credit data based on blockchain according to claim 1 is characterized in that: Also includes: Obtain the letter of credit text broadcast by the off-chain letter of credit issuance node corresponding to the blockchain node.

3. The offline synchronization method of letter of credit data based on blockchain according to claim 1 is characterized in that: Also includes: Obtain the text of the letter of credit broadcasted to the blockchain by other blockchain nodes on the blockchain.

4. A blockchain-based offline synchronization device for letter of credit data, characterized in that: Applied to blockchain nodes, including: The text consensus storage module is used to reach consensus on the obtained letter of credit text and store it on the chain; A data offline synchronization module, which transmits the letter of credit text to an off-chain database corresponding to the blockchain node; The offline data synchronization module is further used to transmit the letter of credit text to the off-chain database corresponding to the blockchain node through the message middleware; after the message middleware receives the transmitted letter of credit text, it transmits the letter of credit file to the off-chain database according to the first-in-first-out rule; Message receiving module: After the message middleware receives the letter of credit message pushed down the chain, it stores the message in the message queue according to the first-in-first-out rule; The data distribution module automatically distributes and pushes the messages in the message queue to the letter of credit system application server according to the pre-set push rules.

5. A blockchain-based offline storage method for letter of credit data, characterized in that: include: Acquire the letter of credit text data transmitted by the blockchain node; wherein the transmitted letter of credit text data is obtained by the blockchain node reaching consensus on the obtained letter of credit text and storing it on the chain, and transmitting the letter of credit text to the blockchain node through the message middleware; Among them, after receiving the letter of credit message pushed up and down by the blockchain node, the message middleware stores the message in the message queue according to the first-in-first-out rule, and then automatically distributes and pushes the message in the message queue according to the pre-set push rules; The letter of credit text data is interpreted and converted into database DML operation statements; Execute the DML operation statement to update the data storage.

6. A blockchain-based offline storage device for letter of credit data, characterized in that: include: A text data acquisition module, which acquires the letter of credit text data transmitted by the blockchain node; wherein the transmitted letter of credit text data is obtained by the blockchain node reaching consensus on the obtained letter of credit text and storing it on the chain, and transmitting the letter of credit text to the blockchain through the message middleware; Among them, after receiving the letter of credit message pushed up and down by the blockchain node, the message middleware stores the message in the message queue according to the first-in-first-out rule, and then automatically distributes and pushes the message in the message queue according to the pre-set push rules; A data conversion module, which interprets the letter of credit text data and converts it into a database DML operation statement; The data storage update module executes the DML operation statement to update the data storage.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the blockchain-based letter of credit data offline synchronization method described in any one of claims 1 to 3 or the blockchain-based letter of credit data offline storage method described in claim 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the blockchain-based letter of credit data offline synchronization method described in any one of claims 1 to 3 or the blockchain-based letter of credit data offline storage method described in claim 5 are implemented.

Citation Information

Patent Citations

  • Data storage and query method and device based on block chain

    CN107239479A

  • Block chain-based credit card issuing method and apparatus, and block chain-based credit card receiving method and apparatus

    CN111932369A