A cache accounting method based on distributed technology

By introducing auxiliary steps in the generation and broadcasting of blockchain transaction orders, using hardware wallet signatures and cloud servers to select blockchain, the problems of blockchain data concurrency and resource waste are solved, and transaction security and performance utilization are improved Rate.

CN118735518BActive Publication Date: 2024-11-12JIAYING TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411223238.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-11-12
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

Blockchain is prone to data congestion when multiple transactions are concurrent, resulting in an increase in interaction time between the user and the blockchain. Most blockchain applications are concentrated in specific time periods, increasing the possibility of data congestion and resource waste.

Method used

Using a cache accounting method based on distributed technology, the transaction orders are cached to standard and encrypted spaces by adding auxiliary steps during the period when transaction order generation to broadcast during the main blockchain, using the signature mechanism of standard hardware wallets and encrypted hardware wallets. , and use cloud servers to count and select blockchain in real time, reasonably arrange the broadcast timing of transaction orders, and avoid resource waste and data concurrency.

Benefits of technology

It improves the data security of transaction orders, fully applies the performance of the main blockchain, avoids resource waste, has good implementation convenience and practicality, and reduces data risks and resource waste caused by transaction concurrency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735518B_ABST
    Figure CN118735518B_ABST
Patent Text Reader

Abstract

The present invention provides a cache accounting method based on distributed technology, which relates to the field of computer technology. The cache accounting method adds auxiliary steps during the period from the generation of standard transaction orders to the broadcasting on the main blockchain, and constructs an accounting method that depends on the operation of the main blockchain. On the one hand, it can increase the data security of the standard transaction orders, and on the other hand, it can fully utilize the performance of the main blockchain, avoid waste of resources, and has good implementation convenience and practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a cache accounting method based on distributed technology. Background Art

[0002] Generally, the survival of blockchain generally depends on supporting applications. With the support of supporting applications, users maintain the blockchain while participating in the application. For blockchains established for the purpose of recording transaction orders, data concurrency will occur when users upload transaction order data to the blockchain. Limited by the performance of the blockchain itself, the blockchain will experience data congestion when encountering multiple transactions concurrently. The interaction time between the user end and the blockchain increases, which is prone to increase additional data risks. Therefore, it is necessary to reasonably arrange the broadcast timing of transaction orders in the blockchain. In addition, most of the targeted blockchains are limited by the user group and purpose of use. Users' application of blockchain is concentrated in specific time periods, which not only increases the possibility of data congestion, but also causes waste of resources. Summary of the invention

[0003] The embodiment of the present invention provides a cache accounting method based on distributed technology. The cache accounting method adds auxiliary steps during the period from the generation of standard transaction orders to the broadcasting on the main blockchain, and constructs an accounting method that depends on the operation of the main blockchain. On the one hand, it can increase the data security of standard transaction orders, and on the other hand, it can fully utilize the performance of the main blockchain, avoid waste of resources, and has good implementation convenience and practicality.

[0004] The present invention provides a cache accounting method based on distributed technology, comprising: a transaction software generates an unsigned standard transaction order according to target transaction information; when a standard hardware wallet is connected to the transaction software, the transaction software sends the unsigned standard transaction order to the standard hardware wallet; after the standard hardware wallet signs the unsigned standard transaction order with a private key corresponding to the main blockchain, the signed standard transaction order is transmitted back to the transaction software; the transaction software caches the signed standard transaction order in a standard cache space; in the When the encrypted hardware wallet is connected to the trading software, the trading software randomly selects a standard trading order in the standard cache space and uses the first Encrypted hardware wallet to correspond to After the private key of the statistical blockchain signs the standard transaction order selected by the trading software, it will be The standard transaction order signed by the encrypted hardware wallet is cached to Encrypted space, is a positive integer; the trading software periodically Standard trading orders in the crypto space are recorded in the The latest block of the statistical blockchain; a cloud server counts the number of standard transaction orders in the latest block of each statistical blockchain in real time; the cloud server selects several statistical blockchains as designated blockchains according to preset rules, and records the selected designated blockchains to the latest block of a selected blockchain; the trading software synchronizes the selected blockchain in real time, and selects the corresponding encryption space as the designated encryption space according to the designated blockchain recorded in the latest block of the selected blockchain; with the standard transaction orders in the designated encryption space as a reference, the trading software broadcasts the corresponding standard transaction orders in the standard cache space to the main blockchain.

