IPv6 address detection methods, devices and electronic equipment

CN116800720BActive Publication Date: 2026-09-01BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310714674.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2026-09-01
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

[0003]目前,获取IPv6种子列表,通常包括主动探测和被动收集两种方式;由于IPv6地址空间的稀疏性,IPv4地址空间的主动探测方法难以应用于IPv6地址空间;被动收集的方式局限于数据集的质量,而且数据集的质量会随着时间的流逝而降低,导致现有的IPv6地址探测方法存在最终获取的活跃地址命中率较低的现状

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116800720B_ABST
    Figure CN116800720B_ABST
Patent Text Reader

Abstract

This invention provides an IPv6 address detection method, apparatus, and electronic device, comprising: if a target user terminal is detected to be connected to the Internet, obtaining the IPv6 address of the target user terminal; calculating the address range of the IPv6 addresses to obtain an IPv6 seed list; extracting a pre-defined prefix of all IPv6 addresses within the address range; assembling the prefix and a pre-generated interface identifier to obtain a target address; sending a pre-defined ICMPv6 echo request to the target address and listening for the returned message; and determining the active IPv6 address corresponding to the IPv6 seed list based on the returned message. This method increases the active address hit rate of IPv6 address detection by obtaining the IPv6 address of the target user terminal in a mobile network scenario where the target user terminal is connected to the Internet, thereby constructing a more active IPv6 seed list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cyberspace asset technology, and in particular to an IPv6 address detection method, apparatus, and electronic device. Background Technology

[0002] With the continuous development of mobile internet, the types and numbers of network devices are constantly increasing. The IPv4 (Internet Protocol version 4) address space was exhausted in 2019, while IPv6 (Internet Protocol version 6), with its 128-bit address length, offers a vast address space. IP address discovery and IPv6 topology probing are crucial in network security assessments and penetration testing. Therefore, proposing a high-hit-rate IPv6 scanning method is of great practical significance.

[0003] Currently, obtaining an IPv6 seed list typically involves two methods: active probing and passive collection. Due to the sparsity of the IPv6 address space, active probing methods for the IPv4 address space are difficult to apply to the IPv6 address space. Passive collection is limited by the quality of the dataset, and the quality of the dataset decreases over time, resulting in a low hit rate for the active addresses obtained by existing IPv6 address probing methods. Summary of the Invention

[0004] The purpose of this invention is to provide an IPv6 address detection method, apparatus, and electronic device to improve the hit rate of active addresses obtained by the IPv6 address detection method.

[0005] In a first aspect, embodiments of the present invention provide an IPv6 address detection method, comprising: if a target user terminal is detected to be connected to the Internet, obtaining the IPv6 address of the target user terminal; the number of target user terminals is multiple; calculating the address range of the IPv6 addresses to obtain an IPv6 seed list; extracting a preset number of bits of prefix for all IPv6 addresses within the address range; assembling the prefix and a pre-generated interface identifier to obtain a target address; sending a preset ICMPv6 echo request to the target address and listening to the return message, and determining the active IPv6 address corresponding to the IPv6 seed list based on the return message.

[0006] In a preferred embodiment, the method includes the steps of sending a preset ICMPv6 echo request to the target address and listening to the return message, and determining the active IPv6 address corresponding to the IPv6 seed list based on the return message. After that, the method further includes: obtaining routing data corresponding to the active IPv6 address; performing deduplication processing on the routing data to obtain processed routing data; and drawing an IPv6 address topology map based on the processed routing data.

[0007] In a preferred embodiment, after obtaining the IPv6 address of the target user terminal, the method includes the steps of generating an address cluster based on the IPv6 address and calculating the address range of the IPv6 address to obtain an IPv6 seed list, which includes calculating the address range of the address cluster to obtain the IPv6 seed list.

[0008] In a preferred embodiment, the interface identifier is generated as follows: when the target user terminal receives the configuration information of the IPv6 address sent by the mobile network core network element, the interface identifier is generated based on the configuration information.

