Network address determination methods, devices, electronic equipment and storage media

By generating extended addresses and selecting target scanning addresses based on their activity levels, the problems of high computational cost and uneven distribution of target addresses in existing IPv6 address scanning methods are solved, thereby improving the hit rate and efficiency of IPv6 network address scanning.

CN119484482BActive Publication Date: 2025-10-28TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411522517.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-10-28
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

Existing IPv6 address scanning methods have high computational costs for constructing tree structures and make it difficult to reconstruct tree structures in real time using new addresses. This results in a low target address hit rate and an uneven distribution of generated target addresses, leading to large deviations in scanning results and potentially causing network congestion.

Method used

Extended addresses are generated from known addresses. The activity of these extended addresses is used to calculate evolutionary advantages. Extended addresses are then selected to generate target scan addresses, thereby improving the hit rate of target addresses.

Benefits of technology

It improves the hit rate of target addresses, reduces the deviation of scan results, reduces interference with the network, and improves scanning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484482B_ABST
    Figure CN119484482B_ABST
Patent Text Reader

Abstract

This invention provides a network address determination method, apparatus, electronic device, and storage medium. The method includes: determining multiple target extended addresses based on the target value corresponding to each extended address in an extended address set. The target value corresponding to each extended address is determined based on the active state of each extended address. The target value indicates the evolutionary advantage of each extended address. The extended address set includes multiple known addresses and multiple extended addresses corresponding to each known address. The multiple extended addresses corresponding to each known address are obtained by expanding the address range corresponding to each known address. The method also includes determining a target scanning address based on the multiple target extended addresses. The target scanning address is different from any address in the extended address set. This method generates extended addresses from known addresses, discovers more extended addresses, and improves the hit rate of target addresses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for determining network addresses. Background Technology

[0002] With the continuous increase in the number of global internet users and the access of numerous new devices, IPv4 addresses have become increasingly scarce. To address this issue and support the future development needs of the internet, IPv6, as the next-generation IP protocol, has been widely adopted. The IPv6 protocol solves the IPv4 address shortage problem by extending address length.

[0003] Traditional IPv4 address scanning techniques are no longer feasible in IPv6. Therefore, researching address scanning techniques specifically for IPv6 is of great significance for IPv6 network security. To effectively perform address scanning in IPv6 networks, researchers have proposed various IPv6 address scanning methods. The main principle of these methods is to mine patterns from known addresses (seed addresses) and generate target addresses based on these patterns. 6Tree is a typical representative of this type of method. It uses the Split Hierarchical Clustering (DHC) algorithm to discover patterns in seed addresses and introduces a density-feedback-based dynamic address generation strategy, which significantly improves the hit rate of target addresses.

[0004] However, existing IPv6 address scanning methods have high computational costs for constructing tree structures, making it difficult to reconstruct the tree structure in real time using new addresses. Consequently, they cannot utilize new addresses to discover patterns, reducing the hit rate of target addresses. Furthermore, the generated target addresses are concentrated in a few high-density patterns, which not only leads to significant deviations in scan results but also reduces the hit rate of target addresses when there is a large discrepancy between the pattern density and the actual address distribution. Summary of the Invention

[0005] This invention provides a network address determination method, apparatus, electronic device, and storage medium, which generates extended addresses from known addresses, discovers more extended addresses, and improves the hit rate of target addresses.

[0006] This invention provides a network address determination method, comprising the following steps: determining multiple target extended addresses based on the target value corresponding to each extended address in an extended address set, wherein the extended address set includes multiple known addresses and multiple extended addresses corresponding to the multiple known addresses, the target value corresponding to each extended address is determined based on the active state corresponding to each extended address, and the target value corresponding to each extended address is used to indicate the evolutionary advantage corresponding to each extended address; determining a target scanning address based on the multiple target extended addresses, wherein the target scanning address is different from any address in the extended address set.

