CN112241884A - Alliance chain-based link security payment method, system, medium and equipment - Google Patents

Alliance chain-based link security payment method, system, medium and equipment Download PDF

Info

Publication number
CN112241884A
CN112241884A CN202010997547.9A CN202010997547A CN112241884A CN 112241884 A CN112241884 A CN 112241884A CN 202010997547 A CN202010997547 A CN 202010997547A CN 112241884 A CN112241884 A CN 112241884A
Authority
CN
China
Prior art keywords
transaction
chain
under
token
users
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010997547.9A
Other languages
Chinese (zh)
Inventor
沈玉龙
杨凌霄
董学文
佟威
田文生
乔慧
马诗洋
谷鑫雨
冶英杰
郭校杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN202010997547.9A priority Critical patent/CN112241884A/en
Publication of CN112241884A publication Critical patent/CN112241884A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4016Transaction verification involving fraud or risk level assessment in transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention belongs to the technical field of under-link payment channels of block chains, and discloses an under-link secure payment method, a system, a medium and equipment based on an alliance chain, wherein firstly, an authorized node is allowed to join a network and an account book is maintained based on an alliance chain bottom layer architecture; secondly, a token model based on the Ethengfang token ERC20 is realized by compiling an intelligent contract of a alliance chain; then, after the token is distributed to the users, payment transaction is carried out among the users, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm; and finally, providing a safe under-chain transaction execution environment, introducing lightweight consensus to ensure that under-chain clearing results are consistent, and providing under-chain transaction guarantee to resist malicious attacks. The invention provides a link-down secure payment method based on a alliance link, which is beneficial to the land falling of block link application, and particularly has profound practical significance in high-frequency low-volume transaction under an intelligent service transaction scene; providing a transaction throughput of over 300% of the original design.

Description

