Traffic matrix calculation method and device, storage medium and electronic equipment
By defining the aggregation domain in the network and utilizing distributed traffic acquisition tools, the problem of excessive traffic matrix computing load and storage requirements in large-scale networks is solved, and efficient traffic analysis and network management are achieved.
Patent Information
- Application Number
- CN202510747409.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-05
AI Technical Summary
In the real-time updated traffic matrix business scenario, as the network scale expands, the computing load and storage demand of the traffic matrix grow at a square level, resulting in a lower response speed of the business system.
By collecting node information of each node in the target network, defining multiple aggregation domains, and using distributed traffic acquisition tools, a mapping relationship between each node and aggregation domain in the target network is constructed, aggregation traffic matrix is calculated, and the boundary gateway protocol link state expansion and distributed traffic acquisition tools are used to achieve real-time and completeness of traffic data.
It simplifies the network structure, reduces storage and computing complexity, improves traffic analysis efficiency and accuracy, optimizes network resource configuration and scheduling, and supports network planning and troubleshooting.
Smart Images

Figure CN120602485A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network traffic detection, and more specifically, to a method, device, storage medium, and electronic device for calculating a traffic matrix. Background Art
[0002] Obtaining a traffic matrix requires a traffic collection program. Conventional technology deploys this program on all hosts within a routing domain, uniquely identifying each host by its IP address to facilitate data collection and aggregation. After each host runs the collection program, it records the data flow from the current host to other hosts (outbound traffic) and the data flow from other hosts to the current host (inbound traffic). This data is collected from each host to construct a complete traffic matrix.
[0003] For a network with N nodes, the traffic matrix is N x N in size. As the network scales, the matrix storage requirements increase quadratically, making it difficult for the storage system to manage efficiently. Large-scale matrix operations (such as traffic aggregation, path optimization, and load balancing) require high computing resources. This computational load significantly reduces system responsiveness, especially in scenarios requiring real-time updates.
[0004] Regarding the business scenarios of real-time updating of traffic matrices in related technologies, as the network scale expands, the computing load and storage requirements of the traffic matrix grow quadratically, resulting in a low response speed of the business system. No effective solution has been proposed so far. Summary of the Invention
[0005] The main purpose of this application is to provide a traffic matrix calculation method, device, storage medium and electronic device to solve the problem in the business scenario of real-time updating of the traffic matrix in the related technology, that as the network scale expands, the computing load and storage requirements of the traffic matrix increase quadratically, resulting in a low response speed of the business system.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for calculating a traffic matrix is provided, which is applied to a target network. The method includes: collecting node information of each node in the target network, and determining network information of multiple aggregation domains based on the network information of the target network and the node information of each node; expanding the target information based on the network information of the multiple aggregation domains, and constructing a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status; collecting traffic data of each node in the target network through a distributed traffic collection tool; and calculating the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node.
[0007] Furthermore, the aggregated traffic matrix of the target network is calculated based on the target mapping relationship and the traffic data of each node, including: determining the aggregation domain to which each node in the target network belongs based on the target mapping relationship; determining the number of the multiple aggregation domains based on the target mapping relationship, and constructing a target empty matrix based on the number of the multiple aggregation domains; calculating the traffic data of each node based on the aggregation domain to which each node belongs, and filling the target empty matrix based on the calculation result to generate the aggregated traffic matrix.
[0008] Furthermore, the traffic data of each node is calculated based on the aggregation domain to which each node belongs, and the target empty matrix is filled according to the calculation result to generate the aggregation traffic matrix, including: determining the nodes included in each aggregation domain according to the target mapping relationship; calculating the first traffic data included in each aggregation domain according to the traffic data of each node and the nodes included in each aggregation domain; calculating the first traffic data included in each aggregation domain and the second traffic data between the nodes in each aggregation domain to obtain the third traffic data between each aggregation domain; filling the target empty matrix according to the third traffic data between each aggregation domain to generate the aggregation traffic matrix.
[0009] Furthermore, the target information is expanded based on the network information of the multiple aggregation domains, including: determining the node information of each node in the multiple aggregation domains based on the network information of the multiple aggregation domains; updating the path attributes in the target information based on the node information of each node to obtain the expanded target information, wherein the path attributes include at least one of the following: the IPv4 addresses contained in each aggregation domain, the IPv6 addresses contained in each aggregation domain, and the address range of the reachability information of each aggregation domain.
[0010] Furthermore, the network information of multiple aggregation domains is determined based on the network information of the target network and the node information of each node, including: determining a network aggregation strategy based on the network information of the target network, wherein the network aggregation strategy includes at least one of the following: a first aggregation strategy, a second aggregation strategy, a third aggregation strategy, and a fourth aggregation strategy, wherein the first aggregation strategy is a network routing strategy that aggregates the routing information of multiple autonomous systems, the second aggregation strategy is a network routing strategy that aggregates the routing information of multiple subnets or routers within an autonomous system, the third aggregation strategy is a network routing strategy that aggregates the routing information of multiple private IP addresses, and the fourth aggregation strategy is a network routing strategy that aggregates user-defined routing information; the network information of the multiple aggregation domains is determined based on the network aggregation strategy and the node information of each node.
[0011] Furthermore, the network information of the multiple aggregation domains is determined based on the network aggregation strategy and the node information of each node, including: when the target network contains multiple autonomous systems, aggregating the multiple autonomous systems to obtain the multiple aggregation domains; when the target network belongs to the internal network of any autonomous system, aggregating the routers in the autonomous system to obtain the multiple aggregation domains; when the target network contains multiple intranet devices and the target network adopts a network address translation algorithm, aggregating the IP addresses of the multiple intranet devices to obtain the multiple aggregation domains, wherein the IP addresses include at least: public IP addresses and private IP addresses; when the target network contains a preset traffic management policy, determining the multiple aggregation domains according to the traffic management policy; determining the network information of the multiple aggregation domains according to the identification information of each aggregation domain in the multiple aggregation domains and the node information contained in each aggregation domain.
[0012] Furthermore, the traffic data of each node in the target network is collected by a distributed traffic collection tool, including: deploying a distributed traffic collection tool at each node in the target network; collecting the traffic data of each node in the target network by the distributed traffic collection tool, and storing the traffic data of each node in a preset storage space, so as to calculate the aggregated traffic matrix based on the traffic data of each node in the preset storage space.
[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a traffic matrix calculation device is provided, which deploys a target network and includes: a determination unit, which is used to collect node information of each node in the target network, and determine the network information of multiple aggregation domains based on the network information of the target network and the node information of each node; a construction unit, which is used to expand the target information based on the network information of the multiple aggregation domains, and construct a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status; a collection unit, which is used to collect traffic data of each node in the target network through a distributed traffic collection tool; and a calculation unit, which is used to calculate the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node.
[0014] Furthermore, the calculation unit includes: a first determination subunit, used to determine the aggregation domain to which each node in the target network belongs based on the target mapping relationship; a construction subunit, used to determine the number of the multiple aggregation domains based on the target mapping relationship, and construct a target empty matrix based on the number of the multiple aggregation domains; a calculation subunit, used to calculate the traffic data of each node based on the aggregation domain to which each node belongs, and fill the target empty matrix based on the calculation result to generate the aggregated traffic matrix.
[0015] Furthermore, the calculation subunit includes: a first determination module, used to determine the nodes included in each aggregation domain based on the target mapping relationship; a first calculation module, used to calculate the first traffic data included in each aggregation domain based on the traffic data of each node and the nodes included in each aggregation domain; a second calculation module, used to calculate the first traffic data included in each aggregation domain and the second traffic data between the nodes in each aggregation domain to obtain the third traffic data between each aggregation domain; a generation module, used to fill the target empty matrix based on the third traffic data between each aggregation domain to generate the aggregation traffic matrix.
[0016] Furthermore, the construction unit includes: a second determination subunit, used to determine the node information of each node in the multiple aggregation domains based on the network information of the multiple aggregation domains; an update subunit, used to update the path attributes in the target information based on the node information of each node to obtain the expanded target information, wherein the path attributes include at least one of the following: the IPv4 addresses contained in each aggregation domain, the IPv6 addresses contained in each aggregation domain, and the address range of the reachability information of each aggregation domain.
[0017] Furthermore, the determination unit includes: a third determination sub-unit, used to determine a network aggregation strategy based on the network information of the target network, wherein the network aggregation strategy includes at least one of the following: a first aggregation strategy, a second aggregation strategy, a third aggregation strategy, and a fourth aggregation strategy, wherein the first aggregation strategy is a network routing strategy that aggregates routing information of multiple autonomous systems, the second aggregation strategy is a network routing strategy that aggregates routing information of multiple subnets or routers within an autonomous system, the third aggregation strategy is a network routing strategy that aggregates routing information of multiple private IP addresses, and the fourth aggregation strategy is a network routing strategy for aggregating user-defined routing information; a fourth determination sub-unit, used to determine the network information of the multiple aggregation domains based on the network aggregation strategy and the node information of each node.
[0018] Furthermore, the fourth determination subunit includes: a first aggregation module, which is used to aggregate the multiple autonomous systems to obtain the multiple aggregation domains when the target network contains multiple autonomous systems; a second aggregation module, which is used to aggregate the routers in the autonomous system to obtain the multiple aggregation domains when the target network belongs to the internal network of any autonomous system; a third aggregation module, which is used to aggregate the IP addresses of the multiple intranet devices to obtain the multiple aggregation domains when the target network contains multiple intranet devices and the target network adopts a network address translation algorithm, wherein the IP addresses include at least: a public IP address and a private IP address; a fourth aggregation module, which is used to determine the multiple aggregation domains according to the preset traffic management policy when the target network contains the preset traffic management policy; a second determination module, which is used to determine the network information of the multiple aggregation domains based on the identification information of each aggregation domain in the multiple aggregation domains and the node information contained in each aggregation domain.
[0019] Furthermore, the collection unit includes: a deployment subunit, used to deploy a distributed traffic collection tool at each node in the target network; a collection subunit, used to collect traffic data of each node in the target network through the distributed traffic collection tool, and store the traffic data of each node in a preset storage space, so as to calculate the aggregated traffic matrix based on the traffic data of each node in the preset storage space.
[0020] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it implements the method for calculating the traffic matrix described in any one of the above-mentioned items. When the computer program is executed by the processor, it implements the steps of the method for calculating the traffic matrix described in each embodiment of the present application.
[0021] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes stored computer instructions, wherein when the computer instructions are executed by a processor, any one of the above-mentioned methods for calculating the traffic matrix is implemented.
[0022] In order to achieve the above-mentioned purpose, according to one aspect of the present application, an electronic device is provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any of the above-mentioned methods for calculating the traffic matrix.
[0023] Through the present application, the following steps are adopted: collecting node information of each node in the target network, determining network information of multiple aggregation domains based on the network information of the target network and the node information of each node; expanding the target information based on the network information of the multiple aggregation domains, and constructing a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status; collecting traffic data of each node in the target network through a distributed traffic collection tool; calculating the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node, which solves the problem in the related technology of real-time updating of the traffic matrix, that as the network scale expands, the computing load and storage requirements of the traffic matrix increase quadratically, resulting in a low response speed of the business system.
[0024] By collecting node information from every node in the target network and defining multiple aggregation domains based on the network's overall architecture and node characteristics, the complex network structure can be simplified into a more manageable aggregation domain model, achieving the technical effect of reducing the network management burden and technical processing complexity. At the same time, through innovative expansion of the Border Gateway Protocol Link State (BGP-LS) and the network-wide application of distributed traffic collection tools, the protocol can carry network information of the aggregation domain, achieving effective dissemination of network aggregation status, accurately capturing traffic data from each node, ensuring the real-time and integrity of traffic information, and enhancing the reliability of network performance monitoring. Finally, by combining the aggregation domain mapping relationship with detailed traffic data, the aggregation traffic matrix is calculated, which refines the originally large inter-node traffic matrix and focuses on the core information of inter-domain traffic interaction. This greatly improves the efficiency and accuracy of traffic analysis, reduces storage and computing costs, optimizes the configuration and scheduling of network resources, and further provides strong support for network planning, troubleshooting, and performance optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0026] Figure 1 is a flow chart of a method for calculating a flow matrix according to the first embodiment of the present application;
[0027] Figure 2 This is a flow chart of an optional method for calculating a traffic matrix based on network aggregation according to the first embodiment of the present application;
[0028] Figure 3This is a schematic diagram of optional network node aggregation provided according to the first embodiment of the present application;
[0029] Figure 4 is a schematic diagram of a flow matrix calculation device provided according to the second embodiment of the present application;
[0030] Figure 5 This is a schematic diagram of an electronic device for calculating the traffic matrix provided in Example 5 of the present application. DETAILED DESCRIPTION
[0031] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, collected data, used data, generated data, processed data, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, collected information, used information, generated information, processed information, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0033] It should be noted that this application provides users with corresponding operation entrances for them to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0034] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Example 1
[0037] The present invention will be described below in conjunction with preferred implementation steps. Figure 1 This is a flow chart of the method for calculating the flow matrix according to the first embodiment of the present application. Figure 1 As shown, the method includes the following steps:
[0038] Step S101 : collecting node information of each node in a target network, and determining network information of a plurality of aggregation domains based on the network information of the target network and the node information of each node.
[0039] In this first embodiment, to abstract existing node-level network information into domain-level information for efficient network management and optimized traffic calculation, it is necessary to collect node information for each node in the target network. Multiple aggregation domains are then defined and divided based on the overall network structure and this node information. Each aggregation domain contains a selected set of nodes and their common or representative information, such as the IP address range or domain identifier of the aggregated aggregation domain.
[0040] Step S102 : Expand target information based on network information of multiple aggregation domains, and construct target mapping relationships between each node in the target network and multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status.
[0041] In this first embodiment, the BGP Link State Protocol (BGP-LS) is extended using information about multiple identified aggregation domains. This involves adding attributes to BGP-LS that carry aggregation domain information. These extended attributes determine the mapping between each node in the network and the aggregation domain, specifically identifying the aggregation domain to which the node belongs, facilitating subsequent traffic matrix aggregation.
[0042] Step S103: Collect the traffic data of each node in the target network through a distributed traffic collection tool.
[0043] In this first embodiment, distributed traffic collection tools are used to collect inbound and outbound traffic data at each node in the target network. This data may include, but is not limited to, upload and download rates, data packets, and other information. These tools are typically deployed on network devices (such as routers and switches) and can monitor traffic in real time. They then send the data to a central server or data analysis platform for processing via specific protocols (such as NetFlow and sFlow). Distributed collection ensures full network coverage, improves the efficiency and accuracy of data collection, and supports traffic monitoring and analysis needs in large-scale network environments.
[0044] Step S104: Calculate the aggregated traffic matrix of the target network according to the target mapping relationship and the traffic data of each node.
[0045] In this first embodiment, to simplify the traffic matrix, it is necessary to use the previously determined mapping relationship between each node and the aggregation domain, combined with the traffic data collected from each node, to calculate the traffic matrix corresponding to the multiple aggregation domains of the target network after aggregation. Specifically, the traffic between nodes within the same aggregation domain in the original traffic matrix is merged, and only the traffic values between different aggregation domains are retained to form a new, lower-dimensional matrix, namely the aforementioned aggregated traffic matrix. This step can significantly reduce storage requirements and computational complexity, making traffic analysis of large-scale networks more efficient.
[0046] To summarize, the traffic matrix calculation method provided in Example 1 of the present application collects node information of each node in the target network, determines the network information of multiple aggregation domains based on the network information of the target network and the node information of each node; expands the target information based on the network information of multiple aggregation domains, and constructs a target mapping relationship between each node in the target network and multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status; collects traffic data of each node in the target network through a distributed traffic collection tool; calculates the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node, which solves the problem in the business scenario of real-time updating of the traffic matrix in the related technology, that as the network scale expands, the computing load and storage requirements of the traffic matrix increase quadratically, resulting in a low response speed of the business system.
[0047] By collecting node information from every node in the target network and defining multiple aggregation domains based on the network's overall architecture and node characteristics, the complex network structure can be simplified into a more manageable aggregation domain model, achieving the technical effect of reducing the network management burden and technical processing complexity. At the same time, through innovative expansion of the Border Gateway Protocol Link State (BGP-LS) and the network-wide application of distributed traffic collection tools, the protocol can carry network information of the aggregation domain, achieving effective dissemination of network aggregation status, accurately capturing traffic data from each node, ensuring the real-time and integrity of traffic information, and enhancing the reliability of network performance monitoring. Finally, by combining the aggregation domain mapping relationship with detailed traffic data, the aggregation traffic matrix is calculated, which refines the originally large inter-node traffic matrix and focuses on the core information of inter-domain traffic interaction. This greatly improves the efficiency and accuracy of traffic analysis, reduces storage and computing costs, optimizes the configuration and scheduling of network resources, and further provides strong support for network planning, troubleshooting, and performance optimization.
[0048] Optionally, in the traffic matrix calculation method provided in Example 1 of the present application, the aggregated traffic matrix of the target network is calculated based on the target mapping relationship and the traffic data of each node, including: determining the aggregation domain to which each node in the target network belongs based on the target mapping relationship; determining the number of multiple aggregation domains based on the target mapping relationship, and constructing a target empty matrix based on the number of multiple aggregation domains; calculating the traffic data of each node based on the aggregation domain to which each node belongs, and filling the target empty matrix based on the calculation results to generate an aggregated traffic matrix.
[0049] In the first embodiment, in order to reduce the storage space of the traffic matrix, the aggregation domain to which each node in the target network should belong is first determined based on the target mapping relationship, that is, the network is divided into multiple relatively independent traffic units to facilitate subsequent traffic aggregation processing.
[0050] Next, based on the target mapping, the total number of independent aggregation domains in the network is counted. Based on this number, a target empty matrix of the corresponding size is constructed, which serves as the structural foundation for subsequent filling with aggregated traffic data. The rows and columns of the matrix correspond to the aggregation domains in the network. The default empty matrix is blank, waiting to be filled with actual traffic data.
[0051] Finally, we use each node's traffic data and its associated aggregation domain information to perform calculations, converting the node-level traffic data into aggregation domain-level traffic data. This data is then populated into the pre-built target empty matrix to generate the aggregate traffic matrix. Specifically, the traffic data between different aggregation domains is added to the corresponding positions in the matrix, with each matrix element representing the total traffic from one aggregation domain to another.
[0052] Through the above steps, we no longer consider the details of each node, but focus on the macro traffic conditions between aggregation domains. This not only significantly reduces the storage space requirements, but also reduces the computational complexity. It can efficiently process the traffic data between nodes and achieve accurate grasp of the overall network traffic, thereby significantly improving the efficiency and response speed of network management.
[0053] Optionally, in the traffic matrix calculation method provided in Example 1 of the present application, the traffic data of each node is calculated based on the aggregation domain to which each node belongs, and the target empty matrix is filled according to the calculation result to generate an aggregated traffic matrix, including: determining the nodes included in each aggregation domain based on the target mapping relationship; calculating the first traffic data included in each aggregation domain based on the traffic data of each node and the nodes included in each aggregation domain; calculating the first traffic data included in each aggregation domain and the second traffic data between the nodes in each aggregation domain to obtain the third traffic data between each aggregation domain; filling the target empty matrix according to the third traffic data between each aggregation domain to generate an aggregated traffic matrix.
[0054] In the first embodiment of the present invention, by analyzing the association between the node and the aggregation domain, all nodes belonging to the same aggregation domain are identified, and the sum of the traffic within the aggregation domain is calculated, that is, the inbound and outbound traffic between all nodes in the same aggregation domain is counted, and the total traffic value within each aggregation domain is obtained by cumulative summation, that is, the above-mentioned first traffic data.
[0055] Next, the first traffic data for each aggregation domain and the second traffic data for the nodes within it are processed. The second traffic data refers to the traffic between nodes within the aggregation domain. By subtracting the second traffic data for each aggregation domain from the first traffic data for each aggregation domain, the third traffic data between each aggregation domain is obtained, which represents the traffic between different aggregation domains.
[0056] Finally, based on the third-party traffic data between each aggregation domain, the pre-built target empty matrix is filled to generate an aggregate traffic matrix. The dimension of this matrix matches the total number of aggregation domains, and each entry represents the total traffic from one aggregation domain to another, significantly reducing the size of the traffic matrix and lowering storage and computation costs.
[0057] The above steps not only improve the efficiency of traffic data processing and reduce the storage space occupancy of the traditional traffic matrix, but also make traffic analysis and management of large-scale networks more feasible and accurate, further achieving the effect of providing strong support for network planning, traffic engineering and resource optimization.
[0058] Optionally, in the traffic matrix calculation method provided in Example 1 of the present application, the target information is expanded based on the network information of multiple aggregation domains, including: determining the node information of each node in the multiple aggregation domains based on the network information of the multiple aggregation domains; updating the path attributes in the target information based on the node information of each node to obtain the expanded target information, wherein the path attributes include at least one of the following: the IPv4 addresses contained in each aggregation domain, the IPv6 addresses contained in each aggregation domain, and the address range of the reachability information of each aggregation domain.
[0059] In this embodiment 1, in order to accurately aggregate network traffic, it is necessary to determine the detailed information of each node in each aggregation domain based on the network information of multiple aggregation domains, that is, the above-mentioned node information, including but not limited to: the node's IP address, geographic location, functional role, etc.
[0060] Then, based on the node information of each node, the Path Attribute (i.e., the aforementioned path attribute) in the existing BGP-LS protocol (i.e., the aforementioned target information) is updated to reflect the characteristics of the post-aggregation network. The update of the path attribute is primarily reflected in the extension of the BGP-LS protocol. The Path Attribute introduces an IPv4 address list (i.e., IPv4 Address Aggregation List TLV (Type-Length-Value, abbreviated as TLV)), an IPv6 address list (i.e., IPv6 Address Aggregation List TLV), and a reachability information address range (Network Layer Reachability Information Aggregation TLV) into the Path Attribute. The IPv4 address list carries a set of IPv4 addresses belonging to the same aggregation domain, including the aggregation domain identifier (Aggregation ID) and the IPv4 addresses of the nodes within it. Similar to the IPv4 address list, the IPv6 address list carries a set of IPv6 addresses belonging to the same aggregation domain, including the aggregation domain identifier (Aggregation ID) and the IPv6 addresses of the nodes within it. The address range of reachability information describes the range of network-layer addresses reachable by an aggregation domain. This is typically used when multiple nodes reside in the same subnet or region. This allows you to aggregate the reachability information for these nodes into a single path advertisement, reducing the amount of routing information in the network and, consequently, the size of the routing table and the communication load on the routing protocol.
[0061] Through the above steps, the IPv4 and IPv6 addresses contained in each aggregation domain, as well as the address range of the aggregation domain's reachability information, can be flexibly described. This greatly enhances the network controller's network view, enabling it to handle routing and traffic issues in large-scale networks more meticulously and efficiently. At the same time, it provides a data foundation for the subsequent efficient generation of the aggregation traffic matrix, ensuring that even after network aggregation, a clear understanding of the traffic distribution within each aggregation domain can be maintained, thereby achieving effective management and optimization of network traffic.
[0062] Optionally, in the traffic matrix calculation method provided in Example 1 of the present application, the network information of multiple aggregation domains is determined based on the network information of the target network and the node information of each node, including: determining a network aggregation strategy based on the network information of the target network, wherein the network aggregation strategy includes at least one of the following: a first aggregation strategy, a second aggregation strategy, a third aggregation strategy, and a fourth aggregation strategy, wherein the first aggregation strategy is a network routing strategy that aggregates the routing information of multiple autonomous systems, the second aggregation strategy is a network routing strategy that aggregates the routing information of multiple subnets or routers within the autonomous system, the third aggregation strategy is a network routing strategy that aggregates the routing information of multiple private IP addresses, and the fourth aggregation strategy is a network routing strategy that aggregates user-defined routing information; determining the network information of multiple aggregation domains based on the network aggregation strategy and the node information of each node.
[0063] In the first embodiment of the present invention, the first aggregation strategy focuses on aggregating the routing information of multiple autonomous systems (abbreviated as AS), which is suitable for large-scale network environments across ASs. It aims to simplify routing announcements between ASs and reduce the burden on the control plane. The second aggregation strategy aggregates the routing information of multiple subnets or routers within a single AS. It is suitable for large enterprises or data centers. The purpose is to reduce the size of the routing table within the AS and improve routing calculation efficiency. The third aggregation strategy is aimed at networks that use private IP addresses, such as home or office LANs. It aggregates the routing information of private IPs through NAT (Network Address Translation), aiming to optimize the routing processing of public network interfaces and reduce the announcement of external routes. The fourth aggregation strategy allows users to customize the aggregation method according to specific scenarios, such as aggregation based on specific geographical locations, business types or traffic density, providing flexibility to meet diverse network needs.
[0064] Through the above steps, not only can the network aggregation strategy be formulated, but also the aggregation domain can be clearly divided based on the node information, its network characteristics can be determined, and the node-level traffic statistics can be converted into domain-level traffic statistics, thereby reducing the storage scale of the traffic matrix and providing a data foundation for subsequent traffic data collection and the construction of the aggregation traffic matrix.
[0065] Optionally, in the traffic matrix calculation method provided in Example 1 of the present application, the network information of multiple aggregation domains is determined based on the network aggregation strategy and the node information of each node, including: when the target network contains multiple autonomous systems, the multiple autonomous systems are aggregating to obtain multiple aggregation domains; when the target network belongs to the internal network of any autonomous system, the routers in the autonomous system are aggregating to obtain multiple aggregation domains; when the target network contains multiple intranet devices and the target network adopts a network address translation algorithm, the IP addresses of the multiple intranet devices are aggregated to obtain multiple aggregation domains, wherein the IP addresses include at least: public IP addresses and private IP addresses; when the target network contains a preset traffic management policy, multiple aggregation domains are determined based on the traffic management policy; the network information of the multiple aggregation domains is determined based on the identification information of each aggregation domain in the multiple aggregation domains and the node information contained in each aggregation domain.
[0066] In the first embodiment, after the aggregation strategy is determined, the network information of the aggregation domain can be refined based on the node information of each node, including its IP address, geographical location, functional attributes, etc., to adapt to various network environments and requirements.
[0067] For example, for the first aggregation strategy, each AS can be regarded as an independent aggregation domain, whose network information includes a specific AS identifier (eg, AS number) and the public IP address range covered by the AS, thereby facilitating clear distinction and management of data traffic between different ASs.
[0068] For example, the second aggregation strategy can be used to aggregate nodes more finely within a large AS internal network, based on subnet division or physical location. In other words, the network information within each aggregation domain primarily focuses on the subnet mask, subnet address, and direct connectivity between nodes. By partitioning the AS internal network, the complexity of matrix operations can be reduced.
[0069] For example, for the third aggregation strategy, the configuration information of all NAT devices can be aggregated in a network with a large number of intranet devices, including the mapping relationship between NAT conversion rules and private IP address pools. This can not only reduce the direct tracking of intranet devices in the traffic matrix, but also optimize the use of public IPs and improve network security and performance.
[0070] For example, for the fourth aggregation strategy, network information is constructed entirely according to user-defined rules, which may involve specific business logic, traffic priority settings, or access control policies. Users can define personalized aggregation domains based on actual application scenarios (such as smart cities and the Internet of Things), for example, by setting traffic filtering conditions and business-related node sets, to achieve highly customized traffic management and network optimization.
[0071] Through the above strategy, not only can the aggregation domain be constructed and adjusted according to the current status and needs of the network, but also by collecting and aggregating key network parameters, targeted and efficient network information can be generated, providing a data foundation for the calculation and analysis of the traffic matrix, ensuring that the stability and efficiency of the network can be effectively maintained even when the network scale continues to expand.
[0072] Optionally, in the traffic matrix calculation method provided in Example 1 of the present application, the traffic data of each node in the target network is collected through a distributed traffic collection tool, including: deploying a distributed traffic collection tool at each node in the target network; collecting the traffic data of each node in the target network through the distributed traffic collection tool, and storing the traffic data of each node in a preset storage space, so as to calculate the aggregated traffic matrix based on the traffic data of each node in the preset storage space.
[0073] In this first embodiment, to achieve efficient calculation of the traffic matrix based on network aggregation, a distributed traffic collection strategy can be adopted to ensure comprehensive capture of real-time traffic information for every node in the target network. A distributed traffic collection tool is deployed on each node in the target network to automatically and continuously monitor the node's inbound and outbound traffic, including but not limited to key metrics such as the number of transmitted packets, traffic volume, source and destination IP addresses, and protocol type.
[0074] Then, through these collection tools deployed on each node, traffic data between nodes is collected in real time. For example, the collected traffic data may include: direct traffic between nodes (such as traffic from node 1 to node 2) and communication traffic between nodes and outside the aggregation domain.
[0075] Finally, the collected traffic data is directly stored in a pre-set storage space. For example, the storage space can be a cloud database, a local hard drive, NAS storage (Network Attached Storage), or any other storage solution with high reliability and high access speed to ensure data security and availability.
[0076] Through the above process, not only can the traffic changes of each node in the network be monitored in real time, but the traffic data can also be efficiently aggregated according to the network aggregation strategy to generate an aggregated traffic matrix that is extremely valuable for network operation and maintenance and optimization. This reduces the storage space occupied by the traffic matrix and improves the response speed of data analysis.
[0077] Optionally, in this embodiment 1, Figure 2This is a flow chart of an optional method for calculating a traffic matrix based on network aggregation provided in Example 1 of the present application. First, according to the specific environment and business needs of the network, the most suitable form of network aggregation is selected, such as AS alliance aggregation, large-scale AS internal aggregation, NAT aggregation or user-defined aggregation, to determine the basis of the aggregation strategy. The association relationship between aggregation domains is established, and information such as IPv4 Address Aggregation List TLV, IPv6Address AggregationList TLV and NLRI Aggregation TLV are introduced into the BGP-LS (Border Gateway Protocol LinkState) protocol, so as to announce the aggregated network status between network devices. Finally, by deploying distributed traffic collection tools across the entire network, the traffic data of each node is captured in real time, and the data is stored in a preset central database. Based on the mapping relationship between nodes and domains, combined with the collected traffic data, the aggregated traffic matrix under the aggregated network is calculated and generated. The matrix only retains the traffic information across aggregation domains, significantly reduces the amount of data, optimizes storage requirements and computational complexity, and thus improves the efficiency of network monitoring and management.
[0078] Optionally, in the first embodiment, the collected traffic information between nodes may be as shown in Table 1. Figure 3 1 is a schematic diagram of an optional network node aggregation provided in accordance with the first embodiment of the present application. The aggregation domain after the traffic information between the nodes in Table 1 is aggregated can be as follows Figure 3 shown. Figure 3 The seven network nodes are divided into three aggregation domains: domain A contains nodes 1, 2, and 3, domain B contains nodes 4 and 5, and domain C consists of nodes 6 and 7. Figure 3 The traffic exchange between nodes within and between aggregation domains is clearly defined. Nodes 1, 2, and 3 in domain A, nodes 4 and 5 in domain B, and nodes 6 and 7 in domain C all have bidirectional traffic communication. At the same time, data is also exchanged between domains A and B, domains A and C, and domains B and C. These cross-domain flows are the main objects of the aggregation traffic matrix calculation. Secondly, Figure 3 The role of BGP-LS in collecting aggregated domain information is emphasized. By extending BGP-LS, the aggregated network state can be effectively disseminated between domains, including important information such as the aggregated domain identifier (such as the ID) and the IP address list of domain members.
[0079] Table 1
[0080] Src\dst 1 2 3 4 5 6 7 1 0 10 5 0 0 0 0 2 10 0 20 0 0 10 0 3 5 20 0 15 0 0 20 4 10 0 15 0 10 5 0 5 0 0 0 10 0 25 5 6 0 10 0 5 15 0 10 7 0 10 20 0 5 10 0
[0081] according to Figure 3The constructed target mapping relationship between nodes and domains can be shown in Table 2. The aggregated traffic matrix generated based on the traffic information between nodes shown in Table 1 and the target mapping relationship between nodes and domains shown in Table 2 can be shown in Table 3. The traffic from domain A to domain B, which is aggregated from nodes (1, 4), (2, 4), (3, 4), (1, 5), (2, 5), and (3, 4), is 15; the traffic from domain A to domain C, which is aggregated from nodes (1, 6), (1, 7), (2, 6), (2, 7), (3, 6), and (3, 7), is 30; and the traffic from domain A to domain B, which is aggregated from nodes (4, 1), (4, 2), (4, 3), (5, 1), (5, 2), and (5, 3), is 25. Similarly, the traffic from domain B to domain C is aggregated to 35, the traffic from domain C to domain A is aggregated to 40, and the traffic from domain C to domain B is aggregated to 25.
[0082] Table 2
[0083]
[0084]
[0085] Table 3
[0086] domain A B C A 0 15 30 B 25 0 35 C 40 25 0
[0087] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0088] Example 2
[0089] The second embodiment of the present application further provides a flow matrix calculation device. It should be noted that the flow matrix calculation device of the second embodiment of the present application can be used to execute the flow matrix calculation method provided in the first embodiment of the present application. The flow matrix calculation device provided in the second embodiment of the present application is introduced below.
[0090] Figure 4 Schematic diagram of a flow matrix calculation device according to the second embodiment of the present application. Figure 4 As shown, the device includes: a determining unit 401 , a constructing unit 402 , a collecting unit 403 and a calculating unit 404 .
[0091] Specifically, the determining unit 401 is configured to collect node information of each node in the target network, and determine network information of multiple aggregation domains according to the network information of the target network and the node information of each node.
[0092] The construction unit 402 is configured to expand the target information based on the network information of the multiple aggregation domains, and to construct a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status.
[0093] The collection unit 403 is configured to collect the traffic data of each node in the target network through a distributed traffic collection tool.
[0094] The calculation unit 404 is configured to calculate an aggregated traffic matrix of the target network according to the target mapping relationship and the traffic data of each node.
[0095] The traffic matrix calculation device provided in the second embodiment of the present application collects the node information of each node in the target network through the determination unit 401, and determines the network information of multiple aggregation domains based on the network information of the target network and the node information of each node; the construction unit 402 expands the target information based on the network information of the multiple aggregation domains, and constructs the target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status; the collection unit 403 collects the traffic data of each node in the target network through a distributed traffic collection tool; the calculation unit 404 calculates the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node, which solves the problem in the related technology of real-time updating of the traffic matrix. In the business scenario, as the network scale expands, the computing load and storage requirements of the traffic matrix increase quadratically, resulting in a low response speed of the business system.
[0096] By collecting node information from every node in the target network and defining multiple aggregation domains based on the network's overall architecture and node characteristics, the complex network structure can be simplified into a more manageable aggregation domain model, achieving the technical effect of reducing the network management burden and technical processing complexity. At the same time, through innovative expansion of the Border Gateway Protocol Link State (BGP-LS) and the network-wide application of distributed traffic collection tools, the protocol can carry network information of the aggregation domain, achieving effective dissemination of network aggregation status, accurately capturing traffic data from each node, ensuring the real-time and integrity of traffic information, and enhancing the reliability of network performance monitoring. Finally, by combining the aggregation domain mapping relationship with detailed traffic data, the aggregation traffic matrix is calculated, which refines the originally large inter-node traffic matrix and focuses on the core information of inter-domain traffic interaction. This greatly improves the efficiency and accuracy of traffic analysis, reduces storage and computing costs, optimizes the configuration and scheduling of network resources, and further provides strong support for network planning, troubleshooting, and performance optimization.
[0097] Optionally, in the traffic matrix calculation device provided in Example 2 of the present application, the above-mentioned calculation unit 404 includes: a first determination subunit, used to determine the aggregation domain to which each node in the target network belongs based on the target mapping relationship; a construction subunit, used to determine the number of multiple aggregation domains based on the target mapping relationship, and construct a target empty matrix based on the number of multiple aggregation domains; a calculation subunit, used to calculate the traffic data of each node based on the aggregation domain to which each node belongs, and fill the target empty matrix based on the calculation result to generate an aggregated traffic matrix.
[0098] Optionally, in the traffic matrix calculation device provided in Example 2 of the present application, the above-mentioned calculation sub-unit includes: a first determination module, used to determine the nodes included in each aggregation domain based on the target mapping relationship; a first calculation module, used to calculate the first traffic data included in each aggregation domain based on the traffic data of each node and the nodes included in each aggregation domain; a second calculation module, used to calculate the first traffic data included in each aggregation domain and the second traffic data between the nodes in each aggregation domain to obtain the third traffic data between each aggregation domain; a generation module, used to fill the target empty matrix based on the third traffic data between each aggregation domain to generate an aggregation traffic matrix.
[0099] Optionally, in the traffic matrix calculation device provided in Example 2 of the present application, the above-mentioned construction unit 402 includes: a second determination subunit, used to determine the node information of each node in multiple aggregation domains based on the network information of multiple aggregation domains; an update subunit, used to update the path attributes in the target information based on the node information of each node to obtain the expanded target information, wherein the path attributes include at least one of the following: the IPv4 addresses contained in each aggregation domain, the IPv6 addresses contained in each aggregation domain, and the address range of the reachability information of each aggregation domain.
[0100] Optionally, in the traffic matrix calculation device provided in Example 2 of the present application, the above-mentioned determination unit 401 includes: a third determination sub-unit, used to determine the network aggregation strategy based on the network information of the target network, wherein the network aggregation strategy includes at least one of the following: a first aggregation strategy, a second aggregation strategy, a third aggregation strategy, and a fourth aggregation strategy, wherein the first aggregation strategy is a network routing strategy that aggregates the routing information of multiple autonomous systems, the second aggregation strategy is a network routing strategy that aggregates the routing information of multiple subnets or routers within the autonomous system, the third aggregation strategy is a network routing strategy that aggregates the routing information of multiple private IP addresses, and the fourth aggregation strategy is a network routing strategy that aggregates the routing information of user-defined routing information; the fourth determination sub-unit is used to determine the network information of multiple aggregation domains based on the network aggregation strategy and the node information of each node.
[0101] Optionally, in the traffic matrix calculation device provided in Example 2 of the present application, the above-mentioned fourth determination sub-unit includes: a first aggregation module, which is used to aggregate multiple autonomous systems to obtain multiple aggregation domains when the target network contains multiple autonomous systems; a second aggregation module, which is used to aggregate routers in the autonomous system to obtain multiple aggregation domains when the target network belongs to the internal network of any autonomous system; a third aggregation module, which is used to aggregate the IP addresses of multiple intranet devices to obtain multiple aggregation domains when the target network contains multiple intranet devices and the target network adopts a network address translation algorithm, wherein the IP address includes at least: a public IP address and a private IP address; a fourth aggregation module, which is used to determine multiple aggregation domains according to the traffic management policy when the target network contains a preset traffic management policy; a second determination module, which is used to determine the network information of multiple aggregation domains based on the identification information of each aggregation domain in the multiple aggregation domains and the node information contained in each aggregation domain.
[0102] Optionally, in the traffic matrix calculation device provided in Example 2 of the present application, the above-mentioned collection unit 403 includes: a deployment subunit, used to deploy a distributed traffic collection tool at each node in the target network; a collection subunit, used to collect traffic data of each node in the target network through the distributed traffic collection tool, and store the traffic data of each node in a preset storage space, so as to calculate the aggregated traffic matrix based on the traffic data of each node in the preset storage space.
[0103] The flow matrix calculation device includes a processor and a memory. The above-mentioned determination unit 401, construction unit 402, collection unit 403 and calculation unit 404 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0104] The processor contains a kernel, which retrieves the corresponding program unit from the memory. You can set one or more kernels, and adjust the kernel parameters to improve the business system response speed.
[0105] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0106] A third embodiment of the present invention provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, a method for calculating a traffic matrix is implemented.
[0107] A fourth embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes a method for calculating a traffic matrix when the program is running.
[0108] Figure 5 Schematic diagram of electronic equipment for calculating the flow matrix according to the fifth embodiment of the present application. Figure 5 As shown, embodiment five of the present invention provides an electronic device, the device includes a processor, a memory, and a program stored in the memory and runnable on the processor, and when the processor executes the program, the following steps are implemented: collecting node information of each node in the target network, and determining network information of multiple aggregation domains based on the network information of the target network and the node information of each node; expanding the target information based on the network information of the multiple aggregation domains, and constructing a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status; collecting traffic data of each node in the target network through a distributed traffic collection tool; and calculating the aggregation traffic matrix of the target network based on the target mapping relationship and the traffic data of each node.
[0109] When the processor executes the program, the following steps are also implemented: calculating the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node, including: determining the aggregation domain to which each node in the target network belongs based on the target mapping relationship; determining the number of multiple aggregation domains based on the target mapping relationship, and constructing a target empty matrix based on the number of multiple aggregation domains; calculating the traffic data of each node based on the aggregation domain to which each node belongs, and filling the target empty matrix based on the calculation results to generate an aggregated traffic matrix.
[0110] When the processor executes the program, the following steps are also implemented: the flow data of each node is calculated based on the aggregation domain to which each node belongs, and a target empty matrix is filled according to the calculation result to generate an aggregate flow matrix, including: determining the nodes contained in each aggregation domain according to the target mapping relationship; calculating the first flow data contained in each aggregation domain according to the flow data of each node and the nodes contained in each aggregation domain; calculating the first flow data contained in each aggregation domain and the second flow data between the nodes in each aggregation domain to obtain the third flow data between each aggregation domain; filling the target empty matrix according to the third flow data between each aggregation domain to generate an aggregate flow matrix.
[0111] When the processor executes the program, the following steps are also implemented: the target information is expanded based on the network information of the multiple aggregation domains, including: determining the node information of each node in the multiple aggregation domains based on the network information of the multiple aggregation domains; updating the path attributes in the target information based on the node information of each node to obtain the expanded target information, wherein the path attributes include at least one of the following: the IPv4 addresses contained in each aggregation domain, the IPv6 addresses contained in each aggregation domain, and the address range of the reachability information of each aggregation domain.
[0112] When the processor executes the program, the following steps are also implemented: determining the network information of multiple aggregation domains based on the network information of the target network and the node information of each node, including: determining a network aggregation strategy based on the network information of the target network, wherein the network aggregation strategy includes at least one of the following: a first aggregation strategy, a second aggregation strategy, a third aggregation strategy, and a fourth aggregation strategy, wherein the first aggregation strategy is a network routing strategy that aggregates the routing information of multiple autonomous systems, the second aggregation strategy is a network routing strategy that aggregates the routing information of multiple subnets or routers within the autonomous system, the third aggregation strategy is a network routing strategy that aggregates the routing information of multiple private IP addresses, and the fourth aggregation strategy is a network routing strategy that aggregates the routing information of user-defined routing information; determining the network information of multiple aggregation domains based on the network aggregation strategy and the node information of each node.
[0113] When the processor executes the program, the following steps are also implemented: determining the network information of multiple aggregation domains based on the network aggregation strategy and the node information of each node, including: when the target network contains multiple autonomous systems, aggregating the multiple autonomous systems to obtain multiple aggregation domains; when the target network belongs to the internal network of any autonomous system, aggregating the routers in the autonomous system to obtain multiple aggregation domains; when the target network contains multiple intranet devices and the target network adopts a network address translation algorithm, aggregating the IP addresses of the multiple intranet devices to obtain multiple aggregation domains, wherein the IP addresses include at least: public IP addresses and private IP addresses; when the target network contains a preset traffic management strategy, determining multiple aggregation domains based on the traffic management strategy; determining the network information of the multiple aggregation domains based on the identification information of each aggregation domain in the multiple aggregation domains and the node information contained in each aggregation domain.
[0114] When the processor executes the program, it also implements the following steps: collecting traffic data of each node in the target network through a distributed traffic collection tool, including: deploying a distributed traffic collection tool at each node in the target network; collecting traffic data of each node in the target network through the distributed traffic collection tool, and storing the traffic data of each node in a preset storage space, so as to calculate an aggregated traffic matrix based on the traffic data of each node in the preset storage space.
[0115] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0116] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: collecting node information of each node in the target network, determining network information of multiple aggregation domains based on the network information of the target network and the node information of each node; expanding the target information based on the network information of the multiple aggregation domains, and constructing a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to the border gateway protocol link status; collecting traffic data of each node in the target network through a distributed traffic collection tool; and calculating the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node.
[0117] When executed on a data processing device, it is also suitable for executing a program that initializes the following method steps: calculating the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node, including: determining the aggregation domain to which each node in the target network belongs based on the target mapping relationship; determining the number of multiple aggregation domains based on the target mapping relationship, and constructing a target empty matrix based on the number of multiple aggregation domains; calculating the traffic data of each node based on the aggregation domain to which each node belongs, and filling the target empty matrix based on the calculation results to generate an aggregated traffic matrix.
[0118] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: calculating the traffic data of each node based on the aggregation domain to which each node belongs, and filling the target empty matrix according to the calculation result to generate an aggregated traffic matrix, including: determining the nodes contained in each aggregation domain according to the target mapping relationship; calculating the first traffic data contained in each aggregation domain according to the traffic data of each node and the nodes contained in each aggregation domain; calculating the first traffic data contained in each aggregation domain and the second traffic data between the nodes in each aggregation domain to obtain the third traffic data between each aggregation domain; filling the target empty matrix according to the third traffic data between each aggregation domain to generate an aggregated traffic matrix.
[0119] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: expanding the target information based on the network information of multiple aggregation domains, including: determining the node information of each node in the multiple aggregation domains based on the network information of the multiple aggregation domains; updating the path attributes in the target information based on the node information of each node to obtain the expanded target information, wherein the path attributes include at least one of the following: the IPv4 addresses contained in each aggregation domain, the IPv6 addresses contained in each aggregation domain, and the address range of the reachability information of each aggregation domain.
[0120] When executed on a data processing device, it is also suitable for executing an initialized program having the following method steps: determining network information of multiple aggregation domains based on network information of the target network and node information of each node, including: determining a network aggregation strategy based on the network information of the target network, wherein the network aggregation strategy includes at least one of the following: a first aggregation strategy, a second aggregation strategy, a third aggregation strategy, and a fourth aggregation strategy, wherein the first aggregation strategy is a network routing strategy that aggregates routing information of multiple autonomous systems, the second aggregation strategy is a network routing strategy that aggregates routing information of multiple subnets or routers within an autonomous system, the third aggregation strategy is a network routing strategy that aggregates routing information of multiple private IP addresses, and the fourth aggregation strategy is a network routing strategy that aggregates routing information of user-defined routing information; determining network information of multiple aggregation domains based on the network aggregation strategy and the node information of each node.
[0121] When executed on a data processing device, it is also suitable for executing a program that is initialized with the following method steps: determining the network information of multiple aggregation domains based on the network aggregation strategy and the node information of each node, including: when the target network contains multiple autonomous systems, aggregating the multiple autonomous systems to obtain multiple aggregation domains; when the target network belongs to the internal network of any autonomous system, aggregating the routers in the autonomous system to obtain multiple aggregation domains; when the target network contains multiple intranet devices and the target network adopts a network address translation algorithm, aggregating the IP addresses of the multiple intranet devices to obtain multiple aggregation domains, wherein the IP addresses include at least: public IP addresses and private IP addresses; when the target network contains a preset traffic management policy, determining multiple aggregation domains based on the traffic management policy; determining the network information of the multiple aggregation domains based on the identification information of each aggregation domain in the multiple aggregation domains and the node information contained in each aggregation domain.
[0122] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: collecting traffic data of each node in the target network through a distributed traffic collection tool, including: deploying a distributed traffic collection tool at each node in the target network; collecting traffic data of each node in the target network through the distributed traffic collection tool, and storing the traffic data of each node in a preset storage space, so as to calculate an aggregated traffic matrix based on the traffic data of each node in the preset storage space.
[0123] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0124] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0127] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0128] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0129] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0130] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0132] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for calculating a flow matrix, characterized in that: The method is applied to a target network and includes: Collecting node information of each node in the target network, and determining network information of multiple aggregation domains based on the network information of the target network and the node information of each node; Expanding target information based on network information of the multiple aggregation domains, and constructing a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to a Border Gateway Protocol link state; Collecting traffic data of each node in the target network through a distributed traffic collection tool; An aggregated traffic matrix of the target network is calculated based on the target mapping relationship and the traffic data of each node.
2. The method according to claim 1, characterized in that Calculating the aggregated traffic matrix of the target network based on the target mapping relationship and the traffic data of each node includes: Determining the aggregation domain to which each node in the target network belongs according to the target mapping relationship; Determining the number of the plurality of aggregation domains according to the target mapping relationship, and constructing a target empty matrix according to the number of the plurality of aggregation domains; The traffic data of each node is calculated based on the aggregation domain to which each node belongs, and the target empty matrix is filled according to the calculation result to generate the aggregated traffic matrix.
3. The method according to claim 2, characterized in that Calculating the traffic data of each node based on the aggregation domain to which each node belongs, and filling the target empty matrix according to the calculation result to generate the aggregated traffic matrix, including: Determining the nodes included in each aggregation domain according to the target mapping relationship; Calculating first traffic data included in each aggregation domain according to traffic data of each node and nodes included in each aggregation domain; Calculating the first traffic data contained in each aggregation domain and the second traffic data between nodes in each aggregation domain to obtain third traffic data between each aggregation domain; The target empty matrix is filled according to the third traffic data between each aggregation domain to generate the aggregated traffic matrix.
4. The method according to claim 1, wherein Expanding the target information according to the network information of the multiple aggregation domains includes: determining node information of each node in the plurality of aggregation domains based on network information of the plurality of aggregation domains; Update the path attributes in the target information based on the node information of each node to obtain the expanded target information, wherein the path attributes include at least one of the following: the IPv4 addresses contained in each aggregation domain, the IPv6 addresses contained in each aggregation domain, and the address range of the reachability information of each aggregation domain.
5. The method according to claim 1, wherein Determining network information of multiple aggregation domains based on the network information of the target network and the node information of each node includes: Determine a network aggregation strategy based on the network information of the target network, wherein the network aggregation strategy includes at least one of the following: a first aggregation strategy, a second aggregation strategy, a third aggregation strategy, and a fourth aggregation strategy, wherein the first aggregation strategy is a network routing strategy that aggregates routing information of multiple autonomous systems, the second aggregation strategy is a network routing strategy that aggregates routing information of multiple subnets or routers within an autonomous system, the third aggregation strategy is a network routing strategy that aggregates routing information of multiple private IP addresses, and the fourth aggregation strategy is a network routing strategy that aggregates user-defined routing information; The network information of the multiple aggregation domains is determined according to the network aggregation strategy and the node information of each node.
6. The method according to claim 5, characterized in that Determining network information of the multiple aggregation domains according to the network aggregation strategy and the node information of each node includes: In a case where the target network includes multiple autonomous systems, aggregating the multiple autonomous systems to obtain the multiple aggregation domains; In a case where the target network belongs to an internal network of any autonomous system, aggregating routers in the autonomous system to obtain the multiple aggregation domains; When the target network includes multiple intranet devices and the target network adopts a network address translation algorithm, aggregating the IP addresses of the multiple intranet devices to obtain the multiple aggregation domains, wherein the IP addresses include at least: a public IP address and a private IP address; In a case where the target network includes a preset traffic management policy, determining the plurality of aggregation domains according to the traffic management policy; The network information of the multiple aggregation domains is determined according to the identification information of each aggregation domain in the multiple aggregation domains and the node information included in each aggregation domain.
7. The method according to claim 1, characterized in that Collect traffic data from each node in the target network using a distributed traffic collection tool, including: Deploy a distributed traffic collection tool on each node in the target network; The traffic data of each node in the target network is collected by the distributed traffic collection tool, and the traffic data of each node is stored in a preset storage space, so as to calculate the aggregated traffic matrix according to the traffic data of each node in the preset storage space.
8. A flow matrix calculation device, characterized in that: The device deploys a target network, including: a determining unit, configured to collect node information of each node in the target network, and determine network information of a plurality of aggregation domains based on the network information of the target network and the node information of each node; a construction unit, configured to expand target information based on network information of the multiple aggregation domains, and construct a target mapping relationship between each node in the target network and the multiple aggregation domains based on the expanded target information, wherein the target information refers to a Border Gateway Protocol link state; A collection unit, configured to collect traffic data of each node in the target network through a distributed traffic collection tool; A calculation unit is used to calculate the aggregated traffic matrix of the target network according to the target mapping relationship and the traffic data of each node.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes stored computer instructions, wherein when the computer instructions are executed by a processor, the method for calculating the traffic matrix according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: The method comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for calculating the traffic matrix according to any one of claims 1 to 7.