Novel weighted directed link prediction method for complex block chain transaction network

By constructing a weighted directed acyclic graph and modifying the hidden metric space model in the blockchain transaction network, the problem of low prediction accuracy of chain prediction methods in complex networks is solved, achieving more efficient and accurate transaction probability prediction, and improving the intelligence level and resource allocation efficiency of the blockchain platform.

CN121660795APending Publication Date: 2026-03-13FUJIAN BIG DATA INFORMATION SECURITY CONSTRUCTION & OPERATION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing chain prediction methods are difficult to apply effectively to complex blockchain transaction networks, facing challenges such as complex network structures, data privacy and security, transaction dynamics, and attack prevention, resulting in low prediction accuracy.

Method used

We employ a method that combines a weighted directed acyclic graph (WDAG) and a modified hidden metric space model (MHMSM) to improve the accuracy of transaction probability prediction by constructing an acyclic graph, calculating the weighted shortest path distance, designing a cost function, and using similarity scores.

Benefits of technology

It improves the prediction accuracy of transaction probabilities in blockchain transaction networks, enhances the robustness and adaptability of the model, is applicable to complex network structures, reduces computational complexity, and promotes the efficiency and intelligence of blockchain platform resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121660795A_ABST
    Figure CN121660795A_ABST
Patent Text Reader

Abstract

The invention discloses a novel weighted directed link prediction method for a complex block chain transaction network, which is used for the complex block chain transaction network, provides a novel modeling and link prediction method for the characteristics of the block chain transaction network, and solves the problem that the existing method is possibly inapplicable. The method comprises the following steps: introducing a weighted directed acyclic graph transaction (WDAGT) model, and representing a block chain transaction network as a weighted directed acyclic graph; a weighted directed acyclic graph modified hidden metric space model (WDAG-MHMSM) for link prediction, a modified Floyd-Warshall algorithm for calculating a transaction probability, and a cost function are provided. The method is superior to other reference methods on a plurality of bitcoin and Ethereum transaction network data sets by considering observation attributes and hidden metric space characteristics of nodes. The method can be used for predicting future transactions, identifying abnormal modes, analyzing network dynamics, evaluating transaction risks and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, specifically to a novel weighted directed link prediction method for complex blockchain transaction networks, which improves the prediction accuracy of transaction probabilities in blockchain transaction networks. Background Technology

[0002] In network analysis, chain prediction plays a crucial role in understanding the connections between nodes based on existing structural patterns. Particularly in blockchain transaction networks, the chain prediction problem aims to predict the probability of a transaction occurring between two nodes. Existing chain prediction methods are mostly based on traditional network designs, and their application in blockchain transaction networks faces several main challenges—

[0003] Network structural complexity: Traditional chain prediction methods are mostly designed for simple static or dynamic networks (such as social networks or communication networks), which are typically undirected and unweighted. However, blockchain transaction networks are often much more complex, not only being directed but also possessing weights (such as transaction amount and frequency) and dynamically changing characteristics. Furthermore, blockchain transaction networks are usually highly heterogeneous, containing a large number of different types of nodes (such as users and smart contracts) and edges (different types of transactions). These characteristics make it difficult to directly apply traditional chain prediction methods.

[0004] Data privacy and security: In blockchain networks, transaction information is typically public, but user identity information is often anonymous. This privacy protection increases the difficulty of prediction because it lacks the additional information based on node characteristics or attributes found in traditional social networks. This scarcity of data limits the effectiveness of chain prediction methods.

[0005] The dynamic nature of transactions: Transactions in a blockchain network are constantly changing and highly dynamic. Traditional chain prediction methods generally assume that the network is relatively static, making it difficult to handle the frequently changing transaction patterns in a blockchain network. Furthermore, blockchain transactions have a temporal sequence; the timing information of transactions plays a crucial role in prediction, but traditional methods often overlook this aspect.

[0006] Prevention of Attacks and Malicious Behaviors: Attackers and malicious actors may exist in blockchain networks, potentially engaging in illegal activities such as forging transactions or money laundering. Traditional chain prediction methods typically do not account for this situation and are ineffective against networks with malicious intent.

[0007] Therefore, it is of great significance to propose a weighted directed chain prediction method based on the weighted directed acyclic graph modification of the hidden metric space model for complex blockchain transaction networks. Summary of the Invention

[0008] The purpose of this invention is to provide a novel weighted directed link prediction method for complex blockchain transaction networks, thereby solving the aforementioned technical problems. The various technical effects of the preferred solutions among the many technical solutions provided by this invention are detailed below.