[0009] In a preferred embodiment, the interface identifier is ::1; the preset number of bits prefix is ​​the / 64 prefix of the IPv6 address.

[0010] In a preferred embodiment, after calculating the address range of the IPv6 addresses to obtain the IPv6 seed list, the method includes: generating new IPv6 addresses based on the IPv6 addresses using a density-based address generation algorithm; and adding the new IPv6 addresses to the IPv6 seed list to obtain an updated IPv6 seed list.

[0011] In a preferred embodiment, after the step of adding the new IPv6 address to the IPv6 seed list to obtain the updated IPv6 seed list, the method further includes: generating an update target address based on the updated IPv6 seed list; sending a preset ICMPv6 echo request to the update target address and listening for the return message; and determining the active IPv6 address corresponding to the updated IPv6 seed list based on the return message.

[0012] In a preferred embodiment, the step of sending a preset ICMPv6 echo request to the target address includes: sending a preset ICMPv6 echo request to the target address using a preset route detection tool.

[0013] Secondly, embodiments of the present invention provide an IPv6 address detection device, comprising: a seed list generation module, configured to obtain the IPv6 address of a target user terminal if a target user terminal is detected to be connected to the Internet; the number of target user terminals is multiple; calculate the address range of the IPv6 addresses to obtain an IPv6 seed list; an address generation module, configured to extract a preset number of bits of prefix for all IPv6 addresses within the address range; a detection module, configured to assemble the prefix and a pre-generated interface identifier to obtain a target address; send a preset ICMPv6 echo request to the target address and listen for the return message, and determine the active IPv6 address corresponding to the IPv6 seed list based on the return message.

[0014] Thirdly, embodiments of the present invention provide an electronic device, wherein the electronic device includes a processor and a memory, the memory storing machine-executable instructions executable by the processor, and the processor executing the machine-executable instructions to implement the IPv6 address detection method of any one of the first to seventh possible embodiments of the first aspect.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] This invention provides an IPv6 address detection method, apparatus, and electronic device, comprising: if a target user terminal is detected to be connected to the Internet, obtaining the IPv6 address of the target user terminal; the number of target user terminals is multiple; calculating the address range of the IPv6 addresses to obtain an IPv6 seed list; extracting a preset number of bits of prefix for all IPv6 addresses within the address range; assembling the prefix and a pre-generated interface identifier to obtain a target address; sending a preset ICMPv6 echo request to the target address and listening for the returned message; and determining the active IPv6 address corresponding to the IPv6 seed list based on the returned message. This method increases the active address hit rate of IPv6 address detection by obtaining the IPv6 address of the target user terminal in a mobile network scenario where the target user terminal is connected to the Internet, thereby constructing a more active IPv6 seed list.

[0017] Other features and advantages disclosed in this embodiment will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.

[0018] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating an IPv6 address detection method provided in an embodiment of the present invention;

[0021] Figure 2 This is a schematic diagram illustrating the format of an Option field provided in an embodiment of the present invention;

[0022] Figure 3 A flowchart illustrating another IPv6 address detection method provided in an embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram illustrating the process of IPv6 address allocation between an SMF and a device terminal, provided in an embodiment of the present invention.

[0024] Figure 5 This is a schematic diagram of the structure of an IPv6 address detection device provided in an embodiment of the present invention;

[0025] Figure 6 This is a schematic diagram of an interaction scenario for an IPv6 address detection device provided in an embodiment of the present invention;

[0026] Figure 7 This is a schematic diagram illustrating the operation of a detection module according to an embodiment of the present invention;

[0027] Figure 8 This invention provides a schematic diagram of an electronic device structure.

[0028] Icons: 51-Seed list generation module; 52-Address generation module; 53-Detection module; 54-Topology generation module; 55-Diffusion module; 81-Memory; 82-Processor; 83-Bus; 84-Communication interface. Detailed Implementation

[0029] With the development of mobile internet, the types and numbers of user terminals on the internet are constantly increasing, and there is a trend of IPv4 address exhaustion and IPv6 addresses gradually replacing IPv4 addresses. To efficiently probe terminals and perform topology scanning in IPv6 networks, it is necessary to improve the efficiency of IPv6 scanning and reduce network bandwidth consumption. This will allow for efficient scanning and topology probing of terminal and network devices with minimal impact on the existing network.

[0030] To address this situation, IPv4 network topology probing primarily employs random address generation and brute-force methods to exhaustively search the IPv4 address space. Because the IPv4 address space is smaller than the IPv6 address space, existing network speeds allow for traversing the entire IPv4 address space within a finite timeframe, making brute-force a feasible approach. Yarrp probes, by randomly arranging the address space and lifetime of the target network, send probe packets in random directions across the network, thus avoiding overloading a single router. However, a fundamental difference between IPv6 and IPv4 networks is that IPv6 has a vast address space, and the distribution of valid addresses is sparse. In a computer network, if one party sends a data packet and an address receives it, that address is considered valid. Sparsity refers to the fact that, relative to the total number of addresses in the entire IPv6 address space, the number of valid addresses occupies only a small fraction of the entire address space. An IPv6 address can be divided into two parts: a network prefix occupying N bits, equivalent to the network ID in an IPv4 address, and an interface identifier occupying 128-N bits, equivalent to the host ID in an IPv4 address. The second difference between IPv6 and IPv4 networks is that routers limit the sending rate of ICMPv6 packets [1,2]. The ICMPv6 protocol plays a crucial role in route probing and device discovery. After a probe sends an ICMPv6 echo request to a target address, it returns an ICMPv6 echo response if the target address is active, and an ICMPv6 destination unreachable message if the route to the target address is unreachable. The purpose of route probing is to obtain the addresses of the routers traversed from the probe to the target address. Specifically, the probe can fix the Time-to-Live (TTL) value in the IPv6 packet. For example, if TTL=3, the packet will be discarded after passing through the third router, and the third router will also return an ICMPv6 timeout response to the probe. Ideally, for route probing, the probe can simultaneously send 30 packets with TTLs from 1 to 30 to an active address to detect all the routers traversed from the probe to the active address.

[0031] Therefore, to perform address discovery and topology probing in IPv6 networks, it is necessary to solve the two problems mentioned above that do not exist in the IPv4 address space.

[0032] Obtain the IPv6 seed list, which is the list of active IPv6 addresses in the Internet. Common methods include active generation and passive generation. Active generation methods include exhaustively enumerating all / 32 prefix / 48 addresses[6]. Passive generation methods extract active IPv6 addresses from BGP update messages and network traffic and put them into the IPv6 seed list. In the active generation method, the specific steps of exhaustively enumerating all / 32 prefix / 48 addresses are as follows: 1. Collect the 32 prefix data of the global routing table. 2. Exhaustively enumerate all / 32 prefix / 48 prefixes and set the remaining 60 bits to ::1. Thus, the IPv6 seed list is obtained. The method of exhaustively enumerating all / 32 prefix / 48 addresses does not take into account the / 64 prefix after the / 48 prefix. The / 64 prefix is ​​also a prefix in the IPv6 address structure. Many terminal devices will be assigned a non-zero / 48 prefix followed by a / 64 prefix. Therefore, this method cannot cover some terminal devices and routers.

[0033] Common approaches to generating target addresses include using machine learning to extract the IPv6 address structure and generate new addresses; and introducing the concept of density to generate address ranges with the highest possible address density. Density-based address generation methods include the following steps:

[0034] 1. Obtain the seed address set: Search for publicly available address sets on the network and add them to the seed address set.

[0035] 2. Initialize the result set: Traverse the seed addresses, adding one seed address to the cluster in each round of traversal, and then adding this cluster to the result set. Calculate the range of the cluster. The range is calculated by counting the number of IPv6 addresses traversed from the smallest IPv6 address to the largest IPv6 address. We consider ::1 to be less than ::f in the IPv6 address range.

[0036] 3. Finding Candidate Seeds: The goal is to find the candidate seed set for each cluster. Using the cluster range calculated in step two, the Hamming distance from each seed address to the cluster range can be calculated, and the seed with the smallest distance to the cluster is added to the candidate seed set for that cluster. We assume that the Hamming distance is calculated by counting the number of different characters at corresponding positions in two strings of equal length. For example, the Hamming distance between the IPv6 addresses ::1111 and ::ffff is 4.

[0037] 4. Cluster Growth: The goal is to maximize cluster density. Cluster density can be calculated by dividing the number of seed addresses within the cluster by the cluster's range. The specific steps are as follows:

[0038] a. Traverse all clusters in the result set.

[0039] b. For each cluster, iterate through the candidate seeds of the cluster.

[0040] c. For each candidate seed, add it to the cluster and calculate the cluster's range. Then, add any remaining candidate seeds within this range to the cluster. Calculate the cluster density before adding the candidate seeds and the cluster density after adding them. If the cluster density increases after adding the candidate seeds, then update the cluster.

[0041] 5. Define a threshold for reducing the range, and call the method for growing the cluster in step 4 repeatedly. Stop the loop when the range of the cluster is reduced to the threshold.

[0042] Density-based address generation methods are also highly dependent on the quality of the seed address set. If the seed addresses in the address set have low activity, the hit rate of the resulting set generated by this method will decrease. The hit rate is calculated by dividing the number of valid packets returned by the target address by the number of probe packets sent by the probe.

[0043] In the field of IPv6 topology probing, CAIDA's (Center for Applied Internet Data Analysis) Ark probe collects IPv6 prefixes from global BGP routing tables and constructs the remaining fields as ::1 plus random characters to perform Paris route probing on the target. We can obtain publicly available IPv6 prefixes from regional Internet Registries (LANs) in their BGP routing tables, such as 2401:1000::. This prefix only fills the first 32 bits of the 128-bit IPv6 address. Ark sets the last 96 bits to 0000:0000:0000:0000:0001, abbreviated as ::1. Next, it sends Paris route probing messages to the generated address to obtain the target's topology. (The main function of Paris route probing is to control all probes to follow the same routing path, thereby improving the accuracy of route probing.) Ark's method is limited to existing BGP routing tables, has low versatility, and can only discover topologies on a broad scale within the Internet, not in a deep topology.

[0044] Based on this, embodiments of the present invention provide an IPv6 address detection method, apparatus, and electronic device. This method obtains the IPv6 address of a target user terminal in a mobile network scenario where the target user terminal is connected to the Internet, thereby constructing a more active IPv6 seed list and increasing the active address hit rate of IPv6 address detection. To facilitate understanding of the embodiments of the present invention, a detailed description of the IPv6 address detection method disclosed in the embodiments of the present invention will be provided first.

[0045] Example 1

[0046] In this embodiment, Figure 1This is a flowchart illustrating an IPv6 address detection method provided in an embodiment of the present invention.

[0047] Depend on Figure 1 As seen, the method includes:

[0048] Step S101: If it is detected that the target user terminal is connected to the Internet, obtain the IPv6 address of the target user terminal; there are multiple target user terminals.

[0049] In mobile networks, every time a user terminal connects to the internet, the SMF (Software-Defined Network) element in the core network uses the SLAAC (Service-Based Access Control) protocol to assign a new IPv6 address prefix to the terminal device. In the SLAAC protocol, before a host connects to the internet, it needs to send an ICMP Router Solicitation (RS) message to the router, and the router returns an ICMP Router Advertisement (RA) message. The following describes the IPv6 address representation: IPv6 addresses are 128 bits in size. The preferred IPv6 address representation is x:x:x:x:x:x:x:x, where each x occupies 16 bits. The IPv6 address range is from 0000:0000:0000:0000:0000:0000:0000:0000 to ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff. Double colons: IPv6 addresses are specified by replacing a series of zeros with double colons (::). For example, the IPv6 address 2001:0000:0000:0000:0000:0000:0000:1 can be written as 2001::1. A double colon can only be used once in an IP address. Leading zeros are omitted: for example, the IPv6 address 2001::0001 can be written as 2001::1.

