WO2023207851A1 - Resource specification determination method and related apparatus - Google Patents

Resource specification determination method and related apparatus Download PDF

Info

Publication number
WO2023207851A1
WO2023207851A1 PCT/CN2023/090102 CN2023090102W WO2023207851A1 WO 2023207851 A1 WO2023207851 A1 WO 2023207851A1 CN 2023090102 W CN2023090102 W CN 2023090102W WO 2023207851 A1 WO2023207851 A1 WO 2023207851A1
Authority
WO
WIPO (PCT)
Prior art keywords
network element
resource
target network
target
operating mode
Prior art date
Application number
PCT/CN2023/090102
Other languages
French (fr)
Chinese (zh)
Inventor
云端月
陈小龙
谢于明
李举厂
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Priority claimed from CN202211176974.6A external-priority patent/CN117014283A/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023207851A1 publication Critical patent/WO2023207851A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Definitions

  • the present application relates to the field of network technology, and in particular, to a method for determining resource specifications and related devices.
  • Network devices use different resources when running services, such as Address Resolution Protocol (ARP) table, Forward Information Base (FIB) table, Neighbor Discovery (Neighbor Discovery, ND) protocol table, etc. .
  • ARP Address Resolution Protocol
  • FIB Forward Information Base
  • ND Neighbor Discovery
  • Sufficient resources are a necessary condition for normal business operation, and the criterion is the resource utilization of each resource.
  • the resource utilization rate of a certain resource is usually the ratio of the actual usage of the resource to the preset specifications of the resource.
  • the preset specifications for a resource may deviate significantly from the resource's actual specifications, so the resource utilization calculated from the resource's preset specifications is less accurate.
  • this application provides a method and related devices for determining resource specifications.
  • the computer device determines the resource specification of the target resource according to the operating mode of the target network element, so that the determined resource specification is closer to the actual specification of the target resource in the target network element.
  • this application provides a method for determining resource specifications.
  • the method can be performed by a computer device.
  • Computer equipment is, for example, network management equipment, network controllers, network equipment, terminals, servers, etc.
  • the computer device obtains the first operating mode of the target network element, and determines the resource specification of the target resource of the target network element according to the first operating mode of the target network element.
  • the first operating mode indicates an enabling state of at least one function of the target network element.
  • the resource specification indicates the maximum storage amount of the target resource in the target network element.
  • the target network elements are, for example, network devices such as switches, routers, and firewalls in the network.
  • the target resources are, for example, the ARP table, FIB table, ND protocol table, etc. in the target network element.
  • Network devices that enable different functions may store different types of resources.
  • the computer device determines the resource specifications of the target resource based on the operating mode of the network device, so that the determined resource specifications more closely match the functions enabled by the network device and are closer to the actual specifications of the target resource in the network device.
  • the computer device determines the first operating mode of the target network element according to the operating scenario of the target network element.
  • the computer equipment can directly determine the operating mode of the target network element based on the operating scenario of the target network element.
  • the computer device determines the operating mode corresponding to the operating scenario of the target network element as the first operating mode of the target network element based on the corresponding relationship between the operating scenario and the operating mode.
  • the operating scenario of the target network element is determined based on one or more of the following: the network to which the target network element belongs, the location of the target network element, the role of the target network element, or the target network element. element configuration.
  • the computer device determines the first operating mode of the target network element according to the enabling state of at least one function of the target network element.
  • the computer device obtains the operating characteristics of the target network element based on the enabling state of at least one function of the target network element, and determines the first operating mode of the target network element based on the operating characteristics of the target network element.
  • the operating characteristics include at least one of the following operating sub-characteristics: the protocol stack type enabled by the target network element, the enabling status of the service function of the target network element, the usage of the first resource of the target network element and the second resource of the target network element. proportion of usage.
  • the computer device determines the first operating mode of the target network element corresponding to the operating characteristics of the target network element based on the corresponding relationship between the operating characteristics and the operating mode.
  • the computer device obtains the first mapping table, and determines, according to the first mapping table, the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode of the target network element. model.
  • the first mapping table includes a plurality of first entries, each first entry indicating a corresponding relationship between operating characteristics and operating modes.
  • the operating characteristics of the target network element include multiple operating sub-characteristics
  • the computer device determines the matching first entry according to the first mapping table, and sets the operating mode in the matching first entry Determine it as the first operating mode of the target network element.
  • the multiple sub-features included in the matching first entry all match the multiple running sub-features.
  • the computer device determines the matching scores corresponding to the multiple first entries, and based on the matching scores corresponding to the multiple first entries, Determine the first operating mode of the target network element.
  • the matching score of any first entry indicates the matching degree between the plurality of operating sub-features and the plurality of sub-features included in any first entry.
  • the computer device determines the operating mode included in the first entry as the first operating mode.
  • the computer device uses the operating mode included in the multiple first entries as a candidate mode, according to the first policy
  • the matching degree between the target resource usage and each candidate operating mode is determined, and the candidate operating mode with the highest matching degree is determined as the first operating mode.
  • the first strategy includes loose strategy and strict strategy.
  • the computer device determines the target network element based on the first operating mode of the target network element and the resource usage and memory usage of multiple network devices in the network whose operating modes are the first operating mode.
  • the resource specification of the target resource is not limited to the first operating mode of the target network element.
  • the computer device determines the resource specification of the target resource of the target network element based on the corresponding relationship between the operating mode and the resource specification and the first operating mode of the target network element.
  • the correspondence between the running mode and the resource specification is determined by iterative storage testing of multiple resources associated with the running mode.
  • iterative storage tests By conducting iterative storage tests on multiple resources associated with the operating mode, the storage requirements and mutual storage conflicts of the multiple resources associated with the operating mode can be fully considered, making the determined resource specifications more accurate.
  • the computer device obtains the second mapping table, and according to the second mapping table, the resource specification of the target resource corresponding to the network element information of the target network element and the first operating mode of the target network element is identified as target Resource specifications of the network element's target resources.
  • the second mapping table includes a plurality of second entries, each second entry indicates a correspondence between network element information, operating mode and resource specifications, and the network element information includes device type.
  • the device type is the model of the network device
  • the device type may also include a version identification of the network device.
  • the computer device determines the resource utilization rate of the target resources of the target network element based on the resource usage of the target resources of the target network element and the resource specifications of the target resources of the target network element.
  • the resource specification of the target resource obtained based on the above method is closer to the actual specification of the target resource in the target network element, which makes the resource utilization of the target resource calculated based on the resource specification of the target resource more accurate.
  • the computer device determines the ratio of the resource usage of the target resource to the resource specification of the target resource as the resource utilization rate of the target resource.
  • the computer device receives the resource usage of the target resource sent by the target network element.
  • the computer device predicts the resource usage of the target resource based on the historical usage of the target resource. This implementation simplifies the interaction between the computer device and the target network element and saves network resources.
  • the computer device evaluates the capacity risk of the target network element based on the resource utilization of the target resources of the target network element.
  • the computer device determines that the target network element has a capacity risk.
  • the resource specification of the target resource obtained based on the above method is closer to the actual specification of the target resource in the target network element, which makes the resource utilization of the target resource calculated based on the resource specification of the target resource more accurate, thereby making the capacity
  • the results of risk assessment are more accurate and can minimize the risk of underreporting capacity.
  • the risk conditions include: the resource utilization rate of the target resource of the target network element is greater than the utilization threshold, or the resource utilization rate of the target resource of the target network element is continuously greater than the utilization threshold for a period exceeding the duration threshold. , or the number of times the resource utilization of the target resource of the target network element is continuously greater than the utilization threshold exceeds the quantity threshold.
  • the target resources of the target network element include multiple first resources. If at least one first resource meets the risk condition, the computer device determines that the target network element has a capacity risk.
  • the computer device displays risk description information and/or risk treatment suggestions.
  • risk description information or risk handling suggestions are displayed to help operation and maintenance personnel quickly discover capacity risks and quickly handle capacity risks.
  • the risk description information includes at least one of the following: an identification of the target network element, target resources with capacity risks in the target network element, risk degree information of target resources with capacity risks in the target network element, The operating mode of the target network element, the operating scenario of the target network element, or the functions enabled by the target network element.
  • the risk treatment suggestions include at least one of the following: changing the device type of the target network element, migrating the target service of the target network element, or switching the operating mode of the target network element.
  • this application provides a device for determining resource specifications.
  • the device includes multiple functional modules.
  • the multiple functional modules can all be software modules or hardware modules, or can be a combination of software modules and hardware modules.
  • the multiple functional modules can be divided differently according to implementation to achieve the above-mentioned third step. In one aspect and the methods in each embodiment thereof, the method shall prevail but.
  • the present application provides a computer device.
  • the computer device includes a processor and memory.
  • the memory stores programs, and the processor is configured to execute the programs stored in the memory to implement the method provided by the above-mentioned first aspect or any possible implementation of the first aspect.
  • this application provides a capacity risk assessment system.
  • the system includes computer equipment and network equipment.
  • the computer equipment is used to implement the method provided by the above-mentioned first aspect or any possible implementation manner of the first aspect.
  • the system further includes an application device.
  • the application device is used to receive risk description information and/or risk treatment suggestions sent by the computer device, and display the risk description information and/or risk treatment suggestions.
  • the application device is also configured to send a capacity risk assessment requirement to the computer device to instruct the computer device to perform a capacity risk assessment based on the capacity risk assessment requirement.
  • the capacity risk assessment requirement includes at least one of the following: an identification of the network device to be assessed, an identification of the target resource to be assessed, an assessment period or an assessment cycle.
  • the application device is also used to send a resource specification table and/or a running mode definition table to the computer device.
  • the operating mode definition table includes the correspondence between operating modes and operating characteristics.
  • the resource specification table includes the correspondence between the operating mode and the resource specifications.
  • the computer device is also configured to send an identification of the target resource to the network device to instruct the network device to collect the usage of the target resource on demand.
  • the network device is used to send configuration information to the computer device.
  • Configuration information includes interface configuration and service function configuration of network devices.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium includes instructions that, when run on a computer, cause the computer to perform the method provided by the above-mentioned first aspect or any possible implementation of the first aspect.
  • the present application provides a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer executes the method provided in the first aspect or any possible implementation of the first aspect.
  • Figure 1 shows a schematic flowchart of a method for determining resource specifications provided by an embodiment of the present application.
  • Figure 2 shows a schematic flowchart of another method for determining resource specifications provided by an embodiment of the present application.
  • Figure 3 shows a schematic flowchart of a capacity risk assessment method provided by an embodiment of the present application.
  • Figure 4 shows a schematic diagram of a capacity risk assessment system provided by an embodiment of the present application.
  • Figure 5 shows a schematic flowchart of another capacity risk assessment method provided by an embodiment of the present application.
  • Figure 6 shows a block diagram of a device for determining resource specifications provided by an embodiment of the present application.
  • FIG. 7 shows a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present application.
  • exemplary means "serving as an example, example, or illustrative.” Any embodiment described herein as “exemplary” is not necessarily to be construed as superior or superior to other embodiments.
  • Single stack mode A mode in which the network device only enables one protocol stack. If all interfaces of a network device are configured with only one target protocol type address, the network device is in single-stack mode for that target protocol. For example, if the target protocol is Internet Protocol version 4 (IPv4), the network device is in IPv4 single-stack mode. For another example, if the target protocol is Internet Protocol version 6 (IPv6), the network device is in IPv6 single-stack mode.
  • IPv4 Internet Protocol version 4
  • IPv6 Internet Protocol version 6
  • Dual stack mode A mode in which the network device enables two protocol stacks at the same time. If the network device has both an interface configured with an address of the first protocol type and an interface configured with an address of the second protocol type, the network device is in dual-stack mode.
  • the first protocol is IPv4 and the second protocol is IPv6.
  • Microsegmentation A technology for traffic policy control based on group identifiers after grouping packets. Related technologies divide subnets based on virtual local area network (Virtual Local Area Network, VLAN) or virtual network interface (Virtual Network Interface, VNI), and then perform business isolation based on subnets, with a coarser granularity. Micro-segmentation can provide a more fine-grained and flexible grouping method. For example, micro-segmentation groups packets based on Internet Protocol (IP) addresses, Media Access Control (MAC) addresses, virtual machine names, etc. Group. Therefore, micro-segmentation can further refine the size of the security domain, achieve more refined business isolation, and improve network security.
  • IP Internet Protocol
  • MAC Media Access Control
  • Each (S, G) entry represents routing information for source S to send multicast data to multicast group G.
  • a (S, G) entry includes source S (for example, a unicast IP address), multicast group G (for example, a multicast IP address), and an interface identifier indicating the interface used to forward the Packets sent by source S to multicast group G.
  • Resource specifications the maximum storage amount of a resource in a network device.
  • the resource is an ARP table, and the resource specification of the ARP table of network device A is 1000 entries, which means that network device A can store up to 1000 ARP entries.
  • the resource is a MAC table, and the resource specification of the MAC table of network device A is 2000 entries, which means that network device A can store up to 2000 MAC table entries.
  • Resource specifications are also called product specifications.
  • Capacity risk The usage of one or more resources in the network device exceeds the threshold. For example, if the resource specification of the ARP table is 1000 entries and the risk threshold of the ARP table is 80%, when the actual number of ARP table entries stored in the network device exceeds 800 (that is, the usage of the ARP table exceeds 800), Indicates that the network device has capacity risk. That is to say, when the storage amount of a certain resource of a network device exceeds a certain threshold, subsequent storage failure of the resource may occur, resulting in network service failure related to the resource.
  • an ARP entry represents the correspondence between an IP address and a MAC address.
  • To store an ARP entry you need to store the IP address, the MAC address, and the correspondence between the IP address and the MAC address.
  • a MAC table entry represents the correspondence between a MAC address and an interface. To store a MAC table entry, you need to store the MAC address, the identifier of the interface, and the correspondence between the MAC address and the interface.
  • Network devices usually store resources such as IP addresses and MAC addresses in hardware storage resources of the forwarding chip of the network device.
  • Network devices usually store the corresponding relationships contained in each entry in the memory of the network device.
  • the storage location or index of the IP address and MAC address associated with an ARP entry in the forwarding chip is stored in the memory. Therefore, the resource specification of a resource is related to both the resource allocation rules of the forwarding chip in the network device and the memory size in the network device.
  • the same resource is continuously configured in the network device until the configuration fails, and the quantity of the resource that has been stored in the network device when the configuration fails is used as the preset specification of the resource.
  • the default specifications of the same resource determined by the relevant technology are the same.
  • the storage space of the network device may be occupied by various resources, such as ARP table, MAC table, FIB table, etc. Therefore, the storage space of the network device that a certain resource can actually occupy will be less than the maximum storage space of the network device.
  • the specifications determined based on the storage space of the network device that the resource can actually occupy are the actual specifications of the resource. Therefore, there is usually a large deviation between the default specifications of a resource and the actual specifications of the resource.
  • the default specifications of a resource are usually much larger than the actual specifications of the resource.
  • the resource utilization calculated by the network device based on the preset specifications will be too small, which may cause the capacity risk of the network device to be missed.
  • embodiments of the present application provide a method and related devices for determining resource specifications.
  • the embodiment of the present application determines resource specifications of resources in the network device based on the operating mode of the network device.
  • the operating mode of the network device indicates an enabling state of at least one function of the network device.
  • Network devices that enable different functions may store different types of resources.
  • the embodiment of the present application considers the common storage situation of multiple resources corresponding to each operating mode in the different operating modes in the network device, thereby determining resource specifications for each of the multiple resources, so that The determined resource specifications are closer to the actual specifications of the resources in the network equipment, which in turn makes the resource utilization calculated based on the resource specifications more accurate and can minimize the risk of network equipment underreporting capacity. Please refer to the following description for detailed solutions of the embodiments of this application.
  • the computer device executes the resource specification determination method to determine the resource specifications of the target resources of the target network element.
  • the target network element is a network device in the network, such as a switch, router, firewall or access point (AP), etc.
  • the network is, for example, a Data Center Network (DCN), a campus network, or a carrier network.
  • the computer device and the target network element are different devices.
  • the target network element is a router in the network
  • the computer device is a controller, server, server cluster, cloud device, terminal, network management device in the network, or other network equipment in the network.
  • the computer device and the target network element are the same device.
  • the target network element and computer equipment are both a router in the DCN, and the router determines the resource specifications of the target resources according to its own operating mode.
  • the target resource includes at least one entry resource.
  • Table entry resources include, for example, ARP tables, ND protocol tables, IPv4 routing tables, IPv6 routing tables, multicast routing tables, virtual routing and forwarding (VRF) instance tables, logical interface tables, and access control lists. ,ACL) etc.
  • Logical interfaces include Layer 3 logical interfaces and/or Layer 2 logical interfaces.
  • Layer 2 logical interfaces include Layer 2 sub-interfaces.
  • FIG. 1 shows a schematic flowchart of a method for determining resource specifications provided by an embodiment of the present application.
  • the method includes steps 101 and 102.
  • Step 101 The computer device acquires the first operating mode of the target network element, and the first operating mode indicates the enabling state of at least one function of the target network element.
  • the first operating mode indicates an enabling state of at least one function of the target network element.
  • the first operating mode is the IPv4 single-stack mode.
  • the target network element enables the IPv4 protocol and disables the IPv6 protocol.
  • the first operating mode is the dual-stack mode.
  • the target network element enables the IPv4 protocol and the IPv6 protocol.
  • the first operating mode is IPv4 single stack and multicast mode.
  • the target network element enables the IPv4 protocol and multicast function.
  • the first operating mode is IPv4 single stack and micro-segmentation mode. At this time, the target network element enables the IPv4 protocol and micro-segmentation function.
  • the first operating mode may be one of multiple operating modes, and the type of operating mode is determined by the functions supported by the target network element.
  • the above-mentioned first operating modes are only examples and do not constitute a limitation on the embodiments of the present application. It is understandable that the more functions the target network element supports, the more combinations between functions, and the more types of operating modes there will be.
  • the computer device determines the first operating mode of the target network element according to the operating scenario of the target network element.
  • Different operating scenarios will require network equipment to support different services, which will lead to network equipment enabling different functions and operating in different operating modes.
  • some operating scenarios require network equipment to support fine-grained service isolation. In this case, the network equipment may need to enable micro-segmentation services.
  • some operating scenarios require network equipment to support IPv4 services and IPv6 services. In this case, the network equipment needs to enable dual-stack mode.
  • the computer device determines the operating mode corresponding to the operating scenario of the target network element as the first operating mode according to the corresponding relationship between the operating scenario and the operating mode.
  • the computer device maintains a mapping table between operating scenarios and operating modes, and each entry in the mapping table records an operating scenario and an operating mode corresponding to the operating scenario. For example, each entry stores the name of the running scenario and the name of the running mode corresponding to the running scenario.
  • the computer device uses the operating scenario of the target network element as a keyword to query the mapping table to obtain the first operating mode corresponding to the operating scenario.
  • the operating scenario of the target network element can be determined based on one or more of the following: the network to which the target network element belongs, the location of the target network element, the role of the target network element, or the configuration of the target network element.
  • the operation scenario of the target network element can also be input to the computer equipment by the operation and maintenance personnel.
  • the corresponding relationship between the operating scenario and the operating mode can be pre-configured, for example, configured by operation and maintenance personnel, or other equipment is determined and then configured to the computer equipment.
  • the corresponding relationship between operating scenarios and operating modes can also be determined by the computer device.
  • the computer device obtains the functions enabled by network devices in different operating scenarios in the network, and determines each network based on the functions enabled by each network device.
  • the operating mode of the device and then determine the corresponding relationship between the operating scenario and the operating mode based on the operating mode of each network device and the operating scenario of each network device.
  • the computer device determines the first operating mode of the target network element according to the enabling state of at least one function of the target network element. For example, if the target network element enables the IPv4 protocol but does not enable the IPv6 protocol, the computer device may determine the first operating mode as the IPv4 single-stack mode. For another example, if the target network element enables the IPv4 protocol and the IPv6 protocol, and also enables the micro-segmentation function, the computer device may determine the first operating mode as the dual-stack and micro-segmentation mode.
  • the computer device can determine the first operating mode as the dual stack and multicast mode.
  • the embodiment shown in Figure 2 introduces in detail how to determine the operating mode of the target network element according to the enabling state of at least one function of the target network element, which will not be described again here.
  • Step 102 The computer device determines the resource specification of the target resource of the target network element according to the first operating mode.
  • the specification indicates the maximum storage amount of the target resource in the target network element.
  • the computer device may determine the resource specification of the target resource of the target network element according to the first operating mode through various methods. The following takes Method 1 and Method 2 as examples for explanation.
  • Method 1 The computer device determines the resource specifications of the target resources of the target network element based on the first operating mode and the resource usage and memory occupancy of multiple network devices in the network whose operating modes are the first operating mode. For example, the computer device obtains samples of multiple network devices in the network whose operating mode is the first operating mode, and each sample includes resource usage and memory usage of one network device.
  • the computer equipment performs cluster analysis on the multiple samples to obtain typical areas (clustering clusters) of resource usage and memory usage, and then takes k samples near the center of the cluster as typical samples of the typical area. Then perform fitting analysis (for example, neural network fitting) based on typical samples. The input of the fitting is the memory usage, and the output is the usage of each resource.
  • the computer device can obtain the mapping relationship between the memory usage and the usage of each resource.
  • the computer device can obtain an approximate value of each resource usage when the memory occupancy rate is a certain threshold (for example, 80%), and determine the resources of each resource in the operating mode based on the approximate value of each resource usage. Specifications, for example, use the approximate value of each resource usage as the resource specification of each resource in this operating mode.
  • the computer device can obtain the resource usage and memory usage of a large number of network devices in the network, and then classify the multiple network devices according to the operating mode to obtain multiple samples of multiple operating modes, and then obtain each operating mode based on the above method. Resource specifications of each resource in the mode.
  • the device types of the multiple network devices and the target network element are the same, or the types of forwarding chips of the multiple network devices and the forwarding chips of the target network element are the same and the memory sizes of the multiple network devices are the same. The same as the memory size of the target network element.
  • the above process of determining resource specifications of resources in the operating mode can also be performed by other devices.
  • the server performs the above process to obtain the target resource of the network device of the same type as the target network element in the first operating mode. resource specification, and sends the resource specification of the target resource to the computer device.
  • Method 2 The computer device determines the resource specifications of the target resources of the target network element based on the corresponding relationship between the operating mode and the resource specification and the first operating mode.
  • the correspondence may be preconfigured.
  • the server obtains the resource specifications of various resources of network equipment of the same type as the target network element in multiple operating modes according to method 1, and sends the corresponding relationship between the operating mode, device type, and resource specifications of each resource to the computer device.
  • the corresponding relationship may be determined through iterative storage testing of multiple resources associated with the running mode. This iterative testing process can include the following steps:
  • Step 1 The computer device determines at least one entry resource related to the target network element according to the enabling state of at least one function of the target network element indicated by the first operating mode. For example, the first operating mode indicates that the target network element has enabled IPv4 and multicast functions, then the computer device determines that the target network element involves an IPv4 routing table, a multicast routing table (for example, an SG table), and other related table entry resources. , for example, MAC table, ARP table.
  • Step 2 The computer device determines the initial resource specification for each entry resource.
  • Initial resource specifications can be preset. For example, ARP table: 100, MAC table: 300, IPv4 routing table: 1000, multicast routing table: 100.
  • the initial resource specification may also be determined by the computer device through method one.
  • Step 3 The computer device gradually configures the above table entries on the target network element (or other devices of the same device type as the target network element) until the first condition or the second condition is met.
  • configuring a table entry means configuring an entry for the resource on the target network element. For example, configuring an IPv4 route, configuring a multicast route, configuring an ARP entry, and configuring a MAC entry.
  • the target network element stores the entry, for example, stores the IP address, MAC address in the ARP entry, and the correspondence between the IP address and the MAC address.
  • the first condition includes any of the following: the actual configuration amount of each entry resource has reached the initial resource specification (or the adjusted initial resource specification) and the memory usage of the target network element is less than or equal to (or less than) the first threshold, a certain One table entry resource configuration fails, the number of table entry resource configuration failures is greater than the second threshold, and the memory usage of the target network element is greater than the third threshold.
  • the second condition includes: the actual configuration amount of each entry resource has reached the initial resource specification (or the adjusted initial resource specification) and the memory usage of the target network element is greater than (or greater than or equal to) the first threshold and less than (or less than or equal to) ) third threshold.
  • the computer device determines the initial resource specification (or the adjusted initial resource specification) of each entry resource as the resource specification corresponding to the first operating mode, and does not perform subsequent steps.
  • the computer device continues to perform subsequent steps to adjust the initial resource specifications of each table item resource and perform testing again.
  • Step 4 When the first condition is met, the computer device adjusts the initial resource specifications of each entry resource. For example, if the actual configuration amount of each entry resource has reached the initial resource specification and the memory usage of the target network element is less than or equal to (or less than) the first threshold, the initial resource specification is increased. For another example, if a certain table entry resource configuration fails, or the number of table entry resource configuration failures is greater than the second threshold, or the memory usage of the target network element is greater than the third threshold, the initial resource specifications are lowered. For example, the initial resource specification of the entry resource is adjusted up/down according to a ratio (for example, 5%), or the initial resource specification of the entry resource is adjusted up/down according to an exact value (for example, 5).
  • a ratio for example, 5%
  • an exact value for example, 5
  • Up-adjusting/down-adjusting the initial resource specifications of table item resources can be to adjust up/down the initial resource specifications of each table item resource, or it can also be to adjust up/down the initial resource specifications of a certain table item resource. For example, only down-adjust table items with configuration failures. The resource's initial resource specification.
  • Step 5 Based on the adjusted initial resource specifications, continue to iteratively execute Step 3 until the second condition is met.
  • the above testing process can be performed in advance, for example, the target network element is tested before the target network element is deployed, or the same type of network equipment of the target network element is tested after the target network element is deployed.
  • the resource specification of the target resource of the target network element is used to calculate the resource utilization of the target resource.
  • the resource utilization of the target resource is used to evaluate whether the target network element has capacity risks.
  • the embodiment of the present application determines the resource specifications of the resources in the target network element based on the operating mode of the target network element.
  • the operating mode of the target network element indicates the enabling state of at least one function of the target network element.
  • Network devices that enable different functions may store different types of resources.
  • the embodiment of the present application considers the common storage situation of multiple resources corresponding to each operating mode in the different operating modes in the target network element, thereby determining resource specifications for each of the multiple resources. , making the determined resource specifications closer to the actual specifications of the resources in the target network element, thereby making the resource utilization calculated based on the resource specifications more accurate, and minimizing the problem of underreporting the capacity risk of network equipment.
  • FIG. 2 shows a schematic flowchart of another method for determining resource specifications provided by an embodiment of the present application.
  • the method includes steps 201 and 203.
  • Step 201 The computer device obtains the operating characteristics of the target network element.
  • the computer device acquires the operating characteristics of the target network element according to the enabling state of at least one function of the target network element.
  • the computer device obtains the configuration information of the target network element, and determines the enabling state of at least one function of the target network element based on the configuration information of the target network element, thereby obtaining the operating characteristics of the target network element.
  • the computer device obtains the configuration file of the target network element to obtain the configuration information.
  • the configuration file is, for example, the interface configuration file, function configuration file, etc. of the target network element.
  • the interface configuration file includes the address type configured for each interface, for example, IPv4 address and/or IPv6 address.
  • the function configuration file includes the enabling status of the target network element's functions, for example, whether the target network element has the multicast function, micro-segmentation function, virtual private network (VPN) function, etc. enabled.
  • the operating characteristics include at least one of the following operating sub-characteristics: the protocol stack type enabled by the target network element, and the enabling status of the service function of the target network element.
  • Business functions include multicast function, micro-segmentation function, VPN function, etc.
  • the computer device determines the protocol stack type enabled by the target network element according to the interface configuration file. For example, when there are only interfaces configured with addresses of the first protocol type in the interface configuration file, determine that the protocol stack type enabled on the target network element is the first protocol; when there are only interfaces configured with addresses of the second protocol type in the interface configuration file. interface, determine that the protocol stack type enabled on the target network element is the second protocol; when there are both interfaces configured with the first protocol type address and interfaces configured with the second protocol type address in the interface configuration file, determine the target
  • the protocol stack types enabled by the network element are the first protocol and the second protocol, that is, dual stack mode. For example, the first protocol is IPv4 and the second protocol is IPv6.
  • the computer device determines the enabling status of the service function of the target network element according to the function configuration file.
  • the function configuration file can be a configuration file.
  • a configuration file lists all the service functions enabled by the target network element.
  • the configuration file includes the names of the service functions enabled by the target network element.
  • the computer device determines the enabling status of all business functions in the configuration file as enabled (yes), and determines the enabling status of other business functions not in the configuration file as not enabled (no).
  • the configuration file lists all the service functions supported by the target network element, and clearly identifies the service functions enabled and unenabled by the target network element.
  • the configuration file lists the service functions supported by the target network element.
  • the first value indicates that the target network element has enabled the service function corresponding to the value.
  • the second value Indicates that the service function corresponding to this value is not enabled on the target network element.
  • the first value is, for example, 1, and the second value is, for example, 0.
  • the computer device determines the enabling state of the business function whose value is the first value in the configuration file as enabled (yes), and determines the enabling state of the business function whose value is the second value in the configuration file as Not enabled (No).
  • the function configuration file may also include multiple configuration files, and each configuration file corresponds to a service function enabled by the target network element.
  • the service functions including multicast function and micro-segmentation function are configured with only IPv4 addresses, and the multicast function and micro-segmentation function are not enabled on the target network element.
  • the extracted operating characteristics are the protocol stack type enabled by the target network element, the enabling status of the multicast function of the target network element, and the enabling status of the micro-segmentation function of the target network element, respectively: IPv4 single stack, No, no.
  • Step 202 The computer device determines the first operating mode of the target network element according to the operating characteristics of the target network element.
  • the computer device determines the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode of the target network element based on the corresponding relationship between the operating feature and the operating mode.
  • the computer device obtains the first mapping table, and determines, according to the first mapping table, the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode.
  • the first mapping table indicates the corresponding relationship between the operating characteristics and the operating mode.
  • the first mapping table includes a plurality of first entries, and each first entry indicates the corresponding relationship between the operating characteristics and the operating mode.
  • the operating characteristics in each first entry include at least one sub-feature and an operating mode corresponding to the at least one sub-feature.
  • the sub-characteristics are, for example: the protocol type enabled by the network device or the enabling status of the service function of the network device.
  • the total number of operating modes is related to the number of functions supported by the target network element.
  • the computer device can determine multiple operating modes that the target network element can execute according to the combination of functions supported by the target network element to obtain the first mapping table.
  • the operating modes may include: IPv4 single stack mode, IPv6 single stack mode, IPv4 single stack and multicast mode, IPv4 single stack and differential Segment mode, IPv6 single stack and multicast mode, IPv6 single stack and micro-segmentation mode, dual stack mode, dual stack and multicast mode, dual stack and micro-segmentation mode mode, IPv4 single stack and multicast micro-segmentation mode, IPv6 and multicast micro-segmentation mode, dual stack and multicast micro-segmentation mode.
  • Table 1 gives a schematic diagram of a first mapping table. It can be understood that Table 1 does not exhaust all operating modes, but only schematically illustrates the first mapping table with examples of several operating modes.
  • the operating characteristics in the first mapping table may also include a ratio of resource specifications of the first resource of the network device and resource specifications of the second resource of the network device.
  • the first resource is an IPv4 routing table (i.e., FIBv4 table)
  • the second resource is an IPv6 routing table (i.e., FIBv6 table)
  • the operating characteristics may also include the ratio of the resource specifications of the FIBv4 table to the resource specifications of the IPv6 routing table.
  • the operation characteristics may also include the ratio of the resource specifications of the VRF instance table to the resource specifications of the Layer 2 sub-interface table.
  • the ratio is empty (or NULL).
  • the computer device can also obtain the number of configured IPv4 routing table entries in the target network element and the configured IPv6 routing table entries in the target network element. quantity, and the ratio between the two is regarded as the ratio of the usage of the first resource to the usage of the second resource in the target network element.
  • Table 2 shows a schematic diagram of another first mapping table.
  • the dual-stack mode is subdivided into dual-stack mode 1 and dual-stack mode 2 based on the ratio of the usage of the FIBv4 table to the usage of the IPv6 routing table. It can be understood that Table 2 does not exhaust all operating modes, but only schematically illustrates the first mapping table with examples of several operating modes.
  • Table 3 shows a schematic diagram of another first mapping table.
  • the IPv4 single-stack mode is subdivided into IPv4 single-stack mode 1 and IPv4 single-stack mode 2 based on the usage of the VRF instance table and the usage of the Layer 2 sub-interface table. It can be understood that Table 1 does not exhaust all operating modes, but only schematically illustrates the first mapping table with examples of several operating modes.
  • the operating characteristics of the target network element include multiple operating sub-characteristics.
  • the computer device determines the matching first entry according to the first mapping table, and determines the operating mode in the matching first entry as the first In the running mode, the multiple sub-features included in the matched first entry all match the multiple running sub-features.
  • the computer device uses multiple operating sub-features as keywords to query each first entry in the first mapping table. If multiple sub-features and multiple operating sub-features included in a certain first entry are queried, If all match, the operating mode included in the first entry is determined as the first operating mode.
  • the computer device determines the matching scores corresponding to the plurality of first entries, and determines the first operating mode based on the matching scores corresponding to the plurality of first entries.
  • the matching score of any first entry indicates the matching degree between the plurality of operating sub-features and the plurality of sub-features included in the any first entry.
  • the matching score corresponding to each first entry is a weighted value of the matching scores of multiple sub-features included in the first entry.
  • a computer device may set a higher weight (e.g., 0.8) for the sub-characteristic "enabled protocol type" and lower weights (e.g., 0.2) for other sub-characteristics.
  • the matching score of the sub-feature is set to 1, otherwise the matching score of the sub-feature is set to 0, and the computer device calculates the sum based on the matching score and weight of each sub-feature. To obtain the matching score of the first table entry.
  • the matching of sub-features and running sub-features can be that the value of the sub-feature is exactly the same as the value of the running sub-feature.
  • the running sub-feature is a numerical feature (for example, the ratio of the number of IPv4 protocol routes to the number of IPv6 protocol routes)
  • the match between the sub-feature and the first sub-feature can also be the difference between the value of the sub-feature and the value of the running sub-feature.
  • the value is less than the threshold, or the approximate value of the running subfeature is exactly the same as the value of the subfeature.
  • the approximate value of the operating sub-characteristic is, for example, the numerical rounding value of the operating sub-characteristic. Numerical rounding includes, for example, rounding, rounding up, rounding down, etc.
  • the computer device determines the first operating mode based on the matching scores respectively corresponding to the multiple first entries, including: when the first entry with the highest matching score is only one first entry, converting the first entry to The operating mode included in the entry is determined as the first operating mode; when the first entry with the highest matching score includes multiple first entries, the operating mode included in the multiple first entries is used as a candidate mode, and according to the first strategy
  • the matching degree between the target resource usage and each candidate operating mode is determined, and the candidate operating mode with the highest matching degree is determined as the first operating mode.
  • the first strategy can It is a loose strategy. At this time, when the target resource usage is further away from (or closer to) the resource specification corresponding to the candidate operating mode, the higher the matching degree of the candidate operating mode.
  • the first policy may be a strict policy.
  • the target resource usage when the target resource usage is closer to the resource specification corresponding to the candidate operating mode (or the degree of closeness is higher), the higher the matching degree of the candidate operating mode.
  • the target resource usage may be the target resource usage of the target network element most recently obtained by the computer device, or may be the target resource usage predicted based on historical target resource usage.
  • the historical target resource usage is the actual usage of the target resource in the target network element in the first time period.
  • the first time period is earlier than the time at which the first operating mode is determined.
  • the computer device determines how close the target resource usage is to the resource specification of the target resource in the candidate operating mode based on the distance between the target resource usage and the resource specification of the target resource in the candidate operating mode.
  • the resource specification of the entry resource, x k represents the resource usage of the k-th entry resource in the target resource, and d represents the distance between the usage of the target resource and the resource specification of the target resource in the candidate operating mode.
  • the computer device may separately calculate the distance between the resource specifications in each candidate operating mode and the resource usage of the target resource, with a larger distance indicating a lower degree of proximity, and a smaller distance indicating a higher degree of proximity.
  • the distance values of the two candidate operating modes can be calculated based on the above distance calculation formula. is -1.25,0.1. If the policy is a loose policy, determine the first operating mode of the target network element to be IPv4 single-stack mode 2 with a larger distance value. If the policy is a strict policy, determine the first operating mode of the target network element. It is IPv4 single stack mode 1 with a small distance value.
  • Step 203 The computer device determines the resource specifications of the target resource according to the first operating mode of the target network element.
  • the computer device determines the resource specifications of the target resources of the target network element based on the first operating mode and the resource usage and memory usage of multiple network devices in the network whose operating modes are the first operating mode.
  • the specific implementation process of this method please refer to the description of method 1 in step 102, which will not be described again here.
  • the computer device determines the resource specification of the target resource of the target network element corresponding to the first operating mode according to the corresponding relationship between the operating mode and the resource specification.
  • the resource specification For how to obtain the corresponding relationship between the operating mode and the resource specification, please refer to the description of method 2 in step 102, which will not be described again here.
  • the computer device determines the resource specifications of the target resources of the target network element corresponding to the first operating mode according to the corresponding relationship between the operating mode and the resource specification, including: the computer device obtains a second mapping table, and the second mapping table includes a plurality of Second table items, each second table item indicates the correspondence between network element information, operating mode and resource specifications.
  • the network element information includes device type; the computer device determines the matching second table item and adds the matching second table item.
  • the resource specification of the target resource included in the table entry is determined to be the resource specification of the target resource of the target network element.
  • the network element information and operating mode included in the matching second table entry respectively match the network element information and the first operating mode of the target network element.
  • the device type is, for example, the model of the network device.
  • the device type can also include the version identification of the network device.
  • Table 6 shows a schematic diagram of a second mapping table. Table 6 exemplarily shows five operating modes and resource specifications corresponding to different types of network elements in each operating mode.
  • the first type of network elements is different from the second type of network elements.
  • the equipment models of the first type network element and the second type network element are different.
  • the equipment model of the first type network element is M1
  • the equipment model of the second type network element is M2.
  • the version identifiers of the first type network element and the second type network element are different.
  • the equipment models of the first type network element and the second type network element are both M3, but the version identifier of the first type network element is v1.
  • the version identifier of the second type of network element is v2.
  • Table 6 does not exhaustively list the resource specifications of all operating modes, but only uses several operating modes as examples to schematically illustrate the first mapping table.
  • Table 6 does not exhaustively list the resource specifications of all operating modes, but only uses several operating modes as examples to schematically illustrate the first mapping table.
  • the type of target resource corresponding to each operating mode is related to the function associated with the operating mode.
  • the target resources corresponding to this operating mode may include the IPv4 routing table (FIBv4 table) related to the IPv4 protocol, as well as the IPv4 routing table required to support basic data forwarding.
  • ARP table, logical interface table, VRF instance table For example, if the operating mode is IPv4 and IPv6 dual-stack mode, the target resources corresponding to the operating mode may also include an ND table and an IPv6 routing table (FIBv6 table) related to the IPv6 protocol.
  • the target resource corresponding to the operating mode may also include an SG table related to the multicast function.
  • the computer device may also obtain resource items of target resources associated with each operating mode according to the configuration, for example, the configuration indicates the resources that the user is more concerned about.
  • the computer device can then obtain the resource specifications of each resource item associated with each operating mode according to the technical solution described in step 102 or step 202.
  • the resource items included in the target resources corresponding to each operating mode shown in Table 6 are only examples.
  • the computer device extracts the operating characteristics of the target network element based on the configuration information of the target network element, and then determines the operating mode of the target network element based on the operating characteristics of the target network element, which makes the determined The running mode better matches the actual configuration of the target network element. After that, the computer device determines the resource specifications of the target resources based on the operating mode of the target network element, so that the determined resource specifications are closer to the actual specifications of the target resources in the target network element, thereby making the resource utilization calculated based on the resource specifications more accurate. Accurate, you can try to avoid the problem of network equipment underreporting capacity risks.
  • the computer device can also evaluate the capacity risk of the target network element based on the resource specifications of the target resources.
  • FIG. 3 shows a schematic flow chart of a capacity risk assessment method provided by an embodiment of the present application. The method includes steps 301 to 302.
  • Step 301 The computer device determines the resource utilization rate of the target resource based on the resource usage and resource specifications of the target resource.
  • the computer device obtains the resource usage of the target resource in the target network element.
  • the target network element reads the usage of the target resource.
  • the computer device can send a message to the target network element to prompt the target network element to read the usage of the target resource and return the usage of the target resource to the computer device, or the target
  • the network element can also periodically actively send the usage of the target resource to the computer device, and the computer device uses the latest usage of the target resource received from the target network element to calculate the target resource utilization.
  • the computer device may also predict the resource usage of the target resource based on the historical usage of the target resource.
  • the historical target resource usage is the actual usage of the target resource in the target network element in the first time period.
  • the first time period is earlier than the time at which the first operating mode is determined.
  • the resource usage of the target resource is a weighted average of multiple usages of the target resource in the first time period.
  • the weight of each resource usage of the target resource in the first time period may be the same or different. For example, the resource utilization closer to the current moment in time has a greater weight.
  • the process of obtaining the target resource usage and the process of determining the target resource specifications can be executed sequentially or in parallel, which is not limited in the embodiments of the present application.
  • the computer device determines the resource utilization of the target resource based on the resource usage and resource specifications of the target resource, including: determining a ratio of the resource usage of the target resource to the resource specifications of the target resource as the resource utilization of the target resource. .
  • the target resource includes multiple first resources
  • the resource usage of the target resource includes the resource usage of each of the multiple first resources
  • the resource utilization rate of the target resource includes the resource usage of the multiple first resources.
  • the resource utilization rate of each first resource is the ratio of the resource usage of the first resource to the resource specification of the first resource.
  • the target resources may include the following multiple first resources: VRF instance table, Layer 3 logical interface table, Layer 2 sub-interface table, ARP table, and FIBv4 table.
  • the resource utilization of the VRF instance table is 50%; when the resource usage of the Layer 3 logical interface table (that is, the number of Layer 3 logical interfaces configured in the target network element) is 800, and the resource specification of the Layer 3 logical interface table is 1500, the Layer 3 logical interface
  • the resource utilization rate of the table is 53.3%; when the resource usage of the Layer 2 sub-interface table (that is, the number of Layer 2 sub-interfaces configured in the target network element) is 4500, the resource specification of the Layer 2 sub-interface table is 5000
  • the resource utilization rate of the Layer 2 sub-interface table is 90%; when the resource usage of the ARP table (that is, the number of ARP entries configured in the target network element) is 2000, and the resource specification of the ARP table is 2500 , the resource utilization rate of the ARP table is 80%;
  • Step 302 The computer device evaluates the capacity risk of the target network element based on the resource utilization of the target resource.
  • the computer device determines that the target network element has a capacity risk. Specifically, the computer device determines that the target network element has the target resource capacity risk, that is, the resource with the capacity risk is the target resource.
  • Risk conditions include: the resource utilization of the target resource is greater than the utilization threshold, or the resource utilization of the target resource is continuously greater than the utilization threshold for more than the duration threshold, or the resource utilization of the target resource is continuously greater than the utilization threshold for more than a number of times. Quantity threshold.
  • the target resource is an ARP table and the utilization threshold of the ARP table is 75%
  • the resource utilization (80%) of the ARP table shown in Table 8 is greater than the utilization threshold of the ARP table, and the computer device determines the target network element There is a capacity risk. Specifically, the computer device determines that the target network element has an ARP table capacity risk.
  • the computer device periodically (for example, the cycle is 5 minutes) calculates the resource utilization of the target resource of the target network element to obtain the resource utilization sequence of the target resource.
  • the resource utilization sequence includes the resource utilization of the target resources of the target network element that the computer device has successively acquired.
  • the computer device determines that the target network There is a capacity risk.
  • the target resource is an ARP table
  • the utilization threshold of the ARP table is 75%
  • the quantity threshold is 4
  • the resource utilization sequence of the ARP table is [70%, 76%, 85%, 80%, 90%, 86%]
  • the number of resource utilizations in the sequence that are continuously greater than the utilization threshold is 5.
  • the computer device can also multiply the above number by the cycle duration to obtain the duration during which the utilization rate of the target resource is continuously greater than the utilization threshold.
  • the computer determines that the target network element has a capacity risk of the target resource.
  • the computer device determines that the target network element has a capacity risk, and the resource with the capacity risk is at least one first resource that meets the risk condition.
  • the target resources include VRF instance table, Layer 3 logical interface table, Layer 2 sub-interface table, ARP table and FIBv4 table. If the risk threshold of each table entry resource is 75%, then the Layer 2 sub-interface table The resource utilization rates of the interface table and the ARP table both exceed the risk threshold, and the computer device can determine that the target network element has a capacity risk. Specifically, the computer device determines that the target network element's Layer 2 sub-interface table and ARP table have a capacity risk.
  • the utilization threshold, quantity threshold and duration threshold can be pre-configured or obtained by the computer device based on historical data. For example, the computer device obtains the utilization threshold and quantity threshold of each resource of the device type based on the resource usage of each resource when multiple network devices of the same device type in the network have a business failure or during a period of time before the business failure occurs. or duration threshold.
  • the utilization threshold is the statistical value of multiple resource usage when a business failure occurs
  • the quantity threshold is the statistical value of the number of resource usage that is continuously greater than the utilization threshold before the business failure occurs
  • the duration threshold is the statistical value of the resource usage before the business failure occurs.
  • the statistical value of the length of time that the resource utilization is continuously greater than the utilization threshold.
  • the statistical value is, for example, the mean, median, quantile, etc.
  • the computer device can also display relevant risk information. Further, the computer device can recommend handling suggestions for capacity risks.
  • the embodiment shown in Figure 3 may further include step 303 and/or step 304.
  • Step 303 The computer device displays risk description information.
  • the computer device displays risk description information.
  • the risk description information includes the identification of the target network element, indicating that the target network element represented by the identification has a capacity risk.
  • the risk description information also includes a target resource with risk, indicating that the target resource of the target network element has a capacity risk.
  • the risk description information includes at least one first resource with capacity risk.
  • the risk description information also includes risk degree information of the target resource.
  • the risk level information indicates the risk level of the target resource of the target network element.
  • the risk level information includes resource utilization and utilization threshold, or the risk level information is the difference between resource utilization and utilization threshold.
  • the risk degree information includes risk degree information of at least one first resource with capacity risk.
  • the risk description information may also include at least one of the following: the operating mode of the target network element, the operating scenario of the target network element, and the functions enabled by the target network element.
  • Step 304 The computer device displays risk treatment suggestions.
  • the computer device displays a risk treatment suggestion.
  • Steps 303 and 304 may be executed in parallel, for example, the computer device displays risk description information and risk treatment recommendation information at the same time.
  • Steps 303 and 304 may also be executed sequentially, and the embodiment of the present application does not limit the execution order of steps 303 and 304. In this embodiment of the present application, step 303 or step 304 may not be performed.
  • the processing suggestions include at least one of the following: changing the device type of the target network element, migrating the target service of the target network element, or switching the operating mode of the target network element.
  • the computer device may display a processing suggestion, which indicates changing the device type of the target network element from the first type to the second type, and the target resources of the second type of network equipment.
  • the resource specification is greater than the resource specification of the target resource of the first type of network device.
  • the computer device can display a processing suggestion.
  • the processing suggestion indicates migrating the target business of the target network element to other network devices, and the resource utilization of the target resources of other network devices is low. at the utilization threshold. For example, migrate some services related to target resources with capacity risks to other network devices.
  • the computer device may display a processing suggestion, and the processing suggestion instructs to switch the operation mode of the target network element from the first operation mode to the second operation mode, and the target network element is in the second operation mode. There is no capacity risk in this mode.
  • Operation and maintenance personnel can switch the target network element from the first operating mode to the second operating mode by changing the configuration of the target network element.
  • the mode switching includes: modifying the operating characteristics of the target network element by modifying the configuration parameters of the target network element, so that the characteristic values of the modified operating characteristics are consistent with the characteristic values of the operating characteristics corresponding to the second operating mode. Modifying the configuration parameters of the target network element will trigger the target network element to adjust the resource allocation in the storage space, thereby achieving the purpose of adjusting the resource specifications of each entry.
  • the first operating mode of network element A is IPv4 single stack mode 2.
  • the computer equipment determines that network element A has a capacity risk based on the first operating mode, and the first resource at risk is the second layer sub-network. In the interface table, the resource utilization rate corresponding to the first resource is 90%.
  • the processing suggestions include migrating the target services of network element A to network element C.
  • Network element C is a network element whose resource utilization rate of each resource is lower than the resource threshold.
  • the first operating mode of network element B is IPv4 and IPv6 dual-stack mode 2.
  • the computer equipment determines that network element B has a capacity risk based on the first operating mode.
  • the first resource at risk is the FIBv4 table.
  • the resource utilization corresponding to the first resource The rate is 90%.
  • the processing suggestions include changing the type of network element B.
  • the resource specifications of network element B after replacement are greater than the resource specifications of network element B before replacement.
  • the computer device determines the second resource specification of the target resource according to the second operating mode of the target network element, and the second operating mode is different from the first operating mode; and determines the target resource based on the resource usage of the target resource and the second resource specification.
  • the second resource utilization rate of the network element based on the second resource utilization rate, determine whether the target network element has a resource capacity risk.
  • a processing suggestion is generated, and the processing suggestion instructs to switch the operation mode of the target network element from the first operation mode to the second operation mode.
  • the computer device determines the resource specifications of the target resources based on the operating mode of the target network element, and evaluates the capacity risk of the target network element based on the resource specifications of the target resources. Determine the resource specifications of the target resources based on the operating mode of the target network element, so that the determined resource specifications are closer to the actual specifications of the target resources in the target network element, which in turn makes the resource utilization calculated based on the resource specifications more accurate and can be avoided as much as possible The problem of network equipment underreporting capacity risks. Furthermore, after it is determined that the target network element has a capacity risk, the embodiment of the present application also displays risk description information and/or risk treatment suggestions, which can facilitate operation and maintenance personnel to intuitively understand and quickly handle the capacity risk.
  • FIG. 4 shows a schematic diagram of a network capacity risk assessment system 400 provided by an embodiment of the present application.
  • Network capacity risk assessment system 400 includes computer equipment 410 and network equipment 420.
  • the computer device 410 is configured to execute the method provided by the embodiment shown in FIG. 1 or FIG. 2 to determine the resource specifications of the target resources of the network device 420 .
  • the computer device 410 is also used to perform step 301 and step 302 in the embodiment shown in FIG. 3 to assess the capacity risk of the network device 420 .
  • the computer device 410 is also configured to perform step 303 and/or step 304 in the embodiment shown in FIG. 3 to display risk description information and/or risk treatment suggestions when it is determined that the network device 420 has a capacity risk.
  • the network capacity risk assessment system 400 may also include an application device 430.
  • the application device 430 is used to perform step 303 and/or step 304 in the embodiment shown in FIG. 3 . That is, the application device 430 is used to display risk description information and/or risk treatment suggestions.
  • the computer device 410 is a controller
  • the application device 430 is a display device of the controller or a user's operating device.
  • the user's operating equipment is, for example, a computer, server, etc. used by operation and maintenance personnel.
  • the network capacity risk assessment system 400 further includes an application device 430
  • the computer device 410 sends risk description information and/or risk treatment suggestions to the application device 430, and the application device 430 displays the received risk description.
  • Information and risk handling advice when it is determined that the network device 420 has a capacity risk, the computer device 410 sends risk description information and/or risk treatment suggestions to the application device 430, and the application device 430 displays the received risk description.
  • Information and risk handling advice when it is determined that the network device 420 has a capacity risk.
  • the application device 430 is also configured to send a capacity risk assessment requirement to the computer device 420 to instruct the computer device 410 to perform a capacity risk assessment according to the capacity risk assessment requirement.
  • Capacity risk assessment requirements include at least one of the following: the identification of the network equipment to be assessed, the identification of the target resources to be assessed, and the assessment period or assessment cycle.
  • the evaluation period instructs the computer device 420 to perform capacity risk assessment during the evaluation period
  • the evaluation cycle instructs the computer device 420 to perform periodic capacity risk assessment on the network device according to the evaluation period.
  • the computer device can perform capacity risk assessment according to the default configuration, for example, perform periodic risk assessment on the ARP table, MAC table, and FIB table in the router device in the network to which the computer device 420 belongs. , the period is, for example, 10 minutes.
  • the identifier of the network device is, for example, the name of the network device. The identification of the network device may also include the device type of the network device.
  • the application device 430 is also used to send a resource specification table and/or a running mode definition table to the computer device 420.
  • the operating mode definition table includes the correspondence between operating modes and operating characteristics.
  • the resource specification table includes the correspondence between the operating mode and the resource specifications.
  • the computer device 420 may determine the operating mode of the network device 420 according to the operating characteristics of the network device 420 based on the operating mode definition table sent by the application device 430 .
  • the computer device 420 may determine the resource specifications of the network device 420 according to the operating mode of the network device 420 based on the resource specification table sent by the application device 430.
  • the running mode definition table and resource specification table sent by the application device 430 can be obtained by other devices and sent to the application device 430 .
  • the computer device 420 can obtain the resource specification table and the operating mode definition table by itself according to the embodiment shown in FIG. 1 or FIG. 2 .
  • the computer device 410 is also configured to send the identification of the target resource to the network device 420 to instruct the network device 420 to collect the usage of the target resource on demand. If the computer device 410 does not send the identification of the target resource, the network device 420 may send the resource usage of the resource according to the default configuration, for example, send the resource usage of all entry resources in the network device 420 .
  • the network device 420 is used to send relevant configuration information to the computer device 410.
  • the configuration information includes the interface configuration and service function configuration of the network device 420.
  • the configuration information also includes the device type of the network device 420.
  • Figure 5 shows a schematic flow chart of a capacity risk assessment method provided by an embodiment of the present application. The method includes steps 501 to 507.
  • Step 501 The application device sends a capacity risk assessment requirement to the computer device.
  • the assessment requirement includes an identification of the network device to be evaluated, and instructs the computer device to perform a capacity risk assessment on the network equipment represented by the identification.
  • the assessment requirement also includes an assessment time period, instructing the computer device to immediately perform a capacity risk assessment on the network device.
  • the assessment requirement also includes an identification of the target resource, for example, instructing the computer device to perform a capacity risk assessment on the ARP table of the network device.
  • Step 502 The computer device sends a collection request to the network device to obtain the configuration information of the network device and the usage of the ARP table.
  • Step 503 The network device sends the configuration information and the usage amount of the ARP table to the computer device.
  • Step 504 The computer device determines the operating mode of the network device based on the configuration information of the network device.
  • step 101 of the embodiment shown in Figure 1 please refer to step 101 of the embodiment shown in Figure 1 or step 201 of the embodiment shown in Figure 2, which will not be described again here.
  • Step 505 The computer device obtains the resource specifications of the ARP table of the network device according to the operating mode of the network device.
  • Step 506 The computer device evaluates the ARP table capacity risk of the network device based on the resource specifications of the ARP table of the network device and the usage of the ARP table.
  • step 303 of the embodiment shown in Figure 3 Please refer to step 303 of the embodiment shown in Figure 3 for this step, which will not be described again here.
  • Step 507 When there is a capacity risk in the ARP table of the network device, the computer device sends risk description information and/or risk treatment suggestions to the application device.
  • Step 508 The application device displays risk description information and/or risk treatment suggestions.
  • FIG. 6 shows a block diagram of a resource specification determining device 600 provided by an embodiment of the present application.
  • the device can be implemented as all or part of the computer equipment through software, hardware or a combination of both.
  • the device 600 includes an obtaining unit 610 and a determining unit 620.
  • the obtaining unit 610 is configured to obtain the first operating mode of the target network element, where the first operating mode indicates the enabling state of at least one function of the target network element.
  • the determining unit 620 is configured to determine the resource specification of the target resource of the target network element according to the first operating mode, where the resource specification indicates the maximum storage amount of the target resource in the target network element.
  • the obtaining unit 610 is configured to obtain the first operating mode of the target network element according to the operating scenario of the target network element.
  • the obtaining unit 610 is configured to determine the operating mode corresponding to the operating scenario of the target network element as the first operating mode of the target network element according to the corresponding relationship between the operating scenario and the operating mode.
  • the obtaining unit 610 is configured to obtain the first operating mode of the target network element according to the enabling state of at least one function of the target network element.
  • the obtaining unit 610 is configured to obtain the operating characteristics of the target network element according to the enabling state of at least one function of the target network element, and obtain the first operating mode of the target network element according to the operating characteristics of the target network element.
  • the operating characteristics include at least one of the following operating sub-characteristics: the protocol stack type enabled by the target network element, the enabling status of the service function of the target network element, the usage of the first resource of the target network element and the second resource of the target network element. proportion of usage.
  • the obtaining unit 610 is configured to obtain the first operating mode of the target network element corresponding to the operating characteristics of the target network element according to the corresponding relationship between the operating characteristics and the operating mode.
  • the obtaining unit 610 is configured to obtain the first mapping table, and determine, according to the first mapping table, the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode of the target network element.
  • the first mapping table includes a plurality of first entries, each first entry indicating a corresponding relationship between operating characteristics and operating modes.
  • the operation characteristics of the target network element include a plurality of operation sub-features.
  • the acquisition unit 610 is configured to determine the matching first entry according to the first mapping table, and determine the operation mode in the matching first entry as The first operating mode of the target network element.
  • the plurality of sub-features included in the matching first entry all match the operation characteristics of the target network element, including the plurality of operation sub-features.
  • the acquisition unit 610 is configured to determine the matching scores corresponding to the plurality of first entries when there is no matching first entry, and determine the target according to the matching scores corresponding to the plurality of first entries.
  • the matching score of any first entry indicates the matching degree between the plurality of operating sub-features and the plurality of sub-features included in the any first entry.
  • the determining unit 620 is configured to determine the target network element according to the first operating mode of the target network element and the resource usage and memory usage of multiple network devices in the network whose operating modes are the first operating mode.
  • the resource specification of the target resource is configured to determine the target network element according to the first operating mode of the target network element and the resource usage and memory usage of multiple network devices in the network whose operating modes are the first operating mode.
  • the determining unit 620 is configured to determine the resource specification of the target resource of the target network element according to the corresponding relationship between the operating mode and the resource specification and the first operating mode of the target network element.
  • the determining unit 620 is configured to obtain the second mapping table, and determine, according to the second mapping table, the resource specification of the target resource corresponding to the network element information of the target network element and the first operating mode of the target network element as the target. Resource specifications of the network element's target resources.
  • the second mapping table includes a plurality of second entries, each second entry indicating a correspondence between network element information, operating mode and resource specifications.
  • Network element information includes device type.
  • the determining unit 620 is also configured to determine the resource utilization rate of the target resource of the target network element according to the resource usage of the target resource of the target network element and the resource specifications of the target resource of the target network element.
  • the device 600 further includes an evaluation unit 630.
  • the evaluation unit 630 is configured to evaluate the capacity risk of the target network element according to the resource utilization of the target resources of the target network element.
  • the evaluation unit 630 is configured to determine that the target network element has a capacity risk when the resource utilization of the target resource meets the risk condition.
  • the risk conditions include: the resource utilization of the target resource of the target network element is greater than the utilization threshold, or the resource utilization of the target resource of the target network element is continuously greater than the utilization threshold for more than the duration threshold, or the target network The number of times the resource utilization of the target resource of the element is continuously greater than the utilization threshold exceeds the quantity threshold.
  • the target resources of the target network element include multiple first resources
  • the evaluation unit 630 is configured to determine that the target network element has a capacity risk if at least one first resource meets the risk condition.
  • the device 600 further includes a display unit 640.
  • the display unit 640 is configured to display risk description information and/or risk treatment suggestions after it is determined that the target network element has a capacity risk.
  • the risk description information includes at least one of the following: the identification of the target network element, the target resources with capacity risks in the target network element, the risk degree information of the target resources with capacity risks in the target network element, and the operation of the target network element. mode, the operating scenario of the target network element, or the functions enabled by the target network element.
  • the risk treatment suggestions include at least one of the following: changing the device type of the target network element, migrating the target service of the target network element, or switching the operating mode of the target network element.
  • the device provided in the above embodiments implements its functions, it only uses the layout of the above functional modules.
  • An example will be given below.
  • the above function allocation can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be described again here.
  • FIG. 7 shows a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the computer device 700 includes a processor 720, a memory 740, a communication interface 760, and a bus 780 through which the processor 720, the memory 740, and the communication interface 760 are connected to each other.
  • the processor 720, the memory 740 and the communication interface 760 may also be connected using other connection methods besides the bus 780.
  • the memory 740 can be various types of storage media, such as random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), non-volatile RAM (non-volatile RAM, NVRAM). ), programmable ROM (programmable ROM, PROM), erasable PROM (erasable PROM, EPROM), electrically erasable PROM (electrically erasable PROM, EEPROM), flash memory, optical memory, hard disk, etc.
  • RAM random access memory
  • read-only memory read-only memory
  • ROM non-volatile RAM
  • NVRAM non-volatile RAM
  • programmable ROM programmable ROM
  • PROM erasable PROM
  • EPROM erasable PROM
  • electrically erasable PROM electrically erasable PROM
  • flash memory optical memory, hard disk, etc.
  • the processor 720 may be a general-purpose processor, and the general-purpose processor may be a processor that performs specific steps and/or operations by reading and executing content stored in a memory (eg, the memory 740 ).
  • the general-purpose processor may be a central processing unit (CPU).
  • the processor 720 may include at least one circuit to perform all or part of the steps of the method provided by any of the embodiments shown in FIG. 1, FIG. 2, FIG. 3, or FIG. 5.
  • the communication interface 760 includes an input/output (I/O) interface, a physical interface, a logical interface, and other interfaces for realizing the interconnection of devices within the computer device 700, and for realizing the interconnection between the computer device 700 and other devices. (such as network equipment or application equipment) interconnection interface.
  • the physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.
  • the bus 780 may be any type of communication bus used to interconnect the processor 720, the memory 740, and the communication interface 760, such as a system bus.
  • the above-mentioned devices may be arranged on separate chips, or at least part or all of them may be arranged on the same chip. Whether each device is independently installed on different chips or integrated on one or more chips often depends on the needs of product design.
  • the embodiments of this application do not limit the specific implementation forms of the above devices.
  • the computer device 700 shown in FIG. 7 is only exemplary. During the implementation process, the computer device 700 may also include other components, which are not listed here. In addition, the computer device 700 provided in the above embodiments has the same concept as the foregoing method embodiments. Please refer to the method embodiments for its specific implementation process, which will not be described again here.
  • Embodiments of the present application provide a computer program product, which includes computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code.
  • the computer readable code is run in a processor of a computer device, , the processor in the computer device executes the above method executed by the computer device.
  • Embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored.
  • the computer program instructions are executed by a processor, the above method executed by a computer device is implemented.
  • Computer-readable storage media may be tangible devices that can retain and store instructions for use by an instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above.
  • Examples include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (ROM), Electrically Programmable Read-Only-Memory (EPROM or Flash Memory), Static Random-Access Memory (SRAM), Portable Compact Disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM), Digital Multi-Function Digital Video Disc (DVD), memory stick, floppy disk, mechanical encoding device, such as a punched card or a raised structure in a groove with instructions stored thereon, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • ROM erasable programmable read only memory
  • EPROM or Flash Memory Electrically Programmable Read-Only-Memory
  • SRAM Static Random-Access Memory
  • SRAM Portable Compact Disc Read-Only Memory
  • CD-ROM Compact Disc Read-Only Memory
  • DVD Digital Multi-Function Digital Video Disc
  • memory stick floppy disk
  • Computer-readable program instructions or code described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
  • the computer program instructions used to perform the operations of this application can be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or one or more Source code or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • the computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or it can be connected to an external computer (e.g. Use an Internet service provider to connect via the Internet).
  • electronic circuits are customized by utilizing state information of computer-readable program instructions, such as programmable logic circuits, field-programmable gate arrays (Field-Programmable Gate Arrays, FPGAs) or programmable logic arrays (Programmable Logic Array (PLA), the electronic circuit can execute computer-readable program instructions to implement various aspects of the present application.
  • These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine that, when executed by the processor of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , so that execution on a computer, other programmable data processing device, or other equipment
  • the instructions implement the functions/actions specified in one or more blocks in the flowchart and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that embody one or more elements for implementing the specified logical function(s).
  • Executable instructions may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by hardware (such as circuits or ASICs) that perform the corresponding function or action. Specific Integrated Circuit), or can be implemented with a combination of hardware and software, such as firmware.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present application provides a resource specification determination method and a related apparatus, and relates to the technical field of networks. In the method, a computer device obtains an operation mode of a target network element, and determines a resource specification of a target resource of the target network element according to the operation mode of the target network element. The operation mode indicates an enable state of at least one function of the target network element. Network devices having different functions enabled may store different types of resources; based on the operation modes of a network device, the present application considers the shared storage situation within the network device of various resources corresponding to each operation mode of various operation modes, thereby respectively determining a resource specification for each of a plurality of resources, making it so that the determined resource specification is closer to the actual specification of the resource in the network device.