[0009] To achieve the above objectives, the present invention provides the following technical solution:

[0010] This invention proposes a novel weighted directed link prediction method for complex blockchain transaction networks. Through a series of algorithms and steps, it effectively improves the prediction accuracy of transaction probabilities in blockchain transaction networks.

[0011] Specifically, the method of the present invention includes the following steps:

[0012] Step S1: Collect and preprocess blockchain transaction data to construct an initial directed weighted graph;

[0013] Step S2: Construct a weighted directed acyclic graph transaction model; use a topological sorting algorithm to ensure that the directed weighted graph is acyclic, and if a cycle exists, handle it by pruning or adjusting nodes;

[0014] Step S3: Calculate the weighted shortest path distance; initialize the distance matrix between nodes, setting the initial distance as the edge weight; update the distance matrix using the shortest path algorithm, and calculate the weighted shortest path distance between all node pairs;

[0015] Step S4: Design the cost function;

[0016] Based on the weighted shortest path distance matrix, design a function to reflect transaction costs;

[0017] Step S5: Calculate similarity scores; using the modified hidden metric space model, based on the cost function and weighted shortest path distance, calculate the similarity scores between nodes. The similarity scores represent the predicted transaction probabilities.

[0018] Step S5.1: Construction of the hidden metric space model; Based on the optimized directed acyclic graph, each node is embedded into a hidden metric space to generate a hidden vector representation for each node;

[0019] Step S5.2: Calculate the feature vector of each node in the hidden metric space using transaction data and a weighted directed acyclic graph.

[0020] Step S5.3: Calculate the similarity between nodes; use the feature vectors in the hidden metric space to calculate the similarity between nodes;

[0021] Step S5.4: Generate a similarity matrix; Summarize the similarity calculation results between all nodes to generate a similarity matrix. Each element of the matrix represents the similarity between the corresponding nodes. Store the matrix in a data structure for subsequent chain prediction.

[0022] Step S6: Result evaluation; Iteratively optimize the model and test it on a blockchain network dataset until the target is achieved;

[0023] Step S7: Chain prediction; perform chain prediction based on the similarity matrix to determine potential transaction relationships and possible future transaction behaviors.

[0024] Implementing one of the above-described technical solutions of the present invention has the following advantages or beneficial effects:

[0025] 1. Improve prediction accuracy: By constructing a weighted directed acyclic graph (WDAG), the circular structure in the transaction network is eliminated, effectively reducing data noise and prediction errors, and improving the accuracy of chain prediction.

[0026] 2. Make full use of weight information: Considering weight information such as transaction frequency and transaction amount, a function reflecting transaction costs was designed, which enables the model to more accurately reflect the actual transaction relationship between nodes, thereby improving the accuracy of prediction.

[0027] 3. Enhanced model robustness: A modified Hidden Metric Space Model (MHMSM) is adopted, which enhances the robustness and adaptability of the model when dealing with complex network structures by introducing a weighted shortest path distance and transaction cost function.

[0028] 4. Wide applicability: The method of this invention is not only applicable to chain prediction in blockchain transaction networks, but can also be extended to other fields with complex network structures and weight information, such as social networks and logistics networks, and has broad application prospects.

[0029] 5. Improve network resource allocation efficiency: By accurately predicting future transaction probabilities, blockchain platforms can better optimize network resource allocation, improve transaction processing efficiency, and reduce network congestion and latency.

[0030] 6. Promoting the development of blockchain technology: The method of this invention provides an innovative solution for chain prediction in blockchain transaction networks, which can effectively improve the intelligence level of blockchain platforms and promote the development and application of blockchain technology.

[0031] 7. Comprehensive results evaluation: The effectiveness and reliability of the model were verified by testing and evaluation on multiple blockchain datasets, ensuring the applicability and stability of the model on different blockchain platforms.

[0032] 8. Flexible parameter adjustment: The designed cost function and similarity calculation model parameters are adjustable, and can be optimized and adjusted according to different application scenarios and data characteristics to obtain the best prediction results.

[0033] 9. Reduced computational burden: Constructing acyclic graphs reduces computational complexity, making the processing of large-scale blockchain transaction networks more efficient and reducing the computational burden.

[0034] Based on the above advantages and beneficial effects, the method of the present invention can not only effectively improve the chain prediction accuracy of blockchain transaction networks, but also provide reference and guidance for the analysis and prediction of other complex networks, and has important practical application value and academic research significance. Attached Figure Description