[0007] According to a network address determination method provided by the present invention, before determining multiple target extended addresses based on the target value corresponding to each extended address in the extended address set, the method further includes: determining multiple known addresses and the active state corresponding to each known address; sequentially selecting at least one address bit in each known address, and updating the character corresponding to the selected at least one address bit each time to a specified character, thereby obtaining multiple extended addresses corresponding to each known address, wherein the selected at least one address bit is not repeated each time, and the number of selected address bits each time is divisible by the total number of address bits corresponding to the known address; saving the multiple known addresses, the active state corresponding to each known address, the multiple extended addresses, and the active state corresponding to each extended address to obtain the extended address set, wherein the active state of the extended address is determined based on the active state of each known address corresponding to the extended address.

[0008] According to a network address determination method provided by the present invention, the step of saving the plurality of known addresses, the active state corresponding to each known address, the plurality of extended addresses, and the active state corresponding to each extended address to obtain the extended address set includes: obtaining a current address set; determining whether the current address set includes a current address, wherein the current address is a currently saved known address or an extended address; if the current address set does not include the current address, creating a new address record corresponding to the current address in the current address set, and modifying the number of active states or the number of inactive states in the address record according to the active state of the known address corresponding to the current address, and saving the current address; if the current address set includes the current address, incrementing the number of active states or the number of inactive states in the address record corresponding to the current address by one, and saving the current address; performing the above steps sequentially on each known address and each extended address to determine the current address set as the extended address set.

[0009] According to a network address determination method provided by the present invention, the active state corresponding to each known address is obtained by probing each known address using a target communication protocol, wherein the target communication protocol includes at least one of Internet Control Message Protocol version 6, Transmission Control Protocol, and User Datagram Protocol.

[0010] According to a network address determination method provided by the present invention, the extended address set includes the number of active states and the number of inactive states corresponding to each extended address. The step of determining multiple target extended addresses based on the target value corresponding to each extended address in the extended address set includes: calculating the fitness of each extended address based on the number of active states and the number of inactive states corresponding to each extended address, where the fitness is the target value; and determining the target extended address based on the relationship between the fitness of each extended address and a random number, where the random number is any number between 0 and 1.

[0011] According to a network address determination method provided by the present invention, the step of determining a target scanning address based on the plurality of target extended addresses includes: successively replacing a specified character in the target extended address with each character in a character set to obtain a plurality of scanning addresses, wherein the character set includes all characters from 0 to 9 and from a to f; and determining the address in the plurality of scanning addresses that is different from any address in the extended address set as the target scanning address.

[0012] The present invention also provides a network address determination device, comprising the following modules: a target extended address determination module, configured to determine multiple target extended addresses based on the target value corresponding to each extended address in the extended address set, wherein the target value corresponding to each extended address is determined based on the active state corresponding to each extended address, and the target value corresponding to each extended address is used to indicate the evolutionary advantage corresponding to each extended address, wherein the extended address set includes multiple known addresses and multiple extended addresses corresponding to each known address, and the multiple extended addresses corresponding to each known address are obtained by expanding the address range corresponding to each known address; and a target scan address determination module, configured to determine a target scan address based on the multiple target extended addresses, wherein the target scan address is different from any address in the extended address set.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the network address determination method as described above.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the network address determination method as described above.

[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the network address determination method as described above.

[0016] The network address determination method, apparatus, electronic device, and storage medium provided by this invention generate extended addresses from known addresses, discover more extended addresses, improve the hit rate of target addresses, and select extended addresses based on the evolutionary advantage of extended addresses calculated according to their activity, thereby finding target addresses with higher activity and a higher probability of survival. Attached Figure Description

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

[0018] Figure 1 This is a flowchart illustrating a network address determination method provided by the present invention.

[0019] Figure 2 This is a schematic diagram of the overall process of a network address determination method provided by the present invention.

[0020] Figure 3 This is a schematic diagram of an extended address generation method provided by the present invention.

[0021] Figure 4 This is a schematic diagram of the network address determination device provided by the present invention.

[0022] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0024] To effectively perform address scanning in IPv6 networks, researchers have proposed various IPv6 address scanning methods. The main principle of these methods is to mine patterns from known addresses (seed addresses) and generate target addresses based on these patterns. 6Tree is a typical representative of this type of method, employing a split hierarchical clustering algorithm (DHC) to discover patterns in seed addresses and introducing a density-feedback-based dynamic address generation strategy, significantly improving the hit rate of target addresses.

[0025] Following 6Tree, a series of improvements to this method have emerged, mainly focusing on optimizing split point locations, reducing interference from outlier addresses, and optimizing address generation strategies. For example, DET and AddrMiner-S select the location with the minimum entropy as the split point, 6Forest selects the location with the maximum coverage, and 6Subpattern prioritizes the location with the fewest variables. 6Graph removes outlier addresses using graph theory methods, 6Forest uses an enhanced isolation forest algorithm to exclude outliers, and 6Subpattern proposes using subpatterns to reduce interference from random addresses. 6Hit and AddrMiner-S employ reinforcement learning methods to allocate more probe budget to high-density regions. Furthermore, 6Scan proposes an asynchronous feedback mechanism based on address region coding, while HMap6 utilizes both DHC and AHC methods to discover patterns.

[0026] Existing IPv6 address scanning methods, such as 6Tree, have the following main problems:

[0027] 1. Pattern loss: Because the address space is described using a tree structure, a large number of patterns will inevitably be lost when splitting the seed address, thereby reducing the hit rate of the target address.

[0028] 2. Difficulty in utilizing new address discovery mode: Constructing a tree structure is computationally expensive, and it is difficult to reconstruct the tree structure in real time using new addresses. Therefore, it is impossible to utilize new address discovery mode, which further reduces the hit rate of target addresses.

[0029] 3. Uneven distribution of target addresses: The generated target addresses are concentrated in a few high-density patterns. This not only leads to significant deviations in scan results but also reduces the hit rate of target addresses when the pattern density deviates significantly from the actual address distribution. Furthermore, this method may generate a large number of addresses belonging to the same target network in a short period, interfering with the normal operation of the target network and potentially causing network congestion, further reducing the hit rate of target addresses.

[0030] In view of this, embodiments of the present invention provide a network address determination method, which generates extended addresses from known addresses, discovers more extended addresses, improves the hit rate of target addresses, and selects extended addresses based on the evolutionary advantage of extended addresses calculated according to their activity, thereby finding target addresses with higher activity and a greater likelihood of survival.

[0031] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0032] Figure 1This is a flowchart illustrating a network address generation method provided by the present invention. The network address generation method can be applied to electronic devices, which can be various types of devices with information processing capabilities. For example, the electronic device may include a personal computer, laptop computer, PDA, or server; the electronic device may also be a mobile terminal, such as a mobile phone, in-vehicle computer, tablet computer, or projector. Figure 1 As shown, the method may include the following steps 110 to 120:

[0033] Step 110: Based on the target value corresponding to each expanded address in the expanded address set, determine multiple target expanded addresses. The target value corresponding to each expanded address is determined based on the active state of each expanded address. The target value corresponding to each expanded address is used to indicate the evolutionary advantage of each expanded address. The expanded address set includes multiple known addresses and multiple expanded addresses corresponding to each known address. The multiple expanded addresses corresponding to each known address are obtained by expanding the address range corresponding to each known address. The expanded address set may be an expanded address database, etc.

[0034] An expanded address set is obtained, which includes multiple expanded addresses and multiple known addresses. Each expanded address is generated by expanding upon a known address. The known address refers to a known network address, such as an IPv6 address. Each known address can be expanded using a preset expansion method to generate multiple expanded addresses, which are also network addresses such as IPv6 addresses. For example, for each known address, address bits are swapped according to a preset rule, such as swapping the 5th and 10th bits, or swapping the 1st and 10th bits. After the swap, one known address will correspond to two expanded addresses, thus expanding the address range corresponding to that address. Expanding each known address will generate multiple expanded addresses.

[0035] For each extended address in the extended address set, obtain the target value for that address. Based on the magnitude of the target value, determine whether the address can be used as a target extended address. After determining the target extended addresses for all extended addresses, multiple target extended addresses are determined from the extended address set.

[0036] The target value is determined based on the activity status of the extended address. The target value is used to indicate the evolutionary advantage of the extended address. The evolutionary advantage indicates that the extended address is closer to the preset target than other addresses.

[0037] For example, the selection operator in a genetic algorithm is used to select multiple target expansion addresses from the expansion address set. The preset goal of the genetic algorithm is to find the most active expansion address. A genetic algorithm (GA) is a search algorithm that simulates natural selection and genetic mechanisms. It iteratively optimizes the solution to a problem through genetic operators such as selection, crossover, and mutation. The selection operator determines which individuals can be retained and participate in the next generation of reproduction, ultimately searching for the individual that best meets the target. When using a genetic algorithm, the selection operator calculates the fitness value of the individuals at the expansion addresses based on their activity status and selects individuals based on their fitness. In the selection operator, fitness is the target value.

[0038] In one embodiment of this application, before determining multiple target extended addresses based on the target value size corresponding to each extended address in the extended address set, the method further includes: determining multiple known addresses and the active state corresponding to each known address; sequentially selecting at least one address bit in each known address, and updating the character corresponding to the selected at least one address bit each time to a specified character, thereby obtaining multiple extended addresses corresponding to each known address, wherein the selected at least one address bit is not repeated each time, and the number of selected address bits each time is divisible by the total number of address bits corresponding to the known address; saving the multiple known addresses, the active state corresponding to each known address, the multiple extended addresses, and the active state corresponding to each extended address to obtain the extended address set, wherein the active state of the extended address is determined based on the active state of each known address corresponding to the extended address.

[0039] Obtain known addresses. For example, there are four IPv6 addresses: 2001:……:11, 2001:……:12, 2001:……:22 and 2001:……:13. These four addresses are taken as known addresses.

[0040] The activity of each known address is probed, and the specific probe protocol and methods need to be determined according to the probe requirements.

[0041] In one embodiment of this application, the active state corresponding to each known address is obtained by probing each known address using a target communication protocol, wherein the target communication protocol includes at least one of Internet Control Message Protocol version 6, Transmission Control Protocol, and User Datagram Protocol.

[0042] Probing methods can include using ICMPv6, TCP, or UPD protocols to detect whether a known address is active.

[0043] For each known address mentioned above, a set is generated using that known address. The method for generating the set can be as follows: based on the order of the address bits in the known addresses, perform multiple address bit update operations. Each address bit update operation includes: selecting at least one address bit in the known addresses, and updating the character corresponding to the selected at least one address bit to a specified character, thereby obtaining an extended address. The number of address bits selected in the above address bit update operations must be divisible by the total number of address bits corresponding to the known addresses. For example, if each IPv6 address consists of 32 four-bit hexadecimal numbers, then the number of selected address bits should be 1, 2, 4, etc., numbers divisible by 32. Furthermore, no two selected address bits should be repeated. The specified character indicates that the hexadecimal number at that position is variable.

[0044] For example, in the address 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx11, 'x' represents a 4-bit hexadecimal number that makes up a 128-bit IPv6 address. Performing multiple address bit update operations from left to right, selecting one address bit at a time, results in the following set:

[0045] {*001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx,

[0046] 2*01:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, ...

[0048] xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx*1,

[0049] xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx1*}

[0050] The asterisk (*) above is a specified character, indicating that the hexadecimal number at that position is variable.

[0051] All known addresses and multiple extended addresses generated for each known address are saved to obtain an extended address set.

[0052] For each extended address, the active state of the extended address is determined based on the active states of all known addresses corresponding to that extended address.

[0053] Store all known addresses, the corresponding extended addresses for each known address, and the active state of each address to generate an extended address set.

[0054] In the above embodiments, extended addresses are generated using known addresses, which can discover more high-density new addresses than in existing technologies. A method for generating the active state of extended addresses is also provided, which quickly and accurately generates the active state of extended addresses based on the active state of known addresses.

[0055] In one embodiment of this application, the step of saving the plurality of known addresses, the active state corresponding to each known address, the plurality of extended addresses, and the active state corresponding to each extended address to obtain the extended address set includes: obtaining a current address set; determining whether the current address set includes a current address, wherein the current address is a currently saved known address or an extended address; if the current address set does not include the current address, creating a new address record corresponding to the current address in the current address set, and modifying the number of active states or the number of inactive states in the address record by one according to the active state of the known address corresponding to the current address, and saving the current address; if the current address set includes the current address, incrementing the number of active states or the number of inactive states in the address record corresponding to the current address by one, and saving the current address; performing the above steps sequentially on each known address and each extended address to determine the current address set as the extended address set.

