Port resource management method and device, electronic equipment and storage medium
By obtaining and analyzing the usage records, status and statistical information of port resources, the port resources are automatically managed, which solves the problem of time-consuming, labor-intensive and accurate accuracy of manual operations, and realizes efficient and accurate allocation and management of port resources.
Patent Information
- Application Number
- CN202510072447.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-22
AI Technical Summary
When facing a large number of port resource operations, manual recording and statistics require a lot of time and energy, and the accuracy is difficult to guarantee, and data errors or omissions are easily caused by human negligence, which affects the rationality and timeliness of port resource allocation, and even causes network failures or business delays.
By obtaining port resource record information, including port resource usage records, obtaining port resource status information and statistical information, and managing port resources based on this information, including port resource allocation, recycling and margin monitoring.
It realizes automated management of port resources, reduces the time and energy of manual operations, improves data accuracy and consistency, ensures the rationality and timeliness of port resource allocation, and avoids network failures or business delays.
Smart Images

Figure CN119865726A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a port resource management method, device, electronic device and storage medium. Background Art
[0002] As the scale of data centers expands and the volume of business increases, the demand for fiber distribution frame port resource management becomes more urgent. In the operation and maintenance of enterprise-level data centers, multiple computer rooms are usually involved, and data is frequently transmitted between computer rooms. Optical fiber distribution frames (ODFs) play a key role in this, responsible for the termination and distribution of optical cables in each computer room. They are important facilities for realizing the connection, distribution and scheduling of optical fiber lines and the network interconnection between computer rooms.
[0003] In the actual operation of computer room operation and maintenance, the port resource management of optical fiber distribution frames involves routine operations such as port resource allocation, recycling, and margin monitoring. Among them, the reasonable allocation of port resources will directly affect the stable operation of the data center and the normal development of business.
[0004] In the related art, the existing port resource management method mainly relies on the administrator to manage port resources through tables. However, when faced with a large number of port resource operations, manual recording and statistics require a lot of time and energy, and the accuracy is difficult to guarantee. It is easy to cause data errors or omissions due to human negligence, which in turn affects the rationality and timeliness of port resource allocation, and even causes network failures or service delays. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a port resource management method, device, electronic device and storage medium to solve the technical problem that when facing a large number of port resource operations, manual recording and statistics require a lot of time and effort, and the accuracy is difficult to guarantee. It is easy to cause data errors or omissions due to human negligence, which in turn affects the rationality and timeliness of port resource allocation, and even causes network failures or service delays. The specific technical solution is as follows:
[0006] In a first aspect of an embodiment of the present application, a port resource management method is first provided, the method comprising:
[0007] Acquire port resource record information, wherein the port resource record information includes a usage record of the port resource;
[0008] Acquire port resource status information and port resource statistical information from the port resource record information;
[0009] The port resources are managed according to the port resource status information and the port resource statistical information.
[0010] In an optional implementation, the managing the port resources according to the port resource status information and the port resource statistical information includes:
[0011] Monitoring the port resource margin according to the port resource statistical information;
[0012] Acquire port resource processing requirements, wherein the port resource processing requirements include allocation port resource requirements and recovery port resource requirements;
[0013] When the port resource processing requirement is a port resource allocation requirement, allocating port resources according to the port resource state information and the port resource processing requirement;
[0014] When the port resource processing requirement is a port resource recovery requirement, the port resources are recovered.
[0015] In an optional implementation, when the port resource processing requirement is a port resource allocation requirement, allocating port resources according to the port resource state information and the port resource processing requirement includes:
[0016] Generate a port connection structure diagram according to the port resource status information;
[0017] Port resources are allocated according to the port connection structure diagram and the port resource processing requirements.
[0018] In an optional implementation, the port resource processing requirement includes source computer room information, target computer room information, number of ports and fiber type;
[0019] The allocating port resources according to the port connection structure diagram and the port resource processing requirements includes:
[0020] Acquire a starting computer room matching the source computer room information from the port connection structure diagram;
[0021] Acquire a terminal computer room matching the target computer room information from the port connection structure diagram;
[0022] Determine a target path from the starting computer room to the end computer room according to the number of ports and the type of optical fiber;
[0023] Port resources are allocated according to the target path.
[0024] In an optional implementation, the port resource status information includes the usage status of each port resource;
[0025] Allocating port resources according to the target path includes:
[0026] generating allocation description information according to the target path;
[0027] The usage status of the corresponding port resource is modified to the usage status according to the allocation description information, thereby completing the allocation of the port resource.
[0028] In an optional implementation, the port resource statistical information includes a port resource utilization rate of each port resource;
[0029] The monitoring of the port resource margin according to the port resource statistical information includes:
[0030] According to the port resource statistical information, detecting whether there is a target port resource whose port resource usage exceeds a preset usage threshold;
[0031] In the case where there is a target port resource whose port resource usage exceeds a preset usage threshold, an early warning is issued for the target port resource.
[0032] In an optional implementation, the port resource status information includes the usage status of each port resource, and the port resource processing requirement includes a first port identifier;
[0033] When the port resource processing requirement is a port resource recovery requirement, the port resource is recovered, including:
[0034] Acquire a reclaimed port resource identifier matching the first port identifier from the port resource status information;
[0035] Using the port resource corresponding to the recovery port resource identifier as the first port resource;
[0036] The usage status of the first port resource is modified to an unused status, thereby completing the recovery of the port resource.
[0037] In a second aspect of the embodiment of the present application, a port resource management device is further provided, the device comprising:
[0038] A first acquisition module acquires port resource record information, wherein the port resource record information includes a usage record of the port resource;
[0039] A second acquisition module acquires port resource status information and port resource statistical information from the port resource record information;
[0040] The management module manages the port resources according to the port resource status information and the port resource statistical information.
[0041] In a third aspect of the embodiments of the present application, there is further provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0042] Memory, used to store computer programs;
[0043] The processor is configured to implement the port resource management method described in any one of the first aspects above when executing a program stored in the memory.
[0044] In a fourth aspect of the embodiments of the present application, a storage medium is further provided, wherein instructions are stored in the storage medium, and when the storage medium is run on a computer, the computer executes any port resource management method described in the first aspect above.
[0045] In a fifth aspect of the embodiments of the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any port resource management method described in the first aspect.
[0046] The above technical solution provided by the embodiment of the present application obtains port resource record information, the port resource record information includes the use record of the port resource, obtains the port resource status information and the port resource statistical information from the port resource record information, and manages the port resource according to the port resource status information and the port resource statistical information. In this way, based on the use record of the port resource, the port resource status information and the port resource statistical information are obtained, and the port resource is managed, which can solve the technical problem that when facing a large number of port resource operations, manual recording and statistics require a lot of time and energy, and the accuracy is difficult to guarantee, and it is easy to cause data errors or omissions due to human negligence, thereby affecting the rationality and timeliness of port resource allocation, and even causing network failures or business delays. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 A schematic diagram of an implementation flow of a port resource management method provided in an embodiment of the present application;
[0050] Figure 2A schematic diagram of an implementation flow of another port resource management method provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of an implementation flow of a port resource margin monitoring method provided in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of an implementation flow of a port resource allocation method provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of a port connection structure diagram provided in an embodiment of the present application;
[0054] Figure 6 A schematic diagram of an implementation flow of another port resource allocation method provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of an implementation flow of another port resource allocation method provided in an embodiment of the present application;
[0056] Figure 8 A schematic diagram of an implementation flow of a port resource recovery method provided in an embodiment of the present application;
[0057] Fig. 9 A schematic diagram of the structure of a port resource management device provided in an embodiment of the present application;
[0058] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0060] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0061] In order to solve the technical problem that in the prior art, when facing a large number of port resource operations, manual recording and statistics need to consume a lot of time and energy, and the accuracy is difficult to guarantee, and it is easy to cause data errors or omissions due to human negligence, thereby affecting the rationality and timeliness of port resource allocation, and even causing network failures or business delays. The present application uses a port resource management method, device, electronic device and storage medium, based on the use record of port resources, to obtain port resource status information and port resource statistical information, and manage port resources, which can solve the technical problem that when facing a large number of port resource operations, manual recording and statistics need to consume a lot of time and energy, and the accuracy is difficult to guarantee, and it is easy to cause data errors or omissions due to human negligence, thereby affecting the rationality and timeliness of port resource allocation, and even causing network failures or business delays.
[0062] like Figure 1 FIG. 1 is a schematic diagram of an implementation flow of a port resource management method provided in an embodiment of the present application. The method may specifically include the following steps:
[0063] S101, obtaining port resource record information, where the port resource record information includes a usage record of port resources.
[0064] In an embodiment of the present application, port resource record information is obtained, and the port resource record information includes a usage record of the port resource. When obtaining the port resource record information, the data integrity can be first verified to ensure that the obtained information is complete and correct, including all necessary fields (such as room identification, cabinet identification, port identification, opposite room identification, opposite cabinet identification, opposite port identification, line status, service description, fiber type, etc.). The port resource usage record may include the computer room identification (i.e., the computer room number where the current port is located, such as computer room A, computer room B), cabinet identification (i.e., the cabinet number corresponding to the computer room where the current port is located, such as H-01, J-01), port identification (i.e., the current corresponding port number, such as R1-01, R1-02), opposite computer room identification (i.e., the opposite computer room number connected to the current port, such as computer room C, computer room D), opposite cabinet identification (i.e., the opposite cabinet number connected to the current port, such as H-02, J-02), opposite port identification (i.e., the opposite port number connected to the current port, such as R1-03, R1-04), line status (i.e., the usage status of the current port, such as "in use" or "not in use"), service description (i.e., the service information carried by the current port, such as "service 1"), fiber type (i.e., the fiber type used by the current port, such as single-mode, multi-mode), and other record information, which is not limited to this in the present application example.
[0065] S102: Acquire port resource status information and port resource statistical information from the port resource record information.
[0066] In an embodiment of the present application, port resource status information and port resource statistical information are obtained from the port resource record information. Among them, the port resource status information may include the connection information between each computer room and the current use status of the port (such as "in use" or "unused") and the fiber type, the number of port resources, and other information. By analyzing the port resource record information, statistical information such as the total number of port resources, the number of usage, and the usage rate between each computer room can be obtained, which helps the administrator understand the overall resource usage and make reasonable port resource allocation or expansion decisions.
[0067] For example, by obtaining the port resource status information from the port resource record information, it can be obtained that port 1 is in use, port 2 is unused, and the corresponding processing business of the port; by obtaining the port resource statistics information from the port resource record information, it can be obtained that the total number of single-mode optical fiber connections between computer room A and computer room B is 72, of which 30 are in use, with a utilization rate of 41.6%. The total number of multi-mode optical fiber connections between computer room A and computer room C is 72, of which 70 are in use, with a utilization rate of up to 97.2%, indicating that the multi-mode optical fiber resources in this direction are already very tight and expansion may be necessary.
[0068] S103: Manage the port resources according to the port resource status information and the port resource statistical information.
[0069] In the embodiment of the present application, the port resources are managed according to the port resource status information and the port resource statistical information, and management operations such as port resource allocation, port resource recovery, and surplus monitoring can be performed on the port resources, which are not limited in the present application example.
[0070] For example, from the port resource status information, it is known that port 1 and port 2 are not in use, so port resources are allocated to port 1 and port 2; from the port resource statistics information, it is known that the total number of single-mode optical fiber connections between computer room A and computer room B is 72, of which 30 are in use, with a utilization rate of 41.6%. The total number of multi-mode optical fiber connections between computer room A and computer room C is 72, of which 70 are in use, with a utilization rate of up to 97.2%, so it is necessary to expand the port resources.
[0071] Through the above description of the technical solution provided by the embodiment of the present application, the port resource record information is obtained, the port resource record information includes the usage record of the port resource, the port resource status information and the port resource statistical information are obtained from the port resource record information, and the port resource is managed according to the port resource status information and the port resource statistical information. In this way, based on the usage record of the port resource, the port resource status information and the port resource statistical information are obtained, and the port resource is managed, which can solve the technical problem that when facing a large number of port resource operations, manual recording and statistics require a lot of time and energy, and the accuracy is difficult to guarantee, and it is easy to cause data errors or omissions due to human negligence, thereby affecting the rationality and timeliness of port resource allocation, and even causing network failures or business delays.
[0072] like Figure 2 As shown, it is a schematic diagram of the implementation process of another port resource management method provided in an embodiment of the present application, which may specifically include the following contents:
[0073] S201, obtaining port resource record information, where the port resource record information includes a usage record of port resources.
[0074] In the embodiment of the present application, this step is similar to the above-mentioned step S101, and the embodiment of the present application will not be described one by one here.
[0075] S202: Acquire port resource status information and port resource statistical information from the port resource record information.
[0076] In the embodiment of the present application, this step is similar to the above-mentioned step S102, and the embodiment of the present application will not be described one by one here.
[0077] S203: Monitor the port resource margin according to the port resource statistical information.
[0078] In an embodiment of the present application, the port resources are monitored for margin based on the port resource statistical information, wherein the port resource statistical information may include a computer room identifier (such as computer room A, computer room B), a peer computer room identifier (i.e., the number of the peer computer room connected to the computer room, such as computer room C, computer room D), total port resources (i.e., the number of ports between the computer room and the peer computer room), port resource usage (i.e., the number of ports occupied or in use), port resource utilization rate (i.e., the proportion of port resource usage to total port resources), optical fiber type (i.e., the type of optical fiber used by the current port, such as single-mode, multi-mode), and other statistical information, which is not limited to the examples of the present application.
[0079] As for how to monitor the port resource margin based on the port resource statistics, please refer to the following Figure 3 As shown in the method. Figure 3As shown, it is a schematic diagram of an implementation process of a port resource margin monitoring method provided in an embodiment of the present application, which may specifically include the following steps:
[0080] S301: Detect, based on port resource statistical information, whether there is a target port resource whose port resource usage exceeds a preset usage threshold.
[0081] In an embodiment of the present application, based on the port resource statistical information, it is detected whether there is a target port resource whose port resource utilization rate exceeds a preset utilization rate threshold, wherein the port resource statistical information may include the total amount of port resources, used amount, utilization rate, etc. of each computer room, and the preset utilization rate threshold is set according to business needs, and may be a port resource utilization rate threshold that can ensure that there are sufficient port resources available, or may be a port resource utilization rate threshold that can make full use of existing resources. The port resource utilization rate of each computer room may be compared with the preset utilization rate threshold, and the present application example is not limited to this.
[0082] For example, if you want to ensure that there are enough port resources available at any time, you can set this threshold to be relatively low, such as 70% or 80%. Conversely, if you want to make fuller use of existing resources, you can set this threshold to be relatively high, such as 90% or higher.
[0083] S302: When there is a target port resource whose port resource usage exceeds a preset usage threshold, issue an early warning for the target port resource.
[0084] In an embodiment of the present application, when there is a target port resource whose port resource utilization rate exceeds a preset utilization rate threshold, an early warning is issued for the target port resource. The early warning can be divided into different levels (such as emergency, serious, warning, etc.) according to the degree of excess of the port resource utilization rate or according to certain rules or algorithms, and an early warning message is issued so that the management personnel can take corresponding countermeasures according to the early warning level. Among them, the content of the early warning message may include detailed information of the target port resource (such as computer room identification, opposite computer room identification, total resources, resource usage, resource utilization rate, etc.), as well as possible solutions or suggestions (such as adding new port resources, optimizing the use of existing resources, etc.).
[0085] For example, the warning information can be the room ID: Room A; the opposite room ID: Room B; total resources: 100 ports; resource usage: 90 ports; resource usage rate: 90%; warning level: severe. Solutions or suggestions: 1. Consider adding new port resources to meet the needs of future business growth. 2. Analyze the use of existing port resources to find out whether there is waste or inefficient use, and optimize them. 3. If possible, adjust business strategies to reduce unnecessary port connections.
[0086] S204, obtaining port resource processing requirements, where the port resource processing requirements include port resource allocation requirements and port resource recovery requirements.
[0087] In the embodiment of the present application, a port resource processing requirement is obtained, and the port resource processing requirement is a port resource processing requirement manually input according to business requirements. Among them, the port resource processing requirement can be divided into allocation port resource requirements and recovery port resource requirements. Allocation of port resource requirements and recovery of port resource requirements are tasks that need to be frequently processed by the optical fiber distribution frame (ODF) port resource management tool in daily operation and maintenance, and the present application example does not limit this.
[0088] The demand for allocating port resources usually occurs when the data center expands its business or deploys new business. According to the business needs, a request for allocating a certain number of port resources is made. These requests may include specific parameters such as the source room information, the target room information, the required number of ports, and the fiber type (single mode or multi-mode), which are not limited in this application example.
[0089] The need to reclaim port resources mainly occurs in scenarios such as service offline, equipment replacement, or resource optimization. When certain port resources are no longer in use, it is necessary to be able to reclaim these resources in a timely manner so that they can be reallocated to other services in need. When reclaiming port resources, it is necessary to ensure that the port status is correctly updated to "unused" and to make corresponding records in the database to maintain the accuracy of the resource status, which is not limited in this application example.
[0090] For example, in actual applications, when a business system needs to be connected to another computer room, the administrator may enter information such as the source computer room, the target computer room, the number of ports required, and the type of optical fiber through the operation interface to make a request to allocate port resources. Or when a business system goes offline or no longer needs a port, the administrator can make a request to reclaim port resources through the operation interface.
[0091] S205: When the port resource processing requirement is a port resource allocation requirement, the port resource is allocated according to the port resource state information and the port resource processing requirement.
[0092] In an embodiment of the present application, when the port resource processing requirement is a port resource allocation requirement, the port resource processing requirement is analyzed to determine that the port resource processing requirement is a port resource allocation requirement. Relevant information can be extracted from the port resource processing requirement, and combined with the port resource status information, the port resources can be allocated. This application example does not limit this.
[0093] For example, when the port resource processing requirement is to allocate port resources, the port resource processing requirement is analyzed to obtain a user request to allocate two single-mode optical fiber ports from computer room A to computer room B. Thus, the port resources are allocated in combination with the port resource status information.
[0094] As for how to allocate port resources according to port resource status information and port resource processing requirements, please refer to the following for details. Figure 4 As shown in the method. Figure 4 As shown, it is a schematic diagram of an implementation process of a port resource allocation method provided in an embodiment of the present application, which may specifically include the following steps:
[0095] S401, generating a port connection structure diagram according to port resource status information.
[0096] In the embodiment of the present application, a port connection structure diagram is generated according to the port resource status information. The port resource status information includes the connection information between each computer room, the current use status of the port resource (such as "in use" or "unused"), and the related service description and the fiber type, the number of port resources corresponding to the fiber type, and other information. According to the current use status of the port resource, the fiber type and the corresponding number of port resources, the connection information between the computer room and the opposite computer room can be obtained, and the connection structure diagram can be obtained according to the connection information between each computer room, and the example of the present application does not limit this.
[0097] The port connection structure diagram can be generated according to the connection information by using relevant image drawing tools or software. The port connection structure diagram can show the connection relationship between each computer room and the port resources and fiber type information on each connection. Figure 5 As shown, a structural schematic diagram of a port connection structure diagram provided in an embodiment of the present application.
[0098] For example, according to the port resource status information, it can be obtained that there is 1 single-mode port remaining and 0 multi-mode ports remaining between computer room 1 and computer room 2; there are 10 single-mode ports remaining and 20 multi-mode ports remaining between computer room 1 and computer room 4; there are 12 single-mode ports remaining and 5 multi-mode ports remaining between computer room 1 and computer room 5; there is 1 single-mode port remaining and 0 multi-mode ports remaining between computer room 1 and computer room 3; there are 0 single-mode ports remaining and 15 multi-mode ports remaining between computer room 2 and computer room 4; there are 3 single-mode ports remaining and 6 multi-mode ports remaining between computer room 2 and computer room 3; there are 0 single-mode ports remaining and 0 multi-mode ports remaining between computer room 5 and computer room 3; there are 10 single-mode ports remaining and 30 multi-mode ports remaining between computer room 5 and computer room 6; there are 5 single-mode ports remaining and 0 multi-mode ports remaining between computer room 3 and computer room 4; there are 15 single-mode ports remaining and 10 multi-mode ports remaining between computer room 3 and computer room 6, then the connection structure diagram can be obtained as follows Figure 5 shown.
[0099] S402: Allocate port resources according to the port connection structure diagram and port resource processing requirements.
[0100] In the embodiment of the present application, port resources are allocated according to the port connection structure diagram and the port resource processing requirements, wherein the port resource processing requirements include source computer room information, target computer room information, port number and optical fiber type.
[0101] For example, the port resource processing requirement includes source room information 1, target room information 2, port number 2 and fiber type single mode. Then, a port resource allocation method 1 that meets the port resource processing requirement is found from the port connection structure diagram to allocate port resources.
[0102] As for how to allocate port resources according to the port connection structure diagram and port resource processing requirements, please refer to the following for details. Figure 6 As shown in the method. Figure 6 As shown, it is a schematic diagram of an implementation flow of another port resource allocation method provided in an embodiment of the present application, which may specifically include the following steps:
[0103] S601, obtaining a starting computer room that matches the source computer room information from a port connection structure diagram.
[0104] In an embodiment of the present application, the port resource processing requirement includes source computer room information, target computer room information, number of ports and optical fiber type. The source computer room information is obtained from the port resource processing requirement. The source computer room information can be a computer room identifier corresponding to the computer room (such as computer room 1, computer room 2), or it can be a computer room name corresponding to the computer room (name 1, name 2). According to the computer room identifier, the starting computer room matching the source computer room information is obtained from the port connection structure diagram.
[0105] For example, the source computer room information includes a computer room identifier (computer room 1). According to the computer room identifier (computer room 1), the starting computer room (computer room 1) is found from the port connection structure diagram.
[0106] S602: Acquire a destination computer room that matches the target computer room information from the port connection structure diagram.
[0107] In an embodiment of the present application, the port resource processing requirement includes source computer room information, target computer room information, number of ports and optical fiber type. The target computer room information is obtained from the port resource processing requirement. The target computer room information can be a computer room identifier corresponding to the computer room (e.g., computer room 3, computer room 4). The computer room identifier matching the target computer room information is obtained from the port connection structure diagram, and the computer room corresponding to the computer room identifier matching the target computer room information is used as the terminal computer room.
[0108] For example, the target computer room information includes a computer room identifier (computer room 5), and the terminal computer room is found from the port connection structure diagram according to the computer room identifier.
[0109] S603, determining a target path from the starting computer room to the end computer room according to the number of ports and the type of optical fiber.
[0110] In an embodiment of the present application, the required number of ports and fiber type are extracted from the port resource processing requirements, and the shortest path from the starting computer room to the end computer room is determined as the target path through a breadth-first search algorithm, wherein the number of ports is the capacity requirement for data transmission, and the fiber type determines the speed, distance, and cost of transmission. The target path from the starting computer room to the end computer room can be determined based on the number of ports and the fiber type. When there are multiple shortest paths, they can be selected based on other factors (path stability, cost, etc.). This application example is not limited to this.
[0111] For example, the number of required ports is 2, the fiber type is single mode, the starting room is room 1, and the end room is room 4. According to the port connection structure diagram ( Figure 5 ), the paths from room 1 to room 4 can be: room 1-room 4, room 1-room 2-room 4, room 1-room 3-room 4, room 1-room 5-room 3-room 4, room 1-room 5-room 6-room 3-room 4, etc. The number of ports required is 2, and the fiber type is single mode. Figure 5 It can be found that the shortest path is Room 1-Room 4, but the number of its single-mode ports is 0, so Room 1-Room 4 cannot be selected as the target path. In this way, the target path that meets the port resource processing requirements is obtained through the breadth-first search algorithm. For example, Room 1-Room 2-Room 4 is selected as the target path through the breadth-first algorithm.
[0112] S604: Allocate port resources according to the target path.
[0113] In the embodiment of the present application, port resources are allocated according to the target path to implement allocation management of port resources.
[0114] For example, Figure 5 , the target path is: computer room 1-computer room 2-computer room 4, then the port resources are allocated according to computer room 1-computer room 2-computer room 4.
[0115] As for how to allocate port resources according to the target path, please refer to the following Figure 7 As shown in the method. Figure 7 As shown, it is a schematic diagram of an implementation flow of another port resource allocation method provided in an embodiment of the present application, which may specifically include the following steps:
[0116] S701, generating allocation description information according to the target path.
[0117] In an embodiment of the present application, allocation description information is generated according to the target path, that is, all information such as the computer room, cabinet, port resources, etc. involved in the target path is extracted, and then the number of ports, optical fiber type, etc. involved in the target path are obtained to construct the allocation description information.
[0118] For example, Figure 5 , the target path is: room 1 - room 2 - room 4, the number of ports required for the target path is 3, and the fiber type is single mode. We can get room 1 - cabinet 1 - R21 room 2 - cabinet 2 - R13 7-8 room 2 - cabinet 3 - R8 room 4 - cabinet 4 - R9 5-6. Then the allocation description information is to use the 7-8 port of the 21st row of cabinet 1 in room 1 to the 7-8 port of the 13th row of cabinet 2 in room 2, and the 7-8 port of the 8th row of cabinet 3 in room 2 is connected to the 5-6 port of the 9th row of cabinet 4 in room 4.
[0119] S702: modify the usage status of the corresponding port resource to the usage status according to the allocation description information, and complete the allocation of the port resource.
[0120] In the embodiment of the present application, the port resource status information includes the usage status of each port resource, and the port resource matching the allocation description information can be queried from the port resource status information, wherein the port resource status information includes the usage status of each port resource. According to the allocation description information, the usage status of the corresponding port resource is changed from "unused" to "in use", and the allocation of the port resource is completed. At the same time, the allocation description information, allocation time, operator and other information can be recorded in the resource database, and the present application example does not limit this.
[0121] For example, the usage status of ports 7-8 in row 21 of cabinet 1 in room 1, ports 7-8 in row 13 of cabinet 2 in room 2, ports 7-8 in row 8 of cabinet 3 in room 2, and ports 5-6 in row 9 of cabinet 4 in room 4 are changed to in use status to complete the allocation of port resources.
[0122] S206: When the port resource processing requirement is a port resource recovery requirement, the port resources are recovered.
[0123] In the embodiment of the present application, when the port resource processing requirement is a port resource recovery requirement, the port resource is recovered. The port resource processing requirement includes a first port identifier. The identifier is used to uniquely identify the port resource that needs to be recovered.
[0124] For example, in actual operation, the first port identifier is first parsed from the port resource processing requirement, and it is assumed that the first port identifier obtained at this time points to "port 1". Then port resource 1 needs to be recycled, thereby completing the port resource recycling process.
[0125] When the port resource processing requirement is to recycle the port resources, the port resources are recycled. For details, please refer to Figure 8 As shown in the method. Figure 8 As shown, it is a schematic diagram of an implementation process of a port resource recovery method provided in an embodiment of the present application, which may specifically include the following steps:
[0126] S801: Acquire a reclaimed port resource identifier matching a first port identifier from port resource status information.
[0127] In an embodiment of the present application, a recovered port resource identifier that matches the first port identifier is obtained from the port resource status information, wherein the first port identifier is an identifier used to uniquely identify the port resource to be recovered, and it may include information such as a computer room identifier, a cabinet identifier, a port number, etc., which together constitute the complete positioning of the port.
[0128] For example, the first port identifier may be "A room-H-01 cabinet-R1-01 port", indicating that the R1-01 port located on the H-01 cabinet in the A room needs to be reclaimed. According to this identifier, the matching reclaimed port resource identifier is searched in the port resource status information to determine the port resource to be reclaimed.
[0129] S802: Reclaim the port resource corresponding to the port resource identifier as the first port resource.
[0130] In the embodiment of the present application, a recovered port resource identifier matching the first port identifier is found from the port resource status information, and this port resource is processed as the first port resource.
[0131] For example, if the first port identifier corresponds to "A room-H-01 cabinet-R1-01 port", then this port is used as the first port resource to be reclaimed.
[0132] S803: Change the usage state of the first port resource to an unused state, thereby completing the recovery of the port resource.
[0133] In the embodiment of the present application, after determining the first port resource to be recycled, its usage status is changed from "in use" to "unused state", thereby completing the recycling of the port resource.
[0134] For example, if the first port resource is "A room-H-01 cabinet-R1-01 port", the use status of this port is updated to "unused" and a corresponding record is made in the resource database. In this way, this port resource is successfully recovered and can be reallocated to other services in need.
[0135] In specific operations, the administrator can input the port identifier to be recycled through the operation interface, and then complete the recycling of port resources through the above port resource recycling method. At the same time, the usage status of the port resources can be updated in the resource database to ensure the accuracy of the resource status. In addition, a visual interface can be provided so that the administrator can intuitively understand the usage and recycling progress of the port resources.
[0136] Corresponding to the above method embodiment, the present application embodiment also provides a port resource management device, such as Fig. 9 As shown, the device may include a first acquisition module 901 , a second acquisition module 902 , and a management module 903 .
[0137] A first acquisition module 901 acquires port resource record information, where the port resource record information includes a usage record of the port resource;
[0138] The second acquisition module 902 acquires the port resource status information and the port resource statistical information from the port resource record information;
[0139] The management module 903 manages the port resources according to the port resource status information and the port resource statistical information.
[0140] The present application also provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.
[0141] Memory 1003, used for storing computer programs;
[0142] In one embodiment of the present application, the processor 1001, when used to execute the program stored in the memory 1003, implements the following steps:
[0143] The port resource record information is obtained, the port resource record information includes the use record of the port resource, the port resource state information and the port resource statistical information are obtained from the port resource record information, and the port resource is managed according to the port resource state information and the port resource statistical information.
[0144] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0145] The communication interface is used for communication between the above electronic device and other devices.
[0146] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0147] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0148] In another embodiment provided in the present application, a storage medium is further provided. The storage medium stores instructions. When the storage medium is executed on a computer, the computer executes the port resource management method described in any one of the above embodiments.
[0149] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the port resource management method described in any one of the above embodiments.
[0150] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a storage medium, or transmitted from one storage medium to another storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0151] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0152] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0153] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A port resource management method, characterized in that: The method comprises: Acquire port resource record information, wherein the port resource record information includes a usage record of the port resource; Acquire port resource status information and port resource statistical information from the port resource record information; The port resources are managed according to the port resource status information and the port resource statistical information.
2. The method according to claim 1, characterized in that The managing the port resources according to the port resource status information and the port resource statistical information includes: Monitoring the port resource margin according to the port resource statistical information; Acquire port resource processing requirements, wherein the port resource processing requirements include allocation port resource requirements and recovery port resource requirements; When the port resource processing requirement is a port resource allocation requirement, allocating port resources according to the port resource state information and the port resource processing requirement; When the port resource processing requirement is a port resource recovery requirement, the port resources are recovered.
3. The method according to claim 2, characterized in that When the port resource processing requirement is a port resource allocation requirement, allocating port resources according to the port resource state information and the port resource processing requirement includes: Generate a port connection structure diagram according to the port resource status information; Port resources are allocated according to the port connection structure diagram and the port resource processing requirements.
4. The method according to claim 3, characterized in that The port resource processing requirements include source computer room information, target computer room information, number of ports and fiber type; The allocating port resources according to the port connection structure diagram and the port resource processing requirements includes: Acquire a starting computer room matching the source computer room information from the port connection structure diagram; Acquire a terminal computer room matching the target computer room information from the port connection structure diagram; Determine a target path from the starting computer room to the end computer room according to the number of ports and the type of optical fiber; Port resources are allocated according to the target path.
5. The method according to claim 4, characterized in that The port resource status information includes the usage status of each port resource; Allocating port resources according to the target path includes: generating allocation description information according to the target path; The usage status of the corresponding port resource is modified to the usage status according to the allocation description information, thereby completing the allocation of the port resource.
6. The method according to claim 2, characterized in that The port resource statistical information includes the port resource utilization rate of each port resource; The monitoring of the port resource margin according to the port resource statistical information includes: According to the port resource statistical information, detecting whether there is a target port resource whose port resource usage exceeds a preset usage threshold; In the case where there is a target port resource whose port resource usage exceeds a preset usage threshold, an early warning is issued for the target port resource.
7. The method according to claim 2, characterized in that The port resource status information includes the usage status of each port resource, and the port resource processing requirement includes a first port identifier; When the port resource processing requirement is a port resource recovery requirement, the port resource is recovered, including: Acquire a reclaimed port resource identifier matching the first port identifier from the port resource status information; Using the port resource corresponding to the recovery port resource identifier as the first port resource; The usage status of the first port resource is modified to an unused status, thereby completing the recovery of the port resource.
8. A port resource management device, characterized in that: The device comprises: A first acquisition module acquires port resource record information, wherein the port resource record information includes a usage record of the port resource; A second acquisition module acquires port resource status information and port resource statistical information from the port resource record information; The management module manages the port resources according to the port resource status information and the port resource statistical information.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.