[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0036] Figure 1 This is a flowchart of a novel weighted directed link prediction method for complex blockchain transaction networks according to an embodiment of the present invention;

[0037] Figure 2 This is a flowchart illustrating the construction of a weighted directed acyclic graph (DAG) transaction model according to an embodiment of the present invention.

[0038] Figure 3 This is a flowchart of calculating similarity based on the hidden metric space model in an embodiment of the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the present invention clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments, illustrating various exemplary embodiments that may be used to implement the present invention. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of the present invention disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of the present invention.

[0040] To illustrate the technical solution described in this invention, specific embodiments are described below, showing only the parts related to the embodiments of this invention.

[0041] This invention provides a novel weighted directed link prediction method for complex blockchain transaction networks, comprising the following steps:

[0042] S1. Construct a Weighted Directed Acyclic Graph (WDAG): Obtain an initial directed weighted graph where nodes represent blockchain accounts, edges represent transactions, and edge weights are either transaction amount or frequency. Use the Tarjan algorithm to identify strongly connected components (SCCs) in the graph, which represent the cyclic parts of the graph. For each strongly connected component, remove the edge with the highest weight until the network becomes an acyclic graph.

[0043] S2. Hidden Metric Space Modeling: Based on the optimized acyclic graph, each node is embedded into a hidden metric space, generating a hidden vector representation for each node. The hidden metric space model is optimized using the node's transaction history and similarity metrics, ensuring that adjacent nodes are close to each other in the metric space.

[0044] S3. Chain Prediction: Utilizing a trained hidden metric space model, this method predicts potential transaction chains by calculating the distances and weights between node pairs. The prediction results are then further filtered using a machine learning model to remove low-confidence predictions.

[0045] S4. Verification and Optimization: Verify the predicted transaction chain to ensure its rationality and accuracy. Iterate and optimize the model to continuously improve the accuracy and efficiency of predictions.

[0046] It should be noted that the execution order of step S3 can be before step S2 or before step S4.

[0047] This embodiment provides a weighted directed chain prediction method based on a weighted directed acyclic graph (DAG) modified hidden metric space model. Addressing the complex relationships in blockchain transaction networks, this method achieves efficient and accurate chain prediction by combining a DAG and a hidden metric space model. By constructing an acyclic graph with weights and direction, and combining it with the latent feature mining capabilities of the hidden metric space model, this method models and analyzes the transaction network from multiple perspectives, establishing a precise chain prediction framework that effectively improves the accuracy and reliability of predictions. Furthermore, this method not only fully utilizes the topological characteristics of transaction data structurally but also provides a detailed characterization of the dynamic changes in transaction relationships, ensuring the comprehensiveness and practicality of the chain prediction results. Therefore, this method is not only applicable to chain prediction in blockchain transaction networks but can also be extended to other similar complex networks, providing strong technical support for related fields.

[0048] To describe in detail the chain prediction method based on a weighted directed acyclic graph (WDAG) and a hidden metric space model from an implementation perspective, the following section breaks down the entire process, specifically describing the technical details and implementation methods of each step. A novel weighted directed link prediction method for complex blockchain transaction networks, such as... Figure 1 As shown, the specific steps are as follows:

[0049] Step S1: Collect and preprocess data;

[0050] Step S1.1: Collect blockchain transaction data; collect transaction data on the blockchain platform, including information such as transaction participants, transaction amounts, and transaction times; specifically, use the API interface provided by the blockchain node to obtain transaction data and store the data in a database or in-memory data structure (such as a graph database, relational database, etc.).

[0051] Step S1.2: Data preprocessing, cleaning and organizing the data, removing invalid or redundant data; preprocessing specifically refers to data normalization to ensure consistency between different datasets.

[0052] Step S1.3: Construct the initial directed weighted graph; construct a weighted directed acyclic graph using transaction data, where nodes represent transaction participants, edges represent transaction behaviors, and the weight of the edges is determined based on the transaction amount and frequency.

[0053] Specifically, the transaction data is traversed to create a graph data structure, where each node represents a transaction participant; edges are created for each transaction behavior, and weights are calculated based on transaction amount and frequency.

[0054] Step S2: Construct a weighted directed acyclic graph (WDAGT) transaction model;