[0056] Get the current address set, which can be a data storage structure such as a database or a data tree.

[0057] Retrieve the current address, which can be either a currently saved known address or an extended address. For example, select known addresses in sequence; once a known address is selected, that known address becomes the current address and is saved into the current address set. Subsequently, select the extended addresses corresponding to the known addresses in sequence; these known addresses then become the current addresses in sequence and are saved into the current address set in sequence.

[0058] When storing a current address into the current address set, first determine whether the current address set includes the current address. If the current address set does not include the current address, then create a new address record corresponding to the current address in the current address set, and modify the number of active or inactive states in the address record according to the active state of the known address corresponding to the current address, and save the current address.

[0059] If the current address set includes the current address, increment the number of active or inactive states in the address record corresponding to the current address by one, and save the current address;

[0060] For example, the current address set is stored using key-value pairs, where the key is the address and the value is {active: 1, inactive: 0}. When storing extended addresses in the expanded address set, the extended address in the key-value pair is an index of the dictionary. The specific content stored is the number of active and inactive addresses. For instance, if an extended address is p, and p is generated from a known address a (which is active), then the active address count for p is incremented by 1. If b is inactive but also generates an extended address p, then the inactive address count for p is incremented by 1. Therefore, the key-value pair for p in the expanded address set is: key: {p}, value: {active: 1, inactive: 1}. If p is indexed when storing it, it means p has already been stored, and the active field of that extended address is incremented by 1.

[0061] In one embodiment of this application, the expanded address set includes the number of active states and the number of inactive states corresponding to each expanded address. The step of determining multiple target expanded addresses based on the target value corresponding to each expanded address in the expanded address set includes: calculating the fitness of each expanded address based on the number of active states and the number of inactive states corresponding to each expanded address, where the fitness is the target value; and determining the target expanded addresses based on the relationship between the fitness of each expanded address and a random number, where the random number is any number between 0 and 1.

[0062] The active status of the extended addresses stored in the extended address set includes the number of active states and the number of inactive states corresponding to the extended address. The number of active states refers to the number of active addresses among the known addresses corresponding to the extended address, and the number of inactive states refers to the number of inactive addresses among the known addresses corresponding to the extended address.

[0063] For each extended address, calculate its fitness based on its active state; the fitness value is the target value. For example, the fitness can be calculated using the following formula:

[0064]

[0065] Where p is the extended address, unresp is the number of inactive states corresponding to the extended address, and resp is the number of active states corresponding to the extended address.

[0066] For each expansion address, a random number between 0 and 1 is generated. If the fitness of the expansion address is less than the random number, the expansion address will not be selected as the target expansion address; otherwise, the expansion address will be selected as the target expansion address.

[0067] In the above embodiments, by using a genetic algorithm to randomly select extended addresses, the diversity of target addresses can be effectively increased while maintaining a high hit rate. Compared with existing methods, more new network prefixes can be discovered, thereby reducing the deviation of IPv6 address scanning.

[0068] Step 120: Determine the target scanning address based on the plurality of target extended addresses, wherein the target scanning address is different from any address in the set of extended addresses.

[0069] Based on the selected multiple target extended addresses, determine the target scan address, wherein the determined target scan address should be different from any address in the extended address set.

[0070] For example, select an address that is different from any address in the set of extended addresses from multiple target extended addresses as the target scan address.

[0071] In one embodiment of this application, determining a target scan address based on the plurality of target extended addresses includes: successively replacing a specified character in the target scan address with each character in the character set to obtain a plurality of scan addresses, wherein the character set includes all characters from 0 to 9 and from a to f; and determining the address in the plurality of scan addresses that is different from any address in the extended address set as the target scan address.

[0072] In the embodiment where an extended address including a specified character is generated based on a known address, for each extended address, multiple replacements are performed according to the character order in the character set. In each replacement, the specified character in the address, such as *, replaces the character in the character set to obtain a scan address.

[0073] For example, given an extended address of xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx*x, replacing * with any character in the range [0-9, af] yields 16 IPv6 addresses. You can then arbitrarily select at most one address not already in the extended address set as the new destination address. If all of these addresses are already in the extended address set, it means that the extended address cannot generate a new destination address.

[0074] In the above embodiments, by limiting each selected extended address to generate at most one address in each round, the negative impact of the deviation between the extended address density and the actual address distribution can be overcome better than existing methods, enabling the method to achieve higher scanning efficiency than existing methods; it can also significantly reduce the burst load of the network to be scanned, thereby reducing interference to the network to be scanned.

[0075] The above network address determination method generates extended addresses through known addresses, discovers more extended addresses, improves the hit rate of target addresses, and selects extended addresses based on the activity of extended addresses by calculating the evolutionary advantage of extended addresses, so that the found target addresses have higher activity and are more likely to survive.

[0076] Next, an exemplary application of the embodiments of the present invention in a practical application scenario will be described. Figure 2 It is a schematic diagram of the overall process of a network address determination method provided by an embodiment of the present invention. As Figure 2 shown, the method includes the following steps 210 to step 240:

[0077] Step 210: Detect the activity of the seed address.

[0078] This step can use the ICMPv6, TCP or UPD protocol to detect whether the seed address is active, which specifically depends on the detection requirements. The above seed address refers to a known IPv6 address.

[0079] The detection result format is [<IPv6 address, status>,..., [<IPv6 address, status>]], where the IPv6 address is in the form xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, and the status is "active" or "inactive".

[0080] Step 220: Generate extended addresses in real time according to the detection result of the previous step and update the extended address set

[0081] For each IPv6 address, that is, the seed address, the specific processing method is:

[0082] 2.1 Generate an extended address set using the IPv6 address:

[0083] {xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx,

[0084] *xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx,

[0085] x*xx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, ...

[0087] xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx*x,

[0088] xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxx*}

[0089] Where x represents a 4-digit hexadecimal number that makes up a 128-bit IPv6 address, and each IPv6 address consists of 32 4-digit hexadecimal numbers. * indicates that the hexadecimal number at that position is variable. The set contains 33 addresses. The first address does not contain *; this address is mainly used to store the state of the IPv6 address. In other addresses, * varies from the first 4-digit hexadecimal number to the 32nd 4-digit hexadecimal number.

[0090] 2.2 For each extended address in the set obtained in the previous step, if the extended address does not exist in the extended address set, then add a key-value pair to the extended address set, with the key being the address set and the value being {active:1, inactive:0} (for ease of description, it is assumed here that the IPv6 address is active). If the extended address already exists in the extended address set, then increment the active field of the extended address in the extended address set by 1.

[0091] Figure 3 This is a schematic diagram of an extended address generation. The initial extended address set is empty. The input addresses are 2001::11, 2001::12, 2001::22 and 2001::13, where 2001::13 is a non-responsive address and the rest are responsive addresses.

[0092] For address 2001::11, the 32 extended addresses corresponding to this address will be inserted into the extended address set. The green addresses in the diagram represent the newly inserted extended addresses. For address 2001::12, only 31 extended addresses corresponding to this address will be inserted. The other extended address, 2001::1*, will not be inserted into the extended address set but will be used to update it. The red addresses in the diagram represent the updated extended addresses. The processing for address 2001::22 is similar to 2001::12; 31 new extended addresses will be inserted, and extended address 2001::*2 will be updated. The processing for address 2001::13 is slightly different. When inserting or updating the extended address set, the number of unresponsive addresses is set or modified because the state of 2001::13 is unresponsive.

[0093] Step 230: Select a set of extended addresses from the extended address set.

[0094] The extended addresses containing * in the pattern library are traversed, and a set of extended addresses is selected probabilistically using a genetic algorithm. For each extended address, the specific processing method is as follows:

[0095] 3.1 Calculate the fitness of the extended address using the following formula:

[0096]

[0097] Where p is the extended address, unresp is the number of non-responsive addresses (i.e., inactive addresses) corresponding to the extended address, and resp is the number of responsive addresses (i.e., active addresses) corresponding to the extended address.

[0098] 3.2 Generate a random number between 0 and 1. If the fitness of the extended address is less than the random number, the extended address will not be selected; otherwise, the extended address will be selected.

[0099] Step 240: Generate multiple target addresses based on the selected set of extended addresses.

[0100] For each expanded address obtained in the previous step, at most one new target address is generated. The specific processing method for each expanded address is as follows:

