A method and device for generating IPv6 addresses based on few-seed image coding

By constructing graph structures and encoding vectors, using BiLSTM and DBSCAN algorithms for feature extraction and clustering, and combining with graph convolutional networks to generate active IPv6 addresses, solving the problem of inefficient address generation in the existing technology in the few seed scenarios, and achieving effective learning and accurate detection of complex configuration rules.

CN119652822BActive Publication Date: 2025-08-29YUANHENG (JINAN) DIGITAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411779257.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-08-29
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

The existing active IPv6 address generation algorithm is difficult to accurately mine address configuration rules when there are few seed addresses, resulting in low detection efficiency. Especially in the case of few seed scenarios, the complex configuration rules related to sampling deviation and seed address are difficult to effectively learn.

Method used

Using a method based on the encoding of few-seed image, the graph structure and encoding vector are constructed, and the front and back interdependencies in the samples are captured using the BiLSTM model. The DBSCAN clustering algorithm and graph convolution network are combined to perform feature extraction and clustering, and active IPv6 addresses are generated, and alias prefix detection and active address detection are performed through distributed detection to optimize the address generation process.

Benefits of technology

The conversion rate of the conversion of a small number of active seeds under each BGP prefix into sufficient active seeds is significantly improved, the accuracy and efficiency of address generation is improved, the sampling deviation problem in the few seed scenarios is solved, and the effective learning of complex configuration rules is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652822B_ABST
    Figure CN119652822B_ABST
Patent Text Reader

Abstract

The present invention relates to an IPv6 address generation method and device based on few-seed image encoding, belonging to the field of network security technology. The method includes preprocessing, extracting a set of active IPv6 addresses in a few-seed area from the collected active IPv6 addresses, and constructing a graph structure and encoding vector for each of the sets; feature extraction; active address generation, image generation, address generation, and distributed detection, using distributed detection to perform alias prefix detection and active IPv6 address detection. The detection results are then sent to the image generation submodule for fine-tuning after the preprocessing and feature extraction process. After repeated multiple times, the conversion rate target is achieved. The present invention can effectively learn complex seed address configuration rules and solve the problem of low detection efficiency caused by sampling bias.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an IPv6 address generation method and device based on few-seed image coding, belonging to the technical field of network security. Background Art

[0002] The next-generation Internet Protocol (IPv6) is being rapidly promoted and deployed worldwide. While IPv6 effectively addresses the issue of IPv4 address exhaustion, the diverse allocation methods for IPv6 addresses and its vast address space present significant challenges for active address scanning. Brute-force scanning of the entire IPv6 address space is impractical. Active IPv6 addresses, as a crucial network resource, are fundamental to network management, asset assessment, situational awareness, and security research.

[0003] In order to understand the activity of the entire network space address, through ZMap, Masscan, Nmap and other modern fast scanning tools, the efficiency of scanning the entire Internet can be greatly improved. However, due to the large size of the IPv6 network address space (2^128), scanning the entire network space becomes impossible. In order to cope with the infeasibility of brute force scanning of the entire IPv6 address space, researchers have developed some efficient IPv6 generation algorithms. The existing active IPv6 address generation algorithms have performed well when there are sufficient seed addresses, but these algorithms do not perform well when there are fewer seed addresses. The main reasons are the sampling bias in the scenario with few seeds and the complex configuration rules associated with the seed addresses.

[0004] Existing active address generation algorithms are difficult to accurately mine address configuration rules, and related research shows that a large number of BGP prefixes have a phenomenon of few seeds. In order to solve the above problems, the present invention is proposed. Summary of the Invention

[0005] In response to the shortcomings of the existing technology, the present invention provides an IPv6 address generation method and device based on few-seed image coding. In the scenario of few seeds, it can effectively learn complex seed address configuration rules and solve the problem of low detection efficiency caused by sampling bias.

[0006] Explanation of terms:

[0007] ICMP live host discovery technology: The source host sends an ICMP message, timestamp, address mask and other response requests to the target host. If the target host responds, the target host is considered to be alive.

[0008] DHC technology based on half-byte entropy value: refers to the use of divisive hierarchical clustering (DHC) to construct a density space tree from top to bottom. The principle is to first convert the seed address into a high-dimensional vector, build the root node, and then split the node along the dimension with the smallest entropy value until the number of address vectors of the child node is less than a certain value.

[0009] DBSCAN clustering algorithm: refers to a density-based clustering algorithm that divides data points into core points, boundary points, and noise points. Core points are points whose number of points within a certain radius is greater than the minimum number of samples. Boundary points are points whose number of points within a certain radius is equal to or less than the minimum number of samples but is outside the neighborhood of the core points. Noise points are points that do not belong to the neighborhood of any core points.

[0010] The technical solutions of the present invention are as follows:

[0011] A method for generating an IPv6 address based on a few-seed image encoding, the steps are as follows:

[0012] (1) Preprocessing: Data collection: extracting the set of active IPv6 addresses in the few-seed area from the collected active IPv6 addresses, and constructing the graph structure and encoding vector for each set;

[0013] Constructing the graph structure is to perform a preliminary screening of the data structure information between samples, which serves as a prerequisite for further identifying potential similarities between data samples. Constructing the encoding vector is to convert the data samples into binary encoding of the image. The forward and reverse encodings are then concatenated to obtain an encoding vector that fully captures the dependencies between the previous and next steps.

[0014] (2) Feature extraction: First, the BiLSTM model is used to capture the interdependence between the front and back of the sample, and the internal structure of the image is fully represented by vectors. Then, the basic idea of ​​the SDCN algorithm is used to perform clustering. Another training goal is added to the original algorithm to improve the model. The training goal is to further train the representation vectors through the autoencoder. It has richer features, namely the structural information between N samples;

[0015] (3) Active address generation, including image generation, address generation and distributed detection, mainly combines computer vision methods to mine the complex configuration rules of addresses in a small number of seed areas to generate image data, that is, to represent the feature vector The label label corresponding to the vector is input into the image generation model to generate an image, and the image data is decoded to obtain candidate addresses. At the same time, a BGP prefix query is performed on the candidate addresses, and candidate addresses that meet the requirements of the few-seed area are retained. Alias ​​prefix detection and active IPv6 address detection are performed using distributed detection. The results of the detection are preprocessed and feature extracted before being sent to the image generation submodule for fine-tuning. After repeated multiple times, the conversion rate target is achieved.

[0016] According to the preferred embodiment of the present invention, in step (1), the specific steps of constructing the graph structure are:

[0017] (111) Using the DHC technology based on half-byte entropy value, the collected active IPv6 address set in the few-seed area is divided into address spaces to obtain an address space;

[0018] (112) Using a community algorithm to process the seed addresses in each address space into a graph structure;

[0019] First, calculate the distance d between all seeds j , form a distance list, sort the distance list, remove duplicate and overly long edges, and the threshold for overly long edges is 12;

[0020] Then, construct an undirected graph G i =(V i ,E j ), where V i represents the vertex, i.e. the seed; E j represents the edge, that is, the distance between seeds, which is initially edgeless, and If d j ≥12: The two vertices are considered unreachable;

[0021] Finally, traverse the sorted distance list and add edges to graph G in sequence i In the graph, the condition is to add the shortest edge and maximize the density of connected components (i.e., the accessibility between vertices). After the addition is completed, the graph G i It becomes a connected graph, namely the minimum spanning tree, where the density of the maximum connected component refers to the density value of the seed set under the maximized spatial region, that is, density = N / ε, ε is the number of free dimensions, and N refers to the number of seed addresses;

[0022] A free dimension refers to a group of seed addresses with the same index value. If the corresponding hexadecimal character values ​​are different, the index value is considered to be a free dimension. The number of index values ​​is the number of free dimensions, which means that the more free dimensions there are, the lower the density, and vice versa.

[0023] (113) Merge the graphs under each address space into one graph and output the adjacency matrix;

[0024] Construct an undirected graph G in the address space divided in step (111) i , all undirected graphs are merged in a loop to form an undirected graph G, and then the adjacency matrix h is output adj (Dimension is N×N).

[0025] According to the preferred embodiment of the present invention, in step (1), the specific steps of constructing the encoding vector are:

[0026] (121) Convert the set of active IPv6 addresses in the few-seed region into a binary encoding vector X of N × 8 × 16, where N is the number of samples;

[0027] The length of an IPv6 address is 128 bits, consisting of 8 groups of hexadecimal numbers. Adjacent groups are separated by colons, and each group contains 4 hexadecimal numbers. Therefore, each IPv6 address is regarded as an 8-dimensional vector, and each dimension is represented by 16 binary digits, forming an image encoding format.

[0028] (122) Reverse the binary code vector X according to 1 dimension and output the N×8×16 binary code vector X r ;

[0029] (123) Concatenate the two encoding vectors in 1 dimension and output an N×16×16 binary encoding vector Right now in, Depend on composition, Represented by 16 16-dimensional sequences, binary encoding vectors as input for the next step.

[0030] The encoding vector X and the encoding vector X r Stitching utilizes the idea of ​​image data enhancement. The original image is rotated 180° to obtain a new image. The original image and the new image are then superimposed to obtain a data-enhanced image. Feature learning of this image is then performed in subsequent modules to learn richer features.

[0031] According to the preferred embodiment of the present invention, in step (2), the specific steps are as follows:

[0032] (21) Constructing time series encoding vector:

[0033] Build a BiLSTM-based encoder model, set hyperparameters such as learning rate, training batch, and rounds, train the model, and save the model after training is complete;

[0034] Load the trained BiLSTM encoder model and extract the representation vector containing the time series relationship from the model

[0035] After loading the model, convert the N×16×16 binary encoding vector Input into the trained BiLSTM encoder model and extract the last layer of feedforward hidden vector h Last (dimension N×128) and the feed-back latent vector (dimension N×128), concatenate the feedforward latent vector and the feedback latent vector to obtain an N×256-dimensional latent vector, that is, an N×16×16 representation vector Since in the preprocessing stage, the vector It is concatenated from its positive-order binary vector and reverse-order binary vector. Therefore, the BiLSTM encoder can fully learn the time-series-based dependencies of the original binary encoding vector X, avoiding excessive generation of seed addresses that are not in the low-seed area in subsequent generation tasks.

[0036] The BiLSTM model refers to a bidirectional long short-term memory network, which is a recurrent neural network with hidden states in both forward and backward directions. It can capture the sentence structure and dependency relationships in the text and effectively model context and other information.

[0037] (22) Pre-trained Autoencoder

[0038] Will represent the vector As the input of the autoencoder, set hyperparameters such as learning rate, training batch, and round;

[0039] After completing the training round, save the model parameters of the autoencoder;

[0040] (23) Forming cluster center P distribution

[0041] Initialize the model and load the model parameters of the autoencoder;

[0042] Using the encoder of the DNN submodule, we first represent the vector Encode to obtain the feature representation vector C after multi-layer spatial dimension encoding;

[0043] For the feature representation vector C, cluster training is performed using the DBSCAN clustering algorithm. Since the IID based on the RFC 7707 document can be divided into embedded IPv4, embedded port, IEEE derived, low byte, pattern byte, and randomized, the number of clusters is dynamically adjusted during the DBSCAN algorithm training process, making the number of clusters 6. After training is completed, the distribution of cluster centers P is obtained;

[0044] DNN refers to a machine learning model containing multiple hidden layers, namely Deep Neural Network (DNN), which has strong nonlinear expression capabilities and the ability to learn complex data patterns. DNN consists of input layer, hidden layer and output layer. The hidden layer is the core part of DNN and can capture complex relationships and patterns in data through nonlinear transformation.

[0045] (24) In the GCN submodule, the feature representations of multiple spatial dimensions of different layers are used to learn the structural information separately from the adjacency matrix, and the structural information is introduced into the representation learning of the autoencoder to obtain the feature representation vector This improves clustering performance;

[0046] GCN refers to Graph Convolutional Network, a neural network model applied to graph data. It is mainly used for node classification, graph classification, edge prediction, and graph embedding representation. The core is to learn a function mapping so that the node can aggregate its own features and the features of its neighbors to generate a new node representation. It can be divided into spectral-based methods and spatial-based methods. The spectral-based method defines the graph convolution by the eigenvalues ​​and eigenvectors of the Laplacian matrix of the graph, converts the signal to the Fourier domain, then applies the filter, and finally performs an inverse Fourier transform to obtain a new signal representation. The spatial-based method is to perform neighborhood aggregation directly on the structure of the graph, and update the representation of the central node by aggregating the feature information of the central node and its adjacent nodes.

[0047] (25) In the DNN submodule, the decoder is used to perform decoding operations on the representation learning containing the structural information between samples, so that the representation vector In the process of , it contains the structural information representation between samples, that is, the feature representation vector is obtained

[0048] According to a preferred embodiment of the present invention, in step (23), the step of obtaining the feature representation vector C after multi-layer spatial dimension encoding is:

[0049] Utilize the encoder pair representation vector of the DNN submodule Encoding is performed, and a series of linear transformations are used to obtain the feature representation vectors H of multiple spatial dimensions at different layers. L ,Right now Among them, L represents the number of layers, d represents the dimension, represents the weight, Indicates bias, Represents a linear transformation function, and the feature representation vector C corresponds to the last layer H L .

[0050] According to the preferred embodiment of the present invention, step (24) is specifically as follows:

[0051] In the first step, the graph convolution encoder of the GCN submodule is used to represent the feature vector H layer by layer. L-1 and the adjacency matrix h adj Perform fusion coding;

[0052] In the second step, the encoding process of each layer is obtained through a series of graph convolution operations, namely in, Represents the adjacency matrix h adj Perform first-order regularization, W t-1 represents weight;

[0053] Specifically, the feature representation vector Z obtained by the previous layer fusion L-1 and feature representation vector H L-1 Perform graph convolution encoding to obtain the feature representation vector Z L , the previous layer is fused to obtain the feature representation vector Where ε represents the feature representation vector H L-1 Proportion, characteristic representation vector in Indicates the feature representation vector obtained by fusion of the previous layer;

[0054] The third step is to obtain the feature representation vector Z obtained by graph convolution encoding for the last layer. L Normalize to get the Z distribution.

[0055] According to the preferred embodiment of the present invention, step (25) is specifically as follows:

[0056] Get the feature representation vector of the last fusion layer of the GCN submodule output

[0057] Use the decoder of the DNN submodule to represent the feature vector Decoding is done by decoding the feature representation vector C, which is the last layer H in the original algorithm. L To decode, the reason why it is replaced with feature representation vector This is to further reconstruct the representation vector that contains both the internal information of the previous and next dependencies within the sample and the structural information between samples. Until the feature representation vector parsed by the last layer As input for the next step.

[0058] Specifically, in the bidirectional self-supervision submodule, the feature representation vector H L The learned Q distribution approximates the P distribution, using the feature representation vector Z LThe learned Z distribution approaches the P distribution and is dynamically trained and adjusted until the loss converges and the output feature representation vector And the clustering result label based on Z distribution forms an N×16×16 feature representation vector And the N×1 representation vector label of the corresponding label as the input for the next step.

[0059] According to the preferred embodiment of the present invention, in step (3), specifically:

[0060] (31) Image generation:

[0061] (311) The feature representation vector The label label corresponding to the vector is used as input, and the feature representation vector As the input of a hierarchical vector quantized variational autoencoder (VQ-VAE), a hierarchical VQ-VAE model is trained. The VQ-VAE model introduces a codebook loss lanten_loss (to make the encoder output close to the encoder vector) and a regression loss recon_loss (to keep the encoder output close to the selected codebook vector to prevent it from fluctuating frequently between different codebook vectors). The training is repeated until the loss converges, then the training is stopped and the model parameters are saved. The loss is calculated as: loss = lanten_loss + latent_loss_weight × recon_loss, where the value of latent_loss_weight is based on experience and is set to 0.25.

[0062] (312) Extract the top-level (global) quantized N×14×14 feature representation vector e from the layered VQ-VAE encoder. top and the underlying (local) quantized N×12×12 feature representation vector e bottom ;

[0063] (313) The feature representation vector e top The label and the representation vector are used as the input of the PixelSNAIL model to train the top-level PixelSNAIL prior model. The training cycle is repeated until the loss converges, and the training is stopped and the model parameters are saved.

[0064] (314) The feature representation vector e botton , feature representation vector e top and the representation vector label as the input of the PixelSNAIL model, where the feature representation vector e top The underlying PixelSNAIL prior model is generated using the label and the representation vector as conditions. The training loop is repeated until the loss converges, and the training is stopped and the model parameters are saved.

[0065] (315) Load the VQ-VAE model parameters, the top-level PixelSNAIL prior model parameters, and the bottom-level PixelSNAIL prior model parameters in sequence;

[0066] (316) Initialize an empty vector of M×8×16 Empty vector Input to the top-level PixelSNAIL prior model to obtain the top-level feature representation vector of M×8×16 Empty vector and feature representation vector Input the underlying PixelSNAIL prior model to obtain the underlying feature representation vector of M×8×16 The feature representation vector As a condition;

[0067] (317) The feature representation vector and feature representation vector As the input of the decoder of the VQ-VAE model, that is, the feature representation vector and feature representation vector After fusion, decoding is performed to generate a new image M×8×16 binary encoding vector X new , as input for the next step;

[0068] The VQ-VAE model is a powerful unsupervised representation learning model. The discrete codes it learns have strong representational capabilities. That is, the encoder output is discretized into a set of discrete vectors, called codebook vectors. The encoder output is forced to be quantized using vectors similar to the codebook vectors instead of using continuous latent codes. The decoder maps the quantized codebook vectors back to the original data space.

[0069] The PixelSNAIL model is an autoregressive model that combines causal convolution with a self-attention mechanism. It's essentially based on GatedPixelCNN, with the addition of a self-attention mechanism to compensate for causal convolution's limited contextual awareness. Combining these two approaches preserves the perceptual field of view and enables the acquisition of larger amounts of data, making the model's predictions more accurate. The self-attention mechanism allows the model to assign different attention weights to each element in a sequence when processing it. Causal convolution determines the amount of attention each element deserves based on its context. The output at any point in time depends solely on the input prior to that point, not future input, ensuring a causal relationship between the output and past input.

[0070] The GatedPixelCNN model refers to conditional image generation based on the image density model of the PixelCNN model. The model can condition various vectors, including descriptive labels or tags, or vector embeddings from other networks. It uses two convolutional stacks (horizontal stack and vertical stack) and the outputs of the two stacks are combined at each layer. Each layer of the horizontal stack takes the output of the previous layer and the output of the vertical stack as input to capture the global view. The PixelCNN model is a probability-based generative model. Its core idea is to generate high-quality images by learning the dependencies between image pixels. It is mainly composed of convolutional layers, masked convolutional layers, and fully connected layers.

[0071] (32) Candidate address generation:

[0072] The binary coded vector X new First convert it into M hexadecimal numbers with a length of 32;

[0073] Then, the M hexadecimal numbers of length 32 are divided into 8 groups, with adjacent groups separated by colons, to form IPv6 candidate addresses, and each candidate address is abbreviated to form a set S;

[0074] For each IPv6 address in set S, we loop through it and use the Pyasn tool to query its corresponding BGP prefix to determine whether the BGP prefix is ​​in the few-seed area. If not, we remove it from set S until all candidate addresses are traversed to form the latest set S.

[0075] (33) Alias ​​prefix detection and active IPv6 address detection:

[0076] (331) Standardize each IPv6 address in the latest set S to obtain the set S ′ , mainly using the ipaddress tool for standardized conversion;

[0077] (332) Loop through the set S′, replace the colon in each IPv6 address string with an empty string, then intercept the first 16 characters of each IPv6 address string and store them in the list L, until all IPv6 address strings are traversed, obtain the final list L, and remove duplicates from the list L to obtain the list L′.

[0078] (333) Perform alias prefix detection on list L′ to obtain the latest IPv6 candidate address set

[0079] (334) Perform active IPv6 address detection:

[0080] Use the distributed detection submodule to detect and obtain the latest active IPv6 address set The distributed detection submodule includes resource detection control and distributed probe detection. The main process is to upload the resources to be detected to the resource detection control node, then call the task scheduling process. The resource detection control node verifies the specified probe information, creates tasks, verifies the integrity of data files, and executes the task creation and task issuance process according to a certain resource allocation strategy. The request task result link is returned to the client, and then the result of the issued task is returned until the client accesses the task result link and obtains the detection result.

[0081] (335) The latest active IPv6 address set Update to the active IPv6 address set C in the low-seed area and calculate the conversion rate R of the small number of active seeds to sufficient active seeds under each BGP prefix C , conversion rate B i≥10 Indicates the number of BGP prefixes corresponding to the number of active IPv6 addresses greater than or equal to 10, and B indicates the number of BGP prefixes in the few-seed area.

[0082] (336) The updated set C is input into the IPv6 address generation model of few-seed image encoding again for fine-tuning until R C ≥50%, stop address generation.

[0083] According to the preferred embodiment of the present invention, step (333) is specifically as follows:

[0084] First, each character of an IPv6 address is composed of a hexadecimal number, forming a dictionary map, that is, 0 to 15 corresponds to 0 to f;

