A digital currency ledger synchronization system
By adopting a central server and distributed terminal architecture in the ledger synchronization system of digital currency, and using information code iteration and matching code, the problem of ledger synchronization in the existing technology occupying a large amount of storage space, achieving efficient ledger synchronization and user account security.
Patent Information
- Application Number
- CN202210786639.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2042-07-06
AI Technical Summary
The existing digital currency's ledger synchronization method occupies a lot of storage space and has high maintenance costs.
Design a ledger synchronization system for digital currency, adopting a central server and distributed terminal architecture, and through the iteration of information codes and the use of matching codes, the storage space occupation is reduced and synchronization efficiency is improved.
It greatly reduces the storage space usage of each user, improves the efficiency of ledger synchronization, and prevents malicious revisions through matching codes, ensuring the security of user accounts.
Smart Images

Figure CN115147205B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network and computer software technology, and in particular to a digital currency ledger synchronization system. Background Art
[0002] The existing legal tender in my country is the RMB issued by the central bank. The issuance of RMB is based on the current binary system of "central bank-banking financial institutions", that is, the central bank issues currency to banking financial institutions, and withdraws currency from the central bank through banking financial institutions. The digital currency of the present invention is the digital RMB, and the abbreviation is tentatively designated as "e-CNY" according to international usage practices. It is a legal tender in digital form issued by the People's Bank of China, operated by designated operating institutions and exchanged to the public. It is based on a broad account system, supports loose coupling of bank accounts, is equivalent to banknotes and coins, has value characteristics and legal compensation, and supports controllable anonymity.
[0003] The existing digital currency ledger synchronization method mainly relies on blockchain technology, but this synchronization method will store complete information on each node. With the development of digital currency, the data space occupied by the node will become larger and larger, causing a certain burden. Now a ledger synchronization system is needed to reduce the data space used for storage.
[0004] Many authorized systems have been developed. After a lot of searching and reference, we found that the existing authorized systems include the systems disclosed in publication numbers CN109583893A, CN107392600B, CN107358440B, CN111400399A and US07590573B1. The use process of these systems generally includes: receiving a block ledger, determining a block node of a corresponding data type according to block summary information; using a block node of a data type corresponding to the block summary information as a first block node, and obtaining a first block node whose block remaining space is greater than the required space size data of the block from a preset block node remaining space table; calculating the network bandwidth required for transmitting the block ledger according to the required space size data of the block and the block importance level information; using the first block node whose block remaining space is greater than the required space size data of the block as a second block node; using a block node in the second block node that meets the network bandwidth required by the block ledger as a target node; and synchronizing the block ledger to the target node. However, most systems occupy large data space and have high maintenance costs. Summary of the invention
[0005] The purpose of the present invention is to propose a digital currency ledger synchronization system to address the existing deficiencies.
[0006] The present invention adopts the following technical solution:
[0007] A digital currency ledger synchronization system, comprising a central server and distributed terminals, wherein the central server is provided with a central storage module, and the distributed terminals are provided with a user identification module, a transaction processing module, a central connection module and an account book recording module, wherein the user identification module is used to verify the legitimacy of the user, the transaction processing module is used to process transaction information between the distributed terminals, the central connection module is used to connect the distributed terminals to the central server, and the account book recording module is used to record the digital currency account book information of the user;
[0008] The process of the system synchronizing the ledger is as follows:
[0009] After the distributed terminal conducts a transaction, a ledger code is generated, and the ledger code is sent to the central storage module through the central connection module for storage. The ledger code includes an information code. The ledger recording module stores an information code, and the information code is obtained by iterating the user code. The number of iterations is equal to the total number of transactions of the user. The information code on the distributed terminal is called a local information code, and the information code in the ledger code on the central server is called the latest information code;
[0010] The iteration formula of the information code is:
[0011] ;
[0012] in, represents the information code after the i-th iteration, is the transformation function, is the net change value of the transaction corresponding to each iteration;
[0013] The transformation function Meet the following requirements:
[0014] ;
[0015] in, Indicates that the transformation function is used n times continuously to change the input parameter;
[0016] After the user logs in on another distributed terminal, the central connection module obtains the account code from the central server, and the account record module obtains the difference in the number of iterations based on the local information code and the latest information code. and use Local information code Intermediate code , the account book recording module subtracts the latest information code from the intermediate code to obtain the transaction information, and synchronizes the account book information of the user according to the transaction information;
[0017] Furthermore, the process of transforming the transformation function includes the following steps:
[0018] S21, determining the transformation position according to the number of iterations in the input parameter;
[0019] S22, adding the transformation value to the transformation bit in the input parameter;
[0020] Furthermore, the transformation value in step S22 is a variable :
[0021] ;
[0022] Wherein, m is the number of transformed bits in step S21;
[0023] Furthermore, the ledger code also includes a matching code, which is randomly generated by the transaction processing module. The matching codes in the ledger codes uploaded to the central server by two users of the same transaction are the same. The central storage module matches the two ledger codes with the same matching code. Only the ledger codes that are successfully matched can be sent to the distributed terminals that need to be synchronized.
[0024] Furthermore, the central connection module can establish a network connection with the central server only after a legitimate user logs in to the distributed terminal. When the user identification module passes the verification of the logged-in user, the central connection module sends a connection request with user information to the central server. When the user information in the connection request is illegal information or there is no user information, the central server will reject the connection.
[0025] The beneficial effects achieved by the present invention are:
[0026] The user ledgers in this system are not synchronized in real time. They are synchronized on the distributed terminal only after the user logs in to the terminal, which greatly reduces the storage space occupied by each user. As a central server serving as a transfer station, it only needs to save at least one information code and one ledger code for each user, and the storage space occupancy rate is low. During the synchronization process, only the local information code saved in the distributed terminal and the latest information code obtained from the central server can be parsed to obtain the transaction information difference between the two, and the ledger synchronization of the distributed terminal is completed based on the transaction information difference, with high synchronization efficiency. This system sets a matching code in the ledger code, and completes the matching of the ledger code through the matching code to prevent malicious tampering with the information in the central server. At the same time, it is impossible to obtain the user's ledger information by obtaining data from the central server or the distributed terminal alone, thereby ensuring the security of the user's account.
[0027] To further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are only for reference and description and are not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of the overall structural framework of the present invention;
[0029] Figure 2 This is a schematic diagram of the ledger synchronization process of the present invention;
[0030] Figure 3 This is a schematic diagram of the accounting code matching principle of the present invention;
[0031] Figure 4 This is a schematic diagram of the information code iteration principle of the present invention;
[0032] Figure 5 Schematic diagram of the transformation mechanism of the transformation function of the present invention. DETAILED DESCRIPTION
[0033] The following is an explanation of the embodiments of the present invention through specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the contents disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. In addition, the drawings of the present invention are only simple schematic illustrations and are not depicted according to actual sizes. It is stated in advance. The following embodiments will further explain the relevant technical contents of the present invention in detail, but the disclosed contents are not intended to limit the scope of protection of the present invention.
[0034] Embodiment 1: This embodiment provides a digital currency ledger synchronization system, combined with Figure 1 , including a central server and distributed terminals, the central server is provided with a central storage module, the distributed terminals are provided with a user identification module, a transaction processing module, a central connection module and an account book recording module, the user identification module is used to verify the legitimacy of the user, the transaction processing module is used to process transaction information between the distributed terminals, the central connection module is used to connect the distributed terminal to the central server, and the account book recording module is used to record the user's digital currency account book information;
[0035] The process of the system synchronizing the ledger is as follows:
[0036] After the distributed terminal conducts a transaction, a ledger code is generated, and the ledger code is sent to the central storage module through the central connection module for storage. The ledger code includes an information code. The ledger recording module stores an information code, and the information code is obtained by iterating the user code. The number of iterations is equal to the total number of transactions of the user. The information code on the distributed terminal is called a local information code, and the information code in the ledger code on the central server is called the latest information code;
[0037] The iteration formula of the information code is:
[0038] ;
[0039] in, represents the information code after the i-th iteration, is the transformation function, is the net change value of the transaction corresponding to each iteration;
[0040] The transformation function Meet the following requirements:
[0041] ;
[0042] in, Indicates that the transformation function is used n times continuously to change the input parameter;
[0043] After the user logs in on another distributed terminal, the central connection module obtains the account code from the central server, and the account record module obtains the difference in the number of iterations based on the local information code and the latest information code. and use Local information code Intermediate code , the account book recording module subtracts the latest information code from the intermediate code to obtain the transaction information, and synchronizes the account book information of the user according to the transaction information;
[0044] The process of transforming the transform function comprises the following steps:
[0045] S21, determining the transformation position according to the number of iterations in the input parameter;
[0046] S22, adding the transformation value to the transformation bit in the input parameter;
[0047] The transformation value in step S22 is a variable :
[0048] ;
[0049] Wherein, m is the number of transformed bits in step S21;
[0050] The ledger code also includes a matching code, which is randomly generated by the transaction processing module. The matching codes in the ledger codes uploaded to the central server by two users of the same transaction are the same. The central storage module matches the two ledger codes with the same matching code. Only the ledger codes that are successfully matched can be sent to the distributed terminals that need to be synchronized.
[0051] The central connection module can establish a network connection with the central server only after a legitimate user logs in to the distributed terminal. When the user identification module passes the verification of the logged-in user, the central connection module sends a connection request with user information to the central server. When the user information in the connection request is illegal information or there is no user information, the central server will reject the connection.
[0052] Embodiment 2: This embodiment includes all the contents of Embodiment 1, and provides a digital currency ledger synchronization system, including a user identification module, a transaction processing module, a central connection module, a ledger recording module and a central storage module, wherein the user identification module, the transaction processing module, the central connection module and the ledger recording module are integrated on a distributed terminal, the central storage module is arranged on a central server, the user identification module is used to verify the legitimacy of the user, the transaction processing module is used to complete the digital currency transaction process between two terminals, the central connection module is used to connect the distributed terminal to the central server, the ledger recording module records the transaction data of the corresponding user on the distributed terminal, and the central storage module is used for the ledger code;
[0053] Combination Figure 2 The process of completing a ledger synchronization by the system includes the following steps:
[0054] S1. A user logs in on a distributed terminal A, and a user identification module on the distributed terminal A verifies the legitimacy of the user;
[0055] S2. The user fills in the digital currency transaction information on the transaction processing module on the distributed terminal A, and the transaction processing module completes the transaction with the distributed terminal B according to the digital currency transaction information;
[0056] S3. The account book recording module on the distributed terminal A records the transaction and generates an account book code;
[0057] S4. The central connection module on the distributed terminal A completes the network connection with the central storage module;
[0058] S5. The central connection module on the distributed terminal A sends the account code to the central storage module;
[0059] S6. The user logs in on the distributed terminal C, and the user identification module on the distributed terminal C verifies the legitimacy of the user;
[0060] S7, the central connection module on the distributed terminal C completes the network connection with the central storage module;
[0061] S8. The central connection module on the distributed terminal C obtains the corresponding account code from the central storage module;
[0062] S9. The account book recording module on the distributed terminal C parses the account book code;
[0063] S10. The account book recording module on the distributed terminal C synchronously updates the account book information of the corresponding user according to the parsed content;
[0064] The central connection module can only establish a network connection with the central server after a legitimate user logs in to the distributed terminal. When the user identification module passes the verification of the logged-in user, the central connection module sends a connection request with user information to the central server. When the user information in the connection request is illegal information or there is no user information, the central server will reject the connection;
[0065] Combination Figure 3 , the ledger code includes an information code and a matching code. The matching code is randomly generated by the transaction processing module. The matching codes in the ledger codes uploaded to the central server by both users of the same transaction are consistent. The information code is iteratively generated by the user code. The number of iterations is the number of transactions of the user. The central storage module saves the two latest information codes of a user. The net change value of the transaction is obtained by comparing the two information codes. The central server first finds two ledger codes with the same matching codes, and then processes the information codes in the ledger codes to obtain the net change value. When the two net change values are opposite to each other, the two ledger codes are matched successfully. Only the successfully matched ledger codes will be sent to the distributed terminals;
[0066] Combination Figure 4 , the iteration formula of the information code is:
[0067] ;
[0068] in, represents the information code after the i-th iteration, is the transformation function, is the net change value of the transaction corresponding to each iteration;
[0069] In particular, Indicates user code;
[0070] Transformation function The design meets the following requirements:
[0071] ;
[0072] in, Indicates that the transformation function is used n times continuously to change the input parameter;
[0073] The account book recording module of the distributed terminal stores a local information code. When the distributed terminal obtains the latest account book code from the central server, the account book recording module obtains the iteration difference according to the iteration number of the local information code and the iteration number of the latest information code in the account book code. , and then use the transformation function to transform the local information code Intermediate code :
[0074] ;
[0075] in, is the number of iterations of the local information code;
[0076] The account book recording module subtracts the latest information code from the intermediate code to obtain the difference between the digital currency value of the user in the account book recording module and the current actual digital currency value of the user:
[0077] ;
[0078] in, is the number of iterations of the latest information code;
[0079] The account book recording module synchronously updates the original digital currency of the user according to the difference, and then uses the latest information code as the new local information code to overwrite the original local information code;
[0080] Combination Figure 5 , the process of transformation of the transformation function comprises the following steps:
[0081] S21, determining the transformation position according to the number of iterations in the input parameter;
[0082] S22, adding the transformation value to the transformation bit in the input parameter;
[0083] The following is an example of the transformation function. When the number of iterations is x, the transformation bits are the xth bit and the (x+1)th bit, and the transformation value is 11. It should be noted that in this embodiment, the unit bit of the information code is the first bit, the tens bit is the second bit, and so on. When the xth bit is the first bit of the information code, the (x+1)th bit refers to the unit bit of the information code;
[0084] Local information code is 12345, and the net changes in the 4th, 5th, and 6th transactions are -12, 26, and 37 respectively;
[0085] The result of the fourth iteration is: ;
[0086] The result of the fifth iteration is: ;
[0087] The result of the sixth iteration is: ;
[0088] Directly to the information code The intermediate code obtained by performing three transformations is:
[0089] ;
[0090] Through the intermediate code and information code The difference in digital currency that needs to be processed is:
[0091] ;
[0092] The net change in actual transactions is: ;
[0093] Both are equal;
[0094] In the above processing, the information code is first converted into a corresponding numerical value and then calculated;
[0095] The selection of the transformation bit and transformation value in the above process is only an example and can be freely set by the staff in actual processing;
[0096] To improve the security of the information code, the conversion value in step S22 is set to a variable :
[0097] ;
[0098] Here, m is the number of transformed bits in step S21.
[0099] The contents disclosed above are only preferred feasible embodiments of the present invention, and do not limit the protection scope of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention specification and drawings are included in the protection scope of the present invention. In addition, the elements therein can be updated as technology develops.
Claims
1. A digital currency ledger synchronization system, characterized in that: It includes a central server and distributed terminals, wherein the central server is provided with a central storage module, and the distributed terminals are provided with a user identification module, a transaction processing module, a central connection module and an account book recording module, wherein the user identification module is used to verify the legitimacy of the user, the transaction processing module is used to process transaction information between the distributed terminals, the central connection module is used to connect the distributed terminals to the central server, and the account book recording module is used to record the digital currency account book information of the user; The process of the system synchronizing the ledger is as follows: After the distributed terminal conducts a transaction, a ledger code is generated, and the ledger code is sent to the central storage module through the central connection module for storage. The ledger code includes an information code. The ledger recording module stores an information code, and the information code is obtained by iterating the user code. The number of iterations is equal to the total number of transactions of the user. The information code on the distributed terminal is called a local information code, and the information code in the ledger code on the central server is called the latest information code; The iteration formula of the information code is: ; in, represents the information code after the i-th iteration, is the transformation function, is the net change value of the transaction corresponding to each iteration; The transformation function Meet the following requirements: ; in, Indicates that the transformation function is used n times continuously to change the input parameter; After the user logs in on another distributed terminal, the central connection module obtains the account code from the central server, and the account record module obtains the difference in the number of iterations based on the local information code and the latest information code. and use Local information code Intermediate code , the account book recording module subtracts the latest information code from the intermediate code to obtain the transaction information, and synchronizes the account book information of the user according to the transaction information; The process of transforming the transform function comprises the following steps: S21, determining the transformation position according to the number of iterations in the input parameter; S22, adding the transformation value to the transformation bit in the input parameter; The transformation value in step S22 is a variable : ; Wherein, m is the number of transformed bits in step S21; The ledger code also includes a matching code, which is randomly generated by the transaction processing module. The matching codes in the ledger codes uploaded to the central server by two users of the same transaction are the same. The central storage module matches the two ledger codes with the same matching code. Only the ledger codes that are successfully matched can be sent to the distributed terminals that need to be synchronized.
2. A digital currency ledger synchronization system as claimed in claim 1, characterized in that: The central connection module can establish a network connection with the central server only after a legitimate user logs in to the distributed terminal. When the user identification module passes the verification of the logged-in user, the central connection module sends a connection request with user information to the central server. When the user information in the connection request is illegal information or there is no user information, the central server will reject the connection.
Citation Information
Patent Citations
Methods and systems for customized tracking of digital currencies
CN107358440B
Digital Currency Transaction Payment Registration Methods and Systems
CN107392600B
Traceable digital currency transaction system based on a block chain
CN109583893A
Account book synchronization method and device of block chain system and hardware equipment
CN111400399A
System and method for transferring assets between depreciation books
US7590573B1