[0101] Replace the asterisks (*) in the extended address with [0-9 and af] to obtain 16 IPv6 addresses. Select at most one address not already in the extended address set as the new destination address. If all these addresses are already in the extended address set, it means that the extended address cannot generate a new destination address.

[0102] In some embodiments, the above steps further include step 250: adding the selected target addresses to the known addresses, and repeating steps 210 to 240 until the number of selected target addresses is greater than a preset value.

[0103] The selected target address is used as the new known address, and steps 210 to 240 above are repeated to continuously scan the address until a sufficient number of target addresses are selected.

[0104] The above method avoids random scanning, because random scanning is almost impossible to find live addresses. The above method can find new addresses that may be alive based on the addressing rules of the seed address.

[0105] Based on the foregoing embodiments, this invention provides an XXX device. The modules and units included in the device can be implemented by a processor; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field-programmable gate array (FPGA), etc.

[0106] The network address determination device 400 provided by the present invention will be described below. The network address determination device described below can be referred to in correspondence with the network address determination method described above.

[0107] Figure 4 This is a schematic diagram of the network address determination device provided in an embodiment of the present invention. Figure 4 As shown, the device 400 includes a target extended address determination module 410 and a target scan address determination module 420, wherein:

[0108] The target extended address determination module 410 is used to determine multiple target extended addresses based on the target value corresponding to each extended address in the extended address set. The target value corresponding to each extended address is determined based on the active state corresponding to each extended address. The target value corresponding to each extended address is used to indicate the evolutionary advantage corresponding to each extended address. The extended address set includes multiple known addresses and multiple extended addresses corresponding to each known address. The multiple extended addresses corresponding to each known address are obtained by expanding the address range corresponding to each known address.

[0109] The target scanning address determination module 420 is used to determine a target scanning address based on the plurality of target extended addresses, wherein the target scanning address is different from any address in the set of extended addresses.

[0110] In some embodiments, the apparatus further includes an expansion module, which is configured to determine a plurality of known addresses and an active state corresponding to each known address; sequentially select at least one address bit in each known address and update the character corresponding to the at least one address bit selected each time to a specified character, thereby obtaining a plurality of expanded addresses corresponding to each known address, wherein the at least one address bit selected each time is not repeated, and the number of address bits selected each time is divisible by the total number of address bits corresponding to the known address; save the plurality of known addresses, the active state corresponding to each known address, the plurality of expanded addresses, and the active state corresponding to each expanded address to obtain the expanded address set, wherein the active state of the expanded address is determined based on the active state of each known address corresponding to the expanded address.

[0111] In some embodiments, the expansion module is specifically used to obtain the current address set; determine whether the current address set includes the current address, where the current address is a currently saved known address or an expanded address; if the current address set does not include the current address, create a new address record corresponding to the current address in the current address set, and modify the number of active or inactive states in the address record according to the active state of the known address corresponding to the current address, and save the current address; if the current address set includes the current address, increment the number of active or inactive states in the address record corresponding to the current address by one, and save the current address; perform the above steps sequentially on each known address and each expanded address to determine the current address set as the expanded address set.

[0112] 3. In some embodiments, the active state corresponding to each known address is obtained by probing each known address using a target communication protocol, wherein the target communication protocol includes at least one of Internet Control Message Protocol version 6, Transmission Control Protocol, and User Datagram Protocol.

[0113] In some embodiments, the extended address set includes the number of active states and the number of inactive states corresponding to each extended address. The target extended address determination module 410 is specifically used to calculate the fitness corresponding to each extended address based on the number of active states and the number of inactive states corresponding to each extended address, wherein the fitness is the target value; and to determine the target extended address based on the relationship between the fitness corresponding to each extended address and a random number, wherein the random number is any number between 0 and 1.

[0114] In some embodiments, the target scan address determination module 420 is specifically used to replace a specified character in the target scan address with each character in the character set to obtain multiple scan addresses. The character set includes all characters from 0 to 9 and from a to f. Among the multiple scan addresses, the address that is different from any address in the extended address set is determined as the target scan address.

[0115] Figure 5 This is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute the network address determination methods provided by the above methods.

