Network address allocation method, device and electronic equipment
By sorting the subnet details list and allocating network addresses according to the number of available network addresses in the subnet in the external network of cloud computing, the retry process problem caused by no available network addresses in the subnet is solved and network address allocation is improved. efficiency and stability.
Patent Information
- Application Number
- CN202410587369.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-13
AI Technical Summary
In the external network scenario of cloud computing, when there is no available network address in the subnet, the IPAM module will trigger the retry process and retry to allocate network addresses of other subnets, causing the network address allocation process to increase in time.
When receiving a network address request, obtain a detailed list of subnets under the external network, sort them from high to low according to the number of available network addresses in the subnet, and allocate available network addresses in the sorted order to reduce the number of available network addresses in the subnet. The address needs to be re-selected to another subnet for allocation.
Through this method, the time consumption in the network address allocation process is reduced, the allocation efficiency is improved, the time complexity of the algorithm is reduced, and the algorithm is optimized from O(n^2) to O(nlog2n), which improves the stability of the allocation stage.
Smart Images

Figure CN118175140B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a network address allocation method, device and electronic device. Background Art
[0002] In the field of cloud computing, especially in the field of network address creation in external network scenarios, the allocation and management of network addresses is a key process.
[0003] In the traditional network address allocation process, first, a network port is created, and the IP Address Management (IPAM) module obtains a detailed list of all subnets under the external network. Then, available network addresses are allocated from the subnets to the network port in a predetermined order from the subnet details list.
[0004] However, when there is no available network address in the subnet, the IPAM module will trigger a retry process and retry to allocate other subnets in the subnet details list until an available network address is successfully allocated from a subnet, thereby increasing the time consumption of the entire network address allocation process. Summary of the invention
[0005] In view of this, the present application provides a network address allocation method, device and electronic device, the main purpose of which is to solve the problem that when there is no available network address in the current subnet, the IPAM module will trigger a retry process and retry to allocate other subnets in the subnet details list until an available network address is successfully allocated from a certain subnet, thereby increasing the time-consuming technical problem of the entire network address allocation process.
[0006] According to a first aspect of the present disclosure, a network address allocation method is provided, the method comprising:
[0007] When receiving a network address request, obtaining a subnet detail list under the external network, wherein the subnet detail list includes target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnets;
[0008] Sort each subnet in the subnet details list from high to low according to the corresponding number of available network addresses;
[0009] Each subnet is allocated an available network address to the request object that initiates the network address request in descending order.
[0010] According to a second aspect of the present disclosure, a network address allocation device is provided, the device comprising:
[0011] A first acquisition module is used to acquire a subnet detail list under an external network when a network address request is received, wherein the subnet detail list includes target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnets;
[0012] A sorting module, used to sort each subnet in the subnet details list from high to low according to the corresponding number of available network addresses;
[0013] The allocation module is used to allocate available network addresses to the request object that initiates the network address request according to the order from high to low for each subnet.
[0014] According to the third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of the aforementioned first aspect.
[0015] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method of the aforementioned first aspect.
[0016] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements the method of the aforementioned first aspect when executed by a processor.
[0017] The network address allocation method, device and electronic device provided by the present disclosure, compared with the prior art, obtains a subnet detail list under an external network when a network address request is received, the subnet detail list contains target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnet; sorts each subnet in the subnet detail list from high to low according to the corresponding number of available network addresses; and allocates available network addresses to the request object that initiates the network address request for each subnet in order from high to low. In the scheme of the present disclosure, by sorting each subnet in the subnet detail list from high to low according to its number of available network addresses, when allocating available network addresses, each subnet is allocated in order from high to low, reducing the situation where other subnets need to be reselected for allocation due to no available network addresses in the subnet, improving allocation efficiency, and shortening the time consumption in the network address allocation stage.
[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A flowchart of a network address allocation method provided by an embodiment of the present disclosure;
[0022] Figure 2 A flowchart of another network address allocation method provided by an embodiment of the present disclosure;
[0023] Figure 3 A schematic diagram of the structure of a network address allocation device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that, in the absence of conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0025] The following describes the network address allocation method, device and electronic device according to the embodiments of the present disclosure with reference to the accompanying drawings.
[0026] In order to solve the technical problem that when there is no available network address in the current subnet, the IPAM module will trigger a retry process and retry to allocate other subnets in the subnet details list until an available network address is successfully allocated from a certain subnet, thereby increasing the time consumption of the entire network address allocation process. The embodiments of the present disclosure provide a network address allocation method, device and electronic device.
[0027] like Figure 1 As shown, an embodiment of the present disclosure provides a network address allocation method, including:
[0028] Step 101: upon receiving a network address request, obtain a subnet detail list under an external network, wherein the subnet detail list includes target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnets.
[0029] Among them, the network address request can be used by the requesting object (such as a user, application, etc.) to request the allocation of one or more network addresses; the external network can be a computer network (which can be the Internet or a wide area network) that uses the same technology as the Internet, usually belonging to the intranet of an enterprise or organization or established on the Internet and providing information sharing and communication services to designated users.
[0030] The subnet details list can contain relevant configuration information of multiple subnets (i.e., target configuration information); a subnet can be a logical division in a network; in the subnet details list, each subnet configuration item corresponds to an identifier key and the specific value of the configuration item, which can be used to store information such as the subnet's network address range, gateway, subnet mask, available network address list, and the number of hosts in the subnet.
[0031] For the embodiments of the present disclosure, the execution subject may be a network address allocation device. When receiving a network address request, the network address management (IP Address Management, IPAM) module in the network address allocation device obtains a subnet detail list under the external network. Since the subnet detail list contains target configuration information of multiple subnets, the target configuration information includes the number of available network addresses corresponding to the subnet. By sorting each subnet in the subnet detail list from high to low according to its number of available network addresses, when allocating available network addresses, each subnet is allocated in a descending order, thereby reducing the situation where other subnets need to be reselected for allocation due to the lack of available network addresses in the subnet, improving the allocation efficiency, and shortening the time consumption in the network address allocation stage. For details, please refer to steps 102 and 103.
[0032] Step 102: sort each subnet in the subnet details list from high to low according to the corresponding number of available network addresses.
[0033] For the embodiment of the present disclosure, a sorting algorithm using the identifier key as a keyword is introduced in the output of the subnet details list, wherein the key may be the number of available network addresses in the subnet.
[0034] Each subnet in the subnet details list can be sorted from high to low according to the corresponding number of available network addresses. For example, if subnet A has 10 available network addresses and subnet B has 20 available network addresses, then after sorting, subnet B will be ranked before subnet A.
[0035] By sorting the subnet details list according to the number of available network addresses, it can be ensured that the subnet obtained in the next stage (network address allocation stage) (that is, the subnet at the top of the list) has at least one available network address, avoiding the need to reselect the subnet due to the lack of available network addresses in the subnet, thereby shortening the time of the entire network address allocation process, and optimizing the time complexity of the algorithm from O(n^2) to O(nlog2n). While optimizing the time consumption, the stability of the time consumption of this stage is improved.
[0036] Among them, the algorithm time complexity can be an indicator to measure the efficiency of the algorithm, which is used to describe the rate at which the algorithm running time increases with the increase in the size of input data.
[0037] Time complexity is usually expressed in O (O-notation), which is used to describe the running time of an algorithm in the worst case. Time complexity is usually expressed as O(f(n)), where f(n) can be a function of the input data size n, and n can be the number of input data.
[0038] Time complexity may include: linear time complexity O(n), which is used to indicate that the running time of an algorithm is proportional to the input size; linear logarithmic time complexity O(n log n), which is used to indicate that the running time of an algorithm is slightly higher than linear time, such as quick sort, merge sort, etc.; quadratic time complexity O(n^2), which is used to indicate that the running time of an algorithm is proportional to the square of the input size, such as unoptimized insertion sort or bubble sort.
[0039] Step 103: Allocate available network addresses to the request object that initiates the network address request for each subnet in descending order.
[0040] For the disclosed embodiment, when a request object (such as a virtual machine instance, a network device or other network service) initiates a network address request, the network address management module in the network address allocation device can allocate available network addresses to each subnet in order of the number of available network addresses from high to low in the current subnet details list. For example, if subnet A has 10 available network addresses and subnet B has 20 available network addresses, the system will first try to allocate available network addresses from subnet B to the request object, thereby improving allocation efficiency and shortening the time consumption of the network address allocation stage.
[0041] In summary, the network address allocation method, device and electronic device provided by the present disclosure, compared with the prior art, the present disclosure obtains a subnet detail list under an external network when a network address request is received, the subnet detail list contains target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnet; sorts each subnet in the subnet detail list from high to low according to the corresponding number of available network addresses; and allocates available network addresses to the request object that initiates the network address request for each subnet in order from high to low. In the scheme of the present disclosure, by sorting each subnet in the subnet detail list from high to low according to its number of available network addresses, when allocating available network addresses, each subnet is allocated in order from high to low, reducing the situation where other subnets need to be reselected for allocation due to the lack of available network addresses in the subnet, improving allocation efficiency, and shortening the time consumption in the network address allocation stage.
[0042] Further, as a refinement and expansion of the above embodiment, in order to fully illustrate the specific implementation process of the disclosed method, the present disclosure provides the following Figure 2 The specific method shown includes:
[0043] Step 201: upon receiving a network address request, obtain a subnet detail list under an external network, wherein the subnet detail list includes target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnets.
[0044] When receiving a network address request, obtain a subnet detail list under the external network, the subnet detail list including initial configuration information of multiple subnets;
[0045] Determine non-essential configuration information in the initial configuration information;
[0046] Eliminate unnecessary configuration information in the initial configuration information to obtain the target configuration information.
[0047] Among them, the initial configuration information may be all configuration information related to the subnet when the subnet is created; the non-essential configuration information may be unimportant information in the current network address allocation process, for example, key fields not required in the network allocation process, extension functions not required in the network allocation process, etc.; the target configuration information may be necessary configuration information in the current network address allocation process.
[0048] In the embodiment of the present disclosure, in the network allocation process, in order to reduce the amount of data processing and improve efficiency, the key field that is not needed in the network allocation process can be removed;
[0049] Since the extended function may include a large number of calculation processes, which may not be required in the network allocation process, by removing the extended function, the processing burden of the subnet detail list can be reduced and the efficiency can be improved.
[0050] In the traditional network address allocation process, whenever an available network address needs to be allocated, the IPAM module needs to query the subnet details list in real time, which takes a lot of time, especially when there are a large number of subnets or a large network scale.
[0051] In the present disclosure, by using the self-developed subnet_ip_availability plug-in, the number of available network addresses in the subnet can be pre-calculated and stored when the network traffic is low (i.e., when the business volume is low), so that the IPAM module can directly use the pre-calculated information when allocating available network addresses, significantly reducing the time for querying the subnet details list when allocating network addresses, thereby speeding up the allocation process and improving efficiency.
[0052] In this way, the IPAM module can select the most appropriate subnet for allocating available network addresses based on the number of available network addresses in the subnet, avoiding the situation where the available network addresses of some subnets are exhausted too quickly while the available network addresses of other subnets are not utilized well.
[0053] Specifically, the number of network address requests at the current moment is calculated; when the number of network address requests is less than the preset number of requests, the number of available network addresses in each subnet is calculated.
[0054] The target configuration information may include a network address range, and the network address range may be a continuous address segment from the smallest network address to the largest network address in the subnet.
[0055] In the embodiment of the present disclosure, as a possible implementation method, calculating the number of available network addresses in each subnet may specifically include:
[0056] Traverse each network address within the network address range;
[0057] The unallocated available network addresses in each network address are counted, and the number of the unallocated available network addresses is used as the number of available network addresses.
[0058] Step 202, determine whether the available network address is allocated; if the available network address is not allocated, allocate the available network address to the request object that initiates the network address request; if the available network address has been allocated, allocate other unallocated available network addresses to the request object that initiates the network address request.
[0059] In a cloud computing environment, there may be multiple network address requests for the allocation of available network addresses at the same time, which may lead to concurrent access and duplicate allocation of network addresses. For example, if two network address requests try to allocate the same available network address at the same time, data conflicts or system anomalies may occur.
[0060] For the disclosed embodiment, Memcached distributed lock technology can be used to generate a unique lock identifier key for each available network address, and the lock identifier can be composed of a subnet ID (subnetID) and a network (IP) address. When an available network address arrives, the system will try to obtain the lock status corresponding to the subnetID+IP in Memcached. If the lock status is unlocked, indicating that the available network address is not held by other request objects, the available network address can be assigned to the request object that initiated the network address request; if the lock status is locked, indicating that the available network address is already held by other request objects or the available network address is being assigned, the system can assign other unassigned available network addresses to the request object that initiated the network address request, and avoid retrying to assign the same available network address.
[0061] In this way, it is possible to avoid trying to allocate the same available network address to multiple network address requests in concurrent scenarios, reducing the retry process caused by network address allocation conflicts, thereby improving allocation efficiency and shortening the time consumption in the allocation phase.
[0062] Specifically, determining whether the available network address is allocated may include:
[0063] A lock identifier corresponding to the available network address is obtained, and a lock state corresponding to the lock identifier is obtained; if the lock state is an unlocked state, it is determined that the available network address is not allocated; if the lock state is a locked state, it is determined that the available network address is allocated.
[0064] Among them, Memcached distributed lock technology can use the Memcached distributed cache system to implement the lock mechanism technology. Memcached can be a high-performance distributed memory object cache system that can be used to cache the results of database calls, API calls or page rendering to improve access speed. In a distributed system, a lock is a synchronization mechanism used to control the access of multiple threads, processes or nodes to shared resources.
[0065] In summary, the network address allocation method, device and electronic device provided by the present disclosure, compared with the prior art, the present disclosure obtains a subnet detail list under an external network when a network address request is received, the subnet detail list contains target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnet; sorts each subnet in the subnet detail list from high to low according to the corresponding number of available network addresses; and allocates available network addresses to the request object that initiates the network address request for each subnet in order from high to low. In the scheme of the present disclosure, by sorting each subnet in the subnet detail list from high to low according to its number of available network addresses, when allocating available network addresses, each subnet is allocated in order from high to low, reducing the situation where other subnets need to be reselected for allocation due to the lack of available network addresses in the subnet, improving allocation efficiency, and shortening the time consumption in the network address allocation stage.
[0066] Based on the above Figure 1 and Figure 2 The present disclosure provides a network address allocation device, such as Figure 3 As shown, the device includes: a first acquisition module 31, a sorting module 32, and an allocation module 33;
[0067] A first acquisition module 31 is used to acquire a subnet detail list under an external network when a network address request is received, wherein the subnet detail list includes target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnets;
[0068] A sorting module 32, used to sort each subnet in the subnet details list from high to low according to the corresponding number of available network addresses;
[0069] The allocation module 33 is used to allocate available network addresses to the request object that initiates the network address request for each subnet in descending order.
[0070] In a specific application scenario, the device further includes: a first calculation module 34, a second calculation module 35;
[0071] A first calculation module 34, used to calculate the number of network address requests at the current moment;
[0072] The second calculation module 35 is used to calculate the number of available network addresses in each subnet when the number of network address requests is less than a preset number of requests.
[0073] In a specific application scenario, the target configuration information includes a network address range, and the second calculation module 35 can be used to traverse each network address within the network address range; count the unallocated available network addresses in each network address, and use the number of unallocated available network addresses as the number of available network addresses.
[0074] In a specific application scenario, the allocation module 33 can be used to determine whether the available network address is allocated; if the available network address is not allocated, the available network address is allocated to the request object that initiates the network address request; if the available network address has been allocated, other unallocated available network addresses are allocated to the request object that initiates the network address request.
[0075] In a specific application scenario, the allocation module 33 can be used to obtain the lock identifier corresponding to the available network address, and to obtain the lock state corresponding to the lock identifier; if the lock state is an unlocked state, it is determined that the available network address is not allocated; if the lock state is a locked state, it is determined that the available network address has been allocated.
[0076] In a specific application scenario, the device further includes: a first acquisition module 36, a determination module 37, and a removal module 38;
[0077] A first acquisition module 36 is used to acquire a subnet detail list under an external network when a network address request is received, wherein the subnet detail list includes initial configuration information of multiple subnets;
[0078] A determination module 37, configured to determine non-essential configuration information in the initial configuration information;
[0079] The elimination module 38 is used to eliminate unnecessary configuration information in the initial configuration information to obtain the target configuration information.
[0080] It should be noted that for other corresponding descriptions of the functional units involved in the network address allocation device provided by the present disclosure, please refer to Figure 1 and Figure 2 The corresponding description in will not be repeated here.
[0081] Based on the above Figure 1 and Figure 2 The method shown in the present disclosure, accordingly, also provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned Figure 1 and Figure 2 The method shown.
[0082] Based on the above Figure 1 and Figure 2The method shown in the figure, accordingly, the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned Figure 1 and Figure 2 The method shown.
[0083] Based on this understanding, the technical solution of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various implementation scenarios of the present disclosure.
[0084] Based on the above Figure 1 and Figure 2 The method shown, and Figure 3 In order to achieve the above-mentioned purpose, the embodiment of the present disclosure also provides an electronic device, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 2 The method shown.
[0085] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0086] Those skilled in the art will appreciate that the above-mentioned physical device structure provided by the present disclosure does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0087] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0088] Through the description of the above implementation methods, the technicians in this field can clearly understand that the present disclosure can be implemented by means of software plus the necessary general hardware platform, or by hardware. According to the network address allocation method, device and electronic device provided by the present disclosure, compared with the prior art, the present disclosure obtains a subnet detail list under the external network when receiving a network address request, and the subnet detail list contains target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnet; sorts each subnet in the subnet detail list from high to low according to the corresponding number of available network addresses; and allocates available network addresses to the request object that initiates the network address request for each subnet in order from high to low. In the present disclosure, by sorting each subnet in the subnet detail list from high to low according to its number of available network addresses, when allocating available network addresses, each subnet is allocated in order from high to low, reducing the situation where other subnets need to be reselected for allocation due to the lack of available network addresses in the subnet, improving the allocation efficiency, and shortening the time consumption of the network address allocation stage.
[0089] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0090] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A network address allocation method, characterized in that: include: When receiving a network address request, obtaining a subnet detail list under the external network, wherein the subnet detail list includes target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnets; Sort each subnet in the subnet details list from high to low according to the corresponding number of available network addresses; Each subnet is allocated an available network address to the request object that initiates the network address request in descending order.
2. The method according to claim 1, characterized in that: The method further comprises: Calculate the number of network address requests at the current moment; When the number of network address requests is less than a preset number of requests, the number of available network addresses in each subnet is calculated.
3. The method according to claim 2, characterized in that The target configuration information includes a network address range; The calculation of the number of available network addresses in each subnet includes: Traversing each network address within the network address range; The unallocated available network addresses in each of the network addresses are counted, and the number of the unallocated available network addresses is used as the number of available network addresses.
4. The method according to claim 1, characterized in that: The allocating an available network address to the request object that initiates the network address request includes: determining whether the available network address is allocated; If the available network address has not been allocated, allocating the available network address to the request object that initiated the network address request; If the available network address has been allocated, other unallocated available network addresses are allocated to the request object that initiates the network address request.
5. The method according to claim 4, characterized in that The determining whether the available network address is allocated comprises: Obtaining a lock identifier corresponding to the available network address, and obtaining a lock state corresponding to the lock identifier; If the lock state is an unlocked state, determining that the available network address is not allocated; If the lock state is the locked state, it is determined that the available network address has been allocated.
6. The method according to claim 1, characterized in that The method further comprises: When receiving a network address request, obtaining a subnet detail list under the external network, wherein the subnet detail list includes initial configuration information of multiple subnets; Determining non-essential configuration information in the initial configuration information; The non-essential configuration information in the initial configuration information is eliminated to obtain the target configuration information.
7. A network address allocation device, characterized in that: include: A first acquisition module is used to acquire a subnet detail list under an external network when a network address request is received, wherein the subnet detail list includes target configuration information of multiple subnets, and the target configuration information includes the number of available network addresses corresponding to the subnets; A sorting module, used to sort each subnet in the subnet details list from high to low according to the corresponding number of available network addresses; The allocation module is used to allocate available network addresses to the request object that initiates the network address request according to the order from high to low for each subnet.
8. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, wherein:The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
