Second-hand car online transaction management method based on block chain technology
By using hash functions and smart contracts to store data in the used car trading system, optimizing the network architecture with sharding technology, and combining it with real-time monitoring of traditional evaluation systems, the problems of transaction supervision and risk prediction in the used car trading system are solved, achieving efficient and reliable transaction management.
Patent Information
- Application Number
- CN202510863178.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-11-07
AI Technical Summary
In used car trading systems, how to effectively monitor the transaction process and predict potential risks, especially in high-concurrency transaction scenarios, is a key challenge. How can blockchain network sharding and sidechain expansion technologies optimize the network architecture to improve transaction processing capabilities while solving the problems of cross-chain data synchronization and consistency maintenance?
A unique identifier is generated using a hash function to store vehicle information, fund transfer records, and evaluation reports to blockchain nodes. Smart contracts are used to achieve fund custody and transaction confirmation. Sharding technology is used to partition and process the network. Data from traditional evaluation systems is combined for real-time monitoring, dynamically updating contract logic and adding an automatic triggering mechanism. Sidechains are introduced to expand transaction processing capabilities.
It has significantly improved the reliability, transparency, and efficiency of used car transactions, and built a safe and efficient used car trading platform.
Smart Images

Figure CN120912318A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of second-hand car transaction platforms, and in particular to a second-hand car online transaction management method based on blockchain technology. BACKGROUND
[0002] In a second-hand car transaction system, how to effectively supervise the transaction process and predict potential risks is a complex technical challenge. First, when storing data such as vehicle information, fund flow and evaluation reports on the chain, the problem of data authenticity verification arises. Secondly, in a high-concurrency transaction scenario, the execution efficiency of the smart contract and the degree of network congestion directly affect the timeliness and reliability of the transaction. This is closely related to the sharding and sidechain expansion technology of the blockchain network, because optimizing the network architecture can improve the transaction processing capacity, but at the same time it also increases the difficulty of cross-chain data synchronization and consistency maintenance. In addition, in the real-time log generated by dynamically monitoring the transaction process, how to accurately extract risk features and effectively integrate them with the data of the traditional evaluation system to achieve accurate prediction of transaction risks is also a problem that needs to be solved. These technical difficulties are interrelated and jointly affect the reliability, efficiency and user experience of the second-hand car blockchain transaction system. SUMMARY
[0003] The application provides a second-hand car online transaction management method based on blockchain technology, mainly including: Obtain vehicle information, fund flow records and evaluation reports from second-hand car transaction historical data, generate a unique identifier through a hash function and store it in a blockchain node to obtain a distributed ledger record; For the distributed ledger record, generate a hosting contract logic using a preset smart contract template, including fund locking, vehicle state verification and transaction confirmation conditions, and determine the initial version of the contract; According to the initial version of the contract, simulate a high-concurrency transaction scenario in a test network, extract performance bottlenecks from transaction delay and failure rate data, and determine the degree of network congestion; If the degree of network congestion exceeds a preset threshold, partition the blockchain network using sharding technology, distribute transaction data to different subchains, and obtain an optimized network architecture; Obtain subchain transaction logs from the optimized network architecture, generate dynamic logs through real-time monitoring of the transaction process and extract risk features, combine the detection data uploaded by the traditional evaluation system, verify the consistency and integrity of the data through digital signature, and determine the credibility of the on-chain data; For the credibility of the on-chain data, analyze the transaction delay trend through dynamic log analysis and evaluate the impact of risk features on congestion, update the hosting contract logic, add an automatic trigger mechanism, and unlock the funds when the vehicle information verification is passed, to generate an executable contract version; According to the executable contract version, it is deployed to the main network node, the user experience data and system stability index are extracted from the real-time transaction feedback, and the architecture optimization effect is judged; If the architecture optimization effect is not as expected, the transaction processing capacity is expanded through the side chain technology, the high-frequency transaction is unloaded to the independent chain and is synchronized with the main chain regularly, and the final transaction system is obtained; The full-process log is obtained from the final transaction system, the data tampering, transparency and efficiency index are analyzed, and the transaction reliability improvement range is determined.
[0004] Optionally, the vehicle information, fund flow record and evaluation report are obtained from the used car transaction history data, a unique identifier is generated by a hash function and stored in a blockchain node, a distributed ledger record is obtained, including: The vehicle information, fund flow and evaluation report are obtained from the transaction history, the independent data unit is separated by structured processing, and the preliminary data set is obtained; The preliminary data set is encrypted by a hash function to generate a unique identifier; The unique identifier is bound with the preliminary data set and stored in the blockchain node to obtain a node storage record; If the node storage record consistency check is passed, the blockchain node is updated by a distributed consistency algorithm to obtain a distributed ledger record; According to the distributed ledger record, the query tool is used to extract the corresponding relationship between the vehicle information and the fund flow, and the transaction tracing path is determined; For the tracing path, the time series analysis is used to detect fund flow anomalies and determine abnormal transaction records; The abnormal transaction records are obtained, combined with the evaluation report, and the transaction integrity verification result is generated by logical comparison.
[0005] Optionally, the distributed ledger record is used to generate a hosting contract logic using a preset smart contract template, including fund locking, vehicle state verification and transaction confirmation conditions, to determine the initial version of the contract, including: The transaction request data is obtained from the distributed ledger, and the ledger record management mechanism is used to obtain a structured record result; For the structured record result, a preset rule is designed to extract logical parameters from the smart contract template to determine the hosting contract logic framework; If the hosting contract logic framework is generated, the vehicle state data is analyzed by a state verification process to determine whether the vehicle state meets the preset conditions; According to the vehicle state judgment result, the fund locking condition is used to process the transaction request to determine the fund locking state; If the fund locking state is confirmed, the transaction confirmation clause is matched by the transaction execution logic to obtain a transaction verification result; According to the transaction verification result, the initial contract version is updated by a contract generation method to determine the final contract content; The final contract content is recorded to the distributed ledger through ledger record management to obtain complete transaction records.
[0006] Optionally, according to the initial contract version, a high-concurrency transaction scenario is simulated in a test network, and performance bottlenecks are extracted from transaction delay and failure rate data to determine network congestion degree, including: A simulation environment is constructed through the test network to obtain running data of the high-concurrency transaction scenario, and transaction delay and failure rate values are obtained; Abnormal data is extracted from the transaction delay and failure rate values, and a K-means algorithm is used for cluster analysis to determine the distribution range of the performance bottleneck; For the distribution range of the performance bottleneck, the transaction delay trend of each node is obtained to determine whether there is local congestion; If the transaction delay trend exceeds a preset threshold, the high-concurrency impact range is extracted through node flow data to obtain the key area of network congestion; According to the key area of network congestion, a random forest algorithm is used to predict the probability of failure rate rising to determine the congestion degree classification; The congestion degree classification result is obtained, and the running state of the overall network is determined in combination with the simulation environment data of the transaction scenario; Through the overall network running state, the bottleneck optimization direction under the high-concurrency scenario is extracted to obtain the adjusted transaction processing strategy.
[0007] Optionally, if the network congestion degree exceeds a preset threshold, the blockchain network is partitioned by sharding technology, and the transaction data is distributed to different subchains to obtain an optimized network architecture, including: If the network congestion degree exceeds a preset threshold, real-time transaction data is obtained through a monitoring system to determine the congestion degree; According to the determination result, the blockchain network is partitioned by sharding technology to obtain a partitioned network structure; Through the partitioned network structure, the transaction data is distributed to different subchains to obtain distributed data streams; The distributed data streams are load balanced by using a consistent hashing algorithm to determine a subchain processing sequence; For the subchain processing sequence, the running state of each subchain is obtained to determine whether there is a delay anomaly; If the delay anomaly exists, the performance of the optimized subchain is obtained by dynamically adjusting the resource allocation of the subchain; According to the optimized subchain performance, the network partition configuration is updated to obtain an overall optimized network architecture.
[0008] Optionally, the sub-chain transaction log is obtained from the optimized network architecture, the dynamic log is generated in real time through transaction process monitoring, the risk features are extracted, the detection data uploaded by the traditional evaluation system is combined, the consistency and integrity of the detection data are verified through digital signature, the credibility of the on-chain data is determined, including: The sub-chain transaction log is obtained through the optimized network architecture, and the initial record of the transaction process is generated; The transaction log is extracted from the initial record, and the dynamic log is generated through real-time monitoring technology; The feature analysis is performed on the dynamic log, the risk features are extracted, and the risk distribution is obtained; The detection data uploaded by the traditional evaluation system is obtained, the consistency of the detection data and the risk distribution is verified through digital signature, and the consistency result is determined; The integrity of the detection data and the dynamic log is verified through digital signature, and the integrity state is determined; If the consistency result and the integrity state are passed, the detection data and the dynamic log are combined to generate the on-chain data; The credibility is determined according to the on-chain data, and the final credibility conclusion is obtained.
[0009] Optionally, the credibility of the on-chain data is analyzed by analyzing the transaction delay trend through the dynamic log and evaluating the impact of risk features on congestion, updating the escrow contract logic, adding an automatic triggering mechanism, unlocking the funds when the vehicle information verification is passed, and generating an executable contract version, including: The transaction delay data is obtained through the dynamic log, and the delay change trend is determined by time series analysis; According to the delay change trend, the congestion risk feature distribution is determined by using machine learning clustering algorithm; According to the congestion risk feature distribution, the risk feature parameters are obtained, and the escrow contract logic is updated; From the updated escrow contract logic, an automatic triggering mechanism is added to determine the triggering condition; When the vehicle information is uploaded, the integrity of the data is verified through the information verification process to obtain the verification result; If the verification result is passed, the automatic triggering mechanism is activated, the funds are unlocked, and the executable contract version is generated; The execution state of the executable contract version is verified through the on-chain data, and it is determined whether the transaction is completed.
[0010] Optionally, according to the executable contract version, it is deployed to the main network node, the user experience data and system stability indicators are extracted from the real-time transaction feedback, the architecture optimization effect is determined, including: The contract version data deployed through the main network node is obtained, the version identifier and deployment log are extracted, and the deployment process state is determined; Obtaining transaction feedback data from real-time transactions, using a log analysis tool to separate user interaction records and system response time, obtaining a transaction feedback set; For the transaction feedback set, extract user experience data, use a preset threshold to judge user operation delay and success rate, determine the experience evaluation result; Extract system stability indicators from the transaction feedback set, calculate transaction processing throughput and error rate, and judge the system running state; If the system running state is lower than the preset threshold, analyze the bottleneck position through the stability indicator, and obtain the architecture optimization direction; Adjust the contract version according to the architecture optimization direction, use simulated transactions to verify the optimized real-time transaction feedback, and determine the optimization effect; Extract the change trend from the optimization effect, compare historical data and current data to determine the stability improvement of the architecture adjustment.
[0011] Optionally, if the architecture optimization effect is not as expected, expand the transaction processing capacity through side chain technology, unload high-frequency transactions to independent chain and synchronize with the main chain regularly to obtain the final transaction system, including: Separate high-frequency transactions through side chain technology, obtain transaction data from the main chain and unload to the independent chain for processing to obtain the preliminary transaction allocation result; For the preliminary transaction allocation result, use independent chain parallel computing transaction request, judge transaction frequency through preset threshold to obtain high-frequency transaction isolation data; According to the isolation data of high-frequency transactions, use the synchronization mechanism to detect the state of the main chain at regular intervals, if the load of the main chain is lower than the preset value, batch synchronize the isolation data to the main chain to obtain the synchronized transaction record; Obtain the synchronized transaction record, verify data consistency through inter-chain interaction protocol, judge whether there are conflicting transactions, obtain the verified transaction set; For the verified transaction set, use the consistent hash algorithm to distribute transactions to the corresponding node, confirm the transaction execution state through inter-node communication to obtain the distributed transaction result; Extract the uncompleted transaction from the distributed transaction result, if the number of uncompleted transactions exceeds the preset threshold, adjust the resource allocation of the side chain to obtain the optimized transaction processing flow; According to the optimized transaction processing flow, use log record to record the state of the chain transaction, generate the final transaction system data through timestamp sorting.
[0012] Optionally, the full-process log is obtained from the final transaction system, the data tampering, transparency and efficiency indicators are analyzed, the transaction reliability improvement amplitude is determined, including: Extract the full-process log from the final transaction system, process the log content through the preset analysis tool, and obtain a structured data set; For the structured data set, a feature extraction method is used to analyze the data tampering nature, and the tampering degree is judged; Through the tampering degree, the transparency index related to the tampering degree is obtained, and the transparency evaluation value is determined; According to the structured data set, the transaction processing time distribution is calculated, and the efficiency index is obtained; If the efficiency index is lower than the preset threshold, adjust the efficiency calculation through time series analysis to determine the optimized efficiency value; Using a random forest algorithm, the tampering degree, the transparency evaluation value and the optimized efficiency value are fused to judge the reliability improvement range of the transaction; Through the reliability improvement range, the log analysis strategy extracted by the system is updated, and the adjusted full-process log processing flow is obtained.
[0013] The technical scheme provided by the embodiment of the application can include the following beneficial effects: The application discloses a second-hand car online transaction management method based on a blockchain technology. The second-hand car online transaction management method stores vehicle information, fund flow record and evaluation report to a blockchain distributed ledger, and realizes fund custody and transaction confirmation by using a smart contract. To solve the performance bottleneck in a high-concurrency transaction scenario, the application adopts a sharding technology to perform partition processing on a network, and introduces a side chain to expand transaction processing capacity. By monitoring a transaction process in real time, the application ensures the credibility of the on-chain data in combination with traditional evaluation data. Meanwhile, the application dynamically updates contract logic and adds an automatic triggering mechanism to improve transaction efficiency. Finally, the application significantly improves the reliability, transparency and efficiency of second-hand car transactions, and provides an innovative solution for building a safe and efficient second-hand car transaction platform. BRIEF DESCRIPTION OF DRAWINGS
[0014] Fig. 1 A flowchart of a second-hand car online transaction management method based on a blockchain technology.
[0015] Fig. 2 A schematic diagram of a second-hand car online transaction management method based on a blockchain technology.
[0016] Fig. 3 Another schematic diagram of a second-hand car online transaction management method based on a blockchain technology. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical scheme and advantages of the application clearer, the application will be described in detail below in combination with the drawings and specific embodiments.
[0018] As Figs. 1-3 The embodiment of the online transaction management method for used cars based on the blockchain technology can specifically include the following steps. S101, vehicle information, fund flow record and evaluation report are obtained from the used car transaction history data, a unique identifier is generated by a hash function and stored in a blockchain node, and a distributed ledger record is obtained.
[0019] The vehicle information, fund flow and evaluation report are obtained from the transaction history, the independent data units are separated by structured processing to obtain the preliminary data set. The preliminary data set is encrypted by a hash function to generate a unique identifier. The unique identifier is bound with the preliminary data set and stored in the blockchain node to obtain the node storage record. If the node storage record consistency check is passed, the blockchain node is updated by a distributed consistency algorithm to obtain a distributed ledger record. According to the distributed ledger record, a query tool is used to extract the corresponding relationship between the vehicle information and the fund flow to determine the transaction traceability path. For the traceability path, the fund flow anomaly is detected by time series analysis to determine the abnormal transaction record. The abnormal transaction record is obtained, combined with the evaluation report, and the transaction integrity verification result is generated by logical comparison.
[0020] Specifically, in the data processing of used car transactions, first, structured data such as vehicle VIN code (e.g. LSVND61T3D1234567), transaction amount (e.g. 185000 yuan) and evaluation score (e.g. 87.5 points) are extracted from the database. The SHA-256 algorithm is used to hash the string "LSVND61T3D1234567-185000-87.5" to generate a fixed-length 64-bit hexadecimal hash value (e.g. a3f5...e2b1). To improve data integrity, the Merkle tree structure is used to combine the hash values of 10 transaction records (e.g. H1+H2→H12) layer by layer, and finally generate the root hash value 9c7d...4f21. Through the smart contract setting write rule, when the node is verified, the data packet containing the timestamp (2023-11-15T14:30:22Z), block height (#7821) and transaction details is written to the channel node of HyperledgerFabric at a throughput of 2000 per second. Each block sets a 1MB storage upper limit and uses the PBFT consensus mechanism. After 3 rounds of node voting, the chain is completed. In subsequent queries, the LevelDB index is used to quickly locate the 32nd transaction of block #7821, and the vehicle's 3 times of transfer records in 2022 (transaction hash chain: x1a2→y3b4→z5c6) and corresponding evaluation score changes (82.1→85.7→87.5) are parsed. The zero-knowledge proof is used to verify the authenticity of the data without exposing the original evaluation details. Finally, the query result is encrypted and transmitted through the elliptic curve digital signature (ECDSA-secp256k1), and the private key length is 256 bits.
[0021] S102, for the distributed ledger, a preset smart contract template is used to generate a hosting contract logic, including fund locking, vehicle state verification and transaction confirmation conditions, and determine the initial version of the contract.
[0022] The transaction request data is obtained through the distributed ledger, and the structured record result is obtained by using the ledger record management mechanism. For the structured record result, the logic parameters are extracted from the smart contract template by using the preset rule design, and the hosting contract logic framework is determined. If the hosting contract logic framework is generated, the vehicle state data is analyzed through the state verification process, and it is judged whether the vehicle state meets the preset conditions. According to the vehicle state judgment result, the fund locking condition is used to process the transaction request, and the fund locking state is determined. If the fund locking state is confirmed, the transaction confirmation clause is matched through the transaction execution logic, and the transaction verification result is obtained. For the transaction verification result, the contract generation method is used to update the initial version of the contract, and the final contract content is determined. The final contract content is recorded to the distributed ledger through the ledger record management, and the complete transaction record is obtained.
[0023] Specifically, when deploying the smart contract template in the distributed ledger, first write the fund locking logic based on the Solidity language of Ethereum, set the trigger condition as the buyer transferring 30% down payment (e.g. lock 60,000 yuan when the vehicle price is 200,000 yuan), use SHA-3 algorithm to double verify the transaction hash value, ensure that the fund is locked in the contract address to generate an unalterable timestamp record. The vehicle state verification module accesses the real-time data of the Internet of Things device, triggers state verification through the preset threshold judgment rule (such as mileage less than 50,000 kilometers, no accident record stored in the CID hash value matching IPFS), and updates the vehicle state to be tradable when the engine fault code scanning result passes the elliptic curve digital signature verification (ECDSA-secp256k1 signature matching public key 0x3a7d...82f1). The transaction confirmation condition adopts a multi-signature verification mechanism, sets the three-party addresses (0x12a4, 0x45b8, 0x79c2) of the buyer, the seller and the third-party supervisory agency, and only when at least two private keys sign the transaction hash (such as 0xe3a1...c4d2) and the block height reaches the predetermined value (such as the 1580000th block), the fund transfer is automatically executed. The initial version of the contract is deployed through the Truffle framework test network, the Gas fee optimization adopts a dynamic adjustment algorithm, sets the transaction upper limit to 80,000 Gas when the average Gas price of Ethereum is 50Gwei, and after detecting the reentrant vulnerability through the static code analysis tool Slither, adds the check-effect-interactive mode (CEI) protection mechanism.
[0024] S103、According to the initial version of the contract, simulate a high-concurrency transaction scenario in the test network, extract performance bottlenecks from transaction delay and failure rate data, and determine the degree of network congestion.
[0025] Through the test network to build a simulation environment, obtain the running data of the high-concurrency transaction scenario, and obtain the transaction delay and failure rate values. Extract abnormal data from the transaction delay and failure rate values, use K-means algorithm clustering analysis to determine the distribution range of performance bottlenecks. For the distribution range of performance bottlenecks, obtain the transaction delay trend of each node, and determine whether there is local congestion. If the transaction delay trend exceeds the preset threshold, extract the high-concurrency impact range through the node flow data to obtain the key area of network congestion. According to the key area of network congestion, use the random forest algorithm to predict the probability of failure rate rising, and determine the congestion degree classification. Obtain the congestion degree classification result, combine the simulation environment data of the transaction scenario, and determine the running state of the overall network. Through the overall network running state, extract the bottleneck optimization direction under the high-concurrency scenario, and obtain the adjusted transaction processing strategy.
[0026] Specifically, when simulating a high-concurrency transaction scenario in the test network, first generate 1000 transactions through a script, each transaction containing a randomly generated address and amount, and the transaction sending interval is set to 100 milliseconds to simulate a real high-concurrency environment. Use network monitoring tools to collect transaction delay data in real time, and the delay is defined as the time difference from transaction sending to confirmation. Through analysis, when the number of transactions reaches 500, the average delay rises from the initial 200 milliseconds to 800 milliseconds, indicating that the network has begun to congest. Further calculate the transaction failure rate, the failure rate is defined as the ratio of unconfirmed transactions to the total number of transactions, when the number of transactions reaches 800, the failure rate rises from 0.5% to 5%. By analyzing the relationship between transaction delay and failure rate, it is found that the delay and failure rate are positively correlated, and the failure rate increases by 0.6% for every 100 milliseconds increase in delay. Based on these data, it can be judged that the network performance bottleneck mainly appears in the transaction processing capacity, and it is recommended to optimize the transaction processing algorithm or increase the network bandwidth to alleviate congestion.
[0027] For example, using batch processing technology to package and process transactions can reduce the delay to 400 milliseconds and the failure rate to 2%. Through continuous monitoring and optimization, ensure the stability and performance of the network in high-concurrency scenarios.
[0028] S104, if the network congestion degree exceeds the preset threshold, the blockchain network is partitioned by the partitioning technology, and the transaction data is distributed to different subchains to obtain an optimized network architecture.
[0029] If the network congestion degree exceeds the preset threshold, the real-time transaction data is obtained through the monitoring system to determine the congestion degree. According to the judgment result, the partitioning technology is used to perform partitioning processing on the blockchain network to obtain a partitioned network structure. Through the partitioned network structure, the transaction data is distributed to different subchains to obtain the distributed data stream. The consistent hashing algorithm is used to balance the load of the distributed data stream to determine the subchain processing sequence. For the subchain processing sequence, the running state of each subchain is obtained to determine whether there is a delay anomaly. If the delay anomaly exists, the optimized subchain performance is obtained by dynamically adjusting the subchain resource allocation. According to the optimized subchain performance, the network partition configuration is updated to obtain an overall optimized network architecture.
[0030] Specifically, when the network congestion level exceeds the preset threshold, the system will monitor the network state in real time, for example, when the transaction processing delay exceeds 500 milliseconds or the transaction volume per second exceeds 1000, the sharding technology is triggered. First, the system uses a hash-based sharding algorithm to randomly distribute nodes in the blockchain network into different sub-chains, for example, using the SHA-256 algorithm to hash the node ID, and according to the first two bits of the hash value, the node is distributed into 4 sub-chains. Next, the system intelligently allocates transactions based on their characteristics, such as transactions involving the same account being allocated to the same sub-chain to ensure transaction consistency and order. During the allocation process, the system dynamically adjusts the load of the sub-chains, for example, when the transaction volume of a sub-chain reaches 80% of its capacity, some transactions are redistributed to other sub-chains to maintain load balance among sub-chains. In this way, the system can significantly reduce network congestion and improve transaction processing efficiency, for example, reducing transaction processing delay to less than 200 milliseconds and increasing transaction processing capacity per second to more than 5000. At the same time, the system continuously monitors the performance indicators of each sub-chain, such as transaction confirmation time and block generation speed, and further optimizes the sharding strategy based on the monitoring results, such as adjusting the number of sub-chains or redistributing nodes, to ensure efficient operation of the entire network.
[0031] S105, obtain the sub-chain transaction log from the optimized network architecture, generate dynamic logs in real time through transaction process monitoring, and extract risk features, combine the detection data uploaded by the traditional evaluation system, verify the consistency and integrity through digital signature, and determine the credibility of the on-chain data.
[0032] Obtain the sub-chain transaction log through the optimized network architecture to generate the initial record of the transaction process. Extract the transaction log from the initial record to generate dynamic logs through real-time monitoring technology. Feature analysis is performed on the dynamic logs to extract risk features and obtain risk distribution. Obtain the detection data uploaded by the traditional evaluation system, verify the consistency of the detection data and the risk distribution through digital signature, and determine the consistency result. Verify the integrity of the detection data and the dynamic logs through digital signature, and judge the integrity status. If both the consistency result and the integrity status pass, combine the detection data and the dynamic logs to generate on-chain data. Determine the credibility based on the on-chain data to obtain the final credibility conclusion.
[0033] Specifically, in the optimized network architecture, real-time sub-chain transaction logs are obtained by deploying smart contracts and distributed ledger technology.
[0034] For example, using Ethereum's smart contracts, each transaction generates a log entry containing transaction hash, timestamp, transaction amount, and other information, which is captured and stored in real-time through event listening mechanisms. To generate dynamic logs, the system uses stream processing technologies such as Apache Kafka to monitor and analyze transaction data in real-time.
[0035] For example, when a transaction with an amount exceeding 1000 ETH is detected, the system immediately generates a dynamic log recording the transaction's detailed information and extracts risk features such as transaction frequency anomalies and amount anomalies using machine learning algorithms. In combination with the detection data uploaded by the traditional evaluation system, the system uses the SHA-256 algorithm to digitally sign the data, ensuring its consistency and integrity.
[0036] For example, when the traditional evaluation system uploads a transaction's detection result as high-risk, the system generates a digital signature and compares it with the data in the subchain transaction log to ensure consistency. In this way, the system can determine the credibility of the on-chain data and automatically trigger appropriate risk control measures such as freezing accounts or notifying regulatory authorities. The entire process is achieved through automation technology without human intervention, ensuring the security and reliability of the data.
[0037] S106, for the credibility of the on-chain data, analyze the transaction delay trend and evaluate the impact of risk features on congestion through dynamic logs, update the hosting contract logic, add an automatic trigger mechanism, and unlock funds when the vehicle information verification is passed to generate an executable contract version.
[0038] Obtain transaction delay data through dynamic logs and use time series analysis to determine the delay trend. According to the delay trend, use machine learning clustering algorithms to determine the distribution of congestion risk features. Obtain risk feature parameters for congestion risk feature distribution and update hosting contract logic. From the updated hosting contract logic, add an automatic trigger mechanism and determine the trigger conditions. When uploading vehicle information, verify the integrity of the data through the information verification process to obtain the verification result. If the verification result is passed, activate the automatic trigger mechanism, unlock the funds, and generate an executable contract version. Verify the execution status of the executable contract version through on-chain data to determine whether the transaction is completed.
[0039] Specifically, in the blockchain system, to ensure the credibility of the on-chain data, first analyze the transaction delay trend through dynamic logs, use a sliding window algorithm to monitor transaction data in the past 24 hours in real-time, with a window size of 1 hour and a step size of 10 minutes, and calculate the average transaction delay in each window.
[0040] For example, when the average delay within a certain window exceeds 500 milliseconds, the system automatically triggers a risk warning mechanism. Then, the impact of risk features on network congestion is evaluated using a machine learning model trained based on historical data, with input features including transaction volume, node activity, network bandwidth, etc., and an output congestion risk score ranging from 0 to 1. When the score exceeds 0.8, the system determines a high-risk state. To address the high-risk state, the system automatically updates the hosting contract logic and adds an automatic trigger mechanism, such as automatically unlocking funds through a smart contract when vehicle information verification is successful, which includes vehicle VIN code, driving license information, etc. After verification, the funds are automatically transferred to the designated account within 5 seconds. Finally, the system generates an executable contract version with an automatically incremented version number and broadcasts it through the blockchain network to ensure all nodes are synchronized. The contract version includes detailed execution logic and trigger conditions, such as automatically pausing new transaction submissions when transaction delays exceed 1000 milliseconds until the network returns to normal. The entire process is achieved through automation to ensure system efficiency and security.
[0041] S107, according to the executable contract version, deploy to the main network node, extract user experience data and system stability indicators from real-time transaction feedback, and judge the architecture optimization effect.
[0042] Obtain the deployed contract version data through the main network node, extract the version identifier and deployment log, and determine the deployment process state. Obtain transaction feedback data from real-time transactions, separate user interaction records and system response time using a log analysis tool, and obtain a transaction feedback set. Extract user experience data from the transaction feedback set, use a pre-set threshold to judge user operation delay and success rate, and determine the experience evaluation result. Extract system stability indicators from the transaction feedback set, calculate transaction processing throughput and error rate, and judge the system running state. If the system running state is lower than the pre-set threshold, analyze the bottleneck position through the stability indicators, and obtain the architecture optimization direction. Adjust the contract version according to the architecture optimization direction, use simulated transactions to verify the optimized real-time transaction feedback, and determine the optimization effect. Extract the change trend from the optimization effect, compare historical data with current data, and judge the stability improvement amplitude of architecture adjustment.
[0043] Specifically, when deploying the executable contract version to the main network node, first compile the Solidity code into bytecode using the smart contract compiler, and deploy it to the Ethereum main network using the Web3.js library. During deployment, set the Gas Limit to 3000000 and the Gas Price to 20 Gwei to ensure smooth transaction execution. After deployment, monitor the transaction status in real time through the RPC interface of the Ethereum node, and extract transaction hash, block height, Gas consumption, etc.
[0044] For example, a transaction has a Gas consumption of 21000, a block height of 15000000, and a transaction confirmation time of 15 seconds. Next, by analyzing user interaction logs, user experience data such as transaction response time and failure rate are extracted. Assume that in 1000 transactions, the average response time is 2 seconds and the failure rate is 0.5%. At the same time, by monitoring system logs, system stability indicators such as node CPU usage and memory usage are extracted.
[0045] For example, the node CPU usage is 70% and the memory usage is 60%. Based on these data, a linear relationship model between response time and Gas consumption is established using regression analysis algorithm, and it is concluded that for every 1000 increase in Gas consumption, the response time increases by 0.1 seconds. By comparing the data before and after optimization, the effect of architecture optimization is judged.
[0046] For example, after optimization, Gas consumption is reduced by 10%, response time is reduced by 0.2 seconds, and system stability is improved by 5%.
[0047] If the effect of architecture optimization is not as expected, the transaction processing capacity is expanded through side chain technology, high-frequency transactions are unloaded to independent chain and synchronized with the main chain regularly, and the final transaction system is obtained.
[0048] High-frequency transactions are separated through side chain technology, transaction data is obtained from the main chain and unloaded to the independent chain for processing, and the preliminary transaction allocation result is obtained. For the preliminary transaction allocation result, independent chain parallel computing transaction request is adopted, and transaction frequency is judged through preset threshold to obtain isolated data of high-frequency transactions. According to the isolated data of high-frequency transactions, the main chain state is detected by time through synchronization mechanism, and if the main chain load is lower than the preset value, the isolated data is synchronized to the main chain in batches to obtain the synchronized transaction record. The synchronized transaction record is obtained, and the consistency of the data is verified through inter-chain interaction protocol to judge whether there is conflict transaction, and the verified transaction set is obtained. For the verified transaction set, consistent hash algorithm is used to allocate transactions to corresponding nodes, and transaction execution state is confirmed through inter-node communication to obtain distributed transaction result. From the distributed transaction result, incomplete transactions are extracted, and if the number of incomplete transactions exceeds the preset threshold, the resource allocation of side chain is adjusted to obtain the optimized transaction processing flow. According to the optimized transaction processing flow, the state of chain transaction is recorded by using log, and the final transaction system data is generated by time stamp sorting.
[0049] Specifically, when the architecture optimization effect does not meet the expectation, the transaction processing capacity can be expanded through side chain technology, for example, a side chain design based on PBFT consensus is adopted, and the main chain transaction throughput is increased from the original 1000TPS to 5000TPS. In a specific implementation, first, the high-frequency transaction characteristics (such as more than 50 transactions initiated per second by a single account) are identified by a transaction frequency analysis module, and the smart contract is used to automatically filter and route to the side chain. The side chain uses sharding technology, each group of shards contains 100 nodes, and the consensus delay is reduced from 2 seconds to 0.5 seconds through an improved BLS signature algorithm. The synchronization mechanism adopts a two-stage commit protocol, and the main chain performs snapshot synchronization every 300 blocks (about 10 minutes), verifies the batch transaction hash through a Merkle tree, and controls the synchronization delay within 15 seconds. The performance monitoring module collects side chain indicators (such as block propagation delay and transaction confirmation rate) in real time, and when the side chain node failure rate exceeds 5%, it triggers dynamic load balancing to redistribute transactions to other shards. Data consistency is achieved through cross-chain verification by zero-knowledge proof, each transaction generates an 80-byte zk-SNARK proof, and the verification time on the main chain is only 20 milliseconds. Finally, the system shows through stress testing that in a 100,000 concurrent transaction scenario, the failure rate is reduced from the original 12% to 0.3%, and the gas consumption is reduced by 40%.
[0050] S109, obtain the full-process log from the final transaction system, analyze the data tampering, transparency and efficiency indicators, and determine the transaction reliability improvement range.
[0051] The full-process log is extracted from the final transaction system, the log content is processed by a preset analysis tool, and a structured data set is obtained. For the structured data set, a feature extraction method is used to analyze the data tampering, and the tampering degree is determined. Through the tampering degree, the tampering-related transparency indicators are obtained, and the transparency evaluation value is determined. According to the structured data set, the transaction processing time distribution is calculated, and the efficiency indicators are obtained. If the efficiency indicators are lower than the preset threshold, the efficiency calculation is adjusted through time series analysis, and the optimized efficiency value is determined. Using a random forest algorithm, the tampering degree, the transparency evaluation value and the optimized efficiency value are fused to determine the transaction reliability improvement range. Through the reliability improvement range, the log analysis strategy extracted by the system is updated, and the adjusted full-process log processing flow is obtained.
[0052] Specifically, key fields such as transaction timestamp, operation type, user ID, data hash value, etc. are extracted from the transaction system full-process log, the log entry hash value is calculated by SHA-256 algorithm and compared with the blockchain storage, if 3 out of 100,000 logs have different hash values, the tampering rate is 0.003%. The Merkle tree structure is used for hierarchical verification of the log, when the tree height is 5, the abnormal node can be located within O(log n) time complexity. In the transparency evaluation, Elasticsearch is used to establish a log index cluster, achieving 98.7% query response time below 50 ms, and Kibana visualization is used to display the time consumption distribution of each stage of the transaction, and it is found that the average delay of the payment link is 120 ms, accounting for 42% of the whole process. The efficiency analysis uses the time series prediction model ARIMA(1,1,1), based on historical logs to predict future throughput, when the system load reaches 800TPS, the processing delay rises curve slope increases by 1.8 times. By introducing zero-knowledge proof technology, the transaction verification time is reduced from 15 ms to 4 ms while maintaining a 99.99% verification success rate, combined with the above indicators to build a reliability score model: reliability improvement ΔR = 0.7 × ΔT(transparency) + 0.2 × ΔI(integrity) + 0.1 × ΔE(efficiency), when ΔT improves by 30%, ΔI improves by 15%, ΔE improves by 5%, ΔR reaches a total improvement of 24.5%. During the log analysis process, the stream processing framework Flink is used to realize real-time index calculation, when the window size is 5 minutes, the key index statistical delay is controlled within 3 seconds, and the isolated forest algorithm is used for anomaly detection, when the feature dimension is 8, the F1 value of 95% is achieved.
[0053] The specific embodiments of the application are described above. It needs to be understood that the application is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essential content of the application. The embodiments of the present application and the features in the embodiments can be arbitrarily combined with each other without conflict.
Claims
1.A method for managing a used car online transaction based on a blockchain technology, characterized in that, The method comprises: Obtain vehicle information, fund flow record and evaluation report from used car transaction history data, generate unique identifier through hash function and store to blockchain node to obtain distributed ledger record; For the distributed ledger record, generate hosting contract logic using a preset smart contract template, including fund locking, vehicle state verification and transaction confirmation conditions, determine the initial version of the contract; According to the initial version of the contract, simulate high concurrency transaction scenarios in the test network, extract performance bottlenecks from transaction delay and failure rate data, and judge the degree of network congestion; If the degree of network congestion exceeds the preset threshold, partition the blockchain network through sharding technology, distribute transaction data to different subchains, and obtain the optimized network architecture; Obtain subchain transaction logs from the optimized network architecture, generate dynamic logs in real time through transaction process monitoring, extract risk features, combine detection data uploaded by traditional evaluation system, verify the consistency and integrity through digital signature, and determine the credibility of the on-chain data; For the credibility of the on-chain data, analyze the transaction delay trend and evaluate the impact of risk features on congestion through dynamic log analysis, update the hosting contract logic, add an automatic trigger mechanism to unlock the funds when the vehicle information verification is passed, and generate an executable contract version; According to the executable contract version, deploy to the main network node, extract user experience data and system stability indicators from real-time transaction feedback, and judge the optimization effect of the architecture; If the architecture optimization effect is not as expected, extend the transaction processing capacity through sidechain technology, offload high-frequency transactions to independent chains and synchronize with the main chain regularly to obtain the final transaction system; Obtain the whole process log from the final transaction system, analyze the data tampering, transparency and efficiency indicators, and determine the reliability improvement range of the transaction. 2.The blockchain-based online management method for used car transaction according to claim 1, wherein, The method comprises: Obtain vehicle information, fund flow record and evaluation report from used car transaction history data, generate unique identifier through hash function and store to blockchain node to obtain distributed ledger record; Obtain vehicle information, fund flow and evaluation report from transaction history, separate independent data units through structured processing to obtain preliminary data set; Encrypt the preliminary data set through a hash function to generate a unique identifier; Bind the unique identifier and the preliminary data set, store to the blockchain node to obtain node storage record; If the node storage record consistency check is passed, update the blockchain node through distributed consistency algorithm to obtain the distributed ledger record; According to the distributed ledger record, use the query tool to extract the corresponding relationship between the vehicle information and the fund flow, determine the transaction traceability path; For the traceability path, detect fund flow anomalies through time series analysis, and judge abnormal transaction records; 3.The blockchain-based online management method for used car transaction according to claim 1, wherein, Obtain abnormal transaction records, combine evaluation reports, and generate transaction integrity verification results through logical comparison. The method comprises: Obtain transaction request data through the distributed ledger, use the ledger record management mechanism to obtain structured record results; For the structured record result, a preset rule design is adopted to extract logical parameters from the smart contract template and determine the hosting contract logic framework; If the hosting contract logic framework is generated, the vehicle state data is analyzed through the state verification process to determine whether the vehicle state meets the preset conditions; According to the vehicle state judgment result, the transaction request is processed by using the fund locking condition to determine the fund locking state; If the fund locking state is confirmed, the transaction confirmation clause is matched through the transaction execution logic to obtain the transaction verification result; According to the transaction verification result, the initial contract version is updated by using the contract generation method to determine the final contract content; The final contract content is recorded to the distributed ledger through the ledger record management to obtain the complete transaction record. 4.The blockchain-based online management method for used car transaction according to claim 1, wherein, According to the contract initial version, the high-concurrency transaction scenario is simulated in the test network, the performance bottleneck is extracted from the transaction delay and failure rate data, and the network congestion degree is determined, including: Analog environment is constructed through the test network to obtain the running data of the high-concurrency transaction scenario, and the transaction delay and failure rate values are obtained; Abnormal data is extracted from the transaction delay and failure rate values, and the distribution range of the performance bottleneck is determined by using K-means algorithm clustering analysis; According to the distribution range of the performance bottleneck, the transaction delay trend of each node is obtained to determine whether there is local congestion; If the transaction delay trend exceeds the preset threshold, the high-concurrency influence range is extracted from the node flow data to obtain the key area of network congestion; According to the key area of network congestion, the probability of failure rate rising is predicted by using the random forest algorithm to determine the congestion degree classification; The congestion degree classification result is obtained, and the running state of the overall network is determined in combination with the simulation environment data of the transaction scenario; Through the overall network running state, the bottleneck optimization direction under the high-concurrency scenario is extracted to obtain the adjusted transaction processing strategy. 5.The blockchain-based online management method for used car transaction according to claim 1, wherein, If the network congestion degree exceeds the preset threshold, the blockchain network is partitioned by using the sharding technology, the transaction data is distributed to different subchains, and the optimized network architecture is obtained, including: If the network congestion degree exceeds the preset threshold, real-time transaction data is obtained by the monitoring system to determine the congestion degree; According to the judgment result, the partitioning processing is performed on the blockchain network by using the sharding technology to obtain the partitioned network structure; Through the partitioned network structure, the transaction data is distributed to different subchains to obtain the distributed data flow; The distributed data flow is balanced by using the consistent hashing algorithm to determine the subchain processing sequence; According to the subchain processing sequence, the running state of each subchain is obtained to determine whether there is delay anomaly; If the delay anomaly exists, the optimized subchain performance is obtained by dynamically adjusting the subchain resource allocation; According to the optimized subchain performance, the network partition configuration is updated to obtain the overall optimized network architecture. 6.The blockchain-based online management method for used car transaction according to claim 1, wherein, The subchain transaction log is obtained from the optimized network architecture, the dynamic log is generated by real-time monitoring the transaction process, the risk features are extracted, the detection data uploaded by the traditional evaluation system is combined, the consistency and integrity of the data are verified by digital signature, the credibility of the on-chain data is determined, including: An initial record of a transaction process is generated by obtaining a sub-chain transaction log through an optimized network architecture; A dynamic log is generated by extracting the transaction log from the initial record through real-time monitoring technology; Risk features are extracted from the dynamic log through feature analysis, and a risk distribution is obtained; Consistency between detection data uploaded by a traditional evaluation system and the risk distribution is determined by verifying the detection data through digital signature; Integrity of the detection data and the dynamic log is verified through digital signature, and an integrity state is determined; If both the consistency result and the integrity state pass, the detection data and the dynamic log are combined to generate on-chain data; A final credibility conclusion is obtained by judging the credibility of the on-chain data, including: 7.The blockchain-based online management method for used car transaction according to claim 1, wherein, The credibility of the on-chain data is determined by analyzing the transaction delay trend through the dynamic log and evaluating the impact of risk features on congestion, updating the escrow contract logic, and adding an automatic triggering mechanism to unlock funds when the vehicle information verification passes, generating an executable contract version, including: Transaction delay data is obtained through the dynamic log, and a delay change trend is determined using time series analysis; According to the delay change trend, a machine learning clustering algorithm is used to determine the congestion risk feature distribution; Risk feature parameters are obtained for the congestion risk feature distribution, and the escrow contract logic is updated; An automatic triggering mechanism is added to the updated escrow contract logic to determine the triggering conditions; When the vehicle information is uploaded, the integrity of the data is verified through the information verification process to obtain a verification result; If the verification result passes, the automatic triggering mechanism is activated to unlock the funds and generate an executable contract version; The execution state of the executable contract version is verified through on-chain data to determine whether the transaction is completed. 8.The blockchain-based online management method for used car transaction according to claim 1, wherein, According to the executable contract version, the contract version data is deployed to the main network node, user experience data and system stability indicators are extracted from real-time transaction feedback, and the effect of architecture optimization is determined, including: The deployed contract version data is obtained through the main network node, the version identifier and deployment log are extracted, and the deployment process state is determined; Transaction feedback data is obtained from real-time transactions, and log analysis tools are used to separate user interaction records and system response times to obtain a transaction feedback set; User experience data is extracted from the transaction feedback set, and a preset threshold is used to determine user operation delay and success rate to determine the experience evaluation result; System stability indicators are extracted from the transaction feedback set, and transaction processing throughput and error rate are calculated to determine the system running state; If the system running state is below the preset threshold, the stability improvement amplitude of the architecture adjustment is determined by analyzing the bottleneck position through the stability indicator; The contract version is adjusted according to the architecture optimization direction, and the optimized real-time transaction feedback is verified through simulation trading to determine the optimization effect; The change trend is extracted from the optimization effect, and the stability improvement amplitude of the architecture adjustment is determined by comparing historical data with current data. 9.The blockchain-based online management method for used car transaction according to claim 1, wherein, If the architecture optimization effect does not meet the expectation, the transaction processing capacity is expanded through side chain technology, high-frequency transactions are unloaded to an independent chain and synchronized with the main chain periodically to obtain a final transaction system, including: High-frequency transactions are separated through side chain technology, transaction data is obtained from the main chain and unloaded to an independent chain for processing to obtain a preliminary transaction allocation result; For the preliminary transaction allocation result, independent chain parallel computing transaction request is adopted, the transaction frequency is judged through the preset threshold value, and the isolated data of high-frequency transaction is obtained; According to the isolated data of high-frequency transaction, the main chain state is detected by using the synchronization mechanism, if the load of the main chain is lower than the preset value, the isolated data is synchronized to the main chain in batches, and the synchronized transaction record is obtained; The synchronized transaction record is obtained, the data consistency is verified through the inter-chain interaction protocol, whether there is conflict transaction is judged, and the verified transaction set is obtained; For the verified transaction set, a consistent hash algorithm is used to allocate transactions to corresponding nodes, and the transaction execution state is confirmed through inter-node communication to obtain a distributed transaction result; From the distributed transaction result, the uncompleted transaction is extracted, if the number of uncompleted transactions exceeds the preset threshold value, the resource allocation of the side chain is adjusted, and the optimized transaction processing flow is obtained; According to the optimized transaction processing flow, the transaction state on the log record chain is used to generate the final transaction system data through timestamp sorting. 10.The blockchain-based online management method for used car transaction according to claim 1, wherein, The full-process log is obtained from the final transaction system, the data tampering, transparency and efficiency indicators are analyzed, the reliability improvement range of transaction is determined, including: The full-process log is extracted from the final transaction system, the log content is processed through the preset analysis tool, and the structured data set is obtained; For the structured data set, the data tampering is analyzed by using the feature extraction method, and the tampering degree is judged; Through the tampering degree, the transparency index related to the tampering degree is obtained, and the transparency evaluation value is determined; According to the structured data set, the transaction processing time distribution is calculated, and the efficiency index is obtained; If the efficiency index is lower than the preset threshold value, the efficiency calculation is adjusted through time series analysis, and the optimized efficiency value is determined; The random forest algorithm is used to fuse the tampering degree, the transparency evaluation value and the optimized efficiency value, and the reliability improvement range of transaction is judged; Through the reliability improvement range, the log analysis strategy extracted by the system is updated, and the adjusted full-process log processing flow is obtained.