[0055] Topological sorting algorithms are used to ensure that the graph is acyclic; if cycles exist, they are addressed through appropriate pruning or node adjustment. Specifically, for example... Figure 2 As shown, the Tarjan algorithm is used to identify strongly connected components (SCCs) in a directed acyclic graph through depth-first search. A strongly connected component is a subgraph of a directed acyclic graph in which any two nodes are connected by a path, i.e., a cycle exists. For each strongly connected component, the edge with the highest weight is removed until all cycles of the strongly connected components are broken, and the network becomes an acyclic graph.

[0056] Step S3: Calculate the weighted shortest path distance; initialize the distance matrix between nodes, setting the initial distance as the edge weight; update the distance matrix using a modified Floyd-Warshall algorithm, and calculate the weighted shortest path distance between all node pairs; specifically, first initialize a distance matrix dist, initializing the distance between all node pairs to infinity; then traverse all edges in WDAGT, assigning the edge weights to the corresponding distance matrix elements; using a triple loop, for each intermediate node k, update the shortest distance from node i to node j; if the path through node k is shorter, update the distance matrix, and finally return the updated distance matrix dist.

[0057] Step S4: Design the cost function;

[0058] Based on the weighted shortest path distance matrix, a function reflecting transaction costs is designed; the cost function considers factors such as transaction frequency and transaction amount between nodes.

[0059] Typically, cost functions are used to measure the deviation between predictions and actual results and to guide the optimization of model parameters. Below is a specific example of a typical cost function design.

[0060] In this invention, the objective is to predict the similarity between nodes in a blockchain transaction network using a hidden metric space model, thereby enabling chain prediction. Therefore, the cost function should measure the difference between the predicted similarity values ​​between nodes and the actual transaction relationships.

[0061] Cost function design example

[0062] Suppose we have a weighted directed acyclic graph G=(V,E), where V is the set of nodes, E is the set of edges, each edge (u,v) corresponds to a transaction between nodes u and v, and the edge weight w. uv Indicates the intensity or frequency of transactions.

[0063] Suppose each node u has a feature vector h in the hidden metric space. u Define the similarity s between nodes u and v. uv The inner product of these two eigenvectors or other metrics, such as:

[0064]

[0065] Where d is the dimension of the hidden metric space, h u,i Let represent the k-th dimension feature of node 𝑢.

[0066] Objective: Minimize the predicted similarity s uv Deviation from actual transaction relationships.

[0067] A specific cost function design can be defined as a cost function 𝐿 based on the squared error:

[0068]

[0069] First item This calculation measures the predicted similarity s. uv With the actual transaction relationship f(w) uv) The squared error between them.

[0070] s uv : is the similarity between nodes u and v calculated by the hidden metric space model.

[0071] f(w uv) : is to understand the actual transaction relationship w uv A function that maps to the similarity space, for example, the transaction weight w can be used directly. uv Alternatively, it can be transformed using a non-linear function.

[0072] Second item This is a regularization term, designed to prevent overfitting. Regularization controls the size of the feature vectors, avoiding overly complex models. Parameters Control the strength of regularization.

[0073] Implementation steps

[0074] Initialize the feature vector h u : Randomly initialize the feature vector of each node.

[0075] Calculate similarity s uv Calculate the similarity between nodes based on their feature vectors.

[0076] Calculate the loss: Use the cost function described above to calculate the loss value.

[0077] Optimization: Adjust the feature vector h using gradient descent or other optimization algorithms. u In order to minimize the cost function L(H).

[0078] Step S5: Calculate the similarity score; using the modified Hidden Metric Space Model (MHMSM), based on the cost function and weighted shortest path distance, calculate the similarity score between nodes. The similarity score represents the predicted transaction probability; for example... Figure 3 As shown, the specific steps are as follows:

[0079] Step S5.1: Construction of the hidden metric space model; Based on the optimized acyclic graph, each node is embedded into a hidden metric space, generating a hidden vector representation for each node. The transaction history and similarity metric of the nodes are used to optimize the hidden metric space model, making adjacent nodes closer in the metric space;

[0080] Step S5.1.1: Initialize the hidden metric space model; randomly initialize the feature vector of each node, usually in a high-dimensional space. The feature vector can be randomly initialized using a normal distribution or a uniform distribution.

[0081] Step S5.2: Calculate the feature vector of each node in the hidden metric space using transaction data and a weighted directed acyclic graph. The feature vector can be calculated based on the transaction relationship and transaction frequency between nodes, and machine learning algorithms can be used for training and optimization.

[0082] Specifically, gradient descent or other optimization algorithms are used to adjust the feature vectors so that their positions in the hidden metric space more accurately reflect the transaction relationships.