[0116] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0117] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute the network address determination method provided by the above methods.

[0118] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0119] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the network address determination method provided by the methods described above.

[0120] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0121] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0122] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.

[0123] Computer program code for performing the operations described herein can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0124] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining a network address, characterized in that, The method includes: Based on the target value corresponding to each expanded address in the expanded address set, multiple target expanded addresses are determined. The target value corresponding to each expanded address is determined based on the active state corresponding to each expanded address. The target value corresponding to each expanded address is used to indicate the evolutionary advantage corresponding to each expanded address. The expanded address set includes multiple known addresses and multiple expanded addresses corresponding to each known address. The multiple expanded addresses corresponding to each known address are obtained by expanding the address range corresponding to each known address. Based on the plurality of target extended addresses, a target scanning address is determined, wherein the target scanning address is different from any address in the set of extended addresses.

2. The method according to claim 1, characterized in that, Before determining multiple target extended addresses based on the target value corresponding to each extended address in the extended address set, the method further includes: Determine multiple known addresses and the active state corresponding to each known address; Select at least one address bit in each known address in turn, and update the character corresponding to the selected at least one address bit in each turn to a specified character to obtain multiple extended addresses corresponding to each known address. In this way, the selected at least one address bit in each turn is not repeated, and the number of selected address bits in each turn is divisible by the total number of address bits corresponding to the known address. The set of extended addresses is obtained by saving the plurality of known addresses, the active state corresponding to each known address, the plurality of extended addresses, and the active state corresponding to each extended address. The active state of an extended address is determined based on the active state of each known address corresponding to the extended address.

3. The method according to claim 2, characterized in that, The process of saving the plurality of known addresses, the active state corresponding to each known address, the plurality of extended addresses, and the active state corresponding to each extended address to obtain the extended address set includes: Get the current address set; Determine whether the current address set includes the current address, where the current address is a currently saved known address or an extended address; If the current address is not included in the current address set, a new address record corresponding to the current address is created in the current address set, and the number of active or inactive states in the address record is modified according to the active state of the known address corresponding to the current address, and the current address is saved. If the current address set includes the current address, increment the number of active or inactive states in the address record corresponding to the current address by one, and save the current address; The above steps are performed sequentially on each known address and each extended address to determine the current address set as the extended address set.

4. The method according to claim 2, characterized in that, The active state corresponding to each known address is obtained by probing each known address using a target communication protocol, which includes at least one of Internet Control Message Protocol version 6, Transmission Control Protocol, and User Datagram Protocol.

5. The method according to claim 1, characterized in that, The expanded address set includes the number of active states and the number of inactive states corresponding to each expanded address. The step of determining multiple target expanded addresses based on the target value corresponding to each expanded address in the expanded address set includes: Based on the number of active states and the number of inactive states corresponding to each extended address, the fitness corresponding to each extended address is calculated, and the fitness is the target value. The target expansion address is determined based on the relationship between the fitness of each expansion address and the random number, where the random number is any number between 0 and 1.

6. The method according to claim 2, characterized in that, The step of determining the target scanning address based on the plurality of target extended addresses includes: The specified characters in the target extended address are replaced one by one using each character in the character set to obtain multiple scan addresses. The character set includes all characters from 0 to 9 and from a to f. The target scan address is determined from among the plurality of scan addresses as an address that is different from any address in the extended address set.

7. A network address determination device, characterized in that, The device includes: The target expansion address determination module is used to determine multiple target expansion addresses based on the target value corresponding to each expansion address in the expansion address set. The target value corresponding to each expansion address is determined based on the active state corresponding to each expansion address. The target value corresponding to each expansion address is used to indicate the evolutionary advantage corresponding to each expansion address. The expansion address set includes multiple known addresses and multiple expansion addresses corresponding to each known address. The multiple expansion addresses corresponding to each known address are obtained by expanding the address range corresponding to each known address. The target scanning address determination module is used to determine a target scanning address based on the plurality of target extended addresses, wherein the target scanning address is different from any address in the set of extended addresses.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the network address determination method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the network address determination method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the network address determination method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method, device, system and medium for detecting activity of IPv6 domain name server

    CN108924012A

  • Active IPv6 address scanning method and system

    CN115378912A