IP Library Granted Patent US 12665776
Granted Patent B2
US 12665776 · App. 18/276,865 · Granted Jun 23, 2026

Method and apparatus for classifying blockchain address

Inventors: Changchun Mu (Beijing, CN); Gang Di (Beijing, CN); Sude Qing (Beijing, CN); Yanhui Wang (Beijing, CN); Junwei Zeng (Beijing, CN); Hao Wu (Beijing, CN)
Assignee: DIGITAL CURRENCY INSTITUTE, THE PEOPLE'S BANK OF CHINA
H04L9/50G06F16/35G06F18/20G06Q2220/00H04L2209/56
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12665776
App. No.
18/276,865
Granted
Jun 23, 2026
Kind
B2
Abstract

The present disclosure relates to the technical field of computers, in particular to a method and apparatus for classifying a blockchain address. The method includes: transaction vectors are generated for transaction records corresponding to each blockchain address in a blockchain address set; a corresponding address vector is generated based on the transaction vectors corresponding to a blockchain address to be classified; and the address vector of the blockchain address to be classified is input into a classifier, so as to determine a class of the blockchain address to be classified. By means of the method, equal-length vectors representing the blockchain addresses can be obtained for classification by the classifier, transaction behaviors and association relationships of participating entities in a blockchain are effectively expressed.

Claims (69)

1 . A method for classifying a blockchain address, comprising:

extracting transaction records corresponding to each blockchain address in a blockchain address set, and generating a corresponding transaction vector for each transaction record of the transaction records, the blockchain address set comprising a blockchain address to be classified;

generating, based on transaction vectors corresponding to the blockchain address to be classified, an address vector corresponding to the blockchain address to be classified; and

inputting the address vector of the blockchain address to be classified into a classifier to obtain a class of the blockchain address to be classified;

wherein extracting transaction records corresponding to each blockchain address in the blockchain address set, and generating the corresponding transaction vector for each transaction record of the transaction records comprises:

extracting the transaction records corresponding to each blockchain address in the blockchain address set, and numbering the extracted transaction records sequentially based on transaction generation time, each transaction record having a unique transaction number;

treating a set as one corpus, wherein the set is a set of the transaction records corresponding to each blockchain address in the blockchain address set;

sequencing transaction numbers based on frequency of occurrence of the transaction numbers in all corpora to obtain a transaction number word list; and

vectorizing the transaction numbers in the transaction number word list to obtain the transaction vector of a corresponding transaction record, wherein the transaction vector is a word vector of a corresponding transaction number.

2 . The method as claimed in claim 1 , wherein vectorizing the transaction numbers in the transaction number word list to obtain the transaction vector of the corresponding transaction record comprises:

encoding the transaction numbers in the transaction number word list to obtain a sparse matrix comprising transaction number encoded vectors, a component of 1 in the transaction number encoded vectors indicating a position of a corresponding transaction number in the transaction number word list; and

generating, by means of a preset word vector generation algorithm, the transaction vector of the corresponding transaction record based on the sparse matrix.

3 . The method as claimed in claim 2 , wherein the blockchain address set further comprises blockchain addresses with tags, the tags indicating corresponding classes of the blockchain addresses; and

generating, by means of the preset word vector generation algorithm, the transaction vector of the corresponding transaction record based on the sparse matrix comprises:

inputting the sparse matrix into a Continuous Bag of Words (CBOW) model of the preset word vector generation algorithm for training to output a word vector as the transaction vector of the corresponding transaction record.

4 . The method as claimed in claim 1 , wherein generating, based on the transaction vectors corresponding to the blockchain address to be classified, the address vector corresponding to the blockchain address to be classified comprises:

calculating an average value of all transaction vectors corresponding to the blockchain address to be classified to obtain the address vector corresponding to the blockchain address to be classified.

5 . The method as claimed in claim 1 , wherein the blockchain address set further comprises blockchain addresses with tags, the tags indicating corresponding classes of the blockchain addresses; and

the method further comprises:

generating, based on transaction vectors corresponding to the blockchain addresses with the tags, address vectors corresponding to the blockchain addresses with the tags respectively; and

training the classifier with the address vectors of the blockchain addresses with the tags.

6 . The method as claimed in claim 5 , wherein training the classifier with the address vectors of the blockchain addresses with the tags comprises:

constructing a training set with the address vectors of the blockchain addresses with the tags, and inputting the address vectors in the training set into an extreme Gradient Boosting algorithm model for training, so as to obtain the classifier.

7 . An electronic device, comprising:

one or more processors; and

a memory, configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement following actions:

extracting transaction records corresponding to each blockchain address in a blockchain address set, and generating a corresponding transaction vector for each transaction record of the transaction records, the blockchain address set comprising a blockchain address to be classified;

generating, based on transaction vectors corresponding to the blockchain address to be classified, an address vector corresponding to the blockchain address to be classified; and

inputting the address vector of the blockchain address to be classified into a classifier to obtain a class of the blockchain address to be classified;

wherein extracting transaction records corresponding to each blockchain address in the blockchain address set, and generating the corresponding transaction vector for each transaction record of the transaction records comprises:

extracting the transaction records corresponding to each blockchain address in the blockchain address set, and numbering the extracted transaction records sequentially based on transaction generation time, each transaction record having a unique transaction number;

treating a set as one corpus, wherein the set is a set of the transaction records corresponding to each blockchain address in the blockchain address set;

sequencing transaction numbers based on frequency of occurrence of the transaction numbers in all corpora to obtain a transaction number word list; and

vectorizing the transaction numbers in the transaction number word list to obtain the transaction vector of a corresponding transaction record, wherein the transaction vector is a word vector of a corresponding transaction number.

8 . The electronic device as claimed in claim 7 , wherein vectorizing the transaction numbers in the transaction number word list to obtain the transaction vector of the corresponding transaction record comprises:

encoding the transaction numbers in the transaction number word list to obtain a sparse matrix comprising transaction number encoded vectors, a component of 1 in the transaction number encoded vectors indicating a position of a corresponding transaction number in the transaction number word list; and

generating, by means of a preset word vector generation algorithm, the transaction vector of the corresponding transaction record based on the sparse matrix.

9 . The electronic device as claimed in claim 8 , wherein the blockchain address set further comprises blockchain addresses with tags, the tags indicating corresponding classes of the blockchain addresses; and

generating, by means of the preset word vector generation algorithm, the transaction vector of the corresponding transaction record based on the sparse matrix comprises:

inputting the sparse matrix into a Continuous Bag of Words (CBOW) model of the preset word vector generation algorithm for training, and outputting a word vector as the transaction vector of the corresponding transaction record.

10 . The electronic device as claimed in claim 7 , wherein generating, based on the transaction vectors corresponding to the blockchain address to be classified, the address vector corresponding to the blockchain address to be classified comprises:

calculating an average value of all transaction vectors corresponding to the blockchain address to be classified to obtain the address vector corresponding to the blockchain address to be classified.

11 . The electronic device as claimed in claim 7 , wherein the blockchain address set further comprises blockchain addresses with tags, the tags indicating corresponding classes of the blockchain addresses; and

the method further comprises:

generating, based on transaction vectors corresponding to the blockchain addresses with the tags, address vectors corresponding to the blockchain addresses with the tags respectively; and

training the classifier with the address vectors of the blockchain addresses with the tags.

12 . The electronic device as claimed in claim 11 , wherein training the classifier with the address vectors of the blockchain addresses with the tags comprises:

constructing a training set with the address vectors of the blockchain addresses with the tags, and inputting the address vectors in the training set into an extreme Gradient Boosting algorithm model for training, so as to obtain the classifier.

13 . A non-transitory computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements following actions:

extracting transaction records corresponding to each blockchain address in a blockchain address set, and generating a corresponding transaction vector for each transaction record of the transaction records, the blockchain address set comprising a blockchain address to be classified;

generating, based on transaction vectors corresponding to the blockchain address to be classified, an address vector corresponding to the blockchain address to be classified; and

inputting the address vector of the blockchain address to be classified into a classifier to obtain a class of the blockchain address to be classified;

wherein extracting transaction records corresponding to each blockchain address in the blockchain address set, and generating the corresponding transaction vector for each transaction record of the transaction records comprises:

extracting the transaction records corresponding to each blockchain address in the blockchain address set, and numbering the extracted transaction records sequentially based on transaction generation time, each transaction record having a unique transaction number;

treating a set as one corpus, wherein the set is a set of the transaction records corresponding to each blockchain address in the blockchain address set;

sequencing transaction numbers based on frequency of occurrence of the transaction numbers in all corpora to obtain a transaction number word list; and

vectorizing the transaction numbers in the transaction number word list to obtain the transaction vector of a corresponding transaction record, wherein the transaction vector is a word vector of a corresponding transaction number.

14 . The non-transitory computer-readable medium as claimed in claim 13 , wherein vectorizing the transaction numbers in the transaction number word list to obtain the transaction vector of the corresponding transaction record comprises:

encoding the transaction numbers in the transaction number word list to obtain a sparse matrix comprising transaction number encoded vectors, a component of 1 in the transaction number encoded vectors indicating a position of a corresponding transaction number in the transaction number word list; and

generating, by means of a preset word vector generation algorithm, the transaction vector of the corresponding transaction record based on the sparse matrix.

15 . The non-transitory computer-readable medium as claimed in claim 14 , wherein the blockchain address set further comprises blockchain addresses with tags, the tags indicating corresponding classes of the blockchain addresses; and

generating, by means of the preset word vector generation algorithm, the transaction vector of the corresponding transaction record based on the sparse matrix comprises:

inputting the sparse matrix into a Continuous Bag of Words (CBOW) model of the preset word vector generation algorithm for training, and outputting a word vector as the transaction vector of the corresponding transaction record.

16 . The non-transitory computer-readable medium as claimed in claim 13 , wherein generating, based on the transaction vectors corresponding to the blockchain address to be classified, the address vector corresponding to the blockchain address to be classified comprises:

calculating an average value of all transaction vectors corresponding to the blockchain address to be classified to obtain the address vector corresponding to the blockchain address to be classified.

17 . The non-transitory computer-readable medium as claimed in claim 13 , wherein the blockchain address set further comprises blockchain addresses with tags, the tags indicating corresponding classes of the blockchain addresses; and

the method further comprises:

generating, based on transaction vectors corresponding to the blockchain addresses with the tags, address vectors corresponding to the blockchain addresses with the tags respectively; and

training the classifier with the address vectors of the blockchain addresses with the tags.