Disclosure of Invention
In order to solve the above technical problems, embodiments of the present application provide a block chain-based green electric power certificate transaction method and apparatus, so as to achieve the purpose of improving the authenticity of the green electric power certificate transaction process, and the technical scheme is as follows:
a block chain-based green power certificate transaction method comprises the following steps:
triggering execution of a transfer intelligent contract in a power transaction block chain in response to a transfer request of a first object for a target green power certificate, wherein the execution process of the transfer intelligent contract is as follows: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain;
and acquiring the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and sending the target green power certificate and the address of the transfer record in the power transaction blockchain to a second object in the transfer request so as to enable the second object to pay for the first object.
Preferably, the method further comprises:
in response to a verification request for the target green power certificate, looking up whether the target green power certificate exists in the power transaction blockchain;
and if the target green power certificate exists, the searched target green power certificate is used as a basis for verifying the authenticity and validity of the target green power certificate.
Preferably, the method further comprises:
responding to a transfer process tracing request aiming at the target green power certificate, and searching whether a transfer record corresponding to the target green power certificate exists in the power transaction block chain;
and if the transfer record exists, taking the transfer record corresponding to the searched target green power certificate as a basis for tracing the transfer process of the target green power certificate.
Preferably, the method further comprises:
responding to a process tracing request aiming at the target green power certificate, and searching whether the target green power certificate exists in the power transaction block chain;
and if the target green power certificate exists, the searched target green power certificate is used as a basis for tracing the issuing process of the target green power certificate.
Preferably, the issuing process of the target green power certificate includes:
responding to a green power certificate application request of a first object, and generating a green power certificate, wherein the green power certificate at least comprises: the description information, the unique certificate number and the certificate validity period;
signing the green power certificate, and writing the signature into the green power certificate to obtain a target green power certificate;
storing the target green power certificate into a power transaction blockchain;
sending the target green power certificate and a storage address of the target green power certificate in the power transaction blockchain to the first object.
A blockchain-based green power certificate transaction apparatus, comprising:
a triggering module, configured to trigger execution of a transfer intelligent contract in a power transaction block chain in response to a transfer request of a first object for a target green power certificate, where the execution process of the transfer intelligent contract is: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain;
a sending module, configured to obtain the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and send the target green power certificate and the address of the transfer record in the power transaction blockchain to a second object in the transfer request, so that the second object pays for the first object.
Preferably, the apparatus further comprises:
a first lookup module, configured to, in response to a verification request for the target green power certificate, lookup whether the target green power certificate exists in the power transaction blockchain;
the first determining module is used for taking the found target green power certificate as a basis for verifying the authenticity and validity of the target green power certificate if the target green power certificate exists in the power transaction block chain.
Preferably, the apparatus further comprises:
the second searching module is used for responding to a transfer process tracing request aiming at the target green electric power certificate and searching whether a transfer record corresponding to the target green electric power certificate exists in the electric power transaction block chain;
and the second determining module is used for taking the found transfer record corresponding to the target green power certificate as a basis for tracing the transfer process of the target green power certificate if the transfer record corresponding to the target green power certificate exists in the power transaction block chain.
Preferably, the apparatus further comprises:
a third searching module, configured to respond to a tracing request for a process of issuing the target green power certificate, and search whether the target green power certificate exists in the power transaction block chain;
and the third determining module is used for taking the found target green power certificate as a basis for tracing the issuing process of the target green power certificate if the target green power certificate exists in the power transaction block chain.
Preferably, the apparatus further comprises: a hair-verification module for:
responding to a green power certificate application request of a first object, and generating a green power certificate, wherein the green power certificate at least comprises: the description information, the unique certificate number and the certificate validity period;
signing the green power certificate, and writing the signature into the green power certificate to obtain a target green power certificate;
storing the target green power certificate into a power transaction blockchain;
sending the target green power certificate and a storage address of the target green power certificate in the power transaction blockchain to the first object.
Compared with the prior art, the beneficial effect of this application is:
according to the method and the device, the target green power certificate is stored in the power transaction block chain, the target green power certificate can be prevented from being tampered, on the basis, a transfer request aiming at the target green power certificate is responded, a transfer intelligent contract in the power transaction block chain is triggered to be executed, a transfer record used for recording transfer information of the target green power certificate is written into the power transaction block chain, the target green power certificate and the transfer process thereof can be traced, the risk of counterfeiting the green power certificate and the transaction process thereof is reduced, and the authenticity of the transaction process of the green power certificate is improved.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application discloses a block chain-based green power certificate transaction method, which comprises the following steps: triggering execution of a transfer intelligent contract in a power transaction block chain in response to a transfer request of a first object for a target green power certificate, wherein the execution process of the transfer intelligent contract is as follows: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain; and acquiring the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and sending the target green power certificate and the address of the transfer record in the power transaction blockchain to a second object in the transfer request so as to enable the second object to pay for the first object. In this application, through the above mode improve the authenticity of the transaction process of green power certificate.
Before describing the block chain-based green power certificate transaction method disclosed in the embodiment of the present application, a block chain system on which the block chain-based green power certificate transaction method depends is described, as shown in fig. 1, the block chain system includes: the power transaction chain at the bottommost layer comprises modules such as a node management module, a consensus mechanism module, an intelligent contract module and a P2P network module, and provides support for upper-layer application; the middle layer is a block chain identity management and block chain monitoring and management module and provides access block chain member management and block chain running state monitoring capabilities, and the upper layer is a block chain green certificate transaction platform and provides green certificate issuing, transaction, verification and tracing functions.
Next, a block chain based green electric power certificate transaction method disclosed in an embodiment of the present application is described, and as shown in fig. 2, a flowchart of embodiment 1 of a block chain based green electric power certificate transaction method provided in the present application may include the following steps:
step S11, in response to the transfer request of the first object for the target green power certificate, triggering execution of a transfer intelligent contract in the power transaction block chain, where the execution process of the transfer intelligent contract is: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain.
The target green power certificate may be understood as: the first object applies for a green power certificate. Wherein, the issuing process of the target green power certificate may include:
a11, responding to a request for applying a green power certificate of a first object, and generating a green power certificate, wherein the green power certificate at least comprises: the description information, the unique certificate number and the certificate validity period;
a12, signing the green power certificate, and writing the signature into the green power certificate to obtain a target green power certificate;
a13, storing the target green power certificate into a power transaction block chain;
a14, sending the target green power certificate and the storage address of the target green power certificate in the power transaction block chain to the first object.
The transfer information of the target green power certificate may include at least: information of the first object, information of another object participating in the transaction of the target green power certificate, and index information of the target green power certificate. The index information of the target green power certificate may be used to look up the target green power certificate in the power trading blockchain.
Of course, the transfer information of the target green power certificate may also include: a signature of the target green power certificate and its associated information (e.g., the public key of the first object).
The process of triggering execution of the transfer intelligence contract in the power transaction blockchain in response to the transfer request of the first object for the target green power certificate may include, but is not limited to:
and writing key information of a transaction contract signed by the first object and the second object in the transfer request into the power transaction block chain, and triggering the transfer intelligent contract to execute.
The second object in the transfer request may be understood as: an object of a target green power certificate of a first object transfer is received.
Step S12, obtaining the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and sending the target green power certificate and the address of the transfer record in the power transaction blockchain to the second object in the transfer request, so that the second object pays the first object.
The address of the transfer record in the power transaction block chain is sent to the second object in the transfer request, so that the second object can trace the transaction process of the target green power certificate according to the transfer record, the risk of counterfeiting the transaction process of the green power certificate is reduced, and the authenticity of the transaction process of the green power certificate is improved.
As another alternative embodiment of the present application, referring to fig. 3, a schematic flow chart of an embodiment 2 of a block chain-based green power certificate transaction method provided by the present application is provided, where this embodiment is mainly an extension of the block chain-based green power certificate transaction method described in the foregoing embodiment 1, and as shown in fig. 3, the method may include, but is not limited to, the following steps:
step S21, in response to the transfer request of the first object for the target green power certificate, triggering execution of a transfer intelligent contract in the power transaction block chain, where the execution process of the transfer intelligent contract is: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain.
Step S22, obtaining the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and sending the target green power certificate and the address of the transfer record in the power transaction blockchain to the second object in the transfer request, so that the second object pays the first object.
The detailed procedures of steps S21-S22 can be found in the related descriptions of steps S11-S12 in embodiment 1, and are not repeated herein.
Step S23, in response to the verification request for the target green power certificate, searching whether the target green power certificate exists in the power transaction block chain.
If so, go to step S24.
If the target green power certificate exists in the power transaction block chain, the credibility of the target green power certificate can be improved based on the characteristic that data in the power transaction block chain cannot be tampered.
And step S24, taking the searched target green electric power certificate as a basis for verifying the authenticity and validity of the target green electric power certificate.
The target green power certificate with high credibility can be used as a basis for verifying the authenticity and validity of the target green power certificate, so that the reliability of verification is improved.
As another alternative embodiment of the present application, referring to fig. 4, a flowchart of an embodiment 3 of a block chain-based green power certificate transaction method provided by the present application is shown, where this embodiment is mainly an extension of the block chain-based green power certificate transaction method described in the foregoing embodiment 1, and as shown in fig. 4, the method may include, but is not limited to, the following steps:
step S31, in response to the transfer request of the first object for the target green power certificate, triggering execution of a transfer intelligent contract in the power transaction block chain, where the execution process of the transfer intelligent contract is: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain.
Step S32, obtaining the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and sending the target green power certificate and the address of the transfer record in the power transaction blockchain to the second object in the transfer request, so that the second object pays the first object.
The detailed procedures of steps S31-S32 can be found in the related descriptions of steps S11-S12 in embodiment 1, and are not repeated herein.
Step S33, in response to the transfer process tracing request for the target green power certificate, searching whether a transfer record corresponding to the target green power certificate exists in the power transaction block chain.
If so, go to step S34.
And step S34, taking the transfer record corresponding to the searched target green electric power certificate as a basis for tracing the transfer process of the target green electric power certificate.
It should be noted that one or more transfers of the target green power certificate may be performed, but a record of each transfer of the target green power certificate is recorded in the power transaction block chain regardless of the one or more transfers.
Therefore, in the case of transferring the target green power certificate one or more times, the transferring process of the target green power certificate can be traced.
As another alternative embodiment of the present application, referring to fig. 5, a flowchart of an embodiment 4 of a block chain-based green power certificate transaction method provided by the present application is provided, where this embodiment is mainly an extension of the block chain-based green power certificate transaction method described in the foregoing embodiment 1, and as shown in fig. 5, the method may include, but is not limited to, the following steps:
step S41, in response to the transfer request of the first object for the target green power certificate, triggering execution of a transfer intelligent contract in the power transaction block chain, where the execution process of the transfer intelligent contract is: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain.
Step S42, obtaining the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and sending the target green power certificate and the address of the transfer record in the power transaction blockchain to the second object in the transfer request, so that the second object pays the first object.
Step S43, in response to the request for tracing the issuing process of the target green power certificate, searching whether the target green power certificate exists in the power transaction block chain.
If so, go to step S44.
And step S44, taking the searched target green electric power certificate as a basis for tracing the issuing process of the target green electric power certificate.
The found target green power certificate is used as a basis for tracing the issuing process of the target green power certificate, and the tracing of the issuing process of the target green power certificate can be realized.
Next, a block chain based green electric power certificate transaction apparatus provided in the present application is described, and the block chain based green electric power certificate transaction apparatus described below and the block chain based green electric power certificate transaction method described above may be referred to in correspondence with each other.
Referring to fig. 6, the block chain-based green power certificate transaction apparatus includes: a triggeringmodule 11 and a sendingmodule 12.
A triggeringmodule 11, configured to trigger execution of a transfer intelligent contract in a power transaction block chain in response to a transfer request of a first object for a target green power certificate, where the execution process of the transfer intelligent contract is: writing a transfer record into the power transaction blockchain, the transfer record being used to record transfer information of the target green power certificate, the target green power certificate being stored in the power transaction blockchain.
A sendingmodule 12, configured to obtain the target green power certificate and the address of the transfer record on the power transaction blockchain from the power transaction blockchain, and send the target green power certificate and the address of the transfer record in the power transaction blockchain to the second object in the transfer request, so that the second object pays the first object.
In this embodiment, the block chain-based green power certificate transaction apparatus may further include:
a first lookup module, configured to, in response to a verification request for the target green power certificate, lookup whether the target green power certificate exists in the power transaction blockchain;
the first determining module is used for taking the found target green power certificate as a basis for verifying the authenticity and validity of the target green power certificate if the target green power certificate exists in the power transaction block chain.
In this embodiment, the block chain-based green power certificate transaction apparatus may further include:
the second searching module is used for responding to a transfer process tracing request aiming at the target green electric power certificate and searching whether a transfer record corresponding to the target green electric power certificate exists in the electric power transaction block chain;
and the second determining module is used for taking the found transfer record corresponding to the target green power certificate as a basis for tracing the transfer process of the target green power certificate if the transfer record corresponding to the target green power certificate exists in the power transaction block chain.
In this embodiment, the block chain-based green power certificate transaction apparatus may further include:
a third searching module, configured to respond to a tracing request for a process of issuing the target green power certificate, and search whether the target green power certificate exists in the power transaction block chain;
and the third determining module is used for taking the found target green power certificate as a basis for tracing the issuing process of the target green power certificate if the target green power certificate exists in the power transaction block chain.
In this embodiment, the block chain-based green power certificate transaction apparatus may further include:
a hair-verification module for:
responding to a green power certificate application request of a first object, and generating a green power certificate, wherein the green power certificate at least comprises: the description information, the unique certificate number and the certificate validity period;
signing the green power certificate, and writing the signature into the green power certificate to obtain a target green power certificate;
storing the target green power certificate into a power transaction blockchain;
sending the target green power certificate and a storage address of the target green power certificate in the power transaction blockchain to the first object.
It should be noted that each embodiment is mainly described as a difference from the other embodiments, and the same and similar parts between the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The block chain-based green power certificate transaction method and device provided by the application are described in detail above, a specific example is applied in the description to explain the principle and the implementation of the application, and the description of the above embodiment is only used to help understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.