[0083] Step S5.3: Calculate the similarity between nodes; use the feature vectors in the hidden metric space to calculate the similarity between nodes. Similarity calculation can employ cosine similarity, Euclidean distance, or other suitable similarity metrics.

[0084] Step S5.4: Generate a similarity matrix; summarize the similarity calculation results between all nodes to generate a similarity matrix. Each element of the matrix represents the similarity between the corresponding nodes. Store the matrix in an appropriate data structure for subsequent chain prediction.

[0085] Step S6: Result evaluation; test on multiple blockchain network datasets, including datasets from the Bitcoin and Ethereum platforms; evaluate the accuracy, recall, and F1 score of the prediction model.

[0086] Table 1: Accuracy

[0087] Dataset MAA MCN MJC MPA MRA This method TF-ERC20 0.4999 0.5005 0.4999 0.5000 0.4999 0.8830 TF-V2-ERC20 0.5000 0.5005 0.5000 0.5000 0.5000 0.8246 TF-V3-ERC20 0.4999 0.4997 0.4999 0.4999 0.4999 0.7903 BTCTD 0.5173 0.5012 0.5333 0.5187 0.5570 0.8747 BTA 0.5044 0.4999 0.5499 0.5685 0.5414 0.7621 BOTC 0.4999 0.5002 0.5014 0.5004 0.5003 0.9161

[0088] Table 2: Recall Rate

[0089] Dataset MAA MCN MJC MPA MRA This method TF-ERC20 0.5000 0.5006 0.5000 0.4999 0.5000 0.8832 TF-V2-ERC20 0.5000 0.5006 0.5000 0.5001 0.5000 0.8250 TF-V3-ERC20 0.5000 0.4999 0.5000 0.4995 0.5000 0.7913 BTCTD 0.5183 0.5022 0.5333 0.5186 0.5533 0.8750 BTA 0.5000 0.4923 0.5497 0.5083 0.5402 0.8680 BOTC 0.4998 0.5003 0.5021 0.5001 0.5021 0.9167

[0090] Table 3: F1 scores

[0091] Dataset MAA MCN MJC MPA MRA This method TF-ERC20 0.4999 0.5005 0.4999 0.4997 0.4999 0.8831 TF-V2-ERC20 0.4999 0.5006 0.4999 0.4998 0.4999 0.8248 TF-V3-ERC20 0.4999 0.4997 0.5000 0.5000 0.5000 0.7908 BTCTD 0.5176 0.5020 0.5332 0.5187 0.5544 0.8749 BTA 0.5012 0.4955 0.5498 0.5317 0.5408 0.8094 BOTC 0.4994 0.5000 0.5016 0.5001 0.4996 0.9161

[0092] As shown in Tables 1, 2, and 3, the weighted directed acyclic graph transaction model (WDAGT) and the corresponding link prediction method (WDAG-MHMSM) proposed in this invention outperform the benchmark methods in all performance metrics, demonstrating strong link prediction capabilities.

[0093] Step S7: Chain prediction; Based on the similarity matrix, chain prediction is performed to determine potential transaction relationships and possible future transaction behaviors. The chain prediction results can be used for application scenarios such as security analysis of transaction networks, transaction risk assessment, and market trend prediction.

[0094] Specifically, a similarity matrix is ​​used to predict future trading behavior, employing threshold-based filtering or recommendation system algorithms. The prediction results are then compared with actual trading data to verify and evaluate the effectiveness of the prediction model.

[0095] By following the detailed implementation steps outlined above, a chain prediction system based on a weighted directed acyclic graph and a hidden metric space model can be constructed. This system can efficiently and accurately predict chains in blockchain transaction networks and can be applied to various scenarios, such as security analysis, risk assessment, and market trend prediction. Sample code is provided for the specific implementation methods of each step to facilitate practical development and application.

[0096] In summary, this embodiment provides a novel weighted directed link prediction method for complex blockchain transaction networks. This method effectively captures and represents the complex interaction relationships between nodes in a blockchain transaction network by combining the topological advantages of weighted directed acyclic graphs with the latent feature mining capabilities of hidden metric space models. This method not only improves the efficiency of chain prediction but also significantly enhances its accuracy. It is suitable for handling diverse and dynamically changing transaction relationships in blockchain networks, providing reliable technical support for the security and stability of blockchain networks.

[0097] The above description is merely a preferred embodiment of the present invention. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

[0098] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the processes of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

Claims

1. A novel weighted directed link prediction method for complex blockchain transaction networks, characterized in that, Includes the following steps: Step S1: Collect and preprocess blockchain transaction data to construct an initial directed weighted graph; Step S2: Construct a weighted directed acyclic graph transaction model; use a topological sorting algorithm to ensure that the directed weighted graph is acyclic, and if a cycle exists, handle it by pruning or adjusting nodes; Step S3: Calculate the weighted shortest path distance; initialize the distance matrix between nodes, setting the initial distance as the edge weight; Update the distance matrix using the shortest path algorithm and calculate the weighted shortest path distance between all node pairs; Step S4: Design the cost function; Based on the weighted shortest path distance matrix, design a function to reflect transaction costs; Step S5: Calculate similarity scores; using the modified hidden metric space model, based on the cost function and weighted shortest path distance, calculate the similarity scores between nodes. The similarity scores represent the predicted transaction probabilities. Step S6: Result evaluation; Iteratively optimize the model and test it on a blockchain network dataset until the target is achieved; Step S7: Chain prediction; Chain prediction is performed based on the similarity matrix to identify potential transaction relationships and possible future transaction behaviors.

2. The novel weighted directed link prediction method for complex blockchain transaction networks according to claim 1, characterized in that, Step S5 is as follows: Step S5.1: Construction of the hidden metric space model; Based on the optimized directed acyclic graph, each node is embedded into a hidden metric space to generate a hidden vector representation for each node; Step S5.2: Calculate the feature vector of each node in the hidden metric space using transaction data and a weighted directed acyclic graph. Step S5.3: Calculate the similarity between nodes; use the feature vectors in the hidden metric space to calculate the similarity between nodes; Step S5.4: Generate a similarity matrix; summarize the similarity calculation results between all nodes to generate a similarity matrix. Each element of the matrix represents the similarity between the corresponding nodes, and the matrix is ​​stored in a data structure for subsequent chain prediction.

3. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 2, characterized in that, The shortest path algorithm is specifically a modified version of the Floyd-Warshall algorithm; step 3 is as follows: First, initialize a distance matrix dist, setting the distance between all node pairs to infinity; then, traverse all edges in the weighted directed acyclic graph transaction model and assign the edge weights to the corresponding distance matrix elements. Using a triple loop, for each intermediate node k, update the shortest distance from node i to node j. If the path through node k is shorter, update the distance matrix. Finally, return the updated distance matrix dist.

4. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 3, characterized in that, The topology sorting algorithm is specifically the Tarjan algorithm; in particular, it identifies strongly connected components in a directed acyclic graph through depth-first search, and for each strongly connected component, removes the edge with the highest weight until all cycles of the strongly connected components are broken, and the network becomes an acyclic graph.

5. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 4, characterized in that, In step S5.1, the feature vector of each node is first randomly initialized in the high-dimensional space. The feature vector is randomly initialized using a normal distribution or a uniform distribution. Then, the hidden metric space model is optimized using the transaction history and similarity measure of the node.

6. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 5, characterized in that, In step S5.2, the feature vector is calculated based on the transaction relationship and transaction frequency between nodes, and machine learning algorithms are used for training and optimization.

7. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 6, characterized in that, The similarity between the nodes is calculated using cosine similarity, Euclidean distance, or other similarity metrics.

8. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 7, characterized in that, The chain prediction specifically involves: using a similarity matrix to predict future transaction behavior, employing threshold-based filtering or recommendation system algorithms, comparing the prediction results with actual transaction data, and verifying and evaluating the effectiveness of the prediction model.

9. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 8, characterized in that, Step 1 is described in detail as follows: Step S1.1: Collect blockchain transaction data; collect transaction data on the blockchain platform, including information such as transaction participants, transaction amount, and transaction time; specifically, use the API interface provided by the blockchain node to obtain transaction data and store the data in a database or in-memory data structure; Step S1.2: Data preprocessing, cleaning and organizing the data, removing invalid or redundant data; Step S1.3: Construct an initial directed weighted graph; construct a weighted directed acyclic graph using transaction data, where nodes represent transaction participants and edges represent transaction behaviors, with the weight of each edge determined by the transaction amount and frequency; specifically, traverse the transaction data to create a graph data structure, where each node represents a transaction participant; create an edge for each transaction behavior and calculate the weight based on the transaction amount and frequency.

10. A novel weighted directed link prediction method for complex blockchain transaction networks according to claim 9, characterized in that, The cost function is used to measure the difference between the predicted similarity values ​​between nodes and the actual transaction relationships.