[0005] An optional implementation manner further includes that after the trading software broadcasts the corresponding standard trading order in the standard cache space to the main blockchain, the trading software deletes the standard trading order in the standard cache space that has been broadcast to the main blockchain.

[0006] An optional implementation manner further includes that, while the trading software deletes the standard transaction orders in the standard cache space that have been broadcast to the main blockchain, the trading software also deletes the corresponding standard transaction orders in the designated encryption space.

[0007] In an optional implementation mode, when the cloud server selects several statistical blockchains as designated blockchains according to preset rules, the sum of the number of standard transaction orders in the latest blocks of all the designated blockchains is not greater than a preset value.

[0008] In an optional implementation mode, the preset value is determined according to the predicted transaction broadcast efficiency of the main blockchain; the predicted transaction broadcast efficiency is determined based on the actual transaction broadcast efficiency within a preset time period of the main blockchain.

[0009] In an optional implementation mode, when the cloud server selects several statistical blockchains as designated blockchains according to preset rules, a selection weight is allocated according to the number of standard transaction orders in the latest block of the statistical blockchain; a statistical blockchain with a larger number of standard transaction orders in the latest block has a higher selection weight when the cloud server selects a designated blockchain.

[0010] In an optional embodiment, the trading software will pass through the first The standard transaction order signed by the encrypted hardware wallet is cached to After the encryption space is created, the standard transaction orders corresponding to the standard cache space are marked. When the encrypted hardware wallet is connected to the trading software, it cannot be selected by the trading software.

[0011] In an optional embodiment, the trading software will pass through the first The standard transaction order signed by the encrypted hardware wallet is cached to After the encryption space, the standard transaction orders corresponding to the standard cache space are marked; the standard transaction orders in the standard cache space have different selection weights according to the number of markings; The encrypted hardware wallet is connected to the trading software. When the trading software selects a standard trading order, the standard trading order with a greater number of markings has a lower selection weight.

[0012] In an alternative embodiment, in When the encrypted hardware wallet is connected to the transaction software, the transaction software randomly selects a standard transaction order in the standard cache space, including: the transaction software randomly selects a standard transaction order in a quantitative manner in the standard cache space.

[0013] In summary, the present invention provides a cache accounting method based on distributed technology. The cache accounting method adds auxiliary steps during the period from the generation of standard transaction orders to their broadcast on the main blockchain, and constructs an accounting method that depends on the operation of the main blockchain. On the one hand, it can increase the data security of standard transaction orders, and on the other hand, it can fully utilize the performance of the main blockchain, avoid waste of resources, and has good implementation convenience and practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 This is a flow chart of a cache transaction record method based on distributed technology according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0017] Basically, a hardware wallet can generate a transaction account for a specific blockchain. The private key of the transaction account is stored on the hardware wallet itself and will not be known to the user. The user can only restore the private key when the hardware wallet is reset through auxiliary means such as mnemonics. In fact, for the blockchain, the private key is the transaction account itself. When the private key cannot be used without the hardware wallet, the hardware wallet has the offline use feature that can be used without the blockchain. In addition, the hardware wallet private key is actually stored on the physical level of the hardware wallet or in a relatively independent software space. The hardware wallet generally has a built-in micro system to realize functions such as human-computer interaction (interaction between the user and the hardware wallet), chain-machine interaction (interaction between the blockchain and the hardware wallet), and machine-machine interaction (interaction between the computer and the hardware wallet).

[0018] When the hardware wallet needs to check the balance of the transaction account, it communicates with the blockchain in a specified manner, generally accessing the public key address corresponding to the transaction account to obtain the balance of the transaction account.

[0019] When the hardware wallet is in use, it uses its private key to sign a specific transaction order, and the transaction order has actually occurred after signing; the signed transaction order has the user's private key authentication, and with the signed transaction order, any user can make it produce actual transfer effect by broadcasting.