[0085] Then, loop through the list L ′ , each loop generates 16 strings of length 32, and each string of length 32 is padded by a string of length 16, that is, by randomly filling characters to the right based on the dictionary map to complete the string of length 32;

[0086] Next, loop through the list L ′ After completion, we get a string list of length 32 The list Each string in is converted to standard IPv6 format to get a list Then the list Use ICMP live host discovery technology to detect liveness, and obtain the active IPv6 list after the detection is completed

[0087] Finally, loop through the list Replace the colon in each IPv6 address string with an empty string, intercept the first 16 characters of each IPv6 address string, store them in the dictionary D, and record the number d of each 16-character string stored until all IPv6 address strings are traversed to obtain the final dictionary D. If d>=15, the prefix composed of the 16-character string is considered to be an alias prefix, and the IPv6 address corresponding to the alias prefix is ​​removed from the set S to obtain the latest IPv6 candidate address set.

[0088] An IPv6 address generation device based on few-seed image coding, comprising:

[0089] The preprocessing module is used for data collection. It extracts the set of active IPv6 addresses in the low-seeded area from the collected active IPv6 addresses and constructs a graph structure and encoding vector for each set.

[0090] The feature extraction module is used to use the BiLSTM model to capture the interdependence between the previous and next samples, and to vectorize the internal structure of the image. Then, the basic idea of ​​the SDCN algorithm is used to perform clustering. Another training objective is added to the original algorithm to further train the representation vector through the autoencoder. It has the structural information between N samples;

[0091] Active address generation module, used for image generation, address generation and distributed detection, represents the feature vector The label label corresponding to the vector is input into the image generation model to generate an image, and the image data is decoded to obtain candidate addresses. At the same time, a BGP prefix query is performed on the candidate addresses, and candidate addresses that meet the requirements of the few-seed area are retained. Alias ​​prefix detection and active IPv6 address detection are performed using distributed detection. The results of the detection are preprocessed and feature extracted before being sent to the image generation submodule for fine-tuning. After repeated multiple times, the conversion rate target is achieved.

[0092] Where the present invention is not exhaustive, please refer to the prior art.

[0093] The beneficial effects of the present invention are:

[0094] 1. The present invention can effectively realize the learning and accurate and rapid detection of complex configuration rules associated with seed addresses, and significantly improve the conversion rate of a small number of active seeds under each BGP prefix into sufficient active seeds.

[0095] 2. The present invention divides the address space based on the DHC technology of half-byte entropy value, and then uses a community algorithm based on maximizing the density of seed areas to process the seed addresses under each address space into a graph structure, and then merges the graphs under all address spaces to form a large graph, which greatly improves the efficiency of constructing the graph structure.

[0096] 3. The present invention utilizes the idea of ​​image data enhancement. The original image is rotated to obtain a new image, and then the original image and the new image are superimposed to obtain a data-enhanced image, which enriches and highlights the features of the original image and avoids the problem of low detection efficiency caused by insufficient features due to sampling bias.

[0097] 4. The present invention first uses the ability of the BiLSTM model to capture the mutual dependence between the front and back within the sample, and fully vectorizes the internal structural relationship of the image. Then, the SDCN algorithm is improved to simultaneously complete two training tasks, namely the clustering task and the feature extraction task. The feature extraction task completes the vector representation work of increasing the structural information between samples, greatly enriches the original image features, and is more conducive to fully exploring and learning the complex configuration rules of the original address, while avoiding the excessive generation of seed addresses that are not in the few-seed area in subsequent generation tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 Flow chart of the method of the present invention;

[0099] Figure 2 Generate an IPv6 address rendering for the present invention;

[0100] Figure 3 Schematic diagram of the device of the present invention. DETAILED DESCRIPTION

[0101] The present invention will be further described below with reference to embodiments and accompanying drawings, but is not limited thereto.

[0102] Example 1:

[0103] like Figure 1 As shown, this embodiment provides an IPv6 address generation method based on few-seed image encoding, the steps are as follows:

[0104] (1) Preprocessing: Data collection: extracting the set of active IPv6 addresses in the few-seed area from the collected active IPv6 addresses, and constructing the graph structure and encoding vector for each set;

[0105] Constructing the graph structure is to perform a preliminary screening of the data structure information between samples, which serves as a prerequisite for further identifying potential similarities between data samples. Constructing the encoding vector is to convert the data samples into binary encoding of the image. The forward and reverse encodings are then concatenated to obtain an encoding vector that fully captures the dependencies between the previous and next steps.

[0106] The data collected specifically includes:

[0107] First, active IPv6 addresses are collected from channels such as Domain Name System (DNS) resolution, crowdsourcing platforms, and public resources.

[0108] Use DNS resolution to collect active IPv6 addresses. First, obtain candidate domain names through various channels, such as reverse lookup of IPv4 address pointer records (PTRs) and extraction of NXDOMAIN records. Then, perform a reverse query on the candidate domain names and obtain active IPv6 addresses from the AAAA records obtained through the reverse query.

[0109] Use crowdsourcing platforms to collect active IPv6 addresses. Extract active IPv6 addresses with the help of crowdsourcing platform volunteers' request data, such as obtaining IPv6 addresses from participants such as Amazon's MTurk and ProA platforms;

[0110] Use public resources to obtain active IPv6 addresses, mainly open source data sources on the Internet, such as extracting IPv6 addresses from public domain names, CT certificates, Bitnodes, and RIPE Atlas.

[0111] Then, active IPv6 addresses in the few-seed area are extracted from the collected active IPv6 addresses.

[0112] Use Pyasn to query the BGP prefixes corresponding to the active IPv6 addresses collected in the first step. Then count the number of active IPv6 addresses corresponding to each BGP prefix. The number of BGP prefixes with less than 10 addresses is B. The active IPv6 addresses corresponding to BGP prefixes with less than 10 addresses are selected as the active IPv6 address set C in the few-seed area, with a size of N.

[0113] The specific steps to build the graph structure are:

[0114] (111) Using the DHC technology based on half-byte entropy value, the collected active IPv6 address set in the few-seed area is divided into address spaces to obtain an address space;

[0115] (112) Using a community algorithm to process the seed addresses in each address space into a graph structure;

[0116] First, calculate the distance d between all seedsj , form a distance list, sort the distance list, remove duplicate and overly long edges, and the threshold for overly long edges is 12;

[0117] Then, construct an undirected graph G i =(V i ,E j ), where V i represents the vertex, i.e. the seed; E j represents the edge, that is, the distance between seeds, which is initially edgeless, and If d j ≥12: The two vertices are considered unreachable;

[0118] Finally, traverse the sorted distance list and add edges to graph G in sequence i In the graph, the condition is to add the shortest edge and maximize the density of connected components (i.e., the accessibility between vertices). After the addition is completed, the graph G i It becomes a connected graph, namely the minimum spanning tree, where the density of the maximum connected component refers to the density value of the seed set under the maximized spatial region, that is, density = N / ε, ε is the number of free dimensions, and N refers to the number of seed addresses;

