CN114266603A - Block chain UTXO transaction-based point management method, equipment and medium - Google Patents
Block chain UTXO transaction-based point management method, equipment and medium Download PDFInfo
- Publication number
- CN114266603A CN114266603A CN202111623297.3A CN202111623297A CN114266603A CN 114266603 A CN114266603 A CN 114266603A CN 202111623297 A CN202111623297 A CN 202111623297A CN 114266603 A CN114266603 A CN 114266603A
- Authority
- CN
- China
- Prior art keywords
- transaction
- utxo
- points
- user
- transaction information
- 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
Links
- 238000007726 management method Methods 0.000 title abstract description 22
- 238000000034 method Methods 0.000 claims abstract description 53
- 230000008569 process Effects 0.000 claims abstract description 30
- 238000012795 verification Methods 0.000 claims abstract description 22
- 230000010354 integration Effects 0.000 claims description 8
- 239000000126 substance Substances 0.000 claims description 3
- 230000000694 effects Effects 0.000 description 6
- 230000001737 promoting effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the specification discloses an integral management method, equipment and a medium based on block chain UTXO transaction, wherein the method comprises the following steps: generating a first transaction item according to the integral quantity spent by the UTXO transaction in the UTXO transaction process of a user; generating a second transaction item according to the residual number of points; generating UTXO transaction information according to the first transaction item and the second transaction item, storing the UTXO transaction information to a block chain, and acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an account internal integral initial source and an initial integral quantity of a user; if the UTXO transaction information passes the verification, performing integral transaction according to the UTXO transaction information to generate a transaction code corresponding to the UTXO transaction information; according to the transaction process of the multiple UTXO transaction information, a plurality of transaction codes are respectively generated so as to determine the flow direction and the source of the points in the user account through the transaction codes, and the point management of the user points is realized.
Description
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method, an apparatus, and a medium for point management based on blockchain UTXO transactions.
Background
With the development of economic society, various promotion activities such as mobile phone application programs, computer software, bank credit cards and the like become more and more common. To increase usage, promotional activities are developed in the form of issuing bonus points. The mode of issuing the reward points has relatively good popularization effect, and the interest of the user in the popularization affairs can be greatly aroused.
In the existing point transaction mode, when points are actually issued, a user account is subjected to network attack, so that the points in the account are maliciously cleared, and the reputation of the merchant is influenced and the benefit of the user is damaged. Due to the lack of effective management of reward points, the safety of points in the user account cannot be guaranteed.
Disclosure of Invention
One or more embodiments of the present specification provide a method, an apparatus, and a medium for point management based on a blockchain UTXO transaction, which are used to solve the following technical problems: the lack of effective management of reward points results in an inability to secure points within a user's account.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present specification provide a point management method based on a blockchain UTXO transaction, the method including:
acquiring the total number of points in the account of the current user, and generating a first transaction item according to the number of points to be spent in the UTXO transaction process of the user; determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent; taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points; generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to a block chain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account; acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of the user and an initial number of points; if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of a next transaction of the UTXO transaction information; and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the transaction codes and realize point management of the user points.
Further, the generating a first transaction item according to the number of credits spent for the UTXO transaction specifically includes: determining the source address of the point to be spent, the number of the points to be spent and the flow direction address of the points to be spent; and determining a first transaction item according to the point source address of the points to be spent, the point number of the points to be spent and the flow direction address of the points to be spent.
Further, the generating a second transaction item according to the remaining point number of the user specifically includes: determining the integral source address of the residual integral, and taking the address information of the user as the flow direction address of the residual integral; and determining a second transaction item according to the point source address of the remaining points, the point quantity of the remaining points and the flow direction address of the remaining points.
Further, the method verifies the UTXO transaction information according to preset initial UTXO transaction information, and before the verifying, the method further includes: determining a point source address of points in a user account according to address information corresponding to the point issuing merchant; determining the initial point number in the user account according to the point number issued to the user by the point issuing merchant; and generating initial UTXO transaction information through the point source address of the point and the initial point number in the user account, and storing the initial UTXO transaction information to the block chain.
Further, the acquiring multiple pieces of designated UTXO transaction information and initial UTXO transaction information occurring before the UTXO transaction information to verify the UTXO transaction information specifically includes: calculating the sum of the integral quantity to be spent and the integral quantity of the residual integral in the UTXO transaction information as a first integral total quantity; calculating the sum of the integral quantity in the first transaction item respectively corresponding to the plurality of pieces of appointed UTXO transaction information as a second integral total quantity; judging whether the point source addresses of the first transaction item and the second transaction item in the UTXO transaction information are consistent with the point flow direction address of the second transaction item in the previous transaction; if the point source addresses of the first transaction item and the second transaction item in the UTXO transaction information are consistent with the point flow direction address in the previous transaction, judging whether the sum of the first point total amount and the second point total amount is consistent with the initial point amount in the initial UTXO transaction information; and if the sum of the first total amount of integration and the second total amount of integration is consistent with the total amount of integration in the initial UTXO transaction information, the UTXO transaction information is verified.
Further, before the transaction is performed according to the UTXO transaction information, the method further includes: acquiring account addresses corresponding to a plurality of transaction objects respectively, and generating an address base according to the account addresses, wherein the transaction objects are users allowed to perform transactions with each other; acquiring the transaction object of the points to be spent, and acquiring the account address of the transaction object of the points to be spent; and judging whether the account address of the transaction object with the points to be spent belongs to the address library or not, and if the account address of the transaction object belongs to the address library, judging that the transaction with the appointed reward points is a legal transaction.
Further, prior to the trading the designated reward points, the method further comprises: generating a private key of the user to be traded according to the user information of the user to be traded, and issuing the private key to the user to be traded so that the user to be traded can digitally sign the transaction of the designated reward point; and verifying the user identity of the user to be transacted according to the digital signature of the user to be transacted.
Further, the determining the destination and the source of all bonus points in the user account through the transaction code specifically includes: acquiring a current transaction code corresponding to a user account, and determining UTXO transaction information corresponding to the current transaction code; determining address information of transaction input points according to point source addresses in a first transaction item and a second transaction item in the UTXO transaction information, and determining address information of transaction output points according to receiving addresses in the first transaction item and the second transaction item in the UTXO transaction information; determining the point source of the transaction input points in the current transaction according to the address information of the transaction input points, and determining the point destination of the transaction output points in the current transaction according to the address information of the transaction output points; and acquiring a plurality of transaction codes generated by the user account within a preset time period, and determining the destination and the source of all the reward points in the user account.
One or more embodiments of the present specification provide a point management apparatus for a blockchain UTXO transaction, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring the total number of points in the account of the current user, and generating a first transaction item according to the number of points to be spent in the UTXO transaction process of the user; determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent; taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points; generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to a block chain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account; acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of the user and an initial number of points; if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of a next transaction of the UTXO transaction information; and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the transaction codes and realize point management of the user points.
One or more embodiments of the present specification provide a non-transitory computer storage medium storing computer-executable instructions configured to:
acquiring the total number of points in the account of the current user, and generating a first transaction item according to the number of points to be spent in the UTXO transaction process of the user; determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent; taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points; generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to a block chain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account; acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of the user and an initial number of points; if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of a next transaction of the UTXO transaction information; and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the transaction codes and realize point management of the user points.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
the transaction information is generated for each transaction in the transaction process, two transaction items are divided into one transaction information according to the flow direction of the point, the transaction item which is not spent in the transaction is the point source item of the next transaction, the transaction process of each transaction point is verified before the transaction, each transaction is linked up and stored in a transaction coding mode, and due to the confidentiality of a block chain and the non-falsification characteristic of the block chain, whether the transaction information is real and effective or not is judged in the UTXO transaction mode, so that the safety of user points is effectively guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort. In the drawings:
fig. 1 is a flowchart illustrating a point management method based on a blockchain UTXO transaction according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a point management device based on a blockchain UTXO transaction according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present specification without any creative effort shall fall within the protection scope of the present specification.
With the development of economic society, various promotion activities such as mobile phone application programs, computer software, bank credit cards and the like become more and more common. To increase usage, promotional activities are developed in the form of issuing bonus points. The mode of issuing the reward points has relatively good popularization effect, and the interest of the user in the popularization affairs can be greatly aroused.
In the existing point transaction mode, when points are actually issued, the points are not issued to a user account, and a network attack is suffered in the user account, so that the points in the account are removed, and the reputation of the merchant is influenced and the benefit of the user is damaged. Due to the lack of effective management of reward points, the safety of points in the user account cannot be guaranteed.
The embodiment of the present specification provides an integration management method based on a blockchain UTXO transaction, where an execution subject in the embodiment of the present specification may be a server, or may be any device with processing capability, and the embodiment of the present specification is not specifically limited herein. Fig. 1 is a block chain UTXO transaction-based point management method according to an embodiment of the present disclosure, as shown in fig. 1, the method mainly includes the following steps:
step S101, acquiring the total number of the integrals in the account of the current user, and generating a first transaction item according to the total number of the integrals to be spent in the UTXO transaction process of the user; and determining the residual point number in the account of the user according to the total point number and the point number to be spent, taking the address information of the user as the flow direction address of the residual point, and generating a second transaction item according to the residual point number.
In one embodiment of the present description, the remaining number of credits is determined based on the total number of credits in the current user account and the number of credits to be spent. For example, the current account of the user has 20 points, the transaction needs 5 points, and the remaining number of points is 15 points.
In one embodiment of the present description, the first transaction item is generated based on the number of points to be spent for the transaction. First, the point source address of the point to be spent, i.e. where the point is derived, the number of points to be spent in the transaction is determined, and who the spent point is to be traded with is determined, i.e. the point flows to the address. And determining a first transaction item according to the point source address of the points to be spent, the point quantity of the points to be spent and the flow direction address of the points to be spent, wherein the first transaction item is transaction information of the points to be spent. As illustrated below, for example, user a may spend 5 points and user B may purchase service. The source of the user A is the transaction output which is not spent in the previous transaction, the number of the credits to be spent is 5, the credits are finally given to the user B, and the account address of the user B is the flow address of the credits.
In one embodiment of the present specification, it should be noted that the credit source for determining the remaining credit amount is an unspent credit output, and therefore the credit source for determining the remaining credit amount is an unspent credit output in the previous transaction, and since it is necessary to ensure that all credits in the user account are spent after each transaction in the UTXO transaction, the remaining credit amount is a change process in the UTXO transaction process, and the receiving address of the remaining credit is the user's own account. That is, the address information of the user is taken as the stream address of the remaining points. And determining a second transaction item according to the point source address of the remaining points, the point quantity of the remaining points and the flow direction address of the remaining points. It should be noted that the second transaction item is a transaction item of the remaining points.
Step S102, generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to the block chain.
In one embodiment of the present description, UTXO transaction information is generated based on the first transaction item and the second transaction item, the sum of the number of credits to be spent in the UTXO transaction information being the total number of credits within the current user account. And storing the UTXO transaction information corresponding to the current transaction into a block chain so as to store the UTXO transaction information, and avoid that the transaction information is maliciously changed when the UTXO transaction information is attacked by a network and the integral security in the account of the user is damaged.
Step S103, acquiring a plurality of pieces of designated UTXO transaction information and initial UTXO transaction information occurring before the UTXO transaction information, so as to verify the UTXO transaction information.
The initial UTXO transaction information includes an initial source of points in the user's account and an initial number of points. Taking the reward points issued by the promotion activity as an example, the initial UTXO transaction is the total amount of points issued to the user by the merchant, the corresponding total amount of points is the initial amount of points in the user account, and the address of the merchant account issuing the points is the initial source of the points in the user account.
Specifically, according to address information corresponding to the point issuing merchant, determining a point source address of the points in the user account; determining the initial point number in the user account according to the point number issued to the user by the point issuing merchant; and generating initial UTXO transaction information through the point source address of the points and the initial point number in the user account, and storing the initial UTXO transaction information to the block chain.
In one embodiment of the present description, the account address information corresponding to the point issuing merchant serves as the point source address of the bonus points in the user account. The amount of points issued by the merchant to the user is the initial amount of points in the user account. For example, the user downloads a designated application program according to the specification in the merchant promotion activity, and the merchant issues 100 points to the user as an incentive, so that initial UTXO transaction information is formed, in which the point source address is the account address of the merchant and the initial point number is 100 points.
It should be noted that the UTXO transaction process performed by the user defaults to a transaction that is larger than the third transaction performed by the user using the credit in the account, that is, the user may be considered to perform the fourth credit transaction. The first transaction is an initial transaction, that is, transaction information generated by the merchant and issued to the user. The second transaction and the third transaction both belong to UTXO transactions, that is, the point source of the second transaction corresponds to the point flow of the initial transaction, and the point source of the third transaction is a transaction output that is not spent in the second transaction, that is, a transaction item whose point receiving address is the user's own account address.
In one embodiment of the present description, transaction information for a plurality of designated UTXO transactions performed prior to a current UTXO transaction is determined, the first transaction item and the second transaction item being included in the transaction information for each designated UTXO transaction. The sum of the number of credits to be spent and the number of credits remaining in the UTXO transaction information is calculated as a first total number of credits. And calculating the sum of the number of the integrals in the first transaction item respectively corresponding to the plurality of pieces of appointed UTXO transaction information as a second total number of the integrals.
Judging whether the point source addresses of the first transaction item and the second transaction item in the UTXO transaction information are consistent with the point flow address in the previous transaction, if the point source addresses of the first transaction item and the second transaction item in the UTXO transaction information are not consistent with the point flow address of the second transaction item in the previous transaction, the point source of the point in the UTXO transaction is not the transaction output which is not spent in the previous transaction, and therefore the situation that the illegal points are obtained possibly exists in the user, the user does not pass the verification of the UTXO transaction, and the transaction cannot be completed in order to guarantee the transaction environment.
If the point source addresses of the first transaction item and the second transaction item in the UTXO transaction information are consistent with the point flow direction address in the previous transaction, the point source of the point in the transaction is the transaction output which is not spent in the previous transaction, and the point source of the transaction is legal. And continuously judging the total number of the integrals, judging whether the sum of the first total number of the integrals and the second total number of the integrals is consistent with the initial total number of the integrals in the initial UTXO transaction information, and if the sum of the first total number of the integrals and the second total number of the integrals is consistent with the total number of the integrals in the initial UTXO transaction information, passing the verification of the UTXO transaction information.
For example, the merchant issues 100 points to the a user, the a user spends 20 points for the first time purchasing the member of the user B, and the a user spends 30 points for the second time purchasing the member of the user C, this time the a user wants to spend 20 points purchasing the resource of the D user. First, initial UTXO transaction information is determined in which the initial credit source is the merchant account address and the initial credit amount is 100. The point source of the first transaction item in the first UTXO transaction information is the account address of the merchant, the point quantity is 20 points, and the point flow direction address is the account address of the user B; the source of points for the second transaction item is the merchant account address, the amount of points is 80 points, and the point flow address is the account address of user a. The point source of the first transaction item in the second UTXO transaction information is the account address of the user A, the point quantity is 30 points, and the point flow direction address is the account address of the user C; the source of points for the second transaction item is the account address of user a, the number of points is 50 points, and the flow of points to the address is the account address of user a. The point source of the first transaction item in the UTXO transaction information at this time is the account address of the user A, the point quantity is 20 points, and the point flow direction address is the account address of the user D; the source of points for the second transaction item is the account address of user a, the number of points is 30 points, and the flow of points to the address is the account address of user a.
Calculating the sum of the number of integrals of the first transaction item and the second transaction item in the UTXO transaction information of the time to be 20+30 to 50, and calculating the sum of the number of integrals of the two first transaction items in the first UTXO transaction information and the second UTXO transaction information of the time to be 50; the sum of the two numbers is 100, which is consistent with the initial number of points in the initial UTXO transaction information, and the number of points in the transaction is consistent with the number of points issued by the merchant. And the verification of the number of the integrals in the UTXO transaction information is carried out. If the quantity authentication is inconsistent, the illegal transaction exists before the transaction, or the points in the account of the user are maliciously stolen.
And step S104, if the UTXO transaction information passes the verification, performing integral transaction according to the UTXO transaction information to generate a transaction code corresponding to the UTXO transaction information.
It should be noted that the transaction code is used to represent the point source of the pen transaction of the UTXO transaction information.
In an embodiment of the present specification, after the UTXO transaction information is verified, in order to ensure the transaction security and the user account security, the user identity of the user in the transaction and the identity of the transaction object in the transaction need to be verified, so as to avoid the situation that the thief uses the point transaction in the account after the user account is stolen.
In one embodiment of the present description, the identity of the user is first verified. Specifically, a private key of the user to be traded is generated according to the user information of the user to be traded, and the private key is issued to the user to be traded, so that the user to be traded can digitally sign the transaction of the designated reward point; and verifying the user identity of the user to be transacted according to the digital signature of the user to be transacted. That is, when a user is receiving a transaction credit issued by a merchant, the user information needs to be submitted on the merchant's platform for user registration. And generating a private key of the user through the user information of the user, and issuing the private key to the user to be transacted. When a user to be transacted initiates a transaction, a private key is required to be used for digitally signing the transaction process aiming at the transaction. And verifying the user identity of the user to be transacted according to the data signature of the user.
In an embodiment of the present specification, after the user identity of the user to be transacted is verified, it is necessary to verify whether the transaction object of the user is a valid user, and then determine the security of the transaction. In the scenario of bonus points issued by a promotional task, the bonus points are generally issued after the user finishes downloading and registering in the application program. The issued bonus points are typically used within an application or computer software, i.e. the transaction object is also registered with personal information.
And acquiring account addresses corresponding to the transaction objects according to the registration condition of the transaction objects. And setting an address base according to the account addresses of all transaction objects allowing transactions, wherein a plurality of transaction objects are users allowing transactions with each other. Acquiring a transaction object to be subjected to point spending in the transaction, and acquiring an account address of the transaction object; and judging whether the account address of the transaction object belongs to the address library, and if the account address of the transaction object belongs to the address library, judging that the transaction of the designated reward points is a legal transaction.
After the verification, the current UTXO transaction is judged to be legal, and the transaction is allowed, and then the integration transaction is carried out according to the UTXO transaction information to generate a transaction code corresponding to the UTXO transaction information.
And step S105, respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information, so as to determine the flow direction and the source of the points in the user account through the transaction codes and realize point management of the user points.
In one embodiment of the present specification, a plurality of corresponding transaction codes are respectively generated according to a transaction process of a plurality of UTXO transaction information. And storing the plurality of transaction codes into the blockchain, and acquiring corresponding UTXO transaction information through the corresponding transaction codes. In addition, the codes are stored in the chain, so that the condition of tampering is avoided, and the safety of the credit account of the user is further ensured.
In one embodiment of the present description, the UTXO transaction information corresponding to the current transaction code is determined by acquiring the current transaction code corresponding to the user account; and determining address information of transaction input points according to the point source addresses in the first transaction item and the second transaction item in the UTXO transaction information, and determining address information of transaction output points according to the receiving addresses in the first transaction item and the second transaction item in the UTXO transaction information. It should be noted that the address information of the transaction input points is the point source of the current transaction, so that the point source of the transaction input points in the current transaction can be determined according to the address information of the transaction input points. The credit address of the transaction output credit comprises two items, one is the credit to be spent for other users, and the other item is the partial credit to be spent for the credit to be accounted, namely the residual credit. And determining the direction of the transaction output points in the current transaction according to the address information of the transaction output points, wherein the direction of the points comprises other user accounts and the own account.
In one embodiment of the present description, obtaining a plurality of transaction codes generated by a user account within a preset time period may determine the destination and source of all bonus points in the user account. For example, transaction codes of all transactions of a user in a week are acquired, UTXO transaction information corresponding to each transaction can be acquired through each transaction code, the accumulated points of each accumulated point are judged through a first transaction item in the UTXO transaction information, and a second transaction item is the remaining accumulated points in the account after the current transaction. And sequentially tracing forwards through the point sources in the first transaction item and the second transaction item to judge the source information of the points, thereby realizing the tracing of the point sources and the points.
The transaction information is generated for each transaction in the transaction process, two transaction items are divided into one transaction information according to the flow direction of the point, the transaction item which is not spent in the transaction is the point source item of the next transaction, the transaction process of each transaction point is verified before the transaction, each transaction is linked up and stored in a transaction coding mode, and due to the confidentiality of a block chain and the non-falsification characteristic of the block chain, whether the transaction information is real and effective or not is judged in the UTXO transaction mode, so that the safety of user points is effectively guaranteed.
An embodiment of the present specification further provides a point management device based on a blockchain UTXO transaction, as shown in fig. 2, the device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to cause the at least one processor to:
acquiring the total number of the integrals in the account of the current user, and generating a first transaction item according to the total number of the integrals to be spent in the UTXO transaction process of the user; determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent; taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points; generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to the blockchain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account; acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of a user and an initial point number; if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of the next transaction of the UTXO transaction information; and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the plurality of transaction codes and realize point management of the user points.
Embodiments of the present description also provide a non-volatile computer storage medium storing computer-executable instructions configured to: acquiring the total number of the integrals in the account of the current user, and generating a first transaction item according to the total number of the integrals to be spent in the UTXO transaction process of the user; determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent; taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points; generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to the blockchain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account; acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of a user and an initial point number; if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of the next transaction of the UTXO transaction information; and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the plurality of transaction codes and realize point management of the user points.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.
Claims (10)
1. A method for point management based on blockchain UTXO transactions, the method comprising:
acquiring the total number of points in the account of the current user, and generating a first transaction item according to the number of points to be spent in the UTXO transaction process of the user;
determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent;
taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points;
generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to a block chain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account;
acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of the user and an initial number of points;
if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of a next transaction of the UTXO transaction information;
and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the transaction codes and realize point management of the user points.
2. The method according to claim 1, wherein the generating a first transaction item according to the number of credits to be spent for the UTXO transaction comprises:
determining the source address of the point to be spent, the number of the points to be spent and the flow direction address of the points to be spent;
and determining a first transaction item according to the point source address of the points to be spent, the point number of the points to be spent and the flow direction address of the points to be spent.
3. The method according to claim 2, wherein the generating a second transaction item according to the remaining credit amount by using the address information of the user as a streaming address of the remaining credit specifically comprises:
determining the integral source address of the residual integral, and taking the address information of the user as the flow direction address of the residual integral;
and determining a second transaction item according to the point source address of the remaining points, the point quantity of the remaining points and the flow direction address of the remaining points.
4. The method of claim 3, wherein the UTXO transaction information is verified according to a predetermined initial UTXO transaction information, and wherein the method further comprises:
determining a point source address of points in a user account according to address information corresponding to the point issuing merchant;
determining the initial point number in the user account according to the point number issued to the user by the point issuing merchant;
and generating initial UTXO transaction information through the point source address of the point and the initial point number in the user account, and storing the initial UTXO transaction information to the block chain.
5. The method as claimed in claim 4, wherein the obtaining of the plurality of pieces of the specific UTXO transaction information and the initial UTXO transaction information occurring before the UTXO transaction information for verifying the UTXO transaction information comprises:
calculating the sum of the number of the integrals to be spent in the first transaction item of the UTXO transaction information and the number of the integrals of the residual integrals in the second transaction item of the UTXO transaction information as a first total integral amount;
calculating the sum of the integral quantity in the first transaction item respectively corresponding to the plurality of pieces of appointed UTXO transaction information as a second integral total quantity;
judging whether the point source addresses of the first transaction item and the second transaction item in the UTXO transaction information are consistent with the point flow direction address of the second transaction item in the previous transaction;
if the point source addresses of the first transaction item and the second transaction item in the UTXO transaction information are consistent with the point flow direction address in the previous transaction, judging whether the sum of the first point total amount and the second point total amount is consistent with the initial point amount in the initial UTXO transaction information;
and if the sum of the first total amount of integration and the second total amount of integration is consistent with the initial total amount of integration in the initial UTXO transaction information, the UTXO transaction information is verified.
6. The method of claim 1, wherein prior to conducting a transaction based on the UTXO transaction information, the method further comprises:
acquiring account addresses corresponding to a plurality of transaction objects respectively, and generating an address base according to the account addresses, wherein the transaction objects are users allowed to perform transactions with each other;
acquiring the transaction object of the points to be spent, and acquiring the account address of the transaction object of the points to be spent;
and judging whether the account address of the transaction object with the points to be spent belongs to the address library or not, and if the account address of the transaction object belongs to the address library, judging that the transaction with the appointed reward points is a legal transaction.
7. The method of claim 1, wherein prior to trading the designated reward points, the method further comprises:
generating a private key of the user to be traded according to the user information of the user to be traded, and issuing the private key to the user to be traded so that the user to be traded can digitally sign the transaction of the designated reward point;
and verifying the user identity of the user to be transacted according to the digital signature of the user to be transacted.
8. The method of claim 1, wherein determining the destination and source of all bonus points in the user account via the transaction code comprises:
acquiring a current transaction code corresponding to a user account, and determining UTXO transaction information corresponding to the current transaction code;
determining address information of transaction input points according to point source addresses in a first transaction item and a second transaction item in the UTXO transaction information, and determining address information of transaction output points according to receiving addresses in the first transaction item and the second transaction item in the UTXO transaction information;
determining the point source of the transaction input points in the current transaction according to the address information of the transaction input points, and determining the point destination of the transaction output points in the current transaction according to the address information of the transaction output points;
and acquiring a plurality of transaction codes generated by the user account within a preset time period, and determining the destination and the source of all the reward points in the user account.
9. A point management device for blockchain UTXO transactions, the device comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring the total number of points in the account of the current user, and generating a first transaction item according to the number of points to be spent in the UTXO transaction process of the user;
determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent;
taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points; generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to a block chain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account;
acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of the user and an initial number of points;
if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of a next transaction of the UTXO transaction information;
and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the transaction codes and realize point management of the user points.
10. A non-transitory computer storage medium storing computer-executable instructions configured to:
acquiring the total number of points in the account of the current user, and generating a first transaction item according to the number of points to be spent in the UTXO transaction process of the user;
determining the residual integral quantity in the user account according to the total integral quantity and the integral quantity to be spent;
taking the address information of the user as the flow direction address of the remaining points, and generating a second transaction item according to the number of the remaining points; generating UTXO transaction information according to the first transaction item and the second transaction item, and storing the UTXO transaction information to a block chain, wherein the UTXO transaction information is used for representing the transaction information of the current point in the user account;
acquiring a plurality of pieces of appointed UTXO transaction information and initial UTXO transaction information which occur before the UTXO transaction information so as to verify the UTXO transaction information, wherein the initial UTXO transaction information comprises an initial source of points in an account of the user and an initial number of points;
if the UTXO transaction information passes the verification, performing point transaction according to the UTXO transaction information after passing the verification to generate a transaction code corresponding to the UTXO transaction information, wherein the transaction code is used for representing a point source of a next transaction of the UTXO transaction information;
and respectively generating a plurality of transaction codes according to the transaction process of the plurality of UTXO transaction information so as to determine the flow direction and the source of the points in the user account through the transaction codes and realize point management of the user points.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111623297.3A CN114266603A (en) | 2021-12-28 | 2021-12-28 | Block chain UTXO transaction-based point management method, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111623297.3A CN114266603A (en) | 2021-12-28 | 2021-12-28 | Block chain UTXO transaction-based point management method, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114266603A true CN114266603A (en) | 2022-04-01 |
Family
ID=80830859
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111623297.3A Pending CN114266603A (en) | 2021-12-28 | 2021-12-28 | Block chain UTXO transaction-based point management method, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114266603A (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110473104A (en) * | 2019-08-20 | 2019-11-19 | 深圳市网心科技有限公司 | A kind of transaction processing method and relevant device |
CN110599165A (en) * | 2019-09-04 | 2019-12-20 | 杭州时戳信息科技有限公司 | Credit system construction method based on block chaining currency sky destruction |
CN110648229A (en) * | 2019-08-07 | 2020-01-03 | 中国科学院信息工程研究所 | Semi-public block chain system and transaction method |
CN110675147A (en) * | 2019-09-11 | 2020-01-10 | 上海唯链信息科技有限公司 | Block chain transaction method, electronic equipment and storage device |
CN110728504A (en) * | 2019-09-06 | 2020-01-24 | 平安壹钱包电子商务有限公司 | Data processing method, device and equipment of block chain and readable storage medium |
CN110766549A (en) * | 2018-07-27 | 2020-02-07 | 翟红鹰 | Digital asset safe transaction method and device, computer equipment and storage medium |
CN111047441A (en) * | 2019-11-16 | 2020-04-21 | 北京比特时刻图像科技有限公司 | Block chain system for issuing multiple integral certificates |
CN111383005A (en) * | 2018-12-29 | 2020-07-07 | 北京知帆科技有限公司 | Digital currency flow direction tracking method and device |
CN112001713A (en) * | 2019-05-27 | 2020-11-27 | 深圳市红砖坊技术有限公司 | Block chain system and request processing method and device |
CN112464282A (en) * | 2020-12-02 | 2021-03-09 | 中国建设银行股份有限公司 | Method and device for generating and processing account transaction information based on block chain |
CN112541759A (en) * | 2020-11-30 | 2021-03-23 | 北京八分量信息科技有限公司 | Hidden transaction method and device based on UTXO model in block chain system and related products |
CN113723953A (en) * | 2020-05-26 | 2021-11-30 | 北京金山云网络技术有限公司 | Digital asset transaction method, device and system and electronic equipment |
-
2021
- 2021-12-28 CN CN202111623297.3A patent/CN114266603A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766549A (en) * | 2018-07-27 | 2020-02-07 | 翟红鹰 | Digital asset safe transaction method and device, computer equipment and storage medium |
CN111383005A (en) * | 2018-12-29 | 2020-07-07 | 北京知帆科技有限公司 | Digital currency flow direction tracking method and device |
CN112001713A (en) * | 2019-05-27 | 2020-11-27 | 深圳市红砖坊技术有限公司 | Block chain system and request processing method and device |
CN110648229A (en) * | 2019-08-07 | 2020-01-03 | 中国科学院信息工程研究所 | Semi-public block chain system and transaction method |
CN110473104A (en) * | 2019-08-20 | 2019-11-19 | 深圳市网心科技有限公司 | A kind of transaction processing method and relevant device |
CN110599165A (en) * | 2019-09-04 | 2019-12-20 | 杭州时戳信息科技有限公司 | Credit system construction method based on block chaining currency sky destruction |
CN110728504A (en) * | 2019-09-06 | 2020-01-24 | 平安壹钱包电子商务有限公司 | Data processing method, device and equipment of block chain and readable storage medium |
CN110675147A (en) * | 2019-09-11 | 2020-01-10 | 上海唯链信息科技有限公司 | Block chain transaction method, electronic equipment and storage device |
CN111047441A (en) * | 2019-11-16 | 2020-04-21 | 北京比特时刻图像科技有限公司 | Block chain system for issuing multiple integral certificates |
CN113723953A (en) * | 2020-05-26 | 2021-11-30 | 北京金山云网络技术有限公司 | Digital asset transaction method, device and system and electronic equipment |
CN112541759A (en) * | 2020-11-30 | 2021-03-23 | 北京八分量信息科技有限公司 | Hidden transaction method and device based on UTXO model in block chain system and related products |
CN112464282A (en) * | 2020-12-02 | 2021-03-09 | 中国建设银行股份有限公司 | Method and device for generating and processing account transaction information based on block chain |
Non-Patent Citations (1)
Title |
---|
暴走的K哥哥: "比特币本质其实是UTXO", Retrieved from the Internet <URL:https://www.jianshu.com/p/7071e68c5262> * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10776696B2 (en) | Architectures, systems and methods having segregated secure and public functions | |
US11797982B2 (en) | Digital ledger authentication using address encoding | |
CN108462724B (en) | Data sharing method, device, system, member node and readable storage medium | |
US20190295085A1 (en) | Identifying fraudulent transactions | |
CN105719172A (en) | Information issuing method and device | |
US20220036350A1 (en) | Cross-border resource transfer authenticity verification method, device and electronic equipment | |
CN111641655A (en) | Block chain-based guarantee fund service processing method, device and system | |
CN111325585A (en) | Asset transfer method, device and computer readable storage medium | |
CN107506355B (en) | Object grouping method and device | |
CN110992034A (en) | Supply chain transaction privacy protection system and method based on block chain and related equipment | |
CN110020795A (en) | The method and device of risk control is provided for mutual fund earnings | |
CN112364333A (en) | Method and system for providing service by using two-dimension code and one-code platform | |
CN1224947C (en) | Aging of electronic payment unit | |
WO2020226531A2 (en) | Method for remotely verifying documents | |
CN114266603A (en) | Block chain UTXO transaction-based point management method, equipment and medium | |
CN105354740A (en) | Method and apparatus for establishing personal credit information database | |
CN115375308A (en) | Secure payment method and device, storage medium and electronic equipment | |
CN112330330B (en) | Rights and interests data processing method and device, computer equipment and storage medium | |
WO2021121030A1 (en) | Resource transfer method, settlement terminal, and server node | |
CN115114642A (en) | Financing lease verification method, device and equipment based on under-chain trusted computing | |
CN114037527A (en) | Transaction data processing method and device, computer equipment and storage medium | |
CN113723952A (en) | Resource state information processing method and device and electronic equipment | |
CN112330374A (en) | Block chain integral marketing method and system based on distributed identity | |
CN110910091A (en) | Data processing method, device and medium | |
Nageswaran et al. | Digipound: A Proof-of-Concept Stablecoin Audited in Real Time |
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 |