Transaction processing method, platform and equipment for green certificate and carbon emission permit, and medium
By generating blockchain-based green certificates and carbon emission rights tokens and combining them with smart contracts and IPFS servers, the problem of insufficient security in green certificate and carbon emission rights transactions is solved, achieving higher transaction security.
Patent Information
- Application Number
- CN202510708452.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-26
AI Technical Summary
In the existing green certificate and carbon emission rights transactions, the security of the transaction process and transaction data is poor and cannot meet the transaction security requirements.
By obtaining user information, non-fungible tokens (NFT) green certificate tokens and carbon emission rights tokens based on blockchain technology are generated, and transactions are conducted based on these tokens. The transaction data is stored on the IPFS server and processed in conjunction with smart contracts.
It improves the security of green certificate and carbon emission rights trading and meets the security requirements of transaction process and transaction data.
Smart Images

Figure CN120707280A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a transaction processing method, platform, device and medium for green certificates and carbon emission rights. Background Art
[0002] With the rapid development of renewable energy generation technology, green certificates and carbon emission rights trading systems have been widely used as market instruments to encourage the use of green energy and limit carbon emissions. Green certificates, also known as green electricity certificates, are digital certificates issued by an independent third party under state leadership. They uniquely identify each megawatt-hour of renewable energy (excluding hydropower) generated and serve as a proof of renewable energy consumption. Carbon emission rights are legally granted to companies to emit a certain amount of carbon dioxide, including voluntary emission reductions and carbon emission quotas certified by China.
[0003] Since the transactions of green certificates and carbon emission rights involve many trading parties, such as renewable energy management centers, supervisory agencies, and numerous sellers and buyers, and the amount involved in the transactions of green certificates and carbon emission rights is relatively large, the security requirements for the transaction process and transaction data of green certificates and carbon emission rights are very high.
[0004] However, in the existing transactions of green certificates and carbon emission rights, the security of the transaction process and transaction data is poor and cannot meet the transaction security requirements of green certificates and carbon emission rights. Summary of the Invention
[0005] The embodiments of the present invention provide a transaction processing method, platform, device and medium for green certificates and carbon emission rights, which can improve the security of the transaction process and transaction data in green certificates and carbon emission rights transactions, thereby meeting the transaction security requirements of green certificates and carbon emission rights.
[0006] According to one aspect of the present invention, a transaction processing method for green certificates and carbon emission rights is provided, which is applied to a transaction processing platform and includes:
[0007] Obtaining first user information of a first user, and determining green certificate information or carbon emission rights information of the first user based on the first user information;
[0008] Generate a green certificate token or carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user;
[0009] Based on the green certificate token or carbon emission rights token, a green certificate transaction or carbon emission rights transaction is conducted between the first user and the second user.
[0010] According to another aspect of the present invention, a transaction processing platform for green certificates and carbon emission rights is provided, comprising:
[0011] An information determination module, configured to obtain first user information of a first user, and determine green certificate information or carbon emission rights information of the first user based on the first user information;
[0012] A token generation module, configured to generate a green certificate token or a carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user;
[0013] A transaction processing module is used to conduct green certificate transactions or carbon emission rights transactions between the first user and the second user based on the green certificate token or carbon emission rights token.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the transaction processing method of green certificates and carbon emission rights described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the transaction processing method of green certificates and carbon emission rights described in any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention obtains the first user information of the first user, and determines the green certificate information or carbon emission rights information of the first user based on the first user information, so as to generate a green certificate token or carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user, thereby conducting green certificate transactions or carbon emission rights transactions between the first user and the second user based on the green certificate token or carbon emission rights token, solving the problem that the transaction process and transaction data in the existing green certificate and carbon emission rights transactions cannot meet the transaction security requirements of green certificates and carbon emission rights, and can improve the security of the transaction process and transaction data in the transaction of green certificates and carbon emission rights, thereby meeting the transaction security requirements of green certificates and carbon emission rights.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is a flow chart of a transaction processing method provided in Example 1 of the present invention;
[0023] Figure 2 This is a flow chart of a transaction processing method provided by Embodiment 2 of the present invention;
[0024] Figure 3 This is a schematic diagram of a process of green certificate trading or carbon emission rights trading according to the second embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of a transaction processing platform provided in a fourth embodiment of the present invention;
[0026] Figure 5 It is a structural diagram of an electronic device for implementing the transaction processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Example 1
[0030] Figure 1 This is a flowchart of a transaction processing method provided by the first embodiment of the present invention. This embodiment is applicable to improving the security of the transaction process and transaction data in green certificates and carbon emission rights transactions. The method can be executed by a transaction processing platform, which can be a platform built on the blockchain and implemented by software and / or hardware. It can generally be directly integrated into the electronic device that executes this method. The electronic device can be a terminal device or a server device. The embodiment of the present invention does not limit the type of electronic device that executes the transaction processing method. Specifically, Figure 1 As shown, the transaction processing method may specifically include the following steps:
[0031] S110: Obtain first user information of a first user, and determine green certificate information or carbon emission rights information of the first user based on the first user information.
[0032] The first user may be the seller in a transaction involving green certificates and carbon emission rights. For example, the first user may be a renewable energy power generation unit or a fossil energy power generation unit, etc., though this is not a limitation in the present embodiment. It is understood that the first user may be the seller of green certificates or the seller of carbon emission rights. Furthermore, there may be one or more first users, and the multiple first users may include both green certificate sellers and carbon emission rights sellers.
[0033] Among them, the first user information can be the information of the selling user in the green certificate and carbon emission rights transaction.
[0034] Specifically, the first user information may include the user information provided by the first user when registering on the transaction processing platform. For example, the first user information may include power generation data of renewable energy power generation units and fossil energy power generation units, carbon emissions data of fossil energy power generation units, etc., although this embodiment of the present application is not limited thereto.
[0035] Specifically, the first user information may also include the first user's asset information in the transaction processing platform. For example, the first user information may include green certificate balance data, carbon emission rights balance data, currency balance data, account address information, etc., which is not limited in this embodiment of the present application.
[0036] Among them, the green certificate information can be information related to the green certificate, for example, it can include green certificate identifier information, green certificate timestamp information, green certificate file data or green certificate quota data, etc., and the embodiments of the present application do not limit this.
[0037] Among them, carbon emission rights information can be information related to carbon emission rights, for example, it can include carbon emission rights identifier information, carbon emission rights timestamp information, carbon emission rights file data or carbon emission rights quota data, etc., and the embodiments of the present application do not limit this.
[0038] In this embodiment of the present invention, the transaction processing platform may obtain the first user's first user information to determine the first user's green certificate information or carbon emission rights information based on the first user information. It is understood that before the transaction processing platform obtains the first user's first user information, the first user may fill in registration information on the transaction processing platform and complete registration.
[0039] S120. Generate a green certificate token or carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user.
[0040] Among them, a green certificate token can be a token that can identify a green certificate. A carbon emission rights token can be a token that can identify carbon emission rights. Specifically, the token can be a non-fungible token (NFT). A non-fungible token is an encrypted digital asset based on blockchain technology. It is indivisible, non-fungible, and unique. Each NFT token represents ownership of a specific digital or physical asset and has a unique identity and metadata.
[0041] It is understandable that different users have different green certificate tokens corresponding to them, and different users also have different carbon emission rights tokens corresponding to them.
[0042] In an embodiment of the present invention, after determining the first user's green certificate information based on the first user's information, the transaction processing platform may generate a green certificate token corresponding to the first user based on the first user's green certificate information. Alternatively, after determining the first user's carbon emission rights information based on the first user's information, the transaction processing platform may generate a carbon emission rights token corresponding to the first user based on the first user's carbon emission rights information.
[0043] S130. Based on the green certificate token or carbon emission rights token, a green certificate transaction or a carbon emission rights transaction is conducted between the first user and the second user.
[0044] The second user can be the purchaser of a green certificate and carbon emission rights transaction. For example, the second user can be a government agency, an enterprise, a high-energy-consuming enterprise, an energy company such as the State Grid Corporation of China, etc., but this embodiment of the application does not limit this. It is understood that the second user can be the purchaser of a green certificate or the purchaser of carbon emission rights.
[0045] Green Certificate trading involves trading green certificates. Specifically, one green certificate is equivalent to 1,000 kWh of renewable energy electricity, meaning one green certificate is obtained for every 1,000 kWh of renewable energy electricity produced. Carbon emission rights trading involves trading carbon emission rights. Specifically, one carbon emission right is equivalent to the right to emit one ton of carbon dioxide equivalent greenhouse gases.
[0046] In an embodiment of the present invention, after the transaction processing platform generates a green certificate token or carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user, it can conduct green certificate transactions or carbon emission rights transactions between the first user and the second user based on the green certificate token or carbon emission rights token.
[0047] The technical solution of this embodiment obtains the first user information of the first user, and determines the green certificate information or carbon emission rights information of the first user based on the first user information, so as to generate a green certificate token or carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user, thereby conducting green certificate transactions or carbon emission rights transactions between the first user and the second user based on the green certificate token or carbon emission rights token, which solves the problem that the transaction process and transaction data in the existing green certificate and carbon emission rights transactions are relatively poor in security, resulting in the inability to meet the transaction security requirements of green certificates and carbon emission rights, and can improve the security of the transaction process and transaction data in the green certificate and carbon emission rights transactions, thereby meeting the transaction security requirements of green certificates and carbon emission rights.
[0048] Example 2
[0049] Figure 2 This is a flow chart of a transaction processing method provided by the second embodiment of the present invention. This embodiment further refines the above technical solutions and provides a variety of specific optional implementation methods. The technical solution in this embodiment can be combined with the various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method may include the following steps:
[0050] S210: Obtain first user information of a first user, and determine green certificate information or carbon emission rights information of the first user based on the first user information.
[0051] Optionally, green certificate information may include green certificate quota data. Carbon emission rights information may include carbon emission rights quota data. Green certificate quotas, also known as the Renewable Portfolio System (RPS), refer to requirements imposed on entities responsible for quotas (i.e., primary users), requiring them to produce renewable energy green electricity or purchase green certificates.
[0052] Optionally, determining the green certificate information or carbon emission rights information of the first user based on the first user information may include: determining the current quota period; determining the green certificate quota data or carbon emission rights quota data of the first user in the current quota period based on the first user information.
[0053] Among them, the quota period can be the usage period corresponding to the quota of the green certificate or carbon emission right. It is understandable that the quota of the green certificate or carbon emission right is valid within the quota period, and the quota of the green certificate or carbon emission right is invalid after the quota period. For example, the quota period can be one year or two years, etc., which is not limited in this embodiment of the present application. The current quota period can be the quota period corresponding to the green certificate or carbon emission right currently being traded.
[0054] Specifically, after obtaining the first user information of the first user, the transaction processing platform can further determine the current quota period, and determine the green certificate quota data or carbon emission quota data of the first user in the current quota period based on the first user information.
[0055] Optionally, before determining the green certificate quota data of the first user in the current quota period, it is also possible to determine whether the calculated green certificate quota data meets the quota constraint conditions; if the green certificate quota data meets the quota constraint conditions, the calculated green certificate quota data can be determined as the green certificate quota data of the first user in the current quota period.
[0056] Specifically, the quota constraint condition can be determined based on the following formula:
[0057]
[0058] in, Indicates the green electricity production of all renewable energy power generation units in the current quota period; Indicates the electricity generation of all units in the current quota period; represents the green electricity production of the i-th renewable energy generation unit in the current quota period; represents the power generation of the jth fossil energy power generation unit in the current quota period; m represents the number of renewable energy power generation units; n represents the number of fossil energy power generation units.
[0059] Optionally, determining the green certificate quota data of the first user in the current quota period based on the first user information may include: when the first user is a renewable energy power generation unit, determining the green certificate quota data of the first user in the current quota period based on the green electricity production of the first user in the current quota period and the output standard parameters of the first user.
[0060] Specifically, according to the green electricity production of the first user in the current quota period and the output standard parameters of the first user, the green certificate quota data of the first user in the current quota period is determined based on the following formula:
[0061]
[0062] in, represents the green certificate quota data of the i-th renewable energy power generation unit in the current quota period; α represents the output standard parameter of the i-th renewable energy power generation unit in the current quota period; wherein, the output standard parameter is related to the historical power generation data and the predicted values of photovoltaic power generation and wind power generation.
[0063] Optionally, determining the green certificate quota data of the first user in the current quota period based on the first user information may include: when the first user is a fossil energy power generation unit, obtaining the green certificate quota completion information of the first user in the previous quota period from the first user information; when the green certificate quota completion information of the first user's previous quota period is an uncompleted green certificate quota, calculating the green certificate quota data of the first user in the current quota period based on the green certificate quota completion data of the previous quota period, the proportion of green electricity production in the current quota period to power generation, the first power generation data and the installed capacity data; when the green certificate quota completion information of the first user's previous quota period is a completed green certificate quota, calculating the green certificate quota data of the first user in the current quota period based on the proportion of green electricity production in the current quota period to power generation, the first power generation data and the installed capacity data.
[0064] Among them, the green certificate quota completion information may be information on whether the green certificate quota is completed within the quota period.
[0065] Specifically, when the green certificate quota completion information of the first user in the previous quota period is an uncompleted green certificate quota, the green certificate quota data of the first user in the current quota period can be calculated based on the following formula:
[0066]
[0067] Among them, Q l,j represents the installed capacity of the jth fossil energy power generation unit in the previous quota period; j represents the proportion of green certificate quota completed by the jth fossil energy power generation unit in the previous quota cycle; where λ j The larger the value, the higher the unfulfilled quota of the fossil energy power generation unit; θ g Indicates the adjustment parameter of green certificate quota.
[0068] Specifically, when the green certificate quota completion information of the first user in the previous quota period is the completion of the green certificate quota, the green certificate quota data of the first user in the current quota period can be calculated based on the following formula:
[0069]
[0070] Specifically, B can be installed capacity data; R can be the proportion of green electricity production to power generation in the current quota period; C can be the green certificate quota completion data of the first user in the previous quota period; It may be the first power generation amount data.
[0071] Optionally, determining the carbon emission quota data of the first user in the current quota period based on the first user information may include: when the first user is a fossil energy power generation unit, obtaining the carbon emission quota excess information of the first user in the previous quota period from the first user information; when the carbon emission quota excess information of the first user in the previous quota period is that the carbon emission quota is not exceeded, calculating the carbon emission quota data of the first user in the current quota period based on the first power generation data and the installed capacity data; when the carbon emission quota excess information of the first user in the previous quota period is that the carbon emission quota is exceeded, calculating the carbon emission quota data of the first user in the current quota period based on the carbon emission quota excess data of the previous quota period, the second power generation data and the installed capacity data.
[0072] The carbon emission rights quota excess information may be information on whether the carbon emission rights quota is exceeded within the quota period.
[0073] Specifically, when the carbon emission quota excess information of the first user in the previous quota period is that the carbon emission quota has not been exceeded, the carbon emission quota data of the first user in the current quota period can be calculated based on the following formula:
[0074]
[0075] in, represents the carbon emission quota data of the jth fossil energy power generation unit in the current quota period; d represents the conversion coefficient between the power generation and carbon emissions of the fossil energy power generation unit.
[0076] Specifically, when the carbon emission quota excess information of the first user in the previous quota period is exceeding the carbon emission quota, the carbon emission quota data of the first user in the current quota period can be calculated based on the following formula:
[0077]
[0078] Among them, μ jrepresents the proportion of carbon emission quota completed by the jth fossil energy power generation unit in the previous quota cycle; θ c represents the adjustment parameter of carbon emission quota, θ c It is related to the actual carbon emissions of fossil energy power generation units; Indicates the power generation of all fossil energy power generation units in the current quota period.
[0079] Specifically, D can be the carbon emission quota excess data of the previous quota cycle; It may be the second power generation amount data.
[0080] It is understood that, in the transaction processing platform, after determining the first user's green certificate quota data or carbon emission rights quota data in the current quota cycle, the renewable energy management center can distribute the quota to the first user through the transaction processing platform. The renewable energy management center is the institution that manages renewable energy-related affairs.
[0081] S221. Determine the green certificate identifier, green certificate timestamp, and green certificate file data corresponding to the first user based on the green certificate information of the first user.
[0082] The green certificate identifier may be information that uniquely identifies the green certificate. The green certificate timestamp may be information about the time at which the green certificate can be used. The green certificate file data may be data within the green certificate file. For example, the green certificate file data may include the certificate number, issuance date, validity period, company name, organization code, address, project name, project number, installed capacity, grid connection time, etc., which are not limited in the embodiments of the present application.
[0083] Specifically, the transaction processing platform can directly obtain the green certificate identifier, green certificate timestamp, and green certificate file data from the green certificate information. It is understood that after determining the green certificate quota data of the first user in the current quota period, the transaction processing platform can determine the green certificate information corresponding to the first user based on the green certificate quota data.
[0084] S222. Calculate the green certificate hash digest corresponding to the first user based on the green certificate identifier, the green certificate timestamp, and the green certificate file data.
[0085] The green certificate hash summary may be a hash summary corresponding to the green certificate file.
[0086] Optionally, before calculating the green certificate hash summary corresponding to the first user based on the green certificate identifier, the green certificate timestamp and the green certificate file data, it may also include: determining a target hash function; wherein the target hash function is a collision-resistant hash function.
[0087] The target hash function may be a hash function used to calculate the hash summary of the green certificate. For example, the target hash function may be H:{0,1} * →Z p Among them, Z p It can be a finite field, and p can be the prime order of the finite field.
[0088] Optionally, calculating the green certificate hash summary corresponding to the first user based on the green certificate identifier, green certificate timestamp and green certificate file data may include: calculating the green certificate hash summary corresponding to the first user based on the green certificate identifier, green certificate timestamp and green certificate file data based on the target hash function.
[0089] Specifically, the green certificate hash digest corresponding to the first user can be calculated based on the following formula:
[0090] h gc =H(ID gc ||T gc ||Data gc )
[0091] Among them, h gc Indicates the green certificate hash summary; ID gc Indicates the green certificate identifier; T gc Indicates the green certificate timestamp; Data gc Indicates green certificate file data.
[0092] S223. Determine the green certificate digital signature corresponding to the first user.
[0093] Among them, the green certificate digital signature can be the digital signature corresponding to the green certificate document.
[0094] Specifically, determining the green certificate digital signature corresponding to the first user may include: determining the target finite field, and determining the target elliptic curve in the target finite field; determining the target base point in the target elliptic curve, and determining the sampling data in the target finite field; determining the target coordinate point based on the target base point and the sampling data; wherein the target coordinate point is a coordinate point in the target elliptic curve; determining the number of elements in the target finite field, and determining the target value based on the number of elements and the target coordinate point; determining the target public key information, and determining the target private key information based on the target public key information and the target base point; determining the green certificate digital signature corresponding to the first user based on the sampling data, the green certificate hash summary, the target value, the target private key information, and the number of elements.
[0095] The target finite field may be a finite field corresponding to the target hash function. For example, the target hash function H: {0, 1} * →Z p Z in p Can be a target finite field.
[0096] Specifically, the target elliptic curve can be a non-singular elliptic curve. For example, the target elliptic curve can be expressed as: 2 =x 3 +ax+b; where a and b are numbers in the target finite field and satisfy 4a 2 +27b 3 ≠0.
[0097] The target base point may be a point on the target elliptic curve, and the sampled data may be data obtained by random sampling in the target finite field.
[0098] Specifically, the target coordinate point can be determined based on the formula (x, y) = k·G, where (x, y) is the target coordinate point; k is the sampling data; and G is the target base point.
[0099] Specifically, the number of elements of the target finite field can be the target finite field Z p The target value can be determined based on the formula r = x mod p; where r is the target value; x is the horizontal coordinate data of the target coordinate point; p is the target finite field Z p prime order of .
[0100] The target public key information may be the public key published on the transaction processing platform.
[0101] Specifically, the target private key information can be determined based on the formula pk=sk·G; wherein pk is the target public key information, sk is the target private key information, and G is the target base point.
[0102] Specifically, according to the sampled data, the green certificate hash summary, the target value, the target private key information, and the number of elements, the green certificate digital signature corresponding to the first user is determined based on the following formula:
[0103]
[0104] Among them, Sig gc Digital signature for green certificate.
[0105] S224. Determine the first target file according to the green certificate file data, the green certificate identifier, the green certificate timestamp, the user address information of the first user, the green certificate hash summary, and the green certificate digital signature.
[0106] The first target file may be a file for generating a green certificate token. Specifically, the first target file may be a Json file.
[0107] Specifically, the transaction processing platform can combine the green certificate file data, green certificate identifier, green certificate timestamp, user address information of the first user, green certificate hash summary and green certificate digital signature into a Json file, which is also the first target file.
[0108] S225. Generate a green certificate token corresponding to the first user based on the first target file and the user address information of the first user.
[0109] It is understandable that the number of Green Certificate Tokens corresponding to the first user is the same as the number of Green Certificate quotas corresponding to the first user. That is, assuming that the first user's Green Certificate quota is 5, the number of Green Certificate Tokens of the first user is also 5.
[0110] Optionally, generating a green certificate token corresponding to the first user based on the first target file and the user address information of the first user may include: storing the first target file in an IPFS (InterPlanetary File System) server, and determining the hash address of the first target file stored in the IPFS server; determining the green certificate token metadata identifier corresponding to the first user based on the hash address of the first target file stored in the IPFS server; and generating a green certificate token corresponding to the first user based on the green certificate token identifier and the user address information.
[0111] Among them, the hash address of the first target file stored in the IPFS server can be used to verify whether the data in the IPFS has been tampered with.
[0112] Specifically, determining the green certificate token metadata identifier corresponding to the first user based on the hash address of the first target file stored in the IPFS server may include determining the hash address of the first target file stored in the IPFS server as the green certificate token metadata identifier corresponding to the first user.
[0113] Optionally, the transaction processing method provided in this embodiment may further include: determining a smart contract; wherein the smart contract may include: a green certificate trading smart contract based on a green certificate token; specifically, the green certificate trading smart contract may include a token generation function.
[0114] Specifically, the transaction processing platform can generate a green certificate token corresponding to the first user based on the green certificate token metadata identifier and user address information based on the token generation function in the green certificate transaction smart contract.
[0115] S231. Determine the carbon emission rights identifier, carbon emission rights timestamp, and carbon emission rights file data corresponding to the first user based on the carbon emission rights information of the first user.
[0116] The carbon emission rights identifier may be information that uniquely identifies a carbon emission right. The carbon emission rights timestamp may be information about the time at which the carbon emission rights can be used. The carbon emission rights file data may be data within the carbon emission rights file. For example, the carbon emission rights file data may include the quota number, issuance time, validity period, company name, organization code, industry classification, etc., although this is not limited in the present embodiment.
[0117] Specifically, the transaction processing platform can directly obtain the carbon emission rights identifier, carbon emission rights timestamp, and carbon emission rights file data from the carbon emission rights information. It is understood that after determining the first user's carbon emission rights quota data for the current quota period, the transaction processing platform can determine the carbon emission rights information corresponding to the first user based on the carbon emission rights quota data.
[0118] S232. Calculate the carbon emission right hash summary corresponding to the first user based on the carbon emission right identifier, the carbon emission right timestamp, and the carbon emission right file data.
[0119] The carbon emission rights hash summary may be a hash summary corresponding to the carbon emission rights file.
[0120] Optionally, before calculating the carbon emission rights hash summary corresponding to the first user based on the carbon emission rights identifier, the carbon emission rights timestamp and the carbon emission rights file data, it may also include: determining a target hash function; wherein the target hash function is a collision-resistant hash function.
[0121] Specifically, the target hash function is the same as the target hash function determined in step S222 before calculating the green certificate hash summary corresponding to the first user based on the green certificate identifier, green certificate timestamp and green certificate file data, and is not repeated here.
[0122] Optionally, calculating the hash summary of the carbon emission rights corresponding to the first user based on the carbon emission rights identifier, the carbon emission rights timestamp and the carbon emission rights file data may include: calculating the hash summary of the carbon emission rights corresponding to the first user based on the carbon emission rights identifier, the carbon emission rights timestamp and the carbon emission rights file data based on the target hash function.
[0123] Specifically, the carbon emission rights hash summary corresponding to the first user can be calculated based on the following formula:
[0124] h ce =H(ID ce ||T ce ||Data ce )
[0125] Among them, h ce Represents the hash summary of carbon emission rights; ID ce Represents the carbon emission rights identifier; T ceIndicates the carbon emission rights timestamp; Data ce Represents carbon emission rights file data.
[0126] S233: Determine the digital signature of the carbon emission rights corresponding to the first user.
[0127] Among them, the carbon emission rights digital signature can be the digital signature corresponding to the carbon emission rights document.
[0128] Specifically, determining the digital signature of the carbon emission rights corresponding to the first user may include: determining the target finite field, and determining the target elliptic curve in the target finite field; determining the target base point in the target elliptic curve, and determining the sampling data in the target finite field; determining the target coordinate point based on the target base point and the sampling data; wherein the target coordinate point is a coordinate point in the target elliptic curve; determining the number of elements in the target finite field, and determining the target value based on the number of elements and the target coordinate point; determining the target public key information, and determining the target private key information based on the target public key information and the target base point; determining the digital signature of the carbon emission rights corresponding to the first user based on the sampling data, the carbon emission rights hash summary, the target value, the target private key information, and the number of elements.
[0129] Specifically, the carbon emission rights digital signature corresponding to the first user is determined based on the sampled data, the carbon emission rights hash summary, the target value, the target private key information, and the number of elements. This can be determined based on the following formula:
[0130]
[0131] Among them, Sig ce Digitally sign carbon emission rights.
[0132] S234. Determine the second target file according to the carbon emission rights file data, the carbon emission rights identifier, the carbon emission rights timestamp, the user address information of the first user, the carbon emission rights hash summary, and the carbon emission rights digital signature.
[0133] The second target file may be a file for generating carbon emission rights tokens. Specifically, the second target file may be a Json file.
[0134] Specifically, the transaction processing platform can combine the carbon emission rights file data, the carbon emission rights identifier, the carbon emission rights timestamp, the user address information of the first user, the carbon emission rights hash summary and the carbon emission rights digital signature into a Json file, which is also the second target file.
[0135] S235. Generate a carbon emission rights token corresponding to the first user based on the second target file and the user address information of the first user.
[0136] It is understandable that the number of carbon emission rights tokens corresponding to the first user is the same as the number of carbon emission rights quotas corresponding to the first user. That is, assuming that the carbon emission rights quota of the first user is 3, the number of carbon emission rights tokens of the first user is also 3.
[0137] Optionally, generating a carbon emission rights token corresponding to the first user based on the second target file and the user address information of the first user may include: storing the second target file in the IPFS server, and determining the hash address of the second target file stored in the IPFS server; determining the carbon emission rights token metadata identifier corresponding to the first user based on the hash address of the second target file stored in the IPFS server; and generating a carbon emission rights token corresponding to the first user based on the carbon emission rights token identifier and the user address information.
[0138] Among them, the hash address of the second target file stored in the IPFS server can be used to verify whether the data in the IPFS has been tampered with.
[0139] Specifically, determining the carbon emission rights token metadata identifier corresponding to the first user based on the hash address of the second target file stored in the IPFS server may include determining the hash address of the second target file stored in the IPFS server as the carbon emission rights token metadata identifier corresponding to the first user.
[0140] Optionally, the transaction processing method provided in this embodiment may further include: determining a smart contract; wherein the smart contract may include: a carbon emission rights trading smart contract based on a carbon emission rights token; specifically, the carbon emission rights trading smart contract may include a token generation function.
[0141] Exemplarily, the token generation function may be awardItem(player, tokenURI), where player may be user address information, and tokenURI may be a green certificate token metadata identifier or a carbon emission rights token metadata identifier.
[0142] Specifically, the transaction processing platform can generate a carbon emission rights token corresponding to the first user based on the carbon emission rights token metadata identifier and user address information based on the token generation function in the carbon emission rights trading smart contract.
[0143] It should be noted that the embodiment of the present invention does not limit the order of steps S221 - S225 and steps S231 - S235 , that is, steps S221 - S225 and steps S231 - S235 can be performed simultaneously.
[0144] S240. Based on the green certificate token or carbon emission rights token, a green certificate transaction or a carbon emission rights transaction is conducted between the first user and the second user.
[0145] Optionally, the transaction processing method provided in this embodiment may further include: determining a smart contract; wherein the smart contract may include: a green certificate trading smart contract based on a green certificate token and a carbon emission rights trading smart contract based on a carbon emission rights token; wherein the green certificate trading smart contract or the carbon emission rights trading smart contract may at least include: a quotation function, a queue sorting function and a transaction transfer function.
[0146] Specifically, the bidding function can include a bidding function for a seller user and a bidding function for a buyer user. For example, the bidding function for a seller user can be openConSaler(salerPrice, tokenID); where salerPrice can be the seller's bid, and tokenID can be the seller's green certificate token or carbon emission rights token. The bidding function for a buyer user can be openConBuyer(buyerPrice, buyerNum); where buyerPrice can be the buyer's bid, and buyerNum can be the buyer's purchase quantity.
[0147] Specifically, the queue sorting function may include a queue sorting function for seller users and a queue sorting function for buyer users. Exemplarily, the queue sorting functions may be sortConSalers() and sortConBuyers(). Specifically, the queue sorting function may sort the queues of seller users or buyer users based on the bids in the bid function.
[0148] Specifically, the transaction transfer function can be used to transfer green certificate tokens or carbon emission rights tokens, as well as transfer transaction currency. Exemplarily, the transaction transfer function can be conTrans().
[0149] Optionally, a green certificate transaction or a carbon emission rights transaction between a first user and a second user based on a green certificate token or a carbon emission rights token may include: determining the first transaction token of the first user and the first transaction price corresponding to the first transaction token based on the quotation function in the smart contract; wherein the first transaction token is the green certificate token or carbon emission rights token to be traded by the first user; performing a first verification on the first transaction token according to the transaction request of the second user; if the first verification is passed, transferring the first transaction token to the second user based on the transaction transfer function in the smart contract, and transferring the first transaction amount of the second user to the first user; wherein the first transaction amount is determined by the first transaction price.
[0150] The first transaction price may be the price at which the seller sells the Green Certificate Token or Carbon Emission Rights Token. The first transaction amount may be the amount the buyer purchases the Green Certificate Token or Carbon Emission Rights Token, which is the product of the number of tokens purchased and the price of a single token. For example, assuming the seller sells 5 units of Green Certificate Tokens and the price of each unit of Green Certificate Token (i.e., the first transaction price) is a, then when the buyer purchases 4 units of Green Certificate Tokens, the first transaction amount may be 4a.
[0151] It is understandable that before transferring the first transaction token to the second user, the smart contract address of the second user may be determined so as to transfer the first transaction token to the smart contract address of the second user.
[0152] Among them, the first verification may include token legitimacy verification and time validity verification.
[0153] Specifically, token legitimacy verification can be used to verify the legitimacy of the digital signature of the green certificate or the carbon emission right. Time validity verification can be used to verify the validity of the usage time of the green certificate quota or the carbon emission right quota.
[0154] Specifically, the legitimacy of the green certificate digital signature can be verified based on the following formula:
[0155]
[0156] If the formula r=x ' If modp is established, it can be determined that the green certificate digital signature is legal; otherwise, if the formula r = x ' If modp is not true, it can be determined that the green certificate digital signature is illegal.
[0157] Specifically, the legitimacy of the digital signature of carbon emission rights can be verified based on the following formula:
[0158]
[0159] If the formula r=x ' If modp is established, it can be determined that the digital signature of carbon emission rights is legal; otherwise, if the formula r = x ' If MODP does not hold, it can be determined that the digital signature of carbon emission rights is illegal.
[0160] Optional, such as Figure 3As shown, based on the green certificate token or carbon emission rights token, a green certificate transaction or carbon emission rights transaction between a first user and a second user may include: determining the second transaction token of the first user and the second transaction price corresponding to the second transaction token based on the quotation function in the smart contract; wherein the second transaction token is the green certificate token or carbon emission rights token to be traded by the first user; determining the third transaction token of the second user and the third transaction price corresponding to the third transaction token based on the quotation function in the smart contract; wherein the third transaction token is the green certificate token or carbon emission rights token to be purchased by the second user; when the number of first users and / or second users is multiple, based on the queue sorting function in the smart contract, queue sorting is performed for each first user and / or each second user; according to the queue sorting result, each first user and each second user is matched and cleared in turn; based on the transaction transfer function in the smart contract, transaction transfer is performed according to the matching and clearing result, so as to realize the green certificate transaction or carbon emission rights transaction between the first user and the second user.
[0161] The second transaction price may be the price set by the seller for selling green certificate tokens or carbon emission rights tokens. The third transaction price may be the price set by the buyer for purchasing green certificate tokens or carbon emission rights tokens.
[0162] Specifically, based on the queue sorting function in the smart contract, the first users and / or the second users are queued. It can be based on the queue sorting function in the smart contract, arranging the first users in the queue in ascending order of their prices, and arranging the second users in the queue in descending order of their prices.
[0163] For example, assume that the first users include user 11, user 12, user 13, user 14, user 15, and user 16; among them, user 11 sells 4 green certificates, each quoted at 10,000; user 12 sells 5 green certificates, each quoted at 13,000; user 13 sells 4 green certificates, each quoted at 12,000; user 14 sells 4 carbon emission rights, each quoted at 5,200; user 15 sells 5 carbon emission rights, each quoted at 4,000; user 16 sells 7 carbon emission rights, each quoted at 44 00; assume that the second users include user 21, user 22, user 23, user 24, user 25, and user 26; among them, user 21 purchases 4 green certificates, each quoted at 15,000; user 22 purchases 5 green certificates, each quoted at 17,000; user 23 purchases 3 green certificates, each quoted at 16,000; user 24 purchases 6 carbon emission rights, each quoted at 8,000; user 25 purchases 5 carbon emission rights, each quoted at 7,200; user 26 purchases 7 carbon emission rights, each quoted at 6,600.
[0164] Table 1 Queue sorting results
[0165]
[0166] Based on the queue sorting function in the smart contract, the queues of the first users and / or the second users are sorted, and the queue sorting results shown in Table 1 can be obtained.
[0167] Specifically, based on the queue sorting results, each first user and each second user is matched and cleared sequentially. This can be done by matching the first user and the second user in the order of their queues until the first user queue and the second user queue are empty. The actual transaction amount is the average of the first user's bid and the second user's bid.
[0168] For example, as shown in Table 1, during the green certificate transaction process, user 11 and user 22 are matched. User 11's 4 green certificates are sold to user 22. The actual transaction amount of a single green certificate is (10,000 + 170,000) / 2 = 13,500. User 22 purchases 4 green certificates and still needs 1 green certificate. Then, user 13's 1 green certificate is sold to user 22. The actual transaction amount of a single green certificate is (12,000 + 170,000) / 2 = 14,500. At this point, user 22's green certificate transaction is completed, and user 23's green certificate transaction continues. User 23 purchases 3 green certificates, and user 13 sells 4-1 green certificates. The actual transaction amount of a single green certificate is (12,000 + 160,000) / 2 = 14,000. This process continues until the number of users in the transaction list is empty.
[0169] It is understandable that the trading process of carbon emission rights is the same as that of green certificate trading, so I will not go into details here.
[0170] Optionally, transaction transfers can be performed based on the matching and clearing results, which may include transferring green certificate tokens or carbon emission rights tokens to the purchasing user, transferring the actual transaction amount to the selling user, and returning the remaining amount of the purchasing user to the purchasing user.
[0171] Specifically, after determining the second user's third transaction token and the third transaction price corresponding to the third transaction token, the transaction processing platform may transfer the bid amount to the smart contract. The bid amount is the product of the number of transaction tokens and the third transaction price. It should be noted that after the transaction is completed, the smart contract may refund the remaining amount to the second user. The remaining amount is the difference between the bid amount and the actual transaction amount.
[0172] Optionally, after a green certificate transaction or a carbon emission rights transaction is conducted between a first user and a second user based on a green certificate token or a carbon emission rights token, it may also include: performing a second verification on the green certificate token or the carbon emission rights token; wherein the second verification includes: verifying whether the number of tokens of the green certificate token or the carbon emission rights token meets the quota quantity conditions, verifying the time validity of the green certificate token or the carbon emission rights token, and verifying the legitimacy of the digital signature of the green certificate token or the carbon emission rights token.
[0173] The quota quantity condition may be whether the available quota quantity is consistent with the issued quota quantity within the current quota period.
[0174] It should be noted that the time validity check and digital signature legitimacy check in the second check are the same as the check process in the first check, and will not be repeated here.
[0175] The technical solution of this embodiment obtains the first user information of the first user, and determines the green certificate information or carbon emission rights information of the first user based on the first user information, so as to determine the green certificate identifier, green certificate timestamp and green certificate file data corresponding to the first user based on the green certificate information of the first user, calculate the green certificate hash summary corresponding to the first user based on the green certificate identifier, green certificate timestamp and green certificate file data, and determine the green certificate digital signature corresponding to the first user, and then determine the first target file based on the green certificate file data, green certificate identifier, green certificate timestamp, user address information of the first user, green certificate hash summary and green certificate digital signature, so as to generate the green certificate token corresponding to the first user based on the first target file and the user address information of the first user; or determine the carbon emission rights identifier, carbon emission rights timestamp and carbon emission rights file data corresponding to the first user based on the carbon emission rights information of the first user, and calculate the green certificate hash summary corresponding to the first user based on the green certificate identifier, green certificate timestamp and green certificate file data, and determine the green certificate digital signature corresponding to the first user, and then determine the first target file based on the green certificate file data, green certificate identifier, green certificate timestamp, user address information of the first user, green certificate hash summary and green certificate digital signature, so as to generate the green certificate token corresponding to the first user based on the first target file and the user address information of the first user; or determine the carbon emission rights identifier, carbon emission rights timestamp and carbon emission rights file data corresponding to the first user based on the carbon emission rights identifier, carbon emission rights Timestamp and carbon emission rights file data, calculate the carbon emission rights hash summary corresponding to the first user, and determine the carbon emission rights digital signature corresponding to the first user, and then determine the second target file according to the carbon emission rights file data, carbon emission rights identifier, carbon emission rights timestamp, user address information of the first user, carbon emission rights hash summary and carbon emission rights digital signature, so as to generate the carbon emission rights token corresponding to the first user according to the second target file and the user address information of the first user, and then based on the green certificate token or carbon emission rights token, conduct green certificate transactions or carbon emission rights transactions between the first user and the second user, which solves the problem that the transaction process and transaction data in the existing green certificate and carbon emission rights transactions are poorly secure, resulting in the inability to meet the transaction security requirements of green certificates and carbon emission rights, and can improve the security of the transaction process and transaction data in the green certificate and carbon emission rights transactions, thereby meeting the transaction security requirements of green certificates and carbon emission rights.
[0176] Example 3
[0177] Figure 4 This is a schematic diagram of a transaction processing platform provided by the third embodiment of the present invention. Figure 4 As shown, the transaction processing platform includes: an information determination module 410, a token generation module 420 and a transaction processing module 430; wherein,
[0178] The information determination module 410 is configured to obtain first user information of a first user and determine the green certificate information or carbon emission rights information of the first user based on the first user information;
[0179] The token generation module 420 is configured to generate a green certificate token or a carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user;
[0180] The transaction processing module 430 is used to conduct green certificate transactions or carbon emission rights transactions between the first user and the second user based on green certificate tokens or carbon emission rights tokens.
[0181] The technical solution of this embodiment obtains the first user information of the first user, and determines the green certificate information or carbon emission rights information of the first user based on the first user information, so as to generate a green certificate token or carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user, thereby conducting green certificate transactions or carbon emission rights transactions between the first user and the second user based on the green certificate token or carbon emission rights token, which solves the problem that the transaction process and transaction data in the existing green certificate and carbon emission rights transactions are relatively poor in security, resulting in the inability to meet the transaction security requirements of green certificates and carbon emission rights, and can improve the security of the transaction process and transaction data in the green certificate and carbon emission rights transactions, thereby meeting the transaction security requirements of green certificates and carbon emission rights.
[0182] Optionally, green certificate information may include: green certificate quota data; carbon emission rights information may include: carbon emission rights quota data; the information determination module 410 may be specifically used to: determine the current quota period; determine the green certificate quota data or carbon emission rights quota data of the first user in the current quota period based on the first user information.
[0183] Optionally, the information determination module 410 can also be specifically used to: when the first user is a renewable energy power generation unit, determine the green certificate quota data of the first user in the current quota period based on the green electricity production of the first user in the current quota period and the output standard parameters of the first user.
[0184] Optionally, the information determination module 410 can also be specifically used to: when the first user is a fossil energy power generation unit, obtain the green certificate quota completion information of the first user in the previous quota period from the first user information; when the green certificate quota completion information of the first user's previous quota period is an uncompleted green certificate quota, calculate the green certificate quota data of the first user in the current quota period based on the green certificate quota completion data of the previous quota period, the proportion of green electricity production in the current quota period to power generation, the first power generation data and the installed capacity data; when the green certificate quota completion information of the first user's previous quota period is a completed green certificate quota, calculate the green certificate quota data of the first user in the current quota period based on the proportion of green electricity production in the current quota period to power generation, the first power generation data and the installed capacity data.
[0185] Optionally, the information determination module 410 can also be specifically used to: when the first user is a fossil energy power generation unit, obtain the carbon emission quota excess information of the first user in the previous quota period from the first user information; when the carbon emission quota excess information of the first user in the previous quota period is that the carbon emission quota is not exceeded, calculate the carbon emission quota data of the first user in the current quota period based on the first power generation data and the installed capacity data; when the carbon emission quota excess information of the first user in the previous quota period is that the carbon emission quota is exceeded, calculate the carbon emission quota data of the first user in the current quota period based on the carbon emission quota excess data of the previous quota period, the second power generation data and the installed capacity data.
[0186] Optionally, the token generation module 420 can be specifically used to: determine the green certificate identifier, green certificate timestamp and green certificate file data corresponding to the first user based on the green certificate information of the first user; calculate the green certificate hash summary corresponding to the first user based on the green certificate identifier, green certificate timestamp and green certificate file data; determine the green certificate digital signature corresponding to the first user; determine the first target file based on the green certificate file data, green certificate identifier, green certificate timestamp, user address information of the first user, green certificate hash summary and green certificate digital signature; generate a green certificate token corresponding to the first user based on the first target file and the user address information of the first user.
[0187] Optionally, the token generation module 420 can also be specifically used to: determine a target hash function; wherein the target hash function is a collision-resistant hash function; based on the target hash function, calculate the green certificate hash summary corresponding to the first user according to the green certificate identifier, green certificate timestamp and green certificate file data.
[0188] Optionally, the token generation module 420 can also be specifically used to: determine the target finite field, and determine the target elliptic curve in the target finite field; wherein the target finite field corresponds to the target hash function; determine the target base point in the target elliptic curve, and determine the sampling data in the target finite field; determine the target coordinate point based on the target base point and the sampling data; wherein the target coordinate point is a coordinate point in the target elliptic curve; determine the number of elements in the target finite field, and determine the target value based on the number of elements and the target coordinate point; determine the target public key information, and determine the target private key information based on the target public key information and the target base point; determine the green certificate digital signature corresponding to the first user based on the sampling data, the green certificate hash summary, the target value, the target private key information and the number of elements.
[0189] Optionally, the token generation module 420 can also be specifically used to: determine the carbon emission rights identifier, carbon emission rights timestamp and carbon emission rights file data corresponding to the first user based on the carbon emission rights information of the first user; calculate the carbon emission rights hash summary corresponding to the first user based on the carbon emission rights identifier, carbon emission rights timestamp and carbon emission rights file data; determine the carbon emission rights digital signature corresponding to the first user; determine the second target file based on the carbon emission rights file data, carbon emission rights identifier, carbon emission rights timestamp, user address information of the first user, carbon emission rights hash summary and carbon emission rights digital signature; generate a carbon emission rights token corresponding to the first user based on the second target file and the user address information of the first user.
[0190] Optionally, the token generation module 420 can also be specifically used to: determine a target hash function; wherein the target hash function is a collision-resistant hash function; based on the target hash function, calculate the carbon emission rights hash summary corresponding to the first user according to the carbon emission rights identifier, the carbon emission rights timestamp and the carbon emission rights file data.
[0191] Optionally, the token generation module 420 can also be specifically used to: determine the target finite field, and determine the target elliptic curve in the target finite field; wherein the target finite field corresponds to the target hash function; determine the target base point in the target elliptic curve, and determine the sampling data in the target finite field; determine the target coordinate point based on the target base point and the sampling data; wherein the target coordinate point is a coordinate point in the target elliptic curve; determine the number of elements in the target finite field, and determine the target value based on the number of elements and the target coordinate point; determine the target public key information, and determine the target private key information based on the target public key information and the target base point; determine the carbon emission rights digital signature corresponding to the first user based on the sampling data, the carbon emission rights hash summary, the target value, the target private key information and the number of elements.
[0192] Optionally, the transaction processing module 430 can be specifically used to: determine the smart contract; wherein the smart contract includes: a green certificate trading smart contract based on a green certificate token and a carbon emission rights trading smart contract based on a carbon emission rights token; wherein the green certificate trading smart contract or the carbon emission rights trading smart contract includes at least: a quotation function, a queue sorting function and a transaction transfer function.
[0193] Optionally, the transaction processing module 430 can also be specifically used to: determine the first transaction token of the first user and the first transaction price corresponding to the first transaction token based on the quotation function in the smart contract; wherein the first transaction token is the green certificate token or carbon emission rights token to be traded by the first user; perform a first verification on the first transaction token according to the transaction request of the second user; if the first verification is passed, transfer the first transaction token to the second user based on the transaction transfer function in the smart contract, and transfer the first transaction amount of the second user to the first user; wherein the first transaction amount is determined by the first transaction price.
[0194] Optionally, the transaction processing module 430 can also be specifically used to: determine the second transaction token of the first user and the second transaction price corresponding to the second transaction token based on the quotation function in the smart contract; wherein the second transaction token is the green certificate token or carbon emission rights token to be traded by the first user; determine the third transaction token of the second user and the third transaction price corresponding to the third transaction token based on the quotation function in the smart contract; wherein the third transaction token is the green certificate token or carbon emission rights token to be purchased by the second user; when the number of first users and / or second users is multiple, queue sorting of each first user and / or each second user is based on the queue sorting function in the smart contract; according to the queue sorting result, match and clear each first user and each second user in turn; based on the transaction transfer function in the smart contract, perform transaction transfer according to the matching and clearing result to realize green certificate transaction or carbon emission rights transaction between the first user and the second user.
[0195] Optionally, the transaction processing module 430 can also be specifically used to: perform a second verification on the green certificate token or carbon emission rights token after a green certificate transaction or carbon emission rights transaction is conducted between a first user and a second user based on the green certificate token or carbon emission rights token; wherein the second verification includes: verifying whether the number of tokens of the green certificate token or carbon emission rights token meets the quota quantity conditions, verifying the time validity of the green certificate token or carbon emission rights token, and verifying the legitimacy of the digital signature of the green certificate token or carbon emission rights token.
[0196] The transaction processing platform provided by the embodiment of the present invention can execute the transaction processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0197] Example 4
[0198] In order to enable those skilled in the art to better understand the transaction processing method and transaction processing platform of this embodiment, a specific example is used below for illustration.
[0199] In a specific example, Ganache and Truffle, the desktop versions of Ethereum private chains, were used as the basic framework of the transaction processing platform, and the Vue framework was used to build a visual interactive interface for the transaction processing platform.
[0200] Specifically, first create an Ethereum private chain in the Ganache platform and configure the RPC server network address to http: / / 127.0.0.1:8545; secondly, use the ERC721Enumerable and ERC721URIStorage contract code libraries of the Ethereum service platform openzeppelin to write smart contracts, and use truffle compile to compile the smart contracts; then, use truffle migrate to deploy the smart contracts on the Ethereum private chain Ganache, and use the element framework to write the back-end user management program to link to mysql for storing user login data; finally, use the Vue framework to write the front-end visual trading system, which mainly includes: user login, user management, personal asset management, personal information viewing, green certificate and carbon emission rights token issuance, green certificate P2P trading, carbon emission rights P2P trading, green certificate and carbon emission rights joint trading, etc., and use the web3.js interface and smart contract to link.
[0201] The transaction processing platform includes two smart contracts: an NFT-based green certificate trading contract and an NFT-based carbon emission rights trading contract. To convert green certificates into carbon emission rights, the green certificate trading contract can directly call the carbon emission rights trading contract to generate carbon emission rights tokens for users. Specifically, the transaction processing platform built these two smart contracts based on OpenZeppelin's ERC721 library and the contract inheritance of ERC721Enumerable and ERC721URIStorage.
[0202] In the transaction processing platform, computational overhead primarily comes from smart contract gas fees. In a centralized clearing model (i.e., when there are multiple sellers and buyers, the transactions are sorted based on bids and then matched and cleared), smart contract overhead is correlated with the number of participating users. Therefore, the relationship between the contract functions conTrans(), sortConSalers(), and sortConBuyers() and the number of participating users was tested, with the number of buyers and sellers set to 1, 2, 3, 4, and 5, respectively. Since Ethereum's block gas fee is capped at 30,000,000, the maximum number of buyers and sellers that can be accommodated is 35, resulting in a total of 140 participating users. Consequently, the transaction processing platform reduces sorting complexity through quick sorting, increases the number of participating users, and further reduces computational overhead.
[0203] Entities using the transaction processing platform to process transactions may include: the Renewable Energy Management Center, trading entities (i.e., sellers and buyers), and supervisory agencies. The Renewable Energy Management Center manages trading entities and reviews the issuance of green certificates and carbon emission rights. Supervisory agencies review trading entity account information before the end of each quota cycle to ensure token holdings and circulation validity.
[0204] Optionally, the supervisory agency can also monitor the fulfillment of the green certificate quota and carbon emission rights quota of the trading entity during the quota period. Specifically, if the green certificate balance of the trading entity does not reach the specified quota, a buyout penalty will be imposed based on the amount of green certificates that are short of the quota; if the carbon emissions of the trading entity exceed the carbon emission rights quota, the supervisory agency will also impose a buyout penalty on the excess carbon emissions. In other words, if the trading entity does not have enough green certificate quota or carbon emission rights quota at the end of the green certificate quota compliance period, the supervisory agency will force the trading entity to spend money to "buy" back to make up for the shortfall, and the price will be higher than the market price, which is a punitive measure.
[0205] Specifically, renewable energy management centers, trading entities, and supervisory agencies can register on the transaction processing platform to conduct transactions of green certificates and carbon emission rights.
[0206] Specifically, the transaction processing for green certificates and carbon emission rights can include the following: First, when each trading entity registers an account, the transaction processing platform generates an account address for trading green certificate and carbon emission rights tokens. Second, the transaction processing platform generates green certificate tokens and carbon emission rights tokens, and the Renewable Energy Management Center allocates a corresponding number of green certificate tokens and carbon emission rights tokens to each trading entity. The transaction processing platform adds a digital signature and timestamp to the metadata of each green certificate token and carbon emission rights token to ensure the authenticity and security of the tokens during the transaction. Then, each trading entity logs into the transaction processing platform and publishes a transaction request. The seller submits their green certificate tokens and carbon emission rights tokens to the transaction processing platform's transaction list and submits a bid. The buyer submits their green certificate purchase request, the number of carbon emission rights, and the bid, and directly transfers their amount to the smart contract. Finally, the smart contract matches the transaction and completes the matching and clearing.
[0207] Optionally, in another example, each trading entity logs in to the transaction processing platform and publishes a transaction demand. The seller submits the green certificate tokens and carbon emission rights tokens it owns to the transaction list of the transaction processing platform and submits a quotation; the buyer can directly view the transaction list of the transaction processing platform and purchase green certificates and carbon emission rights tokens.
[0208] In this embodiment of the present invention, the transaction processing platform leverages blockchain technology to address security, resource underutilization, credibility, and inefficiency issues in traditional trading markets. The transaction processing platform uniquely identifies green certificates and carbon emission rights through non-fungible tokens, and, in conjunction with trading mechanisms, optimizes resource allocation to ensure fair and reliable transactions. The transaction processing platform can support joint transactions between multiple buyers and sellers, reducing transaction costs and improving efficiency.
[0209] Example 5
[0210] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0211] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0212] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0213] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the transaction processing method.
[0214] In some embodiments, the transaction processing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the transaction processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the transaction processing method in any other suitable manner (e.g., via firmware).
[0215] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0216] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0217] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0218] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0219] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0220] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0221] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0222] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A transaction processing method, characterized in that: Applied to transaction processing platforms, including: Acquire first user information of a first user, and determine green certificate information or carbon emission rights information of the first user based on the first user information; Generate a green certificate token or carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user; Based on the green certificate token or carbon emission rights token, conduct green certificate transactions or carbon emission rights transactions between the first user and the second user; Among them, the first user is the seller of the green certificate token or carbon emission rights token; the second user is the buyer of the green certificate token or carbon emission rights token.
2. The method according to claim 1, characterized in that The green certificate information includes: green certificate quota data; the carbon emission rights information includes: carbon emission rights quota data; The determining, based on the first user information, the green certificate information or carbon emission rights information of the first user includes: Determine the current quota period; According to the first user information, the green certificate quota data or carbon emission rights quota data of the first user in the current quota period is determined.
3. The method according to claim 2, characterized in that The determining, based on the first user information, green certificate quota data of the first user in the current quota period includes: If the first user is a renewable energy power generation unit, the green certificate quota data of the first user in the current quota period is determined according to the green electricity production and output standard parameters of the first user in the current quota period.
4. The method according to claim 2, characterized in that The determining, based on the first user information, green certificate quota data of the first user in the current quota period includes: If the first user is a fossil energy power generation unit, obtain the green certificate quota completion information of the first user in the previous quota period from the first user information; If the green certificate quota completion information of the first user in the previous quota period is an uncompleted green certificate quota, the green certificate quota data of the first user in the current quota period is calculated based on the green certificate quota completion data of the previous quota period, the proportion of green electricity production to power generation in the current quota period, the first power generation data, and the installed capacity data; When the green certificate quota completion information of the first user in the previous quota period is that the green certificate quota is completed, the green certificate quota data of the first user in the current quota period is calculated based on the proportion of green electricity production to power generation in the current quota period, the first power generation data and the installed capacity data.
5. The method according to claim 2, characterized in that The determining, based on the first user information, carbon emission quota data of the first user in the current quota period includes: If the first user is a fossil energy power generation unit, obtaining the carbon emission quota excess information of the first user in the previous quota period from the first user information; If the carbon emission rights quota exceedance information of the first user in the previous quota period is that the carbon emission rights quota has not been exceeded, calculating the carbon emission rights quota data of the first user in the current quota period based on the first power generation data and the installed capacity data; When the carbon emission quota excess information of the first user in the previous quota period is that the carbon emission quota is exceeded, the carbon emission quota data of the first user in the current quota period is calculated based on the carbon emission quota excess data of the previous quota period, the second power generation data and the installed capacity data.
6. The method according to claim 1, wherein Generating a green certificate token corresponding to the first user according to the green certificate information of the first user includes: Determine, based on the green certificate information of the first user, a green certificate identifier, a green certificate timestamp, and green certificate file data corresponding to the first user; Calculate the green certificate hash digest corresponding to the first user according to the green certificate identifier, the green certificate timestamp and the green certificate file data; Determine the green certificate digital signature corresponding to the first user; Determine a first target file according to the green certificate file data, the green certificate identifier, the green certificate timestamp, the user address information of the first user, the green certificate hash summary, and the green certificate digital signature; Generate a green certificate token corresponding to the first user based on the first target file and the user address information of the first user.
7. The method according to claim 6, characterized in that Before calculating the green certificate hash digest corresponding to the first user according to the green certificate identifier, the green certificate timestamp and the green certificate file data, the method further includes: Determining a target hash function; wherein the target hash function is a collision-resistant hash function; The calculating the green certificate hash digest corresponding to the first user according to the green certificate identifier, the green certificate timestamp, and the green certificate file data includes: Based on the target hash function, the green certificate hash digest corresponding to the first user is calculated according to the green certificate identifier, the green certificate timestamp and the green certificate file data.
8. The method according to claim 7, characterized in that Determining the green certificate digital signature corresponding to the first user includes: Determining a target finite field, and determining a target elliptic curve in the target finite field; wherein the target finite field corresponds to the target hash function; Determining a target base point in the target elliptic curve and determining sampling data in the target finite field; Determine a target coordinate point according to the target base point and the sampling data; wherein the target coordinate point is a coordinate point in the target elliptic curve; Determining the number of elements of the target finite field, and determining a target value according to the number of elements and the target coordinate point; Determining target public key information, and determining target private key information based on the target public key information and the target base point; Determine the green certificate digital signature corresponding to the first user based on the sampled data, the green certificate hash summary, the target value, the target private key information and the number of elements.
9. The method according to claim 1, characterized in that Generating a carbon emission rights token corresponding to the first user according to the carbon emission rights information of the first user includes: Determining, based on the carbon emission rights information of the first user, a carbon emission rights identifier, a carbon emission rights timestamp, and carbon emission rights file data corresponding to the first user; Calculating a carbon emission right hash digest corresponding to the first user based on the carbon emission right identifier, the carbon emission right timestamp, and the carbon emission right file data; Determining the digital signature of the carbon emission rights corresponding to the first user; Determine a second target file based on the carbon emission rights file data, the carbon emission rights identifier, the carbon emission rights timestamp, the user address information of the first user, the carbon emission rights hash summary, and the carbon emission rights digital signature; Generate a carbon emission rights token corresponding to the first user according to the second target file and the user address information of the first user.
10. The method according to claim 9, characterized in that Before calculating the carbon emission right hash digest corresponding to the first user based on the carbon emission right identifier, the carbon emission right timestamp, and the carbon emission right file data, the method further includes: Determining a target hash function; wherein the target hash function is a collision-resistant hash function; The calculating, based on the carbon emission right identifier, the carbon emission right timestamp, and the carbon emission right file data, a carbon emission right hash digest corresponding to the first user includes: Based on the target hash function, a carbon emission right hash digest corresponding to the first user is calculated according to the carbon emission right identifier, the carbon emission right timestamp and the carbon emission right file data.
11. The method according to claim 9, characterized in that Determining the digital signature of the carbon emission rights corresponding to the first user includes: Determining a target finite field, and determining a target elliptic curve in the target finite field; wherein the target finite field corresponds to the target hash function; Determining a target base point in the target elliptic curve and determining sampling data in the target finite field; Determine a target coordinate point according to the target base point and the sampling data; wherein the target coordinate point is a coordinate point in the target elliptic curve; Determining the number of elements of the target finite field, and determining a target value according to the number of elements and the target coordinate point; Determining target public key information, and determining target private key information based on the target public key information and the target base point; Determine the carbon emission rights digital signature corresponding to the first user according to the sampling data, the carbon emission rights hash summary, the target value, the target private key information and the number of elements.
12. The method according to claim 1, characterized in that The method further comprises: Determine a smart contract; wherein the smart contract includes: a green certificate trading smart contract based on the green certificate token and a carbon emission rights trading smart contract based on the carbon emission rights token; Among them, the green certificate trading smart contract or the carbon emission rights trading smart contract at least includes: a quotation function, a queue sorting function and a transaction transfer function.
13. The method according to claim 12, characterized in that The green certificate transaction or carbon emission rights transaction between the first user and the second user based on the green certificate token or carbon emission rights token includes: Determine, based on the quotation function in the smart contract, a first transaction token of the first user and a first transaction price corresponding to the first transaction token; wherein the first transaction token is a green certificate token or a carbon emission rights token to be traded by the first user; performing a first verification on the first transaction token according to the transaction request of the second user; If the first verification is passed, based on the transaction transfer function in the smart contract, the first transaction token is transferred to the second user, and the first transaction amount of the second user is transferred to the first user; wherein the first transaction amount is determined by the first transaction price.
14. The method according to claim 12, characterized in that The green certificate transaction or carbon emission rights transaction between the first user and the second user based on the green certificate token or carbon emission rights token includes: Determine, based on the quotation function in the smart contract, a second transaction token of the first user and a second transaction price corresponding to the second transaction token; wherein the second transaction token is the green certificate token or carbon emission rights token to be traded by the first user; Determine, based on the quotation function in the smart contract, a third transaction token of the second user and a third transaction price corresponding to the third transaction token; wherein the third transaction token is the green certificate token or carbon emission rights token to be purchased by the second user; When there are multiple first users and / or second users, queue sorting each of the first users and / or second users based on the queue sorting function in the smart contract; According to the queue sorting result, each of the first users and each of the second users are matched and cleared in sequence; Based on the transaction transfer function in the smart contract, transaction transfer is performed according to the matching and clearing results to realize the green certificate transaction or carbon emission rights transaction between the first user and the second user.
15. The method according to claim 1, wherein After the green certificate transaction or carbon emission rights transaction is conducted between the first user and the second user based on the green certificate token or carbon emission rights token, the method further includes: Performing a second verification on the green certificate token or carbon emission rights token; Among them, the second verification includes: verifying whether the number of tokens of the green certificate token or carbon emission rights token meets the quota quantity conditions, verifying the time validity of the green certificate token or carbon emission rights token, and verifying the legitimacy of the digital signature of the green certificate token or carbon emission rights token.
16. A transaction processing platform, characterized in that: include: An information determination module, configured to obtain first user information of a first user, and determine green certificate information or carbon emission rights information of the first user based on the first user information; A token generation module, configured to generate a green certificate token or a carbon emission rights token corresponding to the first user based on the green certificate information or carbon emission rights information of the first user; A transaction processing module is used to conduct green certificate transactions or carbon emission rights transactions between the first user and the second user based on the green certificate token or carbon emission rights token.
17. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the transaction processing method according to any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the transaction processing method according to any one of claims 1 to 15 when executed.