[0119] A free dimension refers to a group of seed addresses with the same index value. If the corresponding hexadecimal character values ​​are different, the index value is considered to be a free dimension. The number of index values ​​is the number of free dimensions, which means that the more free dimensions there are, the lower the density, and vice versa.

[0120] (113) Merge the graphs under each address space into one graph and output the adjacency matrix;

[0121] Construct an undirected graph G in the address space divided in step (111) i , all undirected graphs are merged in a loop to form an undirected graph G, and then the adjacency matrix h is output adj (Dimension is N×N).

[0122] The specific steps to construct the encoding vector are:

[0123] (121) Convert the set of active IPv6 addresses in the few-seed region into a binary encoding vector X of N × 8 × 16, where N is the number of samples;

[0124] The length of an IPv6 address is 128 bits, consisting of 8 groups of hexadecimal numbers. Adjacent groups are separated by colons, and each group contains 4 hexadecimal numbers. Therefore, each IPv6 address is regarded as an 8-dimensional vector, and each dimension is represented by 16 binary digits, forming an image encoding format.

[0125] (122) Reverse the binary code vector X according to 1 dimension and output the N×8×16 binary code vector X r ;

[0126] (123) Concatenate the two encoding vectors in 1 dimension and output an N×16×16 binary encoding vector Right now in, Depend on composition, Represented by 16 16-dimensional sequences, binary encoding vectors as input for the next step.

[0127] The encoding vector X and the encoding vector X r Stitching utilizes the idea of ​​image data enhancement. The original image is rotated 180° to obtain a new image. The original image and the new image are then superimposed to obtain a data-enhanced image. Feature learning of this image is then performed in subsequent modules to learn richer features.

[0128] (2) Feature extraction: First, the BiLSTM model is used to capture the interdependence between the front and back of the sample, and the internal structure of the image is fully represented by vectors. Then, the basic idea of ​​the SDCN algorithm is used to perform clustering. Another training goal is added to the original algorithm to improve the model. The training goal is to further train the representation vectors through the autoencoder. It has richer features, namely the structural information between N samples;

[0129] The specific steps are as follows:

[0130] (21) Construct time series encoding vector:

[0131] Build a BiLSTM-based encoder model, set hyperparameters such as learning rate, training batch, and rounds, train the model, and save the model after training is complete;

[0132] Load the trained BiLSTM encoder model and extract the representation vector containing the time series relationship from the model

[0133] After loading the model, convert the N×16×16 binary encoding vector Input into the trained BiLSTM encoder model and extract the last layer of feedforward hidden vector h Last (dimension N×128) and the feed-back latent vector (dimension N×128), concatenate the feedforward latent vector and the feedback latent vector to obtain an N×256-dimensional latent vector, that is, an N×16×16 representation vector Since in the preprocessing stage, the vector It is concatenated from its positive-order binary vector and reverse-order binary vector. Therefore, the BiLSTM encoder can fully learn the time-series-based dependencies of the original binary encoding vector X, avoiding excessive generation of seed addresses that are not in the low-seed area in subsequent generation tasks.

[0134] The BiLSTM model refers to a bidirectional long short-term memory network, which is a recurrent neural network with hidden states in both forward and backward directions. It can capture the sentence structure and dependency relationships in the text and effectively model context and other information.

[0135] (22) Pre-trained Autoencoder

[0136] Will represent the vector As the input of the autoencoder, set hyperparameters such as learning rate, training batch, and round;

[0137] After completing the training round, save the model parameters of the autoencoder;

[0138] (23) Forming cluster center P distribution

[0139] Initialize the model and load the model parameters of the autoencoder;

[0140] Using the encoder of the DNN submodule, we first represent the vector Encode to obtain the feature representation vector C after multi-layer spatial dimension encoding: Specifically, the encoder of the DNN submodule is used to represent the vector Encoding is performed, and a series of linear transformations are used to obtain the feature representation vectors H of multiple spatial dimensions at different layers. L ,Right now Among them, L represents the number of layers, d represents the dimension, represents the weight, Indicates bias, Represents a linear transformation function, and the feature representation vector C corresponds to the last layer H L .

[0141] For the feature representation vector C, cluster training is performed using the DBSCAN clustering algorithm. Since the IID based on the RFC 7707 document can be divided into embedded IPv4, embedded port, IEEE derived, low byte, pattern byte, and randomized, the number of clusters is dynamically adjusted during the DBSCAN algorithm training process, making the number of clusters 6. After training is completed, the distribution of cluster centers P is obtained;

[0142] DNN refers to a machine learning model containing multiple hidden layers, namely Deep Neural Network (DNN), which has strong nonlinear expression capabilities and the ability to learn complex data patterns. DNN consists of input layer, hidden layer and output layer. The hidden layer is the core part of DNN and can capture complex relationships and patterns in data through nonlinear transformation.

[0143] (24) In the GCN submodule, the feature representations of multiple spatial dimensions of different layers are used to learn the structural information separately from the adjacency matrix, and the structural information is introduced into the representation learning of the autoencoder to obtain the feature representation vector This improves clustering performance;

[0144] Specifically:

[0145] In the first step, the graph convolution encoder of the GCN submodule is used to represent the feature vector H layer by layer. L-1 and the adjacency matrix h adj Perform fusion coding;

[0146] In the second step, the encoding process of each layer is obtained through a series of graph convolution operations, namely in, Represents the adjacency matrix h adj Perform first-order regularization, W L-1 represents weight;

[0147] Specifically, the feature representation vector Z obtained by the previous layer fusion L-1 and feature representation vector H L-1 Perform graph convolution encoding to obtain the feature representation vector Z L , the previous layer is fused to obtain the feature representation vector Where ε represents the feature representation vector H L-1 Proportion, characteristic representation vector in Indicates the feature representation vector obtained by fusion of the previous layer;

[0148] The third step is to obtain the feature representation vector Z obtained by graph convolution encoding for the last layer. L Normalize to get the Z distribution.

[0149] GCN refers to Graph Convolutional Network, a neural network model applied to graph data. It is mainly used for node classification, graph classification, edge prediction, and graph embedding representation. The core is to learn a function mapping so that the node can aggregate its own features and the features of its neighbors to generate a new node representation. It can be divided into spectral-based methods and spatial-based methods. The spectral-based method defines the graph convolution by the eigenvalues ​​and eigenvectors of the Laplacian matrix of the graph, converts the signal to the Fourier domain, then applies the filter, and finally performs an inverse Fourier transform to obtain a new signal representation. The spatial-based method is to perform neighborhood aggregation directly on the structure of the graph, and update the representation of the central node by aggregating the feature information of the central node and its adjacent nodes.

[0150] (25) In the DNN submodule, the decoder is used to perform decoding operations on the representation learning containing the structural information between samples, so that the representation vector In the process of , it contains the structural information representation between samples, that is, the feature representation vector is obtained

[0151] Specifically:

[0152] Get the feature representation vector of the last fusion layer of the GCN submodule output

[0153] Use the decoder of the DNN submodule to represent the feature vector Decoding is done by decoding the feature representation vector C, which is the last layer H in the original algorithm. L To decode, the reason why it is replaced with feature representation vector This is to further reconstruct the representation vector that contains both the internal information of the previous and next dependencies within the sample and the structural information between samples. Until the feature representation vector parsed by the last layer As input for the next step.

