CN111752682A - Network port resource management method and device, electronic equipment and storage medium - Google Patents
Network port resource management method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111752682A CN111752682A CN202010605059.9A CN202010605059A CN111752682A CN 111752682 A CN111752682 A CN 111752682A CN 202010605059 A CN202010605059 A CN 202010605059A CN 111752682 A CN111752682 A CN 111752682A
- Authority
- CN
- China
- Prior art keywords
- port
- state
- target
- network
- virtual machine
- 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.)
- Withdrawn
Links
- 238000007726 management method Methods 0.000 title claims description 30
- 238000000034 method Methods 0.000 claims abstract description 34
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012217 deletion Methods 0.000 claims description 8
- 230000037430 deletion Effects 0.000 claims description 8
- 230000004044 response Effects 0.000 abstract description 8
- 239000002699 waste material Substances 0.000 abstract description 6
- 238000004891 communication Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000010926 purge Methods 0.000 description 2
- 238000004140 cleaning Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a method, a device and equipment for managing network port resources and a storage medium, wherein the method comprises the following steps: receiving an application request aiming at SDN network port resources sent by a virtual machine; inquiring whether a first target port in a release state exists in a corresponding cache pool or not according to the network resource identifier of the application request; if yes, performing pre-occupation operation on the first target port, and modifying the state of the first target port into an occupation state; and if the virtual machine application port task fails to execute, releasing or clearing the first target port. According to the method and the device, the corresponding cache pool can be added to the SDN network resource, the resource can be directly requested from the cache pool, and the response speed is improved; the state attribute is added for each port, the port in the release state can be applied, the state of the port is modified to be occupied after the application, the occurrence of concurrent operation is avoided, the release or clearing operation can be timely executed on the port after the task execution fails, and the waste of resources is avoided.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for managing network port resources, an electronic device, and a computer-readable storage medium.
Background
With the increasing of virtual machines of a virtualization platform and the use of an SDN (Software Defined Network) advanced Network, under an existing resource management mechanism, especially when an SDN Network card of a virtual machine is frequently operated, concurrent operation problems often exist that a response to requesting port resources to the advanced Network is slow, the virtual machine cannot release the applied port resources after a task fails, and multiple virtual machines simultaneously use the same Network resource. Therefore, how to solve the above problems is a great concern for those skilled in the art.
Disclosure of Invention
An object of the present application is to provide a method and an apparatus for managing network port resources, an electronic device, and a computer-readable storage medium, which improve a request response speed and avoid occurrence of concurrent operations in which a plurality of virtual machines use the same network resource at the same time and waste of resources.
In order to achieve the above object, the present application provides a network port resource management method, including:
receiving an application request aiming at SDN network port resources sent by a virtual machine;
inquiring whether a first target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the network resource identifier in the application request;
if the first target port in the release state exists, performing pre-occupation operation on the first target port, and modifying the state of the first target port into an occupation state;
and if the application port task of the virtual machine fails to be executed, executing release or clearing operation on the first target port.
Optionally, after querying whether the first target port in the release state exists in the cache pool of the corresponding SDN network resource, the method further includes:
if the first target port in the release state does not exist, automatically calling application operation to apply for a new port for the superior network resource, and writing port information corresponding to the new port into a corresponding cache pool;
and executing pre-occupation operation on the new port so as to modify the port state corresponding to the new port into an occupation state.
Optionally, after the modifying the state of the first target port to the occupied state, the method further includes:
and if the application port task of the virtual machine is successfully executed, executing a use operation on the first target port so as to modify the state of the first target port into a use state, or directly removing the port information corresponding to the first target port from the corresponding cache pool.
Optionally, the method further includes:
receiving a control instruction aiming at opening/closing a cache pool;
and if the control instruction is used for opening the cache pool, returning a configuration interface aiming at the cache pool, and receiving an instruction for configuring the length of the cache pool through the configuration interface.
Optionally, the method further includes:
receiving an update request aiming at SDN network port resources sent by a virtual machine;
determining a first original port based on the updating request, executing a pre-occupation operation on the first original port, and modifying the state of the first original port into an occupation state;
inquiring whether a second target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the updating request;
if a second target port in a release state exists, performing pre-occupation operation on the second target port, and modifying the state of the second target port into an occupation state;
if the task of the updated port of the virtual machine is successfully executed, releasing or clearing operation is executed on the first original port, and using operation is executed on the second target port;
and if the task execution of the updated port of the virtual machine fails, recovering to execute the use operation on the first original port and execute the release or clearing operation on the second target port.
Optionally, the method further includes:
receiving a deletion request aiming at SDN network port resources sent by a virtual machine;
determining a second original port based on the deletion request, executing a pre-occupation operation on the second original port, and modifying the state of the second original port into an occupation state;
if the task of deleting the port of the virtual machine is successfully executed, executing a clearing operation on the second original port;
and if the execution of the port deleting task of the virtual machine fails, recovering to execute the use operation on the second original port.
In order to achieve the above object, the present application provides a network port resource management device, including:
the request receiving module is used for receiving an application request aiming at SDN network port resources, which is sent by a virtual machine;
a port query module, configured to query, according to the network resource identifier in the application request, whether a first target port in a release state exists in a cache pool corresponding to the SDN network resource;
the port pre-occupation module is used for executing pre-occupation operation on a first target port if the first target port in the release state exists, and modifying the state of the first target port into an occupation state;
and the operation execution module is used for executing release or clearing operation on the first target port if the application port task of the virtual machine fails to be executed.
Optionally, the method further includes:
and the port using module is used for executing using operation on the first target port if the application port task of the virtual machine is successfully executed, so that the state of the first target port is modified into a using state, or the port information corresponding to the first target port is directly removed from the corresponding cache pool.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the steps of any of the aforementioned disclosed network port resource management methods when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of any one of the network port resource management methods disclosed in the foregoing.
According to the above scheme, the method for managing network port resources provided by the present application includes: receiving an application request aiming at SDN network port resources sent by a virtual machine; inquiring whether a first target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the network resource identifier in the application request; if the first target port in the release state exists, performing pre-occupation operation on the first target port, and modifying the state of the first target port into an occupation state; and if the application port task of the virtual machine fails to be executed, executing release or clearing operation on the first target port. As can be seen from the above, the corresponding cache pool can be added to the SDN network resource, so that the resource can be directly requested from the cache pool without accessing a higher-level network, and the request response speed is improved; in addition, the method and the device also add the state attribute for each port, can apply for the port in the release state, and modify the state of the port into occupation after the application, thereby avoiding the occurrence of concurrent operation that a plurality of virtual machines use the same network resource at the same time, and after the execution of the task of the virtual machine fails, the method and the device can execute the release or clearing operation on the port in time, thereby avoiding the waste of resources.
The application also discloses a network port resource management device, an electronic device and a computer readable storage medium, which can also realize the technical effects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 and fig. 2 are flowcharts illustrating a method for managing network port resources according to an embodiment of the present disclosure;
fig. 3 and fig. 4 are flowcharts illustrating another network port resource management method disclosed in an embodiment of the present application;
fig. 5 and fig. 6 are flowcharts illustrating another network port resource management method disclosed in the embodiment of the present application;
fig. 7 is a structural diagram of a network port resource management device disclosed in an embodiment of the present application;
fig. 8 is a block diagram of an electronic device disclosed in an embodiment of the present application;
fig. 9 is a block diagram of another electronic device disclosed in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Under a traditional resource management mechanism, particularly when a virtual machine SDN network card is frequently operated, the concurrent operation problems that the response of requesting port resources to an upper-level network is slow, the virtual machine cannot release the applied port resources after a task fails, and a plurality of virtual machines use the same network resource at the same time often exist.
Therefore, the embodiment of the application discloses a network port resource management method, which improves the request response speed and avoids the occurrence of concurrent operation and resource waste when a plurality of virtual machines use the same network resource at the same time.
Referring to fig. 1 and fig. 2, a network port resource management method disclosed in an embodiment of the present application includes:
s101: receiving an application request aiming at SDN network port resources sent by a virtual machine;
in this embodiment of the application, the virtual machine may send an application request for applying for SDN network port resources. Specifically, the application request is used for an application port, which may include identification information of SDN network resources.
S102: inquiring whether a first target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the network resource identifier in the application request;
in this step, the application request is analyzed to determine the network resource identifier therein, and then whether the first target port in the release state exists in the cache pool of the corresponding resource can be queried according to the network resource identifier.
It should be noted that the cache pool is a cache pool created in advance for each SDN network resource, where all ports under the network resource may be saved in advance, and for each port, a state attribute of the port is also saved to characterize whether the port is available. The status attributes may include, but are not limited to, a release status, an occupied status, and the like. The release state indicates that the port is in a free available state, and the occupied state indicates that the port is occupied and is not currently available.
S103: if the first target port in the release state exists, performing pre-occupation operation on the first target port, and modifying the state of the first target port into an occupation state;
it can be understood that, if the first target port available in the release state exists in the corresponding cache pool obtained through querying, the pre-occupation operation may be performed on the port, so as to modify the state of the port to an occupation state, and if a request of another application port is initiated during this period, the port in the occupation state cannot be applied, thereby avoiding occurrence of a concurrent operation.
As a feasible implementation manner, if the first target port which is not available in the release state is found in the corresponding cache pool, the application operation may be automatically invoked, specifically, the Apply interface may be invoked to Apply for a new port to the upper-level network resource, and the port information corresponding to the new port is written into the corresponding cache pool. And then, the pre-occupation operation is executed on the applied new port so as to modify the port state corresponding to the new port into an occupation state.
S104: and if the application port task of the virtual machine fails to be executed, executing release or clearing operation on the first target port.
After occupying the port, the task execution status of the virtual machine can be further monitored. If the application port task of the virtual machine fails to be executed, the representation port is not used successfully, and at the moment, the first target port can be released or cleared, so that resource release is realized in time, and the condition that the port is still occupied due to the task failure is avoided. And executing release or clearing operation on the port, specifically, modifying the port state into a release state, or directly removing the port information from the cache pool, and calling a delete interface to synchronously clear the port information in the openstack. In particular implementations, the release or purge operation may be performed in particular according to a manner specified by a user.
If the application port task of the virtual machine is successfully executed, the representation port is successfully applied and is really used, and at the moment, the use operation is executed on the first target port so as to modify the state of the first target port into a use state or directly remove the port information corresponding to the first target port from the corresponding cache pool.
It can be understood that, as a preferred implementation manner, the embodiment of the present application may further provide an on/off selection function for the cache pool, that is, a user may determine whether to open the cache pool according to a requirement of the user. Specifically, a control instruction for turning on/off the cache pool may be received. If the control instruction is used for opening the cache pool, a configuration interface for the cache pool can be further returned, and the instruction for configuring the length of the cache pool can be received through the configuration interface.
According to the above scheme, the method for managing network port resources provided by the present application includes: receiving an application request aiming at SDN network port resources sent by a virtual machine; inquiring whether a first target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the network resource identifier in the application request; if the first target port in the release state exists, performing pre-occupation operation on the first target port, and modifying the state of the first target port into an occupation state; and if the application port task of the virtual machine fails to be executed, executing release or clearing operation on the first target port. As can be seen from the above, the corresponding cache pool can be added to the SDN network resource, so that the resource can be directly requested from the cache pool without accessing a higher-level network, and the request response speed is improved; in addition, the method and the device also add the state attribute for each port, can apply for the port in the release state, and modify the state of the port into occupation after the application, thereby avoiding the occurrence of concurrent operation that a plurality of virtual machines use the same network resource at the same time, and after the execution of the task of the virtual machine fails, the method and the device can execute the release or clearing operation on the port in time, thereby avoiding the waste of resources.
The embodiment of the application discloses another network port resource management method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical scheme. Referring to fig. 3 and 4, specifically:
s201: receiving an update request aiming at SDN network port resources sent by a virtual machine;
in this embodiment of the present application, an update function for port resources may also be provided, for example, an SDN network port currently used by the virtual machine is port 1, and if it is required to modify the used port into port 2, an update request may be issued, where the update request may include a first original port currently used and a second target port to be switched.
S202: determining a first original port based on the updating request, executing a pre-occupation operation on the first original port, and modifying the state of the first original port into an occupation state;
in this step, the first original port may be determined first, and the state attribute of the first original port may be modified in the cache pool to an occupied state, so as to implement the pre-occupation operation on the port.
S203: inquiring whether a second target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the updating request;
s204: if a second target port in a release state exists, performing pre-occupation operation on the second target port, and modifying the state of the second target port into an occupation state;
it can be understood that, in the embodiment of the present application, whether an available port exists may be searched in a cache pool of a corresponding SDN network resource. If there is a second target port in the release state, the pre-occupation operation can be executed on the port, and the state of the port is modified into an occupation state. And if the second target port in the release state does not exist, calling the Apply interface to Apply for a new port and pre-occupying the new port.
S205: if the task of the updated port of the virtual machine is successfully executed, releasing or clearing operation is executed on the first original port, and using operation is executed on the second target port;
s206: and if the task execution of the updated port of the virtual machine fails, recovering to execute the use operation on the first original port and execute the release or clearing operation on the second target port.
After pre-empting the first original port and the second target port, the virtual machine task execution status may be further monitored. If the task of the update port of the virtual machine is successfully executed, the representation is successfully switched to the second target port without using the first original port, so that the release or cleaning operation can be executed on the first original port, the use operation is executed on the second target port, and the second target port is removed from the cache pool. If the task execution of the updated port of the virtual machine fails, the representation fails to complete the switching of the port, the use of the first original port still needs to be recovered, and the second target port needs to be released or cleared at the same time.
The embodiment of the application discloses another network port resource management method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical scheme. Referring to fig. 5 and 6, specifically:
s301: receiving a deletion request aiming at SDN network port resources sent by a virtual machine;
in the embodiment of the present application, a delete function for a port resource may also be provided. That is, the user may issue a request for deleting the SDN network port resource through the virtual machine. The request may specifically include port information that needs to be deleted, such as a port ID number.
S302: determining a second original port based on the deletion request, executing a pre-occupation operation on the second original port, and modifying the state of the second original port into an occupation state;
in this step, the second original port to be deleted can be determined by analyzing the deletion request, and the state of the second original port is modified into the occupied state by performing the preemption operation on the second original port.
S303: if the task of deleting the port of the virtual machine is successfully executed, executing a clearing operation on the second original port;
s304: and if the execution of the port deleting task of the virtual machine fails, recovering to execute the use operation on the second original port.
After the second original port is preempted, the task execution state of the virtual machine is further monitored. If the task of deleting the port of the virtual machine is successfully executed, the representation can execute a clearing operation on the second original port, specifically, the port information can be removed from the cache pool, and a delete interface is called to synchronously clear the port information in the openstack, so that the clearing of the resource is completed. If the task execution of the port deletion of the virtual machine fails, the use of the second original port is recovered, the state of the second original port is modified to be used or the information of the second original port is directly removed from the cache pool, and the fact that the second original port is really used is represented.
In the following, a network port resource management device provided in an embodiment of the present application is introduced, and a network port resource management device described below and a network port resource management method described above may refer to each other.
Referring to fig. 7, a network port resource management device according to an embodiment of the present application includes:
a request receiving module 401, configured to receive an application request for SDN network port resources sent by a virtual machine;
a port query module 402, configured to query, according to the network resource identifier in the application request, whether a first target port in a release state exists in a cache pool corresponding to the SDN network resource;
a port pre-occupation module 403, configured to, if there is a first target port in a release state, perform pre-occupation operation on the first target port, and modify a state of the first target port into an occupation state;
an operation executing module 404, configured to execute a release or purge operation on the first target port if the application port task of the virtual machine fails to be executed.
For the specific implementation process of the modules 401 to 404, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
On the basis of the foregoing embodiment, as a preferred implementation, the network port resource management device provided in this embodiment may further include:
and the port using module is used for executing using operation on the first target port if the application port task of the virtual machine is successfully executed, so that the state of the first target port is modified into a using state, or the port information corresponding to the first target port is directly removed from the corresponding cache pool.
The present application further provides an electronic device, and as shown in fig. 8, an electronic device provided in an embodiment of the present application includes:
a memory 100 for storing a computer program;
the processor 200, when executing the computer program, may implement the steps provided by the above embodiments.
Specifically, the memory 100 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor 200 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip in some embodiments, and provides computing and controlling capability for the electronic device, and when executing the computer program stored in the memory 100, the steps of the network port resource management method disclosed in any of the foregoing embodiments may be implemented.
On the basis of the above embodiment, as a preferred implementation, referring to fig. 9, the electronic device further includes:
and an input interface 300 connected to the processor 200, for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory 100 under the control of the processor 200. The input interface 300 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch layer covered on a display screen, or a button, a track ball or a touch pad arranged on a terminal shell, or a keyboard, a touch pad or a mouse, etc.
And a display unit 400 connected to the processor 200 for displaying data processed by the processor 200 and for displaying a visualized user interface. The display unit 400 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like.
And a network port 500 connected to the processor 200 for performing communication connection with each external terminal device. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, an ieee802.11 s-based communication technology, and the like.
While fig. 9 illustrates only an electronic device having the assembly 100 and 500, those skilled in the art will appreciate that the configuration illustrated in fig. 9 does not constitute a limitation of the electronic device and may include fewer or more components than those illustrated, or some components may be combined, or a different arrangement of components.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium has a computer program stored thereon, and the computer program, when executed by a processor, implements the steps of the network port resource management method disclosed in any of the foregoing embodiments.
According to the method and the device, the corresponding cache pool can be added to the SDN network resource, so that the resource can be directly requested from the cache pool without accessing a superior network, and the request response speed is improved; in addition, the method and the device also add the state attribute for each port, can apply for the port in the release state, and modify the state of the port into occupation after the application, thereby avoiding the occurrence of concurrent operation that a plurality of virtual machines use the same network resource at the same time, and after the execution of the task of the virtual machine fails, the method and the device can execute the release or clearing operation on the port in time, thereby avoiding the waste of resources.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A method for managing network port resources, comprising:
receiving an application request aiming at SDN network port resources sent by a virtual machine;
inquiring whether a first target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the network resource identifier in the application request;
if the first target port in the release state exists, performing pre-occupation operation on the first target port, and modifying the state of the first target port into an occupation state;
and if the application port task of the virtual machine fails to be executed, executing release or clearing operation on the first target port.
2. The method for managing network port resources according to claim 1, wherein after querying whether the first target port in the release state exists in the cache pool of the corresponding SDN network resource, the method further comprises:
if the first target port in the release state does not exist, automatically calling application operation to apply for a new port for the superior network resource, and writing port information corresponding to the new port into a corresponding cache pool;
and executing pre-occupation operation on the new port so as to modify the port state corresponding to the new port into an occupation state.
3. The method for managing network port resources of claim 1, wherein after the modifying the state of the first target port to the occupied state, further comprises:
and if the application port task of the virtual machine is successfully executed, executing a use operation on the first target port so as to modify the state of the first target port into a use state, or directly removing the port information corresponding to the first target port from the corresponding cache pool.
4. The network port resource management method of claim 1, further comprising:
receiving a control instruction aiming at opening/closing a cache pool;
and if the control instruction is used for opening the cache pool, returning a configuration interface aiming at the cache pool, and receiving an instruction for configuring the length of the cache pool through the configuration interface.
5. The network port resource management method of any of claims 1 to 4, further comprising:
receiving an update request aiming at SDN network port resources sent by a virtual machine;
determining a first original port based on the updating request, executing a pre-occupation operation on the first original port, and modifying the state of the first original port into an occupation state;
inquiring whether a second target port in a release state exists in a cache pool corresponding to the SDN network resources or not according to the updating request;
if a second target port in a release state exists, performing pre-occupation operation on the second target port, and modifying the state of the second target port into an occupation state;
if the task of the updated port of the virtual machine is successfully executed, releasing or clearing operation is executed on the first original port, and using operation is executed on the second target port;
and if the task execution of the updated port of the virtual machine fails, recovering to execute the use operation on the first original port and execute the release or clearing operation on the second target port.
6. The network port resource management method of any of claims 1 to 4, further comprising:
receiving a deletion request aiming at SDN network port resources sent by a virtual machine;
determining a second original port based on the deletion request, executing a pre-occupation operation on the second original port, and modifying the state of the second original port into an occupation state;
if the task of deleting the port of the virtual machine is successfully executed, executing a clearing operation on the second original port;
and if the execution of the port deleting task of the virtual machine fails, recovering to execute the use operation on the second original port.
7. A network port resource management apparatus, comprising:
the request receiving module is used for receiving an application request aiming at SDN network port resources, which is sent by a virtual machine;
a port query module, configured to query, according to the network resource identifier in the application request, whether a first target port in a release state exists in a cache pool corresponding to the SDN network resource;
the port pre-occupation module is used for executing pre-occupation operation on a first target port if the first target port in the release state exists, and modifying the state of the first target port into an occupation state;
and the operation execution module is used for executing release or clearing operation on the first target port if the application port task of the virtual machine fails to be executed.
8. The network port resource management device of claim 7, further comprising:
and the port using module is used for executing using operation on the first target port if the application port task of the virtual machine is successfully executed, so that the state of the first target port is modified into a using state, or the port information corresponding to the first target port is directly removed from the corresponding cache pool.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network port resource management method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the network port resource management method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010605059.9A CN111752682A (en) | 2020-06-29 | 2020-06-29 | Network port resource management method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010605059.9A CN111752682A (en) | 2020-06-29 | 2020-06-29 | Network port resource management method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111752682A true CN111752682A (en) | 2020-10-09 |
Family
ID=72677886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010605059.9A Withdrawn CN111752682A (en) | 2020-06-29 | 2020-06-29 | Network port resource management method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111752682A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112804095A (en) * | 2020-12-31 | 2021-05-14 | 迈普通信技术股份有限公司 | Port information management method and device and electronic equipment |
-
2020
- 2020-06-29 CN CN202010605059.9A patent/CN111752682A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112804095A (en) * | 2020-12-31 | 2021-05-14 | 迈普通信技术股份有限公司 | Port information management method and device and electronic equipment |
CN112804095B (en) * | 2020-12-31 | 2022-07-12 | 迈普通信技术股份有限公司 | Port information management method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9223564B2 (en) | Update systems responsive to ongoing processing at a storage system | |
US10922102B2 (en) | Method of controlling applications in a terminal and terminal | |
US9519504B2 (en) | Managing a server template | |
US9424085B2 (en) | Recognizing a process group that is related to an application | |
WO2018045934A1 (en) | Application process management method and terminal device | |
CN110635944A (en) | Cluster network configuration method and device, electronic equipment and storage medium | |
WO2014194654A1 (en) | Method and apparatus for page view switching | |
CN104583948A (en) | Layout and execution of operating systems using BPRAM | |
CN110879742A (en) | Method and device for asynchronously creating internal snapshot of virtual machine and storage medium | |
CN112269659A (en) | Resource management method, system, electronic equipment and storage medium | |
CN104461746A (en) | Memory space optimization method and system based on Android system | |
WO2022148086A1 (en) | Information processing method and apparatus, and device and storage medium | |
CN106339458B (en) | Stage partitioning method and terminal based on elastic distributed data set | |
CN103473037A (en) | Information processing apparatus, information processing method, and program | |
CN112988185A (en) | Cloud application updating method, device and system, electronic equipment and storage medium | |
CN113641378A (en) | Optical module program upgrading method, device, equipment and readable storage medium | |
TWI615775B (en) | Methods for accessing a solid state disk for quality of service and apparatuses using the same | |
US20150127916A1 (en) | Dynamic memory allocation | |
CN110609710B (en) | Android system starting speed control method, intelligent device and storage medium | |
CN111752682A (en) | Network port resource management method and device, electronic equipment and storage medium | |
CN112527449B (en) | Cluster node label creation method and system, electronic equipment and storage medium | |
CN116820527B (en) | Program upgrading method, device, computer equipment and storage medium | |
CN111782717A (en) | Data processing method and system, electronic equipment and storage medium | |
CN111045789A (en) | Virtual machine starting method and device, electronic equipment and storage medium | |
CN111722888B (en) | Operation execution method, device, equipment and readable storage medium |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20201009 |