Network address determination method and device, electronic equipment and storage medium

By generating an expanded address and using its active state to select a target scan address, the problem of high cost of tree structure calculation and uneven distribution of target address in the existing IPv6 address scanning method is solved, and the hit rate of target address and the accuracy of scan results is improved. sex.

CN119484482AActive Publication Date: 2025-02-18TSINGHUA UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing IPv6 address scanning method has high calculation calculations, and it is difficult to reconstruct the tree structure with new addresses in real time, resulting in a low hit rate of the target address and an uneven distribution of the generated target address, resulting in a large deviation in the scan results.

Method used

Generate an expanded address by a known address, calculate the target value of the expanded address using the active state in the expanded address set, and select an expanded address with high evolutionary advantages as the target scan address, thereby improving the hit rate of the target address.

Benefits of technology

The hit rate of the target address is improved, more high-density new addresses are found, which reduces the deviation of the scan results and reduces interference to the scanned network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484482A_ABST
    Figure CN119484482A_ABST
Patent Text Reader

Abstract

The invention provides a network address determination method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a plurality of target extended addresses according to a target value corresponding to each extended address in an extended address set, the target value corresponding to each expanded address is determined according to the active state corresponding to each expanded address, the target value corresponding to each expanded address is used for indicating the evolutionary advantage corresponding to each expanded address, and the expanded address set comprises a plurality of known addresses and a plurality of expanded addresses corresponding to each known address; the plurality of expansion addresses corresponding to each known address are obtained by expanding the address range corresponding to each known address; the target scanning address is determined according to the multiple target expansion addresses, the target scanning address is different from any address in the expansion address set, the method generates the expansion addresses through the known addresses, more expansion addresses are found, and the hit rate of the target addresses is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for determining a network address. Background Art

[0002] With the continuous increase in the number of Internet users and the access of a large number of new devices around the world, IPv4 addresses have become increasingly scarce. In order to solve this problem and support the development needs of the future Internet, IPv6 is widely used as the next-generation IP protocol. The IPv6 protocol solves the problem of IPv4 address shortage by extending the address length.

[0003] Traditional IPv4 address scanning technology is no longer feasible in IPv6, so research on address scanning technology specifically for IPv6 is of great significance to the security of IPv6 network space. In order to effectively perform address scanning in IPv6 networks, researchers have proposed a variety of 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 one of the typical representatives of this type of method. It uses the divisive hierarchical clustering algorithm (DHC) to discover the pattern of seed addresses and introduces a dynamic address generation strategy based on density feedback, which significantly improves the hit rate of target addresses.

[0004] However, the existing IPv6 address scanning method has a high computational cost for constructing a tree structure, and it is difficult to reconstruct the tree structure using new addresses in real time, so it is impossible to use new addresses to discover patterns, which reduces the hit rate of the target address. In addition, the generated target addresses are concentrated in a few high-density patterns, which not only leads to large deviations in the scanning results, but also reduces the hit rate of the target address when there is a large deviation between the pattern density and the real address distribution. Summary of the invention

[0005] The present invention provides a network address determination method, device, electronic device and storage medium, which generate extended addresses through known addresses, discover more extended addresses and improve the hit rate of target addresses.

[0006] The present invention provides a network address determination method, comprising the following steps: determining multiple target extended addresses according to the size of a 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, and the target value corresponding to each extended address is determined according to 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 according to the multiple target extended addresses, and 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 according to the target value size corresponding to each extended address in the extended address set, the method also includes: determining multiple known addresses and the active state corresponding to each known address; selecting at least one address bit in each known address in turn, and updating the character corresponding to the at least one address bit selected each time to a specified character, to obtain multiple extended 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 can be divided by the total number of address bits corresponding to the known addresses; 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 storing of 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 the current address set; determining whether the current address is included in the current address set, the current address being the currently stored known address or extended address; if the current address is not included in the current address set, 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 storing the current address; if the current address is included in the current address set, adding one to the number of active states or the number of inactive states in the address record corresponding to the current address, and storing the current address; performing the above steps on each known address and each extended address in turn, and determining that the current address set is the extended address set. .

[0009] According to a network address determination method provided by the present invention, the activity state corresponding to each known address is obtained by detecting each known address using a target communication protocol, and the target communication protocol includes at least one of Internet Control Information 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, and the multiple target extended addresses are determined according to the target value corresponding to each extended address in the extended address set, including: calculating the fitness corresponding to each extended address according to the number of active states and the number of inactive states corresponding to each extended address, and the fitness is the target value; determining the target extended address according to the size relationship between the fitness corresponding to each extended address and a random number, and the random number is any number between 0 and 1.

[0011] According to a network address determination method provided by the present invention, the target scanning address is determined based on the multiple target extended addresses, including: using each character in a character set to successively replace the specified characters in the target extended address to obtain multiple scanning addresses, the character set including all characters from 0 to 9 and from a to f; and determining, among the multiple scanning addresses, an address 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, used to determine multiple target extended addresses according to the target value size corresponding to each extended address in the extended address set, the target value corresponding to each extended address is determined according to 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; a target scan address determination module, used to determine a target scan address according to the multiple target extended addresses, the target scan address is different from any address in the extended address set.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any of the above-mentioned methods for determining a network address is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the network address determination method described in any one of the above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the network address determination method described in any one of the above is implemented.

[0016] The network address determination method, device, electronic device and storage medium provided by the present invention generate extended addresses through known addresses, discover more extended addresses, improve the hit rate of target addresses, and select extended addresses based on the activity of extended addresses by calculating the evolutionary advantage of extended addresses, so that the target addresses found have higher activity and are more likely to survive. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of a network address determination method provided by the present invention.

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

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

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

[0022] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] In order to effectively perform address scanning in IPv6 networks, researchers have proposed a variety of 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 one of the typical representatives of this type of method. It uses the divisive hierarchical clustering algorithm (DHC) to discover the pattern of seed addresses and introduces a dynamic address generation strategy based on density feedback, which significantly improves the hit rate of target addresses.

[0025] After 6Tree, a series of improvements on this method have emerged, mainly including optimization of split point location, reduction of abnormal address interference, and optimization of address generation strategy. For example, DET and AddrMiner-S select the location with the smallest entropy value as the split point, 6Forest selects the location with the largest coverage, and 6Subpattern prioritizes the location with the least number of variables; 6Graph removes abnormal addresses through graph theory, 6Forest uses the enhanced isolation forest algorithm to exclude outlier addresses, and 6Subpattern proposes to use sub-patterns to reduce the interference of random addresses; 6Hit and AddrMiner-S use reinforcement learning methods to allocate more detection budget to high-density areas. In addition, 6Scan proposes an asynchronous feedback mechanism based on address area encoding, and HMap6 uses both DHC and AHC methods to discover patterns.

[0026] The existing IPv6 address scanning methods represented by 6Tree have the following problems: 1. Pattern loss: Since the address space is described using a tree structure, a large number of patterns will inevitably be lost when the seed address is split, thereby reducing the hit rate of the target address.

[0027] 2. It is difficult to use the new address discovery mode: The computational cost of constructing the tree structure is high, and it is difficult to reconstruct the tree structure using the new address in real time. Therefore, the new address discovery mode cannot be used, further reducing the hit rate of the target address.

[0028] 3. Unbalanced distribution of target addresses: The generated target addresses are concentrated in a few high-density patterns, which not only leads to large deviations in the scan results, but also reduces the hit rate of the target address when there is a large deviation between the pattern density and the real address distribution. In addition, this method may generate a large number of addresses belonging to the same target network in a short period of time, interfering with the normal operation of the target network, and may even cause network congestion, further reducing the hit rate of the target address.

[0029] In view of this, an embodiment of the present invention provides a network address determination method, which generates extended addresses through known addresses, discovers more extended addresses, improves the hit rate of the target address, and selects the extended addresses based on the activity of the extended addresses by calculating the evolutionary advantage of the extended addresses, so that the target address found has higher activity and is more likely to survive.