[0050] For ease of understanding, Figure 2 This is a schematic diagram illustrating the format of an Option field provided in an embodiment of the present invention. Figure 2 As you can see, the RA carries a prefix assigned to the host and the prefix length. After receiving the RA, the host generates an interface identifier locally and assembles it with the prefix in the RA to form a complete IPv6 address.

[0051] Step S102: Calculate the address range of the above IPv6 addresses to obtain the IPv6 seed list.

[0052] Here, each disconnection and reconnection of the terminal device's network connection results in the acquisition of an IPv6 address from an active terminal. Each disconnection and reconnection constitutes one round. After 5000 rounds, these addresses are collected into an address cluster, and the address range of this cluster is calculated. This yields the aforementioned IPv6 seed list.

[0053] Furthermore, the definition of an address range is as follows: An address range represents all addresses from the minimum address to the maximum address. For example, if an IPv6 address is 2001::1, then an address range consists of five addresses from 2001::1 to 2001::5.

[0054] The following describes the method for comparing address sizes: Starting from the rightmost side of an IPv6 address, compare each character from right to left. For example, when comparing 2001::1111 and 2001::2111, when comparing from right to left to the characters 2 and 1, 2001::2111 is determined to be larger than 2001::1111.

[0055] The following describes how to calculate the address range of an address cluster: Assume we have five addresses: 2001::1, 2001::2, 2001::5, 2001::7, and 2001::9. Find the smallest address among these five, which is 2001::1, and the largest address, 2001::9. The address range then consists of nine addresses, from 2001::1 to 2001::9.

[0056] The following explains the difference between an address and an address range: An address represents a single IPv6 address, such as 2001::1. An address range represents all addresses from the minimum address to the maximum address, such as 2001::1 to 2001::100.

[0057] Step S103: Extract the prefix of the preset number of bits for all IPv6 addresses within the above address range.

[0058] Step S104: Assemble the above prefix and the pre-generated interface identifier to obtain the target address.

[0059] In this embodiment, the address range described above is exhaustively enumerated, the address range of the IPv6 seed list is calculated, and all addresses from the minimum address to the maximum address of the address range are selected. The / 64 prefix of each address is extracted, the interface identifier is set to ::1, and the interface identifier and the extracted prefix are combined to form a complete IPv6 address, which is used as the target address.

[0060] Step S105: Send a preset ICMPv6 echo request to the target address and listen for the return message. Based on the return message, determine the active IPv6 address corresponding to the IPv6 seed list.

[0061] Here, an ICMPv6 echo request is constructed using publicly available route probing tools on the network, sent to the aforementioned target address, and the system listens for return packets. If the first 64 bits of a user terminal's IPv6 address match the first 64 bits of the target address, the user terminal will return an ICMPv6 destination unreachable message. Upon receiving an ICMPv6 port unreachable message, the system extracts the first 64 bits of the address prefix and compares it with a seed list to see if a matching prefix exists. If found, the source address in the ICMPv6 destination unreachable message is identified as an active address and added to the active address set. After obtaining the active address, a route probing probe is constructed and sent to this active address and intermediate routers to obtain routing data.

[0062] The principle behind step S104 above is explained below: 1. In a mobile IPv6 network, the user terminal acts as a router. When the first 64 bits of the IPv6 address are the same as the user terminal's IPv6 address, the ICMPv6 message will pass through this user terminal. 2. After receiving this message, the device terminal compares whether the interface identifier is the same as its own interface identifier. If they are different, it uses its own complete address as the source address and returns an ICMPv6 destination unreachable message.

