Method, apparatus and device for automatically discovering topological relationship and medium
By automatically combining and correcting port information between network devices, the problem of time-consuming, labor-intensive, and error-prone topology relationships between devices from different professions or manufacturers is solved, achieving efficient and accurate topology relationship discovery.
Patent Information
- Application Number
- CN202411139839.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In existing technologies, the topological relationships between network devices that are across different professions or manufacturers require manual verification, which is time-consuming, labor-intensive, and prone to errors.
By acquiring port information from the port information group and utilizing the alarm signal characteristics between ports, potential topology port pairs are automatically combined, and the actual topology relationship is determined based on statistical results. This corrects pre-recorded network topology relationships and achieves automatic discovery.
It improves the accuracy and efficiency of topological relationship discovery, and reduces the time and error rate of manual verification.
Smart Images

Figure CN119232594B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, specifically to methods, apparatus, devices, and media for the automatic discovery of topology relationships. Background Technology
[0002] In the current telecommunications industry, the topology relationships between network devices are crucial foundational information for daily network maintenance and troubleshooting. Currently, only the topology relationships between network devices of the same specialty and manufacturer can be automatically discovered by professional network management systems. Topology relationships between network devices of different specialties or manufacturers require manual verification, which is time-consuming, labor-intensive, and prone to errors. Summary of the Invention
[0003] This application proposes a method, apparatus, device, and medium for automatically discovering topology relationships, in order to solve the technical problem that manually checking the topology relationships between network devices is time-consuming, labor-intensive, and prone to errors.
[0004] In a first aspect, embodiments of this application provide an automatic topological relationship discovery method, the method comprising:
[0005] Within the first time period, according to the first time interval, M port information groups are acquired, each of the port information groups includes port information of N ports, the port information is obtained according to the alarm signal generated by the port, where M and N are both integers, M≥2, N≥1;
[0006] In each of the port information groups, the port information of N ports is combined in pairs to obtain multiple potential topology relationship port pairs. The potential topology relationship port pairs are recorded in the port information group. The potential topology relationship port pairs consist of a first port and a second port.
[0007] Based on the statistical results of the occurrence of the potential topology port pair in the M port information groups, the topology relationship between the first port and the second port in the potential topology port pair is determined. If the topology relationship between the first port and the second port is that they have a topology relationship, then the potential topology port pair is a port pair with a topology relationship.
[0008] Secondly, embodiments of this application provide an automatic topology discovery device, the device comprising:
[0009] The first acquisition module is used to acquire M port information groups according to a first time interval within a first time period. Each port information group includes port information of N ports. The port information is obtained based on the alarm signals generated by the ports. M and N are both integers, M≥2, N≥1.
[0010] The second acquisition module is used to combine the port information of N ports in pairs in each port information group to obtain multiple potential topology relationship port pairs, and record the potential topology relationship port pairs in the port information group. The potential topology relationship port pairs are composed of a first port and a second port.
[0011] The determining module is used to determine the topological relationship between the first port and the second port in the potential topological relationship port pair based on the statistical results of the occurrence of the potential topological relationship port pair in the M port information groups. If the topological relationship between the first port and the second port is that they have a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0012] Thirdly, embodiments of this application provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any embodiment of the first aspect.
[0013] Fourthly, embodiments of this application provide a computer-readable medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any embodiment of the first aspect.
[0014] The network device topology discovery method, apparatus, device, and medium provided in this application embodiment obtain port information in the port information group when a port generates an alarm signal. Based on the characteristic that alarm signals between port pairs with topological relationships inevitably influence each other, the port information group provided in this application embodiment contains potential topological relationships between each pair of ports corresponding to the port information. That is, there is a potential topological relationship between the first port and the second port in a potential topological relationship port pair. Based on the statistical results of the occurrence of potential topological relationship port pairs in all port information groups, it can be determined whether a true topological relationship exists between the first port and the second port in the potential topological relationship port pair. Ports with a true topological relationship are recorded as port pairs with a topological relationship, thereby achieving the purpose of automatically discovering the topological relationship between ports. This solves the technical problem that manually verifying the topological relationship between network devices is time-consuming, labor-intensive, and prone to errors. Furthermore, since the alarm signals between port pairs with topological relationships inevitably influence each other, the port pairs with topological relationships obtained through the technical solution of this application embodiment are more accurate. Attached Figure Description
[0015] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0016] Figure 1 This is a flowchart of an embodiment of the automatic topology discovery method of this application;
[0017] Figure 2 yes Figure 1 The diagram shown is a schematic representation of a port information group in one embodiment of the automatic topology discovery method of this application.
[0018] Figure 3 This is a flowchart of another embodiment of the automatic discovery method for topological relationships in this application;
[0019] Figure 4 This is a flowchart of another embodiment of the automatic discovery method for topological relationships in this application;
[0020] Figure 5 yes Figure 4 The diagram illustrates an example of step 404 determining an error in the optical fiber path between the first port and the peer port in another embodiment of the automatic topology discovery method of this application.
[0021] Figure 6 This is a flowchart of another embodiment of the automatic discovery method for topological relationships in this application;
[0022] Figure 7 This is a schematic diagram of the structure of an embodiment of the automatic topology discovery device of this application;
[0023] Figure 8 This is a schematic diagram of the structure of an electronic device used to implement the embodiments of this application. Detailed Implementation
[0024] All actions involving the acquisition of signals, information, or data in this application are carried out in accordance with the relevant data protection laws and policies of the country where the application is located, and with the authorization of the owner of the relevant device.
[0025] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0027] Please refer to Figure 1The diagram illustrates a flow 100 of an embodiment of the automatic topology discovery method according to this application. This automatic topology discovery method can be applied to various electronic devices with data processing capabilities. For example, the aforementioned electronic devices may include, but are not limited to, cloud servers, physical servers, etc. The executing entity of the automatic topology discovery method may be a processor in the aforementioned electronic device.
[0028] The automatic discovery method for this topological relationship includes the following steps:
[0029] Step 101: Within the first time period, according to the first time interval, acquire M port information groups. Each port information group includes port information of N ports. The port information is obtained based on the alarm signals generated by the ports. 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. To enable those skilled in the art to more clearly understand the technical solution provided by this application embodiment, in this embodiment and the following embodiments, a first time period of 30 days and a first time interval of 10 minutes are used as an example for explanation. In this case, M = 30 * 24 * 60 / 10 = 4320. That is, in step 101, within 30 days, at 10-minute intervals, 4320 port information groups can be obtained.
[0031] In this embodiment, the number N of port information included in each port information group can be different, and each port information uniquely corresponds to one port. For example, the port information can be a unique identifier of the port. Figure 2 As shown, among the 4320 port information groups, port information group 1 includes 4 port information entries: A, B, C, and Z, where A, B, C, and Z are unique port identifiers; port information group 2 includes 5 port information entries: F, Q, N, X, and Y, where F, Q, N, X, and Y are unique port identifiers, and so on. No further details are provided. Figure 2 Each port information group will be described in detail.
[0032] In this embodiment, a method for obtaining a port information group within a first time interval may include: recording the port information that generates an alarm signal within the first time interval, generating a port information recording log; performing deduplication processing on the port information in the port information recording log, and obtaining 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. Record the potential topology relationship port pairs in the port information group. The potential topology relationship port pairs consist of the first port and the second port.
[0034] In this embodiment, the number of potential topology 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 topology relationship port pairs of port information group 1 are 6, namely: AB, AC, AZ, BC, BZ and CZ. Taking the potential topology relationship port pair AB as an example, A is the first port and B is the second port.
[0036] Step 103: Based on the statistical results of the occurrence of potential topology relationship port pairs in the M port information groups, determine the topology relationship between the first port and the second port in the potential topology relationship port pair. If the topology relationship between the first port and the second port is topologically related, the potential topology 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 based on the statistical results of the occurrence of the potential topological relationship port pair in the M port information groups. Specifically, it may include the following three cases:
[0038] If the number of times a potential topological relationship port pair appears in 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 considered to be non-topological.
[0039] by Figure 2 As shown, taking the potential topology 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 topology port pair AZ. Here, AZnum represents the potential topology port pair AZ in... Figure 2 The number of times the information appears in the 4320 port information groups shown is Q, which is the first threshold. Q can be set to 3 by default, and Q can be modified according to actual needs.
[0040] If the number of times a potential topological relationship port pair appears in the M port information groups is greater than a first threshold, and the probability of the potential topological relationship port pair appearing in the M port information groups is less than or equal to a second threshold, then the topological relationship between the first port and the second port in the potential topological relationship port pair is that they have no topological relationship.
[0041] by Figure 2As shown, taking the potential topology 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 topology port pair AZ. Here, AZnum is the potential topology port pair AZ in... Figure 2 The number of times port A appears in the 4320 port information groups shown, where Anum is the number of times port A appears in the data. Figure 2 The number of times port Z appears in the 4320 port information groups shown, where Znum is the number of times port Z appears in the data. Figure 2 The number of times the port information groups appear in the 4320 groups shown is represented by P, which is the second threshold. The theoretical value of P is 100%. However, considering the influence of actual network latency and packet loss, this embodiment sets the default value of P to 80%. P can be modified according to actual needs. (AZnum*AZnum) / (Anum*Znum)*100% represents the potential topology relationship between port pairs AZ. Figure 2 The probability of occurrence in the 4320 port information groups shown.
[0042] If the number of times a potential topological relationship port pair appears in the M port information groups is greater than a first threshold, and the probability of the potential topological relationship port pair appearing in the M port information groups is greater than a second threshold, then the topological relationship between the first port and the second port in the potential topological relationship port pair is considered to be topologically related.
[0043] In this embodiment, the number of times a potential topology port pair appears in the M port information groups reflects the number of times the first port and the second port in the potential topology port pair fail simultaneously within a certain time range. When this number is greater than a first threshold, it indicates that the first port and the second port have a strong temporal correlation. The probability of a potential topology port pair appearing in the M port information groups reflects the probability that the first port and the second port in the potential topology port pair fail simultaneously. When this probability is greater than a second threshold, it indicates that the first port and the second port have a strong network topology correlation.
[0044] The method provided in the above embodiments of this application obtains port information in the port information group when a port generates an alarm signal. Based on the characteristic that alarm signals between port pairs with a topological relationship inevitably influence each other, the port information group provided in this application contains potential topological relationships between each pair of ports. That is, there is a potential topological relationship between the first port and the second port in a potential topological relationship port pair. Based on the statistical results of the occurrence of potential topological relationship port pairs in all port information groups, it can be determined whether a true topological relationship exists between the first port and the second port in the potential topological relationship port pair. Ports with a true topological relationship are recorded as port pairs with a topological relationship, thereby achieving the purpose of automatically discovering the topological relationship between ports. This solves the technical problem that manually checking the topological relationship between network devices is time-consuming, labor-intensive, and prone to errors. Furthermore, since alarm signals between port pairs with a topological relationship inevitably influence each other, the port pairs with a topological relationship obtained through the technical solution of this application are more accurate.
[0045] Please refer to Figure 3 The diagram illustrates a flow 300 of another embodiment of the automatic topology discovery method according to this application. This automatic topology discovery method can be applied to various electronic devices with data processing capabilities. For example, the aforementioned electronic devices may include, but are not limited to, cloud servers, physical servers, etc. The executing entity of this automatic topology discovery method may be a processor in the aforementioned electronic device.
[0046] The automatic discovery method for this topological relationship includes the following steps:
[0047] Step 301: Within the first time period, according to the first time interval, acquire M port information groups. Each port information group includes port information of N ports. The port information is obtained based on the alarm signals generated by the ports. 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. Record the potential topology relationship port pairs in the port information group. The potential topology relationship port pairs consist of the first port and the second port.
[0049] Step 303: Based on the statistical results of the occurrence of potential topology relationship port pairs in the M port information groups, determine the topology relationship between the first port and the second port in the potential topology relationship port pair. If the topology relationship between the first port and the second port is that they have a topology relationship, then the potential topology relationship port pair is a port pair that has a topology relationship.
[0050] Step 304: When the same port appears in two or more port pairs with topological relationships at the same time, obtain a target port pair with topological relationships from the two or more port pairs with topological relationships.
[0051] It should be noted that steps 301-303 in the automatic topology discovery method provided in this embodiment are different from those in the previous embodiment. Figure 1 Steps 101-103 shown are the same; for specific implementation details, please refer to [link / reference]. Figure 1 Steps 101-103 shown are described herein and will not be repeated here.
[0052] In this embodiment, step 304 can be implemented by one or more of the following methods:
[0053] Based on the device affiliation relationship between the first and second ports in a port pair with a topological relationship, obtain a target port pair with a topological relationship from two or more port pairs with a topological relationship.
[0054] Based on a pre-stored port topology mapping table, obtain a target port pair with a topology relationship from two or more port pairs with a topology relationship.
[0055] The first time period is extended until two or more port pairs with topological relationships are identified as a single target port pair with topological relationships. In this embodiment, extending the first time period can reduce the probability of potential topologically related port pairs appearing in the M port information groups, thereby reducing the number of port pairs with topological relationships ultimately obtained.
[0056] The automatic topology discovery method provided in this embodiment achieves... Figure 1 Based on the beneficial effects of the technical solution shown, when the same port appears in two or more port pairs with topological relationships at the same time, a target port pair with topological relationships can be obtained from the two or more port pairs with topological relationships, which further improves the accuracy of automatically discovering port pairs with topological interest.
[0057] Please refer to Figure 4 The diagram illustrates a flow 400 of another embodiment of the automatic topology discovery method according to this application. This automatic topology discovery method can be applied to various electronic devices with data processing capabilities. For example, the aforementioned electronic devices may include, but are not limited to, cloud servers, physical servers, etc. The executing entity of the automatic topology discovery method may be a processor in the aforementioned electronic device.
[0058] The automatic discovery method for this topological relationship includes the following steps:
[0059] Step 401: Within the first time period, according to the first time interval, acquire M port information groups. Each port information group includes port information of N ports. The port information is obtained based on the alarm signals generated by the ports. 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. Record the potential topology relationship port pairs in the port information group. The potential topology relationship port pairs consist of the first port and the second port.
[0061] Step 403: Based on the statistical results of the occurrence of potential topology relationship port pairs in the M port information groups, determine the topology relationship between the first port and the second port in the potential topology relationship port pair. If the topology relationship between the first port and the second port is that they have a topology relationship, then the potential topology relationship port pair is a port pair that has a topology relationship.
[0062] Step 404: Based on the port pairs with topological relationships, audit and correct the pre-recorded network topology relationships.
[0063] It should be noted that steps 401-403 in the automatic topology discovery method provided in this embodiment are different from those in the previous embodiment. Figure 1 Steps 101-103 shown are the same; for specific implementation details, please refer to [link / reference]. Figure 1 Steps 101-103 shown are described herein 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 peer port when the peer port of the first port in the network topology is different from the second port of the first port in the port pair with the topology relationship, and correct the peer port to be the second port.
[0065] For example: Through steps 401-403 above, it is determined that there is a port pair AZ with a topological relationship in the port information group, where A is the first port and Z is the second port. If the port pair with a topological relationship in the pre-stored network topology relationship is AY, where A is the first port and Y is the peer port of A, then step 404 can determine that the second port Z and the peer 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 peer port Y, and correcting the peer port of A as the first port in the network topology relationship from Y to Z.
[0066] Specifically, in this embodiment, the method for determining an error in the optical fiber path between the first port and the peer port in step 404 may include any one or more of the following:
[0067] When the second port and the peer port belong to the same network device, there is an error in the end network device port jump record in the optical fiber path between the first port and the peer port.
[0068] For example: Figure 5 As shown, ports A and Y are located in equipment rooms D1 and D2 respectively. Port pair AY is a port pair with a topological relationship recorded in the network topology relationship, where A is the first port and Y is the peer port. If the port pair with a topological relationship determined by steps 401-403 above is AZ, where A is the first port and Z is the second port, since AZ is inconsistent with AY, step 404 automatically checks and finds that there is an error 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 jumper entry at the end port Y of the optical fiber path between A and Y is incorrect. Step 404 automatically updates the end port Y of the optical fiber path between A and Y to port Z, and finally the topology relationship between ports A and Z is corrected to be consistent with the optical fiber path information.
[0069] If the second port belongs to the first network device, the peer port belongs to the second network device, and the first and second network devices belong to the same equipment room, and there is an error in the optical fiber path between the first port and the peer port at the outgoing segment of the peer port, then check the optical fiber line information of the outgoing segment of the peer port.
[0070] If the second port belongs to the first network device, the peer port belongs to the second network device, and the first and second network devices belong to different computer rooms, there is a complete error in the optical fiber path between the first port and the peer port. Investigate the complete optical fiber line information between the first port and the peer port.
[0071] The automatic topology discovery method provided in this embodiment achieves... Figure 1 Based on the beneficial effects of the technical solution shown, it is possible to audit and correct pre-recorded network topology relationships based on automatically discovered ports with topological relationships.
[0072] Please refer to Figure 6 The diagram illustrates a flow 600 of another embodiment of the automatic topology discovery method according to this application. This automatic topology discovery method can be applied to various electronic devices with data processing capabilities. For example, the aforementioned electronic devices may include, but are not limited to, cloud servers, physical servers, etc. The executing entity of the automatic topology discovery method may be a processor in the aforementioned electronic device.
[0073] The automatic discovery method for this topological relationship includes the following steps:
[0074] Step 601: Within the first time period, according to the first time interval, acquire M port information groups. Each port information group includes port information of N ports. The port information is obtained based on the alarm signals generated by the ports. 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. Record the potential topology relationship port pairs in the port information group. The potential topology relationship port pairs consist of the first port and the second port.
[0076] Step 603: Based on the statistical results of the occurrence of potential topology relationship port pairs in the M port information groups, determine the topology relationship between the first port and the second port in the potential topology relationship port pair. If the topology relationship between the first port and the second port is topologically related, the potential topology relationship port pair is a port pair with a topological relationship.
[0077] Step 604: Determine the alarm signal transmission logic of the first port and the second port in the port pair with topological relationship, so that the first port and / or the second port can send alarm signals according to the alarm signal transmission logic.
[0078] It should be noted that steps 601-603 in the automatic topology discovery method provided in this embodiment are different from those in the previous embodiment. Figure 1 Steps 101-103 shown are the same; for specific implementation details, please refer to [link / reference]. Figure 1 Steps 101-103 shown are described herein and will not be repeated here.
[0079] In this embodiment, step 604, which determines the alarm signal transmission logic for the first port and the second port in a port pair with a topological relationship, may include:
[0080] When the first port and the second port have a master-slave relationship, the alarm signal transmission logic is as follows: if alarm signals are generated simultaneously on both the first port and the second port, the alarm signal from the slave port will be merged onto the master port. For example, when the first port is the master port and the second port is the slave port, the alarm signal from the second port will be merged onto 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 alarm signals are generated simultaneously on the first port and the second port, the alarm signal merging relationship is determined based on the alarm probability value of the first port and the alarm probability value of the second port. Based on the alarm signal merging relationship, the alarm signal of the first port is merged into the second port, or the alarm signal of the second port is merged into 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] Wherein, d1 is the alarm level impact coefficient of the network device to which the first port belongs, which is manually set by network maintenance personnel according to the maintenance status of the network device. The default initial value is 1. The larger the value, the higher the probability of failure. n1 is the number of times the first port has historically generated alarm signals. The more times, the higher the probability of failure. t is the time value of the alarm signal. The smaller the time, the earlier the port generates an alarm 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] Wherein, d2 is the alarm level impact coefficient of the network device to which the second port belongs. It is manually set by network maintenance personnel according to the maintenance status of the network device. The default initial value is 1. The larger the value, the higher the probability of failure. n2 is the number of times the second port has historically generated alarm signals. The more times, the higher the probability of failure. t is the time value of the alarm signal. The smaller the time, the earlier the port generates an alarm and the higher the probability of failure.
[0088] The automatic topology discovery method provided in this embodiment achieves... Figure 1 Based on the beneficial effects of the technical solution shown, alarms can be merged for automatically discovered port pairs with topological relationships, thereby improving the efficiency and accuracy of alarm information transmission.
[0089] Please refer to Figure 7 As an implementation of the methods shown in the figures, this application provides an embodiment of an automatic topology discovery device, which is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0090] like Figure 7 As shown, the automatic topology discovery device 700 of this embodiment includes:
[0091] The first acquisition module 701 is used to acquire M port information groups according to a first time interval within a first time period. Each port information group includes port information of N ports. The port information is obtained based on the alarm signals generated by the ports. M and N are both integers, M≥2, N≥1.
[0092] The second acquisition module 702 is used to combine the port information of N ports in pairs in each port information group to obtain multiple potential topology relationship port pairs, and record the potential topology relationship port pairs in the port information group. The potential topology relationship port pairs are composed of a first port and a second port.
[0093] The determining module 703 is used to determine the topological relationship between the first port and the second port in the potential topological relationship port pair based on the statistical results of the occurrence of the potential topological relationship port pair in the M port information groups. If the topological relationship between the first port and the second port is that they have a topological relationship, the potential topological relationship port pair is a port pair with a topological relationship.
[0094] Optionally, the determining module 703 is specifically used to determine that the topological relationship between the first port and the second port in the potential topological relationship port pair is not topologically related 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] If the number of times the potential topology port pair appears in the M port information groups is greater than the first threshold, and the probability of the potential topology port pair appearing in the M port information groups is less than or equal to the second threshold, then the topology relationship between the first port and the second port in the potential topology port pair is that they have no topology relationship.
[0096] If the number of times the potential topology port pair appears in the M port information groups is greater than the first threshold, and the probability of the potential topology port pair appearing in the M port information groups is greater than the second threshold, then the topology relationship between the first port and the second port in the potential topology port pair is considered to be topologically related.
[0097] Optionally, the determining module 703 is further configured to, when the same port appears simultaneously in two or more of the port pairs with topological relationships, obtain a target port pair with topological relationships from the two or more port pairs with topological relationships.
[0098] Optionally, the determining module 703 is specifically configured to, based on the device affiliation relationship between the first port and the second port in the port pair with topological relationship, obtain a target port pair with topological relationship from two or more port pairs with topological relationship; and / or,
[0099] Based on a pre-stored port topology mapping table, obtain a target port pair with a topological relationship from two or more port pairs with such relationships; and / or,
[0100] Extend the first time period until the two or more topologically related port pairs become a single target topologically related port pair.
[0101] Optionally, the automatic topology discovery device may also include:
[0102] The audit and correction module is used to audit and correct the pre-recorded network topology relationships based on the port pairs with topological relationships.
[0103] Optionally, the 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 peer port when the peer port of the first port in the network topology is not the same as the second port of the first port in the port pair with the topology relationship, and to correct the peer port to be the second port.
[0104] Optionally, the audit and correction module is specifically used to detect and correct errors in the end-network device port jump record when the second port and the peer port belong to the same network device; or,
[0105] If the second port belongs to the first network device, the peer port belongs to the second network device, and the first and second network devices belong to the same equipment room, and there is an error in the fiber optic path between the first port and the peer port at the outgoing segment of the peer port, then the fiber optic line information of the outgoing segment of the peer port should be checked; or...
[0106] If the second port belongs to the first network device, the peer 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 complete error in the optical fiber path between the first port and the peer port. Investigate the complete optical fiber line information between the first port and the peer port.
[0107] Optionally, the automatic topology discovery device may also include:
[0108] An alarm signal transmission logic determination module is used to determine the alarm signal transmission logic of the first port and the second port in the port pair with topological relationship, so that the first port and / or the second port can transmit the alarm signal according to the alarm signal transmission logic.
[0109] Optionally, the alarm signal transmission logic determination module is specifically used to determine the alarm signal transmission logic as follows 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 simultaneously, the alarm signal from the slave port is merged into the master port; or,
[0110] 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 the alarm signal simultaneously, 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. According to the alarm signal merging relationship, the alarm signal of the first port is merged into the second port, or the alarm signal of the second port is merged into the first port.
[0111] The network device topology discovery device provided in this application obtains port information in the port information group when a port generates an alarm signal. Based on the characteristic that alarm signals between port pairs with a topological relationship inevitably influence each other, the port information group provided in this application ensures that there is a potential topological relationship between each pair of ports. Specifically, there is a potential topological relationship between the first port and the second port in a potential topological relationship port pair. Based on the statistical results of the occurrence of potential topological relationship port pairs in all port information groups, it can be determined whether a true topological relationship exists between the first port and the second port in the potential topological relationship port pair. Ports with a true topological relationship are recorded as a port pair with a topological relationship, thereby achieving the purpose of automatically discovering the topological relationship between ports. This solves the technical problem that manually verifying the topological relationship between network devices is time-consuming, labor-intensive, and prone to errors. Furthermore, since the alarm signals between port pairs with a topological relationship inevitably influence each other, the port pairs with topological relationships obtained through the technical solution of this application are more accurate.
[0112] The following is for reference. Figure 8 It shows a schematic diagram of the structure of an electronic device used to implement some embodiments of this application. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this application.
[0113] like Figure 8As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processor, 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. The RAM 803 also stores various programs and data required for the operation of the electronic device 800. The processing device 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0114] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, disks, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 800 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 4 Each box shown can represent a device or multiple devices as needed.
[0115] In particular, according to some embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, it performs the functions defined in the methods of some embodiments of this application.
[0116] It should be noted that the computer-readable medium described in some embodiments of this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0117] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0118] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: upon receiving a message sending request, obtain the message to be tested from the message sending request; extract the text content from the message to be tested; detect the text content based on keywords of historical spam messages, hash values of historical spam messages, and a large language model to determine whether the message to be tested is spam; and, in response to the message to be tested being spam, intercept the message to be tested.
[0119] Computer program code for performing operations of some embodiments of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++; and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, or it can be connected to an external computer (e.g., via the Internet using an Internet service provider), including local area networks (LANs) or wide area networks (WANs).
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0121] The units described in some embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first determining unit, a second determining unit, a selecting unit, and a third determining unit. The names of these units do not necessarily limit the specific unit itself.
[0122] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0123] The above description is merely a selection of preferred embodiments of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this application.
Claims
1. A method for automatic discovery of topological relationships, characterized in that, The method comprises: In a first time period, a plurality of port information groups are acquired at a first time interval, each of the port information groups comprising port information of N ports, the port information being obtained according to alarm signals generated by the ports, wherein M and N are integers, M≥2, and N≥1; In each of the port information groups, the port information of the N ports is combined in pairs to obtain a plurality of potential topology relationship port pairs, the potential topology relationship port pairs being recorded in the port information groups, and each of the potential topology relationship port pairs being composed of a first port and a second port; According to a statistical result of the potential topology relationship port pairs in the M port information groups, a topology relationship between the first port and the second port in the potential topology relationship port pair is determined, and in a case where the topology relationship between the first port and the second port is a topology relationship, the potential topology relationship port pair is a port pair with a topology relationship.
2. The method of claim 1, wherein, The determining of the topology relationship between the first port and the second port in the potential topology relationship port pair according to the statistical result of the potential topology relationship port pairs in the M port information groups comprises: In a case where a number of occurrences of the potential topology relationship port pair in the M port information groups is less than or equal to a first threshold value, the topology relationship between the first port and the second port in the potential topology relationship port pair is not a topology relationship; In a case where the number of occurrences of the potential topology relationship port pair in the M port information groups is greater than the first threshold value and a probability of occurrence of the potential topology relationship port pair in the M port information groups is less than or equal to a second threshold value, the topology relationship between the first port and the second port in the potential topology relationship port pair is not a topology relationship; In a case where the number of occurrences of the potential topology relationship port pair in the M port information groups is greater than the first threshold value and the probability of occurrence of the potential topology relationship port pair in the M port information groups is greater than the second threshold value, the topology relationship between the first port and the second port in the potential topology relationship port pair is a topology relationship.
3. The method of claim 1, wherein, After the determining of the topology relationship between the first port and the second port in the potential topology relationship port pair according to the statistical result of the potential topology relationship port pairs in the M port information groups, in a case where the topology relationship between the first port and the second port is a topology relationship, the potential topology relationship port pair is a port pair with a topology relationship, the method further comprises: In a case where a same port simultaneously appears in two or more of the port pairs with a topology relationship, one target port pair with a topology relationship is obtained from the two or more of the port pairs with a topology relationship.
4. The method of claim 3, wherein, The obtaining of the one target port pair with a topology relationship from the two or more of the port pairs with a topology relationship comprises: According to a device belonging relationship between the first port and the second port in the port pairs with a topology relationship, the one target port pair with a topology relationship is obtained from the two or more of the port pairs with a topology relationship; and / or, acquiring a target port pair with a topological relationship from two or more of the port pairs with the topological relationship according to a pre-stored port topological relationship correspondence table; and / or, extending the first time period until the two or more port pairs with the topological relationship are the target port pair with the topological relationship.
5. The method of claim 1, wherein, The method further comprises: correcting the pre-recorded network topological relationship according to the port pair with the topological relationship.
6. The method of claim 5, wherein, The correcting the pre-recorded network topological relationship according to the port pair with the topological relationship comprises: in a case where a peer port of the first port pair in the network topological relationship is not the second port of the first port pair in the port pair with the topological relationship, determining that there is an error in a fiber optical path between the first port and the peer port, and correcting the peer port to be the second port.
7. The method of claim 6, wherein, The determining that there is an error in the fiber optical path between the first port and the peer port comprises: in a case where the second port and the peer port belong to a same network device, there is an end network device port jump record error in the fiber optical path between the first port and the peer port; or, in a case where the second port belongs to a first network device, the peer port belongs to a second network device, and the first network device and the second network device belong to a same machine room, there is an error in an outgoing section of the peer port in the fiber optical path between the first port and the peer port, and the fiber line information of the outgoing section of the peer port is checked; or in a case where the second port belongs to a first network device, the peer port belongs to a second network device, and the first network device and the second network device belong to different machine rooms, there is a whole-path error in the fiber optical path between the first port and the peer port, and the whole-path fiber line information between the first port and the peer port is checked.
8. The method of claim 1, wherein, The method further comprises: determining the alarm signal sending logic of the first port and the second port in the port pair with 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 of claim 8, wherein, The acquiring the alarm signal sending logic of the first port and the second port in the port pair with the topological relationship comprises: in a case where the first port and the second port have a master-slave relationship, determining that the alarm signal sending logic is to merge the alarm signal of the slave port to the master port in a case where the alarm signal is generated in the first port and the second port simultaneously; or in a case where the first port and the second port do not have a master-slave relationship, determining that the alarm signal sending logic is to send the alarm signal of the first port and the alarm signal of the second port simultaneously. In the case that the first port and the second port do not have a master-slave relationship, the alarm signal sending logic is determined as follows: in the case that the first port and the second port generate the alarm signal simultaneously, according to the alarm probability value of the first port and the alarm probability value of the second port, a merging relationship of alarm signals is determined, and according to the merging relationship of alarm signals, 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. An apparatus for automatic discovery of topological relationships, characterized in that The apparatus comprises: A first obtaining module is configured to obtain M port information groups in a first time period according to a first time interval, each of the port information groups comprising port information of N ports, the port information being obtained according to alarm signals generated by the ports, wherein M and N are integers, M≥2, and N≥1. A second obtaining module is configured to combine the port information of the N ports in each of the port information groups in pairs to obtain a plurality of potential topology relationship port pairs, and record the potential topology relationship port pairs in the port information group, the potential topology relationship port pair being composed of a first port and a second port. A determining module is configured to determine a topology relationship of the first port and the second port in the potential topology relationship port pair according to a statistical result of the potential topology relationship port pair in the M port information groups, and in the case that the topology relationship of the first port and the second port has a topology relationship, the potential topology relationship port pair is a port pair having a topology relationship.
11. An electronic device, comprising: comprise: one or more processors; a memory device having stored thereon one or more programs, 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-9.
12. A computer readable medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method according to any one of claims 1-9. The program is executed by the processor to implement the method according to any one of claims 1-9.
Citation Information
Patent Citations
Network topology generation method and server
CN110830290A
Path-based optical simulation device activation method and device, and terminal equipment
CN113935279A