IPv6 address generation method and device based on few-seed image coding
By constructing an image encoding model in a few seed scenario, using BiLSTM and SDCN algorithms for feature extraction and clustering, the problem of inefficient generation of active addresses in the existing technology is solved, and accurate mining and efficient generation of IPv6 address configuration rules in the few seed area is achieved.
Patent Information
- Application Number
- CN202411779257.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The prior art is difficult to accurately mine IPv6 address configuration rules in the few seed scenarios, resulting in inefficient generation of active addresses.
Using a method based on the encoding of the few seed image, the graph structure and encoding vector are constructed, and feature extraction and clustering is used using the BiLSTM model and the SDCN algorithm, and image data is generated in combination with the computer vision method, thereby generating active IPv6 addresses that meet the few seed areas.
Effectively learning and mining complex configuration rules under the few seed areas improves the efficiency and accuracy of active address generation and significantly improves the conversion rate of active seeds under the BGP prefix.
Smart Images

Figure CN119652822A_ABST
Abstract
Description
Technical Field
[0001] The 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 has been promoted and deployed at an accelerated pace around the world. Although IPv6 has effectively solved the problem of IPv4 address exhaustion, the IPv6 address allocation method is diverse, and its huge address space poses a huge challenge to active address scanning. Brute force scanning of the entire IPv6 address space is not feasible. Active IPv6 addresses are vital network resources and are the basis of network management, asset assessment, situational awareness and security research.
[0003] In order to understand the activity of addresses in the entire network space, modern fast scanning tools such as ZMap, Masscan, Nmap, etc. can greatly improve the efficiency of scanning the entire Internet. However, the IPv6 network address space (2^128) is too large, making it impossible to scan the entire network space. 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 reason is the sampling bias in the scenario with few seeds and the complex configuration rules associated with the seed addresses.
[0004] It is difficult for existing active address generation algorithms to accurately mine address configuration rules, and related studies have shown that a large number of BGP prefixes have a small number of seeds. In order to solve the above problems, the present invention is proposed. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides an IPv6 address generation method and device based on few-seed image coding, which can effectively learn complex seed address configuration rules in a few-seed scenario and solve the problem of low detection efficiency caused by sampling bias.
[0006] Terminology explanation:
[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 a live host.
[0008] DHC technology based on half-byte entropy value: refers to the use of divisive hierarchical clustering (DHC) to build 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 are outside the neighborhood of core points. Noise points are points that do not belong to the neighborhood of any core point.
[0010] The technical solution of the present invention is as follows:
[0011] A method for generating an IPv6 address based on 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 the set respectively;
[0013] The purpose of constructing the graph structure is to make a preliminary screening of the data structure information between samples as a prerequisite for further obtaining the potential similarities between data samples. The purpose of constructing the encoding vector is to convert the data sample into the binary encoding form of the image, and then splice the forward and reverse encoding to obtain the encoding vector that can fully capture the front-end dependency relationship.
[0014] (2) Feature extraction: First, the BiLSTM model is used to capture the interdependence of the previous and next samples, 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 objective is added to the original algorithm to improve the model. This training objective 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 few 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 the candidate address. At the same time, a BGP prefix query is performed on the candidate address, and the candidate address that meets the requirements of the few-seed area is retained. Alias prefix detection and active IPv6 address detection are performed using distributed detection. The detection results are sent to the image generation submodule for fine-tuning after preprocessing and feature extraction. After repeated multiple times, the conversion rate target is achieved.
[0016] Preferably, in step (1), the specific steps of constructing the graph structure are:
[0017] (111) Using the DHC technology based on the 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, the seed addresses in each address space are processed 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 overlong edges, and the threshold of overlong 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 example, the condition is to add the shortest edge and maximize the density of the connected components (i.e., the accessibility between vertices). After the addition is completed, the graph G i It becomes a connected graph, i.e., a 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, i.e., density = N / ε, where ε 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 smaller 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 (The dimension is N×N).
[0025] Preferably, in step (1), the specific steps of constructing the encoding vector are:
[0026] (121) Convert the active IPv6 address set of the few-seed area 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, with adjacent groups separated by colons. Each group contains 4 hexadecimal numbers, so each IPv6 address is considered as an 8-dimensional vector, with each dimension represented by 16 binary numbers, 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 a binary encoding vector of N×16×16 Right now in, Depend on composition, Represented by 16 16-dimensional sequences, binary coded 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] Preferably, in step (2) of the present invention, the specific steps are as follows:
[0032] (21) Construct time series encoding vector:
[0033] Build a BiLSTM-based encoder model, set hyperparameters such as learning rate, training batch, and round, train the model, and save the model after training is completed;
[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, so the BiLSTM encoder can fully learn the time series-based front-back dependency of the original binary encoding vector X, avoiding excessive generation of seed addresses that are not in the few-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 the hyperparameters learning rate, training batch, round, etc.
[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, the DBSCAN clustering algorithm is used for clustering training. Since the IID based on the RFC 7707 document can be divided into embedded IPv4, embedded port, IEEE derived, low byte, mode byte and randomization, the number of clusters is dynamically adjusted during the training of the DBSCAN algorithm, making the number of clusters 6. After the training is completed, the distribution of cluster centers P is obtained;
[0044] DNN refers to a machine learning model containing multiple hidden layers, namely a deep neural network (Deep Neural Network), which has powerful nonlinear expression capabilities and the ability to learn complex data patterns. DNN consists of an input layer, a hidden layer, and an output layer. The hidden layer is the core part of DNN and can capture complex relationships and patterns in data through nonlinear transformations.
[0045] (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 This improves clustering performance;
[0046] GCN refers to Graph Convolutional Network, which is 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 directly performs neighborhood aggregation on the structure of the graph, and updates the representation of the central node by aggregating the feature information of the central node and its neighboring 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] Preferably, in step (23), the step of obtaining the feature representation vector C after multi-layer spatial dimension encoding is:
[0049] Using the encoder pair representation vector of the DNN submodule Encoding is performed, and a series of linear transformations are used to obtain 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 fusion in the previous layer L-1 and the 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 Weight, 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 layer of fusion output of the GCN submodule
[0057] Use the decoder of the DNN submodule to represent the feature vector Decoding is done by decoding the feature representation vector C, i.e. the last layer H in the original algorithm. L Decoding is done by replacing it with a 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 last layer of feature representation vector 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 dynamic training adjustment is performed until the loss converges and the output feature representation vector And the clustering result label based on Z distribution, forming 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 taken as input, and the feature representation vector As the input of the hierarchical vector quantization variational autoencoder (VQ-VAE), a hierarchical VQ-VAE model is trained. The VQ-VAE model introduces the codebook loss lanten_loss (to make the encoder output close to the encoder vector) and the regression loss recon_loss (to make the encoder output continue to be close to the selected codebook vector to prevent it from frequently fluctuating between different codebook vectors). The training is repeated until the loss converges, the training is stopped, and the model parameters are saved. The loss loss is calculated as follows: 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 is repeated until the loss converges, then 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 are used 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 is repeated until the loss converges, then 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 the 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 the feature representation vector As the input of the decoder of the VQ-VAE model, that is, the feature representation vector and the 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 coding it learns has strong representation capabilities. That is, the output of the encoder is discretized into a set of discrete vectors, which are called codebook vectors. The output of the encoder is forced to be quantized using vectors similar to the codebook vectors instead of using continuous potential codes. The decoder maps the quantized code 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 is actually based on GatedPixelCNN, with a self-attention mechanism added to make up for the shortcoming of causal convolution that can only perceive limited context. Combining the two can achieve unaffected perception of the field of view and obtain a larger amount of data, making the model's prediction results more accurate. The self-attention mechanism allows the model to assign different attention weights to each element in a sequence when processing a sequence. Causal convolution means that the context of each element can be used to determine how much attention it should pay. The output at any time point depends only on the input before that time point, not on future input, ensuring the causal function of 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 labels, or vector embeddings from other networks. It uses two convolutional stacks (horizontal stacks and vertical stacks). 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 generation 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 with a length of 32 are divided into 8 groups, and adjacent groups are 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, 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, 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 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, and 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 few-seed area, and calculate the conversion rate R of a 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 again into the IPv6 address generation model for few-seed image coding 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 the 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 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 of each IPv6 address string, store them in the dictionary D, and record the number d of each stored string of length 16, until all IPv6 address strings are traversed, and obtain the final dictionary D. If d>=15, the prefix composed of the string of length 16 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 active IPv6 address set of the few-seed area from the collected active IPv6 addresses, and constructs a graph structure and encoding vector for the set respectively.
[0090] The feature extraction module is used to use the BiLSTM model to capture the interdependence of the previous and next samples, to vectorize the internal structure of the image, and then use the basic idea of the SDCN algorithm to perform clustering. On the basis of the original algorithm, another training objective is added to further train the representation vector through the autoencoder. So that 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 the candidate address. At the same time, a BGP prefix query is performed on the candidate address, and the candidate address that meets the requirements of the few-seed area is retained. Alias prefix detection and active IPv6 address detection are performed using distributed detection. The detection results are sent to the image generation submodule for fine-tuning after preprocessing and feature extraction. After repeated multiple times, the conversion rate target is achieved.
[0092] For any details not provided in the present invention, 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 the half-byte entropy value, and then uses the community algorithm based on maximizing the seed area density 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 utilizes the ability of the BiLSTM model to capture the previous and next dependencies 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 mining and learning the complex configuration rules of the original address, while avoiding 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 is a flow chart of the method of the present invention;
[0099] Figure 2 Generating effect diagram of IPv6 address of the present invention;
[0100] Figure 3 It is a schematic diagram of the device of the present invention. DETAILED DESCRIPTION
[0101] The present invention will be further described below by way of embodiments in conjunction with the accompanying drawings, but is not limited thereto.
[0102] Embodiment 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 the set respectively;
[0105] The purpose of constructing the graph structure is to make a preliminary screening of the data structure information between samples as a prerequisite for further obtaining the potential similarities between data samples. The purpose of constructing the encoding vector is to convert the data sample into the binary encoding form of the image, and then splice the forward and reverse encoding to obtain the encoding vector that can fully capture the front-end dependency relationship.
[0106] The data collected are:
[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 multiple channels, such as reverse lookup of IPv4 address pointer records (PTR), NXDOMAIN record extraction, etc. Then perform a reverse query on the candidate domain names and obtain active IPv6 addresses from the reverse query AAAA records.
[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 name lists, 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, and 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, and the active IPv6 addresses corresponding to the 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 the 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, the seed addresses in each address space are processed into a graph structure;
[0116] First, calculate the distance d between all seedsj , form a distance list, sort the distance list, remove duplicate and overlong edges, and the threshold of overlong 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 example, the condition is to add the shortest edge and maximize the density of the connected components (i.e., the accessibility between vertices). After the addition is completed, the graph G i It becomes a connected graph, i.e., a 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, i.e., density = N / ε, where ε 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 smaller 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 (The dimension is N×N).
[0122] The specific steps to construct the encoding vector are:
[0123] (121) Convert the active IPv6 address set of the few-seed area 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, with adjacent groups separated by colons. Each group contains 4 hexadecimal numbers, so each IPv6 address is considered as an 8-dimensional vector, with each dimension represented by 16 binary numbers, 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 a binary encoding vector of N×16×16 Right now in, Depend on composition, Represented by 16 16-dimensional sequences, binary coded 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 of the previous and next samples, 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 objective is added to the original algorithm to improve the model. This training objective 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 round, train the model, and save the model after training is completed;
[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, so the BiLSTM encoder can fully learn the time series-based front-back dependency of the original binary encoding vector X, avoiding excessive generation of seed addresses that are not in the few-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 the hyperparameters learning rate, training batch, round, etc.
[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 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, represents the 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, the DBSCAN clustering algorithm is used for clustering training. Since the IID based on the RFC 7707 document can be divided into embedded IPv4, embedded port, IEEE derived, low byte, mode byte and randomization, the number of clusters is dynamically adjusted during the training of the DBSCAN algorithm, making the number of clusters 6. After the training is completed, the distribution of cluster centers P is obtained;
[0142] DNN refers to a machine learning model containing multiple hidden layers, namely a deep neural network (Deep Neural Network), which has powerful nonlinear expression capabilities and the ability to learn complex data patterns. DNN consists of an input layer, a hidden layer, and an output layer. The hidden layer is the core part of DNN and can capture complex relationships and patterns in data through nonlinear transformations.
[0143] (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 This improves clustering performance;
[0144] Specific:
[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 fusion in the previous layer L-1 and the 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 Weight, 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, which is 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 directly performs neighborhood aggregation on the structure of the graph, and updates the representation of the central node by aggregating the feature information of the central node and its neighboring 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] Specific:
[0152] Get the feature representation vector of the last layer of fusion output of the GCN submodule
[0153] Use the decoder of the DNN submodule to represent the feature vector Decoding is done by decoding the feature representation vector C, i.e. the last layer H in the original algorithm. L Decoding is done by replacing it with a 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 last layer of feature representation vector 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 dynamic training adjustment is performed until the loss converges and the output feature representation vector And the clustering result label based on Z distribution, forming 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 few 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 the candidate address. At the same time, a BGP prefix query is performed on the candidate address, and the candidate address that meets the requirements of the few-seed area is retained. Alias prefix detection and active IPv6 address detection are performed using distributed detection. The detection results are sent to the image generation submodule for fine-tuning after preprocessing and feature extraction. 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 taken as input, and the feature representation vector As the input of the hierarchical vector quantization variational autoencoder (VQ-VAE), a hierarchical VQ-VAE model is trained. The VQ-VAE model introduces the codebook loss lanten_loss (to make the encoder output close to the encoder vector) and the regression loss recon_loss (to make the encoder output continue to be close to the selected codebook vector to prevent it from frequently fluctuating between different codebook vectors). The training is repeated until the loss converges, the training is stopped, and the model parameters are saved. The loss loss is calculated as follows: 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 is repeated until the loss converges, then 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 are used 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 is repeated until the loss converges, then 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 the 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 the feature representation vector As the input of the decoder of the VQ-VAE model, that is, the feature representation vector and the 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 coding it learns has strong representation capabilities. That is, the output of the encoder is discretized into a set of discrete vectors, which are called codebook vectors. The output of the encoder is forced to be quantized using vectors similar to the codebook vectors instead of using continuous potential codes. The decoder maps the quantized code 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 is actually based on GatedPixelCNN, with a self-attention mechanism added to make up for the shortcoming of causal convolution that can only perceive limited context. Combining the two can achieve unaffected perception of the field of view and obtain a larger amount of data, making the model's prediction results more accurate. The self-attention mechanism allows the model to assign different attention weights to each element in a sequence when processing a sequence. Causal convolution means that the context of each element can be used to determine how much attention it should pay. The output at any time point depends only on the input before that time point, not on future input, ensuring the causal function of 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 labels, or vector embeddings from other networks. It uses two convolutional stacks (horizontal stacks and vertical stacks). 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 generation 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 with a length of 32 are divided into 8 groups, and adjacent groups are 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, 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, 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 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 the 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, padded to the right by randomly filling characters based on the dictionary map to form a string of length 32;
[0177] Next, after looping through the list L', we get a string list of length 32. 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 of each IPv6 address string, store them in the dictionary D, and record the number d of each stored string of length 16, until all IPv6 address strings are traversed, and obtain the final dictionary D. If d>=15, the prefix composed of the string of length 16 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, and 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 few-seed area, and calculate the conversion rate R of a 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 again into the IPv6 address generation model for few-seed image coding for fine-tuning until R C ≥50%, stop address generation.
[0183] Embodiment 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 active IPv6 address set of the few-seed area from the collected active IPv6 addresses, and constructs a graph structure and encoding vector for the set respectively.
[0186] The feature extraction module is used to use the BiLSTM model to capture the interdependence of the previous and next samples, to vectorize the internal structure of the image, and then use the basic idea of the SDCN algorithm to perform clustering. On the basis of the original algorithm, another training objective is added to further train the representation vector through the autoencoder. So that 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 the candidate address. At the same time, a BGP prefix query is performed on the candidate address, and the candidate address that meets the requirements of the few-seed area is retained. Alias prefix detection and active IPv6 address detection are performed using distributed detection. The detection results are sent to the image generation submodule for fine-tuning after preprocessing and feature extraction. After repeated multiple times, the conversion rate target is achieved.
[0188] Although the above describes the specific implementation mode 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 creative work are still within the scope of protection of the present invention.
Claims
1. A method for generating an IPv6 address based on few-seed image coding, characterized in that: Here are the steps: (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 the set respectively; (2) Feature extraction: First, the BiLSTM model is used to capture the interdependence of the previous and next dependencies within the sample, and the internal structure of the image is represented by a vector. 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; (3) Active address generation, including 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 the candidate address. At the same time, a BGP prefix query is performed on the candidate address, and the candidate address that meets the requirements of the few-seed area is retained. Alias prefix detection and active IPv6 address detection are performed using distributed detection. The detection results are sent to the image generation submodule for fine-tuning after preprocessing and feature extraction. After repeated multiple times, the conversion rate target is achieved.
2. The method for generating an IPv6 address based on few-seed image coding according to claim 1, characterized in that: In step (1), the specific steps of constructing the graph structure are: (111) Using the DHC technology based on the 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; (112) Using a community algorithm, the seed addresses in each address space are processed into a graph structure; First, calculate the distance d between all seeds j , form a distance list, sort the distance list, remove duplicate and overlong edges, and the threshold of overlong edges is 12; 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; Finally, traverse the sorted distance list and add edges to graph G in sequence. i The condition is to add the shortest edge and maximize the density of connected components. After the addition is completed, the graph G i It becomes a connected graph, i.e., a 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, i.e., density = N / ε, where ε is the number of free dimensions and 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 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 .
3. The method for generating an IPv6 address based on few-seed image coding according to claim 2, characterized in that: In step (1), the specific steps of constructing the encoding vector are: (121) Convert the active IPv6 address set of the few-seed area 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 N×8×16 binary code vector X r ; (123) Concatenate the two encoding vectors in 1 dimension and output a binary encoding vector of N×16×16 Right now in, Depend on composition, Represented by 16 16-dimensional sequences, binary coded vectors as input for the next step.
4. The method for generating an IPv6 address based on few-seed image coding according to claim 3, characterized in that: In step (2), 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 round, train the model, and save the model after training is completed; 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 h Last and the feed-back hidden vector The feedforward latent vector and the feedback latent vector are concatenated 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 the hyperparameters learning rate, training batch, round, etc. 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, the DBSCAN clustering algorithm is used for clustering training. During the training of the DBSCAN algorithm, the number of clusters is dynamically adjusted to make the number of clusters 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 5. The method for generating an IPv6 address based on few-seed image coding according to claim 4, characterized in that: In step (23), the steps for obtaining the feature representation vector C after multi-layer spatial dimension encoding are as follows: Using the encoder pair representation vector of the DNN submodule Encode and obtain the feature representation vectors H of multiple spatial dimensions of different layers through linear transformation 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 .
6. The method for generating an IPv6 address based on few-seed image coding according to claim 5, characterized in that: Step (24) is specifically: 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; In the second step, the encoding process of each layer is obtained through graph convolution operation, that is, in, Represents the adjacency matrix h adj Perform first-order regularization, W L-1 represents weight; 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.
7. The method for generating an IPv6 address based on few-seed image coding according to claim 6, characterized in that: Step (25) is specifically: Get the feature representation vector of the last layer of fusion output of the GCN submodule Use the decoder of the DNN submodule to represent the feature vector Decode and further reconstruct the representation vector containing both the internal information of the previous and next dependencies within the sample and the structural information between samples Until the last layer of feature representation vector as input for the next step.
8. The method for generating an IPv6 address based on few-seed image coding according to claim 7, characterized in that: In step (3), specifically: (31) Image generation: (311) The feature representation vector The label label corresponding to the vector is taken as input, and the feature representation vector As the input of the hierarchical vector quantization variational autoencoder, a hierarchical VQ-VAE model is trained. The VQ-VAE model introduces the codebook loss lanten_loss and the regression loss recon_loss. The training is repeated until the loss converges, then the training is stopped and the model parameters are saved. The loss calculation formula is loss = lanten_loss + lanten_loss_weight × recon_loss, 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 vector e from the layered VQ-VAE encoder top and the underlying quantized N×12×12 feature representation vector e botto ; (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 is repeated until the loss converges, then the training is stopped and the model parameters are saved. (314) The feature representation vector e botton , feature representation vector e top and the representation vector label are used 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 is repeated until the loss converges, then 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 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 the 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; (317) The feature representation vector and the feature representation vector As the input of the decoder of the VQ-VAE model, generate the new image M×8×16 binary encoding vector X new , as input for the next step; (32) Candidate address generation: The binary coded vector X new First convert it into M hexadecimal numbers with a length of 32; Then, the M hexadecimal numbers with a length of 32 are divided into 8 groups, and adjacent groups are 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, 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, 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 S ′ ; (332) Loop through the set S ′ , 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, and the final list L is obtained, and list L is deduplicated to obtain list L ′ ; (333) For list L ′ 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. The resources to be detected are uploaded to the resource detection control node, and then the task scheduling process is called. 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. (335) The latest active IPv6 address set Update to the active IPv6 address set C in the few-seed area, and calculate the conversion rate R of a 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; (336) The updated set C is input again into the IPv6 address generation model for few-seed image coding for fine-tuning until R C ≥50%, stop address generation.
9. The method for generating an IPv6 address based on few-seed image coding according to claim 8, characterized in that: Step (333) is specifically: First, each character of the 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 L ′ , each loop generates 16 strings of length 32, each string of length 32 is padded by a string of length 16, and is padded to a string of length 32 by randomly filling characters to the right based on the dictionary map; Next, loop through the list L ′ After completion, we get a string list of length 32 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 stored string of length 16, until all IPv6 address strings are traversed, and obtain the final dictionary D. If d>=15, the prefix composed of the string of length 16 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.
10. An IPv6 address generation device based on few-seed image coding, characterized in that: include: The preprocessing module is used for data collection. It extracts the active IPv6 address set of the few-seed area from the collected active IPv6 addresses, and constructs a graph structure and encoding vector for the set respectively. The feature extraction module is used to use the BiLSTM model to capture the interdependence of the previous and next samples, to vectorize the internal structure of the image, and then use the basic idea of the SDCN algorithm to perform clustering. On the basis of the original algorithm, another training objective is added 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 the candidate address. At the same time, a BGP prefix query is performed on the candidate address, and the candidate address that meets the requirements of the few-seed area is retained. Alias prefix detection and active IPv6 address detection are performed using distributed detection. The detection results are sent to the image generation submodule for fine-tuning after preprocessing and feature extraction. After repeated multiple times, the conversion rate target is achieved.
Citation Information
Patent Citations
Method for effectively measuring and constructing IPv6 network topology
CN110557286A
Dynamic IPv6 address detection method based on density
CN111432043A
IPv6 address mode mining method and device, electronic equipment and storage medium
CN113282805A
Active address detection method and device based on graph community discovery
CN113382092A
Method and device for determining active IPv6 address
CN116366603A
Cited By
Efficient IPv6 address detection method based on neural network model
CN120675973A
IPv6 stateless address dynamic planning method and system based on elastic prefix
CN120729837A
Seed-free area detection method and device based on IPv6 address segmentation generation
CN120812030A