Transaction data protection system and method based on distributed account book technology
By adopting distributed ledger technology and asynchronous thread synchronization mechanism in the transaction data protection system, the problems of single point failure and data tampering in the traditional centralized transaction data protection method are solved, and efficient and secure transaction data protection is achieved.
Patent Information
- Application Number
- CN202411498548.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-04-15
AI Technical Summary
The traditional centralized transaction data protection method poses a single point of failure risk, which is difficult to prevent data tampering, and lacks effective supervision and audit mechanisms, which leads to the threat of data stability and security.
A transaction data protection system based on distributed ledger technology is adopted, which includes an information platform and multiple transaction information storage nodes. The information platform receives transaction information record requests, verifies and generates a new transaction block, and stores it in a transaction information storage node, and then synchronizes it asynchronously to other nodes. The system improves data security and synchronization efficiency through decentralized storage and asynchronous thread synchronization mechanisms.
Decentralized transaction data storage is realized, data security and tamper resistance are improved, data loss and leakage are prevented, and transaction data is enhanced. At the same time, the asynchronous thread synchronization mechanism improves the efficiency of data synchronization and reduces the system's waiting time and resource usage.
Smart Images

Figure CN119831587A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data protection technology, and in particular to a transaction data protection system and method based on distributed ledger technology. Background Art
[0002] Traditional transaction data protection methods rely on centralized databases, where all data is stored in a single institution. This architecture has the risk of single point failure. Once the institution is attacked by hackers, natural disasters, or internal errors, it will lead to data loss, leakage, or system paralysis, seriously affecting the stability and security of the system. In addition, it is difficult for centralized systems to effectively prevent internal personnel or external attackers from tampering with transaction data. Once the data is tampered with, it will seriously affect the authenticity and credibility of the transaction, and even cause systemic risks. The data modification authority of centralized systems is usually in the hands of a few people or institutions, lacking an effective supervision and audit mechanism. At the same time, it is difficult to detect and trace data tampering in a timely manner. Therefore, how to achieve transaction data protection has become a problem that needs to be solved urgently. Summary of the invention
[0003] In view of this, the present application provides a transaction data protection system and method based on distributed ledger technology, which helps to achieve transaction data protection and improves the efficiency of transaction data protection.
[0004] According to one aspect of the present application, a transaction data protection system based on distributed ledger technology is provided, the system comprising:
[0005] An information platform and a transaction information storage system, wherein the transaction information storage system comprises a plurality of transaction information storage nodes;
[0006] The information platform is used to receive a transaction information record request, determine whether verification is passed according to the transaction information record request, and if so, generate a new transaction block, and send the new transaction block to a transaction information storage node of the transaction information storage system;
[0007] The transaction information storage node is used to receive the new transaction block, store the new transaction block, and synchronize the new transaction block to all other transaction information storage nodes, so as to store the new transaction block in all other transaction information storage nodes.
[0008] Optionally, the information platform includes: a generation module and a business management module, and the business management module includes a data desensitization unit and a data encryption unit;
[0009] The generating module is used to receive a transaction information record request, wherein the transaction information record request includes transaction information and a parent transaction information block;
[0010] The data desensitizing unit is used to perform data desensitization on the transaction information and the parent transaction information block to obtain desensitized transaction information and desensitized parent transaction information block;
[0011] The generation module is used to determine whether the verification is passed according to the desensitized parent transaction information block, and if so, generate a new transaction block;
[0012] The data encryption unit is used to encrypt the new transaction block to obtain an encrypted new transaction block;
[0013] The generating module is used to send the encrypted new transaction block to a transaction information storage node of the transaction information storage system.
[0014] Optionally, the information platform includes: a rights management module, the rights management module includes a rights configuration unit, a user identity authentication unit and a rights verification unit;
[0015] The permission configuration unit is used to establish a mapping relationship between identity and permission;
[0016] The user identity authentication unit is used to authenticate the operating user who sends the transaction information record request and determine the identity of the operating user;
[0017] The authority verification unit is used to determine whether the operation of the operating user is a transaction information record, and determine the authority corresponding to the operating user identity based on the mapping relationship. If the transaction information record meets the authority, the operating user is allowed to record the transaction information; if the transaction information record does not meet the authority, the operating user is denied to record the transaction information.
[0018] Optionally, the information platform includes: a security management module;
[0019] The security management module is used to record the transaction information recording process of the operating user as a log to monitor the security status, and output alarm information if the security status does not meet the preset standard.
[0020] Optionally, the information platform includes: a basic function module, the basic function module includes a configuration unit and a log management unit;
[0021] The configuration unit is used to manage configuration information using a configuration file;
[0022] The log management unit is used to manage the log, receive log query requests and export requests, and analyze the log.
[0023] Optionally, the transaction data protection system further includes a service registration center;
[0024] The service registration center is used to monitor the operating status of all the transaction information storage nodes;
[0025] The information platform is used to send a storage instruction to the service registration center;
[0026] The service registration center is used to determine the transaction information storage node for storing the new transaction block according to the operating status of all the transaction information storage nodes, and use the target transaction information storage node as the target transaction information storage node, and send the information of the target transaction information storage node to the information platform;
[0027] The information platform is used to send the new transaction block to the target transaction information storage node.
[0028] According to another aspect of the present application, a transaction data protection method based on distributed ledger technology is provided, the method comprising:
[0029] Obtaining a transaction information record request, and determining whether verification is passed according to the transaction information record request, and if so, generating a new transaction block;
[0030] The new transaction block is stored in a transaction information storage node, an asynchronous thread is established, and the new transaction block is synchronized to all other transaction information storage nodes, so as to store the new transaction block in all other transaction information storage nodes.
[0031] Optionally, the transaction information record request includes: transaction information and a parent transaction information block;
[0032] The step of determining whether verification is passed according to the transaction information record request, and if so, generating a new transaction block comprises:
[0033] Verify whether the parent transaction information block exists, verify whether the data in the parent transaction information block is complete and has not been tampered with, and verify whether the transaction status of the parent transaction information block is completed. If all of them are true, generate the new transaction block according to the transaction information and the parent transaction information block.
[0034] Optionally, storing the new transaction block in a transaction information storage node includes:
[0035] Obtaining the operating status of all transaction information storage nodes, and determining a transaction information storage node for storing the new transaction block according to the operating status, and using the node as the target transaction information storage node;
[0036] The new transaction block is stored in the target transaction information storage node.
[0037] Optionally, before determining whether to generate a new transaction block according to the transaction information record request, the method further includes:
[0038] Get the mapping relationship between identity and permissions;
[0039] Authenticate the identity of the user who sent the transaction information record request to determine the identity of the user;
[0040] Determine that the operation of the operating user is a transaction information record, and determine the authority corresponding to the operating user identity based on the mapping relationship. If the transaction information record meets the authority, the operating user is allowed to record the transaction information; if the transaction information record does not meet the authority, the operating user is denied to record the transaction information.
[0041] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned transaction data protection method based on distributed ledger technology is implemented.
[0042] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned transaction data protection method based on distributed ledger technology when executing the program.
[0043] By means of the above technical scheme, the present application provides a transaction data protection system and method based on distributed ledger technology, the system comprising: an information platform, a transaction information storage system, the transaction information storage system comprising a plurality of transaction information storage nodes; the information platform is used to receive a transaction information record request, determine whether to generate a new transaction block according to the transaction information record request, and if so, send the new transaction block to a transaction information storage node; the transaction information storage node is used to receive and store the new transaction block, synchronize the new transaction block to all other transaction information storage nodes, so as to store the new transaction block in all other transaction information storage nodes. Since the transaction information storage system comprises a plurality of transaction information storage nodes, decentralization is achieved, thereby improving the security of transaction data, preventing tampering, and realizing transaction data protection, and adopting an asynchronous thread synchronization method, improving the efficiency of transaction data synchronization, and further improving the efficiency of transaction data protection.
[0044] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0046] Figure 1 A schematic diagram of the structure of a transaction data protection system based on distributed ledger technology provided in an embodiment of the present application is shown;
[0047] Figure 2 A schematic diagram of the structure of another transaction data protection system based on distributed ledger technology provided in an embodiment of the present application is shown;
[0048] Figure 3 A schematic diagram of a process of a transaction data protection method based on distributed ledger technology provided in an embodiment of the present application is shown;
[0049] Figure 4 An example diagram of the formation process of a transaction information chain provided by an embodiment of the present application is shown;
[0050] Figure 5 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0051] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0052] It should be noted that the traditional transaction data protection method relies on a centralized database, where all data is stored in a single institution. This transaction data protection method has the following shortcomings:
[0053] 1. High centralization risk: This architecture has the risk of single point failure. Once the institution is attacked by hackers, natural disasters or internal errors, it will lead to data loss, leakage or system paralysis, seriously affecting the stability and security of the financial system. The problem arises from the centralized data storage characteristics of the centralized system, which makes all risks concentrated at one point. There is a lack of redundancy and decentralized storage mechanisms, and it cannot effectively resist external attacks and internal errors.
[0054] 2. Lack of transparency: The traditional transaction data verification and recording process lacks transparency, and it is difficult for ordinary users to directly view and verify the authenticity and integrity of transaction data, which increases the cost of viewing the complete link of transaction data. The problem arises from the fact that transaction data is generated in different systems and users cannot extract the transaction record book recording process, resulting in information asymmetry and lack of trust.
[0055] 3. High risk of data tampering: It is difficult for centralized systems to effectively prevent internal personnel or external attackers from tampering with transaction data. Once the data is tampered with, it will seriously affect the authenticity and credibility of the transaction. It is difficult to track the identity of the tamperer and the specific time and content of the tampering, and even cause systemic risks. In centralized databases, data backup and recovery are important means to ensure data security. However, if the backup data itself is tampered with or damaged, then when the data is restored, it will not be possible to obtain true and complete data. In addition, if the backup strategy is improper or not strictly implemented, it may also cause important data to be unable to be restored after it is lost. The data modification authority of the centralized system is usually in the hands of a few people or institutions, lacking an effective supervision and audit mechanism. At the same time, it is difficult to detect and trace data tampering in a timely manner.
[0056] Existing technologies only apply blockchain to the recording and verification of transaction data, failing to fully leverage the advantages of blockchain technology such as decentralization, transparency, and immutability.
[0057] Therefore, in order to better protect transaction data, the present application embodiment provides a transaction data protection system based on distributed ledger technology, such as Figure 1 As shown, the system includes: an information platform, a transaction information storage system, and the transaction information storage system includes a plurality of transaction information storage nodes;
[0058] The information platform is used to receive a transaction information record request, determine whether verification is passed according to the transaction information record request, and if so, generate a new transaction block, and send the new transaction block to a transaction information storage node of the transaction information storage system;
[0059] The transaction information storage node is used to receive the new transaction block, store the new transaction block, and synchronize the new transaction block to all other transaction information storage nodes, so as to store the new transaction block in all other transaction information storage nodes.
[0060] It should be noted that the transaction data protection system based on distributed ledger technology provided in the embodiment of the present application can be applied in scenarios where transaction data needs to be protected, such as financial transaction data protection, but is not limited to this. And the transaction data protection system provided in the embodiment of the present application aims to record the source of transaction information and form a transaction information chain, and perform distributed storage. The regulatory system can trace the transaction information through the transaction data protection system. On the one hand, the chain-stored information has the characteristic of being tamper-proof. On the other hand, storing such chain information in a distributed ledger optimizes the basic capabilities of the transaction information storage system, gives full play to the advantages of decentralization, and makes the transaction information independent of a certain organization or individual, thereby ensuring the integrity, security and authenticity of the transaction information.
[0061] Specifically, for the embodiment of the present application, the transaction information record request includes transaction information, such as Figure 4 As shown, only the case where the transaction information chain includes three transaction blocks is listed. The first column from left to right is a new transaction block, and the generation of the new transaction block depends on the information of the previous transaction block (the second column), and the generation of the previous transaction block depends on the information of the previous transaction block (the third column), thus forming a transaction information chain. The new transaction block includes the current block hash value, the parent block hash value, the block level, the timestamp, the random number and the transaction information (storing the transaction information that needs to be recorded for the transaction), so that the transaction information can be traced and a transaction information chain can be formed.
[0062] Among them, the current block hash value 1. Member design function: Integrity verification: ensure the integrity of block data; Unique identification: as the unique identifier of the block; Tamper-proof: any modification will cause the hash value to change. 2. Generation method: Use a cryptographically secure hash function (such as SHA-256) to hash the block header, which contains the parent block hash value, block level, timestamp, random number, and hash value of transaction information.
[0063] 1. Member design function of the parent block hash value: Chain structure: link the current block with the previous block; Sequentiality: ensure the order and association between blocks; Tamper-proof: modification of the previous block will affect the legitimacy of subsequent blocks. 2. Generation method: When a new transaction block is created, copy the hash value of the previous block.
[0064] 1. Member design functions of the block level: Position identification: Identify the position of the block in the chain; Chain length: Reflect the length and history of the blockchain; Synchronization and verification: Reference information when synchronizing and verifying new blocks between nodes. 2. Generation method: When a new transaction block is generated, the level of the previous block is increased by 1.
[0065] 1. Design functions of timestamp: Time proof: record the time when the block was created; Order dispute resolution: resolve transaction order disputes; Data analysis: used for blockchain data analysis and historical tracing. 2. Generation method: Use UNIX timestamp, which is determined by the system time when the block was generated.
[0066] 1. Member design function of random number: Proof of Work: In the PoW mechanism, it is a value that is constantly adjusted when looking for a hash value that meets a specific difficulty condition. 2. Generation method: By constantly trying different random numbers, until a value is found that makes the block hash value meet a specific difficulty requirement.
[0067] 1. Member design function of transaction information: Record transaction: record all transaction details contained in the block. 2. Generation method: when a transaction occurs, the transaction data is generated by the user or related system and broadcast to all nodes through the network.
[0068] The role of the information platform is to record the source of transaction information and form a transaction information chain by generating new transaction blocks, and the role of the transaction information storage system is to use multiple transaction information storage nodes for distributed storage. In addition, the embodiment of the present application first stores the new transaction block in a transaction information storage node, and then synchronizes it to all other transaction information storage nodes, so that not only all transaction information storage nodes store the new transaction block, but also the main thread can continue to process new transaction information record requests without waiting for the synchronization operation to complete, thereby reducing waiting time and resource usage and improving synchronization efficiency.
[0069] The present application provides a transaction data protection system and method based on distributed ledger technology, the system includes: an information platform, a transaction information storage system, the transaction information storage system includes multiple transaction information storage nodes; the information platform is used to receive a transaction information record request, determine whether to generate a new transaction block according to the transaction information record request, and if so, send the new transaction block to a transaction information storage node; the transaction information storage node is used to receive and store the new transaction block, synchronize the new transaction block to all other transaction information storage nodes, so as to store the new transaction block in all other transaction information storage nodes. Since the transaction information storage system includes multiple transaction information storage nodes, decentralization is achieved, thereby improving the security of transaction data, preventing tampering, and realizing transaction data protection, and adopting an asynchronous thread synchronization method to improve the efficiency of transaction data synchronization, and further improve the efficiency of transaction data protection.
[0070] Furthermore, in order to better protect transaction data, the present application embodiment provides another transaction data protection system based on distributed ledger technology, such as Figure 2 As shown:
[0071] Optionally, the information platform includes: a generation module and a business management module, and the business management module includes a data desensitization unit and a data encryption unit;
[0072] The generating module is used to receive a transaction information record request, wherein the transaction information record request includes transaction information and a parent transaction information block;
[0073] The data desensitizing unit is used to perform data desensitization on the transaction information and the parent transaction information block to obtain desensitized transaction information and desensitized parent transaction information block;
[0074] The generation module is used to determine whether the verification is passed according to the desensitized parent transaction information block, and if so, generate a new transaction block;
[0075] The data encryption unit is used to encrypt the new transaction block to obtain an encrypted new transaction block;
[0076] The generating module is used to send the encrypted new transaction block to a transaction information storage node of the transaction information storage system.
[0077] In the actual application process, the role of the business management module is to achieve comprehensive data protection. In addition to the data desensitization unit and the data encryption unit, it preferably also includes data backup and recovery to ensure the confidentiality, integrity and availability of the data.
[0078] As an implementation method, the data encryption unit uses encryption algorithms such as AES and RSA to encrypt, store and transmit sensitive data. The data encryption function is implemented through Spring Security or a custom encryption service to ensure the security of data during storage and transmission.
[0079] Among them, as an implementation method, the data desensitization unit defines desensitization rules to desensitize sensitive information such as ID card number, bank card number, etc. The desensitization logic can be implemented in the data access layer or business logic layer to ensure that sensitive information is not leaked when outputting or sharing data.
[0080] Optionally, the information platform includes: a rights management module, the rights management module includes a rights configuration unit, a user identity authentication unit and a rights verification unit;
[0081] The permission configuration unit is used to establish a mapping relationship between identity and permission;
[0082] The user identity authentication unit is used to authenticate the operating user who sends the transaction information record request and determine the identity of the operating user;
[0083] The authority verification unit is used to determine whether the operation of the operating user is a transaction information record, and determine the authority corresponding to the operating user identity based on the mapping relationship. If the transaction information record meets the authority, the operating user is allowed to record the transaction information; if the transaction information record does not meet the authority, the operating user is denied to record the transaction information.
[0084] In actual application, the role of the permission management module is to implement fine-grained permission control to ensure that only authorized users can access and operate data.
[0085] As an implementation method, the user authentication unit uses Spring Security's OAuth2 authentication framework to implement user authentication and session management. The user's identity is verified by username, password, multi-factor authentication, etc., and an access token is generated.
[0086] As an implementation method, the permission configuration unit adopts Spring Security's OAuth2 authentication framework to provide an interface for adding, deleting, modifying, and checking identities and permissions, so that administrators can configure and manage them.
[0087] As an implementation method, the permission verification unit verifies the user's permission through the filter chain of SpringSecurity when accessing system resources. If the user does not have the corresponding permission, access is denied and an error message is returned.
[0088] Optionally, the information platform includes: a security management module;
[0089] The security management module is used to record the process of recording the transaction information of the operating user as a log to monitor the security status, and output alarm information if the security status does not meet the preset standard.
[0090] In actual application, the role of the security management module is to improve the overall security of the system and prevent external attacks and internal leaks.
[0091] As an implementation method, the security management module includes data auditing, security auditing and security monitoring, wherein the process of transaction information recording includes access to data and processing of data.
[0092] Data auditing is to use aspect-oriented programming technology to intercept data access and record it as logs. By analyzing logs (such as the log analysis tool ELK Stack), the flow and changes of data can be tracked to meet compliance requirements.
[0093] Security auditing is to use aspect-oriented programming technology to intercept data processing and record it as logs, and to promptly discover and handle security incidents by analyzing logs (such as the log analysis tool ELK Stack).
[0094] Security monitoring is to use monitoring tools such as Grafana to monitor the performance indicators and security status of the system. By setting alarm rules, potential security threats can be discovered and handled in a timely manner.
[0095] Optionally, the information platform includes: a basic function module, the basic function module includes a configuration unit and a log management unit;
[0096] The configuration unit is used to manage configuration information using a configuration file;
[0097] The log management unit is used to manage the log, receive log query requests and export requests, and analyze the log.
[0098] In the actual application process, the role of the basic function module is to provide basic support functions for the system and ensure the stable operation and efficient management of the system.
[0099] As an implementation method, the configuration unit uses Spring Boot configuration files (such as application.properties or application.yml) to manage system configuration information. Centralized management and dynamic update of configuration are achieved through distributed configuration center technologies such as Spring CloudConfig.
[0100] As an implementation method, the log management unit uses a log framework such as Log4j2 to record system logs. Log management efficiency is optimized through log level control, log rotation, log compression and other technical means. At the same time, a log query and export interface is provided to facilitate administrators to perform log analysis and troubleshooting.
[0101] After generating a new transaction block, the information platform encapsulates the generated new transaction block into appropriate call parameters, and remotely calls the storage interface of the transaction information storage system through the remote procedure call technology to transmit the new transaction block to a transaction information storage node.
[0102] Optionally, the transaction data protection system further includes a service registration center;
[0103] The service registration center is used to monitor the operating status of all the transaction information storage nodes;
[0104] The information platform is used to send a storage instruction to the service registration center;
[0105] The service registration center is used to determine the transaction information storage node for storing the new transaction block according to the operating status of all the transaction information storage nodes, and use the target transaction information storage node as the target transaction information storage node, and send the information of the target transaction information storage node to the information platform;
[0106] The information platform is used to send the new transaction block to the target transaction information storage node.
[0107] In the actual application process, the transaction information storage system is a distributed transaction information storage system built based on Spring Boot. Its function is to achieve reliable storage and efficient query of new transaction blocks to ensure the accuracy and integrity of the data.
[0108] Among them, as an implementation method, all transaction information storage nodes need to register with the service registration center (Eureka) (for example, automatically register the service with the service registration center at startup), and periodically send heartbeat packets to maintain the connection, so as to facilitate external service discovery and calling (for example, external services obtain the list of transaction information storage nodes through the service registration center, the service registration center is responsible for monitoring the running status of the nodes, the service registration center automatically removes failed nodes, selects a transaction information storage node as the target transaction information storage node according to the load balancing strategy, and calls it. The target transaction information storage node stores the new transaction block in the local database or distributed storage system. After the storage is successful, it returns the information that the transaction has been successfully stored to the information platform, wherein any transaction information storage node can independently receive and store new transaction blocks passed in by external services. A RESTful API interface is provided for external services to call to store new transaction blocks).
[0109] As an implementation method, Spring's WebSocket is integrated into each transaction information storage node to establish a real-time communication channel between transaction information storage nodes. A unified message format is defined, including fields such as message type, transaction information, and timestamp, to ensure the accuracy of message transmission. WebSocket technology is used to achieve real-time message transmission and data synchronization between transaction information storage nodes. When a transaction information storage node stores a new transaction block, it will immediately broadcast this information to all other transaction information storage nodes through WebSocket.
[0110] As an implementation method, external services can query required transaction information through any transaction information storage node, provide a RESTful API interface for external services to query transaction information, retrieve relevant information from the local database according to the query conditions, and return it to the caller.
[0111] By applying the technical solution of this embodiment, the information platform ensures data security when generating new transaction blocks, and each module works closely and independently with each other. The modular design enables the information platform to easily cope with changes in future business development needs. When it is necessary to add or adjust business functions, it is only necessary to expand or optimize on the basis of existing modules without large-scale reconstruction of the entire system, thereby greatly improving the flexibility and scalability of the business. The transaction information storage system includes multiple transaction information storage nodes, which are first stored on a transaction information storage node, and then an asynchronous thread is started to synchronize the new transaction block to other related transaction information storage nodes. Asynchronous processing allows the main thread to continue to process new transaction requests without waiting for the synchronization operation to complete, thereby reducing the system's waiting time and resource usage, and effectively reducing data transmission delays and bandwidth consumption.
[0112] In summary, advantage 1: enhanced business flexibility and scalability
[0113] Innovation in business module functional design: Through the carefully designed business management module, general authority management module, system security management module, basic function module and transaction information storage module, the information platform not only meets the basic needs of transaction data protection, but also uses a modular design approach to make each functional module both independent and closely collaborative.
[0114] Mitigating the drawbacks of decentralized storage: Although decentralized storage improves data security and tamper resistance, it also brings problems such as complex management and performance bottlenecks. This solution effectively mitigates these drawbacks by optimizing the basic capabilities of the storage system, allowing the advantages of decentralized storage to be fully utilized while reducing operation and maintenance costs.
[0115] Enhanced business secondary expansion capabilities: The modular design enables the information platform to easily cope with changes in future business development needs. When adding or adjusting business functions, it is only necessary to expand or optimize the existing modules without large-scale reconstruction of the entire system, which greatly improves the flexibility and scalability of the business.
[0116] Advantage 2: Efficient data consistency and synchronization mechanism
[0117] Asynchronous thread synchronization mechanism: Asynchronous processing allows the main thread to continue processing new transaction requests without waiting for the synchronization operation to complete, thereby reducing the system's waiting time and resource usage.
[0118] Reduce delay and bandwidth consumption: The asynchronous synchronization mechanism effectively reduces data transmission delay and bandwidth consumption by reducing unnecessary real-time data transmission while ensuring data consistency.
[0119] Improve overall system performance: By optimizing the data synchronization mechanism, not only the efficiency of data processing is improved, but also the pressure on network bandwidth and storage resources is reduced, thereby improving the stability and reliability of the entire system. This is undoubtedly a huge advantage for systems that need to process large amounts of transaction data.
[0120] Through business module function design and efficient data consistency and synchronization mechanism, not only the business flexibility and scalability of transaction data protection are enhanced, but also the overall performance of the system is significantly improved.
[0121] In this embodiment, a transaction data protection method based on distributed ledger technology is provided. Figure 3 As shown, the method includes:
[0122] Step 101, obtaining a transaction information record request, and determining whether verification is passed according to the transaction information record request, and if so, generating a new transaction block.
[0123] The transaction information record request includes: transaction information and a parent transaction information block;
[0124] The determining whether the verification is passed according to the transaction information record request, and if so, generating a new transaction block, including: verifying whether the parent transaction information block exists, verifying whether the data in the parent transaction information block is complete and has not been tampered with, and verifying whether the transaction status of the parent transaction information block is completed. If all of them are yes, generating the new transaction block according to the transaction information and the parent transaction information block.
[0125] If one of them is not, a "record exception" response is returned and subsequent processing is terminated.
[0126] The new transaction block is assembled based on the transaction information in the transaction information record request and the parent transaction information block, which is verified to be valid. The new transaction block includes key information such as transaction amount, transaction parties, timestamp, and unique transaction ID.
[0127] Preferably, before determining whether to generate a new transaction block according to the transaction information record request, the method also includes: obtaining a mapping relationship between identity and authority; authenticating the operating user who sends the transaction information record request to determine the operating user identity; determining that the operation of the operating user is a transaction information record, and determining the authority corresponding to the operating user identity according to the mapping relationship; if the transaction information record meets the authority, the operating user is allowed to perform transaction information recording; if the transaction information record does not meet the authority, the operating user is denied to perform transaction information recording.
[0128] Step 102, storing the new transaction block in a transaction information storage node, establishing an asynchronous thread, synchronizing the new transaction block to all other transaction information storage nodes, and storing the new transaction block in all other transaction information storage nodes.
[0129] The storing of the new transaction block in a transaction information storage node includes: obtaining the operating status of all transaction information storage nodes, determining the transaction information storage node for storing the new transaction block according to the operating status, and using the node as the target transaction information storage node; and storing the new transaction block in the target transaction information storage node.
[0130] For this embodiment, when the storage of the target transaction information storage node is completed, an asynchronous thread can be established, and the asynchronous thread synchronizes the new transaction block to all other transaction information storage nodes. While ensuring data consistency, it can reduce data transmission delays and bandwidth consumption, thereby improving the overall performance of the system.
[0131] By applying the technical solution of this embodiment, since the transaction information storage system includes multiple transaction information storage nodes, decentralization is achieved, thereby improving the security of transaction data, preventing tampering, and realizing transaction data protection. In addition, the asynchronous thread synchronization method is adopted to improve the efficiency of transaction data synchronization and further improve the efficiency of transaction data protection.
[0132] It should be noted that for other corresponding descriptions of the functional units involved in the transaction data protection system based on distributed ledger technology provided in the embodiment of the present application, please refer to Figure 3 The corresponding description in the method will not be repeated here.
[0133] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 5 As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0134] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0135] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0136] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0137] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0138] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0139] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0140] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A transaction data protection system based on distributed ledger technology, characterized in that: The system comprises: an information platform, a transaction information storage system, and the transaction information storage system comprises a plurality of transaction information storage nodes; The information platform is used to receive a transaction information record request, determine whether verification is passed according to the transaction information record request, and if so, generate a new transaction block, and send the new transaction block to a transaction information storage node of the transaction information storage system; The transaction information storage node is used to receive the new transaction block, store the new transaction block, and synchronize the new transaction block to all other transaction information storage nodes, so as to store the new transaction block in all other transaction information storage nodes.
2. The system according to claim 1, characterized in that The information platform includes: a generation module and a business management module, wherein the business management module includes a data desensitization unit and a data encryption unit; The generating module is used to receive a transaction information record request, wherein the transaction information record request includes transaction information and a parent transaction information block; The data desensitizing unit is used to perform data desensitization on the transaction information and the parent transaction information block to obtain desensitized transaction information and desensitized parent transaction information block; The generation module is used to determine whether the verification is passed according to the desensitized parent transaction information block, and if so, generate a new transaction block; The data encryption unit is used to encrypt the new transaction block to obtain an encrypted new transaction block; The generating module is used to send the encrypted new transaction block to a transaction information storage node of the transaction information storage system.
3. The system according to claim 1 or 2, characterized in that: The information platform includes: a rights management module, which includes a rights configuration unit, a user identity authentication unit and a rights verification unit; The permission configuration unit is used to establish a mapping relationship between identity and permission; The user identity authentication unit is used to authenticate the operating user who sends the transaction information record request and determine the identity of the operating user; The authority verification unit is used to determine whether the operation of the operating user is a transaction information record, and determine the authority corresponding to the operating user identity based on the mapping relationship. If the transaction information record meets the authority, the operating user is allowed to record the transaction information; if the transaction information record does not meet the authority, the operating user is denied to record the transaction information.
4. The system according to claim 3, characterized in that The information platform includes: a security management module; The security management module is used to record the process of recording the transaction information of the operating user as a log to monitor the security status, and output alarm information if the security status does not meet the preset standard.
5. The system according to claim 4, characterized in that The information platform includes: a basic function module, the basic function module includes a configuration unit and a log management unit; The configuration unit is used to manage configuration information using a configuration file; The log management unit is used to manage the log, receive log query requests and export requests, and analyze the log.
6. The system according to claim 1, characterized in that The transaction data protection system also includes a service registration center; The service registration center is used to monitor the operating status of all the transaction information storage nodes; The information platform is used to send a storage instruction to the service registration center; The service registration center is used to determine the transaction information storage node for storing the new transaction block according to the operating status of all the transaction information storage nodes, and use the target transaction information storage node as the target transaction information storage node, and send the information of the target transaction information storage node to the information platform; The information platform is used to send the new transaction block to the target transaction information storage node.
7. A transaction data protection method based on distributed ledger technology, characterized in that: The method comprises: Obtaining a transaction information record request, and determining whether verification is passed according to the transaction information record request, and if so, generating a new transaction block; The new transaction block is stored in a transaction information storage node, an asynchronous thread is established, and the new transaction block is synchronized to all other transaction information storage nodes, so as to store the new transaction block in all other transaction information storage nodes.
8. The method according to claim 7, characterized in that The transaction information record request includes: transaction information and a parent transaction information block; The step of determining whether verification is passed according to the transaction information record request, and if so, generating a new transaction block comprises: Verify whether the parent transaction information block exists, verify whether the data in the parent transaction information block is complete and has not been tampered with, and verify whether the transaction status of the parent transaction information block is completed. If all are true, generate the new transaction block based on the transaction information and the parent transaction information block.
9. The method according to claim 7, characterized in that: The storing the new transaction block to a transaction information storage node includes: Obtaining the operating status of all transaction information storage nodes, and determining a transaction information storage node for storing the new transaction block according to the operating status, and using the node as the target transaction information storage node; The new transaction block is stored in the target transaction information storage node.
10. The method according to claim 7, characterized in that Before determining whether to generate a new transaction block according to the transaction information record request, the method further includes: Get the mapping relationship between identity and permissions; Authenticate the identity of the user who sent the transaction information record request to determine the identity of the user; Determine that the operation of the operating user is a transaction information record, and determine the authority corresponding to the operating user identity based on the mapping relationship. If the transaction information record meets the authority, the operating user is allowed to perform the transaction information record; if the transaction information record does not meet the authority, the operating user is denied to perform the transaction information record.