Network transmission path monitoring method and device, electronic equipment and storage medium
By building accessible paths of distributed networks and calculating path weights, the problems of path misreport and resource waste in the existing technology are solved, and efficient monitoring and display of network paths are achieved.
Patent Information
- Application Number
- CN202310505877.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
The existing network path monitoring methods are difficult to fully describe the paths between hosts, and ignore the differences in importance between paths in the actual network, resulting in some paths being misreported and resource waste.
By extracting the connectivity characteristics between distributed network nodes, multiple network reachable paths are built, and the weight of each path is calculated based on historical access information, differentiated monitoring is carried out to avoid path misreport, and monitoring efficiency and resource utilization are improved.
It effectively improves the accuracy and efficiency of network path monitoring, avoids path misreport, optimizes resource utilization, and realizes clear and intuitive display of network paths.
Smart Images

Figure CN118921299A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of network path monitoring and analysis, and in particular to a network transmission path monitoring method, device, electronic device and storage medium. Background Art
[0002] With the rapid transformation of the country's digital economy, information technology has developed rapidly, the scale of computer network platforms has increased day by day, and the topology and business scenarios have become more complex and diverse. In actual networks, various businesses and services rely on the stability and survivability of the network. Distributed networks are widely used because of their high reliability. At the same time, threats to distributed networks are also emerging in an endless stream. Since it is difficult for attackers to attack the entire network, and the transmission path attack is easy and difficult to detect in time, once a certain path is destroyed, the service users of the business carried by the path will suffer losses. And when multiple paths are attacked, the entire network will be disassembled, and the harm will spread rapidly, causing large-scale losses, or even catastrophic consequences. Therefore, the path becomes the main target of attack. Therefore, higher requirements are also put forward for the distributed network path monitoring and analysis platform. In order to enable security personnel to clearly and intuitively understand the status and characteristics of the target network path, it is necessary to focus on the research of network path monitoring and analysis technology to adapt to the rapidly developing network business needs.
[0003] Among the existing methods for network path monitoring and analysis, the mainstream method is to first simplify the network topology using a connectivity graph model or complex network theory, then extract the end-to-end path, and finally realize the visualization of the network topology and path status. However, this method has the following two problems:
[0004] (1) It is difficult to fully describe the path between hosts when the path is limited to the paths between ports. When the path or part of the path is composed of a protocol that does not require a port (for example, ICMP), the path may be missed.
[0005] (2) The differences between paths in the actual network are ignored and the importance of paths is considered to be the same, which leads to unnecessary waste of resources on some paths. Summary of the invention
[0006] In view of this, in order to solve the above technical problems or part of the technical problems, an embodiment of the present invention provides a network transmission path monitoring method, device, electronic device and storage medium.
[0007] In a first aspect, an embodiment of the present invention provides a network transmission path monitoring method, comprising:
[0008] Extracting connectivity features between distributed network nodes, and constructing multiple network reachable paths based on the connectivity features;
[0009] Obtaining historical access information corresponding to the plurality of network reachable paths respectively, and calculating a weight corresponding to each network reachable path based on the historical access information;
[0010] Based on the weight corresponding to each network reachable path, each network reachable path is monitored differently.
[0011] In a possible implementation, the method further includes:
[0012] Extract the topology of distributed networks;
[0013] Generate physical connection relationships between hosts in the distributed network based on the topological structure;
[0014] Performing reachability filtering based on the physical connection relationship between the hosts according to preset rules to obtain a reachability relationship set between the hosts;
[0015] Based on the physical connection relationship between the hosts and the reachability relationship set between the hosts, a host connectivity graph is generated to construct multiple network reachable paths.
[0016] In a possible implementation, the method further includes:
[0017] Based on the physical interface properties of multiple devices of the nodes of the distributed network, a set of physical network interfaces on the host in the nodes of the distributed network and a set of physical connection relationships between the interfaces are extracted.
[0018] In a possible implementation, the method further includes:
[0019] Based on the physical network interface set and the physical connection relationship set, a device interface sequence accessed by any host when accessing another host is obtained through a preset algorithm to obtain multiple device interface sequences;
[0020] Based on the multiple device interface sequences, a physical connection relationship between hosts in the distributed network is generated.
[0021] In a possible implementation, the method further includes:
[0022] Based on the physical connection relationship between the hosts and the reachability relationship set between the hosts, the hosts are modeled as vertices and the reachability relationships are modeled as edges, and a host connectivity graph based on the host reachability relationships is generated;
[0023] Based on the host connectivity graph, multiple network reachable paths are constructed using a preset algorithm.
[0024] In a possible implementation, the method further includes:
[0025] Obtaining the historical number of visits corresponding to each network-reachable path among the multiple network-reachable paths;
[0026] Calculate the historical access frequency corresponding to each network reachable path based on the historical access times;
[0027] The weight corresponding to each network reachable path is calculated based on the historical access frequency by using a first formula, where the first formula is: i =(Freq i -Freq min ) / (Freq max -Freq min +1);
[0028] Among them, Freq i is the historical access frequency of network reachable path i per unit time, Freq min is the lowest historical access frequency of all network-reachable paths in unit time, Freq max It is the highest historical access frequency among all network reachable paths in unit time.
[0029] In a possible implementation, the method further includes:
[0030] Pre-set weight-based monitoring rules;
[0031] Differentiated monitoring is performed on each network reachable path based on the monitoring rule and the weight corresponding to each network reachable path.
[0032] In a second aspect, an embodiment of the present invention provides a network transmission path monitoring device, comprising:
[0033] An extraction and construction module, used to extract connectivity features between distributed network nodes and construct multiple network reachable paths based on the connectivity features;
[0034] An acquisition calculation module is used to obtain historical access information corresponding to the plurality of network reachable paths respectively, and calculate a weight corresponding to each network reachable path based on the historical access information;
[0035] The monitoring module is used to perform differentiated monitoring on each network reachable path based on the weight corresponding to each network reachable path.
[0036] Optionally, the extraction and construction module is also used to extract the topological structure of the distributed network; generate the physical connection relationship between hosts of the distributed network based on the topological structure; perform reachability filtering based on the physical connection relationship between the hosts according to preset rules to obtain a set of reachability relationships between the hosts; generate a host connectivity graph based on the physical connection relationship between the hosts and the set of reachability relationships between the hosts, and construct multiple network reachable paths.
[0037] Optionally, the extraction construction module is further used to extract a set of physical network interfaces on hosts in the nodes of the distributed network and a set of physical connection relationships between the interfaces based on properties of multiple device physical interfaces of the nodes of the distributed network.
[0038] Optionally, the extraction and construction module is also used to obtain, based on the physical network interface set and the physical connection relationship set, a sequence of device interfaces accessed by any host when accessing another host through a preset algorithm, to obtain multiple device interface sequences; based on the multiple device interface sequences, generate physical connection relationships between hosts in a distributed network.
[0039] Optionally, the extraction and construction module is also used to model the hosts as vertices and the reachability relationships as edges based on the physical connection relationships between the hosts and the reachability relationship sets between the hosts, thereby generating a host connectivity graph based on the host reachability relationships; and construct multiple network reachable paths based on the host connectivity graph through a preset algorithm.
[0040] Optionally, the acquisition calculation module is further used to obtain the number of historical visits corresponding to each network reachable path in the multiple network reachable paths; calculate the historical visit frequency corresponding to each network reachable path based on the historical visit number; calculate the weight corresponding to each network reachable path based on the historical visit frequency by a first formula, and the first formula is: ω i =(Freq i -Freq min ) / (Freq max -Freq min +1); where Freq i is the historical access frequency of network reachable path i per unit time, Freq min is the lowest historical access frequency of all network-reachable paths in unit time, Freq max It is the highest historical access frequency among all network reachable paths in unit time.
[0041] Optionally, the monitoring module is further used to pre-set weight-based monitoring rules; and perform differentiated monitoring on each network reachable path based on the monitoring rules and the weight corresponding to each network reachable path.
[0042] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor and a memory, wherein the processor is used to execute a network transmission path monitoring program stored in the memory to implement the network transmission path monitoring method described in the first aspect above.
[0043] In a fourth aspect, an embodiment of the present invention provides a storage medium, including: the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the network transmission path monitoring method described in the first aspect above.
[0044] The network transmission path monitoring solution provided by the embodiment of the present invention extracts the connectivity features between distributed network nodes, and constructs multiple network reachable paths based on the connectivity features; obtains the historical access information corresponding to the multiple network reachable paths, and calculates the weight corresponding to each network reachable path based on the historical access information; and performs differentiated monitoring on each network reachable path based on the weight corresponding to each network reachable path. Compared with the existing methods for network path monitoring and analysis, it is difficult to fully describe the paths between hosts and ignores the problem of importance differences between paths in the actual network. According to this solution, the physical connection relationship of the hosts in the network is obtained according to the topological structure to construct a network reachable path, avoiding the omission of some paths; then the path weight is calculated according to the historical access information of each network path, and the path monitoring is performed according to the weight information, which effectively improves the monitoring efficiency and resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of a research framework of a network transmission path monitoring method provided by an embodiment of the present invention;
[0046] Figure 2 A schematic diagram of a flow chart of a network transmission path monitoring method provided by an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of a flow chart of another network transmission path monitoring method provided by an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of a network topology provided in an embodiment of the present invention;
[0049] Figure 5 A flow chart for constructing a host reachable relationship set provided by an embodiment of the present invention;
[0050] Figure 6 A connectivity graph model based on host reachability relationships provided by an embodiment of the present invention;
[0051] Figure 7A schematic diagram of the structure of a network transmission path monitoring device provided by an embodiment of the present invention;
[0052] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0055] Figure 1 A schematic diagram of a research framework of a network transmission path monitoring method provided by an embodiment of the present invention, such as Figure 1 As shown, the present invention uses a visualization method to clearly display the network topology and path information for distributed networks with complex functional components and numerous network paths. The reachable path is constructed based on the actual physical link to avoid path omissions caused by some protocols not requiring port communication. After the reachable path is constructed, the path weight is calculated based on real-time traffic information, relatively important paths are identified, and key monitoring is performed to implement differentiated strategies and improve resource utilization. Finally, the Web-based remote visualization technology is used to achieve clear display of network information.
[0056] Figure 2 A flow chart of a network transmission path monitoring method provided by an embodiment of the present invention is as follows: Figure 2 As shown, the method specifically includes:
[0057] S21. Extract connectivity features between distributed network nodes, and construct multiple network reachable paths based on the connectivity features.
[0058] In the embodiment of the present invention, a method for constructing a network reachable path is provided for a distributed network by extracting connectivity features between distributed network nodes. The method decomposes the distributed network topology into two sets of physical network interfaces on the host and physical connection relationships between interfaces in the network, and generates a reachable relationship set by filtering through physical connection relationship construction rules, thereby obtaining a connectivity graph corresponding to network traffic, and thereby obtaining a network reachable path that is independent of distributed network functional components and only related to connectivity features.
[0059] Specifically, first, extract the topology structure Topology=(I, E) of the distributed network, and obtain the set I of physical network interfaces on the host and the set E of physical connection relationships between interfaces in the network.
[0060] Furthermore, the physical connection relationship between hosts is generated. According to the network topology structure Topology = (I, E), the physical connection relationship LK between hosts of the entire network is generated.
[0061] Furthermore, the host reachability relations are filtered by preset rules to generate a host reachability relation set C".
[0062] Furthermore, a host reachable path is constructed. The host reachability relationship set C is obtained by combining the physical connection relationship LK between hosts in the entire network with the configuration rules. The host is modeled as a vertex and the reachable relationship is modeled as an edge. A host connectivity graph can be generated to construct multiple network reachable paths.
[0063] S22: Obtain historical access information corresponding to the plurality of network reachable paths respectively, and calculate a weight corresponding to each network reachable path based on the historical access information.
[0064] In response to the real-time requirements of network security monitoring, the path weight is calculated based on the access frequency to quickly find relatively critical paths from complex connection lines. The network packet tracking method is used to count the historical access information of the path (for example, the number of visits) and calculate the historical information such as the access frequency of each path per unit time. The weight of each path is further calculated according to the preset calculation method. According to the characteristic that the weight is proportional to the importance of the path, the relatively important paths are screened out to improve the monitoring efficiency, thereby realizing real-time security monitoring of the network.
[0065] S23. Based on the weight corresponding to each network reachable path, perform differentiated monitoring on each network reachable path.
[0066] In the embodiment of the present invention, a weight-based monitoring rule may be preset; and each network-reachable path may be monitored differentially based on the monitoring rule and the weight corresponding to each network-reachable path.
[0067] Optionally, in response to the cross-platform and convenience requirements of network security monitoring, the embodiments of the present invention can also implement remote visualization based on the Web, achieve cross-platform access, and zero software installation, making collaboration and sharing among security personnel more convenient, so that they can focus more on studying the core issues in their respective fields. Based on the traditional "HTML+CSS+JavaScript" front-end development technology, the Vue framework is introduced for modular development to improve the scalability of the application. For the developed visualization front-end, a force-guided visualization layout algorithm and AJAX communication method are used to display the network topology and optimize the page response, thereby realizing cross-platform and convenient security monitoring of the network.
[0068] The network transmission path monitoring method provided by the embodiment of the present invention extracts the connectivity features between distributed network nodes, and constructs multiple network reachable paths based on the connectivity features; obtains the historical access information corresponding to the multiple network reachable paths, and calculates the weight corresponding to each network reachable path based on the historical access information; and performs differentiated monitoring on each network reachable path based on the weight corresponding to each network reachable path. Compared with the existing methods for network path monitoring and analysis, it is difficult to fully describe the paths between hosts and ignores the problem of importance differences between paths in the actual network. According to this method, the physical connection relationship of the hosts in the network is obtained according to the topological structure to construct a network reachable path, avoiding the omission of some paths; then the path weight is calculated according to the historical access information of each network path, and the path monitoring is performed according to the weight information, which effectively improves the monitoring efficiency and resource utilization.
[0069] Figure 3 A flow chart of another network transmission path monitoring method provided by an embodiment of the present invention is as follows: Figure 3 As shown, the method specifically includes:
[0070] S31. Extract the topological structure of the distributed network.
[0071] In the embodiment of the present invention, the network topology refers to the physical layout and connection relationship between all devices in the network. The topology structure hides the detailed constraints such as the internal physical wiring and the distance between nodes, and focuses on the connection relationship between devices in the network.
[0072] Specifically, the network topology is extracted and recorded as Topology = (I, E). Based on the physical interface attributes of multiple devices of the nodes of the distributed network, the physical network interface set I on the host in the nodes of the distributed network and the physical connection relationship set E between the interfaces are extracted. Among them, the multiple device physical interface attributes include device physical interface attributes and physical connection relationship attributes between interfaces; the device physical interface attributes include source interface device identifier ids, destination interface device identifier idd, source interface name intfs, destination interface name intfd, source interface device type types, destination interface device type typed, source interface IP address ips, destination interface IP address ipd, source interface subnet mask masks, destination interface subnet mask maskd; the physical connection relationship attributes between interfaces include device identifier id, interface name intf, device type type (value range is {HOST, HUB, L2SW, L3 SW, ROUTER, FIREWALL}).
[0073] S32: Generate a physical connection relationship between hosts in the distributed network based on the topological structure.
[0074] Based on a set of physical network interfaces and a set of physical connection relationships, a sequence of device interfaces accessed by any host when accessing another host is obtained through a preset algorithm to obtain multiple device interface sequences; based on the multiple device interface sequences, the physical connection relationships between hosts in a distributed network are generated.
[0075] After obtaining the network topology Topolopy = (I, E), the host physical connection relationship set of the target network is generated. The host physical connection relationship refers to the sequence set of device interfaces accessed by any host when accessing another host. i To host H j The physical connection relationship is often recorded as Link (H i , H j )={L1,…,L k}, where L i (1≤i≤k) indicates that the host H i and host H j A valid physical link between two hosts, each link is a sequence of non-repetitive devices and interfaces. The physical connection relationship between any two hosts constitutes the host connection relationship of the entire network LK = {Link (H i , H j )},H i , H j Any two different hosts in the network.
[0076] For example, Figure 4In the network topology shown, the host physical connection relationship from host H1 to host H2 is represented by Link (H1, H2). Valid links L1 and L2 are represented by solid lines and dotted lines in the figure respectively. The corresponding valid links L1 are {(H1, eth0), (S1, eth0), (S1, eth1), (R1, eth0), (R1, eth1), (R2, eth0), (R2, eth1), (H2, eth0)}, and L2 are {(H1, eth0), (S1, eth0), (S1, eth1), (R1, eth0), (R1, eth2), (R3, eth0), (R3, eth1), (R2, eth2), (R2, eth1), (H2, eth0)}.
[0077] The embodiment of the present invention constructs the following algorithm process for the above-mentioned special network physical connection relationship model:
[0078] (a) Extract all interfaces i whose device type is host (i.e., i∈I, i.type="HOST") in the network and save them as set H.
[0079] (b) Iterate and access each host interface i in H, find several valid links starting from i and ending at another host interface j according to the physical connection relationship E between interfaces, and save the link set as the host physical connection relationship Link(i.id, j.id).
[0080] (c) In each iteration of step (b), add the current interface i to the link. If the device where the current interface is located is a router, select an unused interface for forwarding and add the interface to the link. Otherwise, find an interface physical relationship connection e∈E (i.e. f.inf=e.intfs) whose source interface name is consistent with the interface f at the end of the link from E, and add the destination interface in e to the end of the link until the end of the link is a host interface. After generating a valid path, use the backtracking method to find other valid paths starting from interface i.
[0081] (d) The physical connection relationship Link (H i , H j ) is saved in the physical connection relationship set LK between hosts to generate a physical connection relationship model.
[0082] based on Figure 4 The topology structure of the host computer includes six physical connection relationships LK, namely Link[H1, H2], Link[H1, H3], Link[H2, H1], Link[H2, H3], Link[H3, H1], and Link[H3, H2]. The corresponding specific reachable paths are as follows:
[0083] Link[H1, H2]: {(H1, eth0), (S1, eth0), (S1, eth1), (R1, eth0), (R1, eth1), (R2, eth0), (R2, eth1), (H2, eth0)} and {(H1, eth0), (S1, eth0), (S1, eth1), (R1, eth0), (R1, eth2), (R3, eth0), (R3, eth1), (R2, eth2), (R2, eth1), (H2, eth0)};
[0084] Link[H1, H3]: {(H1, eth0), (S1, eth0), (S1, eth1), (R1, eth0), (R1, eth1), (R2, eth0), (R2, eth2), (R3, eth1), (R3, eth2), (H3, eth0)} and {(H1, eth0), (S1, eth0), (S1, eth1), (R1, eth0), (R1, eth2), (R3, eth0), (R3, eth2), (H3, eth0)};
[0085] Link[H2, H1]: {(H2, eth0), (R2, eth1), (R2, eth0), (R1, eth1), (R1, eth0), (S1, eth1), (S1, eth0), (H1, eth0)} and {(H2, eth0), (R2, eth1), (R2, eth2), (R3, eth1), (R3, eth0), (R1, eth2), (R1, eth0), (S1, eth1), (S1, eth0), (H1, eth0)};
[0086] Link[H2, H3]: {(H2, eth0), (R2, eth1), (R2, eth0), (R1, eth1), (R1, eth2), (R3, eth0), (R3, eth2), (H3, eth0)} and {(H2, eth0), (R2, eth1), (R2, eth2), (R3, eth1), (R3, eth2), (H3, eth0)};
[0087] Link[H3, H1]: (H3, eth0), (R3, eth2), (R3, eth0), (R1, eth2), (R1, eth1), (R2, eth0), (R2, e th1), (H2, eth0)} and {(H3, eth0), (R3, eth2), (R3, eth1), (R2, eth2), (R2, eth1), (H2, eth0)}.
[0088] S33. Perform reachability filtering based on the physical connection relationship between the hosts according to preset rules to obtain a reachability relationship set between the hosts.
[0089] For the reachable paths obtained based on the physical connection relationship, the reachable relationships between all devices can be obtained. If these reachable relationships need to be filtered, the configuration rule extraction mechanism needs to be applied, including ACL rule filtering and route filtering.
[0090] Configuration rules refer to the ACL rules and routing rule sets on each connected device in the network, denoted as Configure, Configure = (A, R), A is the ACL rule set, R is the routing rule set. ACL rules are usually configured on the interface of the connected device and only take effect on the data packets passing through the interface. Routing rules are usually configured on the connected device and take effect on all data packets passing through the device. Among them, the specific attributes of the ACL rule include the device identification id where the ACL rule is located, the destination address wildcard matching code maskd, the interface name intf where the ACL rule is located, the filtering protocol type pro (the value range is {SNIFF, ARP, IP, ICMP, IGMP, TCP, UDP, ANY}), the source IP address ips, the destination port range set Port (the value range is {[a, b]|0≤a≤b≤65535}), the source address wildcard matching code masks (the value range is {0, 1}), the direction of the ACL rule dir (the value range is {IN, OUT}), the destination interface IP address ipd, and the action of the ACL rule action (the value range is {PERMIT, DENY}); the specific attributes of the routing rule include the identification id of the device where the routing rule is located, the destination address ip in the data packet, the subnet mask mask in the data packet, and the destination interface intf for forwarding the data packet.
[0091] ACL rule filtering function: filter(C', A')=C", means that the host reachability relationship set C' generates a filtered host reachability relationship set C" under the effect of the ACL rule set A'.
[0092] The implementation steps of the ACL rule filtering function are as follows:
[0093] (a) This algorithm assumes that the last ACL rule prohibits all packets from passing. Read element c in the host reachability set C'.
[0094] (b) Read rule a in the ACL rule set.
[0095] (c) Determine the action of a. If it is DENY, a is not processed and the next ACL rule is read.
[0096] (d) Determine whether c.ips can match the IP address ips and wildcard masks in rule a. If it fails, read the next ACL rule.
[0097] (e) Determine whether c.ipd can match the IP address ipd and wildcard maskd in rule a. If it fails, read the next ACL rule.
[0098] (f) Calculate the intersection of two port sets c.Port and a.Port. For example, the intersection of [0,80] and [21,100] is [21,80].
[0099] (g) Add the host reachability relation to set C".
[0100] The time complexity of steps (b) and (c) is O(|C'|) and O(|A'|) respectively, so the time complexity of the ACL rule filtering function is O(|C'||A'|).
[0101] Routing rule filtering function: filter(C',R')=C", means that the reachability relationship set C' generates a new host reachability relationship set C" under the effect of the routing rule set R'.
[0102] The embodiment of the present invention designs a corresponding routing rule filtering function, and the specific steps for implementing it are as follows:
[0103] (a) Read element c in the host reachability set C'.
[0104] (b) Read rule r from the routing rule set.
[0105] (c) Determine whether c.ipd matches r.ip / r.mask successfully. If it fails, read the next routing rule.
[0106] (d) Add c to the set C".
[0107] In the above steps, the time complexity of step (a) and step (d) is O(|C'|) and O(|R'|) respectively, so the time complexity of the routing rule filtering function is O(|C'||R'|).
[0108] Taking the ACL rule {id, intf, ips, masks, ipd, maskd, pro, port, dir, action} = {R1, eth0, 128.30.37.13, 0, 128.30.33.13, 0, ARP, [40, 80], OUT, DENY} as an example, when the data packet sent by H2 to H1 is forwarded through the eth0 interface of router R1, the action is DENY, then the action is prohibited, and therefore the data packet will be filtered out.
[0109] S34. Based on the physical connection relationship between the hosts and the reachability relationship set between the hosts, a host connectivity graph is generated to construct multiple network reachable paths.
[0110] Based on the physical connection relationship between hosts and the set of reachability relationships between hosts, the hosts are modeled as vertices and the reachability relationships are modeled as edges to generate a host connectivity graph based on the host reachability relationships. Based on the host connectivity graph, multiple network reachable paths are constructed using a preset algorithm.
[0111] Specifically, the process of generating the host reachability relationship set is as follows: Figure 5 As shown in Figure 1, we first use the network topology to generate a host physical connection relationship set, and then combine the configuration rules to obtain the host reachability relationship set. After obtaining the host reachability relationship set, we model the host as a vertex and the reachability relationship as an edge, generate a connectivity graph based on the host reachability relationship, and construct a reachable path. The generated connectivity graph is shown in Figure 1. Figure 6 shown.
[0112] According to the generated host connectivity graph, the algorithm for constructing network reachable paths is as follows:
[0113] (a) Construct an empty set C of reachable paths.
[0114] (b) Loop through each vertex in the graph, N i The currently visited vertex.
[0115] (c) Obtain N i The neighbor node set A.
[0116] (d) Traverse the elements in A, N j Generate a reachable path for the current visited node <N i , N j >Add to set C.
[0117] (e) If all elements in A have not been traversed, return to step (d).
[0118] (f) If all elements in A have been traversed, return to step (b).
[0119] S35. Obtain historical access information corresponding to the plurality of network reachable paths respectively, and calculate a weight corresponding to each network reachable path based on the historical access information.
[0120] S36. Pre-set weight-based monitoring rules.
[0121] S37: Perform differentiated monitoring on each network reachable path based on the monitoring rule and the weight corresponding to each network reachable path.
[0122] The following is a unified description of S35-S37:
[0123] The embodiment of the present invention adopts a path weight calculation method based on access frequency, so that relatively important paths can be found from complex connection lines. Real-time monitoring of important paths not only simplifies the difficulty of monitoring paths, but also improves information security.
[0124] A path refers to the communication line between two hosts in a topology graph, which can also be called an edge in graph theory. It can be clearly seen in the constructed topology directed graph. The total length of packets refers to the size of all packets transmitted on the path, and the total number refers to how many packets are transmitted on this path. The number of packets can be used to count the number of times each path is visited.
[0125] Specifically, the number of historical visits corresponding to each network reachable path among the multiple network reachable paths is obtained; the historical visit frequency corresponding to each network reachable path is calculated based on the historical visit number; and the weight corresponding to each network reachable path is calculated by a first formula based on the historical visit frequency, wherein the first formula is:
[0126] ω i =(Freq i -Freq min ) / (Freq max -Freq min +1) (1)
[0127] Among them, Freq i is the historical access frequency of network reachable path i per unit time, Freq min is the lowest historical access frequency of all network-reachable paths in unit time, Freq max It is the highest historical access frequency among all network reachable paths in unit time.
[0128] The larger the weight of a path, the more frequently it is visited, and the more important the system considers the path. By calculating the path weight, the system can select relatively important paths from complex connection lines and conduct key monitoring, thereby improving the efficiency of security monitoring.
[0129] based on Figure 6 In the connectivity graph, according to the steps of constructing a network reachable path mentioned above, the present invention can obtain { ,<H1,H3> ,<H2,H3> ,<H3,H1> ,<H3,H2>}5 reachable paths. Furthermore, the number of times each path is visited will be recorded as the basis for calculating the path weight. By analyzing the traffic data packets, it is assumed that the frequencies of the 5 paths visited are<H1,H2,1> ,<H1,H3,3> ,<H2,H3,2> ,<H3,H1,1> ,<H3,H2,2> , where the first two digits are the source host and destination host of the path, and the third digit is the number of times the path is visited. Then, according to the above number of path visits, the present invention can obtain the path weight set according to formula (1):<H1,H2,0> ,<H1,H3,0.67> ,<H2,H3,0.33> ,<H3,H1,0> ,<H3,H2,0.33>}, where the first two digits are the source host and destination host of the path, and the third digit is the weight of the path. From the weight calculation results, we can see that the path<H1,H3> Relatively more important.<h1>
[0130] Optionally, in response to the cross-platform and convenience requirements of network security monitoring, the embodiments of the present invention can also implement remote visualization based on the Web, achieve cross-platform access, and zero software installation, making collaboration and sharing among security personnel more convenient, so that they can focus more on studying the core issues in their respective fields. Based on the traditional "HTML+CSS+JavaScript" front-end development technology, the Vue framework is introduced for modular development to improve the scalability of the application. For the developed visualization front-end, a force-guided visualization layout algorithm and AJAX communication method are used to display the network topology and optimize the page response, thereby realizing cross-platform and convenient security monitoring of the network.
[0131] Web-based remote visualization includes the following specific steps:
[0132] (1) Visual system front-end development: Using Vue.js as the front-end framework, first build the project framework to get a complete project folder. In the project folder, the src directory is the main working directory, which contains the following folders:
[0133] Views folder: stores page files of each component;
[0134] Components folder: stores the common component files of the project and the sub-component files of each page;
[0135] assets folder: stores static resource files such as pictures and styles;
[0136] router folder: contains routing jump information between pages.
[0137] Furthermore, based on the idea of component-based development, HTML, CSS and JavaScript technologies are used to develop the network panorama view page. The specific components involved are as follows:
[0138] Navbar.vue: Navigation bar component, used to connect page jump paths;
[0139] TopoGraph.vue: A network topology component that uses the visualization library Vis.js to visualize the network topology based on the incoming network node information, key node information, node connection relationship, and node location information;
[0140] NetInfo.vue: A network summary information component that uses the visualization library Echarts to visualize the number of nodes, IP distribution, and reachable paths based on the incoming network node information and the connection relationship between nodes;
[0141] App.vue: Root component, used as the page entry file to build definitions and group page components.
[0142] (2) Visual layout algorithm: Based on the input network node information and the connection relationship between nodes, the force-guided layout algorithm Force Atlas 2 is used to determine the position of each node in the network. The specific steps are as follows:
[0143] Calculate the gravitational force between nodes:
[0144] F a (n1, n2) = d(n1, n2) (2)
[0145] Among them, d(n1, n2) represents the distance between nodes.
[0146] Calculate the repulsive force between nodes:
[0147]
[0148] Among them, k r represents the repulsion coefficient, and deg represents the node degree.
[0149] Calculate the gravity of a node:
[0150] F g (n) = k g (deg(n)+1) (4)
[0151] Among them, k g Represents the gravity coefficient.
[0152] Considering the distance between nodes and the size of nodes in the layout, adjust the attraction and repulsion between nodes to prevent node overlap:
[0153] D(n1,n2)=d(n1,n2)-size(n1)-size(n2) (5)
[0154] Among them, size(n1) and size(n2) represent the size of the node.
[0155] When D(n1, n2)>0,
[0156] F a (n1, n2) = D(n1, n2) (6)
[0157]
[0158] When D(n1, n2)<0,
[0159] F a (n1, n2) = 0 (8)
[0160] F r (n1, n2) = k r (deg(n1)+1)(deg(n2)+1) (9)
[0161] When D(n1, n2) = 0,
[0162] F a (n1, n2) = 0, F r (n1, n2) = 0 (10)
[0163] The network nodes are laid out according to the above-calculated attraction, repulsion and gravity between nodes to obtain the final node position.
[0164] (3) Front-end and back-end communication: AJAX and JSON technologies are used to implement data communication between the front-end and back-end of the network panoramic view. When a user visits the network foreground view page, the system sends an AJAX request in the GET mode to the back-end. After receiving the request, the back-end encapsulates the network node information, key node information, and the connection relationship between nodes into JSON data and responds to the front-end. After the front-end correctly receives the back-end response data, it calls the visualization layout algorithm to calculate the node position information and adds it to the JSON data, and finally sends it to each component in the page for visualization.
[0165] The network transmission path monitoring method provided by the embodiment of the present invention, in the stage of constructing a reachable path, constructs a reachable path based on the reachable relationship of the physical link, rather than based on the end-to-end reachable relationship, to avoid path omissions caused by some protocols not requiring port communication, and more comprehensively reflects the network status and path information. In the path weight calculation stage, the path weight is dynamically calculated based on real-time traffic information, relatively important paths are identified, and key detection is performed to implement a dynamic differentiation strategy, effectively improving monitoring efficiency and resource utilization; Web-based remote visualization technology is used to achieve clear display of network information, thereby achieving cross-platform, convenient and secure monitoring of the network.
[0166] Figure 7 FIG. 2 is a schematic diagram showing the structure of a network transmission path monitoring device according to an embodiment of the present invention. Figure 7 As shown, the device comprises:
[0167] The extraction and construction module 701 is used to extract the connectivity features between the distributed network nodes and construct multiple network reachable paths based on the connectivity features. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0168] The acquisition calculation module 702 is used to obtain the historical access information corresponding to the plurality of network reachable paths, and calculate the weight corresponding to each network reachable path based on the historical access information. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0169] The monitoring module 703 is used to perform differentiated monitoring on each network reachable path based on the weight corresponding to each network reachable path. For detailed description, please refer to the relevant description corresponding to the above method embodiment, which will not be repeated here.
[0170] The network transmission path monitoring device provided in the embodiment of the present invention is used to execute the network transmission path monitoring method provided in the above embodiment. Its implementation method and principle are the same. For details, please refer to the relevant description of the above method embodiment and will not be repeated here.
[0171] Figure 8 An electronic device according to an embodiment of the present invention is shown. Figure 8 As shown, the electronic device may include a processor 801 and a memory 802, wherein the processor 801 and the memory 802 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0172] The processor 801 may be a central processing unit (CPU). The processor 801 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0173] The memory 802 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method provided in the embodiment of the present invention. The processor 801 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 802, that is, implements the method in the above method embodiment.
[0174] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 801, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the processor 801 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0175] One or more modules are stored in the memory 802 , and when executed by the processor 801 , the method in the above method embodiment is executed.
[0176] The specific details of the above electronic device can be understood by referring to the corresponding related descriptions and effects in the above method embodiments, and will not be repeated here.
[0177] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0178] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A network transmission path monitoring method, characterized in that: include: Extracting connectivity features between distributed network nodes, and constructing multiple network reachable paths based on the connectivity features; Obtaining historical access information corresponding to the plurality of network reachable paths respectively, and calculating a weight corresponding to each network reachable path based on the historical access information; Based on the weight corresponding to each network reachable path, each network reachable path is monitored differently.
2. The method according to claim 1, characterized in that The extracting connectivity features between distributed network nodes and constructing multiple network reachable paths based on the connectivity features includes: Extract the topology of distributed networks; Generate physical connection relationships between hosts in the distributed network based on the topological structure; Performing reachability filtering based on the physical connection relationship between the hosts according to preset rules to obtain a reachability relationship set between the hosts; Based on the physical connection relationship between the hosts and the reachability relationship set between the hosts, a host connectivity graph is generated to construct multiple network reachable paths.
3. The method according to claim 2, characterized in that The extracting of the topological structure of the distributed network comprises: Based on the physical interface properties of multiple devices of the nodes of the distributed network, a set of physical network interfaces on the host in the nodes of the distributed network and a set of physical connection relationships between the interfaces are extracted.
4. The method according to claim 3, characterized in that The generating of the physical connection relationship between hosts in the distributed network based on the topological structure includes: Based on the physical network interface set and the physical connection relationship set, a device interface sequence accessed by any host when accessing another host is obtained through a preset algorithm to obtain multiple device interface sequences; Based on the multiple device interface sequences, a physical connection relationship between hosts in the distributed network is generated.
5. The method according to claim 4, characterized in that The generating a host connectivity graph based on the physical connection relationship between the hosts and the reachability relationship set between the hosts, and constructing multiple network reachable paths, includes: Based on the physical connection relationship between the hosts and the reachability relationship set between the hosts, the hosts are modeled as vertices and the reachability relationships are modeled as edges, and a host connectivity graph based on the host reachability relationships is generated; Based on the host connectivity graph, multiple network reachable paths are constructed using a preset algorithm.
6. The method according to claim 1, characterized in that The acquiring of the historical access information corresponding to the plurality of network reachable paths respectively, and calculating the weight corresponding to each network reachable path based on the historical access information, includes: Obtaining the historical number of visits corresponding to each network-reachable path among the multiple network-reachable paths; Calculate the historical access frequency corresponding to each network reachable path based on the historical access times; The weight corresponding to each network reachable path is calculated based on the historical access frequency by using a first formula, where the first formula is: i =(Freq i -Freq min ) / (Freq max -Freq min +1); Among them, Freq i is the historical access frequency of network reachable path i per unit time, Freq min is the lowest historical access frequency of all network-reachable paths in unit time, Freq max It is the highest historical access frequency among all network reachable paths in unit time.
7. The method according to claim 6, characterized in that The differentiated monitoring of each network reachable path based on the weight corresponding to each network reachable path includes: Pre-set weight-based monitoring rules; Differentiated monitoring is performed on each network reachable path based on the monitoring rule and the weight corresponding to each network reachable path.
8. A network transmission path monitoring device, characterized in that: include: An extraction and construction module, used to extract connectivity features between distributed network nodes and construct multiple network reachable paths based on the connectivity features; An acquisition calculation module is used to obtain historical access information corresponding to the plurality of network reachable paths respectively, and calculate a weight corresponding to each network reachable path based on the historical access information; The monitoring module is used to perform differentiated monitoring on each network reachable path based on the weight corresponding to each network reachable path.
9. The device according to claim 8, characterized in that The extraction and construction module is further used to extract the topological structure of the distributed network; generate the physical connection relationship between the hosts of the distributed network based on the topological structure; perform reachability filtering based on the physical connection relationship between the hosts according to preset rules to obtain a reachability relationship set between the hosts; Based on the physical connection relationship between the hosts and the reachability relationship set between the hosts, a host connectivity graph is generated to construct multiple network reachable paths.
10. The device according to claim 9, characterized in that The extraction construction module is also used to extract the set of physical network interfaces on the host in the nodes of the distributed network and the set of physical connection relationships between the interfaces based on the physical interface properties of multiple devices in the nodes of the distributed network.
11. The device according to claim 10, characterized in that The extraction and construction module is also used to obtain the device interface sequence accessed by any host when accessing another host through a preset algorithm based on the physical network interface set and the physical connection relationship set, and obtain multiple device interface sequences; based on the multiple device interface sequences, generate the physical connection relationship between the hosts of the distributed network.
12. The device according to claim 11, characterized in that The extraction and construction module is further used to model the hosts as vertices and the reachability relationships as edges based on the physical connection relationships between the hosts and the reachability relationship sets between the hosts, and generate a host connectivity graph based on the host reachability relationships; Based on the host connectivity graph, multiple network reachable paths are constructed using a preset algorithm.
13. The device according to claim 8, characterized in that The acquisition calculation module is further used to obtain the number of historical visits corresponding to each network reachable path in the multiple network reachable paths; calculate the historical visit frequency corresponding to each network reachable path based on the historical visit number; calculate the weight corresponding to each network reachable path based on the historical visit frequency by a first formula, and the first formula is: ω i =(Freq i -Freq min ) / (Freq max -Freq min +1); where Freq i is the historical access frequency of network reachable path i per unit time, Freq min is the lowest historical access frequency of all network-reachable paths in unit time, Freq max It is the highest historical access frequency among all network reachable paths in unit time.
14. The device according to claim 13, characterized in that The monitoring module is further used to pre-set weight-based monitoring rules; and perform differentiated monitoring on each network reachable path based on the monitoring rules and the weight corresponding to each network reachable path.
15. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a network transmission path monitoring program stored in the memory to implement the network transmission path monitoring method according to any one of claims 1 to 7.
16. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the network transmission path monitoring method according to any one of claims 1 to 7.