[0063] This invention provides an IPv6 address detection method, comprising: if a target user terminal is detected to be connected to the Internet, obtaining the IPv6 address of the target user terminal; wherein there are multiple target user terminals; calculating the address range of the IPv6 addresses to obtain an IPv6 seed list; extracting a preset number of bits of prefix for all IPv6 addresses within the address range; assembling the prefix and a pre-generated interface identifier to obtain a target address; sending a preset ICMPv6 echo request to the target address and listening for the returned message; and determining the active IPv6 address corresponding to the IPv6 seed list based on the returned message. This method increases the active address hit rate of IPv6 address detection by obtaining the IPv6 address of the target user terminal in a mobile network scenario where the target user terminal is connected to the Internet, thereby constructing a more active IPv6 seed list.

[0064] Example 2

[0065] In this embodiment, Figure 3 This is a flowchart illustrating another IPv6 address detection method provided in an embodiment of the present invention.

[0066] Step S201: If it is detected that the target user terminal is connected to the Internet, obtain the IPv6 address of the target user terminal; there are multiple target user terminals.

[0067] Step S202: Calculate the address range of the above IPv6 addresses to obtain the IPv6 seed list.

[0068] In this embodiment, after step S201, the method includes: generating an address cluster based on the IPv6 address; step S202 includes: calculating the address range of the address cluster to obtain the IPv6 seed list.

[0069] Step S203: Extract the preset number of bits of prefix for all IPv6 addresses within the above address range.

[0070] Step S204: Assemble the above prefix and the pre-generated interface identifier to obtain the target address.

[0071] Here, the interface identifier is generated as follows: when the target user terminal receives the configuration information of the IPv6 address sent by the mobile network core network element, the interface identifier is generated based on the configuration information. Further, the interface identifier is ::1; the preset bit prefix is ​​the / 64 prefix of the IPv6 address.

[0072] In practice, the SMF (Service Provider Function) network element resides within the mobile communication network. Whenever a device terminal connects to the Internet, it must go through the SMF to be assigned an IP address. At this time, the SMF sends an IPv6 address configuration to the terminal device, which includes a prefix generated by the SLAAC protocol. After receiving the address configuration, the UE locally generates a random interface identifier and assembles the prefix and interface identifier into the aforementioned target address.

[0073] For ease of understanding, Figure 4 This is a schematic diagram illustrating the process of IPv6 address allocation between an SMF and a device terminal, as provided in an embodiment of the present invention.

[0074] Step S205: Send a preset ICMPv6 echo request to the target address and listen for the return message. Based on the return message, determine the active IPv6 address corresponding to the IPv6 seed list.

[0075] In this embodiment, the step of sending a preset ICMPv6 echo request to the target address includes: sending a preset ICMPv6 echo request to the target address through a preset route detection tool.

[0076] Step S206: Obtain the routing data corresponding to the above active IPv6 addresses.

[0077] Step S207: Perform deduplication on the above routing data to obtain the processed routing data.

[0078] Step S208: Draw an IPv6 address topology map based on the processed routing data.

[0079] In one embodiment, after step S202, the method includes: generating a new IPv6 address based on the IPv6 address using a density-based address generation algorithm; adding the new IPv6 address to the IPv6 seed list to obtain an updated IPv6 seed list; generating an updated target address based on the updated IPv6 seed list; sending a preset ICMPv6 echo request to the updated target address and listening for the returned message; and determining the active IPv6 address corresponding to the updated IPv6 seed list based on the returned message.

[0080] This invention provides an IPv6 address detection method, comprising: if a target user terminal is detected to be connected to the Internet, obtaining the IPv6 address of the target user terminal; the number of target user terminals is multiple; calculating the address range of the IPv6 addresses to obtain an IPv6 seed list; extracting a preset number of bits of prefix for all IPv6 addresses within the address range; assembling the prefix and a pre-generated interface identifier to obtain a target address; sending a preset ICMPv6 echo request to the target address and listening for the returned message, determining the active IPv6 address corresponding to the IPv6 seed list based on the returned message; obtaining routing data corresponding to the active IPv6 address; performing deduplication processing on the routing data to obtain processed routing data; and drawing an IPv6 address topology map based on the processed routing data. This method increases the active address hit rate of IPv6 address detection by obtaining the IPv6 address of the target user terminal in a mobile network scenario where the target user terminal is connected to the Internet, thereby constructing a more active IPv6 seed list and further drawing an IPv6 address topology map to obtain deeper network topology information.