[0020] It should be noted that when the signature is completed, the data of the transaction order has actually taken effect. The code data corresponding to the signed transaction order information can be transmitted in any form and can be broadcast to the corresponding blockchain through any device. This is the advantage of blockchain technology in offline transactions. Therefore, in fact, the signed transaction order information will also have an actual transfer effect when it is not broadcast in the blockchain. The propagation of the transaction order information in the blockchain is only to broadcast the transaction and make the transaction final; this theory is also the basis for supporting the actual implementation of the embodiment of the present invention.

[0021] In fact, the signed transaction order information can be understood as a check. The payer pays the corresponding amount to the payee through the check. The official seal and other information on the check are used as authentication information. When the bank receives the check, it needs to pay the corresponding amount to the payee. Therefore, after the blockchain-based transaction order is signed by the private key, its broadcast time on the blockchain is not required to be timely, and because the transaction recording method of the embodiment of the present invention is only used for recording, it does not require high real-time performance.

[0022] An embodiment of the present invention provides a method for caching transaction records based on distributed technology, including:

[0023] S101: The trading software generates an unsigned standard transaction order based on the target transaction information.

[0024] According to the consensus rules of the main blockchain, the trading software generates standard transaction orders that comply with the consensus rules of the main blockchain based on the target transaction information. The standard transaction orders generated by the trading software need to be signed to be effective.

[0025] S102: When the standard hardware wallet is connected to the transaction software, the transaction software sends the unsigned standard transaction order to the standard hardware wallet.

[0026] In the embodiment of the present invention, the standard hardware wallet refers to a hardware wallet in the conventional sense in distributed applications such as blockchain. The standard hardware wallet can be connected to the transaction software in a physical way or in a software way.

[0027] Specifically, physical access means that the trading software runs on computer hardware, connects the standard hardware wallet to the computer hardware, and the standard hardware wallet communicates with the trading software. Software access means that the trading software connects to the standard hardware wallet through various software-level connection methods.

[0028] S103: After the standard hardware wallet signs the unsigned standard transaction order using the private key corresponding to the main blockchain, the signed standard transaction order is returned to the transaction software.

[0029] The trading software sends the standard transaction order to the standard hardware wallet, which will identify the target transaction information, sign the standard transaction order with the corresponding signature, and send it back to the trading software.

[0030] Under the existing technology, some blockchain applications use an encryption bridge to enable the blockchain to directly connect and communicate with the hardware wallet. In the embodiment of the present invention, the application logic of the hardware wallet is similar to the related application of offline transactions. Therefore, the hardware wallet does not directly connect and communicate with the blockchain.

[0031] S104: The trading software caches the signed standard trading order into a standard cache space.

[0032] In this step, the signed standard transaction order will not be broadcast in the blockchain for the first time, but will be cached in the standard cache space to wait for subsequent operations.

[0033] It should be noted that there are two main ways to store transaction orders in the blockchain. One is to use the transfer record mechanism of the blockchain itself, and the other is to use the data recording mechanism that the blockchain can use to record data. In the embodiment of the present invention, the broadcast of the standard transaction order on the main blockchain actually uses the transfer record mechanism of the blockchain itself. In the subsequent description, the relevant The statistical blockchain can store standard transaction orders using either a transfer record mechanism or a data record mechanism, and the relevant content will be further explained in detail later.

[0034] S105: When the encrypted hardware wallet is connected to the trading software, the trading software randomly selects a standard trading order in the standard cache space and uses the first Encrypted hardware wallet to correspond to After the private key of the statistical blockchain signs the standard transaction order selected by the trading software, it will be The standard transaction order signed by the encrypted hardware wallet is cached to Encrypted space.

[0035] In the When the encrypted hardware wallet is connected to the trading software, the trading software will randomly select standard trading orders from the standard cache space for the first Encrypted hardware wallet signature, the signed standard transaction order will be cached to the corresponding In the encrypted space, standard transaction orders in the standard cache space are retained.

