Topological relationship automatic discovery method and device, equipment and medium
By acquiring and combining port information in network devices and counting potential topological relationship port pairs, the time-consuming and labor-intensive problem of manual verification of topological relationships across professional or cross-manufacturers equipment is solved, automatic discovery is achieved and accuracy is improved.
Patent Information
- Application Number
- CN202411139839.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In the prior art, the topological relationship between network equipment across majors or cross-producers requires manual verification, which is time-consuming and labor-intensive and error-prone.
By obtaining the port information group within the first time period, combining it in pairs based on the alarm signals generated by the port, counting the potential topological relationship port pairs, determining their topological relationships, and realizing automatic discovery.
Automatic discovery of topological relationships between network devices is realized, reducing the time and error rate of manual verification, and improving the accuracy of discovery.
Smart Images

Figure CN119232594A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communications, and specifically to a method, apparatus, device and medium for automatically discovering topological relationships. Background Art
[0002] In the existing communications industry, the topological relationship between network devices is the key basic information for daily network maintenance and troubleshooting. In existing technologies, only the topological relationship between network devices of the same profession and manufacturer can be automatically discovered through professional network management systems. The topological relationship between network devices of different professions or manufacturers needs to be manually verified, which is time-consuming, labor-intensive and prone to errors. Summary of the invention
[0003] The embodiments of the present application propose a method, apparatus, device and medium for automatically discovering topological relationships to solve the technical problem that manual verification of topological relationships between network devices is time-consuming, labor-intensive and error-prone.
[0004] In a first aspect, an embodiment of the present application provides a method for automatically discovering a topological relationship, the method comprising:
[0005] In a first time period, according to a first time interval, M port information groups are obtained, each of the port information groups includes port information of N ports, and the port information is obtained according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, N≥1;
[0006] In each of the port information groups, the port information of the N ports are combined in pairs to obtain a plurality of potential topological relationship port pairs, and the potential topological relationship port pairs are recorded in the port information group, wherein the potential topological relationship port pairs are composed of a first port and a second port;
[0007] According to the statistical result of the potential topological relationship port pair appearing in the M port information groups, the topological relationship between the first port and the second port in the potential topological relationship port pair is determined; when the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0008] In a second aspect, an embodiment of the present application provides an automatic discovery device for a topological relationship, the device comprising:
[0009] A first acquisition module, configured to acquire M port information groups within a first time period and at a first time interval, each of the port information groups including port information of N ports, the port information being acquired according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, and N≥1;
[0010] A second acquisition module is used to combine the port information of the N ports in pairs in each of the port information groups to obtain a plurality of potential topological relationship port pairs, and record the potential topological relationship port pairs in the port information group, wherein the potential topological relationship port pairs are composed of a first port and a second port;
[0011] A determination module is used to determine the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical results of the potential topological relationship port pair appearing in the M port information groups, and when the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any embodiment of the first aspect.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the first aspect.
[0014] The method, device, equipment and medium for discovering the topological relationship between network devices provided by the embodiment of the present application, the port information in the port information group is obtained when the port generates an alarm signal, according to the characteristic that the alarm signals between the port pairs with topological relationship must affect each other, in the port information group provided by the embodiment of the present application, there is a potential topological relationship between the ports corresponding to the port information, that is: there is a potential topological relationship between the first port and the second port in the potential topological relationship port pair; according to the statistical results of the potential topological relationship port pair appearing in all port information groups, it can be determined whether there is a real topological relationship between the first port and the second port in the potential topological relationship port pair, and the potential topological relationship ports that really have a topological relationship are recorded as the port pair with a topological relationship, so as to achieve the purpose of automatically discovering the topological relationship between the ports, and solve the technical problem that it is time-consuming, labor-intensive and error-prone to manually check the topological relationship between network devices. In addition, since the alarm signals between the port pairs with topological relationship must affect each other, the port pairs with topological relationship obtained by the technical solution of the embodiment of the present application are more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0016] Figure 1 It is a flowchart of an embodiment of the method for automatically discovering topological relationships of the present application;
[0017] Figure 2 yes Figure 1 The schematic diagram of the port information group in one embodiment of the automatic discovery method of the topological relationship of the present application is shown;
[0018] Figure 3 is a flowchart of another embodiment of the method for automatically discovering topological relationships of the present application;
[0019] Figure 4 is a flowchart of another embodiment of the method for automatically discovering topological relationships of the present application;
[0020] Figure 5 yes Figure 4 The example schematic diagram of another embodiment of the method for automatically discovering topological relationships of the present application, in which step 404 determines that an error exists in the optical fiber path between the first port and the opposite port;
[0021] Figure 6 is a flowchart of another embodiment of the method for automatically discovering topological relationships of the present application;
[0022] Figure 7 It is a structural diagram of an embodiment of the automatic discovery device of garbage topology relationship of the present application;
[0023] Figure 8 It is a schematic diagram of the structure of an electronic device used to implement an embodiment of the present application. DETAILED DESCRIPTION
[0024] All actions to obtain signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0025] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] Please refer to Figure 1, which shows a process 100 of an embodiment of the automatic discovery method of topological relationships according to the present application. The automatic discovery method of topological relationships can be applied to various electronic devices with data processing functions. For example, the above electronic devices may include but are not limited to cloud servers, physical servers, etc. The execution subject of the automatic discovery method of topological relationships can be a processor in the above electronic devices.
[0028] The automatic discovery method of the topological relationship includes the following steps:
[0029] Step 101: within a first time period and at a first time interval, obtain M port information groups, each port information group including port information of N ports, the port information being obtained according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, N≥1.
[0030] This embodiment does not specifically limit the first time period and the first time interval. In actual use, they can be set according to the actual network device type and deployment situation. In order to enable those skilled in the art to more clearly understand the technical solution provided by the embodiment of the present application, in this embodiment and the following embodiments, the first time period is 30 days and the first time interval is 10 minutes. For example, M = 30 * 24 * 60 / 10 = 4320. That is, step 101 can obtain 4320 port information groups within 30 days at intervals of 10 minutes.
[0031] In this embodiment, the number N of port information included in each port information group may be different, and each port information uniquely corresponds to a port. Exemplarily, the port information may be a unique identifier of the port. For example: Figure 2 As shown, among the 4320 port information groups, port information group 1 includes 4 port information, namely: A, B, C and Z, wherein A, B, C and Z are unique identifiers of the ports; port information group 2 includes 5 port information, namely: F, Q, N, X and Y, wherein F, Q, N, X and Y are unique identifiers of the ports, and so on. Figure 2 Each port information group is described one by one.
[0032] In this embodiment, the method for obtaining a port information group within a first time interval may include: within the first time interval, recording the port information that generates an alarm signal and generating a port information recording log; deduplicating the port information in the port information recording log to obtain the port information group.
[0033] Step 102: In each port information group, combine the port information of N ports in pairs to obtain multiple potential topology relationship port pairs, and record the potential topology relationship port pairs in the port information group, where the potential topology relationship port pairs consist of a first port and a second port.
[0034] In this embodiment, the number of potential topological relationship port pairs is
[0035] For example: Figure 2 As shown, port information group 1 includes 4 port information, namely: A, B, C and Z. The potential topological relationship port pairs of port information group 1 are 6, namely: AB, AC, AZ, BC, BZ and CZ. Taking the potential topological relationship port pair AB as an example, A is the first port and B is the second port.
[0036] Step 103: Determine the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical result of the potential topological relationship port pair appearing in the M port information groups. When the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0037] In this embodiment, step 103 determines the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical result of the potential topological relationship port pair appearing in the M port information groups, which may specifically include the following three situations:
[0038] When the number of occurrences of the potential topology relationship port pair in the M port information groups is less than or equal to the first threshold, the topology relationship between the first port and the second port in the potential topology relationship port pair is no topology relationship.
[0039] by Figure 2 As shown in FIG. 1 , take the potential topological relationship port pair AZ in port information group 1 as an example. If AZnum≤Q, then there is no topological relationship between port A and port Z in the potential topological relationship port pair AZ. Figure 2 The number of times Q appears in the 4320 port information groups shown, is the first threshold, Q can be 3 by default, and Q can be modified according to actual needs.
[0040] When the number of occurrences of the potential topology relationship port pair in the M port information groups is greater than the first threshold and the probability of occurrence of the potential topology relationship port pair in the M port information groups is less than or equal to the second threshold, the topological relationship between the first port and the second port in the potential topology relationship port pair is that there is no topological relationship.
[0041] by Figure 2As shown in FIG. 1 , taking the potential topological relationship port pair AZ in port information group 1 as an example, if AZnum is greater than Q, and (AZnum*AZnum) / (Anum*Znum)*100%≤P, then there is no topological relationship between port A and port Z in the potential topological relationship port pair AZ. Figure 2 The number of times that port A appears in the 4320 port information groups shown in the figure is Figure 2 The number of times port Z appears in the 4320 port information groups shown. Figure 2 The number of times that AZnum appears in the 4320 port information groups shown in the figure, P is the second threshold, and the theoretical value of P is 100%. However, considering the influence of factors such as actual network delay and packet loss, this embodiment exemplarily sets the default value of P to 80%, and P can be modified according to actual needs; (AZnum*AZnum) / (Anum*Znum)*100% is the number of times that the potential topological relationship port pair AZ appears in the Figure 2 The probability of occurrence in the 4320 port information groups is shown.
[0042] When the number of times the potential topology relationship port pair appears in the M port information groups is greater than the first threshold and the probability of the potential topology relationship port pair appearing in the M port information groups is greater than the second threshold, the topological relationship between the first port and the second port in the potential topology relationship port pair is a topological relationship.
[0043] In this embodiment, the number of times a potential topology relationship port pair appears in the M port information groups can reflect the number of times the first port and the second port in the potential topology relationship port pair simultaneously fail within a certain time range. When the number is greater than the first threshold, it indicates that the time correlation between the first port and the second port is strong; the probability of the potential topology relationship port pair appearing in the M port information groups can reflect the probability of the first port and the second port in the potential topology relationship port pair simultaneously failing. When the probability is greater than the second threshold, it indicates that the network topology correlation between the first port and the second port is strong.
[0044] In the method provided by the above-mentioned embodiment of the present application, the port information in the port information group is obtained when the port generates an alarm signal. According to the characteristic that the alarm signals between the port pairs with topological relationship must affect each other, in the port information group provided by the embodiment of the present application, there is a potential topological relationship between the ports corresponding to the port information, that is, there is a potential topological relationship between the first port and the second port in the potential topological relationship port pair; according to the statistical results of the potential topological relationship port pair appearing in all port information groups, it can be determined whether there is a real topological relationship between the first port and the second port in the potential topological relationship port pair, and the potential topological relationship ports that really have a topological relationship are recorded as port pairs with topological relationship, so as to achieve the purpose of automatically discovering the topological relationship between ports, and solve the technical problem that it is time-consuming, labor-intensive and error-prone to manually check the topological relationship between network devices. In addition, since the alarm signals between the port pairs with topological relationship must affect each other, the port pairs with topological relationship obtained by the technical solution of the embodiment of the present application are more accurate.
[0045] Please refer to Figure 3 , which shows a process 300 of another embodiment of the method for automatically discovering topological relationships according to the present application. The method for automatically discovering topological relationships can be applied to various electronic devices with data processing functions. For example, the above-mentioned electronic devices may include but are not limited to cloud servers, physical servers, etc. The execution subject of the method for automatically discovering topological relationships may be a processor in the above-mentioned electronic devices.
[0046] The automatic discovery method of the topological relationship includes the following steps:
[0047] Step 301: within a first time period and at a first time interval, obtain M port information groups, each port information group including port information of N ports, the port information being obtained according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, N≥1.
[0048] Step 302: In each port information group, combine the port information of N ports in pairs to obtain multiple potential topology relationship port pairs, and record the potential topology relationship port pairs in the port information group, where the potential topology relationship port pairs consist of a first port and a second port.
[0049] Step 303: Determine the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical result of the potential topological relationship port pair appearing in the M port information groups. When the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0050] Step 304: When the same port appears in more than two port pairs with a topological relationship at the same time, a target port pair with a topological relationship is obtained from the more than two port pairs with a topological relationship.
[0051] It should be noted that steps 301-303 in the method for automatically discovering topological relationships provided in this embodiment are similar to Figure 1 The steps 101-103 shown are the same, and the specific implementation can be seen in Figure 1 Steps 101-103 are described in detail and will not be repeated here.
[0052] In this embodiment, step 304 may be implemented by one or more of the following methods:
[0053] According to the device ownership relationship between the first port and the second port in the port pair with a topological relationship, a target port pair with a topological relationship is obtained from more than two port pairs with a topological relationship.
[0054] According to the pre-stored port topology relationship correspondence table, a target port pair with a topological relationship is obtained from two or more port pairs with a topological relationship.
[0055] The first time period is extended until two or more port pairs with topological relationships are a target port pair with topological relationships. In this embodiment, extending the first time period can reduce the probability of the potential topological relationship port pair appearing in the M port information groups, thereby reducing the number of port pairs with topological relationships that are ultimately obtained.
[0056] The automatic discovery method of topological relationships provided in this embodiment achieves Figure 1 Based on the beneficial effects brought by the technical solution shown, when the same port appears in more than two port pairs with topological relationships at the same time, a target port pair with topological relationships can be obtained from more than two port pairs with topological relationships, further improving the accuracy of automatically discovering port pairs with topological concerns.
[0057] Please refer to Figure 4 , which shows a process 400 of another embodiment of the method for automatically discovering topological relationships according to the present application. The method for automatically discovering topological relationships can be applied to various electronic devices with data processing functions. For example, the above-mentioned electronic devices may include but are not limited to cloud servers, physical servers, etc. The execution subject of the method for automatically discovering topological relationships may be a processor in the above-mentioned electronic devices.
[0058] The automatic discovery method of the topological relationship includes the following steps:
[0059] Step 401: within a first time period and at a first time interval, obtain M port information groups, each port information group including port information of N ports, the port information being obtained according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, N≥1.
[0060] Step 402: In each port information group, combine the port information of N ports in pairs to obtain multiple potential topology relationship port pairs, and record the potential topology relationship port pairs in the port information group, where the potential topology relationship port pairs consist of a first port and a second port.
[0061] Step 403: Determine the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical result of the potential topological relationship port pair appearing in the M port information groups. When the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0062] Step 404: According to the port pairs having topological relationships, the pre-recorded network topological relationships are audited and corrected.
[0063] It should be noted that steps 401-403 in the method for automatically discovering topological relationships provided in this embodiment are similar to Figure 1 The steps 101-103 shown are the same, and the specific implementation can be seen in Figure 1 Steps 101-103 are described in detail and will not be repeated here.
[0064] In this embodiment, step 404 can determine that there is an error in the optical fiber path between the first port and the opposite port when the opposite port of the first port in the network topology relationship is different from the second port of the first port in the port pair with the topology relationship, and correct the opposite port to the second port.
[0065] For example: through the above steps 401-403, it is determined that the port information group has a port pair AZ with a topological relationship, wherein A is the first port and Z is the second port. If in the pre-stored network topology relationship, the port pair with a topological relationship is AY, wherein A is the first port and Y is the opposite port of A, then at this time, step 404 can determine that the second port Z and the opposite port Y are not the same, thereby determining that there is an error in the optical fiber path between the first port A and the opposite port Y, and the opposite port of A as the first port in the network topology relationship is corrected from Y to Z.
[0066] Specifically, in this embodiment, the method of determining in step 404 that there is an error in the optical fiber path between the first port and the opposite port may include any one or more of the following:
[0067] In the case where the second port and the opposite port belong to the same network device, there is an error in the terminal network device port jump record in the optical fiber path between the first port and the opposite port.
[0068] For example: Figure 5 As shown, port A and port Y are in computer room D1 and computer room D2 respectively, and port pair AY is a port pair with a topological relationship recorded in the network topology relationship, wherein A is the first port and Y is the opposite port. If the port pair with a topological relationship determined by the above steps 401-403 is AZ, wherein A is the first port and Z is the second port, since AZ is inconsistent with AY, step 404 automatically checks that there is error information in the optical fiber path between ports A and Y. Since ports Z and Y belong to the same network device, it can be determined that the jump entry error at the end port Y of the optical fiber path between A and Y can be determined. Step 404 automatically updates port Y at the end of the optical fiber path between A and Y to port Z, and finally the topological relationship between ports A and Z is consistent with the correction of the optical fiber path information.
[0069] When the second port belongs to the first network device, the opposite port belongs to the second network device, and the first network device and the second network device belong to the same computer room, there is an error in the optical fiber optical path between the first port and the opposite port in the outgoing segment of the opposite port, and the optical fiber line information of the outgoing segment of the opposite port is checked.
[0070] When the second port belongs to the first network device, the opposite port belongs to the second network device, and the first network device and the second network device belong to different computer rooms, there is a full-length error in the optical fiber path between the first port and the opposite port, and the full-length optical fiber line information between the first port and the opposite port is checked.
[0071] The automatic discovery method of topological relationships provided in this embodiment achieves Figure 1 Based on the beneficial effects brought by the technical solution shown, the pre-recorded network topology relationship can be audited and corrected according to the automatically discovered ports with topological relationships.
[0072] Please refer to Figure 6 , which shows a process 600 of another embodiment of the method for automatically discovering topological relationships according to the present application. The method for automatically discovering topological relationships can be applied to various electronic devices with data processing functions. For example, the above-mentioned electronic devices may include but are not limited to cloud servers, physical servers, etc. The execution subject of the method for automatically discovering topological relationships may be a processor in the above-mentioned electronic devices.
[0073] The automatic discovery method of the topological relationship includes the following steps:
[0074] Step 601: within a first time period and at a first time interval, obtain M port information groups, each port information group including port information of N ports, the port information being obtained according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, N≥1.
[0075] Step 602: In each port information group, combine the port information of N ports in pairs to obtain multiple potential topology relationship port pairs, and record the potential topology relationship port pairs in the port information group, where the potential topology relationship port pairs consist of a first port and a second port.
[0076] Step 603: Determine the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical result of the potential topological relationship port pair appearing in the M port information groups. When the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0077] Step 604: Determine the alarm signal sending logic of the first port and the second port in the port pair having the topological relationship, so that the first port and / or the second port sends the alarm signal according to the alarm signal sending logic.
[0078] It should be noted that steps 601-603 in the method for automatically discovering topological relationships provided in this embodiment are similar to Figure 1 The steps 101-103 shown are the same, and the specific implementation can be seen in Figure 1 Steps 101-103 are described in detail and will not be repeated here.
[0079] In this embodiment, in step 604, the method for determining the alarm signal sending logic of the first port and the second port in the port pair having a topological relationship may include:
[0080] In the case where the first port and the second port have a master-slave relationship, the alarm signal sending logic is determined as follows: when the first port and the second port generate alarm signals at the same time, the alarm signal of the slave port is merged into the master port. For example, when the first port is the master port and the second port is the slave port, the alarm signal of the second port is merged into the first port.
[0081] When the first port and the second port do not have a master-slave relationship, the alarm signal sending logic is determined as follows: when the first port and the second port generate alarm signals at the same time, the alarm signal merging relationship is determined according to the alarm probability value of the first port and the alarm probability value of the second port, and according to the alarm signal merging relationship, the alarm signal of the first port is merged to the second port, or the alarm signal of the second port is merged to the first port.
[0082] In this embodiment, the alarm probability value P1 of the first port is obtained by the following formula (1):
[0083]
[0084] Among them, d1 is the alarm level influence coefficient of the network equipment to which the first port belongs. It is manually set by the network maintenance personnel according to the maintenance status of the network equipment. The default initial value is 1. The larger the value, the higher the probability of failure. n1 is the number of alarm signals generated in the history of the first port. The more times, the higher the probability of failure. t is the time value of the alarm signal occurrence. The smaller the time, the earlier the alarm occurs on the port and the higher the probability of failure.
[0085] In this embodiment, the alarm probability value P2 of the second port is obtained by the following formula (2):
[0086]
[0087] Among them, d2 is the alarm level influence coefficient of the network equipment to which the second port belongs. It is manually set by the network maintenance personnel according to the maintenance status of the network equipment. The default initial value is 1. The larger the value, the higher the probability of failure. n2 is the number of alarm signals generated in the history of the second port. The more times, the higher the probability of failure. t is the time value of the alarm signal occurrence. The smaller the time, the earlier the alarm occurs on the port and the higher the probability of failure.
[0088] The automatic discovery method of topological relationships provided in this embodiment achieves Figure 1 Based on the beneficial effects brought by the technical solution shown, alarms can be merged for automatically discovered port pairs with topological relationships, thereby improving the efficiency and accuracy of sending alarm information.
[0089] Please refer to Figure 7 As an implementation of the methods shown in the above figures, the present application provides an embodiment of an automatic discovery device for topological relationships. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0090] like Figure 7 As shown, the automatic discovery device 700 of the topological relationship of this embodiment includes:
[0091] A first acquisition module 701 is used to acquire M port information groups within a first time period and at a first time interval, each of the port information groups including port information of N ports, the port information being acquired according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, N≥1;
[0092] A second acquisition module 702 is used to combine the port information of the N ports in each of the port information groups, obtain a plurality of potential topological relationship port pairs, and record the potential topological relationship port pairs in the port information group, wherein the potential topological relationship port pairs are composed of a first port and a second port;
[0093] The determination module 703 is used to determine the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical results of the potential topological relationship port pair appearing in the M port information groups, and when the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0094] Optionally, the determination module 703 is specifically configured to determine that the topological relationship between the first port and the second port in the potential topological relationship port pair is not a topological relationship when the number of occurrences of the potential topological relationship port pair in the M port information groups is less than or equal to a first threshold;
[0095] When the number of occurrences of the potential topology relationship port pair in the M port information groups is greater than the first threshold, and the probability of occurrence of the potential topology relationship port pair in the M port information groups is less than or equal to the second threshold, the topological relationship between the first port and the second port in the potential topology relationship port pair is that there is no topological relationship;
[0096] When the number of times the potential topology relationship port pair appears in the M port information groups is greater than the first threshold, and the probability of the potential topology relationship port pair appearing in the M port information groups is greater than the second threshold, the topological relationship between the first port and the second port in the potential topology relationship port pair is that they have a topological relationship.
[0097] Optionally, the determination module 703 is further configured to obtain a target port pair with a topological relationship from the two or more port pairs with a topological relationship when the same port appears in the two or more port pairs with a topological relationship at the same time.
[0098] Optionally, the determination module 703 is specifically configured to obtain a target port pair with a topological relationship from more than two port pairs with a topological relationship according to the device ownership relationship between the first port and the second port in the port pair with a topological relationship; and / or,
[0099] According to a pre-stored port topology relationship correspondence table, a target port pair with a topological relationship is obtained from two or more port pairs with a topological relationship; and / or,
[0100] The first time period is extended until the two or more port pairs having a topological relationship are a target port pair having a topological relationship.
[0101] Optionally, the automatic discovery device of topological relationships may further include:
[0102] The audit and correction module is used to audit and correct the pre-recorded network topology relationship based on the port pairs with the topological relationship.
[0103] Optionally, an audit and correction module is specifically used to determine that there is an error in the optical fiber path between the first port and the opposite port when the opposite port of the first port in the network topology relationship is different from the second port of the first port in the port pair having the topological relationship, and correct the opposite port to be the second port.
[0104] Optionally, the audit correction module is specifically used to, when the second port and the opposite port belong to the same network device, there is an error in the terminal network device port jump record in the optical fiber path between the first port and the opposite port; or,
[0105] In the case where the second port belongs to the first network device, the opposite port belongs to the second network device, and the first network device and the second network device belong to the same computer room, there is an error in the optical fiber optical path between the first port and the opposite port at the outgoing section of the opposite port, and the optical fiber line information of the outgoing section of the opposite port is checked; or
[0106] When the second port belongs to the first network device, the opposite port belongs to the second network device, and the first network device and the second network device belong to different computer rooms, there is a full-length error in the optical fiber path between the first port and the opposite port, and the full-length optical fiber line information between the first port and the opposite port is checked.
[0107] Optionally, the automatic discovery device of topological relationships may further include:
[0108] The alarm signal sending logic determination module is used to determine the alarm signal sending logic of the first port and the second port in the port pair having the topological relationship, so that the first port and / or the second port sends the alarm signal according to the alarm signal sending logic.
[0109] Optionally, the alarm signal sending logic determination module is specifically used to determine the alarm signal sending logic when the first port and the second port have a master-slave relationship: when the first port and the second port generate the alarm signal at the same time, merge the alarm signal of the slave port into the master port; or
[0110] In the case where the first port and the second port do not have a master-slave relationship, the alarm signal sending logic is determined as follows: when the first port and the second port generate the alarm signal at the same time, the alarm signal merging relationship is determined according to the alarm probability value of the first port and the alarm probability value of the second port, and according to the alarm signal merging relationship, the alarm signal of the first port is merged to the second port, or the alarm signal of the second port is merged to the first port.
[0111] The topological relationship discovery device between network devices provided by the embodiment of the present application, the port information in the port information group is obtained when the port generates an alarm signal, according to the characteristics that the alarm signals between the port pairs with topological relationship must affect each other, in the port information group provided by the embodiment of the present application, there is a potential topological relationship between the ports corresponding to the port information, that is: there is a potential topological relationship between the first port and the second port in the potential topological relationship port pair; according to the statistical results of the potential topological relationship port pair appearing in all port information groups, it can be determined whether there is a real topological relationship between the first port and the second port in the potential topological relationship port pair, and the potential topological relationship ports that really have a topological relationship are recorded as port pairs with topological relationship, so as to achieve the purpose of automatically discovering the topological relationship between ports, and solve the technical problem that it is time-consuming, labor-intensive and error-prone to manually check the topological relationship between network devices. In addition, since the alarm signals between the port pairs with topological relationship must affect each other, the port pairs with topological relationship obtained by the technical solution of the embodiment of the present application are more accurate.
[0112] Reference below Figure 8 , which shows a schematic structural diagram of an electronic device for implementing some embodiments of the present application. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0113] like Figure 8As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0114] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a disk, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 4 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0115] In particular, according to some embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present application are executed.
[0116] It should be noted that the computer-readable medium described in some embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0117] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0118] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: upon receiving a message sending request, obtains the message to be tested in the message sending request; extracts the text content in the message to be tested; detects the text content based on the keywords of historical spam messages, the hash values of historical spam messages, and the large language model to determine whether the message to be tested is a spam message; and intercepts the message to be tested in response to the message to be tested being a spam message.
[0119] Computer program code for performing the operations of some embodiments of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++; and also conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, or may be connected to an external computer (e.g., through the Internet using an Internet service provider), including a local area network (LAN) or a wide area network (WAN).
[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0121] The units described in some embodiments of the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a first determination unit, a second determination unit, a selection unit, and a third determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0122] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0123] The above description is only some preferred embodiments of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present application is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) the technical features with similar functions disclosed in the embodiments of the present application to form a technical solution.
Claims
1. A method for automatically discovering topological relationships, characterized in that: The method comprises: In a first time period, according to a first time interval, M port information groups are obtained, each of the port information groups includes port information of N ports, and the port information is obtained according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, N≥1; In each of the port information groups, the port information of the N ports are combined in pairs to obtain a plurality of potential topological relationship port pairs, and the potential topological relationship port pairs are recorded in the port information group, wherein the potential topological relationship port pairs are composed of a first port and a second port; According to the statistical result of the potential topological relationship port pair appearing in the M port information groups, the topological relationship between the first port and the second port in the potential topological relationship port pair is determined; when the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
2. The method according to claim 1, characterized in that Determining the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical result of the potential topological relationship port pair appearing in the M port information groups includes: In the case that the number of occurrences of the potential topological relationship port pair in the M port information groups is less than or equal to a first threshold, the topological relationship between the first port and the second port in the potential topological relationship port pair is that there is no topological relationship; When the number of occurrences of the potential topology relationship port pair in the M port information groups is greater than the first threshold, and the probability of occurrence of the potential topology relationship port pair in the M port information groups is less than or equal to the second threshold, the topological relationship between the first port and the second port in the potential topology relationship port pair is that there is no topological relationship; When the number of times the potential topology relationship port pair appears in the M port information groups is greater than the first threshold, and the probability of the potential topology relationship port pair appearing in the M port information groups is greater than the second threshold, the topological relationship between the first port and the second port in the potential topology relationship port pair is that they have a topological relationship.
3. The method according to claim 1, characterized in that The method further comprises: determining the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical result of the occurrence of the potential topological relationship port pair in the M port information groups, and in the case where the topological relationship between the first port and the second port is a topological relationship, after the potential topological relationship port pair is a port pair with a topological relationship, the method further comprises: In the case that the same port appears in two or more of the port pairs with topological relationship at the same time, a target port pair with topological relationship is obtained from the two or more port pairs with topological relationship.
4. The method according to claim 3, characterized in that The step of obtaining a target port pair having a topological relationship from the two or more port pairs having a topological relationship comprises: According to the device ownership relationship between the first port and the second port in the port pair with a topological relationship, a target port pair with a topological relationship is obtained from two or more port pairs with a topological relationship; and / or, According to a pre-stored port topology relationship correspondence table, a target port pair with a topological relationship is obtained from two or more port pairs with a topological relationship; and / or, The first time period is extended until the two or more port pairs having a topological relationship are a target port pair having a topological relationship.
5. The method according to claim 1, characterized in that The method further comprises: Based on the port pairs having the topological relationship, the pre-recorded network topological relationship is audited and corrected.
6. The method according to claim 5, characterized in that The step of auditing and correcting the pre-recorded network topology relationship according to the port pairs having the topological relationship includes: When the opposite port of the first port in the network topology relationship is different from the second port of the first port in the port pair having the topology relationship, it is determined that there is an error in the optical fiber path between the first port and the opposite port, and the opposite port is corrected to be the second port.
7. The method according to claim 6, characterized in that The determining that there is an error in the optical fiber path between the first port and the opposite port comprises: In the case where the second port and the opposite port belong to the same network device, there is an error in the terminal network device port jump record in the optical fiber path between the first port and the opposite port; or In the case where the second port belongs to the first network device, the opposite port belongs to the second network device, and the first network device and the second network device belong to the same computer room, there is an error in the optical fiber optical path between the first port and the opposite port at the outgoing section of the opposite port, and the optical fiber line information of the outgoing section of the opposite port is checked; or When the second port belongs to the first network device, the opposite port belongs to the second network device, and the first network device and the second network device belong to different computer rooms, there is a full-length error in the optical fiber path between the first port and the opposite port, and the full-length optical fiber line information between the first port and the opposite port is checked.
8. The method according to claim 1, characterized in that The method further comprises: Determine the alarm signal sending logic of the first port and the second port in the port pair having the topological relationship, so that the first port and / or the second port sends the alarm signal according to the alarm signal sending logic.
9. The method according to claim 8, characterized in that In the step of acquiring the port pair having the topological relationship, the alarm signal sending logic of the first port and the second port comprises: In the case where the first port and the second port have a master-slave relationship, determining the alarm signal sending logic is: in the case where the first port and the second port generate the alarm signal at the same time, merging the alarm signal of the slave port to the master port; or, In the case where the first port and the second port do not have a master-slave relationship, the alarm signal sending logic is determined as follows: when the first port and the second port generate the alarm signal at the same time, the alarm signal merging relationship is determined according to the alarm probability value of the first port and the alarm probability value of the second port, and according to the alarm signal merging relationship, the alarm signal of the first port is merged to the second port, or the alarm signal of the second port is merged to the first port.
10. A device for automatically discovering topological relationships, characterized in that: The device comprises: A first acquisition module, configured to acquire M port information groups within a first time period and at a first time interval, each of the port information groups including port information of N ports, the port information being acquired according to an alarm signal generated by the port, wherein M and N are both integers, M≥2, and N≥1; A second acquisition module is used to combine the port information of the N ports in pairs in each of the port information groups to obtain a plurality of potential topological relationship port pairs, and record the potential topological relationship port pairs in the port information group, wherein the potential topological relationship port pairs are composed of a first port and a second port; A determination module is used to determine the topological relationship between the first port and the second port in the potential topological relationship port pair according to the statistical results of the potential topological relationship port pair appearing in the M port information groups, and when the topological relationship between the first port and the second port is a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
11. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Network topology generation method and server
CN110830290A
Path-based optical simulation device activation method and device, and terminal equipment
CN113935279A
Topology generation method and device and storage medium
CN115022186A
Configuring data center network wiring
US11223527B1
