Research on Carbon-Trading Model of Urban Public Transport Based on Blockchain Technology

: With the realization of the “dual carbon” goal, urban public transport with an increasing proportion of new energy vehicles will become the key subject to achieve the carbon emission reduction goal. Under the new background of deep coupling between transport networks and power grids, it is of great significance to study the carbon-trading mode of urban public transport participation in promoting the development of new energy vehicles and improving the operating efficiency and low-carbon level of the “energy-transport” system. In this paper, based on blockchain technology, a framework for urban public transportation networks to participate in carbon trading is established to solve the current problems of urban public transportation’s insufficient motivation to reduce emissions, lax operation strategy and lack of carbon-trading matching mechanisms. Finally, Hyperledger Fabric was selected as the simulation platform, and we simulated the model through the calculation example. The results show that the proposed scheme can effectively improve the operating efficiency of urban public transport and reduce its operating costs and carbon emissions. In addition, policy recommendations on carbon price, carbon quota and penalties are proposed to improve the institutional system of the carbon-trading market.


Introduction
The existing research on the coupling of urban transportation networks and power grids will realize the intellectualization and low-carbon use of urban transportation energy supply, and improve the operation efficiency and environmental protection of transportation networks and power grids [1][2][3].In this context, actively using carbon trading and other market means to control emissions is more conducive to creating low-carbon transportation and a green environment [4,5].In recent years, the core of low-carbon transportation characterized by low energy consumption, low pollution and low emissions has been to optimize the development mode of transportation and improve its energy efficiency and energy-consumption structure.As a key focus area of the transport industry, urban public transport has the characteristics of high efficiency, high energy consumption, high traffic volume and regular operation [6,7].Therefore, how to reduce the emissions and operating costs of urban public transportation without affecting its transportation capacity by means of the carbon-trading market is the issue studied in this paper.
Urban public transport can buy and sell carbon emissions in the carbon-trading market, and urban public transport enterprises can obtain carbon-trading income and reduce carbon emissions [8,9].China's Beijing Public Transport Group, which was included in the carbon-market management in 2016, has reduced its carbon-emission intensity by more than 11 percent in 2020 compared to 2016 due to the aggressive investment in renewable energy vehicles to replace high-carbon-emission diesel vehicles.Therefore, the participation of urban public transport in carbon trading is conducive to the realization of the "carbon peak" goal of the transport industry.Urban public transport has become the key subject of carbon trading in China's transportation industry [10][11][12].As an emerging distributed ledger technology, blockchain has also been widely studied in the field of carbon trading [13][14][15].Therefore, it is of great significance to combine urban public transport, carbon-trading systems and blockchain.
In order to effectively improve the operation efficiency and emission reduction capacity of urban public transport in the carbon-trading market, most contemporary studies seek favorable methods or approaches in terms of fuel cells, fuel economy, carbon tax and carbon-trading relationships, renewable-energy-vehicle subsidy policies, carbon-quota policies, etc. [16][17][18].At present, China's carbon-trading market has been established for a relatively short time, and the research on urban public transport participation in carbon trading is in the theoretical stage and less research has been conducted in this regard.Reference [19] analyzed the fuel cell market in the field of urban public transport in China, studied the impact of carbon trading on the cost of hydrogen fuel cells and showed that the carbon-trading model can effectively reduce the cost of fuel cells.Ref. [20] proposes a real-time predictive energy-management strategy (PEMS) of plug-in hybrid electric vehicles for the coordination control of fuel economy and battery lifetime, and a model predictive-control problem of cost minimization, including fuel-consumption cost, electricity cost of battery charging/discharging and equivalent cost of battery degradation, was formulated.The authors of [21] studied and simulated the carbon-quota allocation of road public transport, introduced the idea of baseline incentive allocation on the basis of the data envelopment analysis (DEA) model, and proposed a new method of analysis from the perspective of vehicle carbon-emission intensity.Reference [22] re-analyzed the difference between the implementation of carbon tax and carbon-trading policies, including the public transport industry, by using the recursive dynamic computable general equilibrium model.The authors of [23] built a multilevel supply chain for the production, sales and parts recycling of new-energy vehicles, and established a Stackelberg game model led by new-energy-vehicle manufacturers.Based on this, they discuss how to coordinate enterprise production income and urban public transport vehicle emission optimization under the carbon-trading system.The authors of [24] use a multiregional multisector computable general equilibrium (CGE) model with two simultaneous international emissionpermit markets, including road transport.The authors of [25] presented an agent-based modeling approach for personal carbon trading and addressed questions on the price and reduction rate of allowances.
The above documents have certain reference significance for urban public transport to participate in the carbon-trading market, but there are also some problems: the security of carbon-trading-related data has not been considered; the efficiency of information transmission is low due to centralized management [26,27]; the incentive effect of promoting urban public transport to participate in carbon trading and emission reduction is not obvious [28,29] and asymmetric and imperfect transaction matching information between urban public transport transaction entities leads to few overall benefits [30][31][32].
The application of emerging technology blockchain in the carbon-trading mode is expected to become a new way to solve the above problems.The blockchain system uses the distributed consensus mechanism to generate and update data.Its characteristics, such as decentralization, point-to-point transactions and full-node participation in data recording [33][34][35], have eliminated the possibility of illegal data compilation from the technical level, and improved the traceability of carbon emissions from mobile sources of urban public transport.Refs.[36,37] proposed a personal carbon-credit-trading model and established a carbon-emission-right verification system for the blockchain.Reference [38] used the multistandard analysis method to evaluate the proposed government transport individual trinity carbon-trading system co-governance policy based on blockchain technology.The authors of [39] summarized the existing achievements of blockchain application in the field of carbon trading, designed the blue carbon system architecture diagram under peer-to and enriched and promoted the development of the current carbon-trading market.The authors of [40] established a carbon-emission-trading-mechanism model based on blockchain, taking into account the credibility of both parties.The study in [41] provides a blockchain-based energy-trading network, and it significantly reduces carbon footprint (15%) by enhancing energy exchange between intelligent agents.The above studies all use blockchain to establish a new carbon-trading system.
To sum up, the existing research at home and abroad mainly focuses on how the public transport industry can effectively enter the carbon-trading system and apply blockchain technology to the carbon-trading system [42].Based on the characteristics of blockchain technology and considering the actual business scenario requirements, this paper designs a framework for urban public transport to participate in the carbon-trading system, and establishes the emission reduction progress factor index considering profits, passenger flow and carbon emissions, and then establishes the urban public transport operation-cost model and transaction-matching model under the carbon-trading scenario.The practical significance of this paper is to reduce carbon emissions and operating costs of urban public transportation by optimizing transportation operation strategies and facilitating carbon-trading matching between buyers and sellers through the proposed model.This provides a reference for further carbon-market-based management of urban public transportation in the future, and also provides a theoretical model for urban public transportation enterprises participating in carbon trading.

Carbon-Trading Architecture Design of Urban Public Transport Based on Blockchain Technology
Based on the combination of the characteristics of the distributed ledger of blockchain technology and smart contract [43,44], the architecture diagram of urban public transport participating in the carbon-trading market is designed, as shown in Figure 1 below.
As shown in Figure 1, the frame composition is divided into internal and external levels.The inner layer describes the imbalance of carbon emissions among urban public transport entities and the urban public transport operation cost model under the carbontrading market.Due to the differences in the emissions of various subjects of urban public transport, there will be surplus and excess emissions.Therefore, the surplus and shortage subjects of urban public transport emissions can achieve carbon-emission balance by paying carbon credits or tokens in the carbon-trading market (see the outer description).The dual transaction-releasing entities conduct carbon transaction matching through the established transaction-matching model, in which the transaction information of both parties is released to the blockchain for storage to achieve efficient and safe data processing.The energy-consumption cost, carbon-transaction cost and penalty cost together constitute the urban public transport operation-cost model, and based on this, the existing public transport main operation schedule is optimized.Finally, the established model can reduce the carbon emissions and operating costs of urban public transport entities and provide specific methods for bilateral transactions.Each link will be described in detail below.

Establishment of Carbon-Trading System Process for Urban Public Transport
The progress factor of urban public transport emission reduction, operation cost and carbon-trading match are the core of this carbon-trading system.The emission-reduction progress factor comprehensively considers the profit, carbon-emission and passengerflow factors within the cycle of urban public transport enterprises.It is the basis for establishing the urban public transport operation-cost model and carbon transaction-matching model, and is also the key measure of its excess emission penalty cost.The operation-cost model of urban public transport is the key factor to study its efficient participation in the operation of the carbon-trading market.The urban public transport transaction-matching model is the purpose of the carbon-trading system, which balances the allocation of carbon-emission rights twice and urges them to actively reduce emissions.The three interact with and promote each other to achieve the ultimate goal of carbon-emission reduction in urban public transport.The above three processes are shown in Figure 2, and detailed model-building instructions and numerical analysis will be carried out below.

Construction of Urban Public Transport Model under Carbon-Trading Scenario
This section first gives the definition and calculation method of the emission-reduction-progress factor, then analyzes the constituent elements of urban public transport operation cost and finally establishes the urban public transport operation-cost model and transaction-matching model.

Establishing Progress Factors of Urban Public Transport Emission Reduction
The significance of establishing the urban public transport emission-reduction-progress factor lies in that the evaluation index selected through the calculation measures the current emission-reduction effect, serves as the judgment basis of the sub-cost-penalty cost of the urban public transport operation-cost model and provides the calculation basis for the urban public transport transaction-matching model.

Calculating the Emission Reduction Progress Factor Value According to the Difference in Evaluation Indicators of Public Transport Enterprises in Different Cities
The extreme value treatment method is adopted to conduct dimensionless treatment on the indicator value.According to the dimensionless values of positive-benefit-type and negative-cost-type indicators, they are: where We then calculate the proportion of the mth evaluation indicator m y of n x in the sum of the indicators of all transport enterprises: The entropy where The weight of index m y is calculated as follows: Then, the value of n x emission-reduction progress factor of urban public transport enterprises under the difference degree of assessment indicators is: According to Formulas (1) and ( 2), we can obtain: where is the dimensionless value of urban public transport enterprises in the k-1 cycle assessment index.

The value of n
x emission-reduction progress factor of urban public transport enter- prises under the change degree of assessment indicators is: The value of emission-reduction progress factor of public transport enterprises in Gucheng City in cycle k is: where  and 2  are the difference degree coefficient and change degree coefficient of the evaluation index, respectively.When taking the actual value, 1  and 2  can be classified according to the stable state of urban public transport enterprises' emission reduction, so as to determine the value.When the emission-reduction effect of urban public transport enterprises tends to be stable or progressive, 1

Establishing and Improving the Emission-Reduction Progress Factor to Determine the Penalty for Excessive Emissions of Urban Public Transport
The purpose of this little program is to solve the unfairness of using the same numerical standard to judge different urban public transport transaction entities and the irrationality of awarding and punishing only according to this cycle.
According to the performance of carbon emissions in this cycle, the improvement and emission-reduction progress factor that takes into account the emission profit and loss of urban public transport enterprises can be set as:

Construction of Urban Public Transport Operation-Cost Model under Carbon-Trading Scenario
The urban public transport operation-cost model proposed in this paper considers economic benefits and social benefits.Although the optimization scheme with the lowest carbon emission is the one with the least energy consumption, it is meaningless for enterprises to take the lowest carbon emission or energy consumption as the optimization goal.In addition, with the rapid improvement in the national carbon-trading market, urban public transport enterprises will also worry about how to participate in carbon trading while considering their own interests.Therefore, the objective function of this paper is not to minimize carbon emissions or energy consumption, but to minimize operating costs.The operation cost of urban public transport includes energy consumption cost, penalty cost and carbon emission transaction cost.

Carbon Emission Calculation Model of Urban Public Transport Vehicles
The energy consumption of urban public transport is mainly related to departure frequency, operating mileage and passenger capacity.The higher the departure frequency is, the smaller the departure interval h is, and the passenger flow in different periods is very different.Here, ij q represents the net passenger capacity of vehicle i at station j per unit time.The smaller h represents more vehicles passing through station j , mean- ing a smaller ij q per vehicle on average.Therefore, there is a relationship between net passenger capacity per unit time and departure interval: where  represents the ratio coefficient.
Then the total passenger capacity of vehicle i is: where ij AT represents the time when i arrived at j station, and is the time that i car stays at station j .
There are many ways to calculate carbon emissions.This paper is based on the per capita carbon emissions of urban public transport using different types of energy.The calculation of carbon emissions per capita in the existing literature only considers the rated passenger capacity, and does not consider the impact of vehicle service life and seasonal temperature.Generally speaking, the service life of vehicles is proportional to their energy consumption.Similarly, the energy consumption of vehicles in high and low temperatures is higher than that in normal temperatures.Especially in northern China, the energy consumption of vehicles in summer and winter is naturally higher than that in spring and autumn.Therefore, when establishing the calculation model of vehicle carbon emissions, this paper considers the impact of two factors, vehicle service life 1  and sea- sonal temperature difference 2  , based on per capita carbon emissions.
According to the above analysis, the per capita carbon emissions of vehicle i using t energy are: where it Pce is the per capita carbon emissions without considering the service life and seasonal temperature difference.
Then the total carbon emission of vehicle i is: where i v represents the average running speed of vehicle i , and ( , 1) i j j T  represents the running time of vehicle i between two stations.In China, thermal power generation is the main form, accounting for nearly 70% of the total.Electric vehicles for public transport in old cities will also produce indirect carbon emissions.The total energy consumption of vehicle i using t energy is: where i  represents the proportion coefficient of thermal power and t  represents the carbon emission coefficient of t energy.

Operation Cost Model of Urban Public Transportation
The energy-consumption cost is the product of the total energy consumption it TE consumed by the vehicle and the unit price t c of the energy.Based on the above analysis, the energy-consumption cost of urban public transport vehicles can be expressed as: When the actual carbon emission of urban public transport is lower than the carbon quota, the remaining quota can be sold for profit.When the carbon emission exceeds the upper limit of the quota, the excess quota must be purchased.Therefore, the carbon-transaction cost of urban public transport is the product of carbon price and carbon-purchase quota, which can be expressed as: where p C is the carbon price.
When urban public transport vehicles exceed the amount of carbon allowances emitted in violation, i.e., , they have to pay a penalty to motivate the enterprises to reduce emissions.The penalty cost can be expressed as: where  is the penalty-intensity factor.
Energy-consumption cost, carbon-transaction cost and penalty cost can be obtained according to the embedded smart contract and issued in the form of a certificate [45], which is more conducive to ensuring data security and operational efficiency.
Based on the above analysis, the minimum operating cost of urban public transport under the carbon-trading scenario can be expressed as follows: . .
Constraint 1 is the departure interval constraint, which is determined in combination with the specific requirements of the line, and the value is taken; constraint 2 is the interstation operation-time constraint, and the value is determined according to the line attribute; constraint 3 refers to the time constraint of boarding and alighting at stops, and its upper and lower limits are mainly determined by passenger flow.
The process of the urban public transport operation-cost model based on blockchain technology is shown in the red block diagram in Figure 2.

Design of Urban Public Transport Transaction Mechanism Based on Blockchain Technology
In the phase of urban public transport transaction matching, urban public transport enterprises publish the transaction information to the blockchain, and the buyer and seller of carbon-emission quota can publish the quantity and unit price they sell or purchase, as well as the emission-reduction progress factors of both parties to the smart contract.The published information is written into the smart contract with a unique identification number (ID) and distributed on each node in the blockchain network that can be accessed by all urban public transport transactions.In addition, the number of sales quota issued by the seller and the number of tokens that the buyer needs to pay are temporarily transferred to the account of the smart contract until the buyer and the seller withdraw them or execute the transaction.The matching model of urban public transport carbon-quota transaction based on blockchain technology is shown in Figure 3.

Carbon credit buyer
Smart trading contract  For example, if the urban public transport purchasing node ) sends P tokens to the account of the smart contract, the smart contract's self-executing program is triggered.Given the ID of the number of carbon-emission credits sold, the smart contract can retrieve the number of sales, unit price and self-emission-reduction progress factor of the urban public transport sales node ), as well as the required value of the emission-reduction progress factor of the enterprises purchasing the node, for the matching verification of transactions between the two parties.If the two parties of the transaction match successfully, we calculate the transaction quantity Q, deduct it from the sales quantity of the sales node and increase the corresponding token.In this scenario, the transaction is successfully added to a new block, which stores the updated transaction information and tokens in the accounts of both parties that match successfully.

Construction of Urban Public Transport Transaction-Matching Model
This section considers the mutual satisfaction of both parties to the transaction, and takes the maximum satisfaction of both parties as the principle of matching success to establish the urban public transport transaction-matching model.The difficulty of the transaction is linked to the emission reduction and operation of urban public transport enterprises, so as to stimulate and mobilize the power of urban public transport emission reduction.
When the smart contract performs transaction matching, it is necessary to verify the emission reduction progress factor value, price, trading volume and other parameters of both parties.We set where lr V is the lower-limit value of the parameter that the selling node can accept, hr V is the expected value of the parameter for the selling node and The comprehensive satisfaction of public transport selling node Sx is p D .Therefore, the model aiming to maximize the matching satisfaction of urban public transport transaction parties is as follows: where 1 1, 2,..., 1; 2 1, 2,..., 2   means that the buyer and the seller suc- cessfully match and conduct the transaction;   means they failed to match.
The above model is to find the optimal matching solution.In order to improve the solving efficiency and save time, the Hungary algorithm can be used to solve the matching satisfaction model.The process of the urban public transport transaction-matching system based on blockchain technology is shown in the blue block diagram in Figure 2.

Simulation Design
First, the effectiveness of the model was verified through simulation experiments.According to the characteristics of urban public transport and the representativeness of indicators, carbon emissions 1 y , passenger traffic 2 y and profit 3 y were selected as the calculation indicators of the emission-reduction progress factors of urban public transport enterprises.Then, the actual data of the indicators of five urban public transport enterprises for two consecutive cycles were taken as examples, and the data are shown in Table A1 in Appendix A. The data are referenced from China Energy Statistical Yearbook and China Transportation Yearbook.In this section, MatLab was used to solve the urban public transportation operating-cost model.We used a genetic algorithm and set the initial population number as 100, the mutation probability as 0.05 and the crossover probability as 0.9, and the minimum value after 100 iterations was taken as the optimal solution of the model.In order to further explain the effectiveness of the carbon-trading system based on blockchain technology, the simulation design of the main links is provided as an explanation.

After application submission, qualification review and obtaining digital certificates
and public and private keys, urban public transport enterprises became user nodes on the blockchain.After being approved by relevant audit and certification institutions, the three data indicators of emission-reduction progress factors were recorded on the blockchain and saved in the form of merkle trees to prevent data being tampered with.2. We selected Hyperledger Fabric as the simulation platform.Hyperledger Fabric can realize the dynamic management of carbon quota and carbon price.Hyperledger Fabric adopted a multichannel mode in this paper, which can realize data partition and ensure the safety of private data such as profits and carbon emissions of urban public transport enterprises.3. The simulation data structure in this paper is similar to the Bitcoin system.It is a chain structure with blocks as units.The block header and block body are composed of hash value links, which can ensure the data's tamper resistance.4. The main steps of the simulation implementation: ➀ Set up the environment.Combining the role of the main functions in the established urban public transportation carbon-trading system, the client of the built Hyperledger Fabric network was used to simulate the user nodes for initiating carbon-trading requests.When a carbon transaction occurs in a user node, the mining operation is executed and the carbon transaction information is packaged into blocks, and the block chain is maintained for the orderly generation of blocks in the carbon-trading system.➁ Generate public and private keys and certificates.The certificate service in the Fabric network simulates a certificate-issuing authority.If a company wants to join the carbon-trading system, it must register with the certificate-issuing authority and obtain the signature and public-private key.➂ Generate Genesis block.Each node takes the Genesis block as the first block of the blockchain, that is, the Genesis block is set as the root node of the merkle tree for data storage so as to ensure the safety and credibility of data related to carbon trading.➃ Install and run smart contracts.The required smart contracts mainly include a smart penalty contract and smart transaction contract.5.The main process of the simulation operation: ➀ Urban public transport enterprises obtain carbon quota and embed the emission-reduction progress factor model into the smart contract, thus automatically calculating the emission-reduction progress factor value. ➁ At the end of the emission-reduction compliance cycle, the smart penalty contract is triggered and the penalty is automatically executed.➂ When the enterprise enters the carbon-trading phase, the smart-trading contract is triggered and the transaction-matching and transaction-settlement operations are automatically performed.➃ After the above processes are completed, all information is stored in many accounting nodes, and the carbon transaction data stored in each node is the same and traceable.

Analysis of Urban Public Transport Operation-Cost Simulation Results
We set 1  = 0.6 and 2  = 0.4.The calculated values of the emission-reduction pro- gress factors are shown in Appendix A, Table A2.According to the carbon price in China's market, the case-carbon price was set at CNY 50 per ton, the carbon quota was 0, 1  and 2  were 1, ij q was 2 and  was 1.The rated capacity of the bus was 70, and we used the YuTong bus ZK6128HQ as an example of fuel buses and ZK6128BEV as an example of electric buses.The train capacity was 310 people per car, and the fuel-emission factor provided the corresponding default value according to the GHG Protocol series standard (see Table A3 in Appendix A).For the convenience of calculation, the number of subway trains was set as one, and the number of electric buses and fuel buses was set as one, with a mileage of 200 km.The resultant data are compared in Table 1 below.According to the table above, the following findings can be obtained: 1.The carbon emission of electric buses is far lower than that of fuel buses.Therefore, the use of electric buses in the operation process can greatly reduce the carbon emissions of public transport enterprises.2. Under the same conditions, the energy-consumption cost of electric buses is less than one fifth of that of fuel buses.Therefore, replacing fuel buses with electric buses will help public transport enterprises reduce operating costs.3.In the scenario with a carbon price of CNY 50 per ton and zero carbon quota, the penalty cost of electric buses is less than one third of that of fuel buses.Therefore, a sensitivity analysis on the penalty intensity is provided in Section 4.2.2. 4. At a carbon price of CNY 50 per ton, the carbon-trading costs of subway trains, electric buses and fuel buses are smaller, accounting for about 5% of the total operating costs, at CNY 19.46, CNY 4 and CNY 10.25, respectively, but the difference in carbon emissions is larger.Therefore, in Section 4.2.3, the effects of carbon price and carbonquota changes on the cost and carbon emission of the three transportation models are analyzed separately. 5.The minimum-operating-cost model in this paper is based on the carbon-trading scenario, while the existing subway train and bus operating schedules are developed under the no-carbon-trading model; therefore, the current train and bus operating schedules are optimized under the consideration of the carbon-trading model in Section 4.2.4.

Sensitivity Analysis of Punishment Intensity
At present, there are problems of ambiguous and insufficient penalties for urban public transportation participation in carbon trading, which ultimately lead to low enthusiasm of urban public transportation participation in carbon trading and poor emissionreduction results.Therefore, this paper establishes a penalty mechanism model to analyze the impact of penalty intensity on carbon emissions and operating costs, so as to determine the effective penalty-intensity range.The range of penalty intensity coefficients is 0-20, and the results are shown in Figure 4 below.As shown in the figure, the carbon emission of urban public transportation vehicles decreases with the increase in penalty intensity, and when the penalty intensity coefficient reaches 6-8, the carbon emission tends to level off; after it exceeds 8, the carbon emission basically stops decreasing.At the same time, the operating cost of urban public transportation vehicles increases with the increase in penalty intensity, and after the penalty intensity coefficient exceeds 8, the rising trend of cost accelerates.Therefore, considering the carbon emissions and operating costs, it is more appropriate to set the penalty intensity coefficient to 6-8, which can ensure the effective emission reduction in urban public transportation vehicles and control the rapid increase in costs.

Carbon-Price and Carbon-Quota Sensitivity Analysis
At present, China's carbon-trading market is not yet mature, and the carbon price in the pilot areas is generally low, between CNY 10 and 100 per ton.In the EU and Japan, carbon prices are higher, ranging from CNY 500 to 1000 per ton.Therefore, this section sets different carbon prices and carbon quotas to analyze the impact of urban public transportation vehicles on carbon emissions and operating costs.Firstly, 20 sets of data with carbon price of CNY 50, 100, … and 1000 per ton were set for analysis.The results are shown in Figure 5 below.As seen in Figure 5, with the increase in carbon price, the carbon emission of urban public transportation vehicles also decreases gradually, until the decreasing trend slows down when the carbon price reaches CNY 600-700 per ton, thus providing a reference basis for the current low carbon price in the pilot areas of China.With the increase in carbon price, the decrease in carbon emissions and trend of fuel buses and subway trains is larger than that of electric buses, because the carbon-emission base of the former two is large; therefore, the increase in carbon price is more effective for high-carbon-emission vehicles to reduce emissions.
The high carbon price increases the cost for the subjects who overemit, and increases the profit of carbon trading for the subjects who emitted surplus, i.e., it reduces the cost.Therefore, Figure 6 below analyzes the changes in carbon-trading costs, profits and operating costs of urban public transportation vehicles under different carbon allowance amounts when the carbon price is CNY 700 per ton.
As shown in Figure 6, the carbon-trading cost and total cost of urban public transportation vehicles show a decreasing trend as the carbon quota rises.When the carbon quotas are 389.1,80.3 and 205 kg, respectively, the carbon-trading cost of subway trains, electric buses and fuel buses is 0. When the carbon quotas continue to increase, urban public transportation vehicles gain carbon-trading benefits.
For total operating costs, as carbon allowances increase, subway trains have the fastest decreasing trend, followed by fuel buses, and electric buses are the slowest, due to the fact that vehicles with larger emission bases pay a higher price when emissions are exceeded under high penalty-intensity conditions.
The analysis in Figures 5 and 6 provides a more appropriate range of carbon prices and carbon quotas for urban public transportation vehicles, and demonstrates that higher carbon prices are beneficial in causing high-carbon emitters to actively reduce emissions.Compared with fuel buses, electric buses have lower operating costs and are able to gain more carbon-trading revenue at higher carbon prices and carbon allowances.The data related to a selected line in City A from 6:30 to 8:30 a.m. and onward are shown in Table A4 in Appendix A. Table A4 lists the number of stops, the length of the line and the number of card swipes at each stop for the line, and the vehicles used are fuel buses.
Due to the high passenger flow during the peak period, the upper and lower limits of the departure interval h can were to 5-15 min.The carbon price was set to CNY 700 per ton, the carbon quota was 25 kg, the penalty factor was 6, the capacity of both electric and fuel buses was 70, the average speed was 30 km/h, and the rest of the parameters were assumed to be unchanged.The optimized schedule was obtained after 10 times of solving with the genetic algorithm selected as shown in Table 2 below.As seen in Table 2 above, the optimized carbon emissions were reduced by 248.4 kg and the total operating cost was reduced by CNY 512.5 under the condition that the passenger demand was met.If the fuel bus was replaced with an electric bus, the carbon emissions were 1057.2kg and the total operating cost was CNY 2012.6.Compared with the fuel bus, the use of an electric bus in the context of carbon trading can significantly reduce carbon emissions as well as operating costs.

Optimization of subway train operation during off-peak hours:
The optimization of subway trains during off-peak hours is conducive to adjusting the allocation of transport-capacity resources and avoiding their waste.Here, it was considered to maximize the utilization of rail transit resources when meeting the demand of passenger flow under the carbon-trading scenario, so as to achieve the goal of minimizing operating costs and reducing carbon emissions.
A line in City A was selected to form a group of six A-type cars, with a load of 310 people per car, in the period 13:00-14:00 with a departure frequency of 11 trains per hour.The basic operating data and line conditions are shown in Appendix A Table A5.
Because of the small passenger flow during the off-peak period, the upper and lower limit time of train departure interval was set as 6-15 min, the carbon price was CNY 700 per ton, the carbon quota was 389.1, the penalty factor was 6, the average train speed was 50 km/h and the rest parameters were unchanged.The optimized results are shown in Table 3 below after 10 times of solving using the genetic algorithm.3 above, it can be seen that after optimization, the train departure interval increased from 327s to 540s, and the departure frequency was reduced to seven trains per hour under the condition that passenger demand was met as much as possible.After optimization, the carbon emission was reduced by 522.6 kg and the total operating cost was reduced by CNY 852.1.
The above results of optimizing the operation of urban public transport vehicles show that carbon price, carbon quota and penalty strength are the key influencing factors of carbon emissions and operating costs of urban public transport vehicles under the carbon-trading scenario, and the appropriate range of values is beneficial to urban public transport in controlling costs while minimizing emissions.

Transaction-Matching Calculation Results of Urban Public Transport
It was assumed that urban public transport enterprises only need to consider two factors, carbon price and emission reduction progress factor value, in the transactionmatching stage, and we set the weights as 0.4 and 0.6.Tables A6 and A7 in Appendix A show the two factor values of buyers and sellers themselves and the factor values required from each other, respectively.Urban public transportation companies can post the transaction demand on the blockchain and automatically match the transaction with the maximum matching satisfaction model through the smart transaction contract.
According to the transaction-matching model and Tables A6 and A7, the satisfaction of urban-public-transport-selling enterprises to urban-public-transport-purchasing enterprises can be calculated.The purchase price and the buyer's emission-reduction progress factor value are positive-benefit factors for the seller.The satisfaction of urban-publictransport-selling enterprise 1 to purchasing enterprise 2 is calculated as follows: The satisfaction matrix of urban-public-transport-selling enterprises to purchasing enterprises is obtained by solving in turn: 0.876 0.480 0.613 0.244 Similarly, the satisfaction of urban-public-transport-purchasing enterprises to selling enterprises can be calculated.The selling price is a negative-cost factor for the buyer, and the seller's emission-reduction progress factor is a positive-benefit factor for the buyer.The satisfaction of urban-public-transport-purchasing enterprise 2 to selling enterprise 1 is calculated as follows: 3.00 1.00 The satisfaction matrix of urban-public-transport-purchasing enterprises to selling enterprises is obtained by solving in turn: 0.370 0.204 0.311 0.533 Therefore, when the transaction-matching satisfaction between buyers and sellers of urban public transportation is maximized, the results are calculated as follows.
Therefore, urban-public-transportation-selling company 1 is successfully matched with buying company 2 for the transaction, and urban-public-transportation-selling company 3 is successfully matched with buying company 4 for the transaction.

Conclusions
Based on the security, decentralization and smart contract features of blockchain technology, this paper establishes a system model for urban public transportation networks to participate in carbon trading.In order to improve the enthusiasm and operational efficiency of urban public transportation to participate in the carbon-trading market, and at the same time reduce the operational cost and carbon emission of urban public transportation, the operational cost model and carbon-trading-matching model are established, and through the analysis of arithmetic examples, the results show that.
1.The proposed system model for urban public transportation networks to participate in carbon trading leverages the decentralized, distributed ledger and smart contract technologies of blockchain.Hyperledger Fabric was used as the simulation platform, and all the urban public transportation enterprises on the chain were used as user nodes for carbon trading.To a certain extent, this ensures the security and traceability of the data of the chained urban public transport enterprises and improves the operational efficiency of the carbon-trading market.2. The urban public transportation operation-cost model established in this paper takes into account the realistic characteristics of urban public transportation.The passenger volume, carbon emission and profit were selected as the basis of the proposed emission-reduction progress factor index, and the genetic algorithm was compiled into the blockchain to solve this model.The results show that the total operating cost and carbon emission of the optimized urban public transportation are reduced.3.In this paper, a matching model for urban public transportation carbon transactions was established and the Hungarian algorithm was compiled into the blockchain.By matching the satisfaction of both sides of the transaction, the aggregated transaction between the uplinked urban public transportation enterprises is realized.The carbon-trading efficiency and market activity are improved.
This paper provides a preliminary exploration into and research on the construction of urban public transportation participation in the carbon-trading mechanism, realizes the carbon-market-based management mode of urban public transportation, provides reference for urban public transportation enterprises to reduce emissions and contributes to the realization of low-carbon transportation.In addition, there is still room for improvement in the specific market mechanism design and different types of urban public transport participation in carbon-trading behavior.The limitation of this paper is that the selection of urban public transportation models is relatively single, and only representative indicators were selected, which still lacks comprehensiveness.Further refinement and in-depth research on the coordination of interests among urban public transportation and the selection of calculation model indicators are needed in the follow-up.Note: "29.5~31.4"means the buyer's price expectation is 29.5, and the acceptable upper limit is 31.4;"3.00~1.00"means the buyer's expectation is 3.00, and the acceptable lower limit is 1.00.

Figure 1 .
Figure 1.Architecture of urban public transport carbon-trading system based on blockchain technology.

Figure 2 .
Figure 2. Flow chart of urban public transport carbon-trading system based on blockchain technology.
is the number of urban public transport enter- prises, M is the number of evaluation indicators and k nm x is the value of evaluation in- dicator m y of urban public transport enterprise n x in the kth cycle.the matrix formed by dimensionless data of all evaluation index m y values of urban public transport enterprises n x in the kth cycle.

) 3 . 1 . 2 .
Calculating the Value of Emission-Reduction Progress Factor according to the Change Degree of Evaluation Indicators of Urban Public Transport Enterprises First, we define k nm  as the difference value of n x after the dimensionless treatment of the evaluation index in the k-cycle and k-1 cycle, and we use this difference value to express the change degree of evaluation index m y of urban public transport enterprises.

FF
is the actual carbon emissions of urban public transport enterprises in this cycle.If , , indicating that urban public transport enter- prises have excessive emissions, should be punished and need to purchase carbon credits; indicates that urban public transport enterprises have surplus emissions and can sell carbon credits.

Figure 3 .
Figure 3. Matching model of urban public transport carbon quota transaction based on blockchain technology.
Sx of urban public transport.When r Pa is a positive-benefit-type parameter, such as purchase price, the satisfaction of sales node value of the parameter for the purchasing node.When r Pa is a negative-cost parameter (such as emissions), the satisfaction of sell- comprehensive satisfaction of urban public transport purchasing node 1 n Px to selling node 2 n

Figure 4 .
Figure 4. Changes in carbon emissions and costs of urban public transport vehicles under different penalties.

Figure 5 .
Figure 5. Changes in carbon emissions and costs of urban public transport vehicles at different carbon prices.

Figure 6 .
Figure 6.Change in carbon transaction cost and total cost of urban public transport vehicles under different carbon quotas.

Table 1 .
Results of urban public transport operation cost under carbon-trading scenario.

Table 2 .
Comparison before and after optimization.

Table 3 .
Comparison before and after optimization.

Table A3 .
Default values of emission factors.

Table A4 .
Basic data of a bus line in City A.

Table A5 .
Basic data of subway train line in City A.

Table A6 .
Factor values of the seller's node enterprise and requirements for the buyer's node enterprise.The emission-reduction progress factor "2.40~1.40"indicates that the seller's expectation value is 2.40 and the acceptable lower limit value is 1.40; the price requirement "32.3~29.8"indicates that the seller's price-expectation value is 32.3 and the acceptable lower limit value is 29.8.The lower limit is 29.8.

Table A7 .
Factor values of the buyer's node enterprise and requirements for the seller's node enterprise.