[0036] In an optional embodiment, the trading software will pass through the first The standard transaction order signed by the encrypted hardware wallet is cached to After the encryption space is created, the standard transaction orders corresponding to the standard cache space are marked. When the encrypted hardware wallet is connected to the trading software, it cannot be selected by the trading software to avoid repeated uploading of standard trading orders and waste of resources.

[0037] In an optional embodiment, the trading software will pass through the first The standard transaction order signed by the encrypted hardware wallet is cached to After the encryption space, the standard transaction orders corresponding to the standard cache space are marked; the standard transaction orders in the standard cache space have different selection weights according to the number of markings; The encrypted hardware wallet is connected to the trading software. When the trading software selects a standard trading order, the more times the standard trading order is marked, the lower the selection weight is. The purpose of this implementation is to use the repeated selection of data to enhance the data security of the data. In subsequent applications, the standard trading orders cached in the encrypted space will be uploaded to the corresponding statistical blockchain, and the standard trading orders introduced into the standard cache space will eventually be uploaded to the main blockchain. The standard trading orders repeatedly cached in the encrypted space will be repeatedly uploaded to the same or different statistical blockchains, thereby achieving multiple verifications of the data, which can further enhance the data security of the data; the more times the standard trading orders are marked, the lower the selection weight is, that is, the standard trading orders in the standard cache space can be repeatedly selected with a relatively balanced probability, which can avoid the waste of resources caused by selecting the same standard trading order multiple times, and improve the data security of all standard trading orders in an overall and balanced manner.

[0038] In addition, in When the encrypted hardware wallet is connected to the transaction software, the transaction software randomly selects standard transaction orders in the standard cache space, including: the transaction software randomly selects standard transaction orders in the standard cache space in a quantitative manner, which can ensure the balance of the number of standard transaction orders in each encrypted space.

[0039] S106: The trading software periodically sends Standard trading orders in the crypto space are recorded in the Statistics on the latest block of the blockchain.

[0040] It should be noted that the signature of the hardware wallet is essentially an encryption process, which ensures the security and ownership verification of the transaction. In blockchain transactions, each transaction needs to be signed with a private key. This signature process is generated by a specific algorithm using the private key to prove that the initiator of the transaction is the legal holder of the private key. Other nodes on the chain can use the public key to verify the validity of the signature without knowing the private key itself, thus ensuring the immutability and security of the transaction.

[0041] Therefore, in the embodiment of the present invention, although The signature object of the encrypted hardware wallet is not an unsigned transaction order, but in fact its actual effect is the same as that of a regular signature, except that the object of the signature has changed. Correspondingly, according to the adjustment of the signature object, the consensus rules of the corresponding blockchain are adjusted accordingly, and the transfer record function of the blockchain itself can be used to check the transaction after the first The signed standard transaction order of the encrypted hardware wallet is recorded and can also be stored using the data recording mechanism of the blockchain.

[0042] In the embodiment of the present invention, the statistical blockchain essentially has two functions. On the one hand, standard transaction orders that are not recorded in the main blockchain are first recorded in the statistical blockchain, and the statistical blockchain plays the most basic data storage function. On the other hand, the statistical blockchain can be used by the outside to observe and obtain the number of corresponding transaction orders for subsequent operations.

[0043] S107: A cloud server counts the number of standard transaction orders in the latest block of each statistical blockchain in real time.

[0044] The cloud server is an external hardware device. In an embodiment of the present invention, the cloud server is used to count the number of standard transaction orders in the latest block on all statistical blockchains.

[0045] S108: The cloud server selects a number of statistical blockchains as designated blockchains according to preset rules, and records the selected designated blockchains to the latest block of a selected blockchain.

[0046] Specifically, the cloud server selects several statistical blockchains from all statistical blockchains as designated blockchains. The cloud server records the selected statistical blockchains (i.e., designated blockchains) in real time by selecting the blockchains for other devices to obtain.

[0047] Specifically, in this step, the cloud server selects several statistical blockchains as designated blockchains for the purpose of reasonably setting the speed of broadcasting standard transaction orders to the main blockchain to avoid congestion when broadcasting standard transaction orders to the main blockchain; therefore, from its fundamental purpose, when the cloud server selects several statistical blockchains as designated blockchains according to the preset rules, the sum of the number of standard transaction orders in the latest blocks of all designated blockchains is not greater than the preset value. The preset value can be set according to the data storage efficiency of the main blockchain itself.

[0048] Furthermore, in actual implementation, it is possible to consider dynamically setting the preset value, that is, the preset value is determined according to the predicted transaction broadcast efficiency of the main blockchain; the predicted transaction broadcast efficiency is determined based on the actual transaction broadcast efficiency within a preset time period of the main blockchain. Specifically, although the performance of the main blockchain is basically unchanged, in actual use, since the main blockchain can be used in many aspects, its actual performance is variable and fluctuating for the application of the embodiment of the present invention. The predicted transaction broadcast efficiency can be understood as a real-time estimate of the actual performance of the main blockchain. The actual transaction broadcast efficiency within a certain period of time can be used and calculated according to the prior art, and then the preset value is limited by the predicted transaction broadcast efficiency.

[0049] It should be noted that the main blockchain can be used for the cache accounting method of the embodiment of the present invention. Similarly, the main blockchain can also be used to record other data, that is, the cache accounting method of the embodiment of the present invention is only an application method of the main blockchain. The main blockchain also serves other applications in actual implementation. The cache accounting method of the embodiment of the present invention will not completely occupy the performance of the main blockchain. On the one hand, the maintenance of the main blockchain depends on multiple unrelated applications, which can ensure the continuity of the main blockchain; on the other hand, the performance of the main blockchain can be fully utilized to avoid waste of resources.

[0050] Furthermore, when the cloud server selects several statistical blockchains as designated blockchains according to preset rules, the selection weight is allocated according to the number of standard transaction orders in the latest block of the statistical blockchain.

[0051] The statistical blockchain with a larger number of standard transaction orders in the latest block has a higher selection weight when the cloud server selects a designated blockchain.

[0052] Specifically, the number of standard transaction orders in the latest block of the statistical blockchain reflects the number of standard transaction orders in the corresponding encrypted space. The more standard transaction orders accumulate in the encrypted space, that is, the earlier the standard transaction orders in the encrypted space are, the earlier the standard transaction orders need to be processed in a timely manner. Therefore, the statistical blockchain with a larger number of standard transaction orders in the latest block has a higher selection weight when the cloud server selects a designated blockchain. The selection weight can be assigned to 1 at most, so as to ensure that the corresponding standard transaction orders can be uploaded to the main blockchain in a timely manner.

[0053] S109: The transaction software synchronizes the selected blockchain in real time, and selects a corresponding encryption space as the designated encryption space according to the designated blockchain recorded in the latest block of the selected blockchain.

[0054] S110: With reference to the standard transaction order in the designated encryption space, the transaction software broadcasts the corresponding standard transaction order in the standard cache space to the main blockchain.

[0055] The local trading software obtains the information of the selected statistical blockchain (i.e. the specified blockchain) by selecting the blockchain. The trading software uses the standard transaction orders in the encryption space corresponding to the specified blockchain as a reference, and uploads the corresponding standard transaction orders in the standard cache space as the data that needs to be uploaded to the main blockchain. At this point, the standard transaction orders are finally uploaded to the main blockchain.

[0056] Furthermore, in order to avoid wasting resources by repeatedly uploading the transaction orders in the standard cache space, after the transaction software broadcasts the corresponding standard transaction orders in the standard cache space to the main blockchain, the transaction software deletes the standard transaction orders in the standard cache space that have been broadcast to the main blockchain. Similarly, when the transaction software deletes the standard transaction orders in the standard cache space that have been broadcast to the main blockchain, the transaction software deletes the corresponding standard transaction orders in the designated encryption space.

[0057] In summary, in the embodiment of the present invention, the signed standard transaction order is first cached in the standard cache space and is not directly broadcast to the main blockchain; according to the different encrypted hardware wallets used by the user to access the transaction software, the standard transaction orders in the standard cache space are randomly signed and cached in different encryption spaces. Most basically, the standard transaction orders in the standard cache space are signed again using the encrypted hardware wallet, which can be understood as further improving the security of the data; and the operation of caching the standard transaction orders in different encryption spaces can be understood as randomly grouping the standard transaction orders in the standard cache space, and the grouped standard transaction orders will first be uploaded to different statistical blockchains.

[0058] Standard transaction orders in different encryption spaces are uploaded to different statistical blockchains respectively. The blockchain characteristics of the statistical blockchain itself can basically realize the distributed recording function of standard transaction orders.

[0059] The latest block of the statistical blockchain records the relevant standard transaction order content. The cloud server is used to count the latest blocks of all statistical blockchains, and the number of standard transaction orders on the latest block of each statistical blockchain is obtained. This number is the number of standard transaction orders in the corresponding encryption space, that is, the number of standard transaction orders that need to be broadcast to the main blockchain.

[0060] The cloud server selects a suitable statistical blockchain as the designated blockchain based on the efficiency of data recording of the main blockchain and the relevant data of the statistical blockchain obtained, and broadcasts the relevant information of the designated blockchain to the selected blockchain.

[0061] The trading software determines the standard transaction orders that need to be uploaded to the main blockchain by obtaining information from the selected blockchain, and finally uploads the relevant standard transaction orders to the main blockchain. The standard transaction orders are finally uploaded to the main blockchain.

[0062] It should be noted that the embodiment of the present invention describes the method used by a user to upload a standard transaction order to the main blockchain. In actual applications, an unlimited number of users can participate in the same accounting system according to the cache accounting method described in the embodiment of the present invention, that is, different users can use the same cloud server, main blockchain, statistical blockchain and selection blockchain.

[0063] The hardware carrier involved in the cache accounting method of the embodiment of the present invention is a cloud server, a local host capable of running transaction software, and a related hardware wallet. The cloud server is generally provided by a service provider, and the service provider also needs to produce related transaction software for users to use. The standard hardware wallet is matched with the main blockchain, and the confidential hardware wallet can be provided by the service provider; the blockchain involved in the cache accounting method of the embodiment of the present invention mainly includes the main blockchain, the statistical blockchain, and the selected blockchain. According to the above description, the main blockchain can ensure its continuity through different applications, the statistical blockchain can be maintained by the user group itself, and the selected blockchain is maintained by the service provider; although the statistical blockchain and the selected blockchain have certain specificity, since the data of the standard transaction order is actually divided The standard transaction order data on the two blockchains can be mutually verified (actually subject to the main blockchain), and the data security of the standard transaction orders can be guaranteed; in addition, the selected blockchain does not have the information recording function, and the service provider's tampering with the selected blockchain will not lead to adverse consequences. The service provider, as a developer, can charge appropriate fees to users participating in the application. The computing power on the blockchain does not have competitive significance, which can avoid computing power competition on the blockchain and avoid waste of resources; when the service provider and the user normally cooperate to use the cache accounting method implemented by the present invention, the sustainable operation of the cache accounting method can be guaranteed; in addition, the cache accounting method can be established at any time relying on any main blockchain, and has good implementation convenience and practicality.

[0064] It should be noted that in the cache accounting process, there is generally no data congestion problem caused by transaction concurrency between the transaction software and the blockchains. The various functional operations performed by the transaction software are all triggered operations. When specific implementation conditions are met, the transaction software will execute the operation in real time. This can avoid security issues caused by long communication time between the transaction software and the blockchain.

[0065] As described above, the embodiments of the present invention provide a cache accounting method based on distributed technology. The cache accounting method adds auxiliary steps during the period from the generation of standard transaction orders to the broadcasting on the main blockchain, and constructs an accounting method that depends on the operation of the main blockchain. On the one hand, it can increase the data security of standard transaction orders, and on the other hand, it can fully utilize the performance of the main blockchain, avoid waste of resources, and has good implementation convenience and practicality.

[0066] The above is a detailed introduction to a cache accounting method based on distributed technology provided by an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A cache accounting method based on distributed technology, comprising: The trading software generates an unsigned standard trading order based on the target transaction information; When the standard hardware wallet is connected to the transaction software, the transaction software sends the unsigned standard transaction order to the standard hardware wallet; After the standard hardware wallet signs the unsigned standard transaction order using the private key corresponding to the main blockchain, the signed standard transaction order is transmitted back to the transaction software; It is characterized by further comprising: The trading software caches the signed standard trading order into a standard cache space; In the When the encrypted hardware wallet is connected to the trading software, the trading software randomly selects a standard trading order in the standard cache space and uses the first Encrypted hardware wallet to correspond to After the private key of the statistical blockchain signs the standard transaction order selected by the trading software, it will be The standard transaction order signed by the encrypted hardware wallet is cached to Encrypted space, is a positive integer; The trading software periodically Standard transaction orders in the crypto space are recorded in the Statistics on the latest block of the blockchain; A cloud server counts the number of standard transaction orders in the latest block of each statistical blockchain in real time; The cloud server selects a number of statistical blockchains as designated blockchains according to a preset rule, and records the selected designated blockchains to the latest block of a selected blockchain; The transaction software synchronizes the selected blockchain in real time, and selects the corresponding encryption space as the designated encryption space according to the designated blockchain recorded in the latest block of the selected blockchain; Taking the standard transaction order in the designated encryption space as a reference, the transaction software broadcasts the corresponding standard transaction order in the standard cache space to the main blockchain.

2. The cache accounting method based on distributed technology as claimed in claim 1, characterized in that: It also includes that after the trading software broadcasts the corresponding standard trading order in the standard cache space to the main blockchain, the trading software deletes the standard trading order in the standard cache space that has been broadcast to the main blockchain.

3. The cache accounting method based on distributed technology as claimed in claim 2, characterized in that: It also includes that when the trading software deletes the standard trading order in the standard cache space that has been broadcast to the main blockchain, the trading software deletes the corresponding standard trading order in the designated encryption space.

4. The cache accounting method based on distributed technology as claimed in claim 1, characterized in that: When the cloud server selects several statistical blockchains as designated blockchains according to a preset rule, the sum of the number of standard transaction orders in the latest blocks of all the designated blockchains is not greater than a preset value.

5. The cache accounting method based on distributed technology as claimed in claim 4, characterized in that: The preset value is determined according to the predicted transaction broadcast efficiency of the main blockchain; The predicted transaction broadcast efficiency is determined based on an actual transaction broadcast efficiency within a preset time period of the main blockchain.

6. The cache accounting method based on distributed technology as claimed in claim 1, characterized in that: When the cloud server selects several statistical blockchains as designated blockchains according to preset rules, a selection weight is allocated according to the number of standard transaction orders in the latest block of the statistical blockchain; The statistical blockchain with a larger number of standard transaction orders in the latest block has a higher selection weight when the cloud server selects a designated blockchain.

7. The cache accounting method based on distributed technology as claimed in claim 1, characterized in that: The trading software will go through the The standard transaction order signed by the encrypted hardware wallet is cached to After the encryption space is created, the standard transaction orders corresponding to the standard cache space are marked. When the encrypted hardware wallet is connected to the trading software, it cannot be selected by the trading software.

8. The cache accounting method based on distributed technology as claimed in claim 1, characterized in that: The trading software will go through the The standard transaction order signed by the encrypted hardware wallet is cached to After encrypting the space, marking the standard transaction order corresponding to the standard cache space; The standard transaction orders in the standard cache space have different selection weights according to different marking times; In the The encrypted hardware wallet is connected to the trading software. When the trading software selects a standard trading order, the standard trading order with a greater number of markings has a lower selection weight.

9. The cache accounting method based on distributed technology as claimed in claim 1, characterized in that: In the When the encrypted hardware wallet is connected to the trading software, the trading software randomly selects standard trading orders in the standard cache space including: The trading software quantitatively and randomly selects standard trading orders in the standard cache space.

Citation Information

Patent Citations

  • Method and system for privacy protection of block chain transaction

    CN107911216A

  • Resource transaction method and electronic wallet system

    CN107993066A

  • Intelligent electric energy meter with blockchain function support

    CN111626718A

  • Block processing method, block chain network architecture, related node and storage medium

    CN114462999A

  • KR20200041607A