Alliance chain-based link security payment method, system, medium and equipment
Technical Field
The invention belongs to the technical field of under-chain payment channels of block chains, and particularly relates to an under-chain secure payment method, system, medium and equipment based on an alliance chain.
Background
At present: as the technology of developing the blockchain rises to the national strategic altitude, the blockchain application gradually falls to the ground in a large scale, and the demand for high-performance blockchain application is increasingly urgent. The existing work mainly promotes the scalability of block chains from both the up-chain and down-chain aspects. Chain capacity expansion improves the blockchain mainly in terms of consensus mechanisms, but since consensus still exists, delay caused by transaction validation is a major cause of performance impact, and the performance bottleneck of the entire network may be limited by the processing performance of individual nodes therein. Compared with the on-chain capacity expansion, the under-chain capacity expansion does not directly change the rule of the block chain, the under-chain capacity expansion transfers the transactions which are not suitable for being processed on the chain, such as the transactions with high frequency and small amount, to the under-chain safe state channel environment for execution, and finally the clearing result of a plurality of transactions is linked up, so the transaction capacity of the under-chain capacity expansion is not influenced by the performance of the original block chain and depends on the performance of the traditional network.
Currently, the related art is paid under the blockchain: a lightning payment network of a bit currency block chain, a lightning payment network of an Ethernet workshop platform and the like. The drawbacks of these methods are: the existing work is to apply the state channel technology in the public chain system, and the alliance chain and the public chain have many differences in the aspects of a bottom layer architecture, an application scene, privacy and the like, so that a certain technical threshold exists for performing platform migration application on the state channel technology. In addition, the existing work does not dynamically divide the transaction, so that the transaction success rate is not high, and the transaction commission is higher. The chain transaction is carried out based on a trusted third party, and the chain transaction guarantee with enough safety is lacked to resist malicious attack.
Through the above analysis, the problems and defects of the prior art are as follows: the existing work is to apply the state channel technology in the public chain system, and the alliance chain and the public chain have many differences in the aspects of a bottom layer architecture, an application scene, privacy and the like, so that a certain technical threshold exists for performing platform migration application on the state channel technology. Moreover, the success rate of the existing work transaction is not high, the transaction fee is high, and sufficient safe under-chain transaction guarantee is lacked to resist malicious attacks.
The difficulty in solving the above problems and defects is: it is difficult to determine whether a transaction needs to be performed on-chain or off-chain. The intuitive idea is to evaluate how the transaction is executed based on the historical transaction records of both parties. In practical situations, it is difficult to ensure that both parties have enough historical transactions, even no historical transactions, so that the prediction of transaction modes fails. Of course, the evaluation method can be improved to meet more transaction situations, but this does not solve the problem at all. How to secure the down-link transaction environment is also a challenge, for example, there may be a malicious node between the down-link payment parties, trying to submit the tampered result to the uplink. Many existing works assume the existence of trusted third parties, with the third parties centralizing the processing of transactions down the chain, and such an absolutely secure centralized authority is unlikely in practice.
The significance of solving the problems and the defects is as follows: the research on the alliance chain-based under-chain secure payment method has profound practical significance.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method, a system, a medium and equipment for offline secure payment based on a federation chain.
The invention is realized in such a way that a federation chain-based under-link secure payment method comprises the following steps:
based on the alliance chain bottom layer architecture, allowing authorized nodes to join the network and maintaining an account book;
the method comprises the steps of realizing a token model based on the Etheng token standard ERC20 by writing an intelligent contract;
after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm;
and a safe under-chain transaction execution environment is provided, and lightweight consensus is introduced to ensure that under-chain clearing results are consistent.
Further, the allowing, based on the federation chain underlying architecture, an authorized node to join the network and maintaining the ledger specifically includes:
firstly, configuring a alliance chain development environment and building an intelligent transaction service framework of an alliance chain architecture;
then, creating a related organization, and authorizing the node to join the network;
and finally, the alliance chain is used as the chain to exchange and store the ledger, and the nodes on the chain maintain the ledger.
Further, the implementation of the token model based on the etherhouse token standard ERC20 by writing an intelligent contract specifically includes:
first, abstract out the standard interface of ERC20 token protocol;
then, writing an intelligent contract on the alliance chain based on the ERC20 standard;
finally, the running token chain code is deployed.
Further, after the tokens are distributed to the users, payment transactions can be carried out among the users, and the system can specifically determine whether the execution on a transaction chain or the execution under the transaction chain according to a transaction dynamic partitioning algorithm, wherein the execution on the transaction chain or the execution under the transaction chain specifically comprises the following steps:
firstly, distributing tokens to users through a running token chain code;
then, transactions are initiated among users, and the transaction amount and the type are selected according to actual conditions;
and finally, the system processes the transaction to be executed and determines the execution on the transaction chain or the execution under the transaction chain according to a transaction dynamic division algorithm.
Further, the transaction dynamic partitioning algorithm specifically includes:
1) when a participant registers a user, the participant needs to select the user role of the participant and needs to select the preference of the service type provided/purchased, the equipment service of the internet of things, the cloud computing service and the block chain platform service, the information is provided for the system so that the system can predict the transaction amount and the transaction frequency of the participant according to the service type and serve as the basis of the cold start of the user, and the participant obtains a public key pk and a private key sk from a trusted key generation center KGC of the system;
2) the users of both parties carry out the transaction, inquire about the historical transaction according to the both sides' label of the transaction, including the transaction that two parts carry out on the chain and under the chain, the information of the historical transaction mainly includes transaction amount, time stamp and transaction mode; if the transaction quantity of the two parties is smaller than the threshold value delta, performing cold start division on the transaction, and otherwise, performing logistic regression division;
3) if the transaction amount is large and the predicted transaction frequency of both parties is low, then the transaction will tend to be executed on the chain; conversely, if the transaction amount is small and the prediction frequency is high, the transaction tends to be executed down the chain;
4) and the chain transaction is the transaction which is subjected to proposal, endorsement, sorting, packaging and verification processes in the alliance chain. Performing offline transaction, namely performing transaction in an offline payment channel;
the cold start division specifically includes: through a static information matching method, according to the service type preference provided by both parties during registration, the transaction frequency of both parties is predicted in a coarse-grained manner by combining the actual transaction amount and the service type; if the service of the Internet of things equipment is selected, the data provided by the equipment can be continuously obtained in a short time, the transaction frequency is high, the transaction amount is small, and the transaction in a payment channel under the chain is proper; selecting a service such as a cloud service or a blockchain platform which is prone to be used for a long time continuously;
the logistic regression partition specifically includes: using supervised learning method, obtaining [0,1 ] executed under input transaction chain through two-classification logistic regression model]Interval probability, if the probability is larger than 0.5, executing under the chain, otherwise executing on the chain; the historical transaction sets of the two parties are Thistory={τ1,τ2,...,τnConverting them into n labeled samples (. alpha.)1,β1),(α2,β2),...,(αi,βi),...,(αn,βn) In which α isi=(α1,α2,...,αD) Is a feature vector with dimension D, representing D attributes of transaction information, and a label betaiE {0, 1} represents two execution modes of the transaction, and the weight vector omega of the model is set to (omega)1,ω2,...,ωn). And (3) carrying out weighted summation on the elements of the feature vector, and inputting a Sigmoid activation function, wherein the logistic regression model is as follows:
Figure BDA0002693068790000041
the weight vector omega is used for leading the output of the model in the training set to be as close to a given label as possible, and after the vector omega is trained, the transaction characteristic vector alpha needing to be predicted is substituted into the vector omega
Figure BDA0002693068790000042
In the method, the execution mode of the transaction can be judged according to the output beta value, and the difference between the output of the model and the real model is measured through a loss function.
Further, the providing a secure under-chain transaction execution environment and introducing lightweight consensus to ensure that under-chain clearing results are consistent specifically includes:
1) with one piece of information M for down-link transactions B to SB→SSending the node to 3f +1(f is more than or equal to 1) nodes for calculation;
2) running a PBFT protocol to carry out consensus on the calculation result of each node, and obtaining a consistency result by the system as long as not less than 2f +1 non-malicious nodes work normally;
3) the system encrypts the hash value of the transaction result by using a private key of B to generate a digital signature, and then packs the signature, the transaction result and a public key of B into a deposit certificate;
4) if disputes occur during the clearing of both parties under the link, the system can review the malicious transaction according to the transaction result of the evidence storing content.
It is a further object of the invention to provide a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
based on the alliance chain bottom layer architecture, allowing authorized nodes to join the network and maintaining an account book;
the method comprises the steps of realizing a token model based on the Etheng token standard ERC20 by writing an intelligent contract;
after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm;
and a safe under-chain transaction execution environment is provided, and lightweight consensus is introduced to ensure that under-chain clearing results are consistent.
It is another object of the present invention to provide a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
based on the alliance chain bottom layer architecture, allowing authorized nodes to join the network and maintaining an account book;
the method comprises the steps of realizing a token model based on the Etheng token standard ERC20 by writing an intelligent contract;
after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm;
and a safe under-chain transaction execution environment is provided, and lightweight consensus is introduced to ensure that under-chain clearing results are consistent.
Another object of the present invention is to provide a federation chain-based under-chain secure payment system implementing the federation chain-based under-chain secure payment method, the federation chain-based under-chain secure payment system including:
the on-chain storage module is used for allowing authorized nodes to join the network and maintaining the account book based on the alliance chain bottom architecture;
the token generation module is used for realizing a token model based on the Ethengfang token ERC20 by compiling an intelligent contract of a alliance chain;
the system comprises a transaction dividing module, a transaction dynamic dividing module and a transaction processing module, wherein the transaction dividing module is used for performing payment transaction among users after being allocated to tokens of the users, and the system can determine the execution of the transaction on a link or under the link according to a transaction dynamic dividing algorithm;
and the safety guarantee module is used for providing a safe under-chain transaction execution environment and introducing lightweight consensus to ensure that under-chain clearing results are consistent.
Another objective of the present invention is to provide a terminal, which mounts the alliance chain-based under-link security payment system, and the terminal is a transaction information processing terminal, an intelligent service transaction terminal, a lightning payment network terminal of a bitcoin block chain, and a lightning payment network terminal of an ethernet platform.
By combining all the technical schemes, the invention has the advantages and positive effects that: the invention is based on the alliance chain bottom layer architecture, allows authorized nodes to join the network, and maintains the account book; the token model based on the Ethengfang token ERC20 is realized by compiling the intelligent contract of the alliance chain; after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm; and a safe under-link transaction execution environment is provided, lightweight consensus is introduced to ensure that under-link clearing results are consistent, and sufficient safe under-link transaction guarantee is provided to resist malicious attacks. Experimental results show that this method can provide transaction throughput that exceeds 300% of the original design. Part of experimental results of the present invention show that fig. 7(a) is a graph of the transaction success rate of the method of the present invention and the original alliance chain with increasing number of users, the results show that the transaction success rate of the method of the present invention is stabilized above 95%, while the original alliance chain method is gradually reduced to 70%, fig. 7(b) is a histogram of the transaction throughput of the method of the present invention and the original alliance chain with increasing number of users, and the results show that the throughput of the method of the present invention is three times that of the original alliance chain method. The invention provides a link-down secure payment method based on a alliance chain, which is beneficial to the landing of block chain application, and particularly has profound practical significance in high-frequency low-volume transaction in an intelligent service transaction scene.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained from the drawings without creative efforts.
Fig. 1 is a flowchart of a federation chain-based offline secure payment method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a federation chain-based offline secure payment system provided by an embodiment of the present invention;
in fig. 2: 1. an on-chain storage module; 2. a token generation module; 3. a transaction partitioning module; 4. and a safety guarantee module.
Fig. 3 is a schematic diagram of an on-chain memory module according to an embodiment of the present invention.
Figure 4 is a schematic diagram of a token generation module provided by an embodiment of the present invention.
Fig. 5 is a schematic diagram of a transaction partitioning module according to an embodiment of the present invention.
Fig. 6 is a schematic diagram of a security module according to an embodiment of the present invention.
Fig. 7 is a graph of experimental test results provided by an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In view of the problems in the prior art, the present invention provides a method, a system, a medium, and a device for offline secure payment based on a federation chain, which are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the method for security payment under a federation chain provided by the present invention includes the following steps:
s101: based on the alliance chain bottom layer architecture, allowing authorized nodes to join the network and maintaining an account book;
s102: the token model based on the Ethengfang token ERC20 is realized by compiling the intelligent contract of the alliance chain;
s103: after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm;
s104: and a safe under-link transaction execution environment is provided, lightweight consensus is introduced to ensure that under-link clearing results are consistent, and sufficient safe under-link transaction guarantee is provided to resist malicious attacks.
Other steps can be adopted by those skilled in the art to implement the method for secure payment under federation chain based on the present invention, and the method for secure payment under federation chain based on the present invention in fig. 1 is only one specific example.
As shown in fig. 2, the system for security payment under a federation chain provided by the present invention includes:
the on-chain storage module 1 is used for allowing authorized nodes to join the network and maintaining an account book based on the alliance chain bottom architecture;
the token generation module 2 is used for realizing a token model based on the Ethengfang token standard ERC20 by compiling an intelligent contract of a alliance chain;
the transaction division module 3 is used for carrying out payment transaction among users after the tokens are distributed to the users, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic division algorithm;
and the safety guarantee module 4 is used for providing a safe under-chain transaction execution environment and introducing lightweight consensus to ensure that under-chain clearing results are consistent.
The technical solution of the present invention is further described below with reference to the accompanying drawings.
As shown in fig. 3 to 6, the present invention includes four modules of an on-chain storage module 1, a token generation module 2, a transaction division module 3, and a security assurance 4.
(1) On-chain storage module 1:
as shown in fig. 3, storing a module 1 on a chain, first, configuring a federation chain development environment, and building an intelligent transaction service framework of a federation chain architecture; then, creating a related organization, and authorizing the node to join the network; and finally, the alliance chain is used as the chain to exchange and store the ledger, and the nodes on the chain maintain the ledger.
(2) The token generation module 2:
as shown in fig. 4, the token generation module 2 of the present invention is described. First, abstract out the standard interface of ERC20 token protocol; then, writing an intelligent contract on the alliance chain based on the ERC20 standard; finally, the running token chain code is deployed.
(3) The transaction dividing module 3:
as shown in fig. 5, a transaction partitioning module 3 is depicted. Firstly, distributing tokens to users through a running token chain code; then, transactions are initiated among users, and the transaction amount and the type are selected according to actual conditions; and finally, the system processes the transaction to be executed and determines the execution on the transaction chain or the execution under the transaction chain according to a transaction dynamic division algorithm.
The transaction dynamic partitioning algorithm specifically comprises the following steps:
1) the participant needs to select his user role at user registration and needs to select the service type preferences offered/purchased, such as: the system comprises an Internet of things device service, a cloud computing service, a block chain platform service and the like. This information is provided to the system in order for the system to predict the transaction amount and transaction frequency of the participants based on the type of service and to serve as the basis for the cold start of the user. Further, the participant obtains the public key pk and the private key sk from a trusted Key Generation Center (KGC) of the system.
2) The users of both parties can carry out transaction, and the historical transaction is inquired according to the identification of both parties of the transaction, including the transaction executed by the two parts of the upper chain and the lower chain, and the information of the historical transaction mainly includes transaction amount, time stamp and transaction mode. And if the transaction quantity of the two parties is less than the threshold value delta, performing cold start division on the transaction, and otherwise, performing logistic regression division.
3) If the transaction amount is large and the predicted transaction frequency of both parties is low, then the transaction will tend to be executed on the chain; conversely, if the transaction amount is small and the prediction frequency is high, the transaction tends to be executed down the chain.
4) And the chain transaction is the transaction which is subjected to proposal, endorsement, sorting, packaging and verification processes in the alliance chain. And performing offline transaction, namely performing transaction in an offline payment channel.
Wherein, cold start divides specifically to include: because both parties have fewer historical transactions, the system has difficulty learning the model from a small amount of data, or has resulted in overfitting. Therefore, the invention predicts the transaction frequency of both parties in coarse granularity by a static information matching method according to the service type preference provided by both parties during registration and by combining the actual transaction amount and the service type. For example, if the internet of things device service is selected, it is very likely that the data provided by the device is continuously acquired in a short time, the transaction frequency is high, and the amount of each transaction is small, so that it is appropriate to perform the transaction in the payment channel under the chain. And the cloud service or the block chain platform and other services which tend to be used continuously for a long time are selected, the transaction frequency is low, the transaction amount is large each time, the channel transaction is carried out, but the overhead is large, so that the direct chain transaction is suggested.
The logistic regression division specifically includes: with enough historical transactions, the invention uses a supervised learning method to obtain [0,1 ] executed under the input transaction chain through a two-classification logistic regression model]And interval probability, executing under the chain if the probability is more than 0.5, and executing on the chain if the probability is not more than 0.5. Suppose the historical transaction sets of both parties are Thistory={τ1,τ2,...,τnWhich can be converted into n labeled samples (. alpha.)1,β1),(α2,β2),…,(αi,βi),…,(αn,βn) In which α isi=(α1,α2,...,αD) Is a feature vector with dimension D, representing D attributes of transaction information, and a label betaiE {0, 1} represents two ways of performing the transaction. Let the weight vector ω of the model be (ω)1,ω2,...,ωn). And (3) carrying out weighted summation on elements of the feature vector, and inputting a Sigmoid activation function, so that the logistic regression model is (1):
Figure BDA0002693068790000091
the present invention seeks to find a weight vector omega that approximates the output of the model in the training set as closely as possible to a given label. After the vector omega is trained, the execution mode of the transaction can be judged by substituting the transaction characteristic vector alpha needing to be predicted into (1) and outputting a beta value. The difference between the output of the model and the real can be measured by a loss function, and the derivation of the weight vector ω is described below:
Figure BDA0002693068790000101
assuming that the model has a β ═ 1 probability of p, then the probability of the label being 0:
Pβ=0=1-p (3)
considering a single sample as an event, the probability of this event occurring is:
Figure BDA0002693068790000102
because there are n sample data, the invention takes the maximum likelihood function to the common expression (4):
Figure BDA0002693068790000103
taking the logarithm of equation (5), the transformation is:
Figure BDA0002693068790000104
the function l (ω) is called a loss function, where its value is equal to the total probability of an event occurrence, and is therefore desirably as large as possible. The invention uses gradient descent method to calculate weight omega iteratively, namely finding a weight omega, making l (omega) take maximum value:
ω*=argmaxωl(ω) (7)
derivation of l (ω), simplified as:
Figure BDA0002693068790000105
from equation (8), initialize an arbitrary ω0Given a step length eta, continuously iteratively modifying omegat+1←ωtGradually approaching the maximum point, namely continuously performing the iteration process of (9) until the specified number of times or the gradient is equal to 0:
Figure BDA0002693068790000106
from the above process, the present invention can obtain a two-class logistic regression model. Thus the system dynamically performs transactional execution partitioning in two ways.
(4) The safety guarantee module 4:
as shown in fig. 6, the security and safety module 4 is described. The method comprises the steps of providing a safe under-chain transaction execution environment, and specifically, introducing lightweight consensus to ensure that under-chain clearing results are consistent, wherein the method comprises the following steps:
1) suppose there is a piece of information M for the down-link transaction from B to SB→SAnd sending the data to 3f +1(f is more than or equal to 1) nodes for calculation.
2) Running a PBFT protocol to carry out consensus on the calculation result of each node, and obtaining a consistency result by the system as long as not less than 2f +1 non-malicious nodes work normally.
3) The system encrypts the hash value of the transaction result by using the private key of B to generate a digital signature, and then packs the signature, the transaction result and the public key of B into a deposit certificate.
4) If disputes occur during the clearing of both parties under the link, the system can review the malicious transaction according to the transaction result of the evidence storing content.
The technical effects of the present invention will be described in detail with reference to experiments.
The invention is based on the alliance chain bottom layer architecture, allows authorized nodes to join the network, and maintains the account book; the token model based on the Ethengfang token ERC20 is realized by compiling the intelligent contract of the alliance chain; after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm; and a safe under-link transaction execution environment is provided, lightweight consensus is introduced to ensure that under-link clearing results are consistent, and sufficient safe under-link transaction guarantee is provided to resist malicious attacks. Experimental results show that this method can provide transaction throughput that exceeds 300% of the original design. The link-down safety payment method based on the alliance link is beneficial to the land falling of block link application, and particularly has profound practical significance for high-frequency low-volume transaction in an intelligent service transaction scene.
Fig. 7(a) is a line graph of the transaction success rate of the method of the present invention and the original federation chain as the number of users increases, the result shows that the transaction success rate of the method of the present invention is stabilized above 95%, while the original federation chain method is gradually reduced to 70%, fig. 7(b) is a bar graph of the transaction throughput of the method of the present invention and the original federation chain as the number of users increases, the result shows that the throughput of the method of the present invention is three times that of the original federation chain method.
It should be noted that the embodiments of the present invention can be realized by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portions may be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or specially designed hardware. Those skilled in the art will appreciate that the apparatus and methods described above may be implemented using computer executable instructions and/or embodied in processor control code, such code being provided on a carrier medium such as a disk, CD-or DVD-ROM, programmable memory such as read only memory (firmware), or a data carrier such as an optical or electronic signal carrier, for example. The apparatus and its modules of the present invention may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of hardware circuits and software, e.g., firmware.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A federation chain-based offline secure payment method is characterized in that the federation chain-based offline secure payment method comprises the following steps:
based on the alliance chain bottom layer architecture, allowing authorized nodes to join the network and maintaining an account book;
the method comprises the steps of realizing a token model based on the Etheng token standard ERC20 by writing an intelligent contract;
after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm;
and a safe under-chain transaction execution environment is provided, and lightweight consensus is introduced to ensure that under-chain clearing results are consistent.
2. The method for federation-chain-based security payment of claim 1, wherein the allowing authorized nodes to join the network and maintaining the ledger specifically comprises, based on a federation chain underlying architecture:
firstly, configuring a alliance chain development environment and building an intelligent transaction service framework of an alliance chain architecture;
then, creating a related organization, and authorizing the node to join the network;
and finally, the alliance chain is used as the chain to exchange and store the ledger, and the nodes on the chain maintain the ledger.
3. A federation chain-based, down-link secure payment method as recited in claim 1, wherein said implementing an etherhouse token standard ERC 20-based token model by writing an intelligent contract specifically comprises:
first, abstract out the standard interface of ERC20 token protocol;
then, writing an intelligent contract on the alliance chain based on the ERC20 standard;
finally, the running token chain code is deployed.
4. A federation chain-based, down-chain secure payment method as claimed in claim 1 wherein payment transactions between users are enabled after tokens have been allocated to them, the system determining whether to perform up-or down-chain transactions according to a dynamic partitioning algorithm for transactions specifically comprises:
firstly, distributing tokens to users through a running token chain code;
then, transactions are initiated among users, and the transaction amount and the type are selected according to actual conditions;
and finally, the system processes the transaction to be executed and determines the execution on the transaction chain or the execution under the transaction chain according to a transaction dynamic division algorithm.
5. The federation chain-based, down-link secure payment method of claim 4, wherein the dynamic transaction partitioning algorithm specifically comprises:
1) when a participant registers a user, the participant needs to select the user role of the participant and needs to select the preference of the service type provided/purchased, the equipment service of the internet of things, the cloud computing service and the block chain platform service, the information is provided for the system so that the system can predict the transaction amount and the transaction frequency of the participant according to the service type and serve as the basis of the cold start of the user, and the participant obtains a public key pk and a private key sk from a trusted key generation center KGC of the system;
2) the users of both parties carry out the transaction, inquire about the historical transaction according to the both sides' label of the transaction, including the transaction that two parts carry out on the chain and under the chain, the information of the historical transaction mainly includes transaction amount, time stamp and transaction mode; if the transaction quantity of the two parties is smaller than the threshold value delta, performing cold start division on the transaction, and otherwise, performing logistic regression division;
3) if the transaction amount is large and the predicted transaction frequency of both parties is low, then the transaction will tend to be executed on the chain; conversely, if the transaction amount is small and the prediction frequency is high, the transaction tends to be executed down the chain;
4) the online transaction, namely the transaction after proposal, endorsement, sequencing, packaging and verification process in the alliance chain, and the offline transaction, namely the transaction in the offline payment channel;
the cold start division specifically includes: through a static information matching method, according to the service type preference provided by both parties during registration, the transaction frequency of both parties is predicted in a coarse-grained manner by combining the actual transaction amount and the service type; if the service of the Internet of things equipment is selected, the data provided by the equipment can be continuously obtained in a short time, the transaction frequency is high, the transaction amount is small, and the transaction in a payment channel under the chain is proper; selecting a service such as a cloud service or a blockchain platform which is prone to be used for a long time continuously;
the logistic regression partition specifically includes: using supervised learning method, obtaining [0,1 ] executed under input transaction chain through two-classification logistic regression model]Interval probability, if the probability is larger than 0.5, executing under the chain, otherwise executing on the chain; the historical transaction sets of the two parties are Thistory={τ1,τ2,...,τn},It is converted into n labelled samples (. alpha.)1,β1),(α2,β2),…,(αi,βi),…,(αn,βn) In which α isi=(α1,α2,...,αD) Is a feature vector with dimension D, representing D attributes of transaction information, and a label betaiE {0, 1} represents two execution modes of the transaction, and the weight vector omega of the model is set to (omega)1,ω2,...,ωn) And weighting and summing the elements of the feature vector, and inputting a Sigmoid activation function, wherein the logistic regression model is as follows:
Figure FDA0002693068780000021
the weight vector omega is used for leading the output of the model in the training set to be as close to a given label as possible, and after the vector omega is trained, the transaction characteristic vector alpha needing to be predicted is substituted into the vector omega
Figure FDA0002693068780000031
In the method, the execution mode of the transaction can be judged according to the output beta value, and the difference between the output of the model and the real model is measured through a loss function.
6. The federation chain-based offline secure payment method of claim 1, wherein providing a secure offline transaction execution environment and introducing lightweight consensus ensures that offline clearing results are consistent specifically comprises:
1) with one piece of information M for down-link transactions B to SB→SSending the node to 3f +1(f is more than or equal to 1) nodes for calculation;
2) running a PBFT protocol to carry out consensus on the calculation result of each node, and obtaining a consistency result by the system as long as not less than 2f +1 non-malicious nodes work normally;
3) the system encrypts the hash value of the transaction result by using a private key of B to generate a digital signature, and then packs the signature, the transaction result and a public key of B into a deposit certificate;
4) if disputes occur during the clearing of both parties under the link, the system can review the malicious transaction according to the transaction result of the evidence storing content.
7. A computer device, characterized in that the computer device comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of:
based on the alliance chain bottom layer architecture, allowing authorized nodes to join the network and maintaining an account book;
the method comprises the steps of realizing a token model based on the Etheng token standard ERC20 by writing an intelligent contract;
after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm;
and a safe under-chain transaction execution environment is provided, and lightweight consensus is introduced to ensure that under-chain clearing results are consistent.
8. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
based on the alliance chain bottom layer architecture, allowing authorized nodes to join the network and maintaining an account book;
the method comprises the steps of realizing a token model based on the Etheng token standard ERC20 by writing an intelligent contract;
after the token is distributed to the users, the users can carry out payment transaction, and the system can determine the execution on a transaction chain or under the transaction chain according to a transaction dynamic partitioning algorithm;
and a safe under-chain transaction execution environment is provided, and lightweight consensus is introduced to ensure that under-chain clearing results are consistent.
9. A federation chain-based under-chain secure payment system for implementing the method of any one of claims 1 to 6, wherein the federation chain-based under-chain secure payment system comprises:
the on-chain storage module is used for allowing authorized nodes to join the network and maintaining the account book based on the alliance chain bottom architecture;
the token generation module is used for realizing a token model based on the Ethengfang token ERC20 by compiling an intelligent contract of a alliance chain;
the system comprises a transaction dividing module, a transaction dynamic dividing module and a transaction processing module, wherein the transaction dividing module is used for performing payment transaction among users after being allocated to tokens of the users, and the system can determine the execution of the transaction on a link or under the link according to a transaction dynamic dividing algorithm;
and the safety guarantee module is used for providing a safe under-chain transaction execution environment and introducing lightweight consensus to ensure that under-chain clearing results are consistent.
10. A terminal, characterized in that the terminal is equipped with the alliance chain-based under-link secure payment system of claim 9, and the terminal is a transaction information processing terminal, an intelligent service transaction terminal, a lightning payment network terminal of a bitcoin block chain, or a lightning payment network terminal of an ethernet platform.
CN202010997547.9A 2020-09-21 2020-09-21 Alliance chain-based link security payment method, system, medium and equipment Pending CN112241884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010997547.9A CN112241884A (en) 2020-09-21 2020-09-21 Alliance chain-based link security payment method, system, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010997547.9A CN112241884A (en) 2020-09-21 2020-09-21 Alliance chain-based link security payment method, system, medium and equipment