Description

资源规格的确定方法和相关装置Methods and related devices for determining resource specifications
本申请要求于2022年04月28日提交的申请号为202210462504.X、发明名称为“一种网络容量风险的评估方法和相关装置”的中国专利申请的优先权,并要求于2022年09月26日提交的申请号为202211176974.6、发明名称为“资源规格的确定方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with application number 202210462504. The Chinese patent application with the application number 202211176974.6 and the invention title "Method for Determining Resource Specifications and Related Devices" submitted on the 26th has the priority, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及网络技术领域,尤其涉及一种资源规格的确定方法和相关装置。The present application relates to the field of network technology, and in particular, to a method for determining resource specifications and related devices.
背景技术Background technique
网络设备在运行业务的过程中会使用不同的资源,例如地址解析协议(Address Resolution Protocol,ARP)表,转发信息库(Forward Information Base,FIB)表,邻居发现(Neighbor Discovery,ND)协议表等。充足的资源是业务正常运行的必要条件,其判断标准是各个资源的资源利用率。Network devices use different resources when running services, such as Address Resolution Protocol (ARP) table, Forward Information Base (FIB) table, Neighbor Discovery (Neighbor Discovery, ND) protocol table, etc. . Sufficient resources are a necessary condition for normal business operation, and the criterion is the resource utilization of each resource.
相关技术中,某个资源的资源利用率通常为该资源的实际使用量与该资源的预设规格的比值。但是,某个资源的预设规格可能与该资源的实际规格之间的偏差较大,因此通过资源的预设规格计算的资源利用率的准确性较低。In related technologies, the resource utilization rate of a certain resource is usually the ratio of the actual usage of the resource to the preset specifications of the resource. However, the preset specifications for a resource may deviate significantly from the resource's actual specifications, so the resource utilization calculated from the resource's preset specifications is less accurate.
发明内容Contents of the invention
有鉴于此,本申请提供了一种资源规格的确定方法和相关装置。在该方法中,计算机设备根据目标网元的运行模式确定目标资源的资源规格,使得确定出的资源规格更接近于目标资源在该目标网元中的实际规格。In view of this, this application provides a method and related devices for determining resource specifications. In this method, the computer device determines the resource specification of the target resource according to the operating mode of the target network element, so that the determined resource specification is closer to the actual specification of the target resource in the target network element.
第一方面,本申请提供了一种资源规格的确定方法。该方法可以由计算机设备执行。计算机设备例如为网管设备、网络控制器、网络设备、终端、服务器等。计算机设备获取目标网元的第一运行模式,并根据目标网元的第一运行模式确定目标网元的目标资源的资源规格。该第一运行模式指示该目标网元的至少一种功能的使能状态。该资源规格指示该目标资源在该目标网元中的最大存储量。In the first aspect, this application provides a method for determining resource specifications. The method can be performed by a computer device. Computer equipment is, for example, network management equipment, network controllers, network equipment, terminals, servers, etc. The computer device obtains the first operating mode of the target network element, and determines the resource specification of the target resource of the target network element according to the first operating mode of the target network element. The first operating mode indicates an enabling state of at least one function of the target network element. The resource specification indicates the maximum storage amount of the target resource in the target network element.
目标网元例如为网络中的交换机、路由器、防火墙等网络设备。目标资源例如为目标网元中的ARP表、FIB表、ND协议表等。The target network elements are, for example, network devices such as switches, routers, and firewalls in the network. The target resources are, for example, the ARP table, FIB table, ND protocol table, etc. in the target network element.
使能不同功能的网络设备可能会存储不同种类的资源。在该实现方式中,计算机设备基于网络设备的运行模式确定目标资源的资源规格,使得确定出的资源规格更匹配该网络设备使能的功能,更接近网络设备中目标资源的实际规格。Network devices that enable different functions may store different types of resources. In this implementation, the computer device determines the resource specifications of the target resource based on the operating mode of the network device, so that the determined resource specifications more closely match the functions enabled by the network device and are closer to the actual specifications of the target resource in the network device.
在一种可能的实现方式中,该计算机设备根据所述目标网元的运行场景确定所述目标网元的第一运行模式。In a possible implementation, the computer device determines the first operating mode of the target network element according to the operating scenario of the target network element.
不同的运行场景会要求网络设备支持不同的业务,进而导致网络设备使能不同的功能,因此,计算机设备可以直接根据目标网元的运行场景确定目标网元的运行模式。 Different operating scenarios require network equipment to support different services, which in turn causes the network equipment to enable different functions. Therefore, the computer equipment can directly determine the operating mode of the target network element based on the operating scenario of the target network element.
在一种可能的实现方式中,该计算机设备根据运行场景和运行模式的对应关系,将与目标网元的运行场景对应的运行模式确定为目标网元的第一运行模式。In a possible implementation manner, the computer device determines the operating mode corresponding to the operating scenario of the target network element as the first operating mode of the target network element based on the corresponding relationship between the operating scenario and the operating mode.
在一种可能的实施方式中,目标网元的运行场景是根据如下一项或多项确定的:目标网元所属的网络、目标网元所处的位置、目标网元的角色,或目标网元的配置。In a possible implementation, the operating scenario of the target network element is determined based on one or more of the following: the network to which the target network element belongs, the location of the target network element, the role of the target network element, or the target network element. element configuration.
在一种可能的实现方式中,该计算机设备根据目标网元的至少一种功能的使能状态确定目标网元的第一运行模式。In a possible implementation, the computer device determines the first operating mode of the target network element according to the enabling state of at least one function of the target network element.
在一种可能的实现方式中,该计算机设备根据目标网元的至少一种功能的使能状态获取目标网元的运行特征,并根据目标网元的运行特征确定目标网元的第一运行模式。运行特征包括以下至少一项运行子特征:目标网元使能的协议栈类型、目标网元的业务功能的使能状态,目标网元的第一资源的使用量和目标网元的第二资源的使用量的比例。In a possible implementation, the computer device obtains the operating characteristics of the target network element based on the enabling state of at least one function of the target network element, and determines the first operating mode of the target network element based on the operating characteristics of the target network element. . The operating characteristics include at least one of the following operating sub-characteristics: the protocol stack type enabled by the target network element, the enabling status of the service function of the target network element, the usage of the first resource of the target network element and the second resource of the target network element. proportion of usage.
在一种可能的实现方式中,该计算机设备根据运行特征和运行模式的对应关系,确定与目标网元的运行特征对应的目标网元的第一运行模式。In a possible implementation manner, the computer device determines the first operating mode of the target network element corresponding to the operating characteristics of the target network element based on the corresponding relationship between the operating characteristics and the operating mode.
在一种可能的实现方式中,该计算机设备获取第一映射表,并根据第一映射表,将与目标网元的运行特征匹配的运行特征对应的运行模式确定为目标网元的第一运行模式。第一映射表包括多个第一表项,每个第一表项指示运行特征与运行模式之间的对应关系。In a possible implementation, the computer device obtains the first mapping table, and determines, according to the first mapping table, the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode of the target network element. model. The first mapping table includes a plurality of first entries, each first entry indicating a corresponding relationship between operating characteristics and operating modes.
在一种可能的实现方式中,目标网元的运行特征包括多个运行子特征,该计算机设备根据第一映射表确定匹配的第一表项,并将匹配的第一表项中的运行模式确定为目标网元的第一运行模式。匹配的第一表项包括的多个子特征与所述多个运行子特征均匹配。In a possible implementation, the operating characteristics of the target network element include multiple operating sub-characteristics, the computer device determines the matching first entry according to the first mapping table, and sets the operating mode in the matching first entry Determine it as the first operating mode of the target network element. The multiple sub-features included in the matching first entry all match the multiple running sub-features.
在一种可能的实现方式中,当不存在匹配的第一表项时,该计算机设备确定多个第一表项分别对应的匹配分数,并根据多个第一表项分别对应的匹配分数,确定目标网元的第一运行模式。任一第一表项的匹配分数指示多个运行子特征与任一第一表项包括的多个子特征之间的匹配程度。In a possible implementation, when there is no matching first entry, the computer device determines the matching scores corresponding to the multiple first entries, and based on the matching scores corresponding to the multiple first entries, Determine the first operating mode of the target network element. The matching score of any first entry indicates the matching degree between the plurality of operating sub-features and the plurality of sub-features included in any first entry.
在一种可能的实现方式中,当匹配分数最高的第一表项仅为一个第一表项时,该计算机设备将该第一表项包括的运行模式确定为第一运行模式。In a possible implementation, when the first entry with the highest matching score is only one first entry, the computer device determines the operating mode included in the first entry as the first operating mode.
在一种可能的实现方式中,当匹配分数最高的第一表项包括多个第一表项时,该计算机设备将该多个第一表项包括的运行模式作为候选模式,根据第一策略确定目标资源使用量与每个候选运行模式之间的匹配程度,将匹配程度最高的候选运行模式确定为第一运行模式。第一策略包括宽松策略和严厉策略。In a possible implementation, when the first entry with the highest matching score includes multiple first entries, the computer device uses the operating mode included in the multiple first entries as a candidate mode, according to the first policy The matching degree between the target resource usage and each candidate operating mode is determined, and the candidate operating mode with the highest matching degree is determined as the first operating mode. The first strategy includes loose strategy and strict strategy.
在一种可能的实现方式中,该计算机设备根据目标网元的第一运行模式,以及网络中运行模式为第一运行模式的多个网络设备的资源使用量和内存占用率确定目标网元的目标资源的资源规格。In a possible implementation, the computer device determines the target network element based on the first operating mode of the target network element and the resource usage and memory usage of multiple network devices in the network whose operating modes are the first operating mode. The resource specification of the target resource.
在一种可能的实现方式中,该计算机设备根据运行模式和资源规格的对应关系以及目标网元的第一运行模式,确定目标网元的目标资源的资源规格。In a possible implementation manner, the computer device determines the resource specification of the target resource of the target network element based on the corresponding relationship between the operating mode and the resource specification and the first operating mode of the target network element.
在一种可能的实现方式中,运行模式和资源规格的对应关系是通过对运行模式关联的多种资源进行迭代存储测试确定的。通过对运行模式关联的多种资源进行迭代存储测试,可以充分考虑该运行模式关联的多种资源对存储的需求以及相互间的存储冲突,使得确定出的资源规格更准确。In a possible implementation manner, the correspondence between the running mode and the resource specification is determined by iterative storage testing of multiple resources associated with the running mode. By conducting iterative storage tests on multiple resources associated with the operating mode, the storage requirements and mutual storage conflicts of the multiple resources associated with the operating mode can be fully considered, making the determined resource specifications more accurate.
在一种可能的实现方式中,该计算机设备获取第二映射表,并根据第二映射表,将与目标网元的网元信息和目标网元的第一运行模式对应的目标资源的资源规格确定为目标 网元的目标资源的资源规格。第二映射表包括多个第二表项,每个第二表项指示网元信息、运行模式与资源规格之间的对应关系,网元信息包括设备类型。In a possible implementation, the computer device obtains the second mapping table, and according to the second mapping table, the resource specification of the target resource corresponding to the network element information of the target network element and the first operating mode of the target network element is identified as target Resource specifications of the network element's target resources. The second mapping table includes a plurality of second entries, each second entry indicates a correspondence between network element information, operating mode and resource specifications, and the network element information includes device type.
在一种可能的实现方式中,设备类型为网络设备的型号In a possible implementation, the device type is the model of the network device
在一种可能的实现方式中,设备类型还可以包括网络设备的版本标识。In a possible implementation, the device type may also include a version identification of the network device.
在一种可能的实现方式中,该计算机设备根据目标网元的目标资源的资源使用量和目标网元的目标资源的资源规格,确定目标网元的目标资源的资源利用率。In a possible implementation manner, the computer device determines the resource utilization rate of the target resources of the target network element based on the resource usage of the target resources of the target network element and the resource specifications of the target resources of the target network element.
基于上述方式获取到的目标资源的资源规格更接近于该目标资源在目标网元中的实际规格,这使得基于该目标资源的资源规格计算的目标资源的资源利用率更准确。The resource specification of the target resource obtained based on the above method is closer to the actual specification of the target resource in the target network element, which makes the resource utilization of the target resource calculated based on the resource specification of the target resource more accurate.
在一种可能的实现方式中,计算机设备将目标资源的资源使用量与目标资源的资源规格的比值确定为目标资源的资源利用率。In a possible implementation manner, the computer device determines the ratio of the resource usage of the target resource to the resource specification of the target resource as the resource utilization rate of the target resource.
在一种可能的实现方式中,计算机设备接收目标网元发送的目标资源的资源使用。In a possible implementation manner, the computer device receives the resource usage of the target resource sent by the target network element.
在一种可能的实现方式中,计算机设备根据历史的目标资源的使用量预测得到的目标资源的资源使用量。该实现方式简化了计算机设备和目标网元之间的交互,节省了网络资源。In a possible implementation manner, the computer device predicts the resource usage of the target resource based on the historical usage of the target resource. This implementation simplifies the interaction between the computer device and the target network element and saves network resources.
在一种可能的实现方式中,该计算机设备根据目标网元的目标资源的资源利用率评估目标网元的容量风险。In a possible implementation manner, the computer device evaluates the capacity risk of the target network element based on the resource utilization of the target resources of the target network element.
在一种可能的实现方式中,当目标资源的资源利用率满足风险条件时,该计算机设备确定目标网元存在容量风险。In a possible implementation manner, when the resource utilization rate of the target resource meets the risk condition, the computer device determines that the target network element has a capacity risk.
基于上述方式获取到的目标资源的资源规格更接近于该目标资源在目标网元中的实际规格,这使得基于该目标资源的资源规格计算的目标资源的资源利用率更准确,进而使得该容量风险评估的结果更准确,可以尽量避免漏报容量风险。The resource specification of the target resource obtained based on the above method is closer to the actual specification of the target resource in the target network element, which makes the resource utilization of the target resource calculated based on the resource specification of the target resource more accurate, thereby making the capacity The results of risk assessment are more accurate and can minimize the risk of underreporting capacity.
在一种可能的实现方式中,风险条件包括:目标网元的目标资源的资源利用率大于利用率阈值,或者,目标网元的目标资源的资源利用率连续大于利用率阈值的时长超过时长阈值,或者,目标网元的目标资源的资源利用率连续大于利用率阈值的次数超过数量阈值。In a possible implementation manner, the risk conditions include: the resource utilization rate of the target resource of the target network element is greater than the utilization threshold, or the resource utilization rate of the target resource of the target network element is continuously greater than the utilization threshold for a period exceeding the duration threshold. , or the number of times the resource utilization of the target resource of the target network element is continuously greater than the utilization threshold exceeds the quantity threshold.
在一种可能的实现方式中,所述目标网元的目标资源包括多个第一资源,若存在至少一个第一资源满足风险条件,该计算机设备确定目标网元存在容量风险。In a possible implementation manner, the target resources of the target network element include multiple first resources. If at least one first resource meets the risk condition, the computer device determines that the target network element has a capacity risk.
在一种可能的实现方式中,当确定所述目标网元存在容量风险后,该计算机设备显示风险描述信息和/或风险处理建议。In a possible implementation manner, after it is determined that the target network element has a capacity risk, the computer device displays risk description information and/or risk treatment suggestions.
在确定目标网元存在容量风险后,显示风险描述信息或风险处理建议,有助于运维人员快速地发现容量风险,并快速的处理容量风险。After it is determined that the target network element has capacity risks, risk description information or risk handling suggestions are displayed to help operation and maintenance personnel quickly discover capacity risks and quickly handle capacity risks.
在一种可能的实现方式中,风险描述信息包括如下至少一项:目标网元的标识、目标网元中存在容量风险的目标资源、目标网元中存在容量风险的目标资源的风险程度信息、目标网元的运行模式、目标网元的运行场景,或者目标网元使能的功能。In a possible implementation, the risk description information includes at least one of the following: an identification of the target network element, target resources with capacity risks in the target network element, risk degree information of target resources with capacity risks in the target network element, The operating mode of the target network element, the operating scenario of the target network element, or the functions enabled by the target network element.
在一种可能的实现方式中,风险处理建议包括如下至少一项:更换目标网元的设备类型、迁移目标网元的目标业务或切换目标网元的运行模式。In a possible implementation manner, the risk treatment suggestions include at least one of the following: changing the device type of the target network element, migrating the target service of the target network element, or switching the operating mode of the target network element.
第二方面,本申请提供一种资源规格的确定装置。该装置包括多个功能模块,该多个功能模块可以全部是软件模块或硬件模块,还可以是软件模块和硬件模块的组合,该多个功能模块可以根据实现做不同划分,以能实现上述第一方面及其各实施方式中的方法为准 则。In a second aspect, this application provides a device for determining resource specifications. The device includes multiple functional modules. The multiple functional modules can all be software modules or hardware modules, or can be a combination of software modules and hardware modules. The multiple functional modules can be divided differently according to implementation to achieve the above-mentioned third step. In one aspect and the methods in each embodiment thereof, the method shall prevail but.
第三方面,本申请提供一种计算机设备。该计算机设备包括处理器和存储器。该存储器中存储有程序,该处理器用于执行该存储器中存储的程序以实现上述第一方面或第一方面的任意一种可能的实现方式所提供的方法。In a third aspect, the present application provides a computer device. The computer device includes a processor and memory. The memory stores programs, and the processor is configured to execute the programs stored in the memory to implement the method provided by the above-mentioned first aspect or any possible implementation of the first aspect.
第四方面,本申请提供一种容量风险评估***。该***包括计算机设备和网络设备。计算机设备用于实现上述第一方面或第一方面的任一种可能的实施方式所提供的方法。In the fourth aspect, this application provides a capacity risk assessment system. The system includes computer equipment and network equipment. The computer equipment is used to implement the method provided by the above-mentioned first aspect or any possible implementation manner of the first aspect.
在一种可能的实施方式中,该***还包括应用设备。应用设备用于接收计算机设备发送的风险描述信息和/或风险处理建议,并显示风险描述信息和/或风险处理建议。In a possible implementation, the system further includes an application device. The application device is used to receive risk description information and/or risk treatment suggestions sent by the computer device, and display the risk description information and/or risk treatment suggestions.
在一种可能的实施方式中,应用设备还用于向计算机设备发送容量风险评估需求,以指示计算机设备根据容量风险评估需求进行容量风险评估。In a possible implementation, the application device is also configured to send a capacity risk assessment requirement to the computer device to instruct the computer device to perform a capacity risk assessment based on the capacity risk assessment requirement.
在一种可能的实施方式中,容量风险评估需求包括如下至少一项:待评估的网络设备的标识、待评估的目标资源的标识、评估时段或评估周期。In a possible implementation, the capacity risk assessment requirement includes at least one of the following: an identification of the network device to be assessed, an identification of the target resource to be assessed, an assessment period or an assessment cycle.
在一种可能的实施方式中,应用设备还用于向计算机设备发送资源规格表和/或运行模式定义表。运行模式定义表包括运行模式和运行特征的对应关系。资源规格表包括运行模式和资源规格的对应关系。In a possible implementation, the application device is also used to send a resource specification table and/or a running mode definition table to the computer device. The operating mode definition table includes the correspondence between operating modes and operating characteristics. The resource specification table includes the correspondence between the operating mode and the resource specifications.
在一种可能的实施方式中,计算机设备还用于向网络设备发送目标资源的标识,以指示网络设备按需采集目标资源的使用量。In a possible implementation, the computer device is also configured to send an identification of the target resource to the network device to instruct the network device to collect the usage of the target resource on demand.
在一种可能的实施方式中,网络设备用于发送配置信息给计算机设备。配置信息包括网络设备的接口配置和业务功能配置。In a possible implementation, the network device is used to send configuration information to the computer device. Configuration information includes interface configuration and service function configuration of network devices.
第五方面,本申请提供一种计算机可读存储介质。所述计算机可读存储介质包括指令,当其在计算机上运行时,使得计算机执行如上述第一方面或第一方面的任意一种可能的实现方式所提供的方法。In a fifth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes instructions that, when run on a computer, cause the computer to perform the method provided by the above-mentioned first aspect or any possible implementation of the first aspect.
第六方面,本申请提供了一种计算机程序产品,所述计算机程序产品在计算机上运行时,所述计算机执行如第一方面或第一方面的任意一种可能的实现方式所提供的方法。In a sixth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computer executes the method provided in the first aspect or any possible implementation of the first aspect.
附图说明Description of drawings
图1示出了本申请实施例提供的一种资源规格的确定方法的流程示意图。Figure 1 shows a schematic flowchart of a method for determining resource specifications provided by an embodiment of the present application.
图2示出了本申请实施例提供的另一种资源规格的确定方法的流程示意图。Figure 2 shows a schematic flowchart of another method for determining resource specifications provided by an embodiment of the present application.
图3示出了本申请实施例提供的一种容量风险评估方法的流程示意图。Figure 3 shows a schematic flowchart of a capacity risk assessment method provided by an embodiment of the present application.
图4示出了本申请实施例提供的一种容量风险评估***的示意图。Figure 4 shows a schematic diagram of a capacity risk assessment system provided by an embodiment of the present application.
图5示出了本申请实施例提供的另一种容量风险评估方法的流程示意图。Figure 5 shows a schematic flowchart of another capacity risk assessment method provided by an embodiment of the present application.
图6示出了本申请实施例提供的一种资源规格的确定装置的框图。Figure 6 shows a block diagram of a device for determining resource specifications provided by an embodiment of the present application.
图7示出了本申请实施例提供的一种计算机设备的硬件结构示意图。FIG. 7 shows a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present application.
具体实施方式 Detailed ways
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numbers in the drawings identify functionally identical or similar elements. Although various aspects of the embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" as used herein means "serving as an example, example, or illustrative." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or superior to other embodiments.
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。In addition, in order to better explain the present application, numerous specific details are given in the following detailed description. It will be understood by those skilled in the art that the present application may be practiced without certain specific details. In some instances, methods, means, components and circuits that are well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
首先,对本申请涉及的一些名词进行介绍。First, some terms involved in this application are introduced.
1、单栈模式:网络设备仅启用一个协议栈的模式。若网络设备的所有接口只配置了一种目标协议类型地址,则该网络设备为该目标协议的单栈模式。例如,目标协议为互联网协议第四版(Internet Protocol version 4,IPv4),则网络设备为IPv4单栈模式。又例如,目标协议为互联网协议第六版(Internet Protocol version 6,IPv6),则网络设备为IPv6单栈模式。1. Single stack mode: A mode in which the network device only enables one protocol stack. If all interfaces of a network device are configured with only one target protocol type address, the network device is in single-stack mode for that target protocol. For example, if the target protocol is Internet Protocol version 4 (IPv4), the network device is in IPv4 single-stack mode. For another example, if the target protocol is Internet Protocol version 6 (IPv6), the network device is in IPv6 single-stack mode.
2、双栈模式:网络设备同时启用两个协议栈的模式。若网络设备既存在配置了第一协议类型地址的接口,也存在配置了第二协议类型地址的接口,则该网络设备为双栈模式。例如,第一协议为IPv4,第二协议为IPv6。2. Dual stack mode: A mode in which the network device enables two protocol stacks at the same time. If the network device has both an interface configured with an address of the first protocol type and an interface configured with an address of the second protocol type, the network device is in dual-stack mode. For example, the first protocol is IPv4 and the second protocol is IPv6.
3、微分段(microsegmentation):基于对报文进行分组后的组标识进行流量策略控制的技术。相关技术基于虚拟局域网(Virtual Local Area Network,VLAN)或虚拟网络接口(Virtual Network Interface,VNI)进行子网划分,再基于子网进行业务隔离,划分粒度较粗。微分段可以提供更细粒度、更灵活的分组方式,例如,微分段基于互联网协议(Internet Protocol,IP)地址、媒体存取控制(Media Access Control,MAC)地址、虚拟机名等对报文进行分组。因此,微分段可以进一步细化安全域的大小,实现更精细的业务隔离,提升网络安全性。3. Microsegmentation: A technology for traffic policy control based on group identifiers after grouping packets. Related technologies divide subnets based on virtual local area network (Virtual Local Area Network, VLAN) or virtual network interface (Virtual Network Interface, VNI), and then perform business isolation based on subnets, with a coarser granularity. Micro-segmentation can provide a more fine-grained and flexible grouping method. For example, micro-segmentation groups packets based on Internet Protocol (IP) addresses, Media Access Control (MAC) addresses, virtual machine names, etc. Group. Therefore, micro-segmentation can further refine the size of the security domain, achieve more refined business isolation, and improve network security.
4、SG表项:组播路由表中的(S,G)表项。每个(S,G)表项表示源S向组播组G发送组播数据的路由信息。例如,一个(S,G)表项包括源S(例如,一个单播IP地址),组播组G(例如,一个组播IP地址)和接口标识,该接口标识指示的接口用于转发由源S发往组播组G的报文。4. SG entry: (S, G) entry in the multicast routing table. Each (S, G) entry represents routing information for source S to send multicast data to multicast group G. For example, a (S, G) entry includes source S (for example, a unicast IP address), multicast group G (for example, a multicast IP address), and an interface identifier indicating the interface used to forward the Packets sent by source S to multicast group G.
5、资源规格:一种资源在一个网络设备中的最大存储量。例如,资源为ARP表,网络设备A的ARP表的资源规格为1000条,表示该网络设备A中最多能存储1000条ARP表项。又例如,资源为MAC表,网络设备A的MAC表的资源规格为2000条,表示该网络设备A中最多能存储2000条MAC表项。资源规格又称为产品规格。5. Resource specifications: the maximum storage amount of a resource in a network device. For example, the resource is an ARP table, and the resource specification of the ARP table of network device A is 1000 entries, which means that network device A can store up to 1000 ARP entries. For another example, the resource is a MAC table, and the resource specification of the MAC table of network device A is 2000 entries, which means that network device A can store up to 2000 MAC table entries. Resource specifications are also called product specifications.
6、容量风险:网络设备中的一个或多个资源的使用量超过阈值。例如,若ARP表的资源规格为1000条,ARP表的风险阈值为80%,当网络设备中实际已存储的ARP表项的数量超过800条(即,ARP表的使用量超过800)时,表示该网络设备存在容量风险。也就是说,当网络设备的某一资源的存储量超过一定阈值时,后续可能会出现该资源存储失败的现象,导致与该资源相关的网络业务故障。 6. Capacity risk: The usage of one or more resources in the network device exceeds the threshold. For example, if the resource specification of the ARP table is 1000 entries and the risk threshold of the ARP table is 80%, when the actual number of ARP table entries stored in the network device exceeds 800 (that is, the usage of the ARP table exceeds 800), Indicates that the network device has capacity risk. That is to say, when the storage amount of a certain resource of a network device exceeds a certain threshold, subsequent storage failure of the resource may occur, resulting in network service failure related to the resource.
一种资源可能占用网络设备的多种存储资源。例如,一个ARP表项表示的是一个IP地址和一个MAC地址之间的对应关系,则存储一个ARP表项需要存储该IP地址、该MAC地址,和该IP地址和该MAC地址的对应关系。又例如,一个MAC表项表示的是一个MAC地址和一个接口的对应关系,则存储一个MAC表项需要存储该MAC地址、该接口的标识和该MAC地址和该接口的对应关系。网络设备通常将诸如IP地址、MAC地址等资源存储于网络设备的转发芯片的硬件存储资源中。网络设备通常将各表项包含的对应关系存储于网络设备的内存中,例如,将一个ARP表项关联的IP地址和MAC地址在转发芯片中的存储位置或索引存储于内存中。因此,一种资源的资源规格既与网络设备内转发芯片的资源分配规则相关,又与网络设备中的内存大小相关。One resource may occupy multiple storage resources of a network device. For example, an ARP entry represents the correspondence between an IP address and a MAC address. To store an ARP entry, you need to store the IP address, the MAC address, and the correspondence between the IP address and the MAC address. For another example, a MAC table entry represents the correspondence between a MAC address and an interface. To store a MAC table entry, you need to store the MAC address, the identifier of the interface, and the correspondence between the MAC address and the interface. Network devices usually store resources such as IP addresses and MAC addresses in hardware storage resources of the forwarding chip of the network device. Network devices usually store the corresponding relationships contained in each entry in the memory of the network device. For example, the storage location or index of the IP address and MAC address associated with an ARP entry in the forwarding chip is stored in the memory. Therefore, the resource specification of a resource is related to both the resource allocation rules of the forwarding chip in the network device and the memory size in the network device.
相关技术中,持续地向网络设备中配置同一种资源,直至配置失败,将配置失败时网络设备中已经存储的该资源的数量作为该资源的预设规格。针对于同一种网络设备,相关技术确定出的同种资源的预设规格相同。In the related art, the same resource is continuously configured in the network device until the configuration fails, and the quantity of the resource that has been stored in the network device when the configuration fails is used as the preset specification of the resource. For the same network device, the default specifications of the same resource determined by the relevant technology are the same.
然而,实际使用中,网络设备的存储空间(包括转发芯片的存储空间和内存的存储空间)可能会被多种资源占用,例如,ARP表,MAC表、FIB表等。因此,某一资源实际能占用的网络设备的存储空间会小于网络设备的最大存储空间。基于资源实际能占用的网络设备的存储空间确定的规格为资源的实际规格。因此,资源的预设规格通常与该资源的实际规格之间有较大的偏差,资源的预设规格通常会远大于资源的实际规格。网络设备基于预设规格计算出的资源利用率会偏小,可能导致网络设备的容量风险被漏报。However, in actual use, the storage space of the network device (including the storage space of the forwarding chip and the storage space of the memory) may be occupied by various resources, such as ARP table, MAC table, FIB table, etc. Therefore, the storage space of the network device that a certain resource can actually occupy will be less than the maximum storage space of the network device. The specifications determined based on the storage space of the network device that the resource can actually occupy are the actual specifications of the resource. Therefore, there is usually a large deviation between the default specifications of a resource and the actual specifications of the resource. The default specifications of a resource are usually much larger than the actual specifications of the resource. The resource utilization calculated by the network device based on the preset specifications will be too small, which may cause the capacity risk of the network device to be missed.
鉴于此,本申请实施例提供一种资源规格的确定方法和相关装置。本申请实施例基于网络设备的运行模式确定网络设备中资源的资源规格。网络设备的运行模式指示网络设备的至少一种功能的使能状态。使能不同功能的网络设备可能会存储不同种类的资源。本申请实施例基于网络设备的运行模式,考虑不同运行模式中每种运行模式对应的多种资源在网络设备内的共同存储情况,从而为多种资源中的每种资源分别确定资源规格,使得确定出的资源规格更接近资源在网络设备中的实际规格,进而使得基于该资源规格计算的资源利用率更准确,可以尽量避免网络设备漏报容量风险的问题。本申请实施例的详细方案请参考下述描述。In view of this, embodiments of the present application provide a method and related devices for determining resource specifications. The embodiment of the present application determines resource specifications of resources in the network device based on the operating mode of the network device. The operating mode of the network device indicates an enabling state of at least one function of the network device. Network devices that enable different functions may store different types of resources. Based on the operating mode of the network device, the embodiment of the present application considers the common storage situation of multiple resources corresponding to each operating mode in the different operating modes in the network device, thereby determining resource specifications for each of the multiple resources, so that The determined resource specifications are closer to the actual specifications of the resources in the network equipment, which in turn makes the resource utilization calculated based on the resource specifications more accurate and can minimize the risk of network equipment underreporting capacity. Please refer to the following description for detailed solutions of the embodiments of this application.
计算机设备执行资源规格的确定方法以确定目标网元的目标资源的资源规格。目标网元为网络中的一个网络设备,例如,交换机、路由器、防火墙或接入点(Access Point,AP)等。网络例如为数据中心网络(Data Center Network,DCN)、园区网络或者运营商网络等。可选地,计算机设备与目标网元是不同的设备。例如,目标网元为网络中的一个路由器,计算机设备为控制器、服务器、服务器集群、云设备、终端、网络中的网管设备,或网络中的其他网络设备。可选地,计算机设备与目标网元是相同的设备。例如,目标网元和计算机设备均为DCN中的一个路由器,该路由器根据自身的运行模式确定目标资源的资源规格。The computer device executes the resource specification determination method to determine the resource specifications of the target resources of the target network element. The target network element is a network device in the network, such as a switch, router, firewall or access point (AP), etc. The network is, for example, a Data Center Network (DCN), a campus network, or a carrier network. Optionally, the computer device and the target network element are different devices. For example, the target network element is a router in the network, and the computer device is a controller, server, server cluster, cloud device, terminal, network management device in the network, or other network equipment in the network. Optionally, the computer device and the target network element are the same device. For example, the target network element and computer equipment are both a router in the DCN, and the router determines the resource specifications of the target resources according to its own operating mode.
目标资源包括至少一种表项资源。表项资源例如为ARP表、ND协议表、IPv4路由表、IPv6路由表、组播路由表、虚拟路由转发(virtual routing and forwarding,VRF)实例表、逻辑接口表,访问控制列表(Access Control List,ACL)等。逻辑接口包括三层逻辑接口和/或二层逻辑接口。二层逻辑接口包括二层子接口。当目标资源仅包括一种表项资源时,计算机设备根据目标网元的运行模式确定该表项资源的资源规格。当目标资源包括多种表项 资源时,目标资源的资源规格包括该多种表项资源中的每种表项资源的资源规格,计算机设备根据目标网元的运行模式分别为每种表项资源确定资源规格。The target resource includes at least one entry resource. Table entry resources include, for example, ARP tables, ND protocol tables, IPv4 routing tables, IPv6 routing tables, multicast routing tables, virtual routing and forwarding (VRF) instance tables, logical interface tables, and access control lists. ,ACL) etc. Logical interfaces include Layer 3 logical interfaces and/or Layer 2 logical interfaces. Layer 2 logical interfaces include Layer 2 sub-interfaces. When the target resource only includes one entry resource, the computer device determines the resource specification of the entry resource based on the operating mode of the target network element. When the target resource includes multiple entries When resources are used, the resource specifications of the target resource include the resource specifications of each entry resource in the multiple entry resources. The computer device determines the resource specifications for each entry resource according to the operating mode of the target network element.
请参考图1,其示出了本申请实施例提供的一种资源规格的确定方法的流程示意图。该方法包括步骤101和102。Please refer to FIG. 1 , which shows a schematic flowchart of a method for determining resource specifications provided by an embodiment of the present application. The method includes steps 101 and 102.
步骤101,计算机设备获取目标网元的第一运行模式,第一运行模式指示目标网元的至少一种功能的使能状态。Step 101: The computer device acquires the first operating mode of the target network element, and the first operating mode indicates the enabling state of at least one function of the target network element.
第一运行模式指示目标网元的至少一种功能的使能状态。例如,第一运行模式为IPv4单栈模式,此时目标网元使能IPv4协议,不使能IPv6协议。又例如,第一运行模式为双栈模式,此时目标网元使能IPv4协议和IPv6协议。又例如,第一运行模式为IPv4单栈和组播模式,此时目标网元使能IPv4协议和组播功能。又例如,第一运行模式为IPv4单栈和微分段模式,此时目标网元使能IPv4协议和微分段功能。第一运行模式可以是多种运行模式中的一种,运行模式的种类由目标网元支持的功能决定。上述几种第一运行模式仅为举例,不构成对本申请实施例的限定。可以理解的是,目标网元支持的功能越多,功能间的组合也就越多,运行模式的种类会越多。The first operating mode indicates an enabling state of at least one function of the target network element. For example, the first operating mode is the IPv4 single-stack mode. At this time, the target network element enables the IPv4 protocol and disables the IPv6 protocol. For another example, the first operating mode is the dual-stack mode. At this time, the target network element enables the IPv4 protocol and the IPv6 protocol. For another example, the first operating mode is IPv4 single stack and multicast mode. At this time, the target network element enables the IPv4 protocol and multicast function. For another example, the first operating mode is IPv4 single stack and micro-segmentation mode. At this time, the target network element enables the IPv4 protocol and micro-segmentation function. The first operating mode may be one of multiple operating modes, and the type of operating mode is determined by the functions supported by the target network element. The above-mentioned first operating modes are only examples and do not constitute a limitation on the embodiments of the present application. It is understandable that the more functions the target network element supports, the more combinations between functions, and the more types of operating modes there will be.
可选地,计算机设备根据目标网元的运行场景确定目标网元的第一运行模式。不同的运行场景会要求网络设备支持不同的业务,进而导致网络设备使能不同的功能,处于不同的运行模式。例如,有的运行场景要求网络设备支持细粒度的业务隔离,此时网络设备可能需要使能微分段业务。又例如,有的运行场景要求网络设备支持IPv4业务和IPv6业务,此时网络设备需要使能双栈模式。可选地,计算机设备根据运行场景和运行模式的对应关系,将与目标网元的运行场景对应的运行模式确定为第一运行模式。例如,计算机设备维护一张运行场景和运行模式之间的映射表,该映射表的每个表项记录一种运行场景以及和该运行场景对应的运行模式。例如,每个表项存储运行场景的名称以及和该运行场景对应的运行模式的名称。计算机设备将目标网元的运行场景作为关键字,查询该映射表,以获取与该运行场景对应的第一运行模式。目标网元的运行场景可基于以下一项或多项确定:目标网元所属的网络、目标网元所处的位置,目标网元的角色,或目标网元的配置。目标网元的运行场景还可以是运维人员输入给计算机设备的。运行场景和运行模式的对应关系可以是预先配置的,例如,由运维人员配置,或者是其他的设备确定后又配置到该计算机设备。运行场景和运行模式的对应关系还可以是该计算机设备确定的,例如,该计算机设备获取网络中处于不同运行场景的网络设备使能的功能,基于每个网络设备使能的功能确定每个网络设备的运行模式,再基于每个网络设备的运行模式和该每个网络设备的运行场景确定运行场景和运行模式的对应关系。Optionally, the computer device determines the first operating mode of the target network element according to the operating scenario of the target network element. Different operating scenarios will require network equipment to support different services, which will lead to network equipment enabling different functions and operating in different operating modes. For example, some operating scenarios require network equipment to support fine-grained service isolation. In this case, the network equipment may need to enable micro-segmentation services. For another example, some operating scenarios require network equipment to support IPv4 services and IPv6 services. In this case, the network equipment needs to enable dual-stack mode. Optionally, the computer device determines the operating mode corresponding to the operating scenario of the target network element as the first operating mode according to the corresponding relationship between the operating scenario and the operating mode. For example, the computer device maintains a mapping table between operating scenarios and operating modes, and each entry in the mapping table records an operating scenario and an operating mode corresponding to the operating scenario. For example, each entry stores the name of the running scenario and the name of the running mode corresponding to the running scenario. The computer device uses the operating scenario of the target network element as a keyword to query the mapping table to obtain the first operating mode corresponding to the operating scenario. The operating scenario of the target network element can be determined based on one or more of the following: the network to which the target network element belongs, the location of the target network element, the role of the target network element, or the configuration of the target network element. The operation scenario of the target network element can also be input to the computer equipment by the operation and maintenance personnel. The corresponding relationship between the operating scenario and the operating mode can be pre-configured, for example, configured by operation and maintenance personnel, or other equipment is determined and then configured to the computer equipment. The corresponding relationship between operating scenarios and operating modes can also be determined by the computer device. For example, the computer device obtains the functions enabled by network devices in different operating scenarios in the network, and determines each network based on the functions enabled by each network device. The operating mode of the device, and then determine the corresponding relationship between the operating scenario and the operating mode based on the operating mode of each network device and the operating scenario of each network device.
可选地,计算机设备根据目标网元的至少一种功能的使能状态确定目标网元的第一运行模式。例如,目标网元使能IPv4协议,但未使能IPv6协议,则计算机设备可以将第一运行模式确定为IPv4单栈模式。又例如,目标网元使能IPv4协议和IPv6协议,又使能微分段功能,则计算机设备可以将第一运行模式确定为双栈和微分段模式。又例如,目标网元使能IPv4协议和IPv6协议,又使能组播功能,则计算机设备可以将第一运行模式确定为双栈和组播模式。图2所示的实施例详细地介绍了如何根据目标网元的至少一种功能的使能状态确定目标网元的运行模式,此处不再赘述。Optionally, the computer device determines the first operating mode of the target network element according to the enabling state of at least one function of the target network element. For example, if the target network element enables the IPv4 protocol but does not enable the IPv6 protocol, the computer device may determine the first operating mode as the IPv4 single-stack mode. For another example, if the target network element enables the IPv4 protocol and the IPv6 protocol, and also enables the micro-segmentation function, the computer device may determine the first operating mode as the dual-stack and micro-segmentation mode. For another example, if the target network element enables the IPv4 protocol and the IPv6 protocol, and also enables the multicast function, the computer device can determine the first operating mode as the dual stack and multicast mode. The embodiment shown in Figure 2 introduces in detail how to determine the operating mode of the target network element according to the enabling state of at least one function of the target network element, which will not be described again here.
步骤102,计算机设备根据第一运行模式确定目标网元的目标资源的资源规格,资源 规格指示目标资源在目标网元中的最大存储量。Step 102: The computer device determines the resource specification of the target resource of the target network element according to the first operating mode. The specification indicates the maximum storage amount of the target resource in the target network element.
计算机设备可以通过多种方式以根据第一运行模式确定目标网元的目标资源的资源规格。以下以方式一和方式二为例进行说明。The computer device may determine the resource specification of the target resource of the target network element according to the first operating mode through various methods. The following takes Method 1 and Method 2 as examples for explanation.
方式一,计算机设备根据第一运行模式,以及网络中运行模式为第一运行模式的多个网络设备的资源使用量和内存占用率确定目标网元的目标资源的资源规格。例如,计算机设备获取网络中运行模式为第一运行模式的多个网络设备的样本,每个样本包括一个网络设备的资源使用量和内存占用率。计算机设备对该多个样本进行聚类分析以获得资源使用量和内存占用率的典型区域(聚类簇),再取聚类簇的类心附近的k个样本作为该典型区域的典型样本,之后再基于典型样本进行拟合分析(例如,神经网络拟合)。拟合的输入为内存占用率,输出为各资源的使用量。由此,计算机设备可获得内存占用率与各资源使用量之间的映射关系。根据该映射关系,计算机设备可获取当内存占用率为某个阈值(例如,80%)时,各资源使用量的一个近似值,根据各资源使用量的近似值确定该运行模式下的各资源的资源规格,例如,将各资源使用量的近似值作为该运行模式下各资源的资源规格。计算机设备可以获取网络中大量网络设备的资源使用量及内存占用率,再按运行模式对该多个网络设备进行分类,以获取多种运行模式的多个样本,再基于上述方法获取每种运行模式下各资源的资源规格。可以理解的是,上述多个网络设备和目标网元的设备类型相同,或者,上述多个网络设备的转发芯片的类型和目标网元的转发芯片的类型相同且上述多个网络设备的内存大小和目标网元的内存大小相同。可以理解的是,上述确定运行模式下的资源的资源规格的过程也可以由其他设备执行,例如,服务器执行上述过程以获取与目标网元同类型的网络设备在第一运行模式的目标资源的资源规格,并发送目标资源的资源规格给计算机设备。Method 1: The computer device determines the resource specifications of the target resources of the target network element based on the first operating mode and the resource usage and memory occupancy of multiple network devices in the network whose operating modes are the first operating mode. For example, the computer device obtains samples of multiple network devices in the network whose operating mode is the first operating mode, and each sample includes resource usage and memory usage of one network device. The computer equipment performs cluster analysis on the multiple samples to obtain typical areas (clustering clusters) of resource usage and memory usage, and then takes k samples near the center of the cluster as typical samples of the typical area. Then perform fitting analysis (for example, neural network fitting) based on typical samples. The input of the fitting is the memory usage, and the output is the usage of each resource. Thus, the computer device can obtain the mapping relationship between the memory usage and the usage of each resource. According to the mapping relationship, the computer device can obtain an approximate value of each resource usage when the memory occupancy rate is a certain threshold (for example, 80%), and determine the resources of each resource in the operating mode based on the approximate value of each resource usage. Specifications, for example, use the approximate value of each resource usage as the resource specification of each resource in this operating mode. The computer device can obtain the resource usage and memory usage of a large number of network devices in the network, and then classify the multiple network devices according to the operating mode to obtain multiple samples of multiple operating modes, and then obtain each operating mode based on the above method. Resource specifications of each resource in the mode. It can be understood that the device types of the multiple network devices and the target network element are the same, or the types of forwarding chips of the multiple network devices and the forwarding chips of the target network element are the same and the memory sizes of the multiple network devices are the same. The same as the memory size of the target network element. It can be understood that the above process of determining resource specifications of resources in the operating mode can also be performed by other devices. For example, the server performs the above process to obtain the target resource of the network device of the same type as the target network element in the first operating mode. resource specification, and sends the resource specification of the target resource to the computer device.
方式二,计算机设备根据运行模式和资源规格的对应关系以及第一运行模式,确定目标网元的目标资源的资源规格。可选地,该对应关系可以是预配置的。例如,服务器根据方式一获取与目标网元同类型的网络设备在多种运行模式下的各种资源的资源规格,并发送运行模式、设备类型和各资源的资源规格的对应关系给计算机设备,以配置运行模式和资源规格的对应关系。可选地,该对应关系可以是通过对运行模式关联的多种资源进行迭代存储测试确定的。该迭代测试过程可以包括如下步骤:Method 2: The computer device determines the resource specifications of the target resources of the target network element based on the corresponding relationship between the operating mode and the resource specification and the first operating mode. Optionally, the correspondence may be preconfigured. For example, the server obtains the resource specifications of various resources of network equipment of the same type as the target network element in multiple operating modes according to method 1, and sends the corresponding relationship between the operating mode, device type, and resource specifications of each resource to the computer device. To configure the corresponding relationship between the operating mode and resource specifications. Optionally, the corresponding relationship may be determined through iterative storage testing of multiple resources associated with the running mode. This iterative testing process can include the following steps:
步骤1,计算机设备根据第一运行模式指示的目标网元至少一种功能的使能状态确定该目标网元涉及的至少一种表项资源。例如,第一运行模式指示目标网元使能了IPv4和组播功能,则计算机设备确定该目标网元涉及IPv4路由表、组播路由表(例如,SG表),以及其他相关的表项资源,例如,MAC表、ARP表。Step 1: The computer device determines at least one entry resource related to the target network element according to the enabling state of at least one function of the target network element indicated by the first operating mode. For example, the first operating mode indicates that the target network element has enabled IPv4 and multicast functions, then the computer device determines that the target network element involves an IPv4 routing table, a multicast routing table (for example, an SG table), and other related table entry resources. , for example, MAC table, ARP table.
步骤2,计算机设备为每个表项资源确定初始资源规格。初始资源规格可以是预设的。例如,ARP表:100,MAC表:300,IPv4路由表:1000,组播路由表:100。初始资源规格也可以是计算机设备通过方式一确定的。Step 2: The computer device determines the initial resource specification for each entry resource. Initial resource specifications can be preset. For example, ARP table: 100, MAC table: 300, IPv4 routing table: 1000, multicast routing table: 100. The initial resource specification may also be determined by the computer device through method one.
步骤3,计算机设备逐步在目标网元(或设备类型与目标网元相同的其他设备)上配置上述表项,直至满足第一条件或第二条件。针对一个表项资源,配置表项表示在目标网元上配置该资源的一个表项,例如,配置一个IPv4路由,配置一个组播路由,配置一个ARP表项,配置一个MAC表项。当接收到一个表项的配置指令时,目标网元存储该表项,例如,存储ARP表项中的IP地址、MAC地址,以及IP地址和MAC地址间的对应关系。 第一条件包括如下任一项:各个表项资源的实际配置量已达到初始资源规格(或调整后的初始资源规格)且目标网元的内存占用率小于等于(或小于)第一阈值、某一表项资源配置失败、表项资源配置失败的次数大于第二阈值、目标网元的内存占用率大于第三阈值。第二条件包括:各个表项资源的实际配置量已达到初始资源规格(或调整后的初始资源规格)且目标网元的内存占用率大于(或大于等于)第一阈值且小于(或小于等于)第三阈值。当满足第二条件时,计算机设备将各表项资源的初始资源规格(或调整后的初始资源规格)确定为第一运行模式对应的资源规格,不再执行后续步骤。当满足第一条件时,计算机设备继续执行后续步骤,以调整各表项资源的初始资源规格并再次进行测试。Step 3: The computer device gradually configures the above table entries on the target network element (or other devices of the same device type as the target network element) until the first condition or the second condition is met. For a table entry resource, configuring a table entry means configuring an entry for the resource on the target network element. For example, configuring an IPv4 route, configuring a multicast route, configuring an ARP entry, and configuring a MAC entry. When receiving a configuration instruction for an entry, the target network element stores the entry, for example, stores the IP address, MAC address in the ARP entry, and the correspondence between the IP address and the MAC address. The first condition includes any of the following: the actual configuration amount of each entry resource has reached the initial resource specification (or the adjusted initial resource specification) and the memory usage of the target network element is less than or equal to (or less than) the first threshold, a certain One table entry resource configuration fails, the number of table entry resource configuration failures is greater than the second threshold, and the memory usage of the target network element is greater than the third threshold. The second condition includes: the actual configuration amount of each entry resource has reached the initial resource specification (or the adjusted initial resource specification) and the memory usage of the target network element is greater than (or greater than or equal to) the first threshold and less than (or less than or equal to) ) third threshold. When the second condition is met, the computer device determines the initial resource specification (or the adjusted initial resource specification) of each entry resource as the resource specification corresponding to the first operating mode, and does not perform subsequent steps. When the first condition is met, the computer device continues to perform subsequent steps to adjust the initial resource specifications of each table item resource and perform testing again.
步骤4,当满足第一条件时,计算机设备调整各表项资源的初始资源规格。例如,若各个表项资源的实际配置量已达到初始资源规格且目标网元的内存占用率小于等于(或小于)第一阈值,则上调初始资源规格。又例如,若某一表项资源配置失败,或者表项资源配置失败的次数大于第二阈值,或者目标网元的内存占用率大于第三阈值,则下调初始资源规格。例如,按照一个比例(例如,5%)上调/下调表项资源的初始资源规格,或者,按照确切的数值(例如,5)上调/下调表项资源的初始资源规格。上调/下调表项资源的初始资源规格可以是上调/下调各表项资源的初始资源规格,也可以是上调/下调某一表项资源的初始资源规格,例如,仅下调存在配置失败的表项资源的初始资源规格。Step 4: When the first condition is met, the computer device adjusts the initial resource specifications of each entry resource. For example, if the actual configuration amount of each entry resource has reached the initial resource specification and the memory usage of the target network element is less than or equal to (or less than) the first threshold, the initial resource specification is increased. For another example, if a certain table entry resource configuration fails, or the number of table entry resource configuration failures is greater than the second threshold, or the memory usage of the target network element is greater than the third threshold, the initial resource specifications are lowered. For example, the initial resource specification of the entry resource is adjusted up/down according to a ratio (for example, 5%), or the initial resource specification of the entry resource is adjusted up/down according to an exact value (for example, 5). Up-adjusting/down-adjusting the initial resource specifications of table item resources can be to adjust up/down the initial resource specifications of each table item resource, or it can also be to adjust up/down the initial resource specifications of a certain table item resource. For example, only down-adjust table items with configuration failures. The resource's initial resource specification.
步骤5,基于调整后的初始资源规格,继续迭代执行步骤3,直至满足第二条件。Step 5: Based on the adjusted initial resource specifications, continue to iteratively execute Step 3 until the second condition is met.
可以理解的是,上述测试过程可以是预先进行的,例如,再部署目标网元之前对目标网元进行测试,或者再部署目标网元之后对目标网元同类型的网络设备进行测试。It can be understood that the above testing process can be performed in advance, for example, the target network element is tested before the target network element is deployed, or the same type of network equipment of the target network element is tested after the target network element is deployed.
可选地,目标网元的目标资源的资源规格用于计算目标资源的资源利用率。Optionally, the resource specification of the target resource of the target network element is used to calculate the resource utilization of the target resource.
可选地,目标资源的资源利用率用于评估目标网元是否存在容量风险。Optionally, the resource utilization of the target resource is used to evaluate whether the target network element has capacity risks.
综上所述,本申请实施例基于目标网元的运行模式确定目标网元中资源的资源规格。目标网元的运行模式指示目标网元的至少一种功能的使能状态。使能不同功能的网络设备可能会存储不同种类的资源。本申请实施例基于目标网元的运行模式,考虑不同运行模式中每种运行模式对应的多种资源在目标网元内的共同存储情况,从而为多种资源中的每种资源分别确定资源规格,使得确定出的资源规格更接近资源在目标网元中的实际规格,进而使得基于该资源规格计算的资源利用率更准确,可以尽量避免漏报网络设备的容量风险的问题。To sum up, the embodiment of the present application determines the resource specifications of the resources in the target network element based on the operating mode of the target network element. The operating mode of the target network element indicates the enabling state of at least one function of the target network element. Network devices that enable different functions may store different types of resources. Based on the operating mode of the target network element, the embodiment of the present application considers the common storage situation of multiple resources corresponding to each operating mode in the different operating modes in the target network element, thereby determining resource specifications for each of the multiple resources. , making the determined resource specifications closer to the actual specifications of the resources in the target network element, thereby making the resource utilization calculated based on the resource specifications more accurate, and minimizing the problem of underreporting the capacity risk of network equipment.
请参考图2,其示出了本申请实施例提供的另一种资源规格的确定方法的流程示意图。该方法包括步骤201和203。Please refer to FIG. 2 , which shows a schematic flowchart of another method for determining resource specifications provided by an embodiment of the present application. The method includes steps 201 and 203.
步骤201,计算机设备获取目标网元的运行特征。Step 201: The computer device obtains the operating characteristics of the target network element.
可选地,计算机设备根据目标网元的至少一种功能的使能状态获取目标网元的运行特征。可选地,计算机设备获取目标网元的配置信息,根据目标网元的配置信息确定目标网元的至少一种功能的使能状态,从而获取目标网元的运行特征。例如,计算机设备获取目标网元的配置文件以获取配置信息。配置文件例如为目标网元的接口配置文件、功能配置文件等。接口配置文件包括每个接口配置的地址类型,例如,IPv4地址和/或IPv6地址。功能配置文件包括目标网元的功能的使能状态,例如,目标网元是否使能了组播功能、微分段功能,虚拟专用网(virtual private network,VPN)功能等。 Optionally, the computer device acquires the operating characteristics of the target network element according to the enabling state of at least one function of the target network element. Optionally, the computer device obtains the configuration information of the target network element, and determines the enabling state of at least one function of the target network element based on the configuration information of the target network element, thereby obtaining the operating characteristics of the target network element. For example, the computer device obtains the configuration file of the target network element to obtain the configuration information. The configuration file is, for example, the interface configuration file, function configuration file, etc. of the target network element. The interface configuration file includes the address type configured for each interface, for example, IPv4 address and/or IPv6 address. The function configuration file includes the enabling status of the target network element's functions, for example, whether the target network element has the multicast function, micro-segmentation function, virtual private network (VPN) function, etc. enabled.
可选地,运行特征包括以下至少一项运行子特征:目标网元使能的协议栈类型,目标网元的业务功能的使能状态。业务功能例如为组播功能、微分段功能,VPN功能等。Optionally, the operating characteristics include at least one of the following operating sub-characteristics: the protocol stack type enabled by the target network element, and the enabling status of the service function of the target network element. Business functions include multicast function, micro-segmentation function, VPN function, etc.
计算机设备根据接口配置文件确定目标网元使能的协议栈类型。例如,当接口配置文件中仅存在配置了第一协议类型地址的接口时,确定目标网元使能的协议栈类型为第一协议;当接口配置文件中仅存在配置了第二协议类型地址的接口时,确定目标网元使能的协议栈类型为第二协议;当接口配置文件中既存在配置了第一协议类型地址的接口,也存在配置了第二协议类型地址的接口时,确定目标网元使能的协议栈类型为第一协议和第二协议,即,双栈模式。例如,第一协议为IPv4,第二协议为IPv6。The computer device determines the protocol stack type enabled by the target network element according to the interface configuration file. For example, when there are only interfaces configured with addresses of the first protocol type in the interface configuration file, determine that the protocol stack type enabled on the target network element is the first protocol; when there are only interfaces configured with addresses of the second protocol type in the interface configuration file. interface, determine that the protocol stack type enabled on the target network element is the second protocol; when there are both interfaces configured with the first protocol type address and interfaces configured with the second protocol type address in the interface configuration file, determine the target The protocol stack types enabled by the network element are the first protocol and the second protocol, that is, dual stack mode. For example, the first protocol is IPv4 and the second protocol is IPv6.
计算机设备根据功能配置文件确定目标网元的业务功能的使能状态。功能配置文件可以为一个配置文件。例如,一个配置文件中列出了目标网元使能的所有业务功能,例如,该配置文件包括目标网元使能的业务功能的名称。计算机设备将该配置文件中的所有业务功能的使能状态确定为使能(是),将不在该配置文件中的其他业务功能的使能状态确定为未使能(否)。又例如,该配置文件列出了目标网元支持的所有业务功能,并明确的标识了目标网元使能的业务功能和没有使能的业务功能,例如,该配置文件列出了目标网元支持的所有的业务功能的名称,以及与每个业务功能的名称对应的取值,取值为第一值指示目标网元使能了与该取值对应的业务功能,取值为第二值指示目标网元未使能与该取值对应的业务功能。第一值例如为1,第二值例如为0。计算机设备将该配置文件中的取值为第一值的业务功能的使能状态确定为使能(是),将该配置文件中的取值为第二值的业务功能的使能状态确定为未使能(否)。功能配置文件也可以包括多个配置文件,每个配置文件与目标网元使能的一个业务功能对应。The computer device determines the enabling status of the service function of the target network element according to the function configuration file. The function configuration file can be a configuration file. For example, a configuration file lists all the service functions enabled by the target network element. For example, the configuration file includes the names of the service functions enabled by the target network element. The computer device determines the enabling status of all business functions in the configuration file as enabled (yes), and determines the enabling status of other business functions not in the configuration file as not enabled (no). For another example, the configuration file lists all the service functions supported by the target network element, and clearly identifies the service functions enabled and unenabled by the target network element. For example, the configuration file lists the service functions supported by the target network element. The names of all supported business functions, and the value corresponding to the name of each business function. The first value indicates that the target network element has enabled the service function corresponding to the value. The second value Indicates that the service function corresponding to this value is not enabled on the target network element. The first value is, for example, 1, and the second value is, for example, 0. The computer device determines the enabling state of the business function whose value is the first value in the configuration file as enabled (yes), and determines the enabling state of the business function whose value is the second value in the configuration file as Not enabled (No). The function configuration file may also include multiple configuration files, and each configuration file corresponds to a service function enabled by the target network element.
以业务功能包括组播功能和微分段功能为例,在一个示意性的例子中,目标网元的所有接口均仅配置了IPv4地址,且该目标网元未使能组播功能和微分段功能,则提取的运行特征即目标网元使能的协议栈类型、目标网元的组播功能的使能情况、目标网元的微分段功能的使能情况,分别为:IPv4单栈、否、否。Taking the service functions including multicast function and micro-segmentation function as an example, in an illustrative example, all interfaces of the target network element are configured with only IPv4 addresses, and the multicast function and micro-segmentation function are not enabled on the target network element. , then the extracted operating characteristics are the protocol stack type enabled by the target network element, the enabling status of the multicast function of the target network element, and the enabling status of the micro-segmentation function of the target network element, respectively: IPv4 single stack, No, no.
步骤202,计算机设备根据目标网元的运行特征确定目标网元的第一运行模式。Step 202: The computer device determines the first operating mode of the target network element according to the operating characteristics of the target network element.
可选地,计算机设备根据运行特征和运行模式的对应关系,将与目标网元的运行特征匹配的运行特征对应的运行模式确定为目标网元的第一运行模式。Optionally, the computer device determines the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode of the target network element based on the corresponding relationship between the operating feature and the operating mode.
可选地,计算机设备获取第一映射表,并根据第一映射表,将与目标网元的运行特征匹配的运行特征对应的运行模式确定为第一运行模式。第一映射表指示运行特征和运行模式的对应关系,第一映射表包括多个第一表项,每个第一表项指示运行特征与运行模式之间的对应关系。Optionally, the computer device obtains the first mapping table, and determines, according to the first mapping table, the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode. The first mapping table indicates the corresponding relationship between the operating characteristics and the operating mode. The first mapping table includes a plurality of first entries, and each first entry indicates the corresponding relationship between the operating characteristics and the operating mode.
可选地,每条第一表项中的运行特征包括至少一项子特征以及与该至少一项子特征对应的运行模式。示意性的,子特征例如为:网络设备使能的协议类型或或网络设备的业务功能的使能状态。Optionally, the operating characteristics in each first entry include at least one sub-feature and an operating mode corresponding to the at least one sub-feature. Illustratively, the sub-characteristics are, for example: the protocol type enabled by the network device or the enabling status of the service function of the network device.
可选地,运行模式的总数量与目标网元支持的功能的数量相关,计算机设备可以根据目标网元支持的功能的组合确定目标网元可以执行的多种运行模式,以获取第一映射表。例如,若目标网元支持IPv4协议、IPv6协议、组播业务和微分段业务,则运行模式可以包括:IPv4单栈模式、IPv6单栈模式、IPv4单栈和组播模式、IPv4单栈和微分段模式、IPv6单栈和组播模式、IPv6单栈和微分段模式、双栈模式、双栈和组播模式、双栈和微分段模 式、IPv4单栈和组播微分段模式、IPv6和组播微分段模式,双栈和组播微分段模式。Optionally, the total number of operating modes is related to the number of functions supported by the target network element. The computer device can determine multiple operating modes that the target network element can execute according to the combination of functions supported by the target network element to obtain the first mapping table. . For example, if the target network element supports IPv4 protocol, IPv6 protocol, multicast service and micro-segmentation service, the operating modes may include: IPv4 single stack mode, IPv6 single stack mode, IPv4 single stack and multicast mode, IPv4 single stack and differential Segment mode, IPv6 single stack and multicast mode, IPv6 single stack and micro-segmentation mode, dual stack mode, dual stack and multicast mode, dual stack and micro-segmentation mode mode, IPv4 single stack and multicast micro-segmentation mode, IPv6 and multicast micro-segmentation mode, dual stack and multicast micro-segmentation mode.
表1给出了一种第一映射表的示意图。可以理解的是,表1没有穷举所有运行模式,而是仅以几个运行模式的例子示意性的说明第一映射表。Table 1 gives a schematic diagram of a first mapping table. It can be understood that Table 1 does not exhaust all operating modes, but only schematically illustrates the first mapping table with examples of several operating modes.
表1
Table 1
可选地,第一映射表中的运行特征还可以包括网络设备的第一资源的资源规格和网络设备的第二资源的资源规格的比例。例如,第一资源为IPv4路由表(即,FIBv4表),第二资源为IPv6路由表(即,FIBv6表),则运行特征还可以包括FIBv4表的资源规格与IPv6路由表的资源规格的比例。又例如,第一资源为VRF实例表,第二资源为二层子接口表,则运行特征还可以包括VRF实例表的资源规格与二层子接口表的资源规格的比例。Optionally, the operating characteristics in the first mapping table may also include a ratio of resource specifications of the first resource of the network device and resource specifications of the second resource of the network device. For example, if the first resource is an IPv4 routing table (i.e., FIBv4 table), and the second resource is an IPv6 routing table (i.e., FIBv6 table), the operating characteristics may also include the ratio of the resource specifications of the FIBv4 table to the resource specifications of the IPv6 routing table. . For another example, if the first resource is a VRF instance table and the second resource is a Layer 2 sub-interface table, the operation characteristics may also include the ratio of the resource specifications of the VRF instance table to the resource specifications of the Layer 2 sub-interface table.
当目标网元中不存在第一资源或第二资源时,该比例为空(或,NULL)。例如,当目标网元既使能IPv4又使能IPv6时,计算机设备还可以获取目标网元中的已配置的IPv4的路由表项的数量和目标网元中的已配置的IPv6的路由表项的数量,并将二者的比值作为目标网元中第一资源的使用量与第二资源的使用量的比例。When the first resource or the second resource does not exist in the target network element, the ratio is empty (or NULL). For example, when the target network element enables both IPv4 and IPv6, the computer device can also obtain the number of configured IPv4 routing table entries in the target network element and the configured IPv6 routing table entries in the target network element. quantity, and the ratio between the two is regarded as the ratio of the usage of the first resource to the usage of the second resource in the target network element.
示例性地,表2示出了另一种第一映射表的示意图。根据FIBv4表的使用量与IPv6路由表的使用量的比例将双栈模式细分为双栈模式1和双栈模式2。可以理解的是,表2没有穷举所有运行模式,而是仅以几个运行模式的例子示意性的说明第一映射表。By way of example, Table 2 shows a schematic diagram of another first mapping table. The dual-stack mode is subdivided into dual-stack mode 1 and dual-stack mode 2 based on the ratio of the usage of the FIBv4 table to the usage of the IPv6 routing table. It can be understood that Table 2 does not exhaust all operating modes, but only schematically illustrates the first mapping table with examples of several operating modes.
表2
Table 2
示例性地,表3示出了另一种第一映射表的示意图。该表中,根据VRF实例表的使用量和二层子接口表的使用量将IPv4单栈模式细分为IPv4单栈模式1和IPv4单栈模式2。可以理解的是,表1没有穷举所有运行模式,而是仅以几个运行模式的例子示意性的说明第一映射表。Exemplarily, Table 3 shows a schematic diagram of another first mapping table. In this table, the IPv4 single-stack mode is subdivided into IPv4 single-stack mode 1 and IPv4 single-stack mode 2 based on the usage of the VRF instance table and the usage of the Layer 2 sub-interface table. It can be understood that Table 1 does not exhaust all operating modes, but only schematically illustrates the first mapping table with examples of several operating modes.
表3
table 3
可选地,目标网元的运行特征包括多个运行子特征,计算机设备根据第一映射表,确定匹配的第一表项,并将该匹配的第一表项中的运行模式确定为第一运行模式,匹配的第一表项包括的多个子特征与多个运行子特征均匹配。示意性的,计算机设备以多个运行子特征作为关键字,在第一映射表中查询各个第一表项,若查询到与某个第一表项包括的多个子特征与多个运行子特征均匹配,则将该第一表项包括的运行模式确定为第一运行模式。Optionally, the operating characteristics of the target network element include multiple operating sub-characteristics. The computer device determines the matching first entry according to the first mapping table, and determines the operating mode in the matching first entry as the first In the running mode, the multiple sub-features included in the matched first entry all match the multiple running sub-features. Illustratively, the computer device uses multiple operating sub-features as keywords to query each first entry in the first mapping table. If multiple sub-features and multiple operating sub-features included in a certain first entry are queried, If all match, the operating mode included in the first entry is determined as the first operating mode.
可选地,当不存在匹配的第一表项时,计算机设备确定多个第一表项分别对应的匹配分数,并根据多个第一表项分别对应的匹配分数,确定第一运行模式。其中,任一第一表项的匹配分数指示多个运行子特征与该任一第一表项包括的多个子特征之间的匹配程度。Optionally, when there is no matching first entry, the computer device determines the matching scores corresponding to the plurality of first entries, and determines the first operating mode based on the matching scores corresponding to the plurality of first entries. The matching score of any first entry indicates the matching degree between the plurality of operating sub-features and the plurality of sub-features included in the any first entry.
示意性的,每个第一表项对应的匹配分数为该第一表项包括的多个子特征的匹配分数的加权值。例如,计算机设备可以为“使能的协议类型”这一子特征设置更高的权重(例如,0.8),而为其他子特征设置更低的权重(例如,0.2),当运行模式的一个子特征和目标网元中的对应的第一子特征匹配时,设置该子特征的匹配分数为1,否则设置该子特征的匹配分数为0,计算机设备基于每个子特征的匹配分数和权重求和以获取该第一表项的匹配分数。Illustratively, the matching score corresponding to each first entry is a weighted value of the matching scores of multiple sub-features included in the first entry. For example, a computer device may set a higher weight (e.g., 0.8) for the sub-characteristic "enabled protocol type" and lower weights (e.g., 0.2) for other sub-characteristics. When a sub-characteristic of the operating mode When the feature matches the corresponding first sub-feature in the target network element, the matching score of the sub-feature is set to 1, otherwise the matching score of the sub-feature is set to 0, and the computer device calculates the sum based on the matching score and weight of each sub-feature. To obtain the matching score of the first table entry.
子特征和运行子特征匹配可以是子特征的取值与运行子特征的取值完全相同。可选地,当运行子特征为数值特征(例如,IPv4协议路由数与IPv6协议路由数的比例)时,子特征和第一子特征匹配也可以是子特征的值与运行子特征的值差值小于阈值,或者是运行子特征的近似值与子特征的值完全相同。运行子特征的近似值例如为运行子特征的数值修约值。数值修约例如为四舍五入、五舍六入、向上取整、向下取整等。The matching of sub-features and running sub-features can be that the value of the sub-feature is exactly the same as the value of the running sub-feature. Optionally, when the running sub-feature is a numerical feature (for example, the ratio of the number of IPv4 protocol routes to the number of IPv6 protocol routes), the match between the sub-feature and the first sub-feature can also be the difference between the value of the sub-feature and the value of the running sub-feature. The value is less than the threshold, or the approximate value of the running subfeature is exactly the same as the value of the subfeature. The approximate value of the operating sub-characteristic is, for example, the numerical rounding value of the operating sub-characteristic. Numerical rounding includes, for example, rounding, rounding up, rounding down, etc.
可选地,计算机设备根据多个第一表项分别对应的匹配分数,确定第一运行模式,包括:当匹配分数最高的第一表项仅为一个第一表项时,将该第一表项包括的运行模式确定为第一运行模式;当匹配分数最高的第一表项包括多个第一表项时,将该多个第一表项包括的运行模式作为候选模式,根据第一策略确定目标资源使用量与每个候选运行模式之间的匹配程度,将匹配程度最高的候选运行模式确定为第一运行模式。例如,第一策略可以 为宽松策略,此时,当目标资源使用量与候选运行模式对应的资源规格越远离(或,接近程度低)时,则该候选运行模式的匹配程度越高。又例如,第一策略可以为严厉策略,此时,当目标资源使用量与候选运行模式对应的资源规格越接近(或,接近程度高)时,则该候选运行模式的匹配程度越高。可选地,目标资源使用量可以是计算机设备最近一次获取到的目标网元的目标资源使用量,也可以是是基于历史的目标资源的使用量预测得到的目标资源使用量。历史的目标资源使用量为第一时间段内目标网元中的目标资源的实际使用量。第一时间段早于确定第一运行模式的时间。Optionally, the computer device determines the first operating mode based on the matching scores respectively corresponding to the multiple first entries, including: when the first entry with the highest matching score is only one first entry, converting the first entry to The operating mode included in the entry is determined as the first operating mode; when the first entry with the highest matching score includes multiple first entries, the operating mode included in the multiple first entries is used as a candidate mode, and according to the first strategy The matching degree between the target resource usage and each candidate operating mode is determined, and the candidate operating mode with the highest matching degree is determined as the first operating mode. For example, the first strategy can It is a loose strategy. At this time, when the target resource usage is further away from (or closer to) the resource specification corresponding to the candidate operating mode, the higher the matching degree of the candidate operating mode. For another example, the first policy may be a strict policy. In this case, when the target resource usage is closer to the resource specification corresponding to the candidate operating mode (or the degree of closeness is higher), the higher the matching degree of the candidate operating mode. Optionally, the target resource usage may be the target resource usage of the target network element most recently obtained by the computer device, or may be the target resource usage predicted based on historical target resource usage. The historical target resource usage is the actual usage of the target resource in the target network element in the first time period. The first time period is earlier than the time at which the first operating mode is determined.
可选地,计算机设备根据目标资源的使用量和候选运行模式中的目标资源的资源规格之间的距离,确定目标资源使用量与候选运行模式中的目标资源的资源规格的接近程度。距离计算公式例如为d=min1→k((yk-xk)/yk),其中,k表示目标资源包括的表项资源的个数,yk表示一个候选运行模式中的第k个表项资源的资源规格,xk表示目标资源中的第k个表项资源的资源使用量,d表示目标资源的使用量与该候选运行模式中的目标资源的资源规格之间的距离。计算机设备可以分别计算每个候选运行模式中的资源规格与目标资源的资源使用量之间的距离,距离越大指示接近程度越低,距离越小指示接近程度越高。Optionally, the computer device determines how close the target resource usage is to the resource specification of the target resource in the candidate operating mode based on the distance between the target resource usage and the resource specification of the target resource in the candidate operating mode. The distance calculation formula is, for example, d=min 1→k ((y k -x k )/y k ), where k represents the number of entry resources included in the target resource, and y k represents the k-th entry resource in a candidate operating mode. The resource specification of the entry resource, x k represents the resource usage of the k-th entry resource in the target resource, and d represents the distance between the usage of the target resource and the resource specification of the target resource in the candidate operating mode. The computer device may separately calculate the distance between the resource specifications in each candidate operating mode and the resource usage of the target resource, with a larger distance indicating a lower degree of proximity, and a smaller distance indicating a higher degree of proximity.
例如,若目标网元的目标资源的资源使用量如表4所示,2个候选模式的资源规格如表5所示,则基于上述距离计算公式可以计算出两个候选运行模式的距离值分别为-1.25,0.1,若策略为宽松策略,则确定目标网元的第一运行模式为距离值较大的IPv4单栈模式2,若策略为严厉策略,则确定目标网元的第一运行模式为距离值较小的IPv4单栈模式1。For example, if the resource usage of the target network element's target resources is as shown in Table 4, and the resource specifications of the two candidate modes are as shown in Table 5, then the distance values of the two candidate operating modes can be calculated based on the above distance calculation formula. is -1.25,0.1. If the policy is a loose policy, determine the first operating mode of the target network element to be IPv4 single-stack mode 2 with a larger distance value. If the policy is a strict policy, determine the first operating mode of the target network element. It is IPv4 single stack mode 1 with a small distance value.
表4
Table 4
表5
table 5
步骤203,计算机设备根据目标网元的第一运行模式,确定目标资源的资源规格。Step 203: The computer device determines the resource specifications of the target resource according to the first operating mode of the target network element.
可选地,计算机设备根据第一运行模式,以及网络中运行模式为第一运行模式的多个网络设备的资源使用量和内存占用率确定目标网元的目标资源的资源规格。关于该方法的具体实现过程,请参考步骤102中关于方式一的描述,此处不再赘述。Optionally, the computer device determines the resource specifications of the target resources of the target network element based on the first operating mode and the resource usage and memory usage of multiple network devices in the network whose operating modes are the first operating mode. For the specific implementation process of this method, please refer to the description of method 1 in step 102, which will not be described again here.
可选地,计算机设备根据运行模式和资源规格的对应关系,确定与第一运行模式对应的目标网元的目标资源的资源规格。关于运行模式和资源规格的对应关系的获取方式,请参考步骤102中关于方式二的描述,此处不再赘述。 Optionally, the computer device determines the resource specification of the target resource of the target network element corresponding to the first operating mode according to the corresponding relationship between the operating mode and the resource specification. For how to obtain the corresponding relationship between the operating mode and the resource specification, please refer to the description of method 2 in step 102, which will not be described again here.
可选地,计算机设备根据运行模式和资源规格的对应关系,确定与第一运行模式对应的目标网元的目标资源的资源规格,包括:计算机设备获取第二映射表,第二映射表包括多个第二表项,每个第二表项指示网元信息、运行模式与资源规格之间的对应关系,网元信息包括设备类型;计算机设备确定匹配的第二表项,将匹配的第二表项包括的目标资源的资源规格确定为目标网元的目标资源的资源规格,匹配的第二表项包括的网元信息和运行模式分别与目标网元的网元信息、第一运行模式匹配。设备类型例如为网络设备的型号。设备类型还可以包括网络设备的版本标识。Optionally, the computer device determines the resource specifications of the target resources of the target network element corresponding to the first operating mode according to the corresponding relationship between the operating mode and the resource specification, including: the computer device obtains a second mapping table, and the second mapping table includes a plurality of Second table items, each second table item indicates the correspondence between network element information, operating mode and resource specifications. The network element information includes device type; the computer device determines the matching second table item and adds the matching second table item. The resource specification of the target resource included in the table entry is determined to be the resource specification of the target resource of the target network element. The network element information and operating mode included in the matching second table entry respectively match the network element information and the first operating mode of the target network element. . The device type is, for example, the model of the network device. The device type can also include the version identification of the network device.
表6示出了一种第二映射表的示意图。表6示例性地示出了五种运行模式和各个运行模式下不同类型的网元对应的资源规格。第一类网元不同于第二类网元。第一类网元与第二类网元的设备型号不同,例如,第一类网元的是很型号为M1,第二类网元的设备型号为M2。或者,第一类网元和第二类网元的版本标识不同,例如,第一类网元和第二类网元的设备型号均为M3,但第一类网元的版本标识为v1,第二类网元的版本标识为v2。可以理解的是,表6没有穷举所有运行模式的资源规格,而是仅以几个运行模式为例示意性的说明第一映射表。关于运行模式的总数量以及每种运行模式对应的目标资源的资源规格的获取方法请参考步骤102和步骤202的描述,此处不再赘述。Table 6 shows a schematic diagram of a second mapping table. Table 6 exemplarily shows five operating modes and resource specifications corresponding to different types of network elements in each operating mode. The first type of network elements is different from the second type of network elements. The equipment models of the first type network element and the second type network element are different. For example, the equipment model of the first type network element is M1, and the equipment model of the second type network element is M2. Or, the version identifiers of the first type network element and the second type network element are different. For example, the equipment models of the first type network element and the second type network element are both M3, but the version identifier of the first type network element is v1. The version identifier of the second type of network element is v2. It can be understood that Table 6 does not exhaustively list the resource specifications of all operating modes, but only uses several operating modes as examples to schematically illustrate the first mapping table. For the method of obtaining the total number of operating modes and the resource specifications of the target resources corresponding to each operating mode, please refer to the descriptions of step 102 and step 202, which will not be described again here.
每种运行模式对应的目标资源的种类与该运行模式关联的功能相关。例如,运行模式为IPv4单栈模式的网络设备使能了IPv4协议栈,该运行模式对应的目标资源可以包括与IPv4协议相关的IPv4路由表(FIBv4表),以及支持基本的数据转发所需的ARP表,逻辑接口表,VRF实例表。例如,若运行模式为IPv4和IPv6双栈模式,该运行模式对应的目标资源还可以包括与IPv6协议相关的ND表和IPv6路由表(FIBv6表)。例如,若运行模式为IPv4单栈和组播模式,该运行模式对应的目标资源还可以包括与组播功能相关的SG表。计算机设备还可以根据配置获取每种运行模式关联的目标资源的资源项,例如,该配置指示用户更关心的资源。计算机设备可以再根据步骤102或步骤202中描述的技术方案获取每种运行模式关联的每种资源项的资源规格。表6中示出的每种运行模式对应的目标资源包括的资源项也仅为示例说明,The type of target resource corresponding to each operating mode is related to the function associated with the operating mode. For example, if a network device whose operating mode is IPv4 single-stack mode has the IPv4 protocol stack enabled, the target resources corresponding to this operating mode may include the IPv4 routing table (FIBv4 table) related to the IPv4 protocol, as well as the IPv4 routing table required to support basic data forwarding. ARP table, logical interface table, VRF instance table. For example, if the operating mode is IPv4 and IPv6 dual-stack mode, the target resources corresponding to the operating mode may also include an ND table and an IPv6 routing table (FIBv6 table) related to the IPv6 protocol. For example, if the operating mode is IPv4 single stack and multicast mode, the target resource corresponding to the operating mode may also include an SG table related to the multicast function. The computer device may also obtain resource items of target resources associated with each operating mode according to the configuration, for example, the configuration indicates the resources that the user is more concerned about. The computer device can then obtain the resource specifications of each resource item associated with each operating mode according to the technical solution described in step 102 or step 202. The resource items included in the target resources corresponding to each operating mode shown in Table 6 are only examples.
表6

Table 6

综上所述,本申请实施例中,计算机设备基于目标网元的配置信息,提取目标网元的运行特征,再基于目标网元的运行特征确定目标网元的运行模式,这使得确定出的运行模式更匹配目标网元的实际配置。之后,计算机设备再基于目标网元的运行模式确定目标资源的资源规格,使得确定出的资源规格更接近目标资源在目标网元中的实际规格,进而使得基于该资源规格计算的资源利用率更准确,可以尽量避免网络设备漏报容量风险的问题。To sum up, in the embodiments of the present application, the computer device extracts the operating characteristics of the target network element based on the configuration information of the target network element, and then determines the operating mode of the target network element based on the operating characteristics of the target network element, which makes the determined The running mode better matches the actual configuration of the target network element. After that, the computer device determines the resource specifications of the target resources based on the operating mode of the target network element, so that the determined resource specifications are closer to the actual specifications of the target resources in the target network element, thereby making the resource utilization calculated based on the resource specifications more accurate. Accurate, you can try to avoid the problem of network equipment underreporting capacity risks.
在基于图1或图2所示的实施例确定出目标网元中的目标资源的资源规格后,计算机设备还可以基于目标资源的资源规格评估目标网元的容量风险。请参看图3,其示出了本申请实施例提供的一种容量风险的评估方法的流程示意图。该方法包括步骤301至步骤302。After determining the resource specifications of the target resources in the target network element based on the embodiment shown in FIG. 1 or FIG. 2 , the computer device can also evaluate the capacity risk of the target network element based on the resource specifications of the target resources. Please refer to FIG. 3 , which shows a schematic flow chart of a capacity risk assessment method provided by an embodiment of the present application. The method includes steps 301 to 302.
步骤301,计算机设备根据目标资源的资源使用量和资源规格,确定目标资源的资源利用率。Step 301: The computer device determines the resource utilization rate of the target resource based on the resource usage and resource specifications of the target resource.
资源规格的获取方式请参考图1或图2所示的实施例,此处不再赘述。For the method of obtaining resource specifications, please refer to the embodiment shown in Figure 1 or Figure 2, which will not be described again here.
计算机设备获取目标资源在目标网元中的资源使用量。当计算机设备和目标网元为同一个设备时,目标网元读取目标资源的使用量。当计算机设备和目标网元为两个不同的设备时,计算机设备可以发送消息给目标网元以促使目标网元读取目标资源的使用量并返回目标资源的使用量给计算机设备,或者,目标网元还可以周期性地主动发送目标资源的使用量给计算机设备,计算机设备将最近一次接收到的来自于目标网元的目标资源的使用量用于自己算目标资源利用率。The computer device obtains the resource usage of the target resource in the target network element. When the computer device and the target network element are the same device, the target network element reads the usage of the target resource. When the computer device and the target network element are two different devices, the computer device can send a message to the target network element to prompt the target network element to read the usage of the target resource and return the usage of the target resource to the computer device, or the target The network element can also periodically actively send the usage of the target resource to the computer device, and the computer device uses the latest usage of the target resource received from the target network element to calculate the target resource utilization.
可选地,计算机设备还可以基于历史的目标资源的使用量预测得到的目标资源的资源使用量。历史的目标资源使用量为第一时间段内目标网元中的目标资源的实际使用量。第一时间段早于确定第一运行模式的时间。例如,目标资源的资源使用量为第一时间段内的目标资源的多个使用量的加权均值。第一时间段内的目标资源的每个资源使用量的权重可以相同,也可以不同,例如,时间上越接近于当前时刻的资源利用率的权重越大。例如,一种可能的加权平均公式为Xi为第一时间段内的目标资源的第i个资源使用量,n为第一时间段内的目标资源的资源利用率的数量,i/(n(n+1)/2)为第i个资源使用量的权重。若n=5,表7示出基于第一时间段内的5个资源利用率确定的当前的(即,第6个)资源利用率。Optionally, the computer device may also predict the resource usage of the target resource based on the historical usage of the target resource. The historical target resource usage is the actual usage of the target resource in the target network element in the first time period. The first time period is earlier than the time at which the first operating mode is determined. For example, the resource usage of the target resource is a weighted average of multiple usages of the target resource in the first time period. The weight of each resource usage of the target resource in the first time period may be the same or different. For example, the resource utilization closer to the current moment in time has a greater weight. For example, one possible weighted average formula is X i is the i-th resource usage of the target resource in the first time period, n is the number of resource utilization of the target resource in the first time period, i/(n(n+1)/2) is the The weight of i resource usage. If n=5, Table 7 shows the current (ie, 6th) resource utilization determined based on the 5 resource utilizations within the first time period.
表7
Table 7
需要说明的是,目标资源使用量的获取过程与目标资源规格的确定过程可以分先后顺序执行,也可以并列执行,本申请实施例对此不加以限定。It should be noted that the process of obtaining the target resource usage and the process of determining the target resource specifications can be executed sequentially or in parallel, which is not limited in the embodiments of the present application.
可选地,计算机设备根据目标资源的资源使用量和资源规格,确定目标资源的资源利用率,包括:将目标资源的资源使用量与目标资源的资源规格的比值确定为目标资源的资源利用率。 Optionally, the computer device determines the resource utilization of the target resource based on the resource usage and resource specifications of the target resource, including: determining a ratio of the resource usage of the target resource to the resource specifications of the target resource as the resource utilization of the target resource. .
可选地,目标资源包括多个第一资源,目标资源的资源使用量包括多个第一资源中的每个第一资源的资源使用量,目标资源的资源利用率包括多个第一资源中的每个第一资源的资源利用率,每个第一资源的资源利用率为该第一资源的资源使用量与该第一资源的资源规格的比值。例如,如表8所示,目标资源可以包括以下多个第一资源:VRF实例表、三层逻辑接口表、二层子接口表、ARP表、FIBv4表。如表8所示,当VRF实例表的资源使用量(即,目标网元中已经配置的VRF实例的个数)为50,VRF实例表的资源规格为100时,VRF实例表的资源利用率为50%;当三层逻辑接口表资源使用量(即,目标网元中已经配置的三层逻辑接口的个数)为800,三层逻辑接口表的资源规格为1500时,三层逻辑接口表的资源利用率为53.3%;当二层子接口表的资源使用量(即,目标网元中已经配置的二层子接口的个数)为4500,二层子接口表的资源规格为5000时,二层子接口表的资源利用率为90%;当ARP表的资源使用量(即,目标网元中已经配置的ARP表项的个数)为2000,ARP表的资源规格为2500时,ARP表的资源利用率为80%;当FIBv4表的资源使用量(即,目标网元中已经配置的IPv4路由的数量)为1500,FIBv4表的资源规格为2500时,FIBv4表的的资源利用率为60%。Optionally, the target resource includes multiple first resources, the resource usage of the target resource includes the resource usage of each of the multiple first resources, and the resource utilization rate of the target resource includes the resource usage of the multiple first resources. The resource utilization rate of each first resource is the ratio of the resource usage of the first resource to the resource specification of the first resource. For example, as shown in Table 8, the target resources may include the following multiple first resources: VRF instance table, Layer 3 logical interface table, Layer 2 sub-interface table, ARP table, and FIBv4 table. As shown in Table 8, when the resource usage of the VRF instance table (that is, the number of VRF instances configured in the target network element) is 50 and the resource specification of the VRF instance table is 100, the resource utilization of the VRF instance table is 50%; when the resource usage of the Layer 3 logical interface table (that is, the number of Layer 3 logical interfaces configured in the target network element) is 800, and the resource specification of the Layer 3 logical interface table is 1500, the Layer 3 logical interface The resource utilization rate of the table is 53.3%; when the resource usage of the Layer 2 sub-interface table (that is, the number of Layer 2 sub-interfaces configured in the target network element) is 4500, the resource specification of the Layer 2 sub-interface table is 5000 When , the resource utilization rate of the Layer 2 sub-interface table is 90%; when the resource usage of the ARP table (that is, the number of ARP entries configured in the target network element) is 2000, and the resource specification of the ARP table is 2500 , the resource utilization rate of the ARP table is 80%; when the resource usage of the FIBv4 table (that is, the number of IPv4 routes configured in the target network element) is 1500, and the resource specification of the FIBv4 table is 2500, the resources of the FIBv4 table Utilization rate is 60%.
表8
Table 8
步骤302,计算机设备根据目标资源的资源利用率评估目标网元的容量风险。Step 302: The computer device evaluates the capacity risk of the target network element based on the resource utilization of the target resource.
当目标资源的资源利用率满足风险条件时,计算机设备确定目标网元存在容量风险。具体地,计算机设备确定目标网元存在该目标资源容量风险,即,存在容量风险的资源为该目标资源。风险条件包括:目标资源的资源利用率大于利用率阈值,或者,目标资源的资源利用率连续大于利用率阈值的时长超过时长阈值,或者,目标资源的资源利用率连续大于利用率阈值的次数超过数量阈值。When the resource utilization rate of the target resource meets the risk condition, the computer device determines that the target network element has a capacity risk. Specifically, the computer device determines that the target network element has the target resource capacity risk, that is, the resource with the capacity risk is the target resource. Risk conditions include: the resource utilization of the target resource is greater than the utilization threshold, or the resource utilization of the target resource is continuously greater than the utilization threshold for more than the duration threshold, or the resource utilization of the target resource is continuously greater than the utilization threshold for more than a number of times. Quantity threshold.
例如,若目标资源为ARP表,若ARP表的利用率阈值为75%,则表8所示的ARP表的资源利用率(80%)大于ARP表的利用率阈值,计算机设备确定目标网元存在容量风险。具体地,计算机设备确定目标网元存在ARP表容量风险。For example, if the target resource is an ARP table and the utilization threshold of the ARP table is 75%, then the resource utilization (80%) of the ARP table shown in Table 8 is greater than the utilization threshold of the ARP table, and the computer device determines the target network element There is a capacity risk. Specifically, the computer device determines that the target network element has an ARP table capacity risk.
又例如,计算机设备周期性(例如,周期为5分钟)地计算目标网元的目标资源的资源利用率以获取目标资源的资源利用率序列。该资源利用率序列包括计算机设备先后获取到的目标网元的目标资源的资源利用率,当该序列中连续大于利用率阈值的资源利用率的个数超过数量阈值时,计算机设备确定该目标网元存在容量风险。例如,目标资源为ARP表,ARP表的利用率阈值为75%,数量阈值为4,ARP表的资源利用率序列为[70%,76%,85%,80%,90%,86%],该序列中连续大于利用率阈值的资源利用率的数量为5,该数量超过数量阈值,计算机设备确定目标网元存在ARP表的容量风险。或者,计算机设备还可以将上述数量乘以周期时长,以获取目标资源的利用率连续大于利用率阈值的时长,当该时长超过时长阈值时,计算机确定目标网元存在目标资源的容量风险。For another example, the computer device periodically (for example, the cycle is 5 minutes) calculates the resource utilization of the target resource of the target network element to obtain the resource utilization sequence of the target resource. The resource utilization sequence includes the resource utilization of the target resources of the target network element that the computer device has successively acquired. When the number of resource utilizations in the sequence that are continuously greater than the utilization threshold exceeds the quantity threshold, the computer device determines that the target network There is a capacity risk. For example, the target resource is an ARP table, the utilization threshold of the ARP table is 75%, the quantity threshold is 4, and the resource utilization sequence of the ARP table is [70%, 76%, 85%, 80%, 90%, 86%] , the number of resource utilizations in the sequence that are continuously greater than the utilization threshold is 5. This number exceeds the quantity threshold, and the computer device determines that the target network element has a capacity risk in the ARP table. Alternatively, the computer device can also multiply the above number by the cycle duration to obtain the duration during which the utilization rate of the target resource is continuously greater than the utilization threshold. When the duration exceeds the duration threshold, the computer determines that the target network element has a capacity risk of the target resource.
可选地,当目标资源包括多个第一资源时,若存在至少一个第一资源满足风险条件, 则计算机设备确定目标网元存在容量风险,存在容量风险的资源为满足风险条件的至少一个第一资源。例如,如表8所示,目标资源包括VRF实例表、三层逻辑接口表、二层子接口表、ARP表和FIBv4表,若各个表项资源的风险阈值均为75%,则二层子接口表和ARP表的资源利用率均超过风险阈值,计算机设备可以确定该目标网元存在容量风险,具体地,计算机设备确定该目标网元的二层子接口表和ARP表存在容量风险。Optionally, when the target resource includes multiple first resources, if there is at least one first resource that meets the risk condition, Then the computer device determines that the target network element has a capacity risk, and the resource with the capacity risk is at least one first resource that meets the risk condition. For example, as shown in Table 8, the target resources include VRF instance table, Layer 3 logical interface table, Layer 2 sub-interface table, ARP table and FIBv4 table. If the risk threshold of each table entry resource is 75%, then the Layer 2 sub-interface table The resource utilization rates of the interface table and the ARP table both exceed the risk threshold, and the computer device can determine that the target network element has a capacity risk. Specifically, the computer device determines that the target network element's Layer 2 sub-interface table and ARP table have a capacity risk.
利用率阈值、数量阈值和时长阈值可以是预先配置的,也可以是计算机设备基于历史数据获取的。例如,计算机设备根据网络中的同一设备类型的多个网络设备发生业务故障时或发生业务故障前的一段时间内的各资源的资源使用量获取该设备类型的各资源的利用率阈值、数量阈值或时长阈值。例如,利用率阈值为业务故障发生时的多个资源使用量的统计值,数量阈值为业务故障发生前的连续大于利用率阈值的资源使用量的数量的统计值,时长阈值为业务故障发生前资源利用率连续大于利用率阈值的时长的统计值,统计值例如为均值、中位数、分位数等。The utilization threshold, quantity threshold and duration threshold can be pre-configured or obtained by the computer device based on historical data. For example, the computer device obtains the utilization threshold and quantity threshold of each resource of the device type based on the resource usage of each resource when multiple network devices of the same device type in the network have a business failure or during a period of time before the business failure occurs. or duration threshold. For example, the utilization threshold is the statistical value of multiple resource usage when a business failure occurs, the quantity threshold is the statistical value of the number of resource usage that is continuously greater than the utilization threshold before the business failure occurs, and the duration threshold is the statistical value of the resource usage before the business failure occurs. The statistical value of the length of time that the resource utilization is continuously greater than the utilization threshold. The statistical value is, for example, the mean, median, quantile, etc.
可选地,在确定目标网元存在容量风险后,计算机设备还可以显示相关的风险信息。进一步地,计算机设备可以推荐容量风险的处理建议。可选地,在确定目标网元存在容量风险后,图3所示实施例还可以包括步骤303和/或步骤304。Optionally, after determining that the target network element has a capacity risk, the computer device can also display relevant risk information. Further, the computer device can recommend handling suggestions for capacity risks. Optionally, after it is determined that the target network element has a capacity risk, the embodiment shown in Figure 3 may further include step 303 and/or step 304.
步骤303,计算机设备显示风险描述信息。Step 303: The computer device displays risk description information.
可选地,在确定目标网元存在容量风险后,计算机设备显示风险描述信息。该风险描述信息包括目标网元的标识,指示该标识所代表的目标网元存在容量风险。Optionally, after determining that the target network element has a capacity risk, the computer device displays risk description information. The risk description information includes the identification of the target network element, indicating that the target network element represented by the identification has a capacity risk.
可选地,风险描述信息还包括存在风险的目标资源,指示目标网元的该目标资源存在容量风险。当目标资源包括多个第一资源时,风险描述信息包括存在容量风险的至少一个第一资源。Optionally, the risk description information also includes a target resource with risk, indicating that the target resource of the target network element has a capacity risk. When the target resource includes multiple first resources, the risk description information includes at least one first resource with capacity risk.
可选地,风险描述信息还包括目标资源的风险程度信息。风险程度信息指示目标网元的该目标资源的风险程度,例如,风险程度信息包括资源利用率和利用率阈值,或者,风险程度信息为资源利用率和利用率阈值的差值。当目标资源包括多个第一资源时,风险程度信息包括存在容量风险的至少一个第一资源的风险程度信息。Optionally, the risk description information also includes risk degree information of the target resource. The risk level information indicates the risk level of the target resource of the target network element. For example, the risk level information includes resource utilization and utilization threshold, or the risk level information is the difference between resource utilization and utilization threshold. When the target resource includes multiple first resources, the risk degree information includes risk degree information of at least one first resource with capacity risk.
可选地,风险描述信息还可以包括以下至少一项:目标网元的运行模式、目标网元的运行场景、目标网元使能的功能。Optionally, the risk description information may also include at least one of the following: the operating mode of the target network element, the operating scenario of the target network element, and the functions enabled by the target network element.
步骤304,计算机设备显示风险处理建议。Step 304: The computer device displays risk treatment suggestions.
可选地,在确定目标网元存在容量风险后,计算机设备显示风险处理建议。步骤303和步骤304可以并行执行,例如,计算机设备同时显示风险描述信息和风险处理建议信息。步骤303和步骤304也可以顺序执行,本申请实施例不限定步骤303和步骤304的执行顺序。本申请实施例还可以不执行步骤303或步骤304。Optionally, after determining that the target network element has a capacity risk, the computer device displays a risk treatment suggestion. Steps 303 and 304 may be executed in parallel, for example, the computer device displays risk description information and risk treatment recommendation information at the same time. Steps 303 and 304 may also be executed sequentially, and the embodiment of the present application does not limit the execution order of steps 303 and 304. In this embodiment of the present application, step 303 or step 304 may not be performed.
处理建议包括以下至少一项:更换目标网元的设备类型、迁移目标网元的目标业务或切换目标网元的运行模式。The processing suggestions include at least one of the following: changing the device type of the target network element, migrating the target service of the target network element, or switching the operating mode of the target network element.
可选地,在确定目标网元存在容量风险后,计算机设备可以显示处理建议,处理建议指示将目标网元的设备类型从第一类型更换为第二类型,第二类型的网络设备的目标资源的资源规格大于第一类型的网络设备的目标资源的资源规格。Optionally, after determining that the target network element has a capacity risk, the computer device may display a processing suggestion, which indicates changing the device type of the target network element from the first type to the second type, and the target resources of the second type of network equipment. The resource specification is greater than the resource specification of the target resource of the first type of network device.
可选地,在确定目标网元存在容量风险后,计算机设备可以显示处理建议,处理建议指示迁移目标网元的目标业务至其他网络设备,其他网络设备的目标资源的资源利用率低 于利用率阈值。例如,将与存在容量风险的目标资源相关的部分业务迁移到其他网络设备。Optionally, after determining that the target network element has capacity risk, the computer device can display a processing suggestion. The processing suggestion indicates migrating the target business of the target network element to other network devices, and the resource utilization of the target resources of other network devices is low. at the utilization threshold. For example, migrate some services related to target resources with capacity risks to other network devices.
可选地,在确定目标网元存在容量风险后,计算机设备可以显示处理建议,处理建议指示将目标网元的运行模式从第一运行模式切换为第二运行模式,目标网元在第二运行模式下不存在容量风险。运维人员可以通过更改目标网元的配置,以将目标网元从第一运行模式切换为第二运行模式。可选地,模式切换包括:通过修改目标网元的配置参数以修改目标网元的运行特征,从而使得修改后的运行特征的特征值与第二运行模式对应的运行特征的特征值一致。修改目标网元的配置参数会触发目标网元调整存储空间中的资源分配,从而达到调整各表项的资源规格的目的。Optionally, after determining that the target network element has a capacity risk, the computer device may display a processing suggestion, and the processing suggestion instructs to switch the operation mode of the target network element from the first operation mode to the second operation mode, and the target network element is in the second operation mode. There is no capacity risk in this mode. Operation and maintenance personnel can switch the target network element from the first operating mode to the second operating mode by changing the configuration of the target network element. Optionally, the mode switching includes: modifying the operating characteristics of the target network element by modifying the configuration parameters of the target network element, so that the characteristic values of the modified operating characteristics are consistent with the characteristic values of the operating characteristics corresponding to the second operating mode. Modifying the configuration parameters of the target network element will trigger the target network element to adjust the resource allocation in the storage space, thereby achieving the purpose of adjusting the resource specifications of each entry.
示意性的,如表9所示,网元A的第一运行模式为IPv4单栈模式2,计算机设备根据第一运行模式确定网元A存在容量风险,存在风险的第一资源为二层子接口表,该第一资源对应的资源利用率为90%,处理建议包括迁移网元A的目标业务至网元C,网元C为各项资源的资源利用率均低于资源阈值的网元。网元B的第一运行模式为IPv4和IPv6双栈模式2,计算机设备根据第一运行模式确定网元B存在容量风险,存在风险的第一资源为FIBv4表,该第一资源对应的资源利用率为90%,处理建议包括更换网元B的类型,更换后的网元B的资源规格大于更换前的网元B的资源规格。Schematically, as shown in Table 9, the first operating mode of network element A is IPv4 single stack mode 2. The computer equipment determines that network element A has a capacity risk based on the first operating mode, and the first resource at risk is the second layer sub-network. In the interface table, the resource utilization rate corresponding to the first resource is 90%. The processing suggestions include migrating the target services of network element A to network element C. Network element C is a network element whose resource utilization rate of each resource is lower than the resource threshold. . The first operating mode of network element B is IPv4 and IPv6 dual-stack mode 2. The computer equipment determines that network element B has a capacity risk based on the first operating mode. The first resource at risk is the FIBv4 table. The resource utilization corresponding to the first resource The rate is 90%. The processing suggestions include changing the type of network element B. The resource specifications of network element B after replacement are greater than the resource specifications of network element B before replacement.
表9
Table 9
可选地,计算机设备根据目标网元的第二运行模式确定目标资源的第二资源规格,第二运行模式不同于第一运行模式;根据目标资源的资源使用量和第二资源规格,确定目标网元的第二资源利用率;根据第二资源利用率,确定目标网元是否存在资源容量的风险。当确定出目标网元不存在容量风险时,生成处理建议,处理建议指示将目标网元的运行模式从第一运行模式切换为第二运行模式。Optionally, the computer device determines the second resource specification of the target resource according to the second operating mode of the target network element, and the second operating mode is different from the first operating mode; and determines the target resource based on the resource usage of the target resource and the second resource specification. The second resource utilization rate of the network element; based on the second resource utilization rate, determine whether the target network element has a resource capacity risk. When it is determined that the target network element does not have capacity risk, a processing suggestion is generated, and the processing suggestion instructs to switch the operation mode of the target network element from the first operation mode to the second operation mode.
综上所述,本申请实施例中,计算机设备基于目标网元的运行模式确定目标资源的资源规格,并基于目标资源的资源规格评估目标网元的容量风险。基于目标网元的运行模式确定目标资源的资源规格,使得确定出的资源规格更接近目标资源在目标网元中的实际规格,进而使得基于该资源规格计算的资源利用率更准确,可以尽量避免网络设备漏报容量风险的问题。进一步地,在确定目标网元存在容量风险后,本申请实施例还显示风险描述信息和/或风险处理建议,可以方便运维人员直观了解和快速处理容量风险。To sum up, in the embodiments of the present application, the computer device determines the resource specifications of the target resources based on the operating mode of the target network element, and evaluates the capacity risk of the target network element based on the resource specifications of the target resources. Determine the resource specifications of the target resources based on the operating mode of the target network element, so that the determined resource specifications are closer to the actual specifications of the target resources in the target network element, which in turn makes the resource utilization calculated based on the resource specifications more accurate and can be avoided as much as possible The problem of network equipment underreporting capacity risks. Furthermore, after it is determined that the target network element has a capacity risk, the embodiment of the present application also displays risk description information and/or risk treatment suggestions, which can facilitate operation and maintenance personnel to intuitively understand and quickly handle the capacity risk.
请参考图4,其示出了本申请实施例提供的一种网络容量风险评估***400的示意图。网络容量风险评估***400包括计算机设备410和网络设备420。计算机设备410用于执行图1或图2所示实施例提供的方法以确定网络设备420的目标资源的资源规格。可选地,计算机设备410还用于执行图3所示实施例中的步骤301和步骤302以评估网络设备420的容量风险。可选地,计算机设备410还用于执行图3所示实施例中的步骤303和/或步骤304,以在确定网络设备420存在容量风险时,显示风险描述信息和/或风险处理建议。 Please refer to FIG. 4 , which shows a schematic diagram of a network capacity risk assessment system 400 provided by an embodiment of the present application. Network capacity risk assessment system 400 includes computer equipment 410 and network equipment 420. The computer device 410 is configured to execute the method provided by the embodiment shown in FIG. 1 or FIG. 2 to determine the resource specifications of the target resources of the network device 420 . Optionally, the computer device 410 is also used to perform step 301 and step 302 in the embodiment shown in FIG. 3 to assess the capacity risk of the network device 420 . Optionally, the computer device 410 is also configured to perform step 303 and/or step 304 in the embodiment shown in FIG. 3 to display risk description information and/or risk treatment suggestions when it is determined that the network device 420 has a capacity risk.
可选地,网络容量风险评估***400还可以包括应用设备430。应用设备430用于执行图3所示实施例中的步骤303和/或步骤304。即,应用设备430用于显示风险描述信息和/或风险处置建议。例如,计算机设备410为控制器,应用设备430为控制器的显示装置或者为用户的操作设备。用户的操作设备例如为运维人员使用的计算机、服务器等。网络容量风险评估***400还包括应用设备430时,当确定网络设备420存在容量风险时,计算机设备410发送风险描述信息和/或风险处理建议给应用设备430,应用设备430显示接收到的风险描述信息和风险处理建议。Optionally, the network capacity risk assessment system 400 may also include an application device 430. The application device 430 is used to perform step 303 and/or step 304 in the embodiment shown in FIG. 3 . That is, the application device 430 is used to display risk description information and/or risk treatment suggestions. For example, the computer device 410 is a controller, and the application device 430 is a display device of the controller or a user's operating device. The user's operating equipment is, for example, a computer, server, etc. used by operation and maintenance personnel. When the network capacity risk assessment system 400 further includes an application device 430, when it is determined that the network device 420 has a capacity risk, the computer device 410 sends risk description information and/or risk treatment suggestions to the application device 430, and the application device 430 displays the received risk description. Information and risk handling advice.
可选地,应用设备430还用于向计算机设备420发送容量风险评估需求,以指示计算机设备410根据容量风险评估需求进行容量风险评估。容量风险评估需求包括如下至少一项:待评估的网络设备的标识、待评估的目标资源的标识、评估时段或评估周期。其中,评估时段指示计算机设备420在该评估时段进行容量风险评估,评估周期指示计算机设备420根据该评估周期对网络设备进行周期性的容量风险评估。当应用设备不发送容量评估需求时,计算机设备可以按照默认配置进行容量风险评估,例如,对计算机设备420所属的网络中的路由器设备中的ARP表、MAC表、FIB表进行周期性的风险评估,周期例如为10分钟。网络设备的标识例如为网络设备的名称。网络设备的标识还可以包括网络设备的设备类型。Optionally, the application device 430 is also configured to send a capacity risk assessment requirement to the computer device 420 to instruct the computer device 410 to perform a capacity risk assessment according to the capacity risk assessment requirement. Capacity risk assessment requirements include at least one of the following: the identification of the network equipment to be assessed, the identification of the target resources to be assessed, and the assessment period or assessment cycle. The evaluation period instructs the computer device 420 to perform capacity risk assessment during the evaluation period, and the evaluation cycle instructs the computer device 420 to perform periodic capacity risk assessment on the network device according to the evaluation period. When the application device does not send capacity assessment requirements, the computer device can perform capacity risk assessment according to the default configuration, for example, perform periodic risk assessment on the ARP table, MAC table, and FIB table in the router device in the network to which the computer device 420 belongs. , the period is, for example, 10 minutes. The identifier of the network device is, for example, the name of the network device. The identification of the network device may also include the device type of the network device.
可选地,应用设备430还用于向计算机设备420发送资源规格表和/或运行模式定义表。运行模式定义表包括运行模式和运行特征的对应关系。资源规格表包括运行模式和资源规格的对应关系。计算机设备420可基于应用设备430发送的运行模式定义表,根据网络设备420的运行特征确定网络设备420的运行模式。计算机设备420可基于应用设备430发送的资源规格表,根据网络设备420的运行模式确定网络设备420的资源规格。应用设备430发送的运行模式定义表和资源规格表可以由其他设备获取并发送给应用设备430。当应用设备不发送资源规格表和运行模式定义表时,计算机设备420可根据图1或图2所示的实施例自行获取资源规格表和运行模式定义表。Optionally, the application device 430 is also used to send a resource specification table and/or a running mode definition table to the computer device 420. The operating mode definition table includes the correspondence between operating modes and operating characteristics. The resource specification table includes the correspondence between the operating mode and the resource specifications. The computer device 420 may determine the operating mode of the network device 420 according to the operating characteristics of the network device 420 based on the operating mode definition table sent by the application device 430 . The computer device 420 may determine the resource specifications of the network device 420 according to the operating mode of the network device 420 based on the resource specification table sent by the application device 430. The running mode definition table and resource specification table sent by the application device 430 can be obtained by other devices and sent to the application device 430 . When the application device does not send the resource specification table and the operating mode definition table, the computer device 420 can obtain the resource specification table and the operating mode definition table by itself according to the embodiment shown in FIG. 1 or FIG. 2 .
可选地,计算机设备410还用于向网络设备420发送目标资源的标识,以指示网络设备420按需采集目标资源的使用量。若计算机设备410不发送目标资源的标识,网络设备420可以按照默认配置发送资源的资源使用量,例如,发送网络设备420中的所有表项资源的资源使用量。Optionally, the computer device 410 is also configured to send the identification of the target resource to the network device 420 to instruct the network device 420 to collect the usage of the target resource on demand. If the computer device 410 does not send the identification of the target resource, the network device 420 may send the resource usage of the resource according to the default configuration, for example, send the resource usage of all entry resources in the network device 420 .
可选地,网络设备420用于发送相关的配置信息给计算机设备410。配置信息包括网络设备420的接口配置、业务功能配置。可选地,配置信息还包括网络设备420的设备类型。Optionally, the network device 420 is used to send relevant configuration information to the computer device 410. The configuration information includes the interface configuration and service function configuration of the network device 420. Optionally, the configuration information also includes the device type of the network device 420.
结合图4所示的容量风险评估***,请参考图5,其示出了本申请实施例提供的一种容量风险评估方法的流程示意图。该方法包括步骤501至步骤507。In conjunction with the capacity risk assessment system shown in Figure 4, please refer to Figure 5, which shows a schematic flow chart of a capacity risk assessment method provided by an embodiment of the present application. The method includes steps 501 to 507.
步骤501,应用设备向计算机设备发送容量风险评估需求。Step 501: The application device sends a capacity risk assessment requirement to the computer device.
关于容量评估需求,请参考图4所示实施例的描述,此处不再赘述。Regarding capacity assessment requirements, please refer to the description of the embodiment shown in Figure 4, which will not be described again here.
示例性地,该评估需求包括待评估的网络设备的标识,指示计算机设备对该标识所代表的网络设备进行容量风险评估。For example, the assessment requirement includes an identification of the network device to be evaluated, and instructs the computer device to perform a capacity risk assessment on the network equipment represented by the identification.
示例性地,该评估需求还包括评估时间段,指示计算机设备立即对网络设备进行一次容量风险评估。 Illustratively, the assessment requirement also includes an assessment time period, instructing the computer device to immediately perform a capacity risk assessment on the network device.
示例性地,该评估需求还包括目标资源的标识,例如,指示计算机设备对网络设备的ARP表进行容量风险评估。Exemplarily, the assessment requirement also includes an identification of the target resource, for example, instructing the computer device to perform a capacity risk assessment on the ARP table of the network device.
步骤502,计算机设备向网络设备发送采集需求,以获取网络设备的配置信息和ARP表的使用量。Step 502: The computer device sends a collection request to the network device to obtain the configuration information of the network device and the usage of the ARP table.
步骤503,网络设备向计算机设备发送配置信息和ARP表的使用量。Step 503: The network device sends the configuration information and the usage amount of the ARP table to the computer device.
步骤504,计算机设备根据网络设备的配置信息,确定网络设备的运行模式。Step 504: The computer device determines the operating mode of the network device based on the configuration information of the network device.
该步骤请参考图1所示实施例的步骤101或图2所示实施例的步骤201,此处不再赘述。For this step, please refer to step 101 of the embodiment shown in Figure 1 or step 201 of the embodiment shown in Figure 2, which will not be described again here.
步骤505,计算机设备根据网络设备的运行模式获取网络设备的ARP表的资源规格。Step 505: The computer device obtains the resource specifications of the ARP table of the network device according to the operating mode of the network device.
该步骤请参考图1所示实施例的步骤201或图2所示实施例的步骤202,此处不再赘述。For this step, please refer to step 201 of the embodiment shown in FIG. 1 or step 202 of the embodiment shown in FIG. 2, which will not be described again here.
步骤506,计算机设备根据网络设备的ARP表的资源规格和ARP表的使用量,评估网络设备的ARP表容量风险。Step 506: The computer device evaluates the ARP table capacity risk of the network device based on the resource specifications of the ARP table of the network device and the usage of the ARP table.
该步骤请参考图3所示实施例的步骤303,此处不再赘述。Please refer to step 303 of the embodiment shown in Figure 3 for this step, which will not be described again here.
步骤507,当网络设备的ARP表存在容量风险时,计算机设备发送风险描述信息和/或风险处理建议给应用设备。Step 507: When there is a capacity risk in the ARP table of the network device, the computer device sends risk description information and/or risk treatment suggestions to the application device.
关于风险描述信息和处理建议,请参考图3所示实施例的步骤304和步骤305,此处不再赘述。For risk description information and processing suggestions, please refer to step 304 and step 305 of the embodiment shown in Figure 3, which will not be described again here.
步骤508,应用设备显示风险描述信息和/或风险处理建议。Step 508: The application device displays risk description information and/or risk treatment suggestions.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to execute method embodiments of the present application. For details not disclosed in the device embodiments of this application, please refer to the method embodiments of this application.
请参考图6,其示出了本申请实施例提供的一种资源规格的确定装置600的框图。该装置可以通过软件、硬件或者两者的结合实现成为计算机设备的全部或者一部分。该装置600包括获取单元610和确定单元620。Please refer to FIG. 6 , which shows a block diagram of a resource specification determining device 600 provided by an embodiment of the present application. The device can be implemented as all or part of the computer equipment through software, hardware or a combination of both. The device 600 includes an obtaining unit 610 and a determining unit 620.
获取单元610,用于获取目标网元的第一运行模式,第一运行模式指示目标网元的至少一种功能的使能状态。确定单元620,用于根据第一运行模式确定目标网元的目标资源的资源规格,资源规格指示目标资源在目标网元中的最大存储量。The obtaining unit 610 is configured to obtain the first operating mode of the target network element, where the first operating mode indicates the enabling state of at least one function of the target network element. The determining unit 620 is configured to determine the resource specification of the target resource of the target network element according to the first operating mode, where the resource specification indicates the maximum storage amount of the target resource in the target network element.
可选地,获取单元610,用于根据目标网元的运行场景获取目标网元的第一运行模式。Optionally, the obtaining unit 610 is configured to obtain the first operating mode of the target network element according to the operating scenario of the target network element.
可选地,获取单元610,用于根据运行场景和运行模式的对应关系,将与目标网元的运行场景对应的运行模式确定为目标网元的第一运行模式。Optionally, the obtaining unit 610 is configured to determine the operating mode corresponding to the operating scenario of the target network element as the first operating mode of the target network element according to the corresponding relationship between the operating scenario and the operating mode.
可选地,获取单元610,用于根据目标网元的至少一种功能的使能状态获取目标网元的第一运行模式。Optionally, the obtaining unit 610 is configured to obtain the first operating mode of the target network element according to the enabling state of at least one function of the target network element.
可选地,获取单元610,用于根据目标网元的至少一种功能的使能状态获取目标网元的运行特征,并根据目标网元的运行特征获取目标网元的第一运行模式。运行特征包括以下至少一项运行子特征:目标网元使能的协议栈类型、目标网元的业务功能的使能状态,目标网元的第一资源的使用量和目标网元的第二资源的使用量的比例。Optionally, the obtaining unit 610 is configured to obtain the operating characteristics of the target network element according to the enabling state of at least one function of the target network element, and obtain the first operating mode of the target network element according to the operating characteristics of the target network element. The operating characteristics include at least one of the following operating sub-characteristics: the protocol stack type enabled by the target network element, the enabling status of the service function of the target network element, the usage of the first resource of the target network element and the second resource of the target network element. proportion of usage.
可选地,获取单元610,用于根据运行特征和运行模式的对应关系,获取与目标网元的运行特征对应的目标网元的第一运行模式。 Optionally, the obtaining unit 610 is configured to obtain the first operating mode of the target network element corresponding to the operating characteristics of the target network element according to the corresponding relationship between the operating characteristics and the operating mode.
可选地,获取单元610,用于获取第一映射表,并根据第一映射表,将与目标网元的运行特征匹配的运行特征对应的运行模式确定为目标网元的第一运行模式。第一映射表包括多个第一表项,每个第一表项指示运行特征与运行模式之间的对应关系。Optionally, the obtaining unit 610 is configured to obtain the first mapping table, and determine, according to the first mapping table, the operating mode corresponding to the operating feature that matches the operating feature of the target network element as the first operating mode of the target network element. The first mapping table includes a plurality of first entries, each first entry indicating a corresponding relationship between operating characteristics and operating modes.
可选地,目标网元的运行特征包括多个运行子特征,获取单元610,用于根据第一映射表确定匹配的第一表项,并将匹配的第一表项中的运行模式确定为目标网元的第一运行模式。该匹配的第一表项包括的多个子特征与目标网元的运行特征包括多个运行子特征均匹配。Optionally, the operation characteristics of the target network element include a plurality of operation sub-features. The acquisition unit 610 is configured to determine the matching first entry according to the first mapping table, and determine the operation mode in the matching first entry as The first operating mode of the target network element. The plurality of sub-features included in the matching first entry all match the operation characteristics of the target network element, including the plurality of operation sub-features.
可选地,获取单元610,用于当不存在匹配的第一表项时,确定多个第一表项分别对应的匹配分数,并根据多个第一表项分别对应的匹配分数,确定目标网元的第一运行模式。任一第一表项的匹配分数指示多个运行子特征与该任一第一表项包括的多个子特征之间的匹配程度。Optionally, the acquisition unit 610 is configured to determine the matching scores corresponding to the plurality of first entries when there is no matching first entry, and determine the target according to the matching scores corresponding to the plurality of first entries. The first operating mode of the network element. The matching score of any first entry indicates the matching degree between the plurality of operating sub-features and the plurality of sub-features included in the any first entry.
可选地,确定单元620,用于根据目标网元的第一运行模式,以及网络中运行模式为所述第一运行模式的多个网络设备的资源使用量和内存占用率确定目标网元的目标资源的资源规格。Optionally, the determining unit 620 is configured to determine the target network element according to the first operating mode of the target network element and the resource usage and memory usage of multiple network devices in the network whose operating modes are the first operating mode. The resource specification of the target resource.
可选地,确定单元620,用于根据运行模式和资源规格的对应关系以及目标网元的第一运行模式,确定目标网元的目标资源的资源规格。Optionally, the determining unit 620 is configured to determine the resource specification of the target resource of the target network element according to the corresponding relationship between the operating mode and the resource specification and the first operating mode of the target network element.
可选地,确定单元620用于获取第二映射表,并根据第二映射表,将与目标网元的网元信息和目标网元的第一运行模式对应的目标资源的资源规格确定为目标网元的目标资源的资源规格。第二映射表包括多个第二表项,每个第二表项指示网元信息、运行模式与资源规格之间的对应关系。网元信息包括设备类型。Optionally, the determining unit 620 is configured to obtain the second mapping table, and determine, according to the second mapping table, the resource specification of the target resource corresponding to the network element information of the target network element and the first operating mode of the target network element as the target. Resource specifications of the network element's target resources. The second mapping table includes a plurality of second entries, each second entry indicating a correspondence between network element information, operating mode and resource specifications. Network element information includes device type.
可选地,确定单元620,还用于根据目标网元的目标资源的资源使用量和目标网元的目标资源的资源规格,确定目标网元的目标资源的资源利用率。Optionally, the determining unit 620 is also configured to determine the resource utilization rate of the target resource of the target network element according to the resource usage of the target resource of the target network element and the resource specifications of the target resource of the target network element.
可选地,该装置600还包括评估单元630。评估单元630,用于根据目标网元的目标资源的资源利用率评估目标网元的容量风险。Optionally, the device 600 further includes an evaluation unit 630. The evaluation unit 630 is configured to evaluate the capacity risk of the target network element according to the resource utilization of the target resources of the target network element.
可选地,评估单元630,用于当目标资源的资源利用率满足风险条件时,确定目标网元存在容量风险。Optionally, the evaluation unit 630 is configured to determine that the target network element has a capacity risk when the resource utilization of the target resource meets the risk condition.
可选地,风险条件包括:目标网元的目标资源的资源利用率大于利用率阈值,或者,目标网元的目标资源的资源利用率连续大于利用率阈值的时长超过时长阈值,或者,目标网元的目标资源的资源利用率连续大于利用率阈值的次数超过数量阈值。Optionally, the risk conditions include: the resource utilization of the target resource of the target network element is greater than the utilization threshold, or the resource utilization of the target resource of the target network element is continuously greater than the utilization threshold for more than the duration threshold, or the target network The number of times the resource utilization of the target resource of the element is continuously greater than the utilization threshold exceeds the quantity threshold.
可选地,目标网元的目标资源包括多个第一资源,评估单元630,用于若存在至少一个第一资源满足风险条件,确定目标网元存在容量风险。Optionally, the target resources of the target network element include multiple first resources, and the evaluation unit 630 is configured to determine that the target network element has a capacity risk if at least one first resource meets the risk condition.
可选地,该装置600还包括显示单元640。显示单元640,用于当确定目标网元存在容量风险后,显示风险描述信息和/或风险处理建议。Optionally, the device 600 further includes a display unit 640. The display unit 640 is configured to display risk description information and/or risk treatment suggestions after it is determined that the target network element has a capacity risk.
可选地,风险描述信息包括如下至少一项:目标网元的标识、目标网元中存在容量风险的目标资源、目标网元中存在容量风险的目标资源的风险程度信息、目标网元的运行模式、目标网元的运行场景,或者目标网元使能的功能。Optionally, the risk description information includes at least one of the following: the identification of the target network element, the target resources with capacity risks in the target network element, the risk degree information of the target resources with capacity risks in the target network element, and the operation of the target network element. mode, the operating scenario of the target network element, or the functions enabled by the target network element.
可选地,风险处理建议包括如下至少一项:更换目标网元的设备类型、迁移目标网元的目标业务或切换目标网元的运行模式。Optionally, the risk treatment suggestions include at least one of the following: changing the device type of the target network element, migrating the target service of the target network element, or switching the operating mode of the target network element.
需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划 分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the device provided in the above embodiments implements its functions, it only uses the layout of the above functional modules. An example will be given below. In actual applications, the above function allocation can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be described again here.
请参考图7,其示出了本申请实施例提供的一种计算机设备的结构示意图。该计算机设备700包括处理器720、存储器740、通信接口760和总线780,处理器720、存储器740和通信接口760通过总线780彼此连接。处理器720、存储器740和通信接口760也可以采用除了总线780之外的其他连接方式连接。Please refer to FIG. 7 , which shows a schematic structural diagram of a computer device provided by an embodiment of the present application. The computer device 700 includes a processor 720, a memory 740, a communication interface 760, and a bus 780 through which the processor 720, the memory 740, and the communication interface 760 are connected to each other. The processor 720, the memory 740 and the communication interface 760 may also be connected using other connection methods besides the bus 780.
其中,存储器740可以是各种类型的存储介质,例如随机存取存储器(random access memory,RAM)、只读存储器(read-only memory,ROM)、非易失性RAM(non-volatile RAM,NVRAM)、可编程ROM(programmable ROM,PROM)、可擦除PROM(erasable PROM,EPROM)、电可擦除PROM(electrically erasable PROM,EEPROM)、闪存、光存储器、硬盘等。Among them, the memory 740 can be various types of storage media, such as random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), non-volatile RAM (non-volatile RAM, NVRAM). ), programmable ROM (programmable ROM, PROM), erasable PROM (erasable PROM, EPROM), electrically erasable PROM (electrically erasable PROM, EEPROM), flash memory, optical memory, hard disk, etc.
其中,处理器720可以是通用处理器,通用处理器可以是通过读取并执行存储器(例如存储器740)中存储的内容来执行特定步骤和/或操作的处理器。例如,通用处理器可以是中央处理器(central processing unit,CPU)。处理器720可以包括至少一个电路,以执行图1、图2、图3或图5任一所示实施例提供的方法的全部或部分步骤。The processor 720 may be a general-purpose processor, and the general-purpose processor may be a processor that performs specific steps and/or operations by reading and executing content stored in a memory (eg, the memory 740 ). For example, the general-purpose processor may be a central processing unit (CPU). The processor 720 may include at least one circuit to perform all or part of the steps of the method provided by any of the embodiments shown in FIG. 1, FIG. 2, FIG. 3, or FIG. 5.
其中,通信接口760包括输入/输出(input/output,I/O)接口、物理接口和逻辑接口等用于实现计算机设备700内部的器件互连的接口,以及用于实现计算机设备700与其他设备(例如网络设备或应用设备)互连的接口。物理接口可以是以太网接口,光纤接口,ATM接口等。Among them, the communication interface 760 includes an input/output (I/O) interface, a physical interface, a logical interface, and other interfaces for realizing the interconnection of devices within the computer device 700, and for realizing the interconnection between the computer device 700 and other devices. (such as network equipment or application equipment) interconnection interface. The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.
其中,总线780可以是任何类型的,用于实现处理器720、存储器740和通信接口760互连的通信总线,例如***总线。The bus 780 may be any type of communication bus used to interconnect the processor 720, the memory 740, and the communication interface 760, such as a system bus.
上述器件可以分别设置在彼此独立的芯片上,也可以至少部分的或者全部的设置在同一块芯片上。将各个器件独立设置在不同的芯片上,还是整合设置在一个或者多个芯片上,往往取决于产品设计的需要。本申请实施例对上述器件的具体实现形式不做限定。The above-mentioned devices may be arranged on separate chips, or at least part or all of them may be arranged on the same chip. Whether each device is independently installed on different chips or integrated on one or more chips often depends on the needs of product design. The embodiments of this application do not limit the specific implementation forms of the above devices.
图7所示的计算机设备700仅仅是示例性的,在实现过程中,计算机设备700还可以包括其他组件,本文不再一一列举。另外,上述实施例提供的计算机设备700与前述方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。The computer device 700 shown in FIG. 7 is only exemplary. During the implementation process, the computer device 700 may also include other components, which are not listed here. In addition, the computer device 700 provided in the above embodiments has the same concept as the foregoing method embodiments. Please refer to the method embodiments for its specific implementation process, which will not be described again here.
本申请实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当计算机可读代码在计算机设备的处理器中运行时,计算机设备中的处理器执行上述由计算机设备执行的方法。Embodiments of the present application provide a computer program product, which includes computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code. When the computer readable code is run in a processor of a computer device, , the processor in the computer device executes the above method executed by the computer device.
本申请实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,计算机程序指令被处理器执行时实现上述由计算机设备执行的方法。Embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method executed by a computer device is implemented.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具 体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Electrically Programmable Read-Only-Memory,EPROM或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。Computer-readable storage media may be tangible devices that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. computer readable storage media Examples (a non-exhaustive list) include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (ROM), Electrically Programmable Read-Only-Memory (EPROM or Flash Memory), Static Random-Access Memory (SRAM), Portable Compact Disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM), Digital Multi-Function Digital Video Disc (DVD), memory stick, floppy disk, mechanical encoding device, such as a punched card or a raised structure in a groove with instructions stored thereon, and any suitable combination of the above.
这里所描述的计算机可读程序指令或代码可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions or code described herein may be downloaded from a computer-readable storage medium to various computing/processing devices, or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium in the respective computing/processing device .
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本申请的各个方面。The computer program instructions used to perform the operations of this application can be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or one or more Source code or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server implement. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or it can be connected to an external computer (e.g. Use an Internet service provider to connect via the Internet). In some embodiments, electronic circuits are customized by utilizing state information of computer-readable program instructions, such as programmable logic circuits, field-programmable gate arrays (Field-Programmable Gate Arrays, FPGAs) or programmable logic arrays (Programmable Logic Array (PLA), the electronic circuit can execute computer-readable program instructions to implement various aspects of the present application.
这里参照根据本申请实施例的方法、装置(***)和计算机程序产品的流程图和/或框图描述了本申请的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Various aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine that, when executed by the processor of the computer or other programmable data processing apparatus, , resulting in an apparatus that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium. These instructions cause the computer, programmable data processing device and/or other equipment to work in a specific manner. Therefore, the computer-readable medium storing the instructions includes An article of manufacture that includes instructions that implement aspects of the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的 指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operating steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , so that execution on a computer, other programmable data processing device, or other equipment The instructions implement the functions/actions specified in one or more blocks in the flowchart and/or block diagrams.
附图中的流程图和框图显示了根据本申请的多个实施例的装置、***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。The flowcharts and block diagrams in the figures illustrate the architecture, functionality and operations of possible implementations of apparatuses, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions that embody one or more elements for implementing the specified logical function(s). Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two consecutive blocks may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行相应的功能或动作的硬件(例如电路或ASIC(Application Specific Integrated Circuit,专用集成电路))来实现,或者可以用硬件和软件的组合,如固件等来实现。It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by hardware (such as circuits or ASICs) that perform the corresponding function or action. Specific Integrated Circuit), or can be implemented with a combination of hardware and software, such as firmware.
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其它变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其它单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present application has been described herein in connection with various embodiments, in practicing the claimed application, those skilled in the art will understand and understand by reviewing the drawings, the disclosure, and the appended claims. Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may perform several of the functions recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not mean that a combination of these measures cannot be combined to advantageous effects.
以上已经描述了本申请的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。 The embodiments of the present application have been described above. The above description is illustrative, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (43)

  1. 一种资源规格的确定方法,其特征在于,所述方法包括:A method for determining resource specifications, characterized in that the method includes:
    获取目标网元的第一运行模式,所述第一运行模式指示所述目标网元的至少一种功能的使能状态;Obtaining a first operating mode of the target network element, where the first operating mode indicates an enabling state of at least one function of the target network element;
    根据所述第一运行模式确定所述目标网元的目标资源的资源规格,所述资源规格指示所述目标资源在所述目标网元中的最大存储量。Resource specifications of target resources of the target network element are determined according to the first operating mode, and the resource specifications indicate a maximum storage amount of the target resource in the target network element.
  2. 根据权利要求1所述的方法,其特征在于,所述方法包括:The method according to claim 1, characterized in that the method includes:
    根据所述目标网元的运行场景确定所述目标网元的第一运行模式。The first operating mode of the target network element is determined according to the operating scenario of the target network element.
  3. 根据权利要求2所述的方法,其特征在于,所述方法包括:The method according to claim 2, characterized in that the method includes:
    根据运行场景和运行模式的对应关系,将与所述目标网元的运行场景对应的运行模式确定为所述目标网元的第一运行模式。According to the corresponding relationship between the operating scenario and the operating mode, the operating mode corresponding to the operating scenario of the target network element is determined as the first operating mode of the target network element.
  4. 根据权利要求1所述的方法,其特征在于,所述方法包括:The method according to claim 1, characterized in that the method includes:
    根据所述目标网元的至少一种功能的使能状态确定所述目标网元的第一运行模式。The first operating mode of the target network element is determined according to the enabling state of at least one function of the target network element.
  5. 根据权利要求4所述的方法,其特征在于,所述方法包括:The method according to claim 4, characterized in that the method includes:
    根据所述目标网元的至少一种功能的使能状态获取所述目标网元的运行特征,所述运行特征包括以下至少一项运行子特征:所述目标网元使能的协议栈类型、所述目标网元的业务功能的使能状态,所述目标网元的第一资源的使用量和所述目标网元的第二资源的使用量的比例;The operation characteristics of the target network element are obtained according to the enablement status of at least one function of the target network element. The operation characteristics include at least one of the following operation sub-features: the protocol stack type enabled by the target network element, The enabling state of the service function of the target network element, the ratio of the usage of the first resource of the target network element to the usage of the second resource of the target network element;
    根据所述目标网元的运行特征确定所述目标网元的第一运行模式。The first operating mode of the target network element is determined according to the operating characteristics of the target network element.
  6. 根据权利要求5所述的方法,其特征在于,所述方法包括:The method according to claim 5, characterized in that the method includes:
    根据运行特征和运行模式的对应关系,确定与所述目标网元的运行特征对应的所述目标网元的第一运行模式。According to the corresponding relationship between the operation characteristics and the operation mode, the first operation mode of the target network element corresponding to the operation characteristics of the target network element is determined.
  7. 根据权利要求6所述的方法,其特征在于,所述方法包括:The method according to claim 6, characterized in that the method includes:
    获取第一映射表,所述第一映射表包括多个第一表项,每个第一表项指示运行特征与运行模式之间的对应关系;Obtain a first mapping table, where the first mapping table includes a plurality of first entries, each first entry indicating a correspondence between an operating characteristic and an operating mode;
    根据所述第一映射表,将与所述目标网元的运行特征匹配的运行特征对应的运行模式确定为所述目标网元的第一运行模式。According to the first mapping table, the operating mode corresponding to the operating feature matching the operating feature of the target network element is determined as the first operating mode of the target network element.
  8. 根据权利要求7所述的方法,其特征在于,所述目标网元的运行特征包括多个运行子特征,所述方法包括:The method according to claim 7, characterized in that the operation characteristics of the target network element include a plurality of operation sub-features, and the method includes:
    根据所述第一映射表,确定匹配的第一表项,所述匹配的第一表项包括的多个子特征与所述多个运行子特征均匹配; According to the first mapping table, a matching first entry is determined, and a plurality of sub-features included in the matching first entry all match the plurality of operating sub-features;
    将所述匹配的第一表项中的运行模式确定为所述目标网元的第一运行模式。The operating mode in the matched first entry is determined as the first operating mode of the target network element.
  9. 根据权利要求8所述的方法,其特征在于,所述方法包括:The method according to claim 8, characterized in that the method includes:
    当不存在所述匹配的第一表项时,确定所述多个第一表项分别对应的匹配分数,任一第一表项的匹配分数指示所述多个运行子特征与所述任一第一表项包括的多个子特征之间的匹配程度;When there is no matching first entry, matching scores respectively corresponding to the plurality of first entries are determined, and the matching score of any first entry indicates that the plurality of operating sub-features are consistent with any of the The degree of matching between multiple sub-features included in the first table item;
    根据所述多个第一表项分别对应的匹配分数,确定所述目标网元的第一运行模式。The first operating mode of the target network element is determined according to the matching scores respectively corresponding to the plurality of first entries.
  10. 根据权利要求1至9任一所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 9, characterized in that the method includes:
    根据所述目标网元的第一运行模式,以及网络中运行模式为所述第一运行模式的多个网络设备的资源使用量和内存占用率确定所述目标网元的目标资源的资源规格。The resource specification of the target resource of the target network element is determined according to the first operating mode of the target network element and the resource usage and memory occupancy rate of multiple network devices in the network whose operating mode is the first operating mode.
  11. 根据权利要求1至9任一所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 9, characterized in that the method includes:
    根据运行模式和资源规格的对应关系以及所述目标网元的第一运行模式,确定所述目标网元的目标资源的资源规格。According to the corresponding relationship between the operating mode and the resource specification and the first operating mode of the target network element, the resource specification of the target resource of the target network element is determined.
  12. 根据权利要求11所述的方法,其特征在于,所述方法包括:The method according to claim 11, characterized in that the method includes:
    获取第二映射表,所述第二映射表包括多个第二表项,每个第二表项指示网元信息、运行模式与资源规格之间的对应关系,所述网元信息包括设备类型;Obtain a second mapping table. The second mapping table includes a plurality of second entries. Each second entry indicates a correspondence between network element information, operating modes, and resource specifications. The network element information includes device types. ;
    根据所述第二映射表,将与所述目标网元的网元信息和所述目标网元的第一运行模式对应的目标资源的资源规格确定为所述目标网元的目标资源的资源规格。According to the second mapping table, the resource specification of the target resource corresponding to the network element information of the target network element and the first operating mode of the target network element is determined as the resource specification of the target resource of the target network element. .
  13. 根据权利要求1至12任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 12, characterized in that the method further includes:
    根据所述目标网元的目标资源的资源使用量和所述目标网元的目标资源的资源规格,确定所述目标网元的目标资源的资源利用率。The resource utilization rate of the target resources of the target network element is determined according to the resource usage of the target resources of the target network element and the resource specifications of the target resources of the target network element.
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:The method of claim 13, further comprising:
    根据所述目标网元的目标资源的资源利用率评估所述目标网元的容量风险。Evaluate the capacity risk of the target network element according to the resource utilization rate of the target resource of the target network element.
  15. 根据权利要求14所述的方法,其特征在于,所述方法包括:The method according to claim 14, characterized in that the method includes:
    当所述目标资源的资源利用率满足风险条件时,确定所述目标网元存在容量风险。When the resource utilization rate of the target resource meets the risk condition, it is determined that the target network element has a capacity risk.
  16. 根据权利要求15所述的方法,其特征在于,所述风险条件包括:The method according to claim 15, characterized in that the risk conditions include:
    所述目标网元的目标资源的资源利用率大于利用率阈值,或者,所述目标网元的目标资源的资源利用率连续大于所述利用率阈值的时长超过时长阈值,或者,所述目标网元的目标资源的资源利用率连续大于所述利用率阈值的次数超过数量阈值。The resource utilization rate of the target resource of the target network element is greater than the utilization threshold, or the resource utilization rate of the target resource of the target network element is continuously greater than the utilization threshold for more than the duration threshold, or the target network element The number of times that the resource utilization rate of the target resource of the element is continuously greater than the utilization threshold value exceeds the quantity threshold value.
  17. 根据权利要求15或16所述的方法,其特征在于,所述目标网元的目标资源包括多个第一资源,所述方法包括: The method according to claim 15 or 16, characterized in that the target resources of the target network element include a plurality of first resources, and the method includes:
    若存在至少一个第一资源满足所述风险条件,确定所述目标网元存在容量风险。If there is at least one first resource that meets the risk condition, it is determined that the target network element has a capacity risk.
  18. 根据权利要求14至17任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 14 to 17, characterized in that the method further includes:
    当确定所述目标网元存在容量风险后,显示风险描述信息和/或风险处理建议。After it is determined that the target network element has a capacity risk, risk description information and/or risk treatment suggestions are displayed.
  19. 根据权利要求18所述的方法,其特征在于,所述风险描述信息包括如下至少一项:The method according to claim 18, characterized in that the risk description information includes at least one of the following:
    所述目标网元的标识、所述目标网元中存在容量风险的目标资源、所述目标网元中存在容量风险的目标资源的风险程度信息、所述目标网元的运行模式、所述目标网元的运行场景,或者所述目标网元使能的功能。The identification of the target network element, the target resources with capacity risks in the target network element, the risk degree information of the target resources with capacity risks in the target network element, the operation mode of the target network element, the target The operating scenario of the network element, or the functions enabled by the target network element.
  20. 根据权利要求18或19所述的方法,其特征在于,所述风险处理建议包括如下至少一项:The method according to claim 18 or 19, characterized in that the risk treatment suggestions include at least one of the following:
    更换所述目标网元的设备类型、迁移所述目标网元的目标业务或切换所述目标网元的运行模式。Change the device type of the target network element, migrate the target service of the target network element, or switch the operating mode of the target network element.
  21. 一种资源规格的确定装置,其特征在于,所述装置包括:A device for determining resource specifications, characterized in that the device includes:
    获取单元,用于获取目标网元的第一运行模式,所述第一运行模式指示所述目标网元的至少一种功能的使能状态;An acquisition unit configured to acquire the first operating mode of the target network element, where the first operating mode indicates the enabling state of at least one function of the target network element;
    确定单元,用于根据所述第一运行模式确定所述目标网元的目标资源的资源规格,所述资源规格指示所述目标资源在所述目标网元中的最大存储量。A determining unit configured to determine a resource specification of a target resource of the target network element according to the first operating mode, where the resource specification indicates a maximum storage amount of the target resource in the target network element.
  22. 根据权利要求21所述的装置,其特征在于,The device according to claim 21, characterized in that:
    所述获取单元,用于根据所述目标网元的运行场景获取所述目标网元的第一运行模式。The obtaining unit is configured to obtain the first operating mode of the target network element according to the operating scenario of the target network element.
  23. 根据权利要求22所述的装置,其特征在于,The device according to claim 22, characterized in that:
    所述获取单元,用于根据运行场景和运行模式的对应关系,将与所述目标网元的运行场景对应的运行模式确定为所述目标网元的第一运行模式。The obtaining unit is configured to determine the operating mode corresponding to the operating scenario of the target network element as the first operating mode of the target network element according to the corresponding relationship between the operating scenario and the operating mode.
  24. 根据权利要求21所述的装置,其特征在于,The device according to claim 21, characterized in that:
    所述获取单元,用于根据所述目标网元的至少一种功能的使能状态获取所述目标网元的第一运行模式。The obtaining unit is configured to obtain the first operating mode of the target network element according to the enabling state of at least one function of the target network element.
  25. 根据权利要求24所述的装置,其特征在于,The device according to claim 24, characterized in that:
    所述获取单元,用于根据所述目标网元的至少一种功能的使能状态获取所述目标网元的运行特征,所述运行特征包括以下至少一项运行子特征:所述目标网元使能的协议栈类型、所述目标网元的业务功能的使能状态,所述目标网元的第一资源的使用量和所述目标网元的第二资源的使用量的比例;The acquisition unit is configured to acquire the operation characteristics of the target network element according to the enabling state of at least one function of the target network element. The operation characteristics include at least one of the following operation sub-features: the target network element The enabled protocol stack type, the enabling status of the service function of the target network element, the ratio of the usage of the first resource of the target network element to the usage of the second resource of the target network element;
    所述获取单元,还用于根据所述目标网元的运行特征获取所述目标网元的第一运行模式。 The obtaining unit is further configured to obtain the first operating mode of the target network element according to the operating characteristics of the target network element.
  26. 根据权利要求25所述的装置,其特征在于,The device according to claim 25, characterized in that:
    所述获取单元,用于根据运行特征和运行模式的对应关系,获取与所述目标网元的运行特征对应的所述目标网元的第一运行模式。The acquisition unit is configured to acquire the first operation mode of the target network element corresponding to the operation characteristics of the target network element according to the corresponding relationship between the operation characteristics and the operation mode.
  27. 根据权利要求26所述的装置,其特征在于,The device according to claim 26, characterized in that:
    所述获取单元,用于获取第一映射表,所述第一映射表包括多个第一表项,每个第一表项指示运行特征与运行模式之间的对应关系;The acquisition unit is configured to acquire a first mapping table, where the first mapping table includes a plurality of first entries, each first entry indicating a correspondence between operating characteristics and operating modes;
    所述获取单元,还用于根据所述第一映射表,将与所述目标网元的运行特征匹配的运行特征对应的运行模式确定为所述目标网元的第一运行模式。The obtaining unit is further configured to determine, according to the first mapping table, an operating mode corresponding to an operating feature that matches an operating feature of the target network element as the first operating mode of the target network element.
  28. 根据权利要求27所述的装置,其特征在于,所述目标网元的运行特征包括多个运行子特征,The device according to claim 27, characterized in that the operation characteristics of the target network element include a plurality of operation sub-features,
    所述获取单元,用于根据所述第一映射表,确定匹配的第一表项,所述匹配的第一表项包括的多个子特征与所述多个运行子特征均匹配;The acquisition unit is configured to determine a matching first entry according to the first mapping table, and the plurality of sub-features included in the matching first entry all match the plurality of operating sub-features;
    所述获取单元,还用于将所述匹配的第一表项中的运行模式确定为所述目标网元的第一运行模式。The obtaining unit is further configured to determine the operating mode in the matched first entry as the first operating mode of the target network element.
  29. 根据权利要求28所述的装置,其特征在于,所述获取单元用于:The device according to claim 28, characterized in that the acquisition unit is used for:
    当不存在所述匹配的第一表项时,确定所述多个第一表项分别对应的匹配分数,任一第一表项的匹配分数指示所述多个运行子特征与所述任一第一表项包括的多个子特征之间的匹配程度;When there is no matching first entry, matching scores respectively corresponding to the plurality of first entries are determined, and the matching score of any first entry indicates that the plurality of operating sub-features are consistent with any of the The degree of matching between multiple sub-features included in the first table item;
    根据所述多个第一表项分别对应的匹配分数,确定所述目标网元的第一运行模式。The first operating mode of the target network element is determined according to the matching scores respectively corresponding to the plurality of first entries.
  30. 根据权利要求21至29任一所述的装置,其特征在于,The device according to any one of claims 21 to 29, characterized in that:
    所述确定单元,用于根据所述目标网元的第一运行模式,以及网络中运行模式为所述第一运行模式的多个网络设备的资源使用量和内存占用率确定所述目标网元的目标资源的资源规格。The determining unit is configured to determine the target network element according to the first operating mode of the target network element and the resource usage and memory occupancy rate of multiple network devices in the network whose operating mode is the first operating mode. The resource specification of the target resource.
  31. 根据权利要求21至29任一所述的装置,其特征在于,The device according to any one of claims 21 to 29, characterized in that:
    所述确定单元,用于根据运行模式和资源规格的对应关系以及所述目标网元的第一运行模式,确定所述目标网元的目标资源的资源规格。The determining unit is configured to determine the resource specification of the target resource of the target network element according to the corresponding relationship between the operating mode and the resource specification and the first operating mode of the target network element.
  32. 根据权利要求31所述的装置,其特征在于,所述确定单元用于:The device according to claim 31, characterized in that the determining unit is used for:
    获取第二映射表,所述第二映射表包括多个第二表项,每个第二表项指示网元信息、运行模式与资源规格之间的对应关系,所述网元信息包括设备类型;Obtain a second mapping table. The second mapping table includes a plurality of second entries. Each second entry indicates a correspondence between network element information, operating modes, and resource specifications. The network element information includes device types. ;
    根据所述第二映射表,将与所述目标网元的网元信息和所述目标网元的第一运行模式对应的目标资源的资源规格确定为所述目标网元的目标资源的资源规格。 According to the second mapping table, the resource specification of the target resource corresponding to the network element information of the target network element and the first operating mode of the target network element is determined as the resource specification of the target resource of the target network element. .
  33. 根据权利要求21至32任一所述的装置,其特征在于,The device according to any one of claims 21 to 32, characterized in that:
    所述确定单元,还用于根据所述目标网元的目标资源的资源使用量和所述目标网元的目标资源的资源规格,确定所述目标网元的目标资源的资源利用率。The determining unit is further configured to determine the resource utilization rate of the target resource of the target network element based on the resource usage of the target resource of the target network element and the resource specification of the target resource of the target network element.
  34. 根据权利要求33所述的装置,其特征在于,所述装置还包括评估单元,The device according to claim 33, characterized in that the device further comprises an evaluation unit,
    所述评估单元,用于根据所述目标网元的目标资源的资源利用率评估所述目标网元的容量风险。The evaluation unit is configured to evaluate the capacity risk of the target network element according to the resource utilization rate of the target resource of the target network element.
  35. 根据权利要求34所述的装置,其特征在于,所述评估单元用于:The device according to claim 34, characterized in that the evaluation unit is used for:
    当所述目标资源的资源利用率满足风险条件时,确定所述目标网元存在容量风险。When the resource utilization rate of the target resource meets the risk condition, it is determined that the target network element has a capacity risk.
  36. 根据权利要求35所述的装置,其特征在于,所述风险条件包括:The device according to claim 35, characterized in that the risk conditions include:
    所述目标网元的目标资源的资源利用率大于利用率阈值,或者,所述目标网元的目标资源的资源利用率连续大于所述利用率阈值的时长超过时长阈值,或者,所述目标网元的目标资源的资源利用率连续大于所述利用率阈值的次数超过数量阈值。The resource utilization rate of the target resource of the target network element is greater than the utilization threshold, or the resource utilization rate of the target resource of the target network element is continuously greater than the utilization threshold for more than the duration threshold, or the target network element The number of times that the resource utilization rate of the target resource of the element is continuously greater than the utilization threshold value exceeds the quantity threshold value.
  37. 根据权利要求35或36所述的装置,其特征在于,所述目标网元的目标资源包括多个第一资源,所述评估单元用于:The device according to claim 35 or 36, wherein the target resources of the target network element include a plurality of first resources, and the evaluation unit is configured to:
    若存在至少一个第一资源满足所述风险条件,确定所述目标网元存在容量风险。If there is at least one first resource that meets the risk condition, it is determined that the target network element has a capacity risk.
  38. 根据权利要求34至37任一所述的装置,其特征在于,所述装置还包括显示单元,The device according to any one of claims 34 to 37, characterized in that the device further includes a display unit,
    所述显示单元,用于当确定所述目标网元存在容量风险后,显示风险描述信息和/或风险处理建议。The display unit is configured to display risk description information and/or risk treatment suggestions after it is determined that the target network element has a capacity risk.
  39. 根据权利要求38所述的装置,其特征在于,所述风险描述信息包括如下至少一项:The device according to claim 38, wherein the risk description information includes at least one of the following:
    所述目标网元的标识、所述目标网元中存在容量风险的目标资源、所述目标网元中存在容量风险的目标资源的风险程度信息、所述目标网元的运行模式、所述目标网元的运行场景,或者所述目标网元使能的功能。The identification of the target network element, the target resources with capacity risks in the target network element, the risk degree information of the target resources with capacity risks in the target network element, the operation mode of the target network element, the target The operating scenario of the network element, or the functions enabled by the target network element.
  40. 根据权利要求38或39所述的装置,其特征在于,所述风险处理建议包括如下至少一项:The device according to claim 38 or 39, characterized in that the risk treatment suggestions include at least one of the following:
    更换所述目标网元的设备类型、迁移所述目标网元的目标业务或切换所述目标网元的运行模式。Change the device type of the target network element, migrate the target service of the target network element, or switch the operating mode of the target network element.
  41. 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,A computer device, characterized in that the computer device includes a processor and a memory,
    所述存储器,用于存储计算机程序,所述计算机程序包括程序指令;The memory is used to store a computer program, the computer program includes program instructions;
    所述处理器,用于调用所述计算机程序,实现如权利要求1-20任意一项所述的方法。The processor is used to call the computer program to implement the method according to any one of claims 1-20.
  42. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储 介质上存储有指令,当所述指令被处理器执行时,实现权利要求1-20中任意一项所述的方法。A non-volatile computer-readable storage medium, characterized in that the non-volatile computer-readable storage medium Instructions are stored on the medium, and when the instructions are executed by the processor, the method described in any one of claims 1-20 is implemented.
  43. 一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序被处理器执行时,实现如权利要求1-20任意一项所述的方法。 A computer program product, characterized in that it includes a computer program. When the computer program is executed by a processor, the method according to any one of claims 1-20 is implemented.
PCT/CN2023/090102 2022-04-28 2023-04-23 Resource specification determination method and related apparatus WO2023207851A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210462504.X 2022-04-28
CN202210462504 2022-04-28
CN202211176974.6A CN117014283A (en) 2022-04-28 2022-09-26 Method and related device for determining resource specification
CN202211176974.6 2022-09-26

Publications (1)

Publication Number Publication Date
WO2023207851A1 true WO2023207851A1 (en) 2023-11-02

Family

ID=88517724

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/090102 WO2023207851A1 (en) 2022-04-28 2023-04-23 Resource specification determination method and related apparatus

Country Status (1)

Country Link
WO (1) WO2023207851A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107515784A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 A kind of method and apparatus of computing resource in a distributed system
CN112000253A (en) * 2020-09-01 2020-11-27 腾讯数码(天津)有限公司 Theme resource processing method and device, computer equipment and storage medium
CN112534940A (en) * 2018-08-03 2021-03-19 Oppo广东移动通信有限公司 Resource allocation method, terminal equipment and network equipment
CN112804687A (en) * 2019-11-14 2021-05-14 华为技术有限公司 Resource allocation method, device, system and storage medium
US11128699B1 (en) * 2019-06-27 2021-09-21 Amazon Technologies, Inc. Predictive load balancer capacity scaling
CN114172819A (en) * 2021-12-07 2022-03-11 中国电信股份有限公司 Demand resource prediction method, system, electronic device and storage medium for NFV network element

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107515784A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 A kind of method and apparatus of computing resource in a distributed system
CN112534940A (en) * 2018-08-03 2021-03-19 Oppo广东移动通信有限公司 Resource allocation method, terminal equipment and network equipment
US11128699B1 (en) * 2019-06-27 2021-09-21 Amazon Technologies, Inc. Predictive load balancer capacity scaling
CN112804687A (en) * 2019-11-14 2021-05-14 华为技术有限公司 Resource allocation method, device, system and storage medium
CN112000253A (en) * 2020-09-01 2020-11-27 腾讯数码(天津)有限公司 Theme resource processing method and device, computer equipment and storage medium
CN114172819A (en) * 2021-12-07 2022-03-11 中国电信股份有限公司 Demand resource prediction method, system, electronic device and storage medium for NFV network element

Similar Documents

Publication Publication Date Title
RU2583745C2 (en) Network system, switch and method of detecting connected terminal
US9064216B2 (en) Identifying likely faulty components in a distributed system
US8989188B2 (en) Preventing leaks among private virtual local area network ports due to configuration changes in a headless mode
US9584369B2 (en) Methods of representing software defined networking-based multiple layer network topology views
US10142160B1 (en) System and methods for managing network hardware address requests with a controller
US10270645B2 (en) Systems and methods for handling link aggregation failover with a controller
JP2019030211A (en) O ring fet control method for battery backup system
US9397922B1 (en) Automated network testing platform
US20160315809A1 (en) METHODS, SYSTEMS, AND COMPUTER READABLE MEDIA FOR MULTI-LAYER ORCHESTRATION IN SOFTWARE DEFINED NETWORKS (SDNs)
TW201638712A (en) Server systems and computer-implemented methods and non-transitory computer readable storage mediums thereof
CN109005126B (en) Data stream processing method, device and computer readable storage medium
WO2014011799A1 (en) System and method for spammer host detection from network flow data profiles
EP2822240A1 (en) Systems and methods for increasing the scalability of software-defined networks
WO2018068588A1 (en) Method and software-defined networking (sdn) controller for providing multicast service
US11582102B2 (en) Systems and methods for integrating network switch management with computing resource management
CN116436838A (en) Network access controller and method
US20230216786A1 (en) Method for forwarding service packet, method for sending sr policy, device, and system
US11070438B1 (en) Apparatus, system, and method for collecting network statistics information
RU2687215C1 (en) Method and device for transmitting information on openflow switch functions
US9667497B2 (en) Virtual controller group management system
WO2023207851A1 (en) Resource specification determination method and related apparatus
CN112311672B (en) Method, device and equipment for obtaining routing table item
WO2021093510A1 (en) Method and system for processing network service, and gateway device
CN117014283A (en) Method and related device for determining resource specification
WO2023193498A1 (en) Network reliability evaluation method, apparatus, computing device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23795284

Country of ref document: EP

Kind code of ref document: A1