Block chain-based cross-border payment routing optimization method and device
By combining quantum heuristic algorithms with real-time node status monitoring, the problems of local optima and dynamic adaptability in blockchain cross-border payment routing optimization are solved, achieving efficient and secure cross-border payment path optimization and improving the adaptability and robustness of the payment system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU YIZHI MICRO TECH CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-15
AI Technical Summary
Existing blockchain-based cross-border payment routing optimization methods are prone to problems such as getting stuck in local optima, poor dynamic adaptability, low optimization efficiency, and incomplete consideration of security and risks.
A quantum heuristic algorithm is adopted, which combines real-time node state monitoring, multi-index decision-making method and dynamic triggering mechanism. By using the superposition state representation of qubits and iterative adjustment, the solution for cross-border payment routing path is optimized and updated in real time to adapt to network changes.
It enables the dynamic determination of the globally optimal payment path within seconds or even milliseconds, improving payment efficiency, reducing transaction costs, ensuring the continuity and high reliability of the payment process, and enhancing the adaptability and robustness of the cross-border payment system.
Smart Images

Figure CN122053465A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and in particular to a blockchain-based method and apparatus for optimizing cross-border payment routing. Background Technology
[0002] Blockchain-based cross-border payment routing refers to the process of dynamically selecting the optimal or near-optimal transmission path to complete a cross-border fund transfer within a complex payment network composed of multiple heterogeneous payment nodes and blockchain networks (including public and consortium blockchains). This process requires comprehensive consideration of multiple constraints, such as payment fees, transaction confirmation time, node credibility, network congestion, and compliance risk levels, to achieve the goals of low-cost, high-efficiency, and high-security payments.
[0003] The development of cross-border payment routing technology has mainly gone through three stages: early static fixed routing, dynamic routing based on traditional heuristic algorithms (such as greedy algorithms and genetic algorithms), and the currently developing blockchain-to-chain dynamic routing. Despite the continuous evolution of technology, the core optimization logic of most existing solutions is still based on the framework of traditional heuristic algorithms. The integration and application of cutting-edge optimization ideas such as quantum computing are still in the exploratory stage, and mature and efficient solutions have not yet been formed.
[0004] Existing route optimization methods, based on their core algorithmic strategies, can be broadly categorized into two main technical approaches: The first is a locally optimal selection scheme based on greedy algorithms, which constructs a path by iteratively selecting the neighboring nodes with the lowest transaction fees or the closest physical distance in the current state. This method is computationally simple, but it only focuses on local optima and struggles to balance multiple constraints globally. The second is a global search scheme based on traditional intelligent optimization algorithms such as genetic algorithms and particle swarm optimization, which attempts to find a better path that satisfies multiple objective constraints through population evolution or group cooperation. However, this type of scheme still has significant shortcomings in practice, specifically in the following four aspects:
[0005] First, the ability to obtain the global optimum under multiple constraints is weak. Traditional algorithms have inherent limitations. For example, greedy algorithms are essentially short-sighted local searches; the global search capabilities of genetic algorithms and particle swarm optimization algorithms heavily rely on parameter tuning and the quality of the initial solution. When dealing with multi-dimensional, non-linear, and potentially conflicting constraints such as transaction fees, time, and security, they struggle to balance their complex relationships and are prone to getting trapped in local optima. As a result, the final routing path cannot simultaneously meet the core requirements of cross-border payments for "low cost, high efficiency, and high security."
[0006] Second, they have poor adaptability to dynamic environments. Existing solutions mostly rely on static or periodically updated network parameter models for routing calculations, lacking real-time perception and dynamic adjustment mechanisms. Their parameter update cycles are usually long (e.g., more than 10 minutes), making it impossible to respond in real time to instantaneous fluctuations in node status (such as node offline, load changes), network congestion, and transaction fee rates in the blockchain network. This results in high failure rates or significant performance degradation of the calculated routing paths during actual execution.
[0007] Third, the computational efficiency is low. The encoding method and iteration rules of traditional heuristic algorithms cause their computational complexity to increase sharply as the scale of payment network nodes increases. When the number of network nodes exceeds 50, the routing solution usually takes more than 3 seconds, which cannot meet the stringent real-time requirements of cross-border payment scenarios and restricts the application of this technology in large-scale, highly complex networks.
[0008] Fourth, security and risk considerations are incomplete. Existing solutions primarily focus on explicit indicators such as cost (transaction fees) and efficiency (confirmation time), lacking effective quantitative modeling methods for key security indicators such as node trustworthiness and cross-border compliance risk levels, and failing to systematically integrate them into the objective function of route optimization. This results in potential security vulnerabilities in route selection and insufficient synergistic optimization between risk, cost, and efficiency. Summary of the Invention
[0009] The purpose of this invention is to provide a blockchain-based method and apparatus for optimizing cross-border payment routes, in order to solve the problems of existing blockchain-based cross-border payment route optimization methods, such as being prone to getting trapped in local optima, poor dynamic adaptability, low optimization efficiency, and incomplete consideration of security and risk.
[0010] To achieve the above objectives, this application adopts the following technical solution:
[0011] Firstly, this application provides a blockchain-based method for optimizing cross-border payment routing, comprising the following steps:
[0012] Obtain real-time status data for each node in the cross-border payment blockchain network, wherein the real-time status data includes multi-dimensional indicators for evaluating the performance of routing paths;
[0013] Based on the real-time status data, the weights of each indicator are determined through a multi-indicator decision-making method, and based on the weights, the comprehensive fitness of each node is calculated and a fitness function for quantitatively evaluating the comprehensive performance of candidate routing paths is constructed.
[0014] A quantum heuristic algorithm is used to optimize the routing selection. The selection decision and the overall fitness of each node in the network are mapped to the superposition state representation of qubits. The global optimal routing path that maximizes the fitness function value is searched by iteratively adjusting the probability amplitude of the qubits.
[0015] The globally optimal routing path is output and executed. When the real-time status data of the node is detected to meet the dynamic triggering condition, the optimization solution is re-executed to update the globally optimal routing path.
[0016] Secondly, this application provides a blockchain-based cross-border payment routing optimization device, comprising:
[0017] The data acquisition module is used to acquire real-time status data of each node in the cross-border payment blockchain network. The real-time status data includes multi-dimensional indicators for evaluating the performance of the routing path.
[0018] The function construction module is used to determine the weight of each indicator based on the real-time status data through a multi-indicator decision-making method, and to calculate the comprehensive fitness of each node based on the weights and to construct a fitness function for quantitatively evaluating the comprehensive performance of candidate routing paths.
[0019] The path finding module is used to optimize the route selection using a quantum heuristic algorithm. The selection decision and the overall fitness of each node in the network are mapped to the superposition state representation of qubits, and the global optimal route path that maximizes the fitness function value is searched by iteratively adjusting the probability amplitude of the qubits.
[0020] The dynamic update module is used to output and execute the globally optimal routing path, and when the real-time status data of the node is detected to meet the dynamic triggering conditions, the optimization solution is re-executed to update the globally optimal routing path.
[0021] Thirdly, this application provides an electronic device including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a blockchain-based cross-border payment routing optimization method as described in any one of the above.
[0022] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a computer, implements a blockchain-based cross-border payment routing optimization method as described in any one of the above-mentioned methods.
[0023] This application has the following beneficial effects:
[0024] The cross-border payment routing optimization scheme provided in this application effectively solves the problems of routing decision lag and performance degradation caused by high-frequency fluctuations in indicators such as node transaction fees and network congestion in cross-border payments. This is achieved by combining quantum heuristic algorithms with real-time node status monitoring, objective data-based indicator weight calculation, dynamic triggering mechanisms, and intelligent cache invocation. The scheme dynamically determines the weights of each constraint indicator using objective methods such as the analytic hierarchy process (AHP), making routing decisions more closely aligned with actual data distribution and reducing subjective bias. Furthermore, it can dynamically determine and switch to the globally optimal payment path within seconds or even milliseconds, significantly improving payment efficiency, reducing transaction costs, and ensuring the continuity and high reliability of the payment process. This, in turn, enhances the overall adaptability, objectivity, robustness, and service competitiveness of the cross-border payment system. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a first flowchart of a blockchain-based cross-border payment routing optimization method provided in Embodiment 1 of this application;
[0027] Figure 2 This is a system flowchart of a blockchain-based cross-border payment routing optimization method provided in Embodiment 1 of this application;
[0028] Figure 3 This is a flowchart of the weight determination method provided in Embodiment 1 of this application;
[0029] Figure 4 This is a flowchart of the consistency verification method for the judgment matrix provided in Embodiment 1 of this application;
[0030] Figure 5 This is a flowchart of the quantum bit superposition state representation method provided in Embodiment 1 of this application;
[0031] Figure 6 This is a flowchart of the path optimization solution method provided in Embodiment 1 of this application;
[0032] Figure 7 This is a flowchart of the routing caching and invocation mechanism provided in Embodiment 1 of this application;
[0033] Figure 8 This is a schematic diagram of the structure of a blockchain-based cross-border payment routing optimization device provided in Embodiment 2 of this application;
[0034] Figure 9 This is a schematic diagram of an electronic device that implements a blockchain-based cross-border payment routing optimization method, as provided in Embodiment 3 of this application. Detailed Implementation
[0035] To make the technical solution of this application clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The terms "first," "second," etc., in the claims and specification of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate. This is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0036] Definitions:
[0037] Routing path performance: refers to the performance attributes of any possible path, determined by the state of network nodes;
[0038] Candidate routing paths: refers to the set of potential paths to be evaluated, generated or selected by the algorithm during a payment routing optimization process;
[0039] Global optimal routing path: refers to the path with the best overall performance determined from the set of candidate routing paths through an optimization algorithm.
[0040] Example 1
[0041] like Figure 1 and Figure 2 As shown, this embodiment provides a blockchain-based cross-border payment routing optimization method, which specifically includes steps S110-S140.
[0042] S110. Obtain real-time status data for each node in the cross-border payment blockchain network. The real-time status data includes multi-dimensional indicators used to evaluate the performance of routing paths.
[0043] In one specific embodiment, the multi-dimensional indicators include: payment fees, transaction confirmation time, node credibility, network congestion, and cross-border compliance risks.
[0044] Lightweight data collection probes are deployed on various nodes of the cross-border payment blockchain network (such as bank nodes, blockchain verification nodes, and cross-border clearing nodes). These probes are used to acquire multi-dimensional status indicators of the nodes in real time, and their specific design is as follows:
[0045] 1. Multi-dimensional data collection function: The probe captures and reports various indicators in real time to evaluate the performance of the routing path, including but not limited to payment fees, transaction confirmation time, node credibility (assessed by a comprehensive evaluation of historical transaction success rate, reputation evaluation and other information), network congestion (such as the length of the pending transaction queue and bandwidth utilization), cross-border compliance risk (dynamically judged based on the compliance policies of the jurisdiction to which the node belongs), and node online status (achieved through periodic heartbeat detection).
[0046] 2. Low-intrusive deployment method: The probe collects data by bypassing the monitoring or by connecting to the node system via API, without interfering with the original transaction processing flow of the node, ensuring the continuity and stability of the node's business operation.
[0047] 3. High Availability Design: This probe supports distributed deployment and features an automatic fault recovery mechanism. In the event of network interruptions or other anomalies, collected data can be temporarily cached and re-uploaded after network connectivity is restored, ensuring that a single point of failure does not affect the data integrity of the overall monitoring system.
[0048] 4. Real-time Data Transmission and Processing: The probe uses lightweight communication protocols (such as MQTT or WebSocket) to establish a long-lived connection with the monitoring platform, achieving low-latency data push (transmission latency controlled within 50ms). The monitoring platform builds a streaming computing platform (such as Flink) to clean and aggregate the real-time reported data (e.g., calculating the average payment fee per second, peak network congestion, etc.), and stores the processed data in a time-series database (such as InfluxDB) to support millisecond-level query responses.
[0049] Through the aforementioned probe acquisition and processing mechanism, real-time status data of each node in the cross-border payment blockchain network can be continuously obtained, providing an accurate data foundation for subsequent routing selection and updates.
[0050] After acquiring the real-time status data of each node, it is necessary to standardize and quantify these multi-dimensional and heterogeneous raw data to generate unified and comparable evaluation indicators.
[0051] In one specific embodiment, the quantitative calculation of multi-dimensional indicators includes:
[0052] (a) Quantification of payment fees: The fees of each node in the routing path are uniformly converted into the base currency and summed, and then normalized based on the preset fee range.
[0053] The quantification of payment fees aims to uniformly convert and normalize the fees of each node in the routing path in order to assess the cost level of the routing path. For a routing path containing n nodes, the calculation process is as follows:
[0054] First, obtain the payment fee F_i from the i-th node, which typically includes the blockchain's basic gas fee and cross-border node service fees. Then, convert it into a base currency (such as USD) using the real-time exchange rate R_i to obtain... Then calculate the total transaction fee for the route. Finally, based on the preset fee range [F_min, F_max], normalization is performed to obtain the normalized fee index F_norm, which is calculated as F_norm = 1 - (F_total) / (F_min, F_max). F_min) / (F_max F_min). This normalized value reflects the relative cost level of transaction fees; a higher value indicates a lower relative cost.
[0055] For example, for a route "China (Node A) → Singapore (Node B) → USA (Node C)," the transaction fee for Node A (RMB zone) is 70 CNY, with an exchange rate of 0.14 USD / CNY, equivalent to 9.8 USD; the transaction fee for Node B (SGD zone) is 40 SGD, with an exchange rate of 0.73 USD / SGD, equivalent to 29.2 USD; and the transaction fee for Node C (USD zone) is 20 USD. Therefore, the total transaction fee for the route is F_total = 9.8 + 29.2 + 20 = 59 USD. If the preset range is [0.1, 100] USD, then the normalized result F_norm = 1. (59 0.1) / (100 0.1) = 0.41.
[0056] (b) Quantification of transaction confirmation time: Obtain the confirmation time and data transmission ratio of each node in the routing path, calculate the weighted average with the ratio as the weight, and perform normalization processing;
[0057] The quantification of transaction confirmation time aims to comprehensively reflect the overall processing speed of the routing path. The calculation process is as follows:
[0058] First, the transaction confirmation time T_i of the i-th node in the routing path is determined based on historical data such as the average block time of the blockchain network to which the node belongs (e.g., approximately 10 minutes / block for Bitcoin nodes, approximately 12 seconds / block for Ethereum nodes, and approximately 1-3 seconds / block for consortium blockchains). Next, the weight W_i of the node's data transmission volume relative to the total path transmission volume is determined (ΣW_i=1). Then, the weighted average confirmation time T_avg of the path is calculated as Σ(T_i×W_i) (i=1 to n). Finally, normalization is performed based on a preset confirmation time interval [T_min, T_max] to obtain the normalized confirmation time index T_norm, calculated as: T_norm=1-(T_avg-T_min) / (T_max) The higher the value (T_min), the faster the route confirmation speed.
[0059] For example, for the aforementioned path, let T_A = 2 seconds for node A (consortium blockchain), T_B = 12 seconds for node B (Ethereum), and T_C = 600 seconds for node C (Bitcoin); their transmission weights are W_A = 0.3, W_B = 0.4, and W_C = 0.3, respectively. Then the weighted average confirmation time T_avg = 2 × 0.3 + 12 × 0.4 + 600 × 0.3 = 0.6 + 4.8 + 180 = 185.4 seconds. If the preset interval is [1, 3600] seconds, then the normalized result T_norm = 1. (185.4 1) / (3600 1) = 0.95.
[0060] (c) Quantification of node credibility: It is calculated by weighting and integrating the node's historical transaction success rate and the completeness of compliance filing, and introducing the penalty coefficient for abnormal behavior;
[0061] Specifically, the historical transaction success rate R_success is calculated based on the number of successful transactions S of a node within a statistical period (e.g., the past 180 days) and the total number of transactions N, i.e., R_success = S / N. For newly connected nodes that have not yet generated transactions, an initial success rate value (e.g., 0.5) can be set, which will be updated in real time as transaction data accumulates.
[0062] The compliance filing completeness C_compliance is calculated based on the number of compliant filing items completed by the node m (0≤m≤M) and the total number of required filing items M (including KYC certification, anti-money laundering filing, cross-border payment business license, data cross-border transmission compliance certificate, etc.), that is, C_compliance=m / M.
[0063] The basic credibility C_credit is obtained by weighted summation of the above two factors. Its weighting (e.g., 70% for historical transaction success rate and 30% for compliance filing completeness) is determined based on a comprehensive analysis of industry data statistics, risk quantification assessment, and business adaptability requirements, aiming to more accurately balance transaction security and regulatory compliance requirements. The calculation formula is: C_credit = e × R_success + f × C_compliance, where e and f are preset weights (e = 0.7, f = 0.3, and e + f = 1).
[0064] This embodiment also introduces an abnormal behavior penalty mechanism: if a node exhibits abnormal behavior such as fraudulent transactions, malicious offline activity, or data tampering, the penalty mechanism is triggered, and this is represented by an abnormal behavior penalty coefficient P. The coefficient P is set based on whether the node exhibits abnormal behavior such as fraud or malicious offline activity and its severity (e.g., no abnormality P=1; fraud exists P=0.5; malicious offline only P=0.8), used to reduce the score of untrustworthy nodes. That is, the final node trust score C_score = P × (e × R_success + f × R_compliance).
[0065] For example, if a node has a history of 1000 transactions, with 980 successful, then R_success=0.98; there are 5 compliance requirements (KYC, anti-money laundering, license, audit, and tax), and 4 of them are completed, then R_compliance=0.8; and there has been no abnormal behavior in the last 30 days (P=1), then its credibility score C_score=1×(0.7×0.98+0.3×0.8)=0.686+0.24=0.926.
[0066] Using the weighting and quantification logic analyzed above, the accuracy of node credibility assessment results can reach 89.7%. Compared with the traditional scheme that uses equal weighting (such as 50% for historical transaction success rate and 50% for compliance filing completeness), this embodiment improves the efficiency of fund security event identification by about 37% and reduces regulatory compliance risks by about 42%, thereby better meeting the core requirements of "security first, while taking efficiency into account" in cross-border payment business.
[0067] (d) Quantification of network congestion: It is obtained by weighting the backlog of pending transactions and bandwidth utilization of nodes;
[0068] Network congestion is quantified by the backlog of pending transactions and bandwidth utilization to characterize the real-time load status of nodes, specifically:
[0069] The backlog rate C_queue is calculated based on the current queue length Q (transactions), the node’s maximum processing capacity T_max (transactions / second), and the preset backlog tolerance time T_tol (e.g., 300 seconds), i.e., C_queue=Q / (T_max×T_tol).
[0070] The bandwidth utilization rate C_bandwidth is calculated based on the node's current bandwidth usage B_used and the total bandwidth B_total, i.e., C_bandwidth = B_used / B_total.
[0071] The network congestion level C_congestion is obtained by weighted summation of the two values, i.e., C_congestion = a × C_queue + b × C_bandwidth, where a and b are preset weights (e.g., a = 0.6, b = 0.4). The higher the value, the more congested the nodes are.
[0072] For example, if a node has T_max = 100 transactions / second and the current queue Q = 15000 transactions, then C_queue = 15000 / (100 × 300) = 0.5; its B_total = 1000Mbps and B_used = 800Mbps, then C_bandwidth = 0.8; and the final network congestion C_congestion = 0.6 × 0.5 + 0.4 × 0.8 = 0.3 + 0.32 = 0.62
[0073] (e) Quantification of cross-border compliance risks: The risk is calculated by weighting the degree of matching between the regulatory policies of the countries or regions where the two parties to the payment are located and the degree of matching between the sanctions list.
[0074] Specifically, the calculation is based on the regulatory ratings of the countries or regions where the payer and payee are located (denoted as R_X and R_Y, respectively). For example, based on the Financial Action Task Force (FATF) ratings (1 = compliant, 2 = enhanced monitoring, 3 = high risk), the regulatory compliance R_regulation = (R_X + R_Y) / 6.
[0075] If either party's country or region appears on the other party's financial sanctions list (such as the OFAC list), a higher risk value is assigned, such as sanctions list matching degree R_sanction=1; otherwise, a lower risk value is assigned, such as R_sanction=0.
[0076] Finally, the compliance risk coefficient R_risk is obtained by weighted summation of the two values, i.e., R_risk = c × R_regulation + d × R_sanction, where c and d are preset weights (e.g., c = 0.5, d = 0.5). The higher the value, the greater the compliance risk.
[0077] For example, if neither the paying country China (FATF rating 1) nor the receiving country United States (FATF rating 1) is on the other's sanctions list, then R_regulation=(1+1) / 6≈0.33, R_sanction=0, and the final compliance risk coefficient R_risk=0.5×0.33+0.5×0=0.165 (low risk).
[0078] The above-mentioned quantitative calculation method transforms the acquired raw real-time status data into comparable index values with unified dimensions, providing a standardized data foundation for the comprehensive evaluation and selection of subsequent routing paths.
[0079] S120. Based on real-time status data, the weights of each indicator are determined through a multi-indicator decision-making method. Based on the weights, the comprehensive fitness of each node is calculated, and a fitness function is constructed to quantitatively evaluate the comprehensive performance of candidate routing paths.
[0080] In one specific embodiment, the multi-index decision-making method is the Analytic Hierarchy Process (AHP), such as... Figure 3 As shown, the steps for determining the weights of each indicator using the analytic hierarchy process (AHP) include:
[0081] S210. Construct a hierarchical structure with route optimization as the target layer and multi-dimensional indicators as the criterion layer;
[0082] S220. Based on objective business data and industry benchmarks, construct a pairwise comparison judgment matrix for the criteria layer indicators;
[0083] S230. Perform consistency verification on the judgment matrix. After the verification passes, calculate the eigenvectors as the weights of each indicator.
[0084] An analytical model is established with "comprehensive performance optimization of routing paths" as the target layer and multiple indicators such as payment fees (B1), transaction confirmation time (B2), node credibility (B3), network congestion (B4), and cross-border compliance risk (B5) as the criteria layer.
[0085] Experts with extensive experience in cross-border payments and blockchain were invited to conduct pairwise comparisons of each indicator at the criteria layer based on objective criteria. A 1-9 scale was used to quantify and score their relative importance, thereby constructing a judgment matrix. This objective criterion integrates information from multiple aspects:
[0086] (1) Statistics on risk losses in historical business data, such as the percentage of losses caused by business failures related to different indicators (e.g., the percentage of risk losses due to "transaction failure" is 12.3%).
[0087] (2) The importance relationship of indicators reflected in publicly available industry benchmark reports and mainstream platform practice data (e.g., the relative importance ratio of "transaction efficiency" to "compliance risk" in SWIFT and Ripple platforms is 1:1.2).
[0088] (3) The impact coefficients of each indicator obtained in the previous experiments or tests of this application on routing performance (e.g., the impact coefficient of "node credibility" on payment success rate is 0.8).
[0089] Finally, to avoid the bias of a single expert's experience, a consistency check is performed on the judgment matrix.
[0090] Furthermore, such as Figure 4 As shown, consistency verification of the judgment matrix includes:
[0091] S231. Based on the judgment matrix, calculate the feature vector representing the relative importance of each indicator;
[0092] S232. Calculate the largest eigenvalue of the judgment matrix based on the eigenvectors;
[0093] S233. Calculate the consistency index based on the largest eigenvalue and the matrix order, and find the corresponding random consistency index based on the matrix order.
[0094] S234. Calculate the ratio of the consistency index to the random consistency index to obtain the consistency ratio;
[0095] S235. If the consistency ratio is less than or equal to the preset threshold, the judgment matrix is determined to pass the consistency check.
[0096] Assuming the criterion layer has p indicators, then the judgment matrix A is a p*p matrix and satisfies:
[0097] A[i][j] represents B i Compared to B j Importance scale;
[0098] A[i][j]=1 / A[j][i] (reciprocity);
[0099] A[i][i]=1 (reflexivity).
[0100] For a judgment matrix of order p, first calculate the product of the elements in each row. =Π(A[i][j]) (j=1 to p); then calculate the p-th root of the product of each row. = Then on Normalization is performed to obtain the feature vector. =( , ,..., ) T The weight of each indicator It equals its corresponding unnormalized weight Divide by the sum of all unnormalized weights, i.e. = / (i=1 to p), where k is the summation index variable and T represents transpose.
[0101] Calculate the judgment matrix and eigenvectors The product of the products yields a vector. Then according to the formula = (1 / p)× (i=1 to p) Calculate the largest eigenvalue of the judgment matrix .
[0102] Then calculate the consistency index CI based on the largest eigenvalue = ( -p) / (p 1) When CI=0, the judgment matrix is completely consistent; the larger CI is, the worse the consistency.
[0103] Meanwhile, the random consistency index RI is obtained by querying the internationally accepted standard table corresponding to the matrix order p.
[0104] Finally, the consistency ratio CR is calculated as CI / RI.
[0105] If the consistency ratio is less than or equal to a preset threshold (e.g., 0.10), the judgment matrix is deemed to have passed the consistency check, and the feature vector is then... This is the weight vector for each indicator; otherwise, the judgment matrix needs to be readjusted or reconstructed.
[0106] To further improve the robustness and business relevance of the weights, the following optimization steps can be performed after passing the consistency check:
[0107] If there are multiple sets of expert judgment matrices that have passed the verification, a weighted average or other method can be used to merge the weights obtained from each set to form a comprehensive weight.
[0108] In addition, to verify and improve the effectiveness of the weights in actual business, data backtracking calibration can be performed. This involves applying the obtained weights to historical data or simulated business scenarios (such as simulating 1,000 cross-border payment transactions) to verify their effectiveness. If key business indicators (such as node credibility) do not meet expectations, the judgment matrix is fine-tuned in conjunction with the verification data, and the consistency verification and weight calculation process is re-executed until the obtained weight scheme matches the business results.
[0109] Finally, a fitness function is constructed based on the indicator weights (W1, W2, W3, W4, and W5) determined in the above process. This fitness function is a multi-objective weighted fitness function, used to quantify and score the comprehensive performance of candidate routing paths, and its expression is F=W1*F_norm+W2*T_norm+W3*C_score+W4*(1 C_congestion)+W5*(1 R_risk represents the risk level, where W1, W2, W3, W4, and W5 are weight coefficients for payment fees, transaction confirmation time, node credibility, network congestion, and cross-border compliance risk, respectively, and satisfy the weight configuration relationship W1+W2+W3+W4+W5=1. The specific values of each weight coefficient are determined using the Analytic Hierarchy Process (AHP) to ensure a balanced reflection of multi-objective optimization needs. The fitness function value F directly characterizes the overall performance of the corresponding candidate route path; the higher the F value, the better the overall fitness of the candidate route path.
[0110] This approach, through dual safeguards of mathematical consistency verification and business performance calibration, ensures that weight allocation is both logically sound and practically instructive, making it highly practical.
[0111] In one specific embodiment, calculating the overall fitness of each node includes:
[0112] To positively transform network congestion into cross-border compliance risks;
[0113] The network congestion and cross-border compliance risks after positive conversion are weighted and summed with the corresponding payment fees, transaction confirmation time and node credibility to obtain the comprehensive suitability of each node.
[0114] Overall adaptability of nodes It is a normalized evaluation value calculated based on multi-dimensional indicators (such as payment fees, transaction confirmation time, credibility score, network congestion, cross-border compliance risk, etc.), and its range is [0,1]. It is used to quantify the relative priority of the node in routing selection.
[0115] Among them, network congestion (C_congestion) and cross-border compliance risk (R_risk) are negative indicators (higher values are more detrimental to routing performance) and need to be converted into positive indicators. The conversion formula is as follows:
[0116] Positive network congestion index: C_congestion′=1 C_congestion
[0117] Positive compliance risk indicator: R_risk′=1 After the R_risk transformation, all metrics are positive indicators where higher values indicate better routing performance, and can be directly used in weighted calculations.
[0118] The overall fitness degree of a single node is calculated using a weighted summation model, combined with the weights of each indicator obtained through the analytic hierarchy process (AHP) to calculate the overall fitness degree of node i. The formula is:
[0119] = × + × + × + × ′+ × ′
[0120] in, The closer the value is to 1, the better the overall performance of the node, and the more suitable it is to be selected into the routing path.
[0121] Furthermore, if the number of nodes in the network is large, the overall fitness of all nodes can be assessed. A second normalization process is performed to ensure that the overall fitness distribution is within the [0,1] interval and the discrimination is reasonable. The formula is as follows:
[0122] ,
[0123] Where n is the total number of nodes in the cross-border payment blockchain network. ′ represents the final overall fit after calibration (if the initial calculation is...). This step can be omitted if the distribution requirements have been met.
[0124] S130. A quantum heuristic algorithm is used to optimize the routing selection. The selection decision and the overall fitness of each node in the network are mapped to the superposition state representation of qubits. The global optimal routing path that maximizes the fitness function value is searched by iteratively adjusting the probability amplitude of the qubits.
[0125] In one specific embodiment, such as Figure 5 As shown, the selection decision and overall fitness of each node in the network are mapped to a superposition state representation of qubits, including:
[0126] S310. For the i-th node, map the state of its unselected route path to the first ground state of the qubit, and map its selected state to the second ground state of the qubit.
[0127] S320. Based on the overall fitness of the node, determine the probability amplitude of the qubit being in a superposition state, wherein the probability amplitude of the qubit being in the second ground state is proportional to the square root of its overall fitness, and the probability amplitude of the qubit being in the first ground state is proportional to one minus the square root of its overall fitness.
[0128] S330. The routing state of the entire network is represented by the product state of the corresponding qubits of all nodes. The product state defines all potential candidate routing paths in the network as a parallel superposition of quantum ground states.
[0129] For each node in a cross-border payment blockchain network (such as a bank node, blockchain verification node, and cross-border clearing node), the decision of whether it should be selected into the current payment routing path is a binary choice problem. This property is related to the two computational ground states of a quantum bit. and There is a natural correspondence. Therefore, for the i-th node... The following mapping rule is established: the state of a route that is not selected is mapped to the corresponding quantum bit. First ground state The selected state is mapped to the second ground state of the qubit. .
[0130] In order to encode the "selection priority" information into the quantum state, it is necessary to root Determine the qubit The probability amplitude of being in a superposition state. Specifically, the probability amplitude of making the qubit be in a superposition state. The probability amplitude of the selected state Its overall compatibility It is proportional to the square root; correspondingly, it is placed in the middle. The probability amplitude of the state (not selected) and( It is directly proportional to the square root of (). This relationship can be expressed as:
[0131] = , = .
[0132] Therefore, node The corresponding qubit state can be represented as a superposition state: This design ensures overall compatibility. The higher the node, the more its qubits collapse during subsequent measurements. The probability of a state (representing the selected state) | | 2 The larger the value, the better the optimization logic of "prioritizing the selection of high-quality nodes" is implemented at the physical level.
[0133] The routing state of the entire cross-border payment network is represented by the product state (tensor product) of the qubits corresponding to all n nodes in the network. This product state is defined as:
[0134]
[0135] After fully expanding this product state, it will contain Each term corresponds to a specific quantum ground state (e.g., ... This ground state uniquely encodes a possible combination of routing node selections (e.g., selecting node 1 and node 3, and not selecting node 2). Therefore, the quantum state |Ψ In principle, it achieves all Parallel superposition representation of potential candidate routing paths.
[0136] For any node Its state (whether it is selected + overall fit) can be uniquely mapped to the parameters of the quantum bit ( , ), and vice versa (as known). Can be reversed (and the probability of selection), satisfying injectivity.
[0137] The above mapping process has a clear mathematical correspondence (injectivity), and the objective indicators of the nodes determine the overall fitness. This uniquely determines the probability amplitude of the qubit, a process that can be physically implemented using quantum circuits such as controlled rotating doors. By encoding the classical routing problem as a quantum superposition state, quantum heuristics can efficiently find the optimal solution in this exponentially large parallel search space by adjusting the probability amplitude (such as quantum rotating door operations) and quantum measurements, thus overcoming the "curse of dimensionality" problem faced by traditional optimization methods when dealing with large-scale networks.
[0138] The quantum state representation established based on this mapping can execute the quantum heuristic algorithm to optimize the solution process and perform efficient global optimization for route selection.
[0139] In one specific embodiment, such as Figure 6 As shown, a quantum heuristic algorithm is used to optimize route selection, including:
[0140] S410. Initialize the quantum population. Each quantum chromosome in the quantum population represents a potential combination of routing nodes through a superposition of 2n qubits, so as to simultaneously encode the node selection decision and comprehensive fitness information, and each qubit is initialized to a uniform superposition state.
[0141] S420. Perform iterative optimization, which includes the following in each iteration: measuring each quantum chromosome to obtain classical routing path candidate solutions, calculating the fitness function value of the candidate solutions, adjusting the quantum rotation gate angle based on the fitness value comparison results to update the probability amplitude of the qubit, and performing quantum mutation operation with a preset probability.
[0142] S430. When the preset convergence condition is met, the iteration is terminated, and the routing path with the largest fitness function value in the entire optimization process is determined as the global optimal routing path.
[0143] In this embodiment, a quantum heuristic algorithm is used to optimize the routing of cross-border payments. The core of this method lies in utilizing the superposition and entanglement properties of quantum computing to search a large number of potential paths in parallel in the probability space, thereby efficiently finding the global optimal solution.
[0144] First, a population (e.g., 100) of quantum chromosomes is constructed, with each quantum chromosome representing a set of potential routing combinations. For a cross-border payment blockchain network with n nodes, each quantum chromosome consists of 2^n qubits, where n qubits serve as master bits, used to encode the node selection decision; the other n qubits serve as auxiliary bits, used to encode additional information such as the node's overall fitness. During initialization, all qubits are set to a uniform superposition state (i.e., the probability amplitudes α and β of each qubit are equal, such as α = β). This ensures that the algorithm has a globally uniform search capability in the initial stage, avoiding premature entrapment in the global optimum.
[0145] The algorithm enters an iterative loop, and each iteration includes the following core operations:
[0146] 1. Perform quantum measurements on each quantum chromosome in the population (e.g.) This causes its quantum superposition state to collapse into a definite classical binary string. This binary string is directly mapped to a specific candidate routing path, for example, "101..." indicates that node 1, node 3, etc. are selected, and node 2, etc. are not selected.
[0147] 2. For each classic candidate route obtained in step 1, substitute it into the fitness function constructed above to calculate the overall performance of the route in terms of "cost-efficiency-security".
[0148] Next, based on the fitness evaluation results of all candidate solutions in the current generation, the probability amplitude of the qubit is adjusted to guide the search direction towards a better solution space. This is specifically achieved by adjusting the angle of the quantum rotation gate.
[0149] 1) Rotation direction: The rotation direction is determined by comparing the fitness of the current solution (F) with the fitness of the current globally optimal solution (F_best). If F < F_best, the rotation direction tends to increase the value of the corresponding qubit that has collapsed. The state (usually representing the probability of selecting a high-quality node) is determined; otherwise, fine-tuning is performed to maintain population diversity.
[0150] 2) Rotation angle: The magnitude of the angle is positively correlated with the fitness difference, and the calculation formula is as follows:
[0151] Where k is the adjustment coefficient (usually taken as 1), and (·) is the sign function. The initial rotation angle is (e.g., π / 16).
[0152] 3) Phase update: Apply the revolving door, according to the formula Update the probability amplitude of each qubit and After adjustment, the quantum state probability amplitude corresponding to the optimal path will be enhanced.
[0153] To avoid the algorithm getting trapped in local optima, a mutation operation is performed on the quantum chromosome with a certain probability (e.g., 0.05). This embodiment specifically designs two mutation strategies with different targets, and dynamically selects one based on the algorithm's search phase:
[0154] The first approach is a phase random rotation scheme. This scheme is used in the later stages of the algorithm's search (when the quality of the solution has stabilized). It randomly selects a subset of qubits and applies a small-range random rotation to their phase (e.g., Δθ∈[-π / 8,π / 8]). This operation only changes the "phase direction" of the quantum state without significantly altering its probability amplitude distribution. This allows for fine-tuning while preserving the current high-quality search direction, effectively improving the convergence accuracy of the final solution. Experimental verification shows that using phase rotation at this stage reduces the fluctuation amplitude of the route combination's fitness score by 40%.
[0155] The second approach is the small perturbation scheme for the superposition coefficient. This scheme is used in the early stages of the algorithm search (when the search direction is not yet clear). It directly applies a small random perturbation to the superposition coefficient α of the quantum state (e.g., α' = α + 0.1 × randn()), and then recalculates β' to maintain normalization (β' = ... This operation directly changes the fundamental probability of a qubit collapsing into different classical states, which can more effectively expand the search space and break the initial possible local optimum trap.
[0156] By employing the phased strategy described above—"using superposition coefficient perturbation in the early stage to broaden the search scope, and using phase rotation in the later stage to focus on convergence accuracy"—this embodiment can significantly improve optimization efficiency and the quality of the final solution while taking into account both the search range and convergence accuracy, compared to using a single mutation operation.
[0157] The iterative optimization process terminates when the preset convergence condition is met. The convergence condition can be set to any one or a combination of the following: the global optimal fitness value fluctuates less than a very small threshold (e.g., 0.001) for several consecutive generations (e.g., 5 generations), or the preset maximum number of iterations (e.g., 100 times) is reached.
[0158] Ultimately, the algorithm determines the routing path with the highest fitness function throughout the entire optimization history as the globally optimal routing path and outputs the actual routing decisions to guide the cross-border payment system.
[0159] S140. Output and execute the globally optimal route path, and when the real-time status data of the node is detected to meet the dynamic triggering conditions, re-execute the optimization solution to update the globally optimal route path.
[0160] The globally optimal routing path obtained from the solution is output to the path execution module of the cross-border payment system. Based on this globally optimal routing path, the cross-border payment system coordinates and drives relevant nodes to complete the forwarding, verification, and final settlement of payment transactions. Specifically, the path information is usually synchronized to all relevant nodes in the network through smart contracts or system consensus mechanisms to ensure that each node collaboratively executes payment instructions according to the updated optimal routing path, thereby achieving efficient and reliable transmission of transactions in the blockchain network.
[0161] Key metrics for cross-border payment blockchain nodes, such as payment fees, network congestion, and transaction confirmation time, often exhibit significant high-frequency fluctuations. For example, payment fees can fluctuate by 10% to 50% within seconds due to factors such as network transaction volume and gas costs. During peak cross-border settlement periods, the node's pending transaction queue can quickly transition from an idle state to a congested state. Furthermore, nodes may experience momentary offline events due to hardware failures, network jitter, or other reasons.
[0162] To ensure the real-time optimization of the payment path, this embodiment uses a streaming computing platform to process node status data in real time, and constructs a real-time early warning and route update mechanism based on the processing results.
[0163] Specifically, this dynamic trigger condition is configured to monitor node status data in real time and trigger route optimization to update the globally optimal route path when any of the following conditions are met:
[0164] If the change in the payment fee of any node compared to the previous monitoring value exceeds the set first threshold;
[0165] If the change in the transaction confirmation time of any node compared to the previous monitoring value exceeds the set second threshold;
[0166] If the network congestion level of any node exceeds the set third threshold;
[0167] Any node goes offline.
[0168] In one specific implementation, the aforementioned thresholds can be configured according to actual requirements. For example, when payment fees increase by more than 20%, transaction confirmation time is extended by more than 30%, network congestion exceeds a set threshold, or nodes go offline, the system automatically triggers a routing optimization process, thereby completing path switching and updates within seconds and effectively adapting to rapid changes in node status.
[0169] In one specific embodiment, to ensure the real-time performance of dynamic route adjustments, the system employs a fast iteration mode when a re-optimization solution is triggered. This mode integrates one or more acceleration strategies to significantly reduce computation time while ensuring solution quality:
[0170] (a) Incremental initialization strategy for quantum population: When constructing the initial quantum population for a new round of optimization, the quantum chromosomes with fitness values in the top 30% of the previous round of optimization are retained as high-quality seeds; at the same time, 70% of the random quantum chromosomes are newly generated to maintain the diversity of the population and global search capability; in addition, the initial angle of the quantum rotation gate is set to a small value (such as θ0=π / 8) to accelerate the convergence trend of the algorithm in the early stage.
[0171] (b) Immediate recalculation strategy for the fitness function: Based on the latest node state data provided by the streaming computing platform, the fitness value of each candidate route is immediately recalculated. Fitness function ( Taking into account the latest normalized indicator data, the expression is as follows:
[0172] =0.3 +0.25 +0.2 +0.1(1 )+0.15(1 )
[0173] This strategy ensures that path evaluation is based entirely on the current instantaneous network state, guaranteeing the timeliness of the optimal solution.
[0174] (c) Lightweight acceleration strategy for the iterative process: Improving efficiency by adjusting and optimizing algorithm parameters across multiple dimensions. This mainly includes: reducing the maximum number of iterations from the initial 100 generations to 50 generations; utilizing the parallel computing and fast convergence characteristics of the quantum heuristic algorithm itself to ensure the quality of the solution; enhancing the dynamic adjustment capability of the quantum rotating gate by dynamically amplifying the rotation angle (e.g., Δθ = 2·sign(F)) based on the difference between the individual fitness and the current optimal fitness. If the optimal fitness of the population does not improve for three consecutive generations, the mutation probability is increased from the base value of 0.05 to 0.1 to help the algorithm escape possible local optima.
[0175] Based on the various acceleration strategies employed, it can not only significantly improve the speed of route optimization solutions in environments with high-frequency fluctuations in node states, but also effectively cope with dynamic challenges such as network congestion and cost fluctuations, ensuring the continuity and high efficiency of payment services.
[0176] In this embodiment, the validity of the newly generated optimized route is also verified. This verification mainly includes two aspects: first, node connectivity check, confirming that all nodes in the path are online and network reachable; second, indicator constraint verification, verifying whether the estimated transaction fees, transaction confirmation time, and other key indicators of the path are within the acceptable range for business. If the verification passes, the new route is immediately sent to the cross-border payment system for execution; if the verification fails, the optimization process is automatically retried, at which point the iteration parameters can be adaptively adjusted or the search space expanded.
[0177] To further improve system response speed and resource utilization, in one specific embodiment, such as Figure 7 As shown, this method also includes route caching and invocation mechanisms:
[0178] S510. Store the historical network state feature vector and the corresponding historical optimal routing path in the cache pool;
[0179] S520. When the globally optimal routing path is determined, calculate the similarity between the current network state feature vector and the historical network state feature vectors in the cache pool.
[0180] S530. If the highest similarity exceeds the set threshold, the corresponding historical best route path will be called directly.
[0181] The method for constructing the network state feature vector is as follows: The core indicators of each node in the cross-border payment blockchain network (such as the normalized payment fee sequence) are used... Transaction confirmation time series Node credibility scoring sequence The overall congestion level (C_total) and compliance risk coefficient (R_total) are compared with the optimal routing path information (such as node sequence) at the corresponding time. The system associates and abstracts the system with its fitness value F_best, and concatenates all indicators with path information along a fixed dimension to form a unified state feature vector S, which can be expressed as:
[0182] .
[0183] A key-value pair structure is used for storage, with the hash value of the "state feature vector" as the key and the corresponding optimal routing path information (node combination, fitness indicator) as the value, stored in a high-performance cache database (such as Redis). At the same time, a reasonable expiration time (such as 24 hours) is set for each cached item to ensure data timeliness.
[0184] The caching mechanism in this embodiment also includes a maintenance strategy for cached items, specifically involving two mechanisms: lazy deletion and periodic deletion. The lazy deletion mechanism means that when a cached item reaches its expiration time, it is not immediately deleted from the database. Instead, it is only when a subsequent query request hits the expired item that an invalidation check is performed, triggering deletion and recalculation. The periodic deletion mechanism means that the caching system automatically scans the database at a preset period (e.g., 24 hours), randomly checking and deleting a portion of expired cached items to prevent expired data from accumulating and occupying storage space in the long term.
[0185] In actual use, when the real-time network state is updated, the system extracts the current state feature vector S_current and calculates its cosine similarity with each historical feature vector S_history in the cache pool. If the cosine similarity of a historical vector is greater than a set high threshold (e.g., 0.9), the current network state is determined to be highly similar to a historical state. At this point, the system directly reads the historical best route stored in the cache as the current recommended path, thus completely skipping the time-consuming quantum heuristic algorithm iterative solution process and reducing the routing decision time from "seconds" to "milliseconds".
[0186] The caching mechanism also includes update strategies, divided into proactive and passive updates. Proactive updates mean that when a new optimal route is calculated using a quantum optimization algorithm, if its fitness value is higher than the fitness of routes recorded in the cache under the same or similar network conditions by a certain percentage (e.g., more than 5%), the cache record is automatically updated with the new path. Passive updates mean that when a cached item expires, if a similar network condition is encountered again, a lightweight, fast optimization is triggered (e.g., limiting the number of iterations to within 20 generations), and the resulting new path and its fitness are updated in the cache.
[0187] Suppose the cached database records historical data: during yesterday's peak cross-border payment period (14:00-15:00), the historical best route corresponding to the network state feature vector S_history was "Node A → Node D → Node C", with a fitness F_best = 0.9. If at 14:05 today, the system calculates that the cosine similarity between the real-time network state feature vector S_current and S_history is 0.92 (exceeding the threshold of 0.9), then the historical best route path "Node A → Node D → Node C" is directly invoked. This process reduces the route calculation time from approximately 500ms to approximately 50ms. Actual verification shows that the actual fitness of this route in the current state is 0.88, less than 5% different from the historical record, fully meeting business continuity requirements.
[0188] In another optional embodiment, the blockchain-based cross-border payment routing optimization method provided in this application can also employ the following alternative technical solutions to adapt to different network sizes, data characteristics, or resource constraints:
[0189] 1. Alternative solutions to quantum algorithms
[0190] The core optimization algorithm can be replaced by the aforementioned quantum heuristic algorithm with the quantum particle swarm optimization algorithm. In this scheme, the original multi-dimensional constraint modeling (such as payment fees, transaction confirmation time, network congestion, etc.) and dynamic adjustment module remain unchanged. The quantum particle swarm optimization algorithm characterizes the routing scheme by defining the position and velocity of quantum particles, and iteratively adjusts the particle state according to specific quantum update rules based on the individual historical optimal solution and the global optimal solution of the group, thereby achieving the search for the optimal route. This scheme is particularly suitable for cross-border payment networks with relatively small node scale (e.g., no more than 30 nodes), and can potentially achieve faster convergence speed while maintaining the advantages of algorithm parallelism and global search capability.
[0191] 2. Constraint Weight Optimization Scheme
[0192] When determining the weights of various constraint metrics (such as payment fees, transaction confirmation time, and network congestion) in the fitness function, the entropy weight method can be used instead of the analytic hierarchy process (AHP). The entropy weight method automatically calculates weights based on the information entropy of each metric's data: the greater the variability of the metric value, the smaller its entropy value, the greater the amount of information it provides, and the higher its assigned weight. This method is entirely driven by objective data, effectively reducing the influence of subjective experience and judgment on weight allocation, and improving the model's adaptability and fairness across different datasets. Therefore, it is suitable for application scenarios with high requirements for decision-making objectivity.
[0193] 3. Dynamically adjust the trigger scheme
[0194] The dynamic triggering mechanism (based on threshold judgment) in the aforementioned embodiments can be further optimized into a hybrid mechanism combining "periodic triggering" and "threshold triggering." In addition to real-time monitoring of node status and immediately triggering optimization when the threshold condition is met, the system also sets a fixed optimization period (e.g., every 30 seconds). Regardless of whether the threshold condition is met, the system will perform a route optimization solution once at the end of the period. This hybrid mechanism ensures immediate response during periods of drastic state fluctuations while avoiding frequent calculations due to minor fluctuations through periodic calibration. This achieves a more reasonable balance between real-time route optimization and the consumption of system computing resources. This solution is particularly suitable for scenarios where network status fluctuates frequently but computing resources are limited.
[0195] Example 2
[0196] like Figure 8 As shown, this embodiment provides a blockchain-based cross-border payment routing optimization device, including:
[0197] The data acquisition module 10 is used to acquire real-time status data of each node in the cross-border payment blockchain network. The real-time status data includes multi-dimensional indicators for evaluating the performance of the routing path.
[0198] The function construction module 20 is used to determine the weight of each indicator based on real-time status data through a multi-indicator decision-making method, and to calculate the comprehensive fitness of each node based on the weights and to construct a fitness function for quantitatively evaluating the comprehensive performance of candidate routing paths.
[0199] The path solving module 30 is used to optimize the route selection using a quantum heuristic algorithm. In this module, the selection decision and the overall fitness of each node in the network are mapped to the superposition state representation of qubits, and the global optimal route path that maximizes the fitness function value is searched by iteratively adjusting the probability amplitude of the qubits.
[0200] The dynamic update module 40 is used to output and execute the globally optimal route path, and when the real-time status data of the node is detected to meet the dynamic triggering conditions, the optimization solution is re-executed to update the globally optimal route path.
[0201] This embodiment is used to implement the method provided in Embodiment 1 above, and has the corresponding beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of this invention.
[0202] Example 3
[0203] like Figure 9As shown, an electronic device includes a memory 901 and a processor 902. The memory 901 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 902 to implement the aforementioned blockchain-based cross-border payment routing optimization method.
[0204] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0205] A computer-readable storage medium storing a computer program that, when executed by a computer, enables a blockchain-based cross-border payment routing optimization method as described above.
[0206] For example, a computer program can be divided into one or more modules / units. One or more modules / units are stored in memory 901 and executed by processor 902. Data I / O interface transmission is completed by input interface 905 and output interface 906 to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions. The instruction segments are used to describe the execution process of the computer program in the computer device.
[0207] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a memory 901 and a processor 902. Those skilled in the art will understand that this embodiment is merely an example of a computer device and does not constitute a limitation on the computer device. It may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include an input device 907, a network access device, a bus, etc.
[0208] The processor 902 can be a Central Processing Unit (CPU), or other general-purpose processors 902, digital signal processors 902 (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 902 can be a microprocessor 902, or any conventional processor 902, etc.
[0209] The memory 901 can be an internal storage unit of a computer device, such as a hard drive or RAM. The memory 901 can also be an external storage device of a computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 901 can include both internal and external storage units. The memory 901 is used to store computer programs and other programs and data required by the computer device. The memory 901 can also be used for temporary storage in the output device 908. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM) 903, random access memory (RAM) 904, discs, or optical discs.
[0210] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A blockchain-based method for optimizing cross-border payment routing, characterized in that, Includes the following steps: Obtain real-time status data for each node in the cross-border payment blockchain network, wherein the real-time status data includes multi-dimensional indicators for evaluating the performance of routing paths; Based on the real-time status data, the weights of each indicator are determined through a multi-indicator decision-making method, and based on the weights, the comprehensive fitness of each node is calculated and a fitness function for quantitatively evaluating the comprehensive performance of candidate routing paths is constructed. A quantum heuristic algorithm is used to optimize the routing selection. The selection decision and the overall fitness of each node in the network are mapped to the superposition state representation of qubits. The global optimal routing path that maximizes the fitness function value is searched by iteratively adjusting the probability amplitude of the qubits. The globally optimal routing path is output and executed. When the real-time status data of the node is detected to meet the dynamic triggering condition, the optimization solution is re-executed to update the globally optimal routing path.
2. The blockchain-based cross-border payment routing optimization method according to claim 1, characterized in that, The multi-dimensional indicators specifically include: payment processing fees, transaction confirmation time, node credibility, network congestion, and cross-border compliance risks.
3. The blockchain-based cross-border payment routing optimization method according to claim 2, characterized in that, The quantitative calculation of the multi-dimensional indicators includes: (a) Quantification of payment fees: The fees of each node in the routing path are uniformly converted into the base currency and summed, and then normalized based on the preset fee range. (b) Quantification of transaction confirmation time: Obtain the confirmation time and data transmission ratio of each node in the routing path, calculate the weighted average value with the ratio as the weight, and perform normalization processing; (c) Quantification of node credibility: It is calculated by weighting and integrating the node's historical transaction success rate and the completeness of compliance filing, and introducing the penalty coefficient for abnormal behavior; (d) Quantification of network congestion: It is obtained by weighting the backlog of pending transactions and bandwidth utilization of nodes; (e) Quantification of cross-border compliance risks: The risk is calculated by weighting the degree of matching between the regulatory policies of the countries or regions where the two parties to the payment are located and the degree of matching between the sanctions list.
4. The blockchain-based cross-border payment routing optimization method according to claim 3, characterized in that, The fitness function is a multi-objective weighted fitness function, and the multi-index decision-making method is the analytic hierarchy process (AHP).
5. The blockchain-based cross-border payment routing optimization method according to claim 4, characterized in that, The steps for determining the weights of each indicator using the Analytic Hierarchy Process (AHP) include: Construct a hierarchical structure with route optimization as the target layer and the aforementioned multi-dimensional indicators as the criterion layer; Based on objective business data and industry benchmarks, construct a pairwise comparison judgment matrix for the criteria layer indicators; The judgment matrix is subjected to consistency verification. After the verification is passed, the feature vector is calculated as the weight of each indicator.
6. The blockchain-based cross-border payment routing optimization method according to claim 5, characterized in that, The consistency check of the judgment matrix includes: Based on the judgment matrix, the feature vectors representing the relative importance of each indicator are calculated; Calculate the maximum eigenvalue of the judgment matrix based on the eigenvectors; The consistency index is calculated based on the maximum eigenvalue and the matrix order, and the corresponding random consistency index is found based on the matrix order. Calculate the ratio of the consistency index to the random consistency index to obtain the consistency ratio; If the consistency ratio is less than or equal to a preset threshold, the judgment matrix is determined to have passed the consistency check.
7. The blockchain-based cross-border payment routing optimization method according to claim 5, characterized in that, The calculation of the overall fitness of each node includes: The aforementioned network congestion level is positively correlated with cross-border compliance risks; The network congestion and cross-border compliance risks after positive conversion are weighted and summed with the corresponding payment fees, transaction confirmation time and node credibility based on the weights mentioned above to obtain the comprehensive suitability of each node.
8. The blockchain-based cross-border payment routing optimization method according to claim 1, characterized in that, The step of mapping the selection decision and overall fitness of each node in the network to a superposition state representation of qubits includes: For the i-th node, map the state of its unselected route path to the first ground state of the qubit, and map its selected state to the second ground state of the qubit; Based on the overall fitness of the node, the probability amplitude of the qubit being in a superposition state is determined, wherein the probability amplitude of the qubit being in the second ground state is proportional to the square root of its overall fitness, and the probability amplitude of the qubit being in the first ground state is proportional to a factor minus the square root of its overall fitness. The routing state of the entire network is represented by the product state of the corresponding qubits of all nodes, and the product state defines all potential candidate routing paths in the network as a parallel superposition of quantum ground states.
9. The blockchain-based cross-border payment routing optimization method according to claim 1, characterized in that, The optimization solution for route selection using a quantum heuristic algorithm includes: A quantum population is initialized, in which each quantum chromosome represents a potential combination of routing nodes through a superposition of 2n qubits, so as to simultaneously encode the node selection decision and the comprehensive fitness information, and each qubit is initialized to a uniform superposition state. Perform iterative optimization, which includes in each iteration: measuring each quantum chromosome to obtain classical routing path candidate solutions, calculating the fitness function value of the candidate solutions, adjusting the quantum rotation gate angle based on the fitness value comparison results to update the probability amplitude of the qubit, and performing a quantum mutation operation with a preset probability; When the preset convergence condition is met, the iteration is terminated, and the routing path with the largest fitness function value during the entire optimization process is determined as the global optimal routing path.
10. A blockchain-based cross-border payment routing optimization method according to claim 9, characterized in that, The quantum mutation operation includes at least one of the following: Apply random perturbations to the superposition state coefficients of the qubit; The phase of the qubit is randomly rotated.
11. The blockchain-based cross-border payment routing optimization method according to claim 1, characterized in that, The dynamic triggering condition includes at least one of the following: The change in payment fees at any node exceeds the first threshold; The transaction confirmation time of any node changes by more than the second threshold; The network congestion level of any node exceeds the third threshold; Any node is offline.
12. The blockchain-based cross-border payment routing optimization method according to claim 1, characterized in that, When the optimization solution is re-executed, a fast iteration mode is adopted, which includes at least one of the following acceleration strategies: (a) Population initialization is performed based on the high-quality quantum chromosomes obtained in the previous round of optimization; (b) Reduce the maximum number of iterations; (c) Increase the reference adjustment angle of the quantum rotating door.
13. The blockchain-based cross-border payment routing optimization method according to claim 1, characterized in that, The method also includes route caching and invocation mechanisms: Store historical network state feature vectors and their corresponding historical best routing paths in a cache pool; When the globally optimal routing path is determined, the similarity between the current network state feature vector and the historical network state feature vectors in the cache pool is calculated. If the highest similarity exceeds the set threshold, the corresponding historical best route path will be called directly.
14. The blockchain-based cross-border payment routing optimization method according to claim 13, characterized in that, The historical network state feature vector is composed of multi-dimensional index values of each node; the similarity is calculated by cosine similarity.
15. A blockchain-based cross-border payment routing optimization device, characterized in that, include: The data acquisition module is used to acquire real-time status data of each node in the cross-border payment blockchain network. The real-time status data includes multi-dimensional indicators for evaluating the performance of the routing path. The function construction module is used to determine the weight of each indicator based on the real-time status data through a multi-indicator decision-making method, and to calculate the comprehensive fitness of each node based on the weights and to construct a fitness function for quantitatively evaluating the comprehensive performance of candidate routing paths. The path finding module is used to optimize the route selection using a quantum heuristic algorithm. The selection decision and the overall fitness of each node in the network are mapped to the superposition state representation of qubits, and the global optimal route path that maximizes the fitness function value is searched by iteratively adjusting the probability amplitude of the qubits. The dynamic update module is used to output and execute the globally optimal routing path, and when the real-time status data of the node is detected to meet the dynamic triggering conditions, the optimization solution is re-executed to update the globally optimal routing path.
16. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement a blockchain-based cross-border payment routing optimization method as described in any one of claims 1 to 14.
17. A computer-readable storage medium storing a computer program, characterized in that, The computer program enables the computer to implement a blockchain-based cross-border payment routing optimization method as described in any one of claims 1 to 14 when executed.