NFTRRugPull fraud detection method and system, medium and equipment
Through multimodal data fusion, the text, pictures and transaction characteristics of NFT are extracted to identify potential fraud, which solves the limitations of NFT fraud detection methods in the prior art in terms of comprehensiveness and accuracy, and achieves more efficient fraud Detection effect.
Patent Information
- Application Number
- CN202510037870.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing NFT fraud detection methods mainly rely on transaction data and ignore the multimedia characteristics of NFT, resulting in limitations in the comprehensiveness and accuracy of the fraud identification model.
Using multimodal data fusion method, NFT text, pictures and transaction data are crawled, text features are extracted through BERT, VGG and Transformer combine to extract image features, and a transaction network diagram is constructed for feature extraction, and finally multiple features are spliced and aggregated. to identify potential fraud.
By combining the multimodal data of NFT, the characteristic information of NFT is fully captured, and the accuracy and reliability of fraud detection are improved, hidden fraud behavior can be identified, false and fraudulent NFTs can be reduced, and users' trust in the NFT market can be enhanced. Spend.
Smart Images

Figure CN119444259A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain and computer science and technology, and in particular to a NFTRugPull fraud detection method, system, medium and device based on multimodal fusion. Background Art
[0002] Currently, with the continued prosperity of non-fungible tokens (NFT) in the digital art, game and collectibles markets, NFT fraud has become increasingly prominent and has become one of the main obstacles to the healthy development of the market. The uniqueness of NFTs and the anonymity of transactions provide opportunities for fraudsters, making NFT fraud detection an important task to maintain market integrity and protect the interests of investors. NFT fraud detection has gradually become a topic of concern for researchers.
[0003] Most traditional NFT fraud detection methods only use transaction data, while ignoring the inherent multimedia characteristics of NFTs - that is, the non-transactional data such as text and images they carry. These non-transactional data often contain rich information that can reveal the authenticity, creative value and market potential of NFT projects. They are also the focus of fraudsters who may forge or tamper with them. For example, the description text of NFT works may be exaggerated and mislead investors; pictures may be tampered with to impersonate rare or high-value works. However, current research methods rarely include this type of data in the analysis scope, resulting in limitations in the comprehensiveness and accuracy of fraud detection models. Summary of the invention
[0004] In response to the above problems, the purpose of the present invention is to provide a NFT Rug Pull fraud detection method, system, medium and equipment, to perform NFT Rug Pull fraud detection based on multimodal data fusion, to analyze the multimodal data of NFT, to mine the NFT project characteristics contained in the data, and then to reasonably predict the NFT Rug Pull fraud risk.
[0005] To achieve the above-mentioned objectives, in the first aspect, the technical solution adopted by the present invention is: a NFT RugPull fraud detection method, which includes: crawling the text, pictures and transaction data of NFT as a basic data set; using BERT to extract the text features of NFT, and using VGG and Transformer to extract the picture features; using NFT transaction data, taking the account as the node, and the flow of transaction funds as the directed edge to construct a transaction network graph, and using the breadth-first search algorithm to start from each node in the transaction network graph, sampling the subgraph with a maximum distance of a certain value, using DeepWalk to perform a random walk starting from a certain node, randomly traversing the entire transaction graph, and using the Skip-Gram model to generate an embedding for each node, obtaining the feature vector of the entire transaction network, and completing the transaction feature extraction; splicing and aggregating the extracted text features, picture features and transaction features into an overall feature, and inputting the overall feature and the label into the classification model for classification to identify potential fraud.
[0006] Furthermore, BERT is used to extract text features of NFT, including: Perform word segmentation on the input text sequence and split it into a series of subword units; Each sub-word unit is embedded in word, segment and position in turn, and the three embeddings are added together to obtain a vector containing the semantic, segment and position information of the sub-word unit as the text feature of NFT.
[0007] Furthermore, we use VGG and Transformer to extract image features, including: Use VGG to extract basic image features of NFT image data; Input the basic feature set of each image into the Transformer model, and use Transformer to extract the set features to obtain the features that represent the connections and differences between the images of each NFT; The basic image features extracted by VGG and the set features extracted by Transformer are aggregated to obtain an image feature that can reflect both the characteristics of the image itself and the connection and difference between images.
[0008] Furthermore, VGG is used to extract the basic image features of NFT image data, including: Load the pre-trained VGG16 model and remove the last fully connected layer to obtain the feature representation of the image; Define the function calculate_dataset_stats to calculate the mean and standard deviation of the data set; Use torchvision.transforms library to preprocess the image, resize the image to the set size, perform center cropping to further reduce the image size, convert the image into a tensor and normalize it; By traversing the image files in each folder in the dataset, reading and preprocessing them one by one, the preprocessed images are forward propagated through the vgg_features model to extract the feature vector of the image, which is stored in JSON format.
[0009] Furthermore, multiple basic image features of an NFT series are input as a set into Transformer for set feature extraction, including: Embed the feature vector of each image to meet the requirements of the Transformer model; Through the self-attention mechanism, the Transformer model can focus on the importance of image features and achieve dynamic weight allocation of features; By averaging all input features, a global collective feature vector is generated to represent the overall information of the input image.
[0010] Further, DeepWalk is used to perform a random walk starting from a certain node, including: Starting from a node in the graph, multiple random walks are performed, each of which generates a node sequence of fixed length; During the walking process, each time a neighbor node of the current node is selected as the next node to be visited, the probability of selection is related to the characteristics of the edge to ensure that nodes with high importance are more likely to be visited during the walking process.
[0011] Furthermore, the classification model uses logistic regression, support vector machine, random forest and K nearest neighbor, and the model training is: The data is divided into training and test sets, where the training set is further divided into labels and features. The labels are used to indicate the category to which the sample belongs, and the features contain relevant information for classification. Take text features, image features, and transaction features as input to enhance model performance. Use cross-validation for model training and hyperparameter tuning. Divide the training set data into multiple subsets, select one of the subsets as the validation set each time, and use the remaining subsets to train the model. Through iterative training and validation of multiple subsets, optimize the model to avoid overfitting and evaluate its generalization ability. Select the best performing models for NFT fraud detection to ensure high accuracy and reliability, and provide security for the NFT market.
[0012] In the second aspect, the technical solution adopted by the present invention is: a NFT RugPull fraud detection system, which includes: a data acquisition module, which crawls the text, pictures and transaction data of NFT as a basic data set; an internal feature extraction module, which uses BERT to extract the text features of NFT, and uses VGG and Transformer to extract image features; an external feature extraction module, which uses NFT transaction data, takes accounts as nodes, and the flow of transaction funds as directed edges to construct a transaction network graph, and uses a breadth-first search algorithm to start from each node in the transaction network graph, samples a subgraph with a maximum distance of a certain value, and uses DeepWalk to perform random walks starting from a certain node, randomly traverse the entire transaction graph, and generates embedding for each node with the Skip-Gram model to obtain a feature vector for the entire transaction network, and completes the transaction feature extraction; a fraud detection module, which splices and aggregates the extracted text features, picture features and transaction features into an overall feature, and the overall feature and label are input into a classification model for classification to identify potential fraud.
[0013] In a third aspect, the technical solution adopted by the present invention is: a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the above methods.
[0014] In a fourth aspect, the technical solution adopted by the present invention is: a computing device, comprising: one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.
[0015] The present invention adopts the above technical solution, which has the following advantages: 1. By combining the text, pictures and transaction data of NFT, the present invention can comprehensively capture the characteristic information of all aspects of NFT, effectively make up for the limitations of a single data modality in detection, thereby improving the accuracy and reliability of fraud detection.
[0016] 2. The present invention uses advanced BERT, VGG and Transformer models to perform deep feature extraction on text and image data, and combines key indicators in transaction data, especially using the Transformer model to extract the connections and differences between images, so that the present invention performs well in the accuracy and richness of feature extraction and can identify hidden fraudulent behaviors.
[0017] 3. Through efficient fraud detection, the present invention can reduce the spread of false and fraudulent NFTs, enhance users' trust in the NFT market, and thus promote the healthy development of the market. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is an overall flow chart of the NFTRugPull fraud detection method based on multimodal fusion in an embodiment of the present invention; Figure 2 It is a detailed flow chart of the NFTRugPull fraud detection method based on multimodal fusion in an embodiment of the present invention; Figure 3 It is a schematic diagram of the BERT model input structure in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to solve the limitations of the fraud identification model in the prior art in terms of comprehensiveness and accuracy, the present invention provides a NFT Rug Pull fraud detection method, system, medium and device, which provides a prediction of whether there is Rug Pull fraud in NFT projects by analyzing NFT text, pictures and historical transaction data. By deeply mining the pictures, text features and transaction patterns of NFT projects, it is possible to identify potential risk factors by building specific models, thereby enhancing the detection and protection of the NFT market.
[0020] The present invention integrates the characteristics of the NFT project itself (including key information extracted from artwork images and text descriptions) with external features such as secondary market transactions to construct a comprehensive and accurate prediction model. The core is that since a single data source often cannot fully reflect the true status and risks of NFT projects, the comprehensive analysis of multi-source data can make up for this shortcoming. By combining the internal characteristics of the project with multiple information such as transaction dynamics in the external market and user feedback on social media, the present invention can capture potential fraud risks more comprehensively and accurately. This cross-domain, multi-dimensional data integration method not only improves the prediction accuracy of the model, but also provides a new perspective and ideas for risk identification and prevention in the NFT market.
[0021] Secondly, the present invention innovatively introduces image features, and deeply explores the important role of the image itself and the similarities and differences between images in identifying fraudulent behavior. As a digital artwork, the image features of NFT contain rich key information such as artistic quality, style characteristics and creative intent, which are crucial for accurately identifying fraudulent behavior. Therefore, the present invention adopts advanced image recognition technology to extract multi-level and multi-dimensional features from the image, and combines machine learning algorithms for feature fusion and model training. At the same time, the similarities and differences between images are innovatively considered, the potential information in the image features is further mined, and the recognition performance of the model is improved. It not only enriches the means and methods of NFT fraud identification, but also provides new ideas and technical support for the authenticity identification of digital artworks in the future.
[0022] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0023] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0024] In one embodiment of the present invention, a NFTRugPull fraud detection method is provided, which relates to the field of blockchain and computer science and technology, and specifically includes multimodal data processing, image processing, natural language processing (NLP), transaction network analysis and fraud detection technology. In this embodiment, Figure 1 , Figure 2 As shown, the method comprises the following steps: 1) Crawl NFT text, pictures and transaction data as the basic data set; 2) BERT is used to extract text features of NFT, and VGG and Transformer are combined to extract image features; 3) Using NFT transaction data, taking accounts as nodes and the flow of transaction funds as directed edges to construct a transaction network graph, and using a breadth-first search algorithm to start from each node in the transaction network graph, sampling a subgraph with a certain maximum distance, using DeepWalk to perform a random walk from a certain node, randomly traversing the entire transaction graph, and using the Skip-Gram model to generate embeddings for each node, obtaining the feature vector of the entire transaction network, and completing the transaction feature extraction; 4) The extracted text features, image features, and transaction features are concatenated and aggregated into an overall feature. The overall feature and label are input into the classification model for classification to identify potential fraudulent behavior.
[0025] In the above step 1), crawler technology is used to collect NFT-related data from multiple platforms in real time, and data cleaning technology is used to remove noise and redundant information to ensure the reliability and validity of the data; secondly, data from different sources and in different formats are uniformly formatted and stored in a distributed database for subsequent feature extraction and analysis.
[0026] Specifically, crawling NFT text, images, and transaction data as the basic data set includes the following steps: 1.1) Use the Comparitech platform to determine the specific time of the fraudulent NFT, the name of the NFT series, the amount of fraud involved, relevant web links, and text description information.
[0027] 1.2) Use the scrapy framework + selenium in Python to simulate browser access, crawl the pictures and transaction information of fraudulent NFTs according to the links, and use rule-based extraction methods to extract entities such as pictures, transaction parties, transaction time, and transaction amount.
[0028] 1.3) Crawl normal NFT information on Opensea, use the scrapy framework + selenium in python to simulate browser access, and crawl NFT text, pictures, and transaction information.
[0029] Download all confirmed NFT Rug Pull data so far on Comparitech, then crawl normal and fraudulent NFT information on Opensea, use the scrapy framework + selenium in python to simulate browser access, crawl NFT text, pictures, and transaction data. The text data is the descriptive data of the NFT, the picture data only needs to crawl the first 100 pictures, and the transaction data only needs to crawl the most recent first 1000 transactions.
[0030] In step 2) above, the BERT model is used to extract features from the text data of each NFT, and the high-dimensional text vector representation generated by BERT is used for subsequent NFT classification to improve classification accuracy and recognition accuracy.
[0031] like Figure 3 As shown in the figure, BERT is used to extract text features of NFT, including the following steps: 2.1.1) Segment the input text sequence into a series of subword units (also called tokens); 2.1.2) Each sub-word unit is embedded in word, segment and position in turn, and the three embeddings are added together to obtain a vector containing the semantic, segment and position information of the sub-word unit as the text feature of the NFT.
[0032] The word segmentation process relies on BERT's word segmenter, which can identify words, symbols, etc. in the text and convert them into units that the model can understand. For each sub-word unit (token) obtained by word segmentation, BERT converts it into a fixed-size vector representation, a process called word embedding.
[0033] (1) Word embedding. Word embedding can capture the semantic information of words, so that similar words have similar representations in the vector space. Since the Transformer model itself does not rely on the word order information in the text, BERT uses position embedding to encode the position of each token in the sequence.
[0034] (2) Segment embedding. If the input to BERT contains two sentences (for example, in a question-answering task, one sentence is the question and the other is the answer), BERT uses segment embedding to distinguish the two sentences. All tokens in each sentence are assigned a unique segment embedding vector to indicate the sentence they belong to.
[0035] (3) Position embedding. Since the Transformer model itself does not rely on word order information in the text, BERT uses position embedding to encode the position of each token in the sequence. Position embedding provides a unique vector representation for each position (i.e., each token) to ensure that the model can understand the importance of word order for understanding text.
[0036] In step 2), VGG16 is used to extract the basic features of the image. The core concept of this model is to increase the depth of the network by stacking small convolution kernels to capture more detailed features in the image. In the process of feature extraction, the PyTorch framework and related image processing tools are used.
[0037] Specifically, the image features are extracted by combining VGG and Transformer, including the following steps: 2.2.1) Use VGG to extract basic image features of NFT image data; Specifically, the following steps are included: 2.2.1.1) Load the pre-trained VGG16 model and remove the last fully connected layer to obtain the feature representation of the image; By calling models.vgg16(pretrained=True), you can directly get the model parameters trained on the ImageNet dataset. Then, set the model to evaluation mode to ensure that backpropagation and parameter updates are not performed during feature extraction, thereby improving efficiency.
[0038] 2.2.1.2) Define the function calculate_dataset_stats to calculate the mean and standard deviation of the data set; Since the VGG16 model has specific requirements for the distribution of input data, this process is crucial for image preprocessing. By traversing all images in the dataset, calculating the mean and standard deviation of each image, and finally obtaining the mean and standard deviation of the entire dataset, it is used for subsequent image normalization processing.
[0039] 2.2.1.3) Use torchvision.transforms library to preprocess the image, resize the image to the set size, perform center cropping to further reduce the image size, convert the image into a tensor and normalize it; For example, the image is first resized to 256x256, then the center is cropped to get a size of 224x224, and finally the image is converted to a tensor and normalized. These steps ensure that the image input to the VGG16 model meets its input requirements, thereby effectively extracting features.
[0040] 2.2.1.4) By traversing the image files in each folder in the dataset, read and preprocess them one by one, the preprocessed images are forward propagated through the vgg_features model to extract the feature vector of the image. The feature vector is stored in JSON format, including the collection name to which the image belongs, the image file name, and the extracted feature value. This structured data format is convenient for subsequent analysis and use.
[0041] 2.2.2) Input the basic feature set of each image into the Transformer model, and use the Transformer to extract the set features to obtain the features that represent the connections and differences between the images of each NFT; The Transformer model can capture the dependencies between different regions in the image through the self-attention mechanism, thereby extracting richer feature representations. This global feature extraction method enables the model to more accurately identify the target object and understand its relationship with other objects when processing images of complex scenes and variable postures. Therefore, after using VGG to extract the features of the image, the present invention inputs multiple image features of an NFT series as a set into the Transformer for set feature extraction.
[0042] The Transformer model consists of multiple Transformer encoder layers, which use the self-attention mechanism to capture the complex relationship between image features. The output of each layer is processed by a feed-forward neural network and optimized by layer normalization. Finally, a fully connected layer is used to compress the output feature dimension to the set target dimension.
[0043] Specifically, the input shape of the Transformer model is designed to be (sequence_length, batch_size, feature_dim) to facilitate self-attention calculation. For each image feature, it is converted into a format suitable for processing by the Transformer model by increasing the dimension, ensuring that each feature vector can be associated and learned in the global context.
[0044] In the feature extraction stage, for the feature vector of each image, the Transformer model generates a summarized feature representation by processing and encoding this information.
[0045] In this embodiment, the basic feature set of each image is input into the Transformer model, and the Transformer is used to extract the set features to obtain the features representing the connection and difference between the images of each NFT, including the following steps: 2.2.2.1) Feature input: embed the feature vector of each image to meet the requirements of the Transformer model; 2.2.2.2) Self-attention calculation: Through the self-attention mechanism, the Transformer model can focus on the importance of image features and realize dynamic weight allocation of features; 2.2.2.3) Global feature extraction: By averaging all input features, a global collective feature vector is generated to represent the overall information of the input image.
[0046] 2.2.3) Aggregate the basic image features extracted by VGG with the set features extracted by Transformer to obtain an image feature that can reflect both the characteristics of the image itself and the connection and difference between images.
[0047] In the above step 3), the transaction characteristics of NFTs show their importance in the secondary market. Traditional feature extraction methods often rely on simple statistical analysis, which makes it difficult to deeply explore the potential information in transaction data. The present invention proposes to regard accounts as nodes and the flow of transaction funds as directed edges to construct a transaction network graph. By introducing subgraph sampling and graph embedding algorithms, it aims to improve the processing efficiency of large-scale transaction data and capture its complex structural characteristics.
[0048] (1) Directed graph construction: In order to extract transaction features, it is first necessary to construct a directed graph representing NFT transaction activities. Each node in the graph represents a user account, and the directed edges represent the flow of transaction funds. Due to the huge amount of original transaction data, processing efficiency and memory usage have become major challenges. To this end, the present invention adopts a subgraph sampling method to extract representative subgraphs from the large graph to effectively capture local structural information.
[0049] (2) Breadth-first search (BFS) algorithm: In the subgraph sampling process, the invention uses the breadth-first search (BFS) algorithm to sample subgraphs with a maximum distance of a set value starting from each node. The subgraph generated by this process contains the local structural information around the node, allowing the model to capture the local characteristics of the graph more accurately.
[0050] (3) Skip-Gram model: Finally, the present invention uses the Skip-Gram model to convert the generated paths into node embeddings to form a feature representation of the transaction network. During the training process, the Skip-Gram model uses a neural network to learn the embedding of nodes. For each central node, the model calculates its similarity with all context nodes and updates the node's embedding vector by maximizing these similarities. Specifically, for each central node , the goal of the model is to maximize the conditional probability: .
[0051] After the node embeddings are generated, they are further aggregated to obtain the feature representation of the entire graph. The aggregation method can be selected according to the needs, such as using mean, summation or maximum strategies. The aggregated graph embedding provides a global perspective of the entire transaction network, which can better support subsequent analysis and decision-making.
[0052] In this embodiment, in order to effectively extract features in the graph, the present invention introduces the DeepWalk graph embedding algorithm. The algorithm traverses the entire transaction graph through random walks to generate embedded representations of nodes. The random walk process ensures the effective learning of nodes in the graph, so that the generated feature vector can well represent the overall information of the transaction network. Therefore, DeepWalk is used to perform random walks starting from a certain node. The DeepWalk graph embedding algorithm includes the following steps: 3.1) Starting from a node in the graph, perform multiple random walks, each of which generates a node sequence of fixed length; 3.2) During the walking process, each time a neighbor node of the current node is selected as the next node to be visited, the probability of selection is related to the characteristics of the edge (such as transaction amount, etc.) to ensure that nodes with high importance are more likely to be visited during the walking process.
[0053] In step 4) above, the classification model uses logistic regression, support vector machine (SVM), random forest and K nearest neighbor (KNN) to achieve efficient classification tasks. Model training includes the following steps: 4.1) The data is divided into training set and test set, where the training set is further divided into labels and features. The labels are used to indicate the category to which the samples belong, and the features contain relevant information for classification. During the data preparation phase, the training set and test set data will be read in the preset ratio.
[0054] 4.2) The extracted multimodal features are input into the classification model as input data, that is, text features, image features and transaction features are used as input to enhance the model performance. Cross-validation is used for model training and hyperparameter tuning. The training set data is divided into multiple subsets, and one of the subsets is selected as the validation set each time. The remaining subsets are used to train the model. Through iterative training and validation of multiple subsets, the model is optimized to avoid overfitting and its generalization ability is evaluated; Among them, multimodal features include text features, image features and transaction features. These features may come from different data sources, such as transaction records, user behavior data and image features, ensuring that the model can make full use of diverse information to improve classification performance.
[0055] The cross-validation method is used to train the model and tune the hyperparameters. Specifically, the training set data is divided into multiple subsets, one of which is selected as the validation set each time, and the remaining subsets are used to train the model. This method can not only effectively prevent overfitting, but also better evaluate the generalization ability of the model. During the cross-validation process, the model's hyperparameters are continuously adjusted to find the best parameter combination, thereby improving the performance of the model.
[0056] 4.3) Select the best performing model for NFT fraud detection to ensure high accuracy and reliability in practical applications, effectively identify potential fraudulent behaviors, and provide security for the NFT market.
[0057] In summary, the present invention extracts key features related to NFT fraud detection from the collected data. Taking into account the multimodal characteristics of the data, the internal features (such as text, image features, etc.) and external features (such as transaction features, etc.) of the data are comprehensively extracted. For text description data, Bert is used for feature extraction. For the extraction of image features, a combination of VGG and Transformer is used to pay attention to the differences between images while paying attention to the characteristics of the image itself. For transaction data, on the basis of constructing a transaction network, a DeepWalk graph embedding algorithm that uses random walks to traverse the graph is used to extract features.
[0058] The present invention effectively fuses and aggregates features extracted from different data sources and different modalities. By classifying the aggregated features, the prediction and detection of NFT fraud can be achieved. A variety of machine learning algorithms, including decision trees, random forests, and deep learning models, are used to improve the accuracy and robustness of classification.
[0059] In one embodiment of the present invention, a NFTRugPull fraud detection system is provided, which includes: The data acquisition module crawls the text, pictures and transaction data of NFT as the basic data set; The internal feature extraction module uses BERT to extract text features of NFT, and combines VGG with Transformer to extract image features; The external feature extraction module uses NFT transaction data, accounts as nodes, and the flow of transaction funds as directed edges to construct a transaction network graph. It uses a breadth-first search algorithm to start from each node in the transaction network graph, sample subgraphs with a certain maximum distance, and use DeepWalk to perform random walks starting from a certain node, randomly traverse the entire transaction graph, and use the Skip-Gram model to generate embeddings for each node to obtain the feature vector of the entire transaction network, completing the transaction feature extraction; The fraud detection module aggregates the extracted text features, image features, and transaction features into an overall feature. The overall feature and label are input into the classification model for classification to identify potential fraudulent behavior.
[0060] In the above embodiment, BERT is used to extract text features of NFT, including: Perform word segmentation on the input text sequence and split it into a series of subword units; Each sub-word unit is embedded in word, segment and position in turn, and the three embeddings are added together to obtain a vector containing the semantic, segment and position information of the sub-word unit as the text feature of NFT.
[0061] In the above embodiment, the image features are extracted by combining VGG and Transformer, including: Use VGG to extract basic image features of NFT image data; Input the basic feature set of each image into the Transformer model, and use Transformer to extract the set features to obtain the features that represent the connections and differences between the images of each NFT; The basic image features extracted by VGG and the set features extracted by Transformer are aggregated to obtain an image feature that can reflect both the characteristics of the image itself and the connection and difference between images.
[0062] In this embodiment, VGG is used to extract basic image features of NFT image data, including: Load the pre-trained VGG16 model and remove the last fully connected layer to obtain the feature representation of the image; Define the function calculate_dataset_stats to calculate the mean and standard deviation of the data set; Use torchvision.transforms library to preprocess the image, resize the image to the set size, perform center cropping to further reduce the image size, convert the image into a tensor and normalize it; By traversing the image files in each folder in the dataset, reading and preprocessing them one by one, the preprocessed images are forward propagated through the vgg_features model to extract the feature vector of the image, which is stored in JSON format.
[0063] In this embodiment, multiple basic image features of an NFT series are input as a set into the Transformer for set feature extraction, including: Embed the feature vector of each image to meet the requirements of the Transformer model; Through the self-attention mechanism, the Transformer model can focus on the importance of image features and achieve dynamic weight allocation of features; By averaging all input features, a global collective feature vector is generated to represent the overall information of the input image.
[0064] In the above embodiment, DeepWalk is used to perform a random walk starting from a certain node, including: Starting from a node in the graph, multiple random walks are performed, each of which generates a node sequence of fixed length; During the walking process, each time a neighbor node of the current node is selected as the next node to be visited, the probability of selection is related to the characteristics of the edge to ensure that nodes with high importance are more likely to be visited during the walking process.
[0065] In the above embodiment, the classification model uses logistic regression, support vector machine, random forest and K nearest neighbor, and the model training is: The data is divided into training and test sets, where the training set is further divided into labels and features. The labels are used to indicate the category to which the sample belongs, and the features contain relevant information for classification. Take text features, image features, and transaction features as input to enhance model performance. Use cross-validation for model training and hyperparameter tuning. Divide the training set data into multiple subsets, select one of the subsets as the validation set each time, and use the remaining subsets to train the model. Through iterative training and validation of multiple subsets, optimize the model to avoid overfitting and evaluate its generalization ability. Select the best performing models for NFT fraud detection to ensure high accuracy and reliability, and provide security for the NFT market.
[0066] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0067] A computing device provided in one embodiment of the present invention may be a terminal, which may include: a processor, a communications interface, a memory, a display screen, and an input device. The processor, the communications interface, and the memory communicate with each other through a communication bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory, wherein the non-volatile storage medium stores an operating system and a computer program, and the computer program is executed by the processor to implement the methods in the above embodiments; the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a management network, NFC (near field communication) or other technologies. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computing device, or an external keyboard, touchpad or mouse, etc. The processor may call the logic instructions in the memory.
[0068] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0069] In one embodiment of the present invention, a computer program product is provided, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.
[0070] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores server instructions, and the computer instructions enable a computer to execute the methods provided in the above embodiments.
[0071] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0072] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A NFTRugPull fraud detection method, characterized in that: include: Crawl NFT text, images, and transaction data as the basic data set; BERT is used to extract text features of NFT, and VGG and Transformer are combined to extract image features; Using NFT transaction data, taking accounts as nodes and the flow of transaction funds as directed edges to construct a transaction network graph, and using a breadth-first search algorithm to start from each node in the transaction network graph, sampling a subgraph with a certain maximum distance, using DeepWalk to perform a random walk from a certain node, randomly traversing the entire transaction graph, and using the Skip-Gram model to generate embeddings for each node, obtaining the feature vector of the entire transaction network, and completing the transaction feature extraction; The extracted text features, image features, and transaction features are concatenated and aggregated into an overall feature, and the overall feature and label are input into the classification model for classification to identify potential fraudulent behavior.
2. The NFTRugPull fraud detection method according to claim 1, characterized in that: BERT is used to extract text features of NFT, including: Perform word segmentation on the input text sequence and split it into a series of subword units; Each sub-word unit is embedded in word, segment and position respectively, and the three embeddings are added together to obtain a vector containing the semantic, segment and position information of the sub-word unit as the text feature of NFT.
3. The NFTRugPull fraud detection method according to claim 1, characterized in that: The image features are extracted by combining VGG and Transformer, including: Use VGG to extract basic image features of NFT image data; Input the basic feature set of each image into the Transformer model, and use Transformer to extract the set features to obtain the features that represent the connections and differences between the images of each NFT; The basic image features extracted by VGG and the set features extracted by Transformer are aggregated to obtain an image feature that can reflect both the characteristics of the image itself and the connection and difference between images.
4. The NFTRugPull fraud detection method as claimed in claim 3, characterized in that: VGG is used to extract the basic image features of NFT image data, including: Load the pre-trained VGG16 model and remove the last fully connected layer to obtain the feature representation of the image; Define the function calculate_dataset_stats to calculate the mean and standard deviation of the data set; Use torchvision.transforms library to preprocess the image, resize the image to the set size, perform center cropping to further reduce the image size, convert the image into a tensor and normalize it; By traversing the image files in each folder in the dataset, reading and preprocessing them one by one, the preprocessed images are forward propagated through the vgg_features model to extract the feature vector of the image, which is stored in JSON format.
5. The NFTRugPull fraud detection method as claimed in claim 3, characterized in that: Multiple basic image features of an NFT series are input as a set into Transformer for set feature extraction, including: Embed the feature vector of each image to meet the requirements of the Transformer model; Through the self-attention mechanism, the Transformer model can focus on the importance of image features and achieve dynamic weight allocation of features; By averaging all input features, a global collective feature vector is generated to represent the overall information of the input image.
6. The NFTRugPull fraud detection method according to claim 1, characterized in that: Use DeepWalk to perform a random walk starting from a certain node, including: Starting from a node in the graph, multiple random walks are performed, each of which generates a node sequence of fixed length; During the walking process, each time a neighbor node of the current node is selected as the next node to be visited, the probability of selection is related to the characteristics of the edge to ensure that nodes with high importance are more likely to be visited during the walking process.
7. The NFTRugPull fraud detection method according to claim 1, characterized in that: The classification model uses logistic regression, support vector machine, random forest and K nearest neighbor, and the model training is: The data is divided into training and test sets, where the training set is further divided into labels and features. The labels are used to indicate the category to which the sample belongs, and the features contain relevant information for classification. Take text features, image features, and transaction features as input to enhance model performance. Use cross-validation for model training and hyperparameter tuning. Divide the training set data into multiple subsets, select one of the subsets as the validation set each time, and use the remaining subsets to train the model. Through iterative training and validation of multiple subsets, optimize the model to avoid overfitting and evaluate its generalization ability. Select the best performing models for NFT fraud detection to ensure high accuracy and reliability, and provide security for the NFT market.
8. A NFTRugPull fraud detection system, characterized in that: include: The data acquisition module crawls the text, pictures and transaction data of NFT as the basic data set; The internal feature extraction module uses BERT to extract text features of NFT, and combines VGG with Transformer to extract image features; The external feature extraction module uses NFT transaction data, accounts as nodes, and the flow of transaction funds as directed edges to construct a transaction network graph. It uses a breadth-first search algorithm to start from each node in the transaction network graph, sample subgraphs with a certain maximum distance, and use DeepWalk to perform random walks starting from a certain node, randomly traverse the entire transaction graph, and use the Skip-Gram model to generate embeddings for each node to obtain the feature vector of the entire transaction network, completing the transaction feature extraction; The fraud detection module aggregates the extracted text features, image features, and transaction features into an overall feature. The overall feature and label are input into the classification model for classification to identify potential fraudulent behavior.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7.
10. A computing device, characterized in that include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods described in claims 1 to 7.
Citation Information
Patent Citations
Fraud website identification method and device based on multi-modal fusion
CN116722992A
Pheromone-based graph embedded Ethereum phishing fraud node detection method and system
CN117997610A
False news detection system and method based on multi-modal fusion
CN119226887A
Ethereum money laundering detection method based on graph embedding
CN119228535A
Excluding fraudulent transactions in transaction based authentication
WO2023163857A1