[0081] Example 3

[0082] Figure 5 This is a schematic diagram of an IPv6 address detection device provided in an embodiment of the present invention. Figure 5 As seen, the device includes:

[0083] The seed list generation module 51 is used to obtain the IPv6 address of the target user terminal if it is detected that the target user terminal is connected to the Internet; the number of the target user terminals is multiple; and to calculate the address range of the IPv6 addresses to obtain the IPv6 seed list.

[0084] Here, the user terminal corresponding to the seed list generation module 51 can be operated manually, which is different from the target user terminal mentioned above.

[0085] Address generation module 52 is used to extract a preset number of bits prefix for all IPv6 addresses within the above address range.

[0086] The detection module 53 is used to assemble the above-mentioned prefix and the pre-generated interface identifier to obtain the target address; send a preset ICMPv6 echo request to the target address and listen for the return message; and determine the active IPv6 address corresponding to the above-mentioned IPv6 seed list based on the return message.

[0087] The seed list generation module 51, the address generation module 52, and the detection module 53 are connected in sequence.

[0088] In this embodiment, the above-mentioned apparatus further includes a topology generation module 54. The topology generation module 54 is used to obtain routing data corresponding to the active IPv6 addresses; to perform deduplication processing on the routing data to obtain processed routing data; and to draw an IPv6 address topology map based on the processed routing data.

[0089] Furthermore, Figure 6 This is a schematic diagram of an interactive scenario of an IPv6 address detection device provided in an embodiment of the present invention.

[0090] In one embodiment, the seed list generation module 51 is further configured to generate address clusters based on the IPv6 addresses and calculate the address range of the IPv6 addresses to obtain the IPv6 seed list, which includes: calculating the address range of the address clusters to obtain the IPv6 seed list.

[0091] In this embodiment, the above-mentioned device further includes a diffusion module 55. The diffusion module 55 is used to generate new IPv6 addresses based on the IPv6 addresses using a density-based address generation algorithm; and to add the new IPv6 addresses to the IPv6 seed list to obtain an updated IPv6 seed list.

[0092] In one embodiment, the detection module 53 is further configured to generate an update target address based on the updated IPv6 seed list; send a preset ICMPv6 echo request to the update target address, listen for the return message, and determine the active IPv6 address corresponding to the updated IPv6 seed list based on the return message.

[0093] In one embodiment, the detection module 53 is further configured to send a preset ICMPv6 echo request to the target address using a preset route detection tool.

[0094] For ease of understanding, Figure 7This is a schematic diagram illustrating the operation of a detection module according to an embodiment of the present invention.

[0095] The IPv6 address detection device provided in this embodiment of the invention has the same technical features as the IPv6 address detection method provided in the above embodiments, and therefore can solve the same technical problems and achieve the same technical effects. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0096] Example 4

[0097] This embodiment provides an electronic device, including a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of an aftershock prediction method.

[0098] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of an aftershock prediction method.

[0099] See Figure 8 The diagram shows the structure of an electronic device, which includes a memory 81 and a processor 82. The memory 81 stores a computer program that can run on the processor 82. When the processor executes the computer program, it implements the steps provided by the above-mentioned aftershock prediction method.

[0100] like Figure 8 As shown, the device also includes a bus 83 and a communication interface 84, with the processor 82, the communication interface 84 and the memory 81 connected via the bus 83; the processor 82 is used to execute executable modules, such as computer programs, stored in the memory 81.

[0101] The memory 81 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 84 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0102] Bus 83 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0103] The memory 81 stores the program, and the processor 82 executes the program after receiving the execution instruction. The method performed by the aftershock prediction device disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 82, or implemented by the processor 82. The processor 82 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 82 or by instructions in the form of software. The processor 82 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 81, and processor 82 reads information from memory 81 and, in conjunction with its hardware, completes the steps of the above method.