Publications (1)

Publication Number Publication Date
CN112241884A true CN112241884A (en) 2021-01-19

Family

ID=74171594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010997547.9A Pending CN112241884A (en) 2020-09-21 2020-09-21 Alliance chain-based link security payment method, system, medium and equipment

Country Status (1)

Country Link
CN (1) CN112241884A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966044A (en) * 2021-02-26 2021-06-15 支付宝(杭州)信息技术有限公司 Data storage method and system of IOT (input/output) equipment based on block chain
CN113762963A (en) * 2021-08-27 2021-12-07 中国银联股份有限公司 Transaction processing method, device, equipment and storage medium
WO2023207078A1 (en) * 2022-04-29 2023-11-02 蚂蚁区块链科技(上海)有限公司 Data processing method and apparatus, electronic device, and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966044A (en) * 2021-02-26 2021-06-15 支付宝(杭州)信息技术有限公司 Data storage method and system of IOT (input/output) equipment based on block chain
CN113762963A (en) * 2021-08-27 2021-12-07 中国银联股份有限公司 Transaction processing method, device, equipment and storage medium
WO2023024453A1 (en) * 2021-08-27 2023-03-02 中国银联股份有限公司 Transaction processing method and apparatus, and device and storage medium
TWI816329B (en) * 2021-08-27 2023-09-21 大陸商中國銀聯股份有限公司 A transaction processing method, device, equipment and storage medium
WO2023207078A1 (en) * 2022-04-29 2023-11-02 蚂蚁区块链科技(上海)有限公司 Data processing method and apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
Tan et al. A blockchain-empowered crowdsourcing system for 5G-enabled smart cities
CN112241884A (en) Alliance chain-based link security payment method, system, medium and equipment
US20220038289A1 (en) Multi-access edge computing node with distributed ledger
US11568257B2 (en) Secure cloud-based machine learning without sending original data to the cloud
WO2020119512A1 (en) Task processing method, system and device, and storage medium
KR102351085B1 (en) Method, apparatus and electronic device for risk identification related to transaction to be processed
Chakravarty et al. Fast isomorphic state channels
CN112204557A (en) System and method for automated decentralized multilateral transaction processing
US11657289B2 (en) Computational graph optimization
CN113221163B (en) Model training method and system
US11165810B2 (en) Password/sensitive data management in a container based eco system
Karmakar et al. ChainSure: Agent free insurance system using blockchain for healthcare 4.0
Seol et al. A variable bulk arrival and static bulk service queueing model for blockchain
CN110825589A (en) Anomaly detection method and device for micro-service system and electronic equipment
Spirkina et al. Approaches to modeling blockchain systems
Jiang et al. Mobile internet mobile agent system dynamic trust model for cloud computing
CN109597697A (en) A kind of resource brings processing method and processing device together
US20160004985A1 (en) Prioritizing Proposal Development Under Resource Constraints
US20210256209A1 (en) Predictive event searching utilizing a machine learning model trained using dynamically-generated event tags
US20200358662A1 (en) Identity network onboarding based on confidence scores
CN110321218A (en) A method of based on point to point network system solution MIXED INTEGER program
US20230088588A1 (en) Security as a service for machine learning
US20220300822A1 (en) Forgetting data samples from pretrained neural network models
Zhang et al. Bitcoin transaction confirmation time prediction: A classification view
CN116187414A (en) Neural network model encryption and decryption method and related system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination