Network traffic prediction method and apparatus, electronic device, and storage medium
By combining causal knowledge and graph attention mechanism to prune the index sequence of the network traffic prediction model, the problem of insufficient accuracy in network traffic prediction in the existing technology is solved, and more efficient traffic prediction and resource optimization are achieved.
Patent Information
- Application Number
- CN202411619302.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-11-13
AI Technical Summary
Existing network traffic prediction methods mainly extract features from the network traffic data itself, resulting in insufficient prediction accuracy. In particular, in spatiotemporal prediction problems, it is difficult to effectively consider the traffic of multiple base stations or regions and their spatial correlation.
By leveraging the causal relationships of multiple traffic metrics across multiple network elements within a preset time period, and combining graph attention mechanisms to prune the metric sequences and extract spatial features, a directed weighted graph of causal relationships is determined using log event data, thereby improving the accuracy of network traffic prediction.
It reduces computational complexity and significantly improves the accuracy of network traffic prediction, making it suitable for resource allocation and quality of service optimization in cellular networks.
Smart Images

Figure CN119728457B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network traffic prediction, and in particular to a network traffic prediction method and device, electronic equipment and storage medium. BACKGROUND
[0002] Traffic prediction helps to assess the trend and scale of network traffic, so as to better plan network resources. So far, the cellular network traffic prediction problem can be roughly divided into two categories: time prediction problem and space-time prediction problem. The first category is the time prediction problem, which only has one base station and only considers the traffic of users or devices connected to the base station. The second is the space-time prediction problem, that is, the user connects from one base station to another base station, accompanied by the process of handover. In the latter, more complex problem, in addition to the time correlation, the traffic in multiple base stations or multiple areas and its spatial correlation are also considered. However, the network traffic prediction in the prior art only extracts features from network traffic data itself, and the accuracy of the traffic prediction needs to be improved. SUMMARY
[0003] The embodiments of the present application provide a network traffic prediction method and device, electronic equipment and storage medium to improve the accuracy of network traffic prediction.
[0004] In a first aspect, the embodiments of the present application provide a network traffic prediction method, comprising: determining a plurality of index sequences based on the changes of a plurality of traffic indicators of a plurality of network element devices over time within a preset time period; wherein each of the index sequences corresponds to a traffic indicator of a network element device; inputting the plurality of index sequences into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; wherein the network traffic prediction model is trained based on index sequence samples and traffic indicator label values determined based on a plurality of traffic indicator values of the plurality of network element devices within a historical period; the spatial feature extraction layer is used to prune the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators, and perform spatial feature extraction on the spliced matrix based on a graph attention mechanism; the causal relationship knowledge between the plurality of index sequences is determined based on log event data of each of the plurality of network element devices for each of the traffic indicators; inputting the spatial feature vector into a time feature extraction layer of the network traffic prediction model to obtain a space-time feature vector output by the time feature extraction layer; inputting the space-time feature vector into a linear mapping layer of the network prediction model to obtain predicted values of a plurality of network indicators of the plurality of network element devices within a prediction period output by the linear mapping layer.
[0005] In some embodiments, the causal relationship knowledge between each of the plurality of network element devices and the plurality of traffic indicators is determined based on the following manner: obtaining a start time and an end time of a log event of each of the plurality of network element devices for each of the plurality of traffic indicators; determining a first causal relationship directed weighted graph between the plurality of network element devices and a second causal relationship directed weighted graph between the plurality of traffic indicators based on the start time and the end time of the log event; wherein the first causal relationship directed weighted graph takes each of the network element devices as a node and takes a causal relationship possibility between network element devices as an edge weight between nodes; the second causal relationship directed weighted graph takes each of the traffic indicators as a node and takes a causal relationship possibility between traffic indicators as an edge weight between nodes; taking the second causal relationship directed weighted graph as the causal relationship knowledge between the plurality of traffic indicators, and taking the second causal relationship directed weighted graph as the causal relationship knowledge between the plurality of traffic indicators.
[0006] In some embodiments, the splicing process of the plurality of indicator sequences is pruned according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators, including: determining a causal relationship between the plurality of indicator sequences based on the first causal relationship directed weighted graph and the second causal relationship directed weighted graph; splicing the plurality of indicator sequences based on the causal relationship between the plurality of indicator sequences to obtain the spliced matrix.
[0007] As a possible implementation manner, the determining of the causal relationship between the plurality of indicator sequences based on the first causal relationship directed weighted graph and the second causal relationship directed weighted graph includes: for each indicator sequence, determining a first network element device and a first traffic indicator corresponding to the indicator sequence; determining a second network element device having a causal relationship with the first network element device based on the first causal relationship directed weighted graph; determining a second traffic indicator having a causal relationship with the first traffic indicator based on the second causal relationship directed weighted graph; determining a first indicator sequence having a causal relationship with the indicator sequence from the plurality of indicator sequences based on the second network element device and the second traffic indicator; determining the causal relationship between the plurality of indicator sequences as the causal relationship between the plurality of indicator sequences based on the causal relationship between the plurality of indicator sequences and the respective first indicator sequence of the plurality of indicator sequences.
[0008] In some embodiments, the spatial feature extraction layer is further configured to prune the splicing process of the plurality of indicator sequences according to the causal relationship knowledge between each of the plurality of network element devices and the plurality of traffic indicators and the similarity between the plurality of indicator sequences.
[0009] As a possible implementation, the pruning processing of the splicing process of the plurality of index sequences is performed based on the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators respectively, and the similarity between the plurality of index sequences, including: determining the causal relationship between the plurality of index sequences based on the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators respectively; determining the similarity relationship between the plurality of index sequences based on the similarity between the plurality of index sequences; for each of the index sequences, determining a second index sequence having an association relationship with the index sequence from the plurality of index sequences based on the causal relationship between the plurality of index sequences and the similarity relationship between the plurality of index sequences; and splicing the plurality of index sequences based on the association relationship between the plurality of index sequences and the respective corresponding second index sequences, to obtain the spliced matrix.
[0010] In a second aspect, an embodiment of the present application provides a network traffic prediction device, comprising: a first determination module configured to determine a plurality of index sequences based on changes of a plurality of traffic indicators of a plurality of network element devices respectively over time within a preset time period; wherein each of the index sequences corresponds to a traffic indicator of a network element device; a first acquisition module configured to input the plurality of index sequences into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; wherein the network traffic prediction model is trained based on index sequence samples and traffic indicator label values determined based on a plurality of traffic indicator values of the plurality of network element devices respectively within a historical time period; the spatial feature extraction layer is configured to perform pruning processing on a splicing process of the plurality of index sequences based on causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators respectively, and perform spatial feature extraction on a spliced matrix based on a graph attention mechanism; the causal relationship knowledge between the plurality of index sequences is determined based on log event data of each of the traffic indicators of the plurality of network element devices; a second acquisition module configured to input the spatial feature vector into a temporal feature extraction layer of the network traffic prediction model to obtain a spatio-temporal feature vector output by the temporal feature extraction layer; and a third acquisition module configured to input the spatio-temporal feature vector into a linear mapping layer of the network prediction model to obtain predicted values of a plurality of network indicators of the plurality of network element devices respectively within a prediction time period output by the linear mapping layer.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the network traffic prediction method of the first aspect when executing the program.
[0012] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the network traffic prediction method of the first aspect.
[0013] In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program, the computer program being executed by a processor to implement the network traffic prediction method of the first aspect.
[0014] The network traffic prediction method, device, electronic equipment and storage medium provided by the embodiments of the present application determine a plurality of index sequences based on the changes of a plurality of traffic indexes of a plurality of network element devices over time within a preset time period; input the plurality of index sequences into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; wherein the network traffic prediction model is trained based on index sequence samples and traffic index label values determined based on a plurality of traffic index values of a plurality of network element devices within a historical time period; the spatial feature extraction layer is used to prune the splicing process of the plurality of index sequences based on the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes, and extract spatial features based on a graph attention mechanism; the causal relationship knowledge between the plurality of index sequences is determined based on log event data of each traffic index of the plurality of network element devices; input the spatial feature vector into a time feature extraction layer of the network traffic prediction model to obtain a spatio-temporal feature vector output by the time feature extraction layer; and input the spatio-temporal feature vector into a linear mapping layer of the network prediction model to obtain predicted values of a plurality of network indexes of a plurality of network element devices within a prediction time period output by the linear mapping layer. When extracting spatial features, the causal relationship knowledge determined based on log event data is combined, which not only greatly reduces the computational complexity, but also improves the accuracy of network traffic prediction. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0016] Figure 1 One of the flowcharts of the network traffic prediction method provided by the embodiments of the present application;
[0017] Figure 2 The second flowchart of the network traffic prediction method provided by the embodiments of the present application;
[0018] Figure 3An example diagram of processing log event data in an embodiment of the present application;
[0019] Figure 4 An example diagram of a first causal relationship directed and weighted graph and a second causal relationship directed and weighted graph in an embodiment of the present application;
[0020] Figure 5 A third flowchart of a network traffic prediction method provided by an embodiment of the present application;
[0021] Figure 6 An architecture diagram of a network traffic prediction method of an embodiment of the present application;
[0022] Figure 7 A fourth flowchart of a network traffic prediction method provided by an embodiment of the present application;
[0023] Figure 8 A structure diagram of a network traffic prediction device provided by an embodiment of the present application;
[0024] Figure 9 A structure diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0025] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described below in conjunction with the drawings in the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0026] With the popularity of intelligent mobile terminals and the rapid development of communication networks, the number of cellular communication services has increased explosively in recent years. With the further development of cellular networks, the range of network connections is becoming wider and wider, and new application scenarios and business models such as edge computing and virtual reality are emerging. A large number of devices and sensors can also access the network to form a huge Internet of Things ecosystem. Cellular network applications require highly stable network support, which puts higher requirements on network service quality and network control. Cellular traffic prediction is a prerequisite for intelligent 5G. First, the resource allocation of demand-aware networks largely depends on accurate cellular traffic prediction. In order to enable users to experience highly stable cellular network support, operators must accurately deploy and maintain base stations at the lowest possible cost; at the same time, in order to provide better service quality at a smaller resource cost, people have proposed technologies such as base station active hibernation and meaningless expansion. All these technical requirements make accurate traffic prediction crucial, as it helps network operators and service providers understand current network traffic demand, so as to better cope with future traffic demand.
[0027] Traffic prediction helps to assess the trend and scale of network traffic, so as to better plan network resources. So far, the cellular network traffic prediction problem can be roughly divided into two categories: time prediction problem and spatio-temporal prediction problem. They arise from two different scenarios. The first category is the time prediction problem, which only has one base station and only considers the traffic of users or devices connected to the base station. The second category is the spatio-temporal prediction problem, that is, users connect from one base station to another base station, accompanied by the handover process. In the latter, more complex problem, in addition to the time correlation, the traffic in multiple base stations or multiple areas and its spatial correlation are also considered.
[0028] Many traffic prediction schemes proposed by researchers at home and abroad mainly use deep learning models such as recurrent neural networks and their variants, graph convolutional neural networks, and Transformer networks to extract data features of cellular networks and make traffic predictions. However, the main drawback of these deep learning methods is the high requirement for data and computing resources. For real network scenarios, deep learning methods have the following two significant drawbacks: first, the fluctuation of network traffic is caused by the change of network activity, which has strong randomness, which makes it difficult for neural networks to collect enough pattern features to cope with the change of network traffic; second, deep learning methods completely explore the traffic pattern through historical data, so in order to make the model have better performance, an extremely large data set is often needed for training, which makes the threshold of model training very high. Both of them greatly limit the practical application of such algorithms in real network scenarios.
[0029] To solve the above problems, the embodiment of the present application provides a network traffic prediction method, device, electronic equipment and storage medium.
[0030] Figure 1 One of the flowcharts of the network traffic prediction method provided by the embodiment of the present application is shown in FIG. 1. Figure 1 As shown in the figure, the method can include the following steps.
[0031] Step 101, based on the change of the plurality of traffic indicators of the plurality of network element devices over time within a preset time period, determine a plurality of indicator sequences; wherein each indicator sequence corresponds to a traffic indicator of a network element device.
[0032] In some embodiments, the network element device can be a router, switch and the like in a wired network, or a network device such as a base station in a wireless network. The plurality of network element devices can be network element devices in a preset area, or network element devices to be predicted based on actual needs.
[0033] The multiple traffic indicators can include bandwidth, latency, transmission rate, connection number, etc., and can be obtained by observation tools of the network element devices. The multiple traffic indicators of the multiple network element devices respectively include multiple traffic indicators of each network element device, such as traffic indicator a, traffic indicator b, traffic indicator c, and traffic indicator d of the network element device 1, traffic indicator a, traffic indicator b, traffic indicator c, and traffic indicator d of the network element device 2, traffic indicator a, traffic indicator b, traffic indicator c, and traffic indicator d of the network element device c, and the like.
[0034] In some embodiments, the changes of the multiple traffic indicators of the multiple network element devices respectively over time within the preset time period refer to the indicator values of the multiple traffic indicators of the multiple network element devices respectively at each time within the preset time period. The preset time period can be a period of time before the current time, such as one hour before the current time. The selection of the preset time period is related to the relationship between the time period of the training sample and the prediction period when the network traffic prediction model is trained.
[0035] As a possible implementation, based on the changes of the multiple traffic indicators of the multiple network element devices respectively over time within the preset time period, the implementation process of determining the multiple indicator sequences includes: for each network element device, arranging the indicator values of each traffic indicator of the network element device at each time within the preset time period in chronological order to obtain an indicator sequence corresponding to each traffic indicator of the network element device, and finally obtaining the indicator sequences corresponding to the multiple traffic indicators of each network element device. That is, each indicator sequence corresponds to a traffic indicator of a network element device. For example, the multiple network element devices are network element device 1, network element device 2, and network element device 3, and the multiple traffic indicators of each network element device are traffic indicator a, traffic indicator b, traffic indicator c, and traffic indicator d, respectively. The number of the multiple indicator sequences is 3*4=12, which are indicator sequence 1 composed of the indicator values of traffic indicator a of network device 1 at each time within the preset time period, indicator sequence 2 composed of the indicator values of traffic indicator b of network device 1 at each time within the preset time period, indicator sequence 3 composed of the indicator values of traffic indicator c of network device 1 at each time within the preset time period, indicator sequence 4 composed of the indicator values of traffic indicator d of network device 1 at each time within the preset time period, indicator sequence 5 composed of the indicator values of traffic indicator a of network device 2 at each time within the preset time period, and the like.
[0036] In step 102, a plurality of index sequences are input into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; wherein the network traffic prediction model is trained based on index sequence samples and traffic index label values determined based on a plurality of traffic index values of a plurality of network element devices in a historical time period; the spatial feature extraction layer is used to prune the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes, and perform spatial feature extraction on the spliced matrix based on a graph attention mechanism; the causal relationship knowledge between the plurality of index sequences is determined based on log event data of the plurality of network element devices for each traffic index.
[0037] In some embodiments, the network traffic prediction model can be a neural network model, including a spatial feature extraction layer, a time feature extraction layer, and a linear mapping layer. The spatial feature extraction layer is used to extract the relationship between different index sequences, the time feature extraction layer is used to extract the time sequence features in each index sequence, and the linear mapping layer is used to perform linear mapping based on the extracted feature information to obtain the prediction values of the plurality of traffic indexes of the plurality of network element devices in the prediction period.
[0038] The log event data of the plurality of network element devices for each traffic index refers to the log event data that occurs during the operation of each network element device and affects the change of each traffic index, such as the log event data that occurs during the operation of network element device 1 and affects the change of traffic index a, the log event data that occurs during the operation of network element device 2 and affects the change of traffic index c, and the log event data that occurs during the operation of network element device 1 and affects the change of traffic index b. Each log event data can include the start time, end time, and influence reason category of the business event. The log event data of the plurality of network element devices for each traffic index can be obtained based on the log data of each network element device in the historical time period, and the historical time period can be pre-set.
[0039] The causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes refers to the causal relationship between the plurality of network element devices and the causal relationship between the plurality of traffic indexes. The causal relationship between the plurality of network element devices can be the degree of mutual influence between the plurality of network element devices, and the causal relationship between the plurality of traffic indexes can be the degree of mutual influence between the plurality of traffic indexes. Both can be represented as an undirected weighted graph or a directed weighted graph.
[0040] In some embodiments, the causal relationship knowledge between each of the network element devices and the plurality of traffic indicators can be static data, i.e., determined in advance based on log event data of each of the plurality of network element devices for each traffic indicator. For example, the causal relationship between log events of each of the plurality of network element devices can be determined based on the order of occurrence of the log events; the causal relationship between log events of the plurality of network element devices is determined based on the above order, and the causal relationship between log events of the plurality of traffic indicators is determined based on the above order; the causal relationship between log events of the plurality of network element devices is determined as the causal relationship knowledge between the plurality of network element devices, and the causal relationship between log events of the plurality of traffic indicators is determined as the causal relationship knowledge between the plurality of traffic indicators.
[0041] In some embodiments, the spatial feature extraction layer can be a graph attention neural network. Generally, the graph attention neural network constructs a graph based on a full connection manner for a plurality of input sequences. However, in the embodiments of the present application, although the traffic data between the network element devices may have mutual influences, the mutual influences between the plurality of indicator sequences do not necessarily exist. Therefore, the direct graph construction by the full connection manner is not applicable to the present application. Therefore, in order to reduce irrelevant information interference caused by the attention mechanism learning, the splicing of the plurality of indicator sequences is pruned based on the causal relationship knowledge.
[0042] That is, in the present application, the explicit knowledge of the causal relationship knowledge is combined with the graph attention mechanism when the spatial feature is extracted, so as to realize the extraction of the spatial feature between the indicator sequences. This can not only improve the effectiveness of the feature extraction, but also reduce the resource consumption and improve the accuracy of the traffic prediction.
[0043] As a possible implementation manner, the process of pruning the splicing process of the plurality of indicator sequences based on the causal relationship knowledge between each of the plurality of network element devices and the plurality of traffic indicators can include: determining, for each indicator sequence, a first network element device and a first traffic indicator corresponding to the indicator sequence; determining, based on the causal relationship knowledge between the plurality of network element devices, a second network element device having the strongest causal relationship with the first network element device; determining, based on the causal relationship knowledge between the plurality of traffic indicators, a second traffic indicator having the strongest causal relationship with the first traffic indicator; determining, as an indicator sequence having a causal relationship with the indicator sequence, a first indicator sequence corresponding to the second traffic indicator of the second network element device in the plurality of indicator sequences; and pruning, based on the causal relationship between each indicator sequence and the corresponding first indicator sequence, the splicing of the indicator sequences having no causal relationship when the plurality of indicator sequences are spliced, to obtain a matrix after splicing.
[0044] For example, if the multiple indicator sequences are indicator sequence 1, indicator sequence 2 and indicator sequence 3, based on the causal relationship knowledge between the multiple network element devices and the multiple traffic indicators, it is determined that there is a causal relationship between indicator sequence 1 and indicator sequence 2, between indicator sequence 2 and indicator sequence 3, and between indicator sequence 3 and indicator sequence 1. When the indicator sequences are spliced, indicator sequence 1 is spliced with indicator sequence 1, indicator sequence 1 is spliced with indicator sequence 2, indicator sequence 2 is spliced with indicator sequence 2, indicator sequence 2 is spliced with indicator sequence 3, indicator sequence 3 is spliced with indicator sequence 3, and indicator sequence 3 is spliced with indicator sequence 1, to obtain a 6*n matrix, where n is twice the length of each indicator sequence.
[0045] In some embodiments, the spatial feature extraction layer performs spatial feature extraction on the spliced matrix based on a graph attention mechanism. The process of feature extraction on the spliced matrix by the graph attention neural network is consistent with the feature extraction process of the graph attention neural network in the related art.
[0046] In step 103, the spatial feature vector is input into a time feature extraction layer of the network traffic prediction model, and a spatio-temporal feature vector output by the time feature extraction layer is obtained.
[0047] In some embodiments, the time feature extraction layer is used to extract time sequence features in each indicator sequence. The time feature extraction layer can be a model of a recurrent neural network architecture, such as a GRU (Gated Recurrent Unit).
[0048] In step 104, the spatio-temporal feature vector is input into a linear mapping layer of the network prediction model, and predicted values of the multiple network indicators of the multiple network element devices in the prediction period are obtained.
[0049] The linear mapping layer is used to map the spatio-temporal feature vector, and output multiple predicted indicator sequences. Each predicted indicator sequence is a predicted value of a traffic indicator of a network element device at each time in the prediction period. Based on the multiple predicted indicator sequences, predicted values of the multiple network indicators of the multiple network element devices in the prediction period are obtained.
[0050] In some embodiments, the prediction period can be a period of time after the current period. The length of the prediction period can be consistent with or inconsistent with the length of the preset period. Here, the actual demand can be used to determine the length of the prediction period.
[0051] Next, the training process of the network traffic prediction model is introduced in the form of an example. For example, the length of the preset period is 10 min, the length of the prediction period is 15 min, and each set of preset period and prediction period is continuous, that is, the application scenario is to determine a plurality of index sequences based on the changes of a plurality of traffic indicators of a plurality of network element devices over time within 10 min (including the current time) before the current time, input the plurality of index sequences into the network traffic prediction model, and obtain the predicted values of the plurality of traffic indicators of the plurality of network element devices at each time within 15 min after the current time. The training process includes: constructing an initial network traffic prediction model, the initial network traffic prediction model including an initial spatial feature extraction layer, an initial temporal feature extraction layer, and an initial linear mapping layer, the initial spatial feature extraction layer being a graph convolutional neural network, and the initial temporal feature extraction layer being a GRU model; based on the index values of the plurality of traffic indicators of the plurality of network element devices at each time within the past 3 months, dividing the index values into 25 min time windows to obtain a plurality of sets of traffic indicator data, each set of traffic indicator data including the index values of the plurality of traffic indicators of the plurality of network element devices at each time within 25 min; for each set of traffic indicator data, based on the data within the first 10 min of the traffic indicator data, determining an index sequence sample, and based on the data within the last 15 min, determining a label value corresponding to the index sequence sample; inputting the obtained index sequence sample into the initial network traffic prediction model to obtain an output prediction result, and based on the prediction result and the corresponding label value, calculating a loss value to constantly update the model parameters, and finally obtaining the trained network traffic prediction model.
[0052] According to the network traffic prediction method provided by the embodiment of the application, based on the changes of the plurality of traffic indicators of the plurality of network element devices over time within a preset time period, a plurality of indicator sequences are determined; the plurality of indicator sequences are input into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; wherein the network traffic prediction model is trained based on indicator sequence samples and traffic indicator label values determined based on the plurality of traffic indicators of the plurality of network element devices within a historical time period; the spatial feature extraction layer is used to prune the splicing process of the plurality of indicator sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators, and perform spatial feature extraction on the spliced matrix based on a graph attention mechanism; the causal relationship knowledge between the plurality of indicator sequences is determined based on log event data of each traffic indicator of the plurality of network element devices; the spatial feature vector is input into a temporal feature extraction layer of the network traffic prediction model to obtain a spatio-temporal feature vector output by the temporal feature extraction layer; and the spatio-temporal feature vector is input into a linear mapping layer of the network prediction model to obtain predicted values of the plurality of network indicators of the plurality of network element devices within a prediction time period output by the linear mapping layer. When extracting spatial features, the causal relationship knowledge determined based on log event data is combined, which not only greatly reduces the computational complexity, but also improves the accuracy of network traffic prediction.
[0053] Figure 2 The flowchart of the network traffic prediction method provided by the embodiment of the application is shown in Figure 2. As shown in Figure 2, the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators in the above embodiment can be determined based on the following steps. Figure 2
[0054] Step 201, obtaining the start time and end time of the log event of each traffic indicator of the plurality of network element devices.
[0055] That is, the start time and end time of the log event of each traffic indicator are extracted from the log event data of the plurality of network element devices. It can be understood that the log event data is usually in the form of text data, and by extracting the start time and end time of the log event of each traffic indicator of the network element device, the log event data is converted into symbolic form to facilitate the extraction of the causal relationship knowledge.
[0056] As an example, each log event data can be converted into the form of (a, M1, [s, t]), where a represents the identifier of the traffic indicator, M1 represents the identifier of the network element device, s is the start time of the log event, and t is the end time of the log event.
[0057] In step 202, based on the start time and end time of the log events, a first causal relationship directed weighted graph between the plurality of network element devices and a second causal relationship directed weighted graph between the plurality of traffic indicators are determined; wherein the first causal relationship directed weighted graph takes each network element device as a node and takes the causal relationship possibility between the network element devices as the edge weight between the nodes; and the second causal relationship directed weighted graph takes each traffic indicator as a node and takes the causal relationship possibility between the traffic indicators as the edge weight between the nodes.
[0058] In some embodiments, based on the start time and end time of the log events, the sequence of the log events between the network element devices and the sequence of the log data between the traffic indicators can be determined, and based on the above sequences, the connections between the nodes in the first causal relationship directed weighted graph and the second causal relationship directed weighted graph are determined, and based on the number of log events between the nodes that exist potential causal relationship, the edge weight between the nodes is determined.
[0059] As an example, if the plurality of network element devices are M1, M2 and M3 respectively, and the plurality of traffic indicators are a, b, c and d respectively, as shown in FIG. 2, the first causal relationship directed weighted graph and the second causal relationship directed weighted graph can be determined as shown in FIG. 3. Figure 3As shown, M1 has four log events in the historical time period, which are (c, M1, [1, 4]), (a, M1, [2, 3]), (c, M1, [7, 11]) and (d, M1, [10, 15]); M2 has three log events, which are (b, M2, [3, 5]), (d, M2, [6, 9]) and (b, M2, [13, 15]); M3 has four log events, which are (a, M3, [4, 6]), (a, M3, [8, 10]), (b, M3, [9, 12]) and (c, M3, [14, 15]). In terms of network element device dimension analysis, M1 includes two continuous time period log events, which are [1, 4] and [7, 15], M2 includes three continuous time period log events, which are [3, 5], [6, 8] and [13, 15], and M3 includes three continuous time period log events, which are [4, 6], [8, 12] and [14, 15]. In turn, the start time and end time of the log event of each network element device are compared with the start time and end time of the continuous time period log event of other network element devices. If the start time of the continuous time period log event of network element device 1 is earlier than the start time of the log event of network element device 2, and the end time of the continuous time period log event of network element device 1 is later than the start time of the log event of network element device 2, it is determined that the occurrence of the log event of network element device 1 will cause the occurrence of the log event of network element device 2, an edge from the network element device 1 node to the network element device 2 node is established, and the number of continuous time period log events that meet the above conditions is determined as the weight of the edge. Based on the above determination principle, it can be determined that the start time of two log events (b, M2, [3, 5]) and (b, M2, [13, 15]) in M2 is later than the start time of the continuous time period log event of M1 and earlier than the end time of the continuous time period log event of M1. Therefore, an edge from the M1 node to the M2 node is established in the first causal relationship directed weighted graph, and the weight of the edge is 2. The start time of three log events (a, M3, [8, 10]), (b, M3, [9, 12]) and (c, M3, [14, 15]) in M3 is later than the start time of the continuous time period log event of M1 and earlier than the end time of the continuous time period log event of M1. Therefore, an edge from the M1 node to the M3 node is established in the first causal relationship directed weighted graph, and the weight of the edge is 3. The start time of one log event (a, M3, [8, 10]) in M3 is later than the start time of the continuous time period log event of M2 and earlier than the end time of the continuous time period log event of M2. Therefore, an edge from the M2 node to the M3 node is established in the first causal relationship directed weighted graph, and the weight of the edge is 1. The first causal relationship directed weighted graph is as shown in Figure 4 .
[0060] Based on the above example, in the flow indicator dimension analysis, the start time and the end time of the log events of different flow indicators are compared with each other, if the start time of the log event of the flow indicator 1 is later than the start time of the log event of the flow indicator 2 and is earlier than the end time of the log event of the flow indicator 2, it is considered that the log event of the flow indicator 2 can cause the log event of the flow indicator 1, an edge from the flow indicator 2 node to the flow indicator 1 node is established in the second causal relationship directed weighted graph, and the weight of the edge is the number of the flow indicator 2 satisfying the above condition; as shown in Figure 2 The start time of (a, M1, [2, 3]) is later than the start time of (c, M1, [1, 4]) and is earlier than the end time of (c, M1, [1, 4]), the start time of (a, M3, [8, 10]) is later than the start time of (c, M1, [7, 11]) and is earlier than the end time of (c, M1, [7, 11]), then an edge from the c node to the a node is established in the second causal relationship directed weighted graph, and the weight of the edge is 2, and other log events are compared in the same way to obtain the second causal relationship directed weighted graph as shown in Figure 4 The start time of (d, M1, [10, 15]) is later than the start time of (c, M1, [7, 11]) and is earlier than the end time of (c, M1, [7, 11]), then an edge from the c node to the d node is established, and the weight of the edge is set to 1; M2 in M2 is analyzed, and there is no log event satisfying the above condition; M3 in M3 is analyzed, and the flow indicators
[0061] In step 203, the second causal relationship directed weighted graph is taken as the causal relationship knowledge between the plurality of flow indicators.
[0062] It should be noted that the causal relationship knowledge between the plurality of flow indicators can be periodically updated with the supplement of the log event data to ensure the applicability of the causal relationship knowledge.
[0063] According to the network flow prediction method provided in the embodiments of the present application, the network element devices, the flow indicators, the start times and the end times of the log data are extracted, the causal relationship between the log events is analyzed in the network element device dimension and the flow indicator dimension respectively, the first causal relationship directed weighted graph and the second causal relationship directed weighted graph are obtained, the display causal knowledge is determined based on the first causal relationship directed weighted graph and the second causal relationship directed weighted graph, and the spatial feature extraction is performed in combination with the graph attention mechanism, which not only can reduce the interference of irrelevant information on the calculation of the graph attention mechanism, but also can reduce the calculation complexity and improve the accuracy of the network flow prediction.
[0064] Next, the process of pruning the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes will be introduced in detail.
[0065] Figure 5 The third flowchart of the network traffic prediction method provided by the embodiment of the present application is shown in Figure 3. Figure 3 As shown in Figure 3, in combination with the above embodiment, the process of pruning the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes includes the following steps.
[0066] In step 501, the causal relationship between the plurality of index sequences is determined based on the first causal relationship directed and weighted graph and the second causal relationship directed and weighted graph.
[0067] In some embodiments, the implementation process of determining the causal relationship between the plurality of index sequences based on the first causal relationship directed and weighted graph and the second causal relationship directed and weighted graph can include: for each index sequence, determining the first network element device and the first traffic index corresponding to the index sequence; determining the second network element device having a causal relationship with the first network element device based on the first causal relationship directed and weighted graph; determining the second traffic index having a causal relationship with the first traffic index based on the second causal relationship directed and weighted graph; determining the first index sequence having a causal relationship with the index sequence from the plurality of index sequences based on the second network element device and the second traffic index; and determining the causal relationship between the plurality of index sequences and their respective first index sequences as the causal relationship between the plurality of index sequences.
[0068] That is, the causal relationship between the plurality of index sequences can be determined for each index sequence, including the causal relationship between each index sequence and other index sequences.
[0069] In the above embodiment, the number of second network element devices can be one or multiple. When determining the second network element device having a causal relationship with the first network element device based on the first causal relationship directed and weighted graph, the plurality of edges pointing to the first network element device can be obtained based on the first causal relationship directed and weighted graph, and the weights of the plurality of edges are sorted from large to small, and the first n edges are taken out from the sorting result, and the n network element devices pointed by the starting nodes of the n edges are taken as the second network element devices, and n can be determined based on actual requirements.
[0070] The number of the second flow indicators can be one or multiple. When determining the second flow indicators that have a causal relationship with the first flow indicator based on the second causal relationship directed and weighted graph, the multiple edges pointing to the first flow indicator can be obtained based on the second causal relationship directed and weighted graph, the weights of the multiple edges are sorted from large to small, the first m edges are taken from the sorting result, and the m flow indicators pointed to by the starting nodes of the m edges are taken as the second flow indicators. The value of m can be determined based on actual requirements.
[0071] In some embodiments, the implementation of determining the first indicator sequence that has a causal relationship with the indicator sequence based on the second network element device and the second flow indicator from the multiple indicator sequences includes: if the number of the second network element device and the second flow indicator is one, the indicator sequence corresponding to the second flow indicator of the second network element device in the multiple indicator sequences is determined as the first indicator sequence; if the number of the second network element device and the second flow indicator is greater than one, the second network element device and the second flow indicator are combined, such as if the second network element device includes network element device a and network element device b, and the second flow indicator includes flow indicator a and flow indicator b, then the combination of (network element device a, flow indicator a), (network element device a, flow indicator b), (network element device b, flow indicator a), and (network element device b, flow indicator b) is obtained, and the indicator sequence corresponding to each combination is taken as the first indicator sequence, that is, the indicator sequence a corresponding to the flow indicator a of the network element device a, the indicator sequence b corresponding to the flow indicator b of the network element device a, the indicator sequence c corresponding to the flow indicator a of the network element device b, and the indicator sequence d corresponding to the flow indicator b of the network element device b in the multiple indicator sequences are all determined as the first indicator sequence.
[0072] In step 502, the multiple indicator sequences are spliced based on the causal relationship between the multiple indicator sequences to obtain a spliced matrix.
[0073] It can be understood that the sequence splicing step of the graph convolutional neural network is usually spliced in a full connection form, and the indicator sequence splicing process in the present scheme is spliced based on the causal relationship between the multiple indicator sequences, so that the splicing of the indicator sequences that do not have a causal relationship can be pruned, and only the splicing between the indicator sequences that have a causal relationship is retained. This can make the subsequent graph attention mechanism only target the indicator sequences that have a relationship, and reduce the interference of irrelevant information.
[0074] For example, if multiple indicator sequences are identified as indicator sequence 1, indicator sequence 2, and indicator sequence 3, and based on the first and second causal directed weighted graphs, it is determined that indicator sequence 1 has a causal relationship with indicator sequence 2, indicator sequence 2 has a causal relationship with indicator sequence 3, and indicator sequence 3 has a causal relationship with indicator sequence 1, then when concatenating the indicator sequences, indicator sequence 1 is concatenated with indicator sequence 1, indicator sequence 1 with indicator sequence 2, indicator sequence 2 with indicator sequence 2, indicator sequence 2 with indicator sequence 3, indicator sequence 3 with indicator sequence 3, and indicator sequence 3 with indicator sequence 1. The concatenation between indicator sequence 1 and indicator sequence 3 is pruned, the concatenation between indicator sequence 2 and indicator sequence 1 is pruned, and the concatenation between indicator sequence 3 and indicator sequence 2 is pruned, resulting in a 6×n matrix, where n is twice the length of each indicator sequence.
[0075] Figure 6 This is a schematic diagram of the architecture of the network traffic prediction method according to an embodiment of the present invention. Figure 6 As shown, multiple indicator sequences and causal relationship knowledge are input into the spatial feature extraction layer of the network traffic prediction model. The output of the spatial feature extraction layer is input into the temporal feature extraction layer, and the output of the temporal feature extraction layer is input into the linear mapping layer, finally obtaining the prediction sequence.
[0076] In some embodiments, to improve the accuracy of pruning during the index sequence splicing process, the similarity between multiple index sequences can be introduced. The spatial feature extraction layer is also used to prune the splicing process of multiple index sequences based on the causal relationship knowledge between multiple network element devices and multiple traffic indicators, as well as the similarity between multiple index sequences.
[0077] Figure 7 This is the fourth flowchart illustrating the network traffic prediction method provided in this embodiment of the invention. Figure 7 As shown, the spatial feature extraction layer can perform pruning on the splicing process of multiple indicator sequences based on the causal relationship knowledge between multiple network element devices and multiple traffic indicators, as well as the similarity between multiple indicator sequences. This process can include the following steps.
[0078] Step 701: Based on the causal relationship knowledge between multiple network element devices and multiple traffic indicators, determine the causal relationship between multiple indicator sequences.
[0079] Step 702: Determine the similarity relationship between multiple indicator sequences based on the similarity between multiple indicator sequences.
[0080] In some embodiments, the similarity between each pair of indicator sequences can be calculated based on a DTW algorithm, and the similarity between each indicator sequence and other indicator sequences is determined as the similarity relationship between the plurality of indicator sequences.
[0081] In step 703, for each indicator sequence, the second indicator sequence having a correlation relationship with the indicator sequence is determined from the plurality of indicator sequences based on the causal relationship between the plurality of indicator sequences and the similarity relationship between the plurality of indicator sequences.
[0082] In some embodiments, for each indicator sequence, the first indicator sequence is determined based on the causal relationship between the plurality of indicator sequences, and the ordering of the similarity between the indicator sequence and other indicator sequences from large to small is determined based on the similarity relationship between the plurality of indicator sequences. Based on the ordering result, the top s indicator sequences are taken out based on the preset number, and the third indicator sequence is determined. The intersection of the third indicator sequence and the first indicator sequence is taken, and the second indicator sequence is determined based on the intersection result.
[0083] In some embodiments, the number of first indicator sequences, the number of second indicator sequences, and the number of third indicator sequences can be preset. If the number of indicators in the intersection result is less than the preset number of second indicator sequences, the indicator sequences can be taken out based on the similarity ordering result between the indicator sequence and other indicator sequences to complete the second indicator sequence.
[0084] In step 704, the plurality of indicator sequences are spliced based on the correlation relationship between the plurality of indicator sequences and their respective second indicator sequences to obtain a spliced matrix.
[0085] That is, when the plurality of indicator sequences are spliced, the splicing of the indicator sequences that do not have a correlation relationship can be pruned, and only the splicing of each indicator sequence and its corresponding second indicator sequence is retained to obtain the spliced matrix.
[0086] According to the network traffic prediction method of the embodiment of the present application, the spatial feature extraction layer is further used to prune the splicing process of the plurality of indicator sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators, and the similarity between the plurality of indicator sequences, to improve the accuracy of spatial feature extraction, and further improve the accuracy of network traffic prediction.
[0087] The power distribution network data topology restoration device provided by the embodiment of the present application is described below. The power distribution network data topology restoration device described below can be correspondingly referred to the power distribution network data topology restoration method described above.
[0088] Figure 8 The structure diagram of the network traffic prediction device provided by the embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the network traffic prediction device comprises a spatial feature extraction layer 101, a correlation relationship determination layer 102, and a splicing layer 103.Figure 8 As shown, the apparatus comprises a first determining module 810, a first obtaining module 820, a second obtaining module 830 and a third obtaining module 840.
[0089] The first determining module 810 is configured to determine a plurality of index sequences based on changes of a plurality of traffic indexes of a plurality of network element devices over time within a preset time period, wherein each index sequence corresponds to one traffic index of one network element device.
[0090] The first obtaining module 820 is configured to input the plurality of index sequences to a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer, wherein the network traffic prediction model is trained based on index sequence samples and traffic index label values determined based on a plurality of traffic index values of a plurality of network element devices within a historical time period; the spatial feature extraction layer is configured to prune a splicing process of the plurality of index sequences based on causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes, and extract spatial features of a spliced matrix based on a graph attention mechanism; and the causal relationship knowledge between the plurality of index sequences is determined based on log event data of each traffic index of the plurality of network element devices.
[0091] The second obtaining module 830 is configured to input the spatial feature vector to a temporal feature extraction layer of the network traffic prediction model to obtain a spatio-temporal feature vector output by the temporal feature extraction layer.
[0092] The third obtaining module 840 is configured to input the spatio-temporal feature vector to a linear mapping layer of the network prediction model to obtain predicted values of a plurality of network indexes of the plurality of network element devices within a prediction time period output by the linear mapping layer.
[0093] In some embodiments, the apparatus can further comprise a second determining module 850 configured to: based on the spatial feature extraction layer, obtain start times and end times of log events of each traffic index of the plurality of network element devices; based on the start times and the end times of the log events, determine a first causal relationship directed and weighted graph between the plurality of network element devices and a second causal relationship directed and weighted graph between the plurality of traffic indexes; wherein the first causal relationship directed and weighted graph takes each network element device as a node and takes a causal relationship possibility between the network element devices as an edge weight between the nodes; the second causal relationship directed and weighted graph takes each traffic index as a node and takes a causal relationship possibility between the traffic indexes as an edge weight between the nodes. The second causal relationship directed and weighted graph is taken as the causal relationship knowledge between the plurality of traffic indexes, and the second causal relationship directed and weighted graph is taken as the causal relationship knowledge between the plurality of traffic indexes.
[0094] In some embodiments, the first obtaining module 820 is further configured to: based on the spatial feature extraction layer, determine the causal relationship between the plurality of index sequences based on the first causal relationship directed and weighted graph and the second causal relationship directed and weighted graph; and based on the causal relationship between the plurality of index sequences, splice the plurality of index sequences to obtain the spliced matrix.
[0095] Specifically, the first obtaining module 820 is further configured to: based on the spatial feature extraction layer, determine, for each index sequence, the first network element device and the first flow index corresponding to the index sequence; determine, based on the first causal relationship directed and weighted graph, the second network element device that has a causal relationship with the first network element device; determine, based on the second causal relationship directed and weighted graph, the second flow index that has a causal relationship with the first flow index; determine, based on the second network element device and the second flow index, the first index sequence that has a causal relationship with the index sequence from the plurality of index sequences; and determine the causal relationship between the plurality of index sequences and the respective first index sequence corresponding to the plurality of index sequences as the causal relationship between the plurality of index sequences.
[0096] In some embodiments, the spatial feature extraction layer is further configured to prune the splicing process of the plurality of index sequences according to the causal relationship knowledge between each of the plurality of network element devices and the plurality of flow indexes, and the similarity between the plurality of index sequences.
[0097] Specifically, the first obtaining module 820 is further configured to: based on the spatial feature extraction layer, determine the causal relationship between the plurality of index sequences based on the causal relationship knowledge between each of the plurality of network element devices and the plurality of flow indexes; determine the similarity relationship between the plurality of index sequences based on the similarity between the plurality of index sequences; for each index sequence, determine the second index sequence that has an association relationship with the index sequence from the plurality of index sequences based on the causal relationship between the plurality of index sequences and the similarity relationship between the plurality of index sequences; and based on the association relationship between the plurality of index sequences and the respective second index sequence corresponding to the plurality of index sequences, splice the plurality of index sequences to obtain the spliced matrix.
[0098] Figure 9 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 9As shown, the electronic device can include a processor 910, a communication interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 complete mutual communication through the communication bus 940. The processor 910 can invoke the computer program in the memory 930 to execute the steps of the network traffic prediction method provided by each embodiment described above, including: determining a plurality of index sequences based on the changes of a plurality of traffic indicators of a plurality of network element devices over time within a preset time period; wherein each index sequence corresponds to a traffic indicator of a network element device; inputting the plurality of index sequences into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; wherein the network traffic prediction model is trained based on index sequence samples and traffic indicator label values determined based on a plurality of traffic indicator values of a plurality of network element devices within a historical period; the spatial feature extraction layer is used to prune the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators, and perform spatial feature extraction on the spliced matrix based on a graph attention mechanism; the causal relationship knowledge between the plurality of index sequences is determined based on log event data of the plurality of network element devices for each traffic indicator; inputting the spatial feature vector into a time feature extraction layer of the network traffic prediction model to obtain a spatio-temporal feature vector output by the time feature extraction layer; and inputting the spatio-temporal feature vector into a linear mapping layer of the network prediction model to obtain predicted values of a plurality of network indicators of a plurality of network element devices within a prediction period output by the linear mapping layer.
[0099] In addition, the logic instructions in the memory 930 described above can be implemented in the form of a software functional unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or parts of the prior art that are essential or contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0100] In another aspect, an embodiment of the present application also provides a computer program product comprising a computer program, which can be stored in a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can perform the steps of the network traffic prediction method provided by the above-mentioned embodiments.
[0101] In another aspect, an embodiment of the present application also provides a processor-readable storage medium storing a computer program, which is used to make the processor perform the steps of the network traffic prediction method provided by the above-mentioned embodiments.
[0102] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to a magnetic storage (e.g., floppy disk, hard disk, magnetic tape, MO, etc.), an optical storage (e.g., CD, DVD, BD, HVD, etc.), and a semiconductor storage (e.g., ROM, EPROM, EEPROM, NAND FLASH, SSD, etc.), etc.
[0103] The above-described device embodiments are only schematic, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as a unit can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0104] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus necessary universal hardware platforms, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in the various embodiments or some parts of the embodiments.
[0105] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit the same; and although the present application has been described in detail with reference to the foregoing embodiments, it should be appreciated by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features thereof can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A network traffic prediction method characterized by, The method comprises the following steps: determining a plurality of index sequences based on the changes of a plurality of traffic indicators of a plurality of network element devices over time within a preset time period; wherein each index sequence corresponds to a traffic indicator of a network element device; inputting the plurality of index sequences into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; wherein the network traffic prediction model is trained based on index sequence samples and traffic indicator label values determined based on a plurality of traffic indicator values of the plurality of network element devices within a historical time period; the spatial feature extraction layer is used to prune the splicing process of the plurality of index sequences based on the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators, and perform spatial feature extraction on the spliced matrix based on a graph attention mechanism; the causal relationship knowledge between the plurality of index sequences is determined based on log event data of each traffic indicator of the plurality of network element devices; inputting the spatial feature vector into a temporal feature extraction layer of the network traffic prediction model to obtain a spatio-temporal feature vector output by the temporal feature extraction layer; inputting the spatio-temporal feature vector into a linear mapping layer of the network traffic prediction model to obtain predicted values of a plurality of network indicators of the plurality of network element devices within a prediction time period output by the linear mapping layer.
2. The method of claim 1, wherein, The causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators is determined based on the following method: obtaining the start time and end time of the log event of each traffic indicator of the plurality of network element devices; based on the start time and end time of the log event, determining a first causal relationship directed and weighted graph between the plurality of network element devices and a second causal relationship directed and weighted graph between the plurality of traffic indicators; wherein the first causal relationship directed and weighted graph takes each network element device as a node and the causal relationship possibility between network element devices as the edge weight between nodes; the second causal relationship directed and weighted graph takes each traffic indicator as a node and the causal relationship possibility between traffic indicators as the edge weight between nodes; the second causal relationship directed and weighted graph is used as the causal relationship knowledge between the plurality of traffic indicators, and the second causal relationship directed and weighted graph is used as the causal relationship knowledge between the plurality of traffic indicators.
3. The method of claim 2, wherein, The spatial feature extraction layer prunes the splicing process of the plurality of index sequences based on the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indicators, comprising: determining the causal relationship between the plurality of index sequences based on the first causal relationship directed and weighted graph and the second causal relationship directed and weighted graph; splicing the plurality of index sequences based on the causal relationship between the plurality of index sequences to obtain the spliced matrix.
4. The method of claim 3, wherein, The spatial feature extraction layer determines the causal relationship between the plurality of index sequences based on the first causal relationship directed and weighted graph and the second causal relationship directed and weighted graph, comprising: For each index sequence, determine the first network element device and the first traffic index corresponding to the index sequence; Based on the first causal relationship directed and weighted graph, determine the second network element device that has a causal relationship with the first network element device; Based on the second causal relationship directed and weighted graph, determine the second traffic index that has a causal relationship with the first traffic index; Based on the second network element device and the second traffic index, determine the first index sequence that has a causal relationship with the index sequence from the plurality of index sequences; Determine the causal relationship between the plurality of index sequences and their respective corresponding first index sequences as the causal relationship between the plurality of index sequences.
5. The method of claim 1, wherein, The spatial feature extraction layer is also used to prune the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes respectively, and the similarity between the plurality of index sequences.
6. The method of claim 5, wherein, The spatial feature extraction layer prunes the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes respectively, and the similarity between the plurality of index sequences, including: Based on the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes respectively, determine the causal relationship between the plurality of index sequences; Based on the similarity between the plurality of index sequences, determine the similarity relationship between the plurality of index sequences; For each of the index sequences, based on the causal relationship between the plurality of index sequences and the similarity relationship between the plurality of index sequences, determine the second index sequence that has an association relationship with the index sequence from the plurality of index sequences; Based on the association relationship between the plurality of index sequences and their respective corresponding second index sequences, splice the plurality of index sequences to obtain the spliced matrix.
7. A network traffic prediction apparatus characterized by comprising: It includes: The first determination module is used to determine a plurality of index sequences based on the change of a plurality of traffic indexes of a plurality of network element devices respectively over time within a preset time period; each of the index sequences corresponds to a traffic index of a network element device; The first acquisition module is used to input the plurality of index sequences into a spatial feature extraction layer of a network traffic prediction model to obtain a spatial feature vector output by the spatial feature extraction layer; the network traffic prediction model is trained based on index sequence samples and traffic index label values determined based on a plurality of traffic index values of the plurality of network element devices respectively within a historical period; the spatial feature extraction layer is used to prune the splicing process of the plurality of index sequences according to the causal relationship knowledge between the plurality of network element devices and the plurality of traffic indexes respectively, and perform spatial feature extraction on the spliced matrix based on a graph attention mechanism; the causal relationship knowledge between the plurality of index sequences is determined based on log event data of the plurality of network element devices respectively for each of the traffic indexes; The second acquisition module is used to input the spatial feature vector into a time feature extraction layer of the network traffic prediction model to obtain a spatio-temporal feature vector output by the time feature extraction layer; A third obtaining module, configured to input the space-time feature vector into a linear mapping layer of the network traffic prediction model, and obtain predicted values of a plurality of network indexes of the plurality of network element devices in a prediction period output by the linear mapping layer.
8. An electronic device comprising a processor and a memory having a computer program stored therein, characterized in that, The processor implements the network traffic prediction method in any one of claims 1 to 6 when executing the computer program. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the network traffic prediction method in any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the network traffic prediction method in any one of claims 1 to 6. The computer program, when executed by the processor, implements the network traffic prediction method in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for predicting future traffic flow based on heterogeneous graph
CN118247968A
Network traffic prediction method and system based on space-time sequence
CN118413858A