[0030] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0031] Figure 1The present invention provides a flow chart of a network address generation method, which can be applied to electronic devices, which can be various types of devices with information processing capabilities during implementation. For example, the electronic device can include a personal computer, a laptop, a PDA or a server, etc.; the electronic device can also be a mobile terminal, for example, a mobile phone, a car computer, a tablet computer or a projector, etc. Figure 1 As shown, the method may include the following steps 110 to 120: Step 110: Determine multiple target extended addresses according to the target value size corresponding to each extended address in the extended address set, wherein the target value corresponding to each extended address is determined according to 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, and 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. The extended address set may be an extended address database, etc.

[0032] Get an extended address set, which includes multiple extended addresses and multiple known addresses, and each extended address is generated by expanding a known address. Among them, a known address refers to a known network address, which can be an IPv6 address, etc. Each known address can use a preset expansion method to expand the address range corresponding to the address to generate multiple extended addresses, and the extended address is also a network address such as an IPv6 address. For example, for each known address, the address bits in the known address are exchanged according to a preset rule, such as the exchange rule: exchange the 5th and 10th bits in the address, and exchange the 1st and 10th bits in the address bit. After the exchange, one known address will correspond to two extended addresses, realizing the expansion of the address range corresponding to the address. Multiple extended addresses will be generated after each known address is expanded.

[0033] For each extended address in the extended address set, the target value of the address is obtained, and whether the address can be used as a target extended address is determined according to the size of the target value of the address. After the target extended addresses are determined for all extended addresses, multiple target extended addresses are determined from the extended address set.

[0034] The above target value is determined according to the active state 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.

[0035] For example, the selection operator in the genetic algorithm is used to select multiple target extended addresses from the extended address set. The preset goal of the genetic algorithm is to find the most active extended address. Genetic Algorithm (GA) is a search algorithm that simulates natural selection and genetic mechanisms. It iteratively optimizes the solution to the problem through genetic operators such as selection, crossover, and mutation. The above selection operator determines which individuals can be retained and participate in the reproduction of the next generation in the genetic algorithm, so as to finally search for the individual that best meets the target. When using the genetic algorithm, the selection operator will calculate the individual fitness value of the extended address based on the active state of the extended address, and select the individual based on the individual fitness. When using the selection operator, the fitness is the target value.

[0036] In one embodiment of the present application, before determining multiple target extended addresses according to the target value size corresponding to each extended address in the extended address set, the method also includes: determining multiple known addresses and the active state corresponding to each known address; selecting at least one address bit in each known address in turn, and updating the character corresponding to the at least one address bit selected each time to a specified character, to obtain multiple extended 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 can be divided by the total number of address bits corresponding to the known addresses; 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.

[0037] Acquire known addresses. For example, there are four IPv6 addresses: 2001:...:11, 2001:...:12, 2001:...:22, and 2001:...:13. These four addresses are known addresses.

[0038] The activity of each known address is detected. The specific detection protocol and detection method need to be determined according to the detection requirements.

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

[0040] The detection method may be: using ICMPv6, TCP or UDP protocol to detect whether a known address is active.

[0041] For each of the above-mentioned known addresses, a set is generated using the known address. The method for generating the set may be: performing multiple address bit update operations according to the order of the address bits in the known address, wherein one address bit update operation includes: selecting at least one address bit in the known address, and updating the character corresponding to the at least one selected address bit to a specified character, thereby obtaining an extended address. The number of address bits selected by the above-mentioned address bit update operation can be divided by the total number of address bits corresponding to the known addresses. For example, each IPv6 address is composed of 32 4-bit hexadecimal numbers, then the number of selected address bits should be 1, 2, 4, etc., which are numbers that can be divided by 32. Moreover, the address bits selected twice are not repeated. The specified character indicates that the hexadecimal number at that position is variable.

[0042] For example, for the address 2001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx11, x represents a 4-bit hexadecimal number that makes up a 128-bit IPv6 address. Perform multiple address bit update operations in order from left to right, selecting one address bit each time, and the generated set includes: {*001:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx,

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

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

[0046] xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx1*}

[0047] The * is a designated character, which indicates that the hexadecimal number at that position is variable.

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

[0049] For each extended address, the active state of the extended address is determined according to the active states of all known addresses corresponding to the extended address.

[0050] All known addresses, the extended addresses corresponding to each known address, and the active state of each address are stored to generate an extended address set.

[0051] In the above embodiment, the extended address is generated by using the known address, so that more high-density new addresses can be found than in the prior art, and a method for generating the active state of the extended address is provided, which quickly and accurately generates the active state of the extended address according to the active state of the known address.

[0052] In one embodiment of the present application, the saving of 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 includes: obtaining the current address set; determining whether the current address is included in the current address set, the current address being a currently saved known address or an extended address; if the current address is not included in the current address set, 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 adding one according to the active state of the known address corresponding to the current address, and saving the current address; if the current address is included in the current address set, adding one to the number of active states or the number of inactive states in the address record corresponding to the current address, and saving the current address; performing the above steps on each known address and each extended address in turn, and determining that the current address set is the extended address set.

[0053] Get the current address set. The current address set can be a data storage structure such as a database or a data tree.

[0054] Get the current address, which is the currently saved known address or extended address. For example, select the known addresses in sequence, and after selecting the known address, the known address is the current address, and the known address is saved in the current address set, and then the extended addresses corresponding to the known address are selected in sequence, and these known addresses are used as the current address in sequence, and these current addresses are saved in the current address set in sequence.

[0055] When storing a current address in the current address set, first determine whether the current address is included in the current address set. If the current address is not included in the current address set, create a new address record corresponding to the current address in the current address set, and modify 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 save the current address; If the current address set includes the current address, increase the number of active states or the number of inactive states in the address record corresponding to the current address by one, and save the current address; For example, the current address set is stored in a key-value pair, where the key is the address and the value is {active: 1, inactive: 0}. When storing the extended address in the extended address set, the extended address in the key-value pair is the index of the dictionary. The specific content stored is the number of active addresses and the number of inactive addresses. For example, an extended address is p, which is generated by a known address a. If a is active, then the active address corresponding to p is increased by 1. If b is inactive and an extended address p is also generated, then the number of inactive addresses corresponding to p is increased by 1. The key-value pair of p in the extended address set is: key: {p}, value: {active: 1, inactive: 1}. If p is indexed when storing p, it means that p has been stored, and the active field of the extended address is increased by 1.

[0056] In one embodiment of the present application, the extended address set includes the number of active states and the number of inactive states corresponding to each extended address, and the determining of multiple target extended addresses according to the target value corresponding to each extended address in the extended address set includes: calculating the fitness corresponding to each extended address according to the number of active states and the number of inactive states corresponding to each extended address, the fitness being the target value; determining the target extended address according to the size relationship between the fitness corresponding to each extended address and a random number, the random number being any number between 0 and 1. .

[0057] The active status of the extended address saved in the extended address set includes the active state number and the inactive state number corresponding to the extended address. The active state number refers to the number of active addresses in the known addresses corresponding to the extended address, and the inactive state number refers to the number of inactive addresses in the known addresses corresponding to the extended address.

[0058] For each extended address, the fitness of the address is calculated according to the active state of the address, and the fitness is the target value. For example, the fitness can be calculated using the following formula:

[0059] Among them, 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.

[0060] For each extended address, a random number between 0 and 1 is randomly generated. If the fitness of the extended address is less than the random number, the extended address will not be selected as the target extended address. Otherwise, the extended address will be selected as the target extended address.

[0061] In the above embodiment, 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, and more new network prefixes can be discovered compared to existing methods, thereby reducing the deviation of IPv6 address scanning.

[0062] Step 120: Determine a target scanning address according to the multiple target extended addresses, where the target scanning address is different from any address in the extended address set.

[0063] A target scanning address is determined according to the selected multiple target extended addresses, wherein the determined target scanning address should be different from any address in the extended address set.

[0064] For example, an address different from any address in the extended address set is selected from a plurality of target extended addresses as a target scanning address.

[0065] In one embodiment of the present application, a target scanning address is determined based on the multiple target extended addresses, including: using each character in a character set to successively replace a specified character in the target scanning address to obtain multiple scanning addresses, wherein the character set includes all characters from 0 to 9 and from a to f; and determining, among the multiple scanning addresses, an address that is different from any address in the extended address set as the target scanning address.

[0066] In the embodiment of generating an extended address including a specified character based on a known address, for each extended address, multiple replacements are performed according to the order of characters in a character set, and in each replacement, the specified character in the address, such as *, is replaced with a character in the character set to obtain a scan address.

[0067] For example, an extended address is xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx*x. Replace * with each character in [0-9, af] to get 16 IPv6 addresses. Select at most one address that is not in the extended address set as the new target address. If all these addresses are already in the extended address set, it means that the extended address can no longer generate a new target address.

[0068] In the above embodiment, by limiting each selected extended address to generate at most one address in each round, the negative impact caused by the deviation of the extended address density and the real address distribution can be better overcome than the existing method, so that the present method can achieve higher scanning efficiency than the existing method; it can also significantly reduce the burst load of the network to be scanned, thereby reducing interference to the scanned network.

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

[0070] The exemplary application of the embodiment of the present invention in an actual application scenario will be described below. 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 240: Step 210: Detect the liveness of the seed address.

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

[0072] 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".

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

[0074] For each IPv6 address, that is, the seed address, the specific processing method is: 2.1 Generate an extended address set using the IPv6 address: {xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx,

[0075] *xxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx,

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

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

[0079] xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxx*}

[0080] Among them, x represents a 4-bit hexadecimal number that makes up a 128-bit IPv6 address. Each IPv6 address consists of 32 4-bit hexadecimal numbers. * indicates that the hexadecimal number at this position is variable. The number of addresses in the set is 33. There is no * in the first address, which is mainly used to save the status of the IPv6 address. The * in other addresses changes from the first 4-bit hexadecimal number to the 32nd 4-bit hexadecimal number.

[0081] 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, the key is the address set, and the value is {active: 1, inactive: 0} (for the sake of ease of description, it is assumed that the status of the IPv6 address is active). If the extended address already exists in the extended address set, then add 1 to the active field of the extended address in the extended address set.

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

[0083] For 2001::11, the 32 extended addresses corresponding to this address will be inserted into the extended address set. The green addresses in the figure indicate the newly inserted extended addresses. For 2001::12, only the 31 extended addresses corresponding to this address will be inserted. Another extended address 2001::1* will not be inserted into the extended address set, but will be used to update the extended address set. The red address in the figure indicates the updated extended address. The processing of address 2001::22 is similar to that of 2001::12. 31 new extended addresses will be inserted, and extended address 2001::*2 will be updated at the same time. The processing of 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 status of 2001::13 is unresponsive.

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

[0085] Traverse the extended addresses containing * in the pattern library, and use the genetic algorithm to select a group of extended addresses according to probability. For each extended address, the specific processing method is: 3.1 Use the following formula to calculate the fitness of the extended address:

[0086] Among them, p is the extended address, unresp is the number of unresponsive 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.

[0087] 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.

[0088] Step 240: Generate multiple target addresses according to the selected set of extended addresses.

[0089] For each extended address obtained in the previous step, at most one new target address is generated. For each extended address, the specific processing method is: Replace the * in the extended address with [0-9 and af] to get 16 IPv6 addresses, and select at most one address that is not in the extended address set as the new target address. If all these addresses are already in the extended address set, it means that the extended address can no longer generate a new target address.

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

[0091] The selected target address is used as a new known address, and the above steps 210 to 240 are repeated to continuously perform address scanning until enough target addresses are selected.

[0092] The above method avoids random scanning, because it is almost impossible to find a surviving address by random scanning. The above method can find a new address that may survive based on the addressing rule of the seed address.

[0093] Based on the foregoing embodiments, an embodiment of the present invention provides an XXX device, and each module included in the device and each unit included in each module can be implemented by a processor; of course, they can also be implemented by a specific logic circuit; 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.

[0094] The network address determination device 400 provided by the present invention is described below. The network address determination device described below and the network address determination method described above can be referenced to each other.

[0095] Figure 4 A schematic diagram of the structure of a network address determination device provided by an embodiment of the present invention. Figure 4As shown, the device 400 includes a target extended address determination module 410 and a target scan address determination module 420, wherein: A target extended address determination module 410 is used to determine multiple target extended addresses according to the size of a target value corresponding to each extended address in the extended address set, wherein the target value corresponding to each extended address is determined according to 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; The target scanning address determining module 420 is used to determine a target scanning address according to the multiple target extended addresses, where the target scanning address is different from any address in the extended address set.

[0096] In some embodiments, the device also includes an expansion module, which is used to 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 at least one address bit selected each time to a specified character, so as to obtain multiple extended 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 can be divided by the total number of address bits corresponding to the known addresses; save 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, so as 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.

[0097] In some embodiments, the expansion module is specifically used to obtain a current address set; determine whether the current address is included in the current address set, and 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, create a new address record corresponding to the current address in the current address set, and modify 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 save the current address; if the current address is included in the current address set, increase the number of active states or the number of inactive states in the address record corresponding to the current address by one, and save the current address; perform the above steps for each known address and each extended address in turn, and determine that the current address set is the extended address set.

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

[0099] In some embodiments, the extended address set includes the number of active states and the number of inactive states corresponding to each extended address, and 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, and the fitness is the target value; according to the size relationship between the fitness corresponding to each extended address and a random number, the target extended address is determined, and the random number is any number between 0 and 1.

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

[0101] Figure 5 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 communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the network address determination methods provided by the above methods.

[0102] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0103] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the network address determination method provided by the above methods.

[0104] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, 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 includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0105] On the other hand, the present invention further 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 above methods.

[0106] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0107] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0108] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

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

[0110] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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 comprises: Determine multiple target extended addresses according to the size of the target value corresponding to each extended address in the extended address set, wherein the target value corresponding to each extended address is determined according to 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, and 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; A target scanning address is determined according to the plurality of target extended addresses, wherein the target scanning address is different from any address in the extended address set.

2. The method according to claim 1, characterized in that Before determining a plurality of target extended addresses according to the target value size corresponding to each extended address in the extended address set, the method further includes: Determine a plurality of known addresses and an activity state corresponding to each known address; Selecting at least one address bit in each known address one by one, and updating the character corresponding to the at least one address bit selected each time to a specified character, to obtain a plurality of extended addresses corresponding to each known address, wherein the at least one address bit selected each time is not repeated, and the number of the address bits selected each time can be divided by the total number of address bits corresponding to the known address; 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 are saved to obtain the extended address set, wherein the active state of the extended address is determined according to the active state of each known address corresponding to the extended address.

3. The method according to claim 2, characterized in that The storing of 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 a current address, where the current address is a currently stored 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 states or the number of 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, increase the number of active states or the number of inactive states in the address record corresponding to the current address by one, and save the current address; The above steps are performed on each known address and each extended address in sequence to determine that the current address set is 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 detecting each known address using a target communication protocol, and the target communication protocol 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 extended address set includes the number of active states and the number of inactive states corresponding to each extended address, and the determining of multiple target extended addresses according to the target value corresponding to each extended address in the extended address set includes: Calculate the fitness corresponding to each extended address according to the number of active states and the number of inactive states corresponding to each extended address, where the fitness is the target value; The target extended address is determined according to the size relationship between the fitness corresponding to each extended 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 a target scanning address according to the plurality of target extended addresses comprises: Using each character in a character set to replace the designated characters in the target extended address one by one, a plurality of scanning addresses are obtained, wherein the character set includes all characters from 0 to 9 and from a to f; An address different from any address in the extended address set is determined as a target scan address among the plurality of scan addresses.

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

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the network address determination method according to any one of claims 1 to 6 is implemented.

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, the network address determination method according to any one of claims 1 to 6 is implemented.

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

Citation Information

Patent Citations

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

    CN108924012A

  • Heuristic IPv6 address scanning target generation method and related equipment

    CN112383644A

  • Active IPv6 address scanning method and system

    CN115378912A

  • Ipv6 alias prefix detection method and apparatus based on fragment fingerprint

    WO2022105799A1