[0104] Furthermore, this embodiment of the invention also provides a machine-readable storage medium storing machine-executable instructions. When these machine-executable instructions are invoked and executed by the processor 82, they cause the processor 82 to implement the above-described aftershock prediction method.

[0105] The electronic devices and computer-readable storage media provided in the embodiments of the present invention have the same technical features, so they can also solve the same technical problems and achieve the same technical effects.

[0106] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0107] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

Claims

1. A method of IPv6 address probing, characterized by, include: If the target user terminal is detected to be connected to the Internet, obtain the IPv6 address of the target user terminal; The number of target user terminals is multiple; Calculate the address range of the IPv6 addresses to obtain the IPv6 seed list; The seed list is determined based on the address range of the address clusters generated from the IPv6 addresses; Extract the prefix of a preset number of bits for all IPv6 addresses within the specified address range; The target address is obtained by assembling the prefix and the pre-generated interface identifier; A preset ICMPv6 echo request is sent to the target address, and the return message is listened for. Based on the return message, the active IPv6 address corresponding to the IPv6 seed list is determined.

2. The IPv6 address detection method of claim 1, wherein, The method further includes the steps of sending a preset ICMPv6 echo request to the target address, listening for the return message, and determining the active IPv6 address corresponding to the IPv6 seed list based on the return message. Obtain the routing data corresponding to the active IPv6 address; The routing data is deduplicated to obtain the processed routing data; Based on the processed routing data, draw an IPv6 address topology map.

3. The IPv6 address detection method according to claim 1, characterized in that, After obtaining the IPv6 address of the target user terminal, the method includes: Generate an address cluster based on the IPv6 address; The steps of calculating the address range of the IPv6 addresses to obtain the IPv6 seed list include: The address range of the address cluster is calculated to obtain the IPv6 seed list.

4. The IPv6 address detection method according to claim 1, characterized in that, The interface identifier is generated in the following manner: When the target user terminal receives the configuration information of the IPv6 address sent by the mobile network core network element, it generates the interface identifier based on the configuration information.

5. The IPv6 address detection method according to claim 4, characterized in that, The interface identifier is ::1; the preset number of bits prefix is ​​the / 64 prefix of the IPv6 address.

6. The IPv6 address detection method according to claim 1, characterized in that, After calculating the address range of the IPv6 addresses to obtain the IPv6 seed list, the method includes: Based on the IPv6 address, a new IPv6 address is generated using a density-based address generation algorithm; The new IPv6 address is added to the IPv6 seed list to obtain an updated IPv6 seed list.

7. The IPv6 address detection method according to claim 6, characterized in that, After adding the new IPv6 address to the IPv6 seed list to obtain the updated IPv6 seed list, the method further includes: Based on the updated IPv6 seed list, generate the updated target address; A preset ICMPv6 echo request is sent to the target address for update, and the return message is listened for. Based on the return message, the active IPv6 address corresponding to the updated IPv6 seed list is determined.

8. The IPv6 address detection method according to claim 1, characterized in that, The step of sending a preset ICMPv6 echo request to the target address includes: A preset ICMPv6 echo request is sent to the target address using a preset route detection tool.

9. An IPv6 address detection device, characterized in that, include: The seed list generation module is used to obtain the IPv6 address of the target user terminal if it is detected that the target user terminal is connected to the Internet; The number of target user terminals is multiple; the address range of the IPv6 addresses is calculated to obtain the IPv6 seed list; The seed list is determined based on the address range of the address clusters generated from the IPv6 addresses; The address generation module is used to extract a preset number of bits of prefix for all IPv6 addresses within the address range; The detection module is used to assemble the prefix and the pre-generated interface identifier to obtain the target address; A preset ICMPv6 echo request is sent to the target address, and the return message is listened for. Based on the return message, the active IPv6 address corresponding to the IPv6 seed list is determined.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the IPv6 address detection method according to any one of claims 1 to 7.