CN107911251B - Network equipment configuration method, device and medium - Google Patents

Network equipment configuration method, device and medium Download PDF

Info

Publication number
CN107911251B
CN107911251B CN201711297035.6A CN201711297035A CN107911251B CN 107911251 B CN107911251 B CN 107911251B CN 201711297035 A CN201711297035 A CN 201711297035A CN 107911251 B CN107911251 B CN 107911251B
Authority
CN
China
Prior art keywords
port
information
scheme
candidate
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711297035.6A
Other languages
Chinese (zh)
Other versions
CN107911251A (en
Inventor
吴锦树
张华北
吴必春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
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
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201711297035.6A priority Critical patent/CN107911251B/en
Publication of CN107911251A publication Critical patent/CN107911251A/en
Application granted granted Critical
Publication of CN107911251B publication Critical patent/CN107911251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/12Discovery or management of network topologies
    • 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
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network equipment configuration method, a network equipment configuration device and a network equipment configuration medium, which are used for improving the network equipment configuration efficiency and reducing the network equipment configuration cost. The network equipment configuration method comprises the following steps: receiving a network topology scheme matching request sent by control equipment, wherein the network topology scheme matching request carries network equipment environment information, function information to be realized and material preparation information, and the network equipment environment information comprises first port information; matching candidate topology schemes in pre-stored network topology schemes, wherein the candidate topology schemes comprise material demand information and second port information; matching material preparation information and material demand information to obtain a first matching result and matching each port parameter to obtain a second matching result aiming at each matched candidate topology scheme; determining a weight value corresponding to the candidate topology scheme according to the first matching result, the second matching result and the weight configured for the material information and each port parameter in advance; and determining the candidate topology scheme with the maximum weight value as the optimal topology scheme.

Description

Network equipment configuration method, device and medium
Technical Field
The present invention relates to the field of computer network technologies, and in particular, to a method, an apparatus, and a medium for configuring a network device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the rapid development of information technology, data center coverage services are more and more abundant, the number of devices in the data center is also continuously increased, and the configuration of environment devices is more and more complex. In addition, the user has high efficiency, stability and pertinence for the topology scheme for realizing the function and the port configuration information. Therefore, how to realize the automatic deployment of efficient environment topology, the automatic configuration of port information, and the automatic test of the scheme for establishing environment topology verification is an urgent problem to be solved.
At present, the scheme for realizing the function configuration of the equipment mainly arranges professional technicians to build a field environment and manually configure information of ports based on technical experiences. The manual scheme has low automation degree, low efficiency, large human resource investment and labor cost increase. In addition, the quality of the manually configured functional environment lacks effective test verification, and the change of the environment has a large influence on the function, even causes the problem of functional failure. At present, a semi-automatic configuration scheme mainly performs automatic port configuration aiming at specific functions by building a general environment. The environment is set up complicatedly by adopting a universal topological scheme, and the resource utilization rate is low; the process of manually building environment topology and configuring port information has high requirements on skills of operators and improves labor cost.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, and a medium for configuring a network device, so as to improve network device configuration efficiency and reduce network device configuration cost.
In a first aspect, a network device configuration method is provided, including:
receiving a network topology scheme matching request sent by a control device, wherein the topology scheme matching request carries network device configuration information, the network configuration information comprises network device environment information, function information to be realized and material preparation information, and the network device environment information comprises first port information;
matching a candidate topology scheme in a pre-stored network topology scheme according to the function information to be realized and the network equipment environment information, wherein the candidate topology scheme comprises material demand information and second port information;
for each matched candidate topology scheme, matching the material preparation information and the material demand information to obtain a first matching result and matching each port parameter contained in the first port information and the second port information to obtain a second matching result;
determining a weight value corresponding to the candidate topology scheme according to the first matching result, the second matching result and the weight configured for the material information and each port parameter in advance;
and determining the candidate topology scheme with the maximum weight value as the optimal topology scheme.
Optionally, determining a weight value corresponding to the candidate topology scheme according to the matching result and a weight configured for the material information and each port parameter in advance, specifically including:
for each candidate topology scheme matched, the method is determined as followsThe weight values corresponding to the candidate topology schemes are as follows:
Figure BDA0001500499990000021
wherein:
αwif the material preparation information is matched with the material demand information, alpha is the weighted value corresponding to the material informationwThe value is a preset weighted value, if the material preparation information is not matched with the material demand information, alpha iswThe value is 0;
n is the number of port parameters contained in the first port information or the second port information;
αnif the nth port parameter in the first port information is matched with the nth port parameter in the second port information, alpha is the weighted value corresponding to the nth port parameternThe value is a preset weighted value, if the nth port parameter in the first port information is not matched with the nth port parameter in the second port information, alpha isnThe value is 0;
βwthe weight value is pre-allocated to the material information;
βnand assigning a weight value for the nth port parameter in advance.
Optionally, the first port information includes a demand port type and a cable resource; and
before determining the candidate topology scheme with the largest weight value as the optimal topology scheme, the method further comprises the following steps:
calling an equivalent port function table aiming at port parameters which are not matched and are in second port information contained in the candidate topology scheme with the largest weight value, and matching the candidate equivalent port scheme in the equivalent port function table according to the type of the required port and the cable resource;
for each matched candidate equivalent port scheme, determining a weight value of the candidate equivalent port scheme according to a weight configured for unmatched port parameters in advance;
and determining the candidate equivalent port scheme with the maximum weight value as the optimal equivalent port alternative scheme.
Optionally, the network device configuration method further includes:
and returning the determined optimal topology scheme to the control equipment, so that the control equipment configures the network equipment according to the optimal topology scheme.
In a second aspect, a network device configuration apparatus is provided, including:
the system comprises a receiving unit and a control unit, wherein the receiving unit is used for receiving a network topology scheme matching request sent by a control device, the topology scheme matching request carries network device configuration information, the network configuration information comprises network device environment information, function information to be realized and material preparation information, and the network device environment information comprises first port information;
the first matching unit is used for matching a candidate topology scheme in a pre-stored network topology scheme according to the function information to be realized and the network equipment environment information, wherein the candidate topology scheme comprises material demand information and second port information;
the second matching unit is used for matching the material preparation information and the material demand information to obtain a first matching result and matching each port parameter contained in the first port information and the second port information to obtain a second matching result aiming at each matched candidate topology scheme;
the first determining unit is used for determining a weight value corresponding to the candidate topology scheme according to the first matching result and the second matching result obtained by the second matching unit and the weight configured for the material information and the parameters of each port in advance;
and the second determining unit is used for determining the candidate topology scheme with the largest weight value as the optimal topology scheme.
Optionally, the first determining unit is specifically configured to, for each matched candidate topology scheme, determine a weight value corresponding to the candidate topology scheme according to the following method:
Figure BDA0001500499990000041
wherein:
αwweight corresponding to material informationValue, if the material preparation information and the material demand information match, αwThe value is a preset weighted value, if the material preparation information is not matched with the material demand information, alpha iswThe value is 0;
n is the number of port parameters contained in the first port information or the second port information;
αnif the nth port parameter in the first port information is matched with the nth port parameter in the second port information, alpha is the weighted value corresponding to the nth port parameternThe value is a preset weighted value, if the nth port parameter in the first port information is not matched with the nth port parameter in the second port information, alpha isnThe value is 0;
βwthe weight value is pre-allocated to the material information;
βnand assigning a weight value for the nth port parameter in advance.
Optionally, the first port information includes a demand port type and a cable resource; and
the device, still include:
a calling unit, configured to, before the second determining unit determines the candidate topology scheme with the largest weight value as the optimal topology scheme, call an equivalent port function table for a port parameter in the second port information and not in match included in the candidate topology scheme with the largest weight value, and match the candidate equivalent port scheme in the equivalent port function table according to the required port type and the cable resource;
a third determining unit, configured to determine, for each matched candidate equivalent port scheme, a weight value of the candidate equivalent port scheme according to a weight configured for a port parameter that is not matched in advance;
and the fourth determining unit is used for determining the candidate equivalent port scheme with the largest weight value as the optimal equivalent port alternative scheme.
Optionally, the network device configuring apparatus further includes:
and the returning unit is used for returning the determined optimal topology scheme to the control equipment, so that the control equipment carries out network equipment configuration according to the optimal topology scheme.
In a third aspect, a computing device is provided, comprising at least one processing unit and at least one memory unit, wherein the memory unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of any of the above methods.
In a fourth aspect, there is provided a computer readable medium storing a computer program executable by a computing device, the program, when run on the computing device, causing the computing device to perform the steps of any of the methods described above.
In the network configuration method, the device and the medium provided by the embodiment of the invention, the network topology scheme is pre-stored at the network side, so that when the network equipment configuration is needed, a network topology scheme matching request is sent to the network side through the control equipment, wherein the network topology scheme matching request carries network equipment configuration information, the network side matches the candidate topology scheme according to function information to be realized and network equipment environment information in the network equipment configuration information, material preparation information and material demand information in the candidate topology scheme and each port parameter contained in the first port information and the second port information are matched, and a weight value corresponding to the candidate topology scheme is determined according to a matching result and a weight pre-configured for the material information and each port parameter, so that an optimal topology scheme is selected, and the process does not need manual participation, so that the efficiency of the network equipment configuration is improved, the error probability of manual configuration is reduced, and the accuracy of network equipment configuration is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an implementation of a network device configuration method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a network device configuration apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a computing device according to an embodiment of the invention.
Detailed Description
In order to improve efficiency and accuracy of network device configuration, embodiments of the present invention provide a network device configuration method, apparatus, and medium.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention, and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
As shown in fig. 1, which is a schematic view of an application scenario of the embodiment of the present invention, the application scenario includes a network device 11 to be configured, a server 12, and a control device 13, where the control device 13 may be a portable PC (personal computer) installed with an automation configuration software, the automation configuration software uses a Robot frame to develop automation control switch device software, and writes a script configured by a port command using a Python language. The control device 13 may access the output result calculated and analyzed by the server through the ethernet, or may indirectly control the network device to be configured (for example, a switch device in a specific implementation) through the access router. The control device 13 and the network device 11 to be configured further include an access router 14, the access router 14 is directly connected to the network device 11 to be configured, and is connected and communicated with the switch control serial port through the management server, so that the function of remotely configuring port information can be realized. Therefore, the control device can indirectly and remotely read and write device information, verify configuration test and the like on the network device to be configured through the Ethernet.
The server 12 is mainly used for storing and calculating data, wherein the storage of the topology scheme database and the matching analysis of the optimal topology scheme are included, the data are quickly calculated and analyzed through high-performance hardware configuration, the optimal topology scheme is output and sent to the control device 13.
The network topology scheme stored in the database mainly has two sources, namely a universal topology scheme is respectively manually introduced, and the universal topology scheme meeting most functional requirements is artificially designed and updated and synchronized into the network topology scheme database; in addition, a topology scheme is collected for the market environment, the topology scheme with stable market is synchronously updated through the Ethernet, network topology scheme items in the database are increased, and the functional coverage of the network topology scheme database is improved. The database comprises a large amount of scheme item information, wherein the scheme items mainly comprise information such as a topology scheme realization function, material requirements, physical topology, a port configuration command, a verification test script and the like, and scheme matching is carried out according to functional parameter information input by automatic configuration software. As shown in table 1, which is a possible illustration of the network topology stored in the database, each row represents a network topology, each network topology is numbered:
TABLE 1
Figure BDA0001500499990000071
Wherein, the numbering means that each row represents a network topology scheme, and each network topology scheme is marked by a numbering; the function refers to a function realized by a network topology scheme; the board card refers to the type of the board card adopted for realizing the function of corresponding numbering; the software version refers to the software version adopted for realizing the function with the corresponding number; the port number refers to the maximum port number of the board card capable of providing the support function; the material is the type of material required for realizing the function of corresponding numbering; the number of the chassis refers to the number of the chassis which can realize the function of corresponding numbering and at least needs to be satisfied: for example, it is necessary to implement a VSU (Virtual Switching Unit) function, establish n VSL (Virtual Switching Link) ports, and at least 2 chassis are required; the requirement port type is the requirement port type for realizing the network topology scheme with corresponding number; the configuration command refers to a configuration command of a correspondingly numbered network topology scheme.
And the server updates the network topology scheme stored in the database in real time through the Ethernet. For example, by collecting market environment topology information and continuously learning and perfecting a network topology scheme database, the method has the advantages of realizing large data storage and remote downloading.
Preferably, when the test system is implemented, the test system may further include a test device 15, and the test device 15 is connected to the network device 11 to be configured through the ethernet, so that remote test verification may be implemented. The test equipment 15 mainly sends and receives data messages, simulates the use environment of a user, and verifies whether the configuration port information meets the actual function through simulation. In addition, the test equipment 15 may also serve as an equipment performance test tool. The test device 15 may adopt a TestCenter device, extract a function test script in a solution library by an automated configuration software, configure a simulation function of the TestCenter device through an ethernet, and the TestCenter device constructs corresponding message data to perform function simulation. And the automatic configuration software judges whether the configuration is successful or not by acquiring information fed back by the network equipment terminal to be configured and the TestCenter equipment.
Based on the application scenario shown in fig. 1, an embodiment of the present invention provides a network device configuration method, as shown in fig. 2, which is an implementation flow diagram of the network device configuration method provided in the embodiment of the present invention, and the implementation flow diagram may include the following steps:
and S21, receiving a network topology scheme matching request sent by the control equipment.
The topology scheme matching request carries network equipment configuration information, wherein the network configuration information comprises network equipment environment information, function information to be realized and material preparation information, and the network equipment environment information comprises first port information.
When the method is specifically implemented, the Python automation configuration software installed in the control equipment can acquire the network equipment environment information through the command script, the network equipment environment information can be used as an actual resource table, and the actual resource table mainly comprises the following steps: the device model, the board card information, the port information, the environment configuration information and the like.
In order to improve the matching quality of the topology scheme, in the embodiment of the invention, a user can also input the function information and the material preparation information which need to be realized through automatic configuration software, and the information of the functions, the software boundary conditions, the external components of the switch equipment and the like which are required to be realized by the configuration environment is used as the limiting parameters in the subsequent topology scheme matching process. For example, the information entered by the user through the automated configuration software is as follows:
1. the functions are as follows: establishing IP addresses of 10 different network segments (1.1.1.1-1.1.10.1/24);
2. materials: 10 AOC lines of 10G;
3. software boundary: soft1/soft2/soft3 … …;
4. board card: 24GT24SPF4XS-AC
5. The equipment model is as follows: S1/S2/S3.
Therefore, the functional information to be realized is IP addresses for establishing 10 different network segments, and the material preparation information is 10 AOC (active optical cable) lines.
After the control device obtains the network device configuration information, it sends a network topology scheme matching request to the server, where the network topology scheme matching request carries the obtained network device configuration information.
And S22, matching a candidate topology scheme in a pre-stored network topology scheme according to the function information to be realized and the network equipment environment information, wherein the candidate topology scheme comprises material requirement information and second port information.
In the embodiment of the invention, the topological scheme matching algorithm realizes the sufficient conditions and the necessary conditions based on the environment function, classifies the matching parameters, performs the matching analysis of the sufficient condition parameters on the premise of meeting the necessary conditions, and calculates the matching association degree of each topological scheme.
In specific implementation, the implementation function and the card transaction type can be used as necessary conditions, and the number of cases, the types of the demand ports and the like can be used as sufficient conditions to be matched in a pre-stored network topology scheme.
Taking the network topology scheme shown in table 1 as an example, first matching is performed in the network topology scheme according to the necessary conditions, that is, the function information to be implemented and the board type are necessary conditions. In this example, the functions to be implemented are to establish IP addresses of 10 different network segments, and the board card type is 24GT24SPF4 XS-AC. Accordingly, the candidate topology schemes numbered 1,2,3 and 4 can be matched in table 1.
And S23, for each matched candidate topology scheme, matching the material preparation information and the material demand information to obtain a first matching result and matching each port parameter contained in the first port information and the second port information to obtain a second matching result.
S24, determining a weight value corresponding to the candidate topology scheme according to the first matching result, the second matching result and the weight configured for the material information and each port parameter in advance.
In step S24, the weight value corresponding to each candidate topology may be determined according to the following formula:
Figure BDA0001500499990000101
wherein:
αwif the material preparation information is matched with the material demand information, alpha is the weighted value corresponding to the material informationwThe value is a preset weighted value, if the material preparation information is not matched with the material demand information, alpha iswThe value is 0;
n is the number of port parameters contained in the first port information or the second port information;
αnif the nth port parameter in the first port information is matched with the nth port parameter in the second port information, alpha is the weighted value corresponding to the nth port parameternThe value is a preset weight value, if the nth port parameter and the second port parameter in the first port informationIf the nth port parameter in the port information does not match, then alphanThe value is 0;
βwthe weight value is pre-allocated to the material information;
βnand assigning a weight value for the nth port parameter in advance.
Assume that the weight value configured for the port number is 30%, the weight value configured for the material information is 60%, and the weight value configured for the demand port type is 80%.
For the selected candidate topology 1, the corresponding weight value is (0.3+0+0)/(0.3+0.6+0.8) ═ 0.17
For the selected candidate topology scheme 2, the corresponding weight values are: (0.3+0+0)/(0.3+0.6+0.8) ═ 0.17
For the selected candidate topology scheme 3, the corresponding weight values are: (0+0.6+0.8)/(0.3+0.6+0.8) ═ 0.82
For the selected candidate topology 4, the corresponding weight values are: (0+0+0)/(0.3+0.6+0.8) ═ 0
And S25, determining the candidate topological scheme with the largest weight value as the optimal topological scheme.
According to the calculation result of step S24, it can be determined that the candidate topological scheme 3 is the optimal topological scheme.
And the server returns the determined optimal topology scheme to the control equipment, so that the control equipment carries out network equipment configuration according to the optimal topology scheme. Specifically, for the successfully matched port, the corresponding configuration command in the optimal topology scheme is executed. For the port with unsuccessful matching, the equivalent port function table needs to be called to search for the alternative. The first port information includes a required port type and cable resources, for example, for the above example, the number of ports in the determined optimal network topology scheme fails to match with the cable resources, and therefore, an equivalent alternative scheme needs to be searched.
In specific implementation, before executing step S25, the method for configuring a network device according to the embodiment of the present invention may further include the following steps: calling an equivalent port function table aiming at port parameters which are contained in second port information and are not matched in the candidate topology scheme with the largest weight value, and matching the candidate equivalent port scheme in the equivalent port function table according to the type of the required port, the port and the cable resource; for each matched candidate equivalent port scheme, determining a weight value of the candidate equivalent port scheme according to a weight configured for unmatched port parameters in advance; and determining the candidate equivalent port scheme with the maximum weight value as the optimal equivalent port alternative scheme.
Specifically, as shown in table 2, it is an illustration of a pre-stored equivalent port function table:
TABLE 2
Figure BDA0001500499990000111
Wherein, the numbering means that each row represents an equivalent port alternative, and each equivalent alternative is marked by a number; function refers to a function that an alternative implements; the board card type refers to the board card type adopted by the alternative scheme; the original demand port type is the demand port type which is firstly matched with the requirement; cable resources refer to implementation alternatives, cable resource requirements; replacing the demand port type means implementing an alternative, replacing the demand port type; configuration commands refer to alternative configuration commands.
In specific implementation, the necessary conditions for matching are the type of the original demand port and the cable resource, and candidate equivalent port schemes can be matched, and further, further matching is performed according to the board card type, the alternative demand port type, the port number and the like under sufficient conditions, assuming that the weight values corresponding to the board card type, the alternative demand port type and the port number are respectively 80%, 50% and 60%, respectively, calculating the weight value corresponding to each candidate equivalent port scheme, wherein the specific calculation method is the same as the calculation method for calculating the weight value corresponding to each candidate topology scheme, and details are omitted here. As can be seen from the calculation, the weight value corresponding to the candidate equivalent port scheme 1 is the largest, so that a gigabit optical port can be used to replace a gigabit optical port, and a corresponding configuration command is obtained and issued to the control device, and is issued by the control device to the network device to be configured for execution.
In specific implementation, the equivalent port function table may be manually subjected to statistical recording and imported into the database, and the equivalent port function table is mainly used for classifying the board card port information based on the implementation function, wherein the port information includes a required port type, a port rate, a port external device and the like.
And according to the optimal network topology scheme determined in the step S25, modifying the optimal network topology scheme by combining the equivalent substitute port information to obtain a final network topology map.
In specific implementation, the configuration may be performed by acquiring 10 corresponding tera ports according to the read network device environment information, for example, if it is determined that there are 3 pieces of 24GT24SPF4XS-AC according to the read network device environment information.
In the network configuration method, the device and the medium provided by the embodiment of the invention, the network topology scheme is pre-stored at the network side, so that when the network equipment configuration is needed, a network topology scheme matching request is sent to the network side through the control equipment, wherein the network topology scheme matching request carries network equipment configuration information, the network side matches the candidate topology scheme according to function information to be realized and network equipment environment information in the network equipment configuration information, material preparation information and material demand information in the candidate topology scheme and each port parameter contained in the first port information and the second port information are matched, and a weight value corresponding to the candidate topology scheme is determined according to a matching result and a weight pre-configured for the material information and each port parameter, so that an optimal topology scheme is selected, and the process does not need manual participation, so that the efficiency of the network equipment configuration is improved, the error probability of manual configuration is reduced, and the accuracy of network equipment configuration is improved.
Based on the same inventive concept, the embodiment of the present invention further provides a network device configuration apparatus, and as the principle of the apparatus for solving the problem is similar to the network device configuration method, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 3, which is a schematic structural diagram of a network device configuration apparatus according to an embodiment of the present invention, the network device configuration apparatus may include:
a receiving unit 31, configured to receive a network topology matching request sent by a control device, where the topology matching request carries network device configuration information, the network configuration information includes network device environment information, function information to be implemented, and material preparation information, and the network device environment information includes first port information;
the first matching unit 32 is configured to match a candidate topology scheme in a pre-stored network topology scheme according to the function information to be implemented and the network device environment information, where the candidate topology scheme includes material requirement information and second port information;
a second matching unit 32, configured to match, for each matched candidate topology scheme, the material preparation information and the material requirement information to obtain a first matching result, and match each port parameter included in the first port information and the second port information to obtain a second matching result;
the first determining unit 34 is configured to determine a weight value corresponding to the candidate topology scheme according to the first matching result and the second matching result obtained by the second matching unit and a weight configured for the material information and each port parameter in advance;
and a second determining unit 35, configured to determine, as the optimal topology, the candidate topology with the largest weight value.
Optionally, the first determining unit 34 is specifically configured to, for each matched candidate topology scheme, determine a weight value corresponding to the candidate topology scheme according to the following method:
Figure BDA0001500499990000131
wherein:
αwif the material preparation information is matched with the material demand information, alpha is the weighted value corresponding to the material informationwThe value is a preset weighted value, if the material preparation information is not matched with the material demand information, alpha iswThe value is 0;
n is the number of port parameters contained in the first port information or the second port information;
αnif the nth port parameter in the first port information is matched with the nth port parameter in the second port information, alpha is the weighted value corresponding to the nth port parameternThe value is a preset weighted value, if the nth port parameter in the first port information is not matched with the nth port parameter in the second port information, alpha isnThe value is 0;
βwthe weight value is pre-allocated to the material information;
βnand assigning a weight value for the nth port parameter in advance.
Optionally, the first port information includes a demand port type and a cable resource; and
the device, still include:
a calling unit, configured to, before the second determining unit 35 determines the candidate topology scheme with the largest weight value as the optimal topology scheme, call an equivalent port function table for a port parameter in the second port information and not in match included in the candidate topology scheme with the largest weight value, and match the candidate equivalent port scheme in the equivalent port function table according to the required port type and the cable resource;
a third determining unit, configured to determine, for each matched candidate equivalent port scheme, a weight value of the candidate equivalent port scheme according to a weight configured for a port parameter that is not matched in advance;
and the fourth determining unit is used for determining the candidate equivalent port scheme with the largest weight value as the optimal equivalent port alternative scheme.
Optionally, the network device configuring apparatus further includes:
and the returning unit is used for returning the determined optimal topology scheme to the control equipment, so that the control equipment carries out network equipment configuration according to the optimal topology scheme.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same or in multiple pieces of software or hardware in practicing the invention.
Having described the network device configuration method and apparatus of an exemplary embodiment of the present invention, a computing apparatus according to another exemplary embodiment of the present invention is next described.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, a computing device according to the present invention may comprise at least one processing unit, and at least one memory unit. Wherein the storage unit stores program code, which, when executed by the processing unit, causes the processing unit to perform the steps of the network device configuration method according to various exemplary embodiments of the present invention described above in this specification. For example, the processing unit may execute step S21 shown in fig. 2, receive a network topology matching request sent by the control device, and step S22, match a candidate topology among pre-stored network topology according to the function information to be implemented and the network device environment information, where the candidate topology includes the material requirement information and the second port information, and step S23, for each matched candidate topology, match the material preparation information and the material requirement information to obtain a first matching result and match each port parameter included in the first port information and the second port information to obtain a second matching result, and step S24, determine a weight value corresponding to the candidate topology according to the first matching result and the second matching result and a weight configured for the material information and each port parameter in advance, and step S25, determining the candidate topology scheme with the maximum weight value as the optimal topology scheme.
The computing device 40 according to this embodiment of the invention is described below with reference to fig. 4. The computing device 40 shown in fig. 4 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in fig. 4, the computing apparatus 40 is embodied in the form of a general purpose computing device. Components of computing device 40 may include, but are not limited to: the at least one processing unit 41, the at least one memory unit 42, and a bus 43 connecting the various system components (including the memory unit 42 and the processing unit 41).
Bus 43 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The storage unit 42 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)421 and/or cache memory 422, and may further include Read Only Memory (ROM) 423.
The storage unit 42 may also include a program/utility 425 having a set (at least one) of program modules 424, such program modules 424 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Computing device 40 may also communicate with one or more external devices 44 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with computing device 40, and/or with any devices (e.g., router, modem, etc.) that enable computing device 40 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 45. Also, computing device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) through network adapter 46. As shown, the network adapter 46 communicates with other modules for the computing device 40 over the bus 43. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computing device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, the various aspects of the network device configuring method provided by the present invention may also be implemented as a program product, which includes program code for causing a computer device to execute the steps in the network device configuring method according to various exemplary embodiments of the present invention described above in this specification when the program product runs on the computer device, for example, the computer device may execute step S21 shown in fig. 2, receive a network topology matching request sent by a control device, and step S22, match candidate topology solutions in a pre-stored network topology solution according to the function information to be implemented and the network device environment information, the candidate topology solutions include material requirement information and second port information, and step S23, for each matched candidate topology solution, matching the material preparation information and the material demand information to obtain a first matching result and matching each port parameter contained in the first port information and the second port information to obtain a second matching result, step S24, determining a weight value corresponding to the candidate topology scheme according to the first matching result and the second matching result and a weight configured for the material information and each port parameter in advance, and step S25, determining the candidate topology scheme with the largest weight value as the optimal topology scheme.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for network device configuration of embodiments of the present invention may employ a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method for configuring a network device, comprising:
receiving a network topology scheme matching request sent by a control device, wherein the topology scheme matching request carries network device configuration information, the network device configuration information comprises network device environment information, function information to be realized and material preparation information, and the network device environment information comprises first port information;
matching a candidate topology scheme in a pre-stored network topology scheme according to the function information to be realized and the network equipment environment information, wherein the candidate topology scheme comprises material demand information and second port information;
for each matched candidate topology scheme, matching the material preparation information and the material demand information to obtain a first matching result and matching each port parameter contained in the first port information and the second port information to obtain a second matching result;
determining a weight value corresponding to the candidate topology scheme according to the first matching result, the second matching result and the weight configured for the material information and each port parameter in advance;
determining a candidate topology scheme with the largest weight value as an optimal topology scheme;
the method for determining the weight value corresponding to the candidate topology scheme according to the matching result and the weight configured for the material information and each port parameter in advance specifically comprises the following steps:
for each matched candidate topology scheme, determining a weight value corresponding to the candidate topology scheme according to the following method:
Figure FDA0002796799800000011
wherein:
αwif the material preparation information is matched with the material demand information, alpha is the weighted value corresponding to the material informationwThe value is a preset weighted value, if the material preparation information is not matched with the material demand information, alpha iswThe value is 0;
n is the number of port parameters contained in the first port information or the second port information;
αnif the nth port parameter in the first port information is matched with the nth port parameter in the second port information, alpha is the weighted value corresponding to the nth port parameternTaking the value as a preset weight value, if the value is in the first port informationIs not matched with the nth port parameter in the second port information, alpha isnThe value is 0;
βwthe weight value is pre-allocated to the material information;
βnand assigning a weight value for the nth port parameter in advance.
2. The method of claim 1, wherein the first port information comprises a demand port type and a cable resource; and
before determining the candidate topology scheme with the largest weight value as the optimal topology scheme, the method further comprises the following steps:
calling an equivalent port function table aiming at port parameters which are not matched and are in second port information contained in the candidate topology scheme with the largest weight value, and matching the candidate equivalent port scheme in the equivalent port function table according to the type of the required port and the cable resource;
for each matched candidate equivalent port scheme, determining a weight value of the candidate equivalent port scheme according to a weight configured for unmatched port parameters in advance;
and determining the candidate equivalent port scheme with the maximum weight value as the optimal equivalent port alternative scheme.
3. The method of claim 1 or 2, further comprising:
and returning the determined optimal topology scheme to the control equipment, so that the control equipment configures the network equipment according to the optimal topology scheme.
4. A network device configuration apparatus, comprising:
the system comprises a receiving unit and a control unit, wherein the receiving unit is used for receiving a network topology scheme matching request sent by a control device, the topology scheme matching request carries network device configuration information, the network device configuration information comprises network device environment information, function information to be realized and material preparation information, and the network device environment information comprises first port information;
the first matching unit is used for matching a candidate topology scheme in a pre-stored network topology scheme according to the function information to be realized and the network equipment environment information, wherein the candidate topology scheme comprises material demand information and second port information;
the second matching unit is used for matching the material preparation information and the material demand information to obtain a first matching result and matching each port parameter contained in the first port information and the second port information to obtain a second matching result aiming at each matched candidate topology scheme;
the first determining unit is used for determining a weight value corresponding to the candidate topology scheme according to the first matching result and the second matching result obtained by the second matching unit and the weight configured for the material information and the parameters of each port in advance;
the second determining unit is used for determining the candidate topology scheme with the largest weight value as the optimal topology scheme; the first determining unit is specifically configured to determine, for each matched candidate topology scheme, a weight value corresponding to the candidate topology scheme according to the following method:
Figure FDA0002796799800000031
wherein:
αwif the material preparation information is matched with the material demand information, alpha is the weighted value corresponding to the material informationwThe value is a preset weighted value, if the material preparation information is not matched with the material demand information, alpha iswThe value is 0;
n is the number of port parameters contained in the first port information or the second port information;
αnif the nth port parameter in the first port information is matched with the nth port parameter in the second port information, alpha is the weighted value corresponding to the nth port parameternThe value is a preset weighted value, if the nth port parameter in the first port information is not matched with the nth port parameter in the second port information, alpha isnValue of 0;
βwThe weight value is pre-allocated to the material information;
βnand assigning a weight value for the nth port parameter in advance.
5. The apparatus of claim 4, wherein the first port information comprises a demand port type and a cable resource; and
the device, still include:
a calling unit, configured to, before the second determining unit determines the candidate topology scheme with the largest weight value as the optimal topology scheme, call an equivalent port function table for a port parameter in the second port information and not in match included in the candidate topology scheme with the largest weight value, and match the candidate equivalent port scheme in the equivalent port function table according to the required port type and the cable resource;
a third determining unit, configured to determine, for each matched candidate equivalent port scheme, a weight value of the candidate equivalent port scheme according to a weight configured for a port parameter that is not matched in advance;
and the fourth determining unit is used for determining the candidate equivalent port scheme with the largest weight value as the optimal equivalent port alternative scheme.
6. The apparatus of claim 4 or 5, further comprising:
and the returning unit is used for returning the determined optimal topology scheme to the control equipment, so that the control equipment carries out network equipment configuration according to the optimal topology scheme.
7. A computing device comprising at least one processing unit and at least one memory unit, wherein the memory unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of the method of any of claims 1 to 3.
8. A computer-readable medium, in which a computer program is stored which is executable by a computing device, the program, when run on the computing device, causing the computing device to perform the steps of the method of any one of claims 1 to 3.
CN201711297035.6A 2017-12-08 2017-12-08 Network equipment configuration method, device and medium Active CN107911251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711297035.6A CN107911251B (en) 2017-12-08 2017-12-08 Network equipment configuration method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711297035.6A CN107911251B (en) 2017-12-08 2017-12-08 Network equipment configuration method, device and medium

Publications (2)

Publication Number Publication Date
CN107911251A CN107911251A (en) 2018-04-13
CN107911251B true CN107911251B (en) 2021-04-20

Family

ID=61864905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711297035.6A Active CN107911251B (en) 2017-12-08 2017-12-08 Network equipment configuration method, device and medium

Country Status (1)

Country Link
CN (1) CN107911251B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189403B (en) * 2018-07-13 2022-04-22 超聚变数字技术有限公司 Operating system OS batch installation method and device and network equipment
CN109039788B (en) * 2018-09-30 2022-02-25 锐捷网络股份有限公司 Port configuration method and device of network equipment and storage medium
CN109474467B (en) * 2018-11-15 2022-02-01 上海携程商务有限公司 Network automation management method and device, storage medium and electronic equipment
CN110535725B (en) * 2019-08-28 2021-10-29 网宿科技股份有限公司 Enterprise network testing method and device
CN111352787B (en) * 2020-03-13 2023-08-18 浪潮商用机器有限公司 GPU topology connection detection method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716187A (en) * 2013-12-20 2014-04-09 新浪网技术(中国)有限公司 Network topology structure determination method and system
CN105743691A (en) * 2014-12-29 2016-07-06 瞻博网络公司 Network topology optimization

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015121925A1 (en) * 2014-02-12 2015-08-20 株式会社日立製作所 System managing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716187A (en) * 2013-12-20 2014-04-09 新浪网技术(中国)有限公司 Network topology structure determination method and system
CN105743691A (en) * 2014-12-29 2016-07-06 瞻博网络公司 Network topology optimization

Also Published As

Publication number Publication date
CN107911251A (en) 2018-04-13

Similar Documents

Publication Publication Date Title
CN107911251B (en) Network equipment configuration method, device and medium
CN110378463B (en) Artificial intelligence model standardization training platform and automatic system
CN106528395B (en) The generation method and device of test case
CN104978258B (en) Automatic software test method and system
US10831463B2 (en) Intelligent software deployment on an IaaS platform
US8301935B2 (en) Distributed batch runner
GB2523338A (en) Testing a virtualised network function in a network
CN109990790A (en) A kind of unmanned plane paths planning method and device
CN108306804A (en) A kind of Ethercat main station controllers and its communication means and system
CN107015902B (en) Test method and test equipment
CN106612204B (en) Service checking method and device
AU2020240106B2 (en) Systems and methods for a virtual agent in a cloud computing environment
CN110047488A (en) Voice translation method, device, equipment and control equipment
CN109614312A (en) Method for generating test case, device, electronic equipment and storage medium
CN114157701A (en) Task testing method, device, equipment and storage medium
CN105847231A (en) Service publishing method, device and system
CN107566480B (en) User activity information acquisition method and device for mobile terminal application and storage medium
US11223961B2 (en) Configuration method of wireless network system, configuration terminal and configuration system
CN112199154A (en) Distributed collaborative sampling central optimization-based reinforcement learning training system and method
CN117009238A (en) Data testing method, device, electronic equipment, storage medium and program product
CN114723303B (en) Method, device, equipment and storage medium for determining energy-saving space of machine room
CN114466000B (en) CDN gateway source returning method and device
CN114417980A (en) Business model establishing method and device, electronic equipment and storage medium
US10747936B1 (en) System, method, and computer program product for genetic routing in an electronic circuit design
CN114095343A (en) Disaster recovery method, device, equipment and storage medium based on double-active system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant