Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a blockchain-based rights issuing method and apparatus, an electronic device, and a storage medium.
In order to achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, there is provided a blockchain-based rights issuing method, including:
receiving a rights acquisition transaction submitted by a user, wherein the rights acquisition transaction comprises user information of the user;
invoking rights issuing logic declared in the intelligent contract published on the blockchain in response to the rights acquisition transaction to determine whether the user information meets rights issuing conditions; the method comprises the steps of,
and when the user information accords with the rights and interests issuing condition, issuing target rights and interests to the user according to the user information.
Optionally, the method further comprises:
and issuing the issuing result aiming at the target rights to the blockchain for certification.
Optionally, the method further comprises:
receiving a verification request for the target equity;
responding to the verification request, and determining whether a issuing result aiming at the target rights exists on the blockchain;
And if so, invoking rights and interests verifying logic which is declared in the intelligent contract which is issued on the blockchain, verifying the target rights and interests, and issuing verification results to the blockchain for verification.
Optionally, the invoking issues rights lockout logic declared in the smart contract on the blockchain, comprising:
determining whether the target equity meets equity verification conditions;
if so, invoking equity cancellation logic declared in the intelligent contracts issued on the blockchain.
Optionally, the verification request includes service information of the service related to the target rights and interests; the determining whether the target equity meets equity cancellation conditions includes:
determining the type of the target rights;
if the target equity belongs to the preferential equity, determining whether preferential treatment is completed on the business information based on the target equity; if yes, determining that the target equity meets equity verification conditions;
if the target equity belongs to the bonus equity, determining whether to allocate a bonus object corresponding to the target equity to the sender of the cancellation request after completing service processing based on the service information; if so, determining that the target equity meets equity verification conditions.
Alternatively to this, the method may comprise,
the issuing result aiming at the target rights to the blockchain for certification comprises the following steps: associating the issuing result with a contract identification of the intelligent contract declared with the equity verification logic to the blockchain;
the invoking issues rights and interests verifying logic declared in the intelligent contracts on the blockchain, and verifying the target rights and interests comprises the following steps: determining an intelligent contract declaring the equity verifying logic according to the contract identification associated with the issuing result aiming at the target equity; and calling rights and interests verifying logic stated in the determined intelligent contracts, and verifying the target rights and interests.
Alternatively to this, the method may comprise,
the issuing of the verification and approval result to the blockchain for verification comprises the following steps: associating the verification result with the issuing result and storing the verification result on the blockchain;
the method further comprises the steps of: receiving a query transaction for the target equity; and responding to the inquiry transaction, acquiring the issuing result of the certificate stored on the blockchain and the verification result associated with the issuing result.
According to a second aspect of one or more embodiments of the present specification, there is provided a blockchain-based rights issuing device, including:
The first receiving unit is used for receiving a rights and interests acquisition transaction submitted by a user, wherein the rights and interests acquisition transaction comprises user information of the user;
a calling unit for calling rights issuing logic declared in the intelligent contract issued on the blockchain in response to the rights acquisition transaction, and determining whether the user information accords with the rights issuing condition; the method comprises the steps of,
and the issuing unit is used for issuing target rights and interests to the user according to the user information when the user information accords with the rights and interests issuing conditions.
Optionally, the method further comprises:
and the certification unit issues the issuing result aiming at the target rights and interests to the blockchain for certification.
Optionally, the method further comprises:
a second receiving unit that receives a verification request for the target equity;
a determining unit, responsive to the verification request, for determining whether there is a release result for the target equity on the blockchain;
and the verifying and verifying unit is used for calling rights and interests verifying and verifying logic which is declared in the intelligent contract which is issued on the blockchain, verifying and verifying the target rights and interests, and issuing verifying and verifying results to the blockchain for verification.
Optionally, the verification unit is specifically configured to:
Determining whether the target equity meets equity verification conditions;
if so, invoking equity cancellation logic declared in the intelligent contracts issued on the blockchain.
Optionally, the verification request includes service information of the service related to the target rights and interests; the verification unit is further configured to:
determining the type of the target rights;
if the target equity belongs to the preferential equity, determining whether preferential treatment is completed on the business information based on the target equity; if yes, determining that the target equity meets equity verification conditions;
if the target equity belongs to the bonus equity, determining whether to allocate a bonus object corresponding to the target equity to the sender of the cancellation request after completing service processing based on the service information; if so, determining that the target equity meets equity verification conditions.
Alternatively to this, the method may comprise,
the evidence storage unit is specifically used for: associating the issuing result with a contract identification of the intelligent contract declared with the equity verification logic to the blockchain;
the verification unit is specifically used for: determining an intelligent contract declaring the equity verifying logic according to the contract identification associated with the issuing result aiming at the target equity; and calling rights and interests verifying logic stated in the determined intelligent contracts, and verifying the target rights and interests.
Alternatively to this, the method may comprise,
the verification unit is specifically used for: associating the verification result with the issuing result and storing the verification result on the blockchain;
the apparatus further comprises: a third receiving unit that receives a query transaction for the target equity; and the acquisition unit is used for responding to the inquiry transaction and acquiring the issuing result of the certificate stored on the blockchain and the verification result associated with the issuing result.
According to a third aspect of one or more embodiments of the present specification, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement a blockchain-based equity issuing method as described in any of the embodiments above by executing the executable instructions.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of a blockchain-based equity distribution method as in any of the above embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
FIG. 1 is a flowchart of a blockchain-based rights issuing method in accordance with an exemplary embodiment. As shown in fig. 1, the method applied to a blockchain node may include the steps of:
step 102, receiving a rights acquisition transaction submitted by a user, wherein the rights acquisition transaction comprises user information of the user.
In one embodiment, rights may be understood as the possession of a right for a user to enjoy the service, revenue benefits associated with himself. The equities may include a preferential equity and a complimentary equity. Wherein, the privilege may be understood as enjoying the privilege when processing the business associated with the privilege; a bonus benefit may be understood as a corresponding bonus object that may be received when the business associated with the bonus benefit is processed.
For example, in one case, when the sponsor of the equity is a payment platform (where the service associated with the equity may be a payment), the benefit may be a "enjoyment while payment" equity provided by the payment platform. For example, the user scans the two-dimensional code through the client of the payment device to get the cash red packet, and then the amount of the subsequent user pays at the store will automatically decrease the amount of the red packet. The bonus rights may be the rights offered by the paymate to pick up the prize after successful payment. For example, a user may receive a certain amount of virtual resources (e.g., member points, telephone coupons, etc.) after completing a payment through a payment facilitator client. In another case, when the sponsor of the benefit is a service transacting platform (e.g., a payment platform of a water supply unit, a power supply unit, a network operator, etc.), the service associated with the benefit may be transacting for a certain service provided by the service transacting platform, and the benefit may be a benefit provided by the service transacting platform that "transacts the service while enjoying the benefit. For example, a network operator may provide benefits for transacting broadband enjoyment eight-fold benefits. The bonus rights can be the rights provided by the service handling platform to get the prize after successful service handling. For example, the network operator may provide the benefit of additional telephone fees after handling broadband services; alternatively, the benefit of additional coupons after the broadband service is transacted (i.e., the benefit-attached object is a benefit) is provided. Similarly, the bonus object may be a virtual resource such as usage rights, points, coupons, etc. of a particular object. It should be noted that the specific form of the rights and interests may be flexibly set according to the type of sponsor, for example, shopping benefits, props obtained by completing tasks in a game system, pets, etc., which are not limited by one or more embodiments of the present disclosure.
Further, the rights issuing rules may be formulated by the sponsor of the rights. Taking a network operator as an example, the rights issuing rule may be set as: if the user handles the 200M broadband service with the service life of 1 year, the user can handle the 100M broadband service with the service life of 1 year for additional free. The rights and interests issuing condition is that the user handles the 200M broadband service with the service life of 1 year, and the target rights and interests are the rights of use (namely the complimentary objects) which can acquire the 100M broadband of 1 year.
Step 104, in response to the equity acquisition transaction, invoking equity issuing logic declared in the intelligent contracts issued on the blockchain to determine whether the user information meets equity issuing conditions.
And 106, when the user information accords with the rights and interests issuing conditions, issuing target rights and interests to the user according to the user information.
In one embodiment, the sponsor of the equity may deploy an intelligent contract on the blockchain for issuing equity to the user, and declare equity issuing logic in the intelligent contract that determines whether the user meets equity issuing conditions. After the development of the intelligent contract is completed, the sponsor of the rights and interests can issue the intelligent contract to the alliance chain through any node device in the alliance chain, and after the intelligent contract is completely identified by part of designated member node devices in the alliance chain (for example, a plurality of authoritative node devices with accounting rights designated in the alliance chain), the intelligent contract is recorded in a distributed database (namely, a distributed ledger) of the alliance chain. Subsequently, the user may initiate a contract call to the smart contract by submitting a transaction (transaction) to the smart contract embodied in the blockchain by accessing a client of any node device, triggering execution of the associated business logic on the federation chain. The common recognition algorithm and the specific common recognition process adopted by the member node devices in the alliance chain when performing common recognition processing on the intelligent contracts issued to the blockchain are not described in detail in the specification, and when the technical scheme described in the specification is reduced to be implemented by a person skilled in the art, reference can be made to the description in the related art.
For example, the blockchain may specifically be a federation chain in which federation members include a business transaction platform and a paymate. In this case, both the business transaction platform and the payment platform may act as sponsors of equity, declaring the agreed equity issuing rules in the form of equity issuing logic in the intelligent contract based on the collaborative agreement signed between the two. When the consensus is completed and the intelligent contract is issued to the blockchain, the corresponding operation funds are synchronously frozen on the payment platform, and the intelligent contract can not be thawed until the activity of issuing rights and interests is finished. It should be noted that, the type of the request initiated by the user accessing the blockchain on the blockchain may specifically refer to a transaction (transaction) adopted in a conventional blockchain. For example, a user accessing the blockchain may invoke a smart contract that has been issued in the blockchain to complete issuance of a benefit by initiating a transaction in the blockchain for acquiring the benefit (i.e., a benefit acquisition transaction). Further, the smart contract determines, based on the declared equity issuance logic, equity that the user may receive (i.e., if the user information meets at least a portion of the issuance conditions specified in the equity issuance rules, the user may receive equity corresponding to the at least a portion of the issuance conditions). Of course, the type of request initiated by the user accessing the blockchain on the blockchain may be, in particular, other types of instructions, messages, etc. having a standard data structure besides transactions, and one or more embodiments of the present disclosure are not particularly limited. In the following embodiments, a request initiated by a user accessing a blockchain on the blockchain will be described as an example of a transaction.
In an embodiment, based on the issuing of the rights and interests by using the blockchain, the issuing result of the rights and interests for the target may be further issued to the blockchain for certification. By publishing the issuing result of the rights to the blockchain, each blockchain node records a complete issuing result aiming at the rights, and even if a certain node has the problem of data damage, the whole data integrity is not affected. Meanwhile, on one hand, the non-falsifiability of the block chain storage data can be fully utilized, thereby preventing lawbreakers from maliciously modifying the content of the rights issuing result and ensuring the safety and transparency of the rights issuing result; on the other hand, the sponsor of the rights and interests can synchronously know the issuing condition of the rights and interests in real time by monitoring and pulling the blocks.
In one embodiment, based on the issuing result being in-chain, the rights and interests may be further revoked when the user is using the rights and interests. Similarly, the sponsor of the equity may declare the contracted equity cancellation rules (e.g., including equity cancellation conditions and specific ways of processing the cancellation equity) in the smart contract in the form of equity cancellation logic (e.g., equity cancellation logic may be declared in the smart contract for issuing equity described above) based on the collaborative agreement contracted between the two. Wherein, verifying the equity is understood as determining whether the issued equity is in a used state. Taking the issuing result of the stored-license target equity as an example, a verification request aiming at the target equity can be received, and whether the issuing result aiming at the target equity exists on the blockchain or not is determined in response to the verification request. If yes, invoking rights and interests verifying logic which is declared in the intelligent contracts on the blockchain, verifying and managing the target rights and interests, and issuing verification results to the blockchain for verification.
And for the invocation of the equity verification logic, whether the target equity meets equity verification conditions or not can be determined first, if so, the equity verification logic which is declared in the intelligent contract on the blockchain is invoked to verify the target equity. For example, it may be determined whether the target equity has been used by the user, and when the user has used the target equity, it may be determined that the target equity meets equity cancellation conditions, and then, the equity cancellation logic declared in the intelligent contract is invoked to perform cancellation processing on the target equity according to the cancellation processing mode set by the sponsor. Taking the target equity as an example, a description will be given of how to determine whether the target equity satisfies the equity cancellation condition according to the type of equity.
Since the target equity includes two types of equity and bonus equity, the type of target equity can be determined first. Wherein, the verification request contains service information of the service related to the target equity. When the target equity belongs to the preferential equity, determining whether preferential treatment is completed on the business information based on the target equity; if so, it can be determined that the target equity meets equity verification conditions. In one case, when the sponsor of the benefit is a payment platform, the reimbursement request may be a payment transaction submitted by the user. In this case, the transaction associated with the benefit (i.e., the benefit-related transaction) is a payment, and the payment transaction may include transaction information that is payment information (e.g., may include a payment amount, a payee, a deduction account, etc.); when the offer processing is completed for the payment amount based on the offer, it may be determined that the offer satisfies the offer cancellation condition. In another case, when the sponsor of the benefit is a business transaction platform, the reimbursement request may be a business transaction submitted by the user. In this case, the business associated with the benefit is a transaction for a business, which business transaction may include business information that is transaction information (e.g., may include an identification of the business the user specified to be transacted with, a lifetime of transacting the business, a cost of transacting the business, a user account to transact the business, etc.); when the offer processing is completed based on the lifetime of the service and/or the cost of the service, it may be determined that the offer satisfies the equity cancellation condition.
When the target equity belongs to the equity, it may be determined whether or not to assign an equity object corresponding to the target equity to the sender of the cancellation request after completing the service processing based on the service information; if so, it can be determined that the target equity meets equity verification conditions. In one case, when the sponsor of the bonus is a payment platform, the reimbursement request may be a payment transaction submitted by the user. In this case, the transaction associated with the bonus benefit (i.e., the bonus-benefit related transaction) is a payment, and the transaction information included in the payment transaction may be payment information (e.g., may include a payment amount, a payee, a deduction account, etc.); when a corresponding bonus object is allocated to the sender of the payment transaction after the payment is completed based on the payment information (i.e., the user gets to the bonus object designated by the bonus equity after the payment is successful), it may be determined that the bonus equity satisfies the equity cancellation condition. In another case, when the sponsor of the bonus is a business transaction platform, the verification request may be a business transaction submitted by the user. In this case, the transaction associated with the bonus benefit is a transaction for a service, which may include the service information as the transaction information (e.g., may include an identification of the service the user specified to be transacted with, a lifetime of transacting the service, a cost of transacting the service, a user account for transacting the service, etc.); when the transaction for the service is completed based on the transaction information (i.e., the user gets to the bonus object designated by the bonus equity after successfully transacting the service), it may be determined that the bonus equity satisfies the equity cancellation condition.
In one embodiment, when issuing the issuing result for the target equity onto the blockchain for certification, the issuing result may be certified into the blockchain in association with a contract identification of the smart contract that declares the equity cancellation logic. Based on the above-mentioned associated certificate of issuing result and contract identification, when the intelligent contract for verifying and processing the target equity is called, the intelligent contract for declaring the equity verification logic can be determined according to the contract identification associated with the issuing result of the target equity, and then the equity verification logic declared in the determined intelligent contract is called to verify and process the target equity.
In one embodiment, when the validation result is issued to the blockchain for certification, the validation result corresponding to the same equity may be correlated with the issue result for certification to the blockchain. Based on the above associated evidence for the issuing result and the verifying result, the sponsor of the equity can check the issuing and verifying conditions of the equity to the blockchain, thereby analyzing the specific conditions of the issuing activity of the equity. Taking the target equity as an example, a query transaction (which may be sent by a sponsor) for the target equity may be received, a issuing result corresponding to the target equity and stored in a blockchain may be obtained in response to the query transaction, and a verification result associated with the issuing result may be obtained, and the obtained issuing result and verification result may be returned to the sender of the query transaction.
According to the technical scheme, in the block chain-based rights issuing scheme, the rights and interests sponsor is used as a node member of the block chain, and the rights issuing and verifying conditions can be known in real time through monitoring the pulling block. Meanwhile, by means of a distributed account book of a blockchain and a mechanism of multi-party consensus, issuing rules and verifying rules of rights and interests are both stored in a chain mode in the form of intelligent contracts, and issuing and verifying operations of the rights and interests are not limited to a payment platform. For example, the issuing and verifying of rights may be performed by the sponsor of the rights. Further, based on the issuing result and verification result of the rights and the certificate on the chain, the condition that the rights and interests are maintained and operated only by the payment platform can be avoided, and therefore the management cost of the payment platform can be reduced.
FIG. 2 is a block chain based rights issuing scheme overall architecture diagram according to an exemplary embodiment. As shown in FIG. 2, the server 22 has a client running on it that causes the server 22 to be configured as a blockchain node; the server 22 may be a server of a business transaction platform or a server of a payment platform. The user 20 may perform account registration at the server 22 through the client 21 in advance, to obtain a registered account uniquely corresponding to the user. Then, the user 20 can determine that a binding relationship is established between the registered account (corresponding to the user) and the client 21 by logging in the registered account on the client 21, and the server 22 based on the login information of the registered account on the client 21. The binding relationship to be established is a binding relationship between the user information of the user 20 and the device information of the client 21. Based on the binding relationship, the server 22 can confirm that the transactions correspond to the user 20 when receiving the equity acquisition transaction, equity verification request, and inquiry transaction subsequently transmitted from the client 21. Taking the example of a benefit pickup transaction, the user 20 may log in to the registered account on the client 21 to send the benefit pickup transaction containing his own user information to the server 22 via the client 21. The server 22 (acting as a blockchain node) invokes the intelligent contract upon receipt of the equity acquisition transaction to determine whether the user information meets equity distribution conditions, thereby determining whether the user 20 can acquire equity and distributing the target equity that the user 20 can acquire to the user 20.
For easy understanding, the following details of the technical solutions of the present specification are described with reference to fig. 3 to 6, with respect to operations and functions implemented by the client 21 and the server 22 during rights issuing and verifying, respectively. FIG. 3 is a flow chart of a method for rights issuing and verifying according to an exemplary embodiment. As shown in fig. 3, the method applied to the blockchain node may include the steps of:
step 302, a rights acquisition transaction submitted by a user is received.
In one embodiment, the sponsor of the equity may deploy an intelligent contract on the blockchain for issuing equity to users and verifying equity. Wherein, the blockchain can be a alliance chain of alliance members including a business handling platform and a payment platform; further, the service handling platform can be used as the sponsor of the equity to issue equity to the user, and the payment platform can be used as the sponsor of equity to issue equity to the user. The sponsor of the equity issues equity issuing rules and equity verifying rules agreed with the co-worker in the form of intelligent contracts based on the signed cooperation agreement, and simultaneously freezes corresponding operation funds on a payment platform synchronously until the activity of issuing equity is finished and the contracts are invalidated.
For example, as shown in FIG. 4, the sponsor of equity may declare equity issuing logic and equity verifying logic in the intelligent contract to deploy equity issuing verifying contracts shown in the figure; the rights issuing logic is used for determining whether the user information of the user accords with the rights issuing conditions specified in the rights issuing rule, and the rights verifying logic is used for verifying the rights. After the development of the equity issuing and verifying contracts is completed, the equity issuing and verifying contracts can be issued to the alliance chain by an issuing party of equity through any node device in the alliance chain, and after the equity issuing and verifying contracts are completely agreed by part of designated member node devices (such as a plurality of authoritative node devices with accounting rights designated in the alliance chain) in the alliance chain, the equity issuing and verifying contracts are stored in a block of the alliance chain. Of course, the equity issuing logic and equity verifying logic may each be declared in different intelligent contracts, and one or more embodiments of this specification are not limited in this regard.
Step 304, if the user information meets the rights issuing condition, go to step 308; otherwise, go to step 306.
In one embodiment, the equity acquisition transaction includes user information for a user that is used to determine whether the user qualifies for equity for the current equity issuing activity. The specific content of the user information depends on the rights issuing conditions specified in the rights issuing rule. For example, the equity issuing activity is initiated by the network operator and provides the old user with equity to handle the broadband service gift. The rights issuing rule is that if the service life of the user for handling the broadband service is accumulated for more than 3 years (rights issuing condition), the 100-element telephone fee ticket can be freely received. Then, the user information may include an account, history data of transacting a broadband service, etc. in this case.
And step 306, returning a message prompting failure of acquisition to the client.
In one embodiment, when the user information does not meet the rights issuing condition, it is indicated that the user does not qualify for the rights issued by the current rights issuing activity. Thus, a message may be returned to the client prompting failure to pick up to inform the user that pick up is not eligible.
Step 308, issuing target rights to the user according to the user information.
Step 310, issuing the issuing result aiming at the target rights and interests to the blockchain for certification.
In one embodiment, as shown in FIG. 4, when issuing the issuing result for the target equity onto the blockchain for certification, the issuing result may be correlated with a contract identification of the equity issuing reimbursement contract (e.g., a contract address that may be an equity issuing reimbursement contract) into the block.
In one embodiment, after the result of issuing the certificate is present, a receipt of the acquisition equity may be sent to the client to inform the user of the acquisition equity for the target equity.
Step 312, a verification request for the target equity is received.
Step 314, if the issuing result aiming at the target rights and interests is stored in the blockchain, the step 318 is performed; otherwise, go to step 316.
And step 316, a message prompting that no rights exist is returned to the client.
In one embodiment, when a cancellation request is received, it is first determined whether a issuing result of the rights specified by the cancellation request is stored on the blockchain, and when the issuing result of the rights specified by the cancellation request is not stored on the blockchain, it is indicated that the rights are not actually issued to the sender of the cancellation request, so that the problem that the user counterfeits when the rights are cancelled and the subsequent cancellation is wrong can be effectively prevented.
For example, the results of the dispensing are shown in Table 1:
user name
|
Rights issuing results
|
a
|
Eight-fold coupon
|
b
|
50 yuan telephone fee ticket
|
c
|
Full 400 minus 50 coupon
|
……
|
…… |
TABLE 1
Assuming that the benefit contained in the cancellation request is that the user a receives the six-fold coupon, and that the block certificate is actually issued as "eight-fold coupon issued to the user a", it is indicated that the cancellation request has an error, and a message indicating that there is no benefit may be returned to the client.
Step 318, if the target equity meets equity verification conditions, go to step 322; otherwise, go to step 320.
Step 320, a message prompting verification failure is returned to the client.
In one embodiment, after the user receives the target benefit, the user may use the target benefit to obtain the corresponding benefit. While the user uses the target equity, the target equity needs to be checked out. Since the target equity includes two types of equity and bonus equity, the type of target equity can be determined first. Wherein, the verification request contains service information of the service related to the target equity. The following describes how to determine whether the target equity satisfies equity verification conditions according to the type of the target equity.
When the target equity belongs to the preferential equity, if preferential processing is completed on the business information based on the target equity, it can be determined that the target equity meets the equity verification condition. In one case, when the sponsor of the benefit is a payment platform, the reimbursement request may be a payment transaction submitted by the user. In this case, the transaction associated with the benefit is a payment, and the transaction for the payment may include transaction information (e.g., may include a payment amount, a payee, a deduction account, etc.); when the offer processing is completed for the payment amount based on the offer, it may be determined that the offer satisfies the offer cancellation condition. Taking a cash red packet with preferential rights as a payment treasure as an example, assuming that the cash red packet is 5 yuan and the payment amount is 65 yuan; then, when the user completes the payment by making a final payment of 60 yuan using the cash packet, it can be determined that the equity cancellation condition is satisfied, and the equity cancellation process is further performed on the equity. In this case, the amount due is 65 yuan, that is, the payment platform collects 65 yuan, and the sponsor of the cash packet 5 yuan is the payment platform.
In another case, when the sponsor of the benefit is a business transaction platform, the reimbursement request may be a business transaction submitted by the user. In this case, the business associated with the benefit is a transaction for a business, which business transaction may include business information that is transaction information (e.g., may include an identification of the business the user specified to be transacted with, a lifetime of transacting the business, a cost of transacting the business, a user account to transact the business, etc.); when the offer processing is completed based on the lifetime of the service and/or the cost of the service, it may be determined that the offer satisfies the equity cancellation condition. Taking the example of the offer of transacting eight-fold offers for broadband enjoyment provided by the network operator, assume that the cost of transacting 100M broadband for one year is 600 yuan; then, when the user makes the final payment 480 yuan successfully transact 100M broadband for one year by using the octave coupon, it can be determined that the equity cancellation condition is satisfied, and thus the equity cancellation process is performed on the equity. In this case, the payable amount is changed from 600 yuan to 480 yuan, that is, the payment platform collects money from 600 yuan to 480 yuan, and the sponsor of the octave coupon is a business transaction platform (that is, the payment platform).
When the target equity belongs to the equity, if the equity corresponding to the target equity is distributed to the sender of the cancellation request after the service processing is completed based on the service information, it can be determined that the target equity satisfies the equity cancellation condition. In one case, when the sponsor of the bonus is a payment platform, the reimbursement request may be a payment transaction submitted by the user. In this case, the transaction associated with the bonus benefit is a payment, which may include the transaction information as payment information (e.g., may include a payment amount, payee, deduction account, etc.); when a corresponding bonus object is allocated to the sender of the payment transaction after the payment is completed based on the payment information (i.e., the user gets to the bonus object designated by the bonus equity after the payment is successful), it may be determined that the bonus equity satisfies the equity cancellation condition. Taking the additional equity as the "give member points after completing a payment" as an example, assume that equity issuing rules can pick up 1 member point for each payment with an amount exceeding 50 yuan, when the user successfully receives 1 member credit after completing the payment of more than 50 yuan, the user can judge that the equity cancellation condition is satisfied, and then the equity cancellation processing is performed on the complimentary equity.
In another case, when the sponsor of the bonus is a business transaction platform, the verification request may be a business transaction submitted by the user. In this case, the transaction associated with the bonus benefit is a transaction for a service, which may include the service information as the transaction information (e.g., may include an identification of the service the user specified to be transacted with, a lifetime of transacting the service, a cost of transacting the service, a user account for transacting the service, etc.); when the transaction for the service is completed based on the transaction information (i.e., the user gets to the bonus object designated by the bonus equity after successfully transacting the service), it may be determined that the bonus equity satisfies the equity cancellation condition. Taking the right to give away as an example of the right to give away broadband, assuming that the rule of issuing the right is "if the user successfully handles 200M broadband service with the service life of 1 year, 100M broadband service with the service life of 1 year can be handled for additional free", when the user receives the right to use 100M broadband for 1 year after successfully handling 200M broadband service with the service life of 1 year, the right to cancel the right can be judged to be satisfied, and the right to give away is further checked.
Step 322 invokes the equity cancellation logic declared in the intelligent contracts issued on the blockchain to cancel the target equity.
In one embodiment, as shown in fig. 4, when the intelligent contract for verifying the target equity (i.e., the equity issuing verification contract) needs to be invoked, based on the associated certificate of the issuing result and the contract identifier in step 310, the equity issuing verification contract may be determined according to the contract identifier associated with the issuing result for the target equity, and then the equity issuing verification contract may be invoked to verify the target equity. For example, the blockchain node may construct a validation transaction that includes a contract address of a equity issuing validation contract to invoke equity issuing validation contracts to validate the target equity.
Step 324, issue the verification result to the blockchain for certification.
In one embodiment, as shown in fig. 4, when the verification result of the target equity is verified to the blockchain, a hash value (i.e., equity issuing verification hash in the figure) obtained by performing hash calculation on the issuing result of the target equity can be associated with the verification; for example, the hash value and verification result are packaged into a transaction certificate to the blockchain. Based on the above associated evidence for the issuing result and the verifying result, the issuing result and the verifying result of the same equity can form a linked list, thereby facilitating the sponsor of equity to know the whole link from issuing to verifying.
The sponsor of the equity can view the issuing and verifying conditions of equity to the blockchain, so as to analyze the specific progress of the equity issuing activity. The details are described below in connection with fig. 5.
Referring to fig. 5, fig. 5 is a flowchart of a blockchain-based rights query method in accordance with an exemplary embodiment. As shown in fig. 5, the method applied to the blockchain node may include the steps of:
step 502, a query transaction for a target equity is received.
Step 504, obtaining the issuing result aiming at the target rights and interests of the certificates stored in the blockchain.
Step 506, obtaining verification and verification results associated with the issuing results.
In an embodiment, after the issuing result for the target benefit is obtained, a hash value may be obtained by performing a hash calculation on the issuing result, so that the hash value is used as an index to jump to a block where the cancellation result of the target benefit is stored (i.e. a process illustrated by a dashed line in fig. 4), so as to obtain the cancellation result, and the obtained issuing result and cancellation result are returned to the sender of the query transaction. Otherwise, after obtaining the verification result of a certain benefit, the hash value can be read according to the verification result, and then the issuing result of the benefit is skipped.
According to the technical scheme, in the block chain-based rights issuing scheme, the rights and interests sponsor is used as a node member of the block chain, and the rights issuing and verifying conditions can be known in real time through monitoring the pulling block. Meanwhile, by means of a distributed account book of a blockchain and a mechanism of multi-party consensus, issuing rules and verifying rules of rights and interests are both stored in a chain mode in the form of intelligent contracts, and issuing and verifying operations of the rights and interests are not limited to a payment platform. For example, the issuing and verifying of rights may be performed by the sponsor of the rights. Further, based on the issuing result and verification result of the rights and the certificate on the chain, the condition that the rights and interests are maintained and operated only by the payment platform can be avoided, and therefore the management cost of the payment platform can be reduced.
Fig. 6 is a schematic diagram of an apparatus according to an exemplary embodiment. Referring to fig. 6, at the hardware level, the device includes a processor 602, an internal bus 604, a network interface 606, a memory 608, and a non-volatile storage 610, although other hardware required by other services is possible. Processor 602 reads the corresponding computer program from nonvolatile memory 610 into memory 608 and then runs to form a blockchain-based rights issuing device at a logical level. Of course, in addition to software implementation, one or more embodiments of the present disclosure do not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or a logic device.
Referring to fig. 7, in a software implementation, the blockchain-based rights issuing device may include:
a first receiving unit 71 that receives a rights acquisition transaction submitted by a user, the rights acquisition transaction including user information of the user;
a calling unit 72 for calling rights issuing logic declared in the intelligent contracts issued on the blockchain in response to the rights acquisition transaction, and determining whether the user information meets the rights issuing conditions; the method comprises the steps of,
and a issuing unit 73 for issuing a target equity to the user according to the user information when the user information meets the equity issuing condition.
Optionally, the method further comprises:
and the certification unit 74 issues the issuing result aiming at the target rights to the blockchain for certification.
Optionally, the method further comprises:
a second receiving unit 75 that receives a verification request for the target equity;
a determining unit 76 that determines whether or not there is a result of issuance for the target equity on the blockchain in response to the cancellation request;
and a verification unit 77 for calling the rights verification logic stated in the intelligent contract issued on the blockchain, verifying the target rights, and issuing the verification result to the blockchain for verification.
Optionally, the verification unit 77 is specifically configured to:
determining whether the target equity meets equity verification conditions;
if so, invoking equity cancellation logic declared in the intelligent contracts issued on the blockchain.
Optionally, the verification request includes service information of the service related to the target rights and interests; the verification unit 77 is further configured to:
determining the type of the target rights;
if the target equity belongs to the preferential equity, determining whether preferential treatment is completed on the business information based on the target equity; if yes, determining that the target equity meets equity verification conditions;
if the target equity belongs to the bonus equity, determining whether to allocate a bonus object corresponding to the target equity to the sender of the cancellation request after completing service processing based on the service information; if so, determining that the target equity meets equity verification conditions.
Alternatively to this, the method may comprise,
the certification unit 74 specifically is configured to: associating the issuing result with a contract identification of the intelligent contract declared with the equity verification logic to the blockchain;
the verification unit 77 is specifically configured to: determining an intelligent contract declaring the equity verifying logic according to the contract identification associated with the issuing result aiming at the target equity; and calling rights and interests verifying logic stated in the determined intelligent contracts, and verifying the target rights and interests.
Alternatively to this, the method may comprise,
the verification unit 77 is specifically configured to: associating the verification result with the issuing result and storing the verification result on the blockchain;
the apparatus further comprises: a third receiving unit 78 that receives a query transaction for the target equity; an acquisition unit 79 that acquires the issuing result of the certificate stored on the blockchain and the verification result associated with the issuing result in response to the inquiry transaction.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can 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 are also possible or may be advantageous.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.