[0154] Specifically, in the bidirectional self-supervision submodule, the feature representation vector H L The learned Q distribution approximates the P distribution, using the feature representation vector Z L The learned Z distribution approaches the P distribution and is dynamically trained and adjusted until the loss converges and the output feature representation vector And the clustering result label based on Z distribution forms an N×16×16 feature representation vector And the N×1 representation vector label of the corresponding label as the input for the next step.

[0155] (3) Active address generation, including image generation, address generation and distributed detection, mainly combines computer vision methods to mine the complex configuration rules of addresses in a small number of seed areas to generate image data, that is, to represent the feature vector The label label corresponding to the vector is input into the image generation model to generate an image, and the image data is decoded to obtain candidate addresses. At the same time, a BGP prefix query is performed on the candidate addresses, and candidate addresses that meet the requirements of the few-seed area are retained. Alias ​​prefix detection and active IPv6 address detection are performed using distributed detection. The results of the detection are preprocessed and feature extracted before being sent to the image generation submodule for fine-tuning. After repeated multiple times, the conversion rate target is achieved.

[0156] (31) Image generation:

[0157] (311) The feature representation vector The label label corresponding to the vector is used as input, and the feature representation vector As the input of a hierarchical vector quantized variational autoencoder (VQ-VAE), a hierarchical VQ-VAE model is trained. The VQ-VAE model introduces a codebook loss lanten_loss (to make the encoder output close to the encoder vector) and a regression loss recon_loss (to keep the encoder output close to the selected codebook vector to prevent it from fluctuating frequently between different codebook vectors). The training is repeated until the loss converges, then the training is stopped and the model parameters are saved. The loss is calculated as: loss = lanten_loss + latent_loss_weight × recon_loss, where the value of latent_loss_weight is based on experience and is set to 0.25.

[0158] (312) Extract the top-level (global) quantized N×14×14 feature representation vector e from the layered VQ-VAE encoder. top and the underlying (local) quantized N×12×12 feature representation vector e bott ;

[0159] (313) The feature representation vector e top The label and the representation vector are used as the input of the PixelSNAIL model to train the top-level PixelSNAIL prior model. The training cycle is repeated until the loss converges, and the training is stopped and the model parameters are saved.

[0160] (314) The feature representation vector e botton , feature representation vector e topand the representation vector label as the input of the PixelSNAIL model, where the feature representation vector e top The underlying PixelSNAIL prior model is generated using the label and the representation vector as conditions. The training loop is repeated until the loss converges, and the training is stopped and the model parameters are saved.

[0161] (315) Load the VQ-VAE model parameters, the top-level PixelSNAIL prior model parameters, and the bottom-level PixelSNAIL prior model parameters in sequence;

[0162] (316) Initialize an empty vector of M×8×16 Empty vector Input to the top-level PixelSNAIL prior model to obtain the top-level feature representation vector of M×8×16 Empty vector and feature representation vector Input the underlying PixelSNAIL prior model to obtain the underlying feature representation vector of M×8×16 The feature representation vector As a condition;

[0163] (317) The feature representation vector and feature representation vector As the input of the decoder of the VQ-VAE model, that is, the feature representation vector and feature representation vector After fusion, decoding is performed to generate a new image M×8×16 binary encoding vector X new , as input for the next step;

[0164] The VQ-VAE model is a powerful unsupervised representation learning model. The discrete codes it learns have strong representational capabilities. That is, the encoder output is discretized into a set of discrete vectors, called codebook vectors. The encoder output is forced to be quantized using vectors similar to the codebook vectors instead of using continuous latent codes. The decoder maps the quantized codebook vectors back to the original data space.

[0165] The PixelSNAIL model is an autoregressive model that combines causal convolution with a self-attention mechanism. It's essentially based on GatedPixelCNN, with the addition of a self-attention mechanism to compensate for causal convolution's limited contextual awareness. Combining these two approaches preserves the perceptual field of view and enables the acquisition of larger amounts of data, making the model's predictions more accurate. The self-attention mechanism allows the model to assign different attention weights to each element in a sequence when processing it. Causal convolution determines the amount of attention each element deserves based on its context. The output at any point in time depends solely on the input prior to that point, not future input, ensuring a causal relationship between the output and past input.

[0166] The GatedPixelCNN model refers to conditional image generation based on the image density model of the PixelCNN model. The model can condition various vectors, including descriptive labels or tags, or vector embeddings from other networks. It uses two convolutional stacks (horizontal stack and vertical stack) and the outputs of the two stacks are combined at each layer. Each layer of the horizontal stack takes the output of the previous layer and the output of the vertical stack as input to capture the global view. The PixelCNN model is a probability-based generative model. Its core idea is to generate high-quality images by learning the dependencies between image pixels. It is mainly composed of convolutional layers, masked convolutional layers, and fully connected layers.

[0167] (32) Candidate address generation:

[0168] The binary coded vector X new First convert it into M hexadecimal numbers with a length of 32;

[0169] Then, the M hexadecimal numbers of length 32 are divided into 8 groups, with adjacent groups separated by colons, to form IPv6 candidate addresses, and each candidate address is abbreviated to form a set S;

[0170] For each IPv6 address in set S, we loop through it and use the Pyasn tool to query its corresponding BGP prefix to determine whether the BGP prefix is ​​in the few-seed area. If not, we remove it from set S until all candidate addresses are traversed to form the latest set S.

[0171] (33) Alias ​​prefix detection and active IPv6 address detection:

[0172] (331) Standardize each IPv6 address in the latest set S to obtain the set S ′ , mainly using the ipaddress tool for standardized conversion;

[0173] (332) Loop through the set S′, replace the colon in each IPv6 address string with an empty string, then intercept the first 16 characters of each IPv6 address string and store them in the list L, until all IPv6 address strings are traversed, obtain the final list L, and remove duplicates from the list L to obtain the list L′.

[0174] (333) Perform alias prefix detection on list L′ to obtain the latest IPv6 candidate address set

[0175] First, each character of an IPv6 address is composed of a hexadecimal number, forming a dictionary map, that is, 0 to 15 corresponds to 0 to f;

[0176] Then, loop through the list L', generating 16 strings of length 32 each time. Each string of length 32 is padded with a string of length 16, that is, by randomly padding characters to the right based on the dictionary map to complete the string of length 32;

[0177] Next, after looping through the list L', we get a string list of length 32. The list Each string in is converted to standard IPv6 format to get a list Then the list Use ICMP live host discovery technology to detect liveness, and obtain the active IPv6 list after the detection is completed

[0178] Finally, loop through the list Replace the colon in each IPv6 address string with an empty string, intercept the first 16 characters of each IPv6 address string, store them in the dictionary D, and record the number d of each 16-character string stored until all IPv6 address strings are traversed to obtain the final dictionary D. If d>=15, the prefix composed of the 16-character string is considered to be an alias prefix, and the IPv6 address corresponding to the alias prefix is ​​removed from the set S to obtain the latest IPv6 candidate address set.

[0179] (334) Perform active IPv6 address detection:

[0180] Use the distributed detection submodule to detect and obtain the latest active IPv6 address set The distributed detection submodule includes resource detection control and distributed probe detection. The main process is to upload the resources to be detected to the resource detection control node, then call the task scheduling process. The resource detection control node verifies the specified probe information, creates tasks, verifies the integrity of data files, and executes the task creation and task issuance process according to a certain resource allocation strategy. The request task result link is returned to the client, and then the result of the issued task is returned until the client accesses the task result link and obtains the detection result.

[0181] (335) The latest active IPv6 address set Update to the active IPv6 address set C in the low-seed area and calculate the conversion rate R of the small number of active seeds to sufficient active seeds under each BGP prefix C , conversion rate B i≥10 Indicates the number of BGP prefixes corresponding to the number of active IPv6 addresses greater than or equal to 10, and B indicates the number of BGP prefixes in the few-seed area.

[0182] (336) The updated set C is input into the IPv6 address generation model of few-seed image encoding again for fine-tuning until R C ≥50%, stop address generation.

[0183] Example 2:

[0184] like Figure 3 As shown, this embodiment provides an IPv6 address generation device based on few-seed image encoding, including:

[0185] The preprocessing module is used for data collection. It extracts the set of active IPv6 addresses in the low-seeded area from the collected active IPv6 addresses and constructs a graph structure and encoding vector for each set.

[0186] The feature extraction module is used to use the BiLSTM model to capture the interdependence between the previous and next samples, and to vectorize the internal structure of the image. Then, the basic idea of ​​the SDCN algorithm is used to perform clustering. Another training objective is added to the original algorithm to further train the representation vector through the autoencoder. It has the structural information between N samples;

[0187] Active address generation module, used for image generation, address generation and distributed detection, represents the feature vector The label label corresponding to the vector is input into the image generation model to generate an image, and the image data is decoded to obtain candidate addresses. At the same time, a BGP prefix query is performed on the candidate addresses, and candidate addresses that meet the requirements of the few-seed area are retained. Alias ​​prefix detection and active IPv6 address detection are performed using distributed detection. The results of the detection are preprocessed and feature extracted before being sent to the image generation submodule for fine-tuning. After repeated multiple times, the conversion rate target is achieved.

[0188] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.

Claims

1. A method for generating an IPv6 address based on a few-seed image encoding, characterized in that: Here are the steps: (1) Preprocessing: Data collection. Extract the set of active IPv6 addresses in the few-seed area from the collected active IPv6 addresses, and construct the graph structure and encoding vector for each set. The specific steps for constructing the graph structure are as follows: (111) Using the DHC technology based on half-byte entropy, the collected active IPv6 address set in the few-seed area is divided into address spaces to obtain the address space; (112) Use community algorithm to process the seed addresses in each address space into a graph structure; First, calculate the distance between all seeds , form a distance list, sort the distance list, remove duplicate and overly long edges, and the threshold for overly long edges is 12; Then, construct an undirected graph ,in represents the vertex, i.e. the seed; represents the edge, that is, the distance between seeds, which is initially edgeless, and ,like It is considered that the two vertices are unreachable; Finally, traverse the sorted distance list and add edges to the graph sequentially In the example, the condition is to add the shortest edge and maximize the density of connected components. After the addition is completed, the graph It becomes a connected graph, namely the minimum spanning tree, where the density of the maximum connected component refers to the density value of the seed set under the maximized spatial region, namely =N / , is the number of free dimensions, N refers to the number of seed addresses; (113) Merge the graphs under each address space into one graph and output the adjacency matrix; Construct an undirected graph in the address space divided in step (111) , all undirected graphs are merged in a loop to form an undirected graph G, and then the adjacency matrix is ​​output ; The specific steps to construct the encoding vector are: (121) Convert the set of active IPv6 addresses in the few-seed region into a binary encoding vector X of N × 8 × 16, where N is the number of samples; (122) Reverse the binary code vector X according to 1 dimension and output the binary code vector N×8×16 ; (123) Concatenate the two encoding vectors in 1 dimension and output an N×16×16 binary encoding vector ,Right now ,in, Depend on composition, Represented by 16 16-dimensional sequences, binary encoding vectors As input to the next step; (2) Feature extraction: First, the BiLSTM model is used to capture the interdependence between the front and back of the sample, and the internal structure of the image is represented by vectors. Then, the basic idea of ​​the SDCN algorithm is used to perform clustering. Another training objective is added to the original algorithm, and the representation vector is further trained through the autoencoder. , so that it has the structural information between N samples. The specific steps are as follows: (21) Construct time series encoding vector: Build a BiLSTM-based encoder model, set hyperparameters such as learning rate, training batch, and rounds, train the model, and save the model after training is complete; Load the trained BiLSTM encoder model and extract the representation vector containing the time series relationship from the model ; After loading the model, convert the N×16×16 binary encoding vector Input into the trained BiLSTM encoder model and extract the last layer of feedforward hidden vector and the feed-back latent vector , concatenate the feedforward latent vector and the feedback latent vector to obtain an N×256-dimensional latent vector, that is, an N×16×16 representation vector ; (22) Pre-trained autoencoder Will represent the vector As the input of the autoencoder, set hyperparameters such as learning rate, training batch, and round; After completing the training round, save the model parameters of the autoencoder; (23) Forming cluster center P distribution Initialize the model and load the model parameters of the autoencoder; Using the encoder of the DNN submodule, we first represent the vector Encode to obtain the feature representation vector C after multi-layer spatial dimension encoding; For the feature representation vector C, cluster training is performed using the DBSCAN clustering algorithm. During the training of the DBSCAN algorithm, the number of clusters is dynamically adjusted to 6. After the training is completed, the distribution of cluster centers P is obtained. (24) In the GCN submodule, the feature representations of multiple spatial dimensions at different layers are used to learn the structural information separately from the adjacency matrix, and the structural information is introduced into the representation learning of the autoencoder to obtain the feature representation vector ; (25) In the DNN submodule, the decoder is used to perform decoding operations on the representation learning containing the structural information between samples, so that the representation vector In the process of , it contains the structural information representation between samples, that is, the feature representation vector is obtained , specifically: Get the feature representation vector of the last fusion layer of the GCN submodule output , ; Use the decoder of the DNN submodule to represent the feature vector Decoding is done by decoding the feature representation vector C, which is the last layer in the original algorithm. To decode, the reason why it is replaced with feature representation vector This is to further reconstruct the representation vector that contains both the internal information of the previous and next dependencies within the sample and the structural information between samples. = , until the feature representation vector parsed out at the last layer As input for the next step; (3) Active address generation, including image generation, address generation and distributed detection, and the feature representation vector The label label corresponding to the vector is input into the image generation model to generate an image, and the image data is decoded to obtain candidate addresses. At the same time, a BGP prefix query is performed on the candidate addresses, and candidate addresses that meet the requirements of the few-seed area are retained. Alias ​​prefix detection and active IPv6 address detection are performed using distributed detection. The results of the detection are preprocessed and feature extracted before being sent to the image generation submodule for fine-tuning. After repeated multiple times, the conversion rate target is achieved.

2. The method for generating an IPv6 address based on a few-seed image encoding according to claim 1, wherein: In step (23), the steps for obtaining the feature representation vector C after multi-layer spatial dimension encoding are as follows: Utilize the encoder pair representation vector of the DNN submodule Encode and obtain feature representation vectors of multiple spatial dimensions of different layers through linear transformation ,Right now , where L represents the number of layers and d represents the dimension. represents the weight, Indicates bias, Represents the linear transformation function, and the feature representation vector C corresponds to the last layer .

3. The method for generating an IPv6 address based on a few-seed image encoding according to claim 2, wherein: Step (24) is specifically as follows: The first step is to use the graph convolution encoder of the GCN submodule to represent the feature vector layer by layer and the adjacency matrix Perform fusion coding; In the second step, the encoding process of each layer is obtained through graph convolution operation, that is, ,in, Represents the adjacency matrix Perform first-order regularization, represents weight; The third step is to obtain the feature representation vector of the last layer through graph convolution encoding. Normalize to get the Z distribution.

4. The method for generating an IPv6 address based on a few-seed image encoding according to claim 3, wherein: In step (3), specifically: (31) Image generation: (311) The feature representation vector The label label corresponding to the vector is used as input, and the feature representation vector As the input of the hierarchical vector quantized variational autoencoder, a hierarchical VQ-VAE model is trained. The VQ-VAE model introduces the codebook loss latent_loss and the regression loss recon_loss. The training is cyclical until the loss converges, the training is stopped, and the model parameters are saved. The loss calculation formula is: , where the value of latent_loss_weight is based on experience and is set to 0.25; (312) Extract the top-level quantized N×14×14 feature representation vectors from the layered VQ-VAE encoder. and the underlying quantized N×12×12 feature representation vector ; (313) The feature representation vector The label and the representation vector are used as the input of the PixelSNAIL model to train the top-level PixelSNAIL prior model. The training cycle is repeated until the loss converges, and the training is stopped and the model parameters are saved. (314) The feature representation vector , feature representation vector and the representation vector label as the input of the PixelSNAIL model, where the feature representation vector The underlying PixelSNAIL prior model is generated using the label and the representation vector as conditions. The training loop is repeated until the loss converges, and the training is stopped and the model parameters are saved. (315) Load the VQ-VAE model parameters, the top-level PixelSNAIL prior model parameters, and the bottom-level PixelSNAIL prior model parameters in sequence; (316) Initialize an empty vector of size M×8×16 , the empty vector Input to the top-level PixelSNAIL prior model to obtain the top-level feature representation vector of M×8×16 , the empty vector and feature representation vector Input the underlying PixelSNAIL prior model to obtain the underlying feature representation vector of M×8×16 , where the feature representation vector As a condition; (317) The feature representation vector and feature representation vector As the input of the decoder of the VQ-VAE model, it generates a new M×8×16 binary encoding vector of the image , as input for the next step; (32) Candidate address generation: Binary coded vector First convert it into M hexadecimal numbers with a length of 32; Then, the M hexadecimal numbers of length 32 are divided into 8 groups, with adjacent groups separated by colons, to form IPv6 candidate addresses, and each candidate address is abbreviated to form a set S; For each IPv6 address in set S, we loop through it and use the Pyasn tool to query its corresponding BGP prefix to determine whether the BGP prefix is ​​in the few-seed area. If not, we remove it from set S until all candidate addresses are traversed to form the latest set S. (33) Alias ​​prefix detection and active IPv6 address detection: (331) Standardize each IPv6 address in the latest set S to obtain the set ; (332) Looping through a collection , replace the colon in each IPv6 address string with an empty string, then intercept the first 16 of each IPv6 address string and store them in list L, until all IPv6 address strings are traversed, get the final list L, and remove duplicates from list L to get list ; (333) For the list Perform alias prefix detection to obtain the latest IPv6 candidate address set ; (334) Perform active IPv6 address detection: Use the distributed detection submodule to detect and obtain the latest active IPv6 address set ,The distributed detection submodule includes resource detection control and distributed probe detection, ,which uploads the resources to be detected to the resource detection control ,node, and then calls the task scheduling process. The resource detection ,control node verifies the specified probe information, creates tasks, verifies the integrity of ,the data file, and executes the task creation and task issuance process according to a certain ,resource allocation strategy. It returns the request task result link to the client, ,and then waits for the result of the issued task to be returned until the client accesses the ,task result link and obtains the detection result; (335) The latest active IPv6 address set Update to the active IPv6 address set C in the low-seed area and calculate the conversion rate of a small number of active seeds to sufficient active seeds under each BGP prefix , conversion rate , Indicates the number of BGP prefixes corresponding to the number of active IPv6 addresses greater than or equal to 10, and B indicates the number of BGP prefixes in the few-seed area. (336) The updated set C is input again into the IPv6 address generation model for few-seed image encoding for fine-tuning until , stop address generation.

5. The method for generating an IPv6 address based on a few-seed image encoding according to claim 4, wherein: Step (333) is specifically as follows: First, each character of an IPv6 address is composed of a hexadecimal number, forming a dictionary map, that is, 0 to 15 corresponds to 0 to f; Then, loop through the list , each loop generates 16 strings of length 32, each string of length 32 is padded by a string of length 16, and the string of length 32 is padded to the right by random characters based on the dictionary map; Next, loop through the list After completion, we get a string list of length 32 , the list Each string in is converted to standard IPv6 format to get a list , then the list Use ICMP live host discovery technology to detect liveness, and obtain the active IPv6 list after the detection is completed ; Finally, loop through the list , replace the colon in each IPv6 address string with an empty string, intercept the first 16 of each IPv6 address string, store them in the dictionary D, and record the number d of each 16-length string stored, until all IPv6 address strings are traversed, and the final dictionary D is obtained. If d>=15, the prefix composed of the 16-length string is considered to be an alias prefix, and the IPv6 address corresponding to the alias prefix is ​​removed from the set S to obtain the latest IPv6 candidate address set. .

6. An IPv6 address generation device based on few-seed image coding, applied to the IPv6 address generation method based on few-seed image coding according to claim 1, characterized in that: include: The preprocessing module is used for data collection. It extracts the set of active IPv6 addresses in the low-seeded area from the collected active IPv6 addresses and constructs a graph structure and encoding vector for each set. The feature extraction module is used to use the BiLSTM model to capture the interdependence between the previous and next samples, and to vectorize the internal structure of the image. Then, the basic idea of ​​the SDCN algorithm is used to perform clustering. Another training objective is added to the original algorithm to further train the representation vector through the autoencoder. , so that it has the structural information between N samples; Active address generation module, used for image generation, address generation and distributed detection, represents the feature vector The label label corresponding to the vector is input into the image generation model to generate an image, and the image data is decoded to obtain candidate addresses. At the same time, a BGP prefix query is performed on the candidate addresses, and candidate addresses that meet the requirements of the few-seed area are retained. Alias ​​prefix detection and active IPv6 address detection are performed using distributed detection. The results of the detection are preprocessed and feature extracted before being sent to the image generation submodule for fine-tuning. After repeated multiple times, the conversion rate target is achieved.

Citation Information

Patent Citations

  • Dynamic IPv6 address detection method based on density

    CN111432043A

  • Active address detection method and device based on graph community discovery

    CN113382092A