CN115550317B - Network resource management method, device, computer equipment and storage medium - Google Patents
Network resource management method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN115550317B CN115550317B CN202211136609.2A CN202211136609A CN115550317B CN 115550317 B CN115550317 B CN 115550317B CN 202211136609 A CN202211136609 A CN 202211136609A CN 115550317 B CN115550317 B CN 115550317B
- Authority
- CN
- China
- Prior art keywords
- target
- network
- resource
- network resource
- allocation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007726 management method Methods 0.000 title abstract description 221
- 238000000034 method Methods 0.000 claims abstract description 29
- 238000011084 recovery Methods 0.000 claims description 50
- 238000004590 computer program Methods 0.000 claims description 36
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 17
- 230000000007 visual effect Effects 0.000 description 6
- 230000003993 interaction Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000004064 recycling Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/20—Support for services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/30—Peripheral units, e.g. input or output ports
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application relates to a network resource management method, a network resource management device, computer equipment and a storage medium, which can be used in the field of financial science and technology or other related fields. The method comprises the following steps: and determining a resource information table according to the switch application programming interface, wherein the resource information table comprises resource information of each network resource provided by at least one switch, the network resources comprise internet protocol addresses and/or ports, further, management requirements are acquired, and the management requirements comprise at least one of network resource requirements to be recovered and network resource requirements to be allocated, so that network resource management is performed according to the management requirements and the resource information table. By adopting the method, the management efficiency of network resources can be improved.
Description
Technical Field
The present application relates to the field of network technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for managing network resources.
Background
Currently, with the rapid development of internet technology, network resource management in enterprises is also important. Network resource management refers to managing corresponding network resources according to the needs of various departments of an enterprise, for example, allocating or recycling IP addresses.
However, network resource management is currently performed manually. Therefore, the current network resource management method has the problem of low efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a network resource management method, apparatus, computer device, and storage medium that can improve management efficiency of network resources.
In a first aspect, the present application provides a method for network resource management. The method comprises the following steps:
determining a resource information table according to an application programming interface of the switch, wherein the resource information table comprises resource information of each network resource provided by at least one switch, and the network resource comprises an Internet protocol address and/or a port;
Acquiring a management requirement, wherein the management requirement comprises at least one of a network resource requirement to be recovered and a network resource requirement to be allocated;
and carrying out network resource management according to the management requirement and the resource information table.
In one embodiment, if the management requirement includes the network resource requirement to be recycled, the network resource management according to the management requirement and the resource information table includes:
Determining target network resources to be recovered according to the network resource requirements to be recovered;
And managing network resources according to the resource information corresponding to the target network resources in the resource information table.
In one embodiment, if the resource information of each network resource includes a usage state corresponding to each network resource, performing network resource management according to the resource information corresponding to the target network resource in the resource information table includes:
and managing the network resources according to the use state of the target network resources in the resource information table.
In one embodiment, the network resource management according to the usage status of the target network resource in the resource information table includes:
if the use state of the target network resource in the resource information table is used, updating the use state of the target network resource in the resource information table to be unused, and sending first recovery information to a target terminal; the first recovery information is used for prompting that the target network resource is successfully recovered;
If the use state of the target network resource in the resource information table is unused, sending second recovery information to the target terminal; the second recovery information is used for prompting the recovery failure of the target network resource.
In one embodiment, if the network resource requirement to be allocated includes an IP address requirement to be allocated, performing network resource management according to the management requirement and the resource information table, including:
Determining a target network segment identification to be allocated according to the IP address requirement to be allocated;
Determining a target network segment in the resource information table according to the target network segment identification, wherein the resource information table comprises network segments corresponding to all IP addresses and network segment identifications;
And carrying out network resource management according to the target network segment.
In one embodiment, if the network resource requirement to be allocated includes an IP address requirement to be allocated, performing network resource management according to the management requirement and the resource information table, and further including:
and carrying out network resource management according to the reference IP address in the network resource requirement to be allocated and the resource information table.
In one embodiment, the resource information of each network resource includes a location identifier of each port, and if the network resource requirement to be allocated includes a port requirement to be allocated, performing network resource management according to the management requirement and the resource information table, including:
determining the distribution quantity and the distribution position of the target ports according to the port demand to be distributed;
Determining a target allocation range corresponding to the target port allocation position from the resource information table according to the target port allocation position;
And carrying out network resource management according to the use state of each port in the target allocation range and the allocation quantity of the target ports.
In one embodiment, the network resource management according to the usage status of each port in the target allocation range and the allocation number of the target ports includes:
If the use state of each port in the target allocation range is that the unused number is not less than the allocation number of the target ports, determining the target allocation ports, updating the use state of the target allocation ports in the resource information table to be used, and sending first allocation information to the target terminal; the first allocation information is used for prompting successful allocation;
If the use state of each port in the target allocation range is that the unused number is smaller than the allocation number of the target ports, second allocation information is sent to the target terminal; the second allocation information is used to indicate allocation failure.
In a second aspect, the application further provides a network resource management device. The device comprises:
a determining module, configured to determine a resource information table according to an application programming interface of the switch, where the resource information table includes resource information of each network resource provided by at least one switch, and the network resource includes an internet protocol address and/or a port;
The system comprises an acquisition module, a management module and a distribution module, wherein the acquisition module is used for acquiring management requirements, and the management requirements comprise at least one of network resource requirements to be recovered and network resource requirements to be distributed;
and the management module is used for carrying out network resource management according to the management requirement and the resource information table.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of any of the methods described above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The network resource management method, the device, the computer equipment and the storage medium firstly determine a resource information table comprising resource information of each network resource provided by at least one switch according to the switch application programming interface, and further acquire a management requirement comprising at least one of a network resource requirement to be recovered and a network resource requirement to be allocated, so as to manage the network resource according to the management requirement and the resource information table. Because the network resource includes the IP address and/or the port, and the resource information table includes the resource information of each IP address and/or each port provided by at least one switch, the server can perform network resource management according to the management requirement and the resource information table after obtaining the management requirement. According to the network resource management method, the server can manage the network resources according to the management requirements after determining the resource information table, and the network resource management is not needed to be performed manually, so that the management efficiency of the network resources is improved.
Drawings
FIG. 1 is an application environment diagram of a network resource management method in an embodiment of the present application;
fig. 2 is a flow chart of a network resource management method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a functional architecture of a server according to the present application;
FIG. 4 is a schematic diagram of a visual interactive page provided by a server according to the present application;
Fig. 5 is a schematic flow chart of network resource management according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another network resource management method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a network resource management flow performed by a server according to a network resource requirement to be recovered;
FIG. 8 is a flowchart illustrating another network resource management method according to an embodiment of the present application;
FIG. 9 is a flow chart illustrating a network resource management process performed by a server according to the IP address to be allocated;
FIG. 10 is a flowchart illustrating another embodiment of network resource management;
FIG. 11 is a flowchart illustrating another network resource management method according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a network resource management flow performed by a server according to a port to be allocated;
Fig. 13 is a block diagram of a network resource management device according to an embodiment of the present application;
Fig. 14 is an internal structural diagram of a computer device in an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Fig. 1 is an application environment diagram of a network resource management method according to an embodiment of the present application, where the network resource management method provided by the embodiment of the present application may be applied to an application environment as shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
Fig. 2 is a flow chart of a network resource management method according to an embodiment of the present application, which can be applied to the server shown in fig. 1, and in one embodiment, as shown in fig. 2, the method includes the following steps:
s201, determining a resource information table according to the switch application programming interface, wherein the resource information table comprises resource information of each network resource provided by at least one switch, and the network resource comprises an Internet protocol address and/or a port.
In this embodiment, please refer to fig. 3, fig. 3 is a schematic diagram of a functional architecture of a server according to the present application, where the server includes three parts including a resource information table, a background policy, and visual interaction. Wherein the resource information table is determined by the server from a switch application programming interface (Application Programming Interface, API). The switch API can acquire operation information of at least one switch that has been deployed, for example, the switch API acquires operation information of a deployment location of the switch 1, an internet protocol (Internet Protocol, IP) address provided by the switch 1, a current usage state of the IP address provided by the switch 1, and so on, and the server determines a resource information table including resource information of each network resource provided by the at least one switch according to the operation information acquired by the switch API. It is understood that the network resources include IP addresses and/or ports.
Table 1 illustrates one possible implementation of a resource information table, please refer to table 1. For example, when N switches (N is an integer greater than or equal to 1) are disposed in the management area of the entire network resource, that is, switch 1, switch 2, … …, and switch N, the resource information table includes resource information of IP addresses and/or ports provided by switches 1 to N.
Taking switch 1 as an example, the switch 1 may provide multiple IP addresses such as xxx.xxx.1.1, xxx.xxx.1.2, where the resource information of each IP address may include a usage status of each IP address, each IP address further includes multiple ports corresponding to each IP address, and the resource information of each port may include a usage status of each port, for example, as can be seen in conjunction with table 1, none of ports 55 corresponding to xxx.xxx.1.1 and xxx.xxx.1.1 are used. The resource information table can also be visually displayed on the terminal so as to facilitate management and maintenance of operation and maintenance personnel.
Table 1 illustrates only an alternative way of the resource information table, and the embodiment is not limited thereto.
It can be understood that, because the state of the switch deployed in the management area of the entire network resource changes, the server may update the resource information table every preset period, or may update the resource information table after receiving the instruction of the terminal.
TABLE 1 resource information Table
S202, acquiring management requirements, wherein the management requirements comprise at least one of network resource requirements to be recovered and network resource requirements to be allocated.
In this embodiment, the network resource requirement to be recovered refers to a requirement of recovering the network resource, for example, recovering the IP address, and recovering the IP address that has been used as unused; the network resource requirement to be allocated refers to allocation of network resource requirements, for example, allocation of IP addresses according to the requirements of a certain application.
The server is capable of obtaining a management requirement comprising at least one of a network resource requirement to be reclaimed and a network resource requirement to be allocated. In connection with fig. 3, the management requirement may be a management requirement that is generated at the server according to the background policy at regular time, for example, the background policy of the server automatically sends the management requirement of recovering the IP address every 10 days. Of course, the server may also receive the management requirement sent by the terminal, where the management requirement may be a management requirement determined by the user through visual interaction.
Fig. 4 is a schematic diagram of a visual interaction page provided by a server in the present application, as shown in fig. 4, the terminal may show the network resource management system, which may show, for example, IP address management, an already allocated IP address, and an access type, a campus, a server type, a port rate of the already allocated IP address. In the network resource management system, after clicking the IP allocation in the management requirement, a user can determine the requirement of the IP address to be allocated through the terminal, and then the server can respond to the requirement of the IP address to be allocated of the terminal to automatically and efficiently allocate the IP address. After the operation of allocating the IP address is performed, the user may click on "Ping" in the network resource management system, perform an operation of an internet packet explorer (PACKET INTERNET router, ping) on the allocated IP address, and test whether the IP address allocation is effective. The network resource management system may also support an operation of deleting the allocated IP address, for example, after selecting the IP address shown in the page, clicking "delete" in the network resource management system, so as to delete the allocation operation of a certain IP address and restore the IP address to be unused. In addition, the network resource management system can also provide functions of on-demand query, search, history record and the like. The management page of the port is substantially the same as this and will not be described here again.
S203, network resource management is carried out according to the management requirements and the resource information table.
In this embodiment, the network resource management includes management of IP addresses and/or ports provided by the switch, for example, the server manages corresponding network resources according to requirements of various departments of the enterprise, and allocates the IP addresses. Because the resource information table includes the resource information of each network resource provided by at least one switch, the server can perform network resource management according to the management requirement and the resource information table.
For example, in connection with Table 1, if the management requirements are for reclaiming IP addresses XXX.XXX.3.2, one way that IP address reclamation can be accomplished is: after the server obtains the management requirement, the server can determine the resource information corresponding to the IP address xxx.xxx.3.2 according to the resource information table. And then the server recovers the IP address XXX.XXX.3.2 according to the resource information corresponding to the IP address XXX.XXX.3.2 in the resource information table. For example, the server determines the use status of the IP address xxx.xxx.3.2 from the resource information table, and when the use status of the IP address xxx.xxx.3.2 is used, updates the use status of the IP address xxx.xxx.3.2 to unused to complete the recovery of the IP address xxx.xxx.3.2.
Another way in which the reclamation of IP addresses xxx.xxx.3.2 can be achieved is: the server determines the use state of the IP address XXX.XXX.3.2 and the current access state of the IP address according to the resource information table, and updates the use state of the IP address XXX.XXX.3.2 to be unused to finish recycling the IP address XXX.XXX.3.2 when the use state of the IP address XXX.XXX.3.2 is used and the current access state is non-access.
The server may also recover the IP address xxx.xxx.3.2 according to the resource information corresponding to the IP address xxx.xxx.3.2 in the resource information table and the resource information corresponding to the IP address xxx.xxx.3.3.3 associated with the IP address xxx.xxx.3.2, for example, the server may recover the IP addresses xxx.xxx.3.2 and xxx.xxx.3.2 when the server determines that the current access states of the IP addresses xxx.xxx.3.2 and xxx.xxx.3.3 are not accessed according to the resource information table. Of course, the server may perform network resource management according to the management requirement and the resource information table in other manners, which is not limited in this embodiment.
The above-mentioned network resources are taken as IP addresses for example, and the principle is the same when the network resources are ports, and are not described herein.
According to the network resource management method provided by the embodiment, firstly, a resource information table comprising resource information of each network resource provided by at least one switch is determined according to an application programming interface of the switch, and then a management requirement comprising at least one of a network resource requirement to be recovered and a network resource requirement to be allocated is acquired, wherein the network resource comprises an internet protocol address and/or a port, so that network resource management is performed according to the management requirement and the resource information table. Because the network resources include IP addresses and/or ports, and the resource information table includes resource information of each IP address and/or each port provided by at least one switch, the server can perform network resource management according to the management requirements and the resource information table after acquiring the management requirements. According to the network resource management method, the server can manage the network resources according to the management requirements after determining the resource information table, and the network resource management is not needed to be performed manually, so that the management efficiency of the network resources is improved.
Fig. 5 is a schematic flow chart of network resource management according to an embodiment of the present application, and referring to fig. 5, this embodiment relates to an alternative implementation manner of network resource management according to management requirements and a resource information table. On the basis of the above embodiment, if the management requirement includes a network resource requirement to be recycled, the step S203 of performing network resource management according to the management requirement and the resource information table includes the following steps:
s501, determining target network resources to be recovered according to network resource requirements to be recovered.
In this embodiment, when the management requirement is a network resource requirement to be recycled, the network resource requirement to be recycled includes a target network resource to be recycled, and therefore, the server can determine the target network resource to be recycled according to the network resource requirement to be recycled.
For example, the user specifies the recovered IP addresses xxx.xxx.3.2 and xxx.xxx.1.2 through the visual interaction provided by the server, so that the server can obtain the network resource requirement to be recovered sent by the terminal, and determine the target network resources to be recovered, that is, determine the target IP addresses xxx.xxx.3.2 and xxx.xxx.1.2 to be recovered.
It should be noted that the number of the target network resources to be recovered may be one or more, and in the case that the number of the target network resources to be recovered is more than one, the server may synchronously perform parallel recovery processing on each target network resource to be recovered, so as to improve the speed and efficiency of network resource management.
S502, network resource management is carried out according to the resource information corresponding to the target network resource in the resource information table.
In this embodiment, the server performs network resource management according to the resource information corresponding to the target network resource in the resource information table.
Continuing with the above example, the server performs network resource management according to the resource information corresponding to the target IP addresses xxx.xxx.3.2 and xxx.xxx.1.2 in the resource information table. For example, the server may perform network resource management according to the current access states corresponding to the target IP addresses xxx.xxx.3.2 and xxx.xxx.1.2 in the resource information table. If the current access state of the target IP address XXX.XXX.3.2 is no access, the target IP address XXX.XXX.3.2 can be recovered; if the current access state of the target IP address XXX.XXX.1.2 is in access, the target IP address XXX.XXX.3.2 is not recovered temporarily, and if the current access state of the target IP address XXX.XXX.3.2 is in no access, the target IP address XXX.XXX.3.2 is recovered.
The above-mentioned network resources are taken as IP addresses for example, and the principle is the same when the network resources are ports, and are not described herein.
According to the network resource demand to be recovered, the embodiment determines the target network resource to be recovered, and manages the network resource according to the resource information corresponding to the target network resource in the resource information table. Because the network resource management is performed according to the resource information corresponding to the target network resource in the target network resource to be recovered, the resource information corresponding to the target network resource can be considered when the network resource is recovered, so that the accurate network resource management can be performed, and the accuracy and the rationality of the network resource management are improved.
Optionally, if the resource information of each network resource includes a usage state corresponding to each network resource, step S502 of performing network resource management according to the resource information corresponding to the target network resource in the resource information table includes:
and managing the network resources according to the use state of the target network resources in the resource information table.
In this embodiment, the resource information of each network resource includes the usage status corresponding to each network resource, please refer to table 1, for example, the usage status of xxx.xxx.1.2 is unused, the usage status of xxx.xxx.3.2 is used, port 55 of xxx.xxx.1.2 is unused, and port 80 of xxx.xxx.3.2 is used.
Further, the server manages the network resources according to the use state of the target network resources in the resource information table. For example, if the destination IP address is xxx.xxx.3.2, the server performs network resource management according to the use status of the destination IP address xxx.xxx.3.2 in the resource information table, that is, recovers the destination IP address xxx.xxx.3.2 according to the use status of the destination IP address xxx.xxx.3.2 in the resource information table.
One way in which the target IP address xxx.xxx.3.2 can be reclaimed is: if the service state of the target IP address XXX.XXX.3.2 is unused, the server does not perform recovery operation; when the use state of the target IP address xxx.xxx.3.2 is used, the recovery operation is performed again.
In this embodiment, network resource management is performed according to the use state of the target network resource in the resource information table, and because network resource management is performed according to the use state of the target network resource, the target network resource can be accurately recovered in combination with the use state of the target network resource under the condition that the management requirement includes the network resource requirement to be recovered.
Fig. 6 is a schematic flow chart of another embodiment of network resource management according to the present application, and referring to fig. 6, this embodiment relates to an alternative implementation manner of network resource management according to the use status of the target network resource in the resource information table. Based on the above embodiment, the network resource management according to the usage status of the target network resource in the resource information table includes the following steps:
S601, if the use state of the target network resource in the resource information table is used, updating the use state of the target network resource in the resource information table to be unused, and sending first recovery information to the target terminal; the first recovery information is used for prompting successful recovery of the target network resource.
In this embodiment, if the use state of the target network resource in the resource information table is used, the server updates the use state of the target network resource in the resource information table to be unused, and sends first recovery information for prompting successful recovery of the target network resource to the target terminal. For example, the destination IP address is xxx.xxx.3.2, and the server determines that the use status of xxx.xxx.3.2 in the resource information table is used, updates the use status of xxx.xxx.3.2 to unused, and sends "xxx.xxx.3.2 reclamation success" to the destination terminal. The target terminal comprises a terminal which is used by a user or a terminal designated by a server.
S602, if the use state of the target network resource in the resource information table is unused, sending second recovery information to the target terminal; the second recovery information is used for prompting the recovery failure of the target network resource.
In this embodiment, if the use status of the target network resource in the resource information table is unused, the server sends second recovery information for prompting failure in recovery of the target network resource to the target terminal. For example, the target IP address is xxx.xxx.1.2, and the server determines that the use status of xxx.xxx.1.2 in the resource information table is unused, that is, there is no need to recycle the IP address, so the server directly sends "xxx.xxx.1.2 recycle failure" to the target terminal.
In this embodiment, if the use state of the target network resource in the resource information table is used, updating the use state of the target network resource in the resource information table to be unused, and sending first recovery information for prompting successful recovery of the target network resource to the target terminal; and if the use state of the target network resource in the resource information table is unused, sending second recovery information for prompting failure recovery of the target network resource to the target terminal. Therefore, the user can timely acquire the network resource management result based on the network resource requirement to be recovered through the target terminal, and the interactivity and efficiency of the network resource management are improved.
For a clearer explanation of the network resource management method in the present application, it is described herein with reference to fig. 7. Fig. 7 is a schematic diagram of a network resource management flow performed by the server according to a network resource requirement to be recovered.
If the network resource requirement to be recovered is the IP address requirement to be recovered, the service determines the target IP address in the IP address requirement to be recovered after obtaining the network resource requirement to be recovered, and then matches the use state of the target IP address in the resource information table. If the using state of the target IP address is used, the server updates the using state of the target IP address in the resource information table to be unused, and prompts the target terminal that the recovery of the target IP address is successful; if the use state of the target IP address is use, the server does not execute recovery action and directly prompts the target terminal that the recovery of the target IP address fails.
Similarly, if the network resource requirement to be recovered is a port requirement to be recovered, the service determines a target port in the port requirement to be recovered after obtaining the network resource requirement to be recovered, and then matches the use state of the target port in the resource information table. If the use state of the target port is used, the server updates the use state of the target port in the resource information table to be unused, and prompts the target terminal that the recovery of the target port is successful; if the use state of the target port is use, the server does not execute recovery action and directly prompts the failure recovery of the target port to the target terminal.
Based on the above manner, the server can retrieve the IP address and/or port. Further, the management requirements also include network resource requirements to be allocated, i.e. the server may also allocate IP addresses and/or ports.
Fig. 8 is a schematic flow chart of another embodiment of network resource management according to the present application, and referring to fig. 8, this embodiment relates to an alternative implementation manner of network resource management according to the management requirement and the resource information table. On the basis of the above embodiment, if the network resource requirement to be allocated includes the IP address requirement to be allocated, the step S203 performs network resource management according to the management requirement and the resource information table, and includes the following steps:
s801, determining a target network segment identification to be allocated according to the IP address requirement to be allocated.
In this embodiment, when the IP address needs to be allocated, the network resource requirement to be allocated includes the IP address requirement to be allocated, and then the server obtains the IP address requirement to be allocated. The IP address to be allocated needs may specify allocation options such as a use application, a server type, a port rate, setting up a park, whether load balancing is selected, whether a real-time application cluster (Real Application Cluster, RAC) is selected, and an access type corresponding to the IP address to be allocated. Specifically, the use application is set according to actual allocation requirements, for example, if it is desired to allocate IP for application a, then the use application is application a; the server type comprises a common server and a database server, and when the server type selects the database server, the server type indicates that the large flow demand exists, namely the RAC is selected by default; port rates include 10Mbps, 100Mbps, 1000Mbps, 10000Mbp, etc.; setting up the park according to actual allocation requirements, for example, if the IP is to be allocated to the park A, setting up the park as the park A; whether load balancing is selected is related to switch performance, load balancing can increase the data processing capacity of the assigned IP address.
Further, the server distinguishes the above-mentioned allocation options by network segment identifiers, that is, the network segment ranges corresponding to different allocation options are different, and the network segment identifiers may be plural. For example, IP-allocatable segments of application a are segment 1 and segment 2, and IP-allocatable segment of the general server type is segment 3. Therefore, the server can determine the target network segment identification to be allocated according to the requirement of the IP address to be allocated. For example, if the IP address to be allocated needs to allocate an IP address to park a, the server determines, according to the IP address to be allocated, that the target network segment identifier is the identifier corresponding to network segment 1 and network segment 2, where the identifier corresponding to network segment 1 and network segment 2 may be a number, a letter, or a combination of a number and a letter.
S802, determining a target network segment in a resource information table according to the target network segment identification, wherein the resource information table comprises network segments corresponding to all IP addresses and the network segment identification.
In this embodiment, the resource information table includes network segments and network segment identifiers corresponding to the respective IP addresses, for example, xxx.xxx.1.1, xxx.xxx.1.2 corresponds to network segment 1, xxx.xxx.1.4 corresponds to network segment 2, and xxx.xxx.3.2 corresponds to network segment 3. Therefore, the server can determine the target network segment corresponding to the target network segment identifier in the resource information table according to the target network segment identifier in the IP address requirement to be allocated. For example, after determining that the target network segment is identified as the corresponding network segment 1 and the corresponding network segment 2, the server can determine that the target network segment is the network segment 1 and the network segment 2.
S803, network resource management is carried out according to the target network segment.
In this embodiment, after the server determines the target network segment, network resource management may be performed according to the target network segment. Specifically, the server may perform network resource management according to the use state of the IP address corresponding to the target network segment in the resource information table. For example, after determining that the target network segment is the network segment 1 and the network segment 2, the server can allocate IP addresses according to the unused IP addresses in the network segment 1 and the network segment 2, and then determine, in the resource information table, the IP addresses that are the target number of unused IP addresses in the campus a share skin network segment 1 and the network segment 2 according to a certain order, a priority order or random, where the target number may be an allocation number preset in advance by the server, or an allocation number specified in a requirement of IP addresses to be allocated.
For example, when a user allocates 1 IP address to park a, after the server obtains the requirement of the IP address to be allocated, it determines that the target network segment is network segment 1 and network segment 2, and if the IP address corresponding to network segment 1 in the resource information table includes xxx.xxx.1.1, xxx.xxx.1.2, etc., the IP address corresponding to network segment 2 includes xxx.xxx.1.4, etc., and if the use status of the IP address corresponding to network segment 1 is used, and the use status of the IP addresses corresponding to network segment 2 is unused, the server allocates the IP address xxx.xxx.1.4 to park a according to the arrangement sequence.
It will be appreciated that if the user designates a plurality of allocation options when allocating an IP address, for example, when the user needs to allocate 1 IP address with a server type of a database server to park a, park a corresponds to network segment 1 and network segment 2, and the database server corresponds to network segment 5, the server takes, as a target network segment, a network segment corresponding to a union of network segment 1 and network segment 2 and network segment 5 after determining the target network segment identifier. That is, the target network segment needs to satisfy all allocation options of the user at the same time.
The resource information table of the embodiment comprises network segments and network segment identifiers corresponding to all IP addresses, further, a target network segment identifier to be allocated is determined according to the requirement of the IP addresses to be allocated, and a target network segment in the resource information table is determined according to the target network segment identifier, so that network resource management is performed according to the target network segment. Because the target network segment can be determined according to the target network segment identification in the IP address to be allocated requirement, the allocated IP address also meets the IP address to be allocated requirement, and the network resource management process does not need to be manually participated, thereby improving the management efficiency.
Optionally, if the network resource requirement to be allocated includes an IP address requirement to be allocated, the step S203 of performing network resource management according to the management requirement and the resource information table may be implemented as follows:
and carrying out network resource management according to the reference IP address and the resource information table in the network resource requirement to be allocated.
In this embodiment, when the IP address is allocated, if the reference IP is specified in the network resource requirement to be allocated, the server may perform network resource management according to the reference IP address and the resource information table in the network resource requirement to be allocated. For example, when the user designates the IP address xxx.xxx.3.2 as the reference IP at the time of IP allocation, the server finds the IP address xxx.xxx.3.2 in the resource information table and determines the IP address most similar to the resource information of the IP address xxx.xxx.3.2 and does not use the IP address according to the resource information of the IP address xxx.xxx.3.2.
According to the embodiment, network resource management is performed according to the reference IP address and the resource information table in the management requirement, and the IP address can be allocated only by the reference IP address, so that the management efficiency is improved.
Fig. 9 is a schematic diagram of a network resource management flow performed by the server according to the IP address to be allocated. As shown in fig. 9, if the user designates an allocation option, such as a port rate, a server type, etc., at the allocated IP address, the server determines a target network segment identifier to be allocated according to the requirement of the IP address to be allocated. And then the server matches the resource information table according to the target network segment identification, and determines the target network segment in the resource information table so as to allocate according to the IP address in the target network segment. If the user designates the reference IP address when the IP address is allocated, the server determines the reference IP address according to the requirement of the IP address to be allocated and matches the resource information table so as to allocate according to the reference IP address and the resource information table. It will be appreciated that after the server allocates the determined IP address, the usage status of the IP address is updated to used.
Based on the above manner, the server can allocate the IP address, and a process of allocating the port by the server will be described below.
Fig. 10 is a schematic flow chart of another embodiment of network resource management according to the present application, and referring to fig. 10, this embodiment relates to an alternative implementation manner of network resource management according to the management requirement and the resource information table. On the basis of the above embodiment, if the network resource requirement to be allocated includes the port requirement to be allocated, the step S203 of performing network resource management according to the management requirement and the resource information table includes the following steps:
S1001, determining the distribution number of the target ports and the distribution positions of the target ports according to the port requirements to be distributed.
In this embodiment, when the ports need to be allocated, the network resource requirements to be allocated include the port requirements to be allocated. For convenience of operation at a later stage, a user will typically want a designated port provided by a proximally located switch. Thus, when allocating ports, the destination port allocation number and destination port allocation position, that is, the number of ports to be allocated and the positions of ports to be allocated, can be specified. Further, the server obtains the port requirements to be allocated, and determines the allocation quantity of the target ports and the allocation positions of the target ports in the port requirements to be allocated according to the port requirements to be allocated. For example, if the user designates 5 ports to be allocated at the location a, the server determines that the number of allocation destination ports is 5, and the allocation destination port is the location a.
S1002, according to the allocation position of the target port, determining a target allocation range corresponding to the allocation position of the target port from a resource information table.
In this embodiment, after the server determines the number of target port allocations and the target port allocation positions, the target allocation range corresponding to the target port allocation positions can be determined from the resource information table according to the target port allocation positions.
For example, if the destination port allocation location is location a, and the server determines from the resource information table that the ports corresponding to the location a include ports 50 to 70, the server determines that the ports corresponding to location a, that is, ports 50 to 70, are the destination allocation range.
Or the allocation position of the target port is position A, the position difference between the position A and the positions B and the position C is smaller than a preset position difference threshold value, and the server determines that the port corresponding to the position A comprises ports 50-70 and the port corresponding to the position B71-79 from the resource information table; the server determines the ports corresponding to position a, position B and position C, namely ports 40 to 50, 50 to 70 and 71 to 79, as the target allocation ranges.
In other words, the target allocation range is a range of ports that the final server allocates according to the target port allocation location or ports available in the vicinity of the target port allocation location.
S1003, managing network resources according to the use state of each port in the target allocation range and the allocation quantity of the target ports.
In this embodiment, the server performs network resource management according to the usage status of each port in the target allocation range and the number of target port allocations. For example, the server determines the ports 50 to 70 as the target allocation range.
Further, if the number of unused ports among the ports 50 to 70 is equal to the target port allocation number, the server allocates the unused ports among the ports 50 to 70; if the number of unused ports in the ports 50 to 70 is smaller than the number of target port assignments, the server sends a prompt message to the target terminal to inform the user of the number of ports that can be currently assigned, so that the user can decide whether to continue the assignment.
According to the method, the device and the system, the target port distribution number and the target port distribution position are determined according to the port to be distributed, and then the target distribution range corresponding to the target port distribution position is determined from the resource information table according to the target port distribution position, so that network resource management is performed according to the use state of each port in the target distribution range and the target port distribution number. The target allocation range corresponding to the target port allocation position can be determined from the resource information table according to the target port allocation position in the port demand to be allocated, so that the target allocation range considers the target port allocation position, and the subsequent centralized maintenance is convenient. And the ports are allocated according to the use state of each port in the target allocation range and the allocation quantity of the target ports, so that the allocation efficiency and the allocation rationality are improved.
Fig. 11 is a schematic flow chart of another embodiment of network resource management according to the present application, and referring to fig. 11, this embodiment relates to an alternative implementation manner of network resource management according to the usage status of each port in the target allocation range and the number of target port allocation. Based on the above embodiment, the step S1003 of managing network resources according to the usage status of each port in the target allocation range and the number of target port allocations includes the following steps:
S1101, if the use state of each port in the target allocation range is that the number of unused ports is not less than the allocation number of the target ports, determining the target allocation ports, updating the use state of the target allocation ports in the resource information table to be used, and sending first allocation information to the target terminal; the first allocation information is used for prompting successful allocation.
In this embodiment, if the number of unused ports in the target allocation range is not less than the number of target port allocations, the server determines the target allocation ports, updates the usage status of the target allocation ports in the resource information table to be used, and sends the first allocation information to the target terminal for prompting that allocation is successful. For example, if the number of unused ports in each of the ports 50 to 70 is greater than the target port allocation number 5, the server allocates the unused ports in the ports 50 to 70 as target allocation ports according to the allocation priority or randomly designates the unused ports as target allocation ports, and if the target allocation ports are the ports 50 to 55, the server updates the usage states of the ports 50 to 55 as used and transmits "allocation success" to the target terminal.
S1102, if the use state of each port in the target allocation range is that the number of unused ports is smaller than the allocation number of the target ports, second allocation information is sent to the target terminal; the second allocation information is used to indicate allocation failure.
In this embodiment, if the usage status of each port in the target allocation range is that the number of unused ports is smaller than the number of target port allocations, the server sends second allocation information for prompting allocation failure to the target terminal. For example, if the usage status of each of the ports 50 to 70 is that the number of unused ports is smaller than the target port allocation number 5, the server does not execute the allocation operation and directly transmits "allocation failure" to the target terminal.
In this embodiment, if the number of unused ports in the target allocation range is not less than the number of target port allocations, determining a target allocation port, updating the use state of the target allocation port in the resource information table to be used, and sending first allocation information for prompting successful allocation to the target terminal; and if the use state of each port in the target allocation range is that the unused number is smaller than the allocation number of the target ports, sending second allocation information for prompting allocation failure to the target terminal. Therefore, the user can timely acquire the result of port allocation after the port to be allocated is solved through the target terminal, and the interactivity and efficiency of network resource management are improved.
Fig. 12 is a schematic diagram of a network resource management flow performed by the server according to the port to be allocated. As shown in fig. 12, when the user designates the number of ports to be allocated and the positions of the ports to be allocated, the server determines the number of target port allocation and the positions of target port allocation according to the demands of the ports to be allocated. And the server further determines a target allocation range corresponding to the target port allocation position from the resource information table according to the target port allocation position. If the use state of each port in the target allocation range is that the number of unused ports is not less than the allocation number of the target ports, the server determines the target allocation ports, updates the use state of the target allocation ports in the resource information table to be used, and sends 'allocation success' to the target terminal; if the use state of each port in the target allocation range is that the number of unused ports is smaller than the allocation number of the target ports, sending an allocation failure or insufficient resource to the target terminal.
In summary, the network resource management method provided by the application uses the open API interface to query and read the operation information of the switch to determine and store the resource information table, and allocates and recovers the network resources after obtaining the management requirements. The application can timely master the use information of the existing network resources, reduce the complexity of network resource management, improve the management efficiency and avoid the waste of network resources. In addition, the application forms a visual network resource management system on the front-end webpage so as to improve the interactivity of network resource management.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a network resource management device for realizing the above-mentioned network resource management method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more network resource management devices provided below may refer to the limitation of the network resource management method hereinabove, and will not be repeated herein.
Fig. 13 is a block diagram of a network resource management device according to an embodiment of the present application, and as shown in fig. 13, in an embodiment of the present application, there is provided a network resource management device 1300, including: a determining module 1301, an acquiring module 1302, and a managing module 1303, wherein:
A determining module 1301, configured to determine a resource information table according to an application programming interface of the switch, where the resource information table includes resource information of each network resource provided by at least one switch, and the network resource includes an internet protocol address and/or a port;
an obtaining module 1302, configured to obtain a management requirement, where the management requirement includes at least one of a network resource requirement to be recovered and a network resource requirement to be allocated;
and the management module 1303 is used for managing network resources according to the management requirements and the resource information table.
According to the network resource management device provided by the embodiment, firstly, a resource information table comprising resource information of each network resource provided by at least one switch is determined according to an application programming interface of the switch, and then a management requirement comprising at least one of a network resource requirement to be recovered and a network resource requirement to be allocated is acquired, wherein the network resource comprises an internet protocol address and/or a port, so that network resource management is performed according to the management requirement and the resource information table. Because the network resources include IP addresses and/or ports, and the resource information table includes resource information of each IP address and/or each port provided by at least one switch, the server can perform network resource management according to the management requirements and the resource information table after acquiring the management requirements. The network resource management device server can manage the network resources according to the management requirements after determining the resource information table, does not need to manage the network resources manually, and improves the management efficiency of the network resources.
Optionally, if the management requirement includes a network resource requirement to be recycled, the management module 1303 includes:
And the first determining unit is used for determining the target network resource to be recovered according to the network resource requirement to be recovered.
And the first management unit is used for managing the network resources according to the resource information corresponding to the target network resources in the resource information table.
Optionally, if the resource information of each network resource includes a usage state corresponding to each network resource, the first management unit includes:
and the management subunit is used for managing the network resources according to the use state of the target network resources in the resource information table.
Optionally, the management subunit is specifically configured to update the usage state of the target network resource in the resource information table to be unused if the usage state of the target network resource in the resource information table is used, and send first recovery information to the target terminal; the first recovery information is used for prompting successful recovery of the target network resource; if the use state of the target network resource in the resource information table is unused, sending second recovery information to the target terminal; the second recovery information is used for prompting the recovery failure of the target network resource.
Optionally, if the network resource requirement to be allocated includes an IP address requirement to be allocated, the management module 1303 includes:
and the second determining unit is used for determining the target network segment identification to be allocated according to the IP address requirement to be allocated.
A third determining unit, configured to determine, according to the target network segment identifier, a target network segment in a resource information table, where the resource information table includes network segments corresponding to each IP address and the network segment identifier;
And the second management unit is used for managing network resources according to the target network segment.
Optionally, if the network resource requirement to be allocated includes an IP address requirement to be allocated, the management module 1303 includes:
and the third management unit is used for managing the network resources according to the reference IP address and the resource information table in the network resource requirement to be allocated.
Optionally, the resource information of each network resource includes a location identifier of each port, and if the network resource requirement to be allocated includes a port requirement to be allocated, the management module 1303 includes:
and the fourth determining unit is used for determining the distribution quantity of the target ports and the distribution positions of the target ports according to the demands of the ports to be distributed.
And a fifth determining unit, configured to determine, according to the destination port allocation position, a destination allocation range corresponding to the destination port allocation position from the resource information table.
And the fourth management unit is used for managing network resources according to the use state of each port in the target allocation range and the allocation quantity of the target ports.
Optionally, the fourth management unit includes:
A determining subunit, configured to determine a target allocation port if the usage status of each port in the target allocation range is that the number of unused ports is not less than the number of target port allocations, update the usage status of the target allocation port in the resource information table to be used, and send first allocation information to the target terminal; the first allocation information is used for prompting successful allocation.
A sending subunit, configured to send second allocation information to the target terminal if the usage status of each port in the target allocation range is that the number of unused ports is smaller than the number of target port allocations; the second allocation information is used to indicate allocation failure.
The above-described respective modules in the network resource management device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 14 is an internal structural diagram of a computer device in an embodiment of the present application, and in an embodiment of the present application, a computer device may be a server, and the internal structural diagram may be as shown in fig. 14. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing relevant data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a network resource management method.
It will be appreciated by those skilled in the art that the structure shown in fig. 14 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
Determining a resource information table according to an application programming interface of the switch, wherein the resource information table comprises resource information of each network resource provided by at least one switch, and the network resource comprises an Internet protocol address and/or a port;
Acquiring a management requirement, wherein the management requirement comprises at least one of a network resource requirement to be recovered and a network resource requirement to be allocated;
And carrying out network resource management according to the management requirement and the resource information table.
In one embodiment, the processor when executing the computer program further performs the steps of:
Determining target network resources to be recovered according to the network resource requirements to be recovered;
and managing network resources according to the resource information corresponding to the target network resources in the resource information table.
In one embodiment, the processor when executing the computer program further performs the steps of:
And managing network resources according to the use state of the target network resources in the resource information table.
In one embodiment, the processor when executing the computer program further performs the steps of:
If the use state of the target network resource in the resource information table is used, updating the use state of the target network resource in the resource information table to be unused, and sending first recovery information to a target terminal; the first recovery information is used for prompting that the target network resource is successfully recovered;
if the use state of the target network resource in the resource information table is unused, sending second recovery information to the target terminal; the second recovery information is used for prompting the recovery failure of the target network resource.
In one embodiment, the processor when executing the computer program further performs the steps of:
Determining a target network segment identification to be allocated according to the IP address requirement to be allocated;
Determining a target network segment in the resource information table according to the target network segment identification, wherein the resource information table comprises network segments corresponding to all IP addresses and network segment identifications;
and carrying out network resource management according to the target network segment.
In one embodiment, the processor when executing the computer program further performs the steps of:
And carrying out network resource management according to the reference IP address in the network resource requirement to be allocated and the resource information table.
In one embodiment, the processor when executing the computer program further performs the steps of:
Determining the distribution quantity and the distribution positions of the target ports according to the port requirements to be distributed;
determining a target allocation range corresponding to the target port allocation position from the resource information table according to the target port allocation position;
And carrying out network resource management according to the use state of each port in the target allocation range and the allocation quantity of the target ports.
In one embodiment, the processor when executing the computer program further performs the steps of:
if the use state of each port in the target allocation range is that the unused number is not less than the target port allocation number, determining a target allocation port, updating the use state of the target allocation port in the resource information table to be used, and sending first allocation information to a target terminal; the first allocation information is used for prompting successful allocation;
if the use state of each port in the target allocation range is that the unused number is smaller than the target port allocation number, sending second allocation information to the target terminal; the second allocation information is used for prompting allocation failure.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Determining a resource information table according to an application programming interface of the switch, wherein the resource information table comprises resource information of each network resource provided by at least one switch, and the network resource comprises an Internet protocol address and/or a port;
Acquiring a management requirement, wherein the management requirement comprises at least one of a network resource requirement to be recovered and a network resource requirement to be allocated;
And carrying out network resource management according to the management requirement and the resource information table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Determining target network resources to be recovered according to the network resource requirements to be recovered;
and managing network resources according to the resource information corresponding to the target network resources in the resource information table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
And managing network resources according to the use state of the target network resources in the resource information table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
If the use state of the target network resource in the resource information table is used, updating the use state of the target network resource in the resource information table to be unused, and sending first recovery information to a target terminal; the first recovery information is used for prompting that the target network resource is successfully recovered;
if the use state of the target network resource in the resource information table is unused, sending second recovery information to the target terminal; the second recovery information is used for prompting the recovery failure of the target network resource.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Determining a target network segment identification to be allocated according to the IP address requirement to be allocated;
Determining a target network segment in the resource information table according to the target network segment identification, wherein the resource information table comprises network segments corresponding to all IP addresses and network segment identifications;
and carrying out network resource management according to the target network segment.
In one embodiment, the computer program when executed by the processor further performs the steps of:
And carrying out network resource management according to the reference IP address in the network resource requirement to be allocated and the resource information table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Determining the distribution quantity and the distribution positions of the target ports according to the port requirements to be distributed;
determining a target allocation range corresponding to the target port allocation position from the resource information table according to the target port allocation position;
And carrying out network resource management according to the use state of each port in the target allocation range and the allocation quantity of the target ports.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the use state of each port in the target allocation range is that the unused number is not less than the target port allocation number, determining a target allocation port, updating the use state of the target allocation port in the resource information table to be used, and sending first allocation information to a target terminal; the first allocation information is used for prompting successful allocation;
if the use state of each port in the target allocation range is that the unused number is smaller than the target port allocation number, sending second allocation information to the target terminal; the second allocation information is used for prompting allocation failure.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
The user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.
Claims (11)
1. A method of network resource management, the method comprising:
Determining a resource information table according to an application programming interface of the switch, wherein the resource information table comprises resource information of each network resource provided by at least one switch, and the network resource comprises an Internet protocol address and/or a port;
Acquiring a management requirement, wherein the management requirement comprises at least one of a network resource requirement to be recovered and a network resource requirement to be allocated;
performing network resource management according to the management requirement and the resource information table;
If the network resource requirement to be allocated includes an IP address requirement to be allocated, performing network resource management according to the management requirement and the resource information table, including:
Determining a target network segment identification to be allocated according to the IP address requirement to be allocated;
Determining a target network segment in the resource information table according to the target network segment identification, wherein the resource information table comprises network segments corresponding to all IP addresses and network segment identifications; the IP address requirement to be allocated comprises at least one allocation option, and each allocation option corresponds to at least one network segment identifier;
Performing network resource management according to the target network segment;
If the to-be-allocated IP address requirement includes a plurality of allocation options, determining, according to the target network segment identifier, a target network segment in the resource information table includes:
determining intersection sets of network segment identifiers corresponding to all allocation options in the IP address requirements to be allocated;
And taking the intersection as the target network segment.
2. The method of claim 1, wherein if the management requirement includes the network resource requirement to be reclaimed, the performing network resource management according to the management requirement and the resource information table includes:
Determining target network resources to be recovered according to the network resource requirements to be recovered;
and managing network resources according to the resource information corresponding to the target network resources in the resource information table.
3. The method according to claim 2, wherein if the resource information of each network resource includes a usage status corresponding to each network resource, the performing network resource management according to the resource information corresponding to the target network resource in the resource information table includes:
And managing network resources according to the use state of the target network resources in the resource information table.
4. A method according to claim 3, wherein said performing network resource management according to the usage status of the target network resource in the resource information table comprises:
If the use state of the target network resource in the resource information table is used, updating the use state of the target network resource in the resource information table to be unused, and sending first recovery information to a target terminal; the first recovery information is used for prompting that the target network resource is successfully recovered;
if the use state of the target network resource in the resource information table is unused, sending second recovery information to the target terminal; the second recovery information is used for prompting the recovery failure of the target network resource.
5. The method of claim 1, wherein if the network resource requirement to be allocated includes an IP address requirement to be allocated, the performing network resource management according to the management requirement and the resource information table, further comprises:
And carrying out network resource management according to the reference IP address in the network resource requirement to be allocated and the resource information table.
6. The method of claim 1, wherein the resource information of each network resource includes a location identifier of each port, and if the network resource requirement to be allocated includes a port requirement to be allocated, the performing network resource management according to the management requirement and the resource information table includes:
Determining the distribution quantity and the distribution positions of the target ports according to the port requirements to be distributed;
determining a target allocation range corresponding to the target port allocation position from the resource information table according to the target port allocation position;
And carrying out network resource management according to the use state of each port in the target allocation range and the allocation quantity of the target ports.
7. The method of claim 6, wherein the performing network resource management according to the usage status of each port in the target allocation range and the target port allocation number comprises:
if the use state of each port in the target allocation range is that the unused number is not less than the target port allocation number, determining a target allocation port, updating the use state of the target allocation port in the resource information table to be used, and sending first allocation information to a target terminal; the first allocation information is used for prompting successful allocation;
if the use state of each port in the target allocation range is that the unused number is smaller than the target port allocation number, sending second allocation information to the target terminal; the second allocation information is used for prompting allocation failure.
8. A network resource management device, the device comprising:
the determining module is used for determining a resource information table according to the switch application programming interface, wherein the resource information table comprises resource information of each network resource provided by at least one switch, and the network resource comprises an Internet protocol address and/or a port;
The system comprises an acquisition module, a management module and a distribution module, wherein the acquisition module is used for acquiring management requirements, and the management requirements comprise at least one of network resource requirements to be recovered and network resource requirements to be distributed;
the management module is used for carrying out network resource management according to the management requirement and the resource information table;
If the network resource requirement to be allocated comprises an IP address requirement to be allocated, the management module is further configured to determine a target network segment identifier to be allocated according to the IP address requirement to be allocated; determining a target network segment in the resource information table according to the target network segment identification; performing network resource management according to the target network segment; wherein, the resource information table comprises network segments and network segment identifiers corresponding to each IP address; the IP address requirement to be allocated comprises at least one allocation option, and each allocation option corresponds to at least one network segment identifier;
If the to-be-allocated IP address requirement comprises a plurality of allocation options, the management module is further configured to determine an intersection of network segment identifiers corresponding to the allocation options in the to-be-allocated IP address requirement; and taking the intersection as the target network segment.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211136609.2A CN115550317B (en) | 2022-09-19 | 2022-09-19 | Network resource management method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211136609.2A CN115550317B (en) | 2022-09-19 | 2022-09-19 | Network resource management method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115550317A CN115550317A (en) | 2022-12-30 |
CN115550317B true CN115550317B (en) | 2024-05-28 |
Family
ID=84727866
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211136609.2A Active CN115550317B (en) | 2022-09-19 | 2022-09-19 | Network resource management method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115550317B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7142650B1 (en) * | 1998-06-12 | 2006-11-28 | Mci Communication Corporation | System and method for resource management |
JP2009130572A (en) * | 2007-11-22 | 2009-06-11 | Netman Co Ltd | Method for acquiring network resource information by ports of network switch |
KR101230500B1 (en) * | 2012-10-31 | 2013-02-25 | 주식회사 베이스인 네트웍스 | Network resource management system and method |
CN103312836A (en) * | 2013-06-28 | 2013-09-18 | 国家电网公司 | Large local network internet protocol (IP) address administration method |
CN204442403U (en) * | 2015-03-04 | 2015-07-01 | 兴义供电局 | A kind of LAN IP management devices |
CN104780078A (en) * | 2015-04-03 | 2015-07-15 | 山东华软金盾软件有限公司 | Method and system for initiatively detecting IP (Internet protocol) of switch |
CN108769289A (en) * | 2018-05-31 | 2018-11-06 | 广州金华诚科技有限公司 | A kind of network address resources Visualized management system |
CN112787853A (en) * | 2020-12-29 | 2021-05-11 | 中国建设银行股份有限公司 | Automatic generation method and device of network change scheme and related equipment |
CN114422387A (en) * | 2022-01-19 | 2022-04-29 | 北京华云安信息技术有限公司 | Network asset detection method and device, electronic equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9628328B2 (en) * | 2013-03-15 | 2017-04-18 | Rackspace Us, Inc. | Network controller with integrated resource management capability |
US20180212825A1 (en) * | 2017-01-24 | 2018-07-26 | OSNEXUS Corporation | Dynamic management of networks to facilitate storage device access |
US20210051113A1 (en) * | 2019-08-16 | 2021-02-18 | International Business Machines Corporation | Resource distribution in a network environment |
-
2022
- 2022-09-19 CN CN202211136609.2A patent/CN115550317B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7142650B1 (en) * | 1998-06-12 | 2006-11-28 | Mci Communication Corporation | System and method for resource management |
JP2009130572A (en) * | 2007-11-22 | 2009-06-11 | Netman Co Ltd | Method for acquiring network resource information by ports of network switch |
KR101230500B1 (en) * | 2012-10-31 | 2013-02-25 | 주식회사 베이스인 네트웍스 | Network resource management system and method |
CN103312836A (en) * | 2013-06-28 | 2013-09-18 | 国家电网公司 | Large local network internet protocol (IP) address administration method |
CN204442403U (en) * | 2015-03-04 | 2015-07-01 | 兴义供电局 | A kind of LAN IP management devices |
CN104780078A (en) * | 2015-04-03 | 2015-07-15 | 山东华软金盾软件有限公司 | Method and system for initiatively detecting IP (Internet protocol) of switch |
CN108769289A (en) * | 2018-05-31 | 2018-11-06 | 广州金华诚科技有限公司 | A kind of network address resources Visualized management system |
CN112787853A (en) * | 2020-12-29 | 2021-05-11 | 中国建设银行股份有限公司 | Automatic generation method and device of network change scheme and related equipment |
CN114422387A (en) * | 2022-01-19 | 2022-04-29 | 北京华云安信息技术有限公司 | Network asset detection method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115550317A (en) | 2022-12-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11226847B2 (en) | Implementing an application manifest in a node-specific manner using an intent-based orchestrator | |
CN108287669B (en) | Date storage method, device and storage medium | |
US11586673B2 (en) | Data writing and reading method and apparatus, and cloud storage system | |
US11003625B2 (en) | Method and apparatus for operating on file | |
US9372880B2 (en) | Reclamation of empty pages in database tables | |
CN110209490B (en) | Memory management method and related equipment | |
CN111061432B (en) | Service migration method, device, equipment and readable storage medium | |
CN108399101A (en) | The methods, devices and systems of scheduling of resource | |
CN105095103A (en) | Storage device management method and device used for cloud environment | |
CN107943423A (en) | The management method and computer-readable recording medium of storage resource in cloud system | |
CN114816272B (en) | Magnetic disk management system under Kubernetes environment | |
CN108132759A (en) | A kind of method and apparatus that data are managed in file system | |
CN111399753A (en) | Method and device for writing pictures | |
US20190243807A1 (en) | Replication of data in a distributed file system using an arbiter | |
US11429311B1 (en) | Method and system for managing requests in a distributed system | |
CN113055448B (en) | Metadata management method and device | |
CN115550317B (en) | Network resource management method, device, computer equipment and storage medium | |
US20210216507A1 (en) | Method, device and computer program product for storage management | |
US11262932B2 (en) | Host-aware discovery and backup configuration for storage assets within a data protection environment | |
CN107168645B (en) | Storage control method and system of distributed system | |
CN111435342A (en) | Poster updating method, poster updating system and poster management system | |
CN113311995B (en) | Cloud hard disk preparation method and device, computer equipment and storage medium | |
US20240104073A1 (en) | Storage management methods and apparatuses for distributed database | |
WO2022156099A1 (en) | Host upgrade method and apparatus, and electronic device and storage medium | |
US20220309050A1 (en) | Method and system for managing cross data source data access requests |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |