A traffic prediction method, system, device and medium

CN122933449APending Publication Date: 2026-10-16POWER DISPATCHING CONTROL CENT OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611324035.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]本发明提供了一种流量预测方法、系统、设备及介质,能够解决在拓扑动态变化时,如何避免历史邻域信息的错误传播,进而提高预测准确性的问题

Benefits of technology

根据预设时间步长,在第一流量序列中选择每个预设时间步长内的历史流量值进行平均处理,得到第二流量序列,其中,各第二流量序列的时间步长均为预设时间步长;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933449A_ABST
    Figure CN122933449A_ABST
Patent Text Reader

Abstract

The application discloses a kind of flow prediction method, system, equipment and medium, belong to intelligent power grid communication technical field, the method is: obtaining the sliding window data and periodic characteristics of each port, and obtaining each port current topology matrix and last topology matrix;According to sliding window data and periodic characteristics extraction time sequence dependence, obtain the time sequence embedding of each port;With each time sequence embedding as initial node feature, and with current topology matrix as graph propagation structure to carry out neighborhood message propagation, obtain the relationship embedding of each port;According to current topology matrix and last topology matrix, the degree of change of connection state is calculated, and the topology change intensity is obtained;According to the determination of gate vector according to topology change intensity, and according to gate vector, time sequence embedding, relationship embedding and periodic characteristics are fused to obtain fusion feature;According to fusion feature, flow prediction is carried out, and prediction value is obtained.Therefore, by implementing the present application, the accuracy of the prediction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid communication technology, and in particular to a flow prediction method, system, device and medium. Background Technology

[0002] With the continuous development of smart grids, the scale of distribution communication networks is expanding daily, and the stability and reliability of their operation are crucial to the safe operation of the power grid. Accurately predicting the traffic change trends of distribution communication networks is of great significance for identifying network congestion risks in advance, optimizing resource allocation, and ensuring the real-time performance and reliability of power services.

[0003] Currently, existing technologies have proposed a data-driven traffic prediction scheme for power distribution communication networks. This scheme uses a long short-term memory network to predict network traffic time series data to obtain time-series embedded features. At the same time, a graph convolutional network is used to process the device topology relationships to obtain relationship embeddings. The time-series embedded features and relationship embeddings are then fused and input into a fully connected layer to obtain traffic prediction results, which are then used to regulate the operation of the power distribution communication network.

[0004] However, in actual power distribution communication networks, frequent online / offline status changes of equipment ports, link failures, or ring network opening and closing cause the network topology to change dynamically between adjacent sampling times. Existing technologies only use static topology for spatial feature extraction, which leads to historical neighborhood information being incorrectly propagated to the changed topology when the topology changes, thus resulting in a decrease in prediction accuracy. Summary of the Invention

[0005] This invention provides a traffic prediction method, system, device, and medium that can solve the problem of how to avoid the erroneous propagation of historical neighborhood information when the topology changes dynamically, thereby improving prediction accuracy.

[0006] This invention provides a traffic prediction method, comprising: Obtain the sliding window data and periodic characteristics of each port, and obtain the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. Temporal dependencies are extracted based on sliding window data and periodic features to obtain the temporal embedding of each port; Using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained. The degree of change in the connection state is calculated based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; the gating vector is determined based on the temporal embedding, relational embedding, periodic features and topology change intensity of each port, and the temporal embedding, relational embedding and periodic features are fused based on the gating vector to obtain the fused features; Traffic is predicted based on the fusion characteristics to obtain the predicted value.

[0007] This invention extracts temporal dependencies from sliding window data, uses the current topology matrix for neighborhood message propagation to obtain relation embeddings, and calculates the topology change intensity based on the current and previous topology matrices. Based on this intensity, a gating vector dynamically adjusts the contributions of temporal embeddings, relation embeddings, and periodic features in the fusion process. This allows for adaptive adjustment of the influence weights of spatial relation information on prediction according to the degree of topology change. When the topology has just changed, the gating network can suppress unreliable relation propagation components based on the topology change intensity, preventing historical neighborhood information from being incorrectly propagated into the changed topology, thereby improving prediction accuracy.

[0008] Furthermore, obtain the historical traffic sequences for each port; For each port, outliers in the historical traffic sequence are removed to obtain the first traffic sequence. Based on a preset time step, the historical flow values ​​within each preset time step in the first flow sequence are selected and averaged to obtain the second flow sequence, wherein the time step of each second flow sequence is a preset time step. The missing values ​​in the second flow sequence are processed by linear interpolation to obtain the third flow sequence; In the third flow sequence, sliding window data is determined based on historical flow values ​​within a preset time window.

[0009] By removing outliers from historical traffic sequences, traffic spikes caused by noise interference can be eliminated; by averaging the data at a preset time step, the data from each port can be aligned to a uniform time granularity, ensuring the consistency of input data for subsequent gating loop units; and by using linear interpolation to fill in the gaps, the integrity of input data for subsequent gating loop units can be guaranteed, avoiding prediction deviations caused by missing data or inconsistent time granularity.

[0010] Furthermore, based on the third traffic sequence, the autocorrelation coefficient of each port is calculated over at least one preset period; For each preset period, if the autocorrelation coefficient is greater than the preset threshold, the preset period is determined to be a valid period. Based on the effective period, select the historical flow value corresponding to each time step in the third flow sequence, and determine the periodic characteristics based on the historical flow value corresponding to each time step.

[0011] By calculating the autocorrelation coefficient of each port over a preset period and filtering out effective periods, the actual periodic patterns of each port can be adaptively identified. This allows the constructed periodic features to reflect the intraday and weekly phase repetition patterns of power distribution traffic, providing reliable periodic reference information for subsequent gating fusion and prediction.

[0012] Furthermore, the sliding window data includes historical flow values ​​for each time step and flow difference values ​​between adjacent time steps; Based on the sliding window data and periodic features, the temporal dependencies are extracted to obtain the temporal embedding of each port, specifically: For each port, the sliding window data and periodic features are sequentially input into a preset gated loop unit according to time steps. At each time step, the gated loop unit updates the current hidden state based on the historical traffic value of the current time step, the traffic difference value of adjacent time steps, the hidden state of the previous time step, and the periodic features of the current time step. The hidden state of the last time step is taken as the time-series embedding.

[0013] By using a gated recurrent unit to process sliding window data and periodic features sequentially at each time step, and simultaneously integrating historical flow values, adjacent difference values, and periodic features to update the hidden state at each time step, the gated recurrent unit can perceive the degree of periodic deviation while learning the temporal dependence. This enhances the model's ability to distinguish between burst flow, trend components, and periodic components, thereby improving the representation quality of temporal embedding.

[0014] Furthermore, using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained, specifically: The initial node features of each port are stacked according to the preset port order to obtain the initial feature matrix; Add self-connects to the topological matrix to obtain an intermediate matrix, and perform symmetric normalization based on the node degree of each element in the intermediate matrix to obtain the propagation matrix. Multiply the initial feature matrix by the propagation matrix to complete one layer of neighborhood message propagation and obtain the next feature matrix for each port; Repeat the multi-layer propagation to obtain the feature matrix of each layer, and then perform a weighted summation of the feature matrices of each layer to obtain the relationship embedding of each port.

[0015] By using temporal embedding as the initial node feature, multi-layer neighborhood message propagation is performed on the current topology matrix, and the propagation results of each layer are weighted and summed to obtain the relation embedding. This allows the relation embedding to include both the temporal information of the node itself and the spatial coupling relationship between adjacent ports at the same time. Thus, when the topology changes dynamically, the relation embedding can adjust the propagation path according to the current topology structure and accurately characterize the topological dependencies at the current time.

[0016] Furthermore, a gating vector is determined based on the temporal embedding, relational embedding, periodic features, and topological change intensity of each port. The temporal embedding, relational embedding, and periodic features are then fused using the gating vector to obtain the fused features, specifically: The temporal embedding, relational embedding, periodic features, and topological change intensity of each port are input into the gating network to obtain the gating vector; By utilizing the contribution of the relation embedding modulated dimensionally by the gate vector, and by utilizing the contribution of the complementary amount of the gate vector modulated dimensionally by the periodic features, the modulated relation embedding and the modulated periodic features are obtained respectively. The modulated relational embedding and the modulated periodic features are added to the temporal embedding and then normalized to obtain the fused features.

[0017] By using temporal embedding as the backbone and modulating the contributions of relation embedding and periodic features with gating vectors and their complementary quantities respectively before fusion, spatial relation information can be fully utilized to assist prediction when the topology is stable. When the topology has just changed or neighbor data is missing, unreliable relation propagation components are suppressed based on the intensity of the topology change, while the weight of periodic features is increased as an alternative correction source, thereby avoiding the erroneous propagation of historical neighborhood information and achieving adaptive fusion in dynamic scenarios.

[0018] Furthermore, traffic prediction is performed based on the fusion characteristics to obtain the predicted value, specifically: Based on the time to be predicted and the effective period, the corresponding historical flow value is selected from the third flow sequence as the period baseline value; The fused features are input into a multilayer perceptron to obtain the residual prediction values; After adding the periodic baseline and the residual prediction value, and then performing a non-negative mapping, the prediction value of each port at the time to be predicted is obtained.

[0019] By using the effective historical value of the period at the time to be predicted as the period baseline, the multilayer perceptron only learns the residual amount relative to this baseline. This allows the dynamic topological relationship to correct abrupt changes while preserving stable periodic patterns, reducing the learning difficulty of the fully connected network, avoiding the overlap of periodic and abrupt components, and improving the prediction stability during periods of topological change and periodic peaks and valleys.

[0020] Another embodiment of the present invention provides a traffic prediction system, including: an acquisition module, a time series module, a topology module, a fusion module, and a prediction module; The acquisition module is used to acquire the sliding window data and periodic characteristics of each port, and to acquire the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. The timing module is used to extract timing dependencies based on sliding window data and periodic features to obtain the timing embedding of each port; The topology module is used to propagate neighborhood messages using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure to obtain the relationship embedding of each port. The fusion module is used to calculate the degree of change in the connection state based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; determine the gating vector based on the temporal embedding, relational embedding, periodic features and topology change intensity of each port, and fuse the temporal embedding, relational embedding and periodic features based on the gating vector to obtain the fused features; The prediction module is used to predict traffic based on fusion features and obtain predicted values.

[0021] Another embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the steps of the traffic prediction method of the present invention.

[0022] Another embodiment of the present invention provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform the steps of the traffic prediction method of the present invention. Attached Figure Description

[0023] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating a traffic prediction method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a traffic prediction system provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0027] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0029] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0030] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0031] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0032] See Figure 1To address the problem of avoiding the erroneous propagation of historical neighborhood information and thus improving prediction accuracy during dynamic topology changes, an embodiment of the present invention provides a traffic prediction method, comprising: Step 101: Obtain the sliding window data and periodic characteristics of each port, and obtain the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step.

[0033] In this step, the historical traffic sequence of each port is obtained, and the historical traffic sequence is preprocessed to obtain the preprocessed traffic sequence. Based on the preprocessed traffic sequence, the continuous data segment before the prediction starting point is extracted as the sliding window data.

[0034] Based on the link connection status of each port at each sampling time, a dynamic topology matrix is ​​constructed with ports as nodes and link connections as edges. Preferably, the dimensions of this topology matrix remain fixed, and when a port is offline, its port number is retained, with an additional flag indicating its unavailable state. Specifically, for sampling time t, a dynamic adjacency matrix A is constructed using the most recent valid link status before that time. (t) When a port is temporarily offline, its fixed node number is retained and the validity mask is set to 0 to maintain consistency in the matrix dimensions and port semantics of different topology snapshots.

[0035] Flow values ​​that have a periodic correspondence with the current sampling / prediction time can be extracted from historical flow sequences as periodic features, and the obtained periodic features p (i,t) At least x (i,t-Pd) x (i,t-Pw) x (i,t) -x (i,t-Pd) , where P d and P w For candidate periods with different period lengths, for example, P d For the candidate date period, P w Since x is a candidate period, therefore, (i,t) x is the flow rate of port i at sampling time t. (i,t-Pd) It is the traffic at port i at sampling time t on the previous day; x (i,t-Pw) It represents the traffic at sampling time t on the same day last week for port i; x (i,t) -x (i,t-Pd) It is the difference in flow rate between node i today and yesterday at sampling time t.

[0036] Step 102: Extract the temporal dependencies based on the sliding window data and periodic features to obtain the temporal embedding of each port.

[0037] In this step, the sliding window data of each port is aligned with the corresponding periodic features by time step, and then input sequentially into a network model capable of extracting temporal dependencies. This network model processes the input at each time step sequentially, and outputs a fixed-length vector after synthesizing the information from each time step. This vector serves as the temporal embedding of each port at the prediction starting point. The network model includes, but is not limited to, recurrent neural networks, gated recurrent units, long short-term memory networks, or Transformer temporal encoders.

[0038] Step 103: Using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure, neighborhood message propagation is performed to obtain the relationship embedding of each port.

[0039] In this step, the temporal embeddings of each port are used as the initial features of each node in the graph. The graph structure is defined using the topology matrix at the current sampling time, where nodes represent ports and edges represent links between ports. Message propagation is performed along the edges of the graph structure, enabling each node to aggregate the feature information of its neighboring nodes. Based on the propagated node features, the relationship embeddings of each port are obtained. Graph propagation can be implemented using graph convolutional networks, graph attention networks, lightweight graph convolutional networks, or message passing neural networks.

[0040] Step 104: Calculate the degree of change in connection state based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; determine the gating vector based on the temporal embedding, relational embedding, periodic features and topology change intensity of each port, and fuse the temporal embedding, relational embedding and periodic features based on the gating vector to obtain the fused features.

[0041] In this step, the topology matrices at different sampling times are compared, and the intensity of the topology change is determined based on the degree of change in the connection status of each port. Specifically, the change matrix B is calculated from adjacent snapshots. (t) =|A (t) -A (t-1) The topology change intensity c is defined as the ratio of the number of changed edges connected to node i to the node degree of the previous snapshot. (i,t) .

[0042] The temporal embeddings, relational embeddings, periodic features, and topology change intensity of each port are input into a gated fusion network. The gated fusion network outputs a dynamic weight vector, which adjusts the contribution ratio of relational embeddings and periodic features in the fusion process. The relational embeddings and periodic features are weighted according to the dynamic weight vector, combined with the temporal embeddings, and normalized to obtain the fused features. The dynamic weight vector output by the gated fusion network adaptively changes with the topology change intensity. Furthermore, this gated fusion network can learn the importance weights of relational embeddings and periodic features based on the input temporal embeddings, relational embeddings, periodic features, and topology change intensity through a gating mechanism, or it can use an attention mechanism to calculate their relative importance. When the topology change intensity is large, the contribution weight of relational embeddings is suppressed, while the contribution weight of periodic features is correspondingly increased.

[0043] Step 105: Perform traffic prediction based on the fusion features to obtain the predicted value.

[0044] In this step, the fused features are input into a fully connected network, which then outputs the predicted traffic values ​​for each port at future times.

[0045] As an example of an embodiment of the present invention, the historical traffic sequence of each port is obtained; For each port, outliers in the historical traffic sequence are removed to obtain the first traffic sequence. Based on a preset time step, the historical flow values ​​within each preset time step in the first flow sequence are selected and averaged to obtain the second flow sequence, wherein the time step of each second flow sequence is a preset time step. The missing values ​​in the second flow sequence are processed by linear interpolation to obtain the third flow sequence; In the third flow sequence, sliding window data is determined based on historical flow values ​​within a preset time window.

[0046] In this embodiment, a traffic dataset including historical traffic sequences of each port is obtained, outliers in the traffic dataset are removed, and traffic abrupt changes caused by noise interference are eliminated to obtain a first traffic sequence. This application does not limit the specific implementation of outlier removal; any existing anomaly detection and removal methods can be applied to this application.

[0047] The subsequence after outlier removal is resampled according to a preset time step. Preferably, with a time step of half an hour, multiple flow values ​​within each half-hour window are averaged to align the data from each port to a uniform time granularity. This application does not limit the specific implementation of the above averaging operation; any method that can convert a non-uniform time series into a uniform time granularity can be applied to this application. For example, the average flow value for each half-hour is calculated as follows: ; in, This is the average flow rate every half hour. It is the first Traffic volume over an hour and a half. It is the first The number of traffic values ​​taken within one and a half hours.

[0048] Missing values ​​that persist after resampling are filled using linear interpolation. The linear interpolation is calculated as follows: ; in, Is The interpolation result at point , assuming there are two points and They are respectively Flow value at any time ,and Flow value at any time , The result calculated after linear interpolation Flow rate at any given moment.

[0049] The sequence that has undergone anomaly removal, unified time granularity alignment, and missing value imputation is used as the third flow sequence. Within the third flow sequence, sliding window data is determined based on historical flow values ​​within a preset time window.

[0050] As an example of an embodiment of the present invention, the autocorrelation coefficient of each port in at least one preset period is calculated based on the third traffic sequence; For each preset period, if the autocorrelation coefficient is greater than the preset threshold, the preset period is determined to be a valid period. Based on the effective period, select the historical flow value corresponding to each time step in the third flow sequence, and determine the periodic characteristics based on the historical flow value corresponding to each time step.

[0051] In this embodiment, if the time step of the third flow sequence is half an hour, the candidate day period P in the preset period is... d For 48 time steps, candidate cycle P w The process involves 336 time steps; based on the third flow sequence, the autocorrelation coefficient of each port is calculated over at least one preset period. This application does not limit the specific calculation method of the autocorrelation coefficient; any existing correlation measurement methods can be applied to this application.

[0052] For each preset period, if the autocorrelation coefficient is greater than a preset threshold, the preset period is determined to be a valid period for that port; if the autocorrelation coefficient does not exceed the preset threshold, the preset period is not considered a valid period for that port. The preset threshold can be set by those skilled in the art according to the actual application scenario and accuracy requirements, and this application does not limit it in this regard.

[0053] Based on the effective period, the historical flow value corresponding to each time step is determined in the third flow sequence. Specifically, for each time step, the current time is subtracted from the lag step size corresponding to the effective period to obtain the reference time. The flow value of the reference time is obtained from the third flow sequence as the periodic reference value for that time step, and the periodic reference value of each time step is used as the periodic feature of that time step.

[0054] Preferably, the periodic feature also includes a periodic data validity mask. The periodic data validity mask is used to set the corresponding periodic feature to 0 and identify it by the mask when the autocorrelation coefficient of a candidate period is lower than a preset threshold or the periodic lag value is missing, so that the model does not misjudge the missing value as low flow.

[0055] As an example of an embodiment of the present invention, the sliding window data includes the historical flow value of each time step and the flow difference value between adjacent time steps; Based on the sliding window data and periodic features, the temporal dependencies are extracted to obtain the temporal embedding of each port, specifically: For each port, the sliding window data and periodic features are sequentially input into a preset gated loop unit according to time steps. At each time step, the gated loop unit updates the current hidden state based on the historical traffic value of the current time step, the traffic difference value of adjacent time steps, the hidden state of the previous time step, and the periodic features of the current time step. The hidden state of the last time step is taken as the time-series embedding.

[0056] In this embodiment, for each port, the sliding window data and periodic features are aligned by time step and then sequentially input into a preset gated loop unit in time step order. The input vector for each time step includes the flow rate value of the current time step, the flow rate difference value of the adjacent time step, the difference between the flow rate value of the current time step and the daily cycle reference value, the weekly cycle reference value, the data validity identifier, and the port online status identifier. Each port shares the parameters of the gated loop unit, but each port independently maintains a hidden state.

[0057] matrix Let represent the input characteristics of any port, where Representing feature dimension, Indicates the length of the sequence, if there are If there are ports, then the input feature matrix is .

[0058] port time step Input features Input the GRU (Gated Recurrent Unit) network and remove the last hidden state. As a port time step Traffic timing embedding , Simultaneously characterizing short-term changes, long-term dependencies, and the degree of cyclical deviation, all ports at the time step... The traffic time-series embeddings constitute a time-series embedding matrix, represented as: ; in, , Indicates the embedding size (i.e.) (This is the number of hidden units in the GRU).

[0059] Specifically, the GRU network updates the hidden state at each time step using a reset gate and an update gate. The reset gate is based on the input features of the current time step. The hidden state of the previous time step The reset gate signal is calculated. The reset gating signal is used to control the degree to which the hidden state from the previous time step is forgotten; the calculation process for the reset gate is as follows: ; in, This is the weight matrix for resetting the gate; this weight matrix is ​​used to... and The concatenated matrix undergoes a linear transformation, and the product of the two matrices is fed into a sigmoid function to obtain the reset gating signal. .

[0060] Based on the reset gate signal Hidden state of the previous time step After resetting, the input features of the current time step are combined. The candidate hidden state is calculated. The calculation process for the candidate hidden state is as follows: ; Among them, the previous hidden state h (t-1) It is the hidden state matrix H (t-1) The row vector corresponding to node i is concatenated with the input vector of node i at time t according to the feature dimension and then multiplied by the reset gate weight matrix.

[0061] The update gate is based on the input features at the current time step. The hidden state of the previous time step The updated gating signal is calculated. The update gate signal is used to control the extent to which the hidden state from the previous time step is retained in the current time step; the calculation process of the update gate is as follows: ; in, It is the weight matrix of the updated gate.

[0062] According to the updated gate control signal In the candidate hidden state Hidden state compared to the previous time step We perform a weighted combination to obtain the hidden state at the current time step. .

[0063] ; in, The closer to 1, the more data is remembered; the closer to 0, the more data is forgotten.

[0064] As an example of an embodiment of the present invention, each temporal embedding is used as the initial node feature, and the current topology matrix is ​​used as the graph propagation structure for neighborhood message propagation to obtain the relationship embedding of each port, specifically: The initial node features of each port are stacked according to a preset port order to obtain an initial feature matrix; Add self-connects to the topological matrix to obtain an intermediate matrix, and perform symmetric normalization based on the node degree of each element in the intermediate matrix to obtain the propagation matrix. Multiply the initial feature matrix by the propagation matrix to complete one layer of neighborhood message propagation and obtain the next feature matrix for each port; Repeatedly perform multi-layer propagation to obtain the feature matrix of each layer, and then perform weighted summation on the feature matrices of each layer to obtain the relationship embedding of each port.

[0065] In this embodiment, the relationship between two ports in the network is encoded as a multi-hot binary vector. Represent the relationships between all ports as an adjacency matrix. , This refers to the number of port relationship types. This invention only considers port topology connection relationships, therefore... ,Right now The adjacency matrix represents the connectivity relationships in the graph. Line number The elements of the column are , representing a node and nodes Are there any edges connecting them?

[0066] At time t, the GRU timing embeddings of all ports are stacked into H according to a fixed node number. (t) Let E be the feature matrix of the 0th layer node of LightGCN (Light Graph Convolutional Network). (0,t) =H (t) Adding self-joins to the dynamic adjacency matrix yields an intermediate matrix. Then, the intermediate matrix is ​​symmetrically normalized according to the node degree to obtain the propagation matrix S. (t) .

[0067] The (l+1)th layer performs neighborhood message propagation to obtain the next feature matrix E of the next layer. (l+1,t) =S (t) E (l,t) This invention does not require additional feature transformation matrices or nonlinear activations to reduce oversmoothing and parameter perturbations during topology changes. Specifically, given a node (port)... Its neighbor node set is Then the node The update rule can be expressed as: ; in, It is a node In the The layer's feature representation is where u is a neighboring node of node i.

[0068] N i Represents dynamic topology snapshot A (t) The set of neighboring nodes of node i; when aggregating the information of node u, N u This represents the set of neighboring nodes of node u in the same snapshot. They are distinguished by their node indices and both are updated with sampling time t.

[0069] Applying the above update rules to all nodes allows us to construct a graph convolutional layer. Assume we have... The nth convolutional kernel, then the nth... The node features of a layer can be represented as: ; in, It is the first The node feature matrix of the layer It is an angle-number matrix. Compared to GCN, LightGCN uses a simple weighted sum aggregator instead of feature transformations and nonlinear activations.

[0070] The feature matrices of nodes from layer 0 to layer K are weighted according to learnable and normalized layer weights to obtain the relation embedding r. (i,t) Therefore, r (i,t)It is not generated solely from static topology, but rather from the propagation results of the current GRU timing embedded in the current dynamic topology; GRU first characterizes the periodicity and time dependence of the node itself, and LightGCN then characterizes the traffic coupling between adjacent ports at the same time.

[0071] Preferably, when performing this traffic forecast, A is used (t) Compared to the A used in the last traffic forecast (t-1) When they are different, change B comes first. (t) Determine the set of affected nodes formed by the two ends of the changed edge and their K-hop neighborhoods, and recalculate only the adjacency index and normalization coefficient corresponding to this set; nodes outside the set reuse the structural coefficients of the previous snapshot, but the message content still uses the current H. (t) This incremental update method avoids repeatedly normalizing unchanged topologies without missing current traffic changes.

[0072] As an example of an embodiment of the present invention, a gating vector is determined based on the temporal embedding, relational embedding, periodic features, and topological change intensity of each port, and the temporal embedding, relational embedding, and periodic features are fused based on the gating vector to obtain fused features, specifically as follows: The temporal embedding, relational embedding, periodic features, and topological change intensity of each port are input into the gating network to obtain the gating vector; By utilizing the contribution of the relation embedding modulated dimensionally by the gate vector, and by utilizing the contribution of the complementary amount of the gate vector modulated dimensionally by the periodic features, the modulated relation embedding and the modulated periodic features are obtained respectively. The modulated relational embedding and the modulated periodic features are added to the temporal embedding and then normalized to obtain the fused features.

[0073] In this embodiment, for node i, h (i,t) r (i,t) Periodic characteristics p (i,t) The intensity of topological change, c (i,t) The data validity mask is concatenated and then input into the gating network to obtain a gating vector g with values ​​ranging from 0 to 1. (i,t) Gating vector g (i,t) The contribution of the current relation embedding to the prediction is adjusted dimension-wise; when the topology has just changed or neighbor data is missing, the gating network can adjust the prediction based on c. (i,t) The validity mask suppresses unreliable propagation components, and the relation embedding weight is increased only after the continuous snapshots have stabilized.

[0074] fused vectors according to f (i,t) =LayerNorm[h (i,t) +g (i,t) ⊙W r ·r (i,t)+(1-g (i,t) )⊙W p ·p (i,t) ]Calculate, where W r and W p This is used to map relational embeddings and periodic features to the same dimension as temporal embeddings, where ⊙ represents element-wise multiplication. This residual-gated fusion preserves the temporal information of the nodes themselves and does not use unconditional direct concatenation of temporal and relational embeddings.

[0075] As an example of an embodiment of the present invention, the prediction model includes GRU, LightGCN, a gated network, and a fully connected prediction layer. The above-described GRU encoding, LightGCN propagation, gated fusion, and traffic prediction steps constitute an end-to-end joint prediction model. A single forward propagation sequentially executes GRU encoding, dynamic LightGCN propagation, gated fusion, and multi-step traffic prediction. The prediction loss is backpropagated through the same computation graph to jointly update the weights of the GRU and LightGCN layers, the gated network, and the multilayer perceptron parameters.

[0076] The training samples are organized according to the prediction starting point, and each training sample contains: sliding window data, periodic features, and the topology matrix A at the current time step. (t) and the topological matrix and transformation matrix B of the previous time step. (t) And the actual traffic values ​​at future moments. The training samples are divided into training set, validation set and test set in chronological order, without randomly shuffling the time order across sets, to avoid future information leakage.

[0077] During the training of the prediction model, the mean squared error (MSE) is used as the loss function, which is expressed as follows: ; in, It is the sample size. This is the actual traffic value. This corresponds to the predicted traffic value. A masked weighted mean squared error can be used: samples without true values ​​or ports that are offline are not included in the loss calculation; samples with topology changes are assigned a higher weight than samples with stable topology, for example, the weight of samples with topology changes is set to 1+βc. (i,t) Samples whose period deviation exceeds the training set quantile threshold are given a weight η to prevent the training process from being dominated by a large number of stable period samples.

[0078] During training, the Adam optimizer is used to optimize the model parameters. A learning rate is set, and backpropagation is performed to calculate the first and second moment estimates of the gradients to adaptively adjust the learning rates of each parameter. During training, each forward propagation sequentially performs temporal embedding extraction, relational embedding extraction, gated fusion, and traffic prediction. The prediction loss is backpropagated through the same computation graph to jointly update the parameters of the GRU, LightGCN layer weights, gated network, and fully connected prediction layer.

[0079] The Adam optimizer and gradient clipping are used. The errors of the stable topology validation subset and the topology change validation subset are calculated separately. Training is stopped when the weighted error of both sets of errors does not decrease for p consecutive rounds, and the joint model with the minimum validation error is saved.

[0080] After training, the input data at the time to be predicted is fed into the joint prediction model, and a forward propagation is performed to obtain the traffic prediction values ​​for each port at future times. This application does not limit the specific deployment method of the prediction model; for example, it can be deployed on a cloud server, edge computing node, or terminal device for operation and control of the power distribution communication network.

[0081] As an example of an embodiment of the present invention, traffic prediction is performed based on fusion features to obtain a predicted value, specifically as follows: Based on the time to be predicted and the effective period, the corresponding historical flow value is selected from the third flow sequence as the period baseline value; The fused features are input into a multilayer perceptron to obtain the residual prediction values; After adding the periodic baseline and the residual prediction value, and then performing a non-negative mapping, the prediction value of each port at the time to be predicted is obtained.

[0082] In this embodiment, for the prediction step size q, a periodic baseline b is formed based on the weighted sum of daily and weekly periodic values. (i,t+q) , fusion vector f (i,t) The residual Δy is obtained by inputting two layers of multilayer perceptron. (i,t+q) The final predicted value is the non-negative mapping Softplus[b (i,t+q) +Δy (i,t+q) Therefore, the fully connected prediction layer learns the deviation from the periodic baseline, which preserves the stable periodic pattern and can correct abrupt changes by dynamic topological relationships.

[0083] The present invention has the following advantages and effects compared with the prior art: Considering that power distribution communication networks can be naturally represented as graph structures, where each device port corresponds to a node in the graph, this invention further expands the scope of the prediction model by introducing consideration of the topological characteristics of the network structure to focus on the interactions between nodes in the network. In power distribution communication networks, each port has its own time-series traffic data; therefore, prediction requires analysis of long-term traffic data, and the data of connected ports in the topology should exhibit relationships. Therefore, this invention utilizes GRU and LightGCN to mine the spatial and temporal relationships between power distribution communication devices, thereby predicting future data of the power distribution communication network. This method helps improve the accuracy of the model's prediction results.

[0084] Furthermore, by using time-aligned dynamic topology snapshots under fixed node numbers, the neighborhood propagation path can be changed in a timely manner when links are switched over or ports are online or offline; repetitive patterns and abnormal deviations are separated by periodic baselines and GRU residual coding; the topology change perception gating layer restricts the propagation of unreliable relationship information; and joint training enables the temporal coding parameters, graph propagation layer weights, and prediction layer to be collaboratively optimized around the same traffic error, thereby improving the prediction stability during topology change periods and periodic peak and valley periods.

[0085] The preferred parameters for this invention are L=48 and P. d =48、P w =336, K=2, prediction step size H=1 to 4, β=1.

[0086] like Figure 2 As shown, based on the above-described method embodiments, an embodiment of the present invention provides a traffic prediction system 200, including: an acquisition module 201, a time series module 202, a topology module 203, a fusion module 204, and a prediction module 205; The acquisition module 201 is used to acquire the sliding window data and periodic characteristics of each port, and to acquire the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. The timing module 202 is used to extract timing dependencies based on sliding window data and periodic features to obtain the timing embedding of each port; Topology module 203 is used to propagate neighborhood messages using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure to obtain the relationship embedding of each port. The fusion module 204 is used to calculate the degree of change in the connection state based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; determine the gating vector based on the temporal embedding, relational embedding, periodic features and topology change intensity of each port; and fuse the temporal embedding, relational embedding and periodic features based on the gating vector to obtain the fused features. The prediction module 205 is used to predict traffic based on the fusion features and obtain the predicted value.

[0087] Furthermore, the system is also used for: Obtain historical traffic sequences for each port; For each port, outliers in the historical traffic sequence are removed to obtain the first traffic sequence. Based on a preset time step, the historical flow values ​​within each preset time step in the first flow sequence are selected and averaged to obtain the second flow sequence, wherein the time step of each second flow sequence is a preset time step. The missing values ​​in the second flow sequence are processed by linear interpolation to obtain the third flow sequence; In the third flow sequence, sliding window data is determined based on historical flow values ​​within a preset time window.

[0088] Furthermore, the system is also used to: calculate the autocorrelation coefficient of each port over at least one preset period based on the third traffic sequence; For each preset period, if the autocorrelation coefficient is greater than the preset threshold, the preset period is determined to be a valid period. Based on the effective period, select the historical flow value corresponding to each time step in the third flow sequence, and determine the periodic characteristics based on the historical flow value corresponding to each time step.

[0089] Furthermore, the timing module 202 is also used for: For each port, the sliding window data and periodic features are sequentially input into a preset gated loop unit according to time steps. At each time step, the gated loop unit updates the current hidden state based on the historical traffic value of the current time step, the traffic difference value of adjacent time steps, the hidden state of the previous time step, and the periodic features of the current time step. The hidden state of the last time step is taken as the time-series embedding.

[0090] Furthermore, topology module 203 is also used for: The initial node features of each port are stacked according to the preset port order to obtain the initial feature matrix; Add self-connects to the topological matrix to obtain an intermediate matrix, and perform symmetric normalization based on the node degree of each element in the intermediate matrix to obtain the propagation matrix. Multiply the initial feature matrix by the propagation matrix to complete one layer of neighborhood message propagation and obtain the next feature matrix for each port; Repeat the multi-layer propagation to obtain the feature matrix of each layer, and then perform a weighted summation of the feature matrices of each layer to obtain the relationship embedding of each port.

[0091] Furthermore, the fusion module 204 is also used for: The temporal embedding, relational embedding, periodic features, and topological change intensity of each port are input into the gating network to obtain the gating vector; By utilizing the contribution of the relation embedding modulated dimensionally by the gate vector, and by utilizing the contribution of the complementary amount of the gate vector modulated dimensionally by the periodic features, the modulated relation embedding and the modulated periodic features are obtained respectively. The modulated relational embedding and the modulated periodic features are added to the temporal embedding and then normalized to obtain the fused features.

[0092] Furthermore, the prediction module 205 is also used for: Based on the time to be predicted and the effective period, the corresponding historical flow value is selected from the third flow sequence as the period baseline value; The fused features are input into a multilayer perceptron to obtain the residual prediction values; After adding the periodic baseline and the residual prediction value, and then performing a non-negative mapping, the prediction value of each port at the time to be predicted is obtained.

[0093] It is understood that the above system embodiments correspond to the method embodiments of the present invention, and can implement all the implementation methods of any of the above method embodiments of the present invention, which will not be repeated here.

[0094] It should be noted that the system embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0095] Based on the above embodiments of the traffic prediction method, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the traffic prediction method of any of the above embodiments of the present invention, the steps of which include: Obtain the sliding window data and periodic characteristics of each port, and obtain the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. Temporal dependencies are extracted based on sliding window data and periodic features to obtain the temporal embedding of each port; Using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained. The degree of change in the connection state is calculated based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; the gating vector is determined based on the temporal embedding, relational embedding, periodic features and topology change intensity of each port, and the temporal embedding, relational embedding and periodic features are fused based on the gating vector to obtain the fused features; Traffic is predicted based on the fusion characteristics to obtain the predicted value.

[0096] Furthermore, the steps also include: Obtain historical traffic sequences for each port; For each port, outliers in the historical traffic sequence are removed to obtain the first traffic sequence. Based on a preset time step, the historical flow values ​​within each preset time step in the first flow sequence are selected and averaged to obtain the second flow sequence, wherein the time step of each second flow sequence is a preset time step. The missing values ​​in the second flow sequence are processed by linear interpolation to obtain the third flow sequence; In the third flow sequence, sliding window data is determined based on historical flow values ​​within a preset time window.

[0097] Furthermore, the steps also include: Based on the third traffic sequence, calculate the autocorrelation coefficient of each port over at least one preset period; For each preset period, if the autocorrelation coefficient is greater than the preset threshold, the preset period is determined to be a valid period. Based on the effective period, select the historical flow value corresponding to each time step in the third flow sequence, and determine the periodic characteristics based on the historical flow value corresponding to each time step.

[0098] Furthermore, based on the sliding window data and periodic features, temporal dependencies are extracted to obtain the temporal embeddings of each port, specifically: For each port, the sliding window data and periodic features are sequentially input into a preset gated loop unit according to time steps. At each time step, the gated loop unit updates the current hidden state based on the historical traffic value of the current time step, the traffic difference value of adjacent time steps, the hidden state of the previous time step, and the periodic features of the current time step. The hidden state of the last time step is taken as the time-series embedding.

[0099] Furthermore, using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained, specifically: The initial node features of each port are stacked according to the preset port order to obtain the initial feature matrix; Add self-connects to the topological matrix to obtain an intermediate matrix, and perform symmetric normalization based on the node degree of each element in the intermediate matrix to obtain the propagation matrix. Multiply the initial feature matrix by the propagation matrix to complete one layer of neighborhood message propagation and obtain the next feature matrix for each port; Repeat the multi-layer propagation to obtain the feature matrix of each layer, and then perform a weighted summation of the feature matrices of each layer to obtain the relationship embedding of each port.

[0100] Furthermore, a gating vector is determined based on the temporal embedding, relational embedding, periodic features, and topological change intensity of each port. The temporal embedding, relational embedding, and periodic features are then fused using the gating vector to obtain the fused features, specifically: The temporal embedding, relational embedding, periodic features, and topological change intensity of each port are input into the gating network to obtain the gating vector; By utilizing the contribution of the relation embedding modulated dimensionally by the gate vector, and by utilizing the contribution of the complementary amount of the gate vector modulated dimensionally by the periodic features, the modulated relation embedding and the modulated periodic features are obtained respectively. The modulated relational embedding and the modulated periodic features are added to the temporal embedding and then normalized to obtain the fused features.

[0101] Furthermore, traffic prediction is performed based on the fusion characteristics to obtain the predicted value, specifically: Based on the time to be predicted and the effective period, the corresponding historical flow value is selected from the third flow sequence as the period baseline value; The fused features are input into a multilayer perceptron to obtain the residual prediction values; After adding the periodic baseline and the residual prediction value, and then performing a non-negative mapping, the prediction value of each port at the time to be predicted is obtained.

[0102] For example, in this embodiment, the computer program can be divided into one or more modules, one or more modules are stored in memory and executed by a processor to complete the present invention. One or more module elements can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a terminal device.

[0103] Terminal devices can be computing devices such as desktop computers, laptops, handheld computers, and cloud servers. Terminal devices may include, but are not limited to, processors and memory.

[0104] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device through various interfaces and lines.

[0105] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the traffic prediction method of any of the above-described method embodiments of the present invention, the steps of which include: Obtain the sliding window data and periodic characteristics of each port, and obtain the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. Temporal dependencies are extracted based on sliding window data and periodic features to obtain the temporal embedding of each port; Using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained. The degree of change in the connection state is calculated based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; the gating vector is determined based on the temporal embedding, relational embedding, periodic features and topology change intensity of each port, and the temporal embedding, relational embedding and periodic features are fused based on the gating vector to obtain the fused features; Traffic is predicted based on the fusion characteristics to obtain the predicted value.

[0106] Furthermore, the steps also include: Obtain historical traffic sequences for each port; For each port, outliers in the historical traffic sequence are removed to obtain the first traffic sequence. Based on a preset time step, the historical flow values ​​within each preset time step in the first flow sequence are selected and averaged to obtain the second flow sequence, wherein the time step of each second flow sequence is a preset time step. The missing values ​​in the second flow sequence are processed by linear interpolation to obtain the third flow sequence; In the third flow sequence, sliding window data is determined based on historical flow values ​​within a preset time window.

[0107] Furthermore, the steps also include: Based on the third traffic sequence, calculate the autocorrelation coefficient of each port over at least one preset period; For each preset period, if the autocorrelation coefficient is greater than the preset threshold, the preset period is determined to be a valid period. Based on the effective period, select the historical flow value corresponding to each time step in the third flow sequence, and determine the periodic characteristics based on the historical flow value corresponding to each time step.

[0108] Furthermore, based on the sliding window data and periodic features, temporal dependencies are extracted to obtain the temporal embeddings of each port, specifically: For each port, the sliding window data and periodic features are sequentially input into a preset gated loop unit according to time steps. At each time step, the gated loop unit updates the current hidden state based on the historical traffic value of the current time step, the traffic difference value of adjacent time steps, the hidden state of the previous time step, and the periodic features of the current time step. The hidden state of the last time step is taken as the time-series embedding.

[0109] Furthermore, using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained, specifically: The initial node features of each port are stacked according to the preset port order to obtain the initial feature matrix; Add self-connects to the topological matrix to obtain an intermediate matrix, and perform symmetric normalization based on the node degree of each element in the intermediate matrix to obtain the propagation matrix. Multiply the initial feature matrix by the propagation matrix to complete one layer of neighborhood message propagation and obtain the next feature matrix for each port; Repeat the multi-layer propagation to obtain the feature matrix of each layer, and then perform a weighted summation of the feature matrices of each layer to obtain the relationship embedding of each port.

[0110] Furthermore, a gating vector is determined based on the temporal embedding, relational embedding, periodic features, and topological change intensity of each port. The temporal embedding, relational embedding, and periodic features are then fused using the gating vector to obtain the fused features, specifically: The temporal embedding, relational embedding, periodic features, and topological change intensity of each port are input into the gating network to obtain the gating vector; By utilizing the contribution of the relation embedding modulated dimensionally by the gate vector, and by utilizing the contribution of the complementary amount of the gate vector modulated dimensionally by the periodic features, the modulated relation embedding and the modulated periodic features are obtained respectively. The modulated relational embedding and the modulated periodic features are added to the temporal embedding and then normalized to obtain the fused features.

[0111] Furthermore, traffic prediction is performed based on the fusion characteristics to obtain the predicted value, specifically: Based on the time to be predicted and the effective period, the corresponding historical flow value is selected from the third flow sequence as the period baseline value; The fused features are input into a multilayer perceptron to obtain the residual prediction values; After adding the periodic baseline and the residual prediction value, and then performing a non-negative mapping, the prediction value of each port at the time to be predicted is obtained.

[0112] Based on the above-described method embodiments, this invention further provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the traffic prediction method of any of the above-described method embodiments, the steps of which include: Obtain the sliding window data and periodic characteristics of each port, and obtain the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. Temporal dependencies are extracted based on sliding window data and periodic features to obtain the temporal embedding of each port; Using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained. The degree of change in the connection state is calculated based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; the gating vector is determined based on the temporal embedding, relational embedding, periodic features and topology change intensity of each port, and the temporal embedding, relational embedding and periodic features are fused based on the gating vector to obtain the fused features; Traffic is predicted based on the fusion characteristics to obtain the predicted value.

[0113] Furthermore, the steps also include: Obtain historical traffic sequences for each port; For each port, outliers in the historical traffic sequence are removed to obtain the first traffic sequence. Based on a preset time step, the historical flow values ​​within each preset time step in the first flow sequence are selected and averaged to obtain the second flow sequence, wherein the time step of each second flow sequence is a preset time step. The missing values ​​in the second flow sequence are processed by linear interpolation to obtain the third flow sequence; In the third flow sequence, sliding window data is determined based on historical flow values ​​within a preset time window.

[0114] Furthermore, the steps also include: Based on the third traffic sequence, calculate the autocorrelation coefficient of each port over at least one preset period; For each preset period, if the autocorrelation coefficient is greater than the preset threshold, the preset period is determined to be a valid period. Based on the effective period, select the historical flow value corresponding to each time step in the third flow sequence, and determine the periodic characteristics based on the historical flow value corresponding to each time step.

[0115] Furthermore, based on the sliding window data and periodic features, temporal dependencies are extracted to obtain the temporal embeddings of each port, specifically: For each port, the sliding window data and periodic features are sequentially input into a preset gated loop unit according to time steps. At each time step, the gated loop unit updates the current hidden state based on the historical traffic value of the current time step, the traffic difference value of adjacent time steps, the hidden state of the previous time step, and the periodic features of the current time step. The hidden state of the last time step is taken as the time-series embedding.

[0116] Furthermore, using each temporal embedding as the initial node feature and the current topology matrix as the graph propagation structure for neighborhood message propagation, the relationship embedding of each port is obtained, specifically: The initial node features of each port are stacked according to a preset port order to obtain an initial feature matrix; Add self-connects to the topological matrix to obtain an intermediate matrix, and perform symmetric normalization based on the node degree of each element in the intermediate matrix to obtain the propagation matrix. Multiply the initial feature matrix by the propagation matrix to complete one layer of neighborhood message propagation and obtain the next feature matrix for each port; Repeatedly perform multi-layer propagation to obtain the feature matrix of each layer, and then perform weighted summation on the feature matrices of each layer to obtain the relationship embedding of each port.

[0117] Furthermore, a gating vector is determined based on the temporal embedding, relational embedding, periodic features, and topological change intensity of each port. The temporal embedding, relational embedding, and periodic features are then fused using the gating vector to obtain the fused features, specifically: The temporal embedding, relational embedding, periodic features, and topological change intensity of each port are input into the gating network to obtain the gating vector; By utilizing the contribution of the relation embedding modulated dimensionally by the gate vector, and by utilizing the contribution of the complementary amount of the gate vector modulated dimensionally by the periodic features, the modulated relation embedding and the modulated periodic features are obtained respectively. The modulated relational embedding and the modulated periodic features are added to the temporal embedding and then normalized to obtain the fused features.

[0118] Furthermore, traffic prediction is performed based on the fusion characteristics to obtain the predicted value, specifically: Based on the time to be predicted and the effective period, the corresponding historical flow value is selected from the third flow sequence as the period baseline value; The fused features are input into a multilayer perceptron to obtain the residual prediction values; After adding the periodic baseline and the residual prediction value, and then performing a non-negative mapping, the prediction value of each port at the time to be predicted is obtained.

[0119] The modules / units integrated into the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0120] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A flow prediction method, characterized in that, include: Obtain the sliding window data and periodic characteristics of each port, and obtain the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. Based on the sliding window data and the periodic features, the temporal dependencies are extracted to obtain the temporal embedding of each port; Using the temporal embeddings described above as initial node features and the current topology matrix as a graph propagation structure for neighborhood message propagation, the relationship embeddings of each port are obtained. The degree of change in the connection state is calculated based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; a gating vector is determined based on the temporal embedding, relational embedding, periodic feature and topology change intensity of each port, and the temporal embedding, relational embedding and periodic feature are fused based on the gating vector to obtain fused features; Traffic prediction is performed based on the fusion features to obtain predicted values.

2. The flow prediction method as described in claim 1, characterized in that, The method further includes: Obtain historical traffic sequences for each port; For each port, outliers in the historical traffic sequence are removed to obtain the first traffic sequence; According to a preset time step, historical flow values ​​within each preset time step are selected in the first flow sequence and averaged to obtain a second flow sequence, wherein the time step of each second flow sequence is a preset time step. The missing values ​​in the second flow sequence are subjected to linear interpolation to obtain the third flow sequence; In the third flow sequence, the sliding window data is determined based on the historical flow values ​​within a preset time window.

3. The flow prediction method as described in claim 2, characterized in that, The method further includes: Based on the third traffic sequence, calculate the autocorrelation coefficient of each port over at least one preset period; For each preset period, if the autocorrelation coefficient is greater than a preset threshold, then the preset period is determined to be a valid period. Based on the effective period, the historical flow value corresponding to each time step is selected in the third flow sequence, and the periodic feature is determined based on the historical flow value corresponding to each time step.

4. The flow prediction method as described in claim 1, characterized in that, in, The sliding window data includes the historical flow value for each time step and the flow difference value between adjacent time steps; The step of extracting the temporal dependency relationship based on the sliding window data and the periodic features to obtain the temporal embedding of each port is specifically as follows: For each port, the sliding window data and the periodic features are sequentially input into a preset gated loop unit according to time steps. The gated loop unit updates the current hidden state at each time step based on the historical traffic value of the current time step, the traffic difference value of adjacent time steps, the hidden state of the previous time step, and the periodic features of the current time step. The hidden state of the last time step is taken as the time-series embedding.

5. The flow prediction method as described in claim 1, characterized in that, The process of using the temporal embeddings as initial node features and the current topology matrix as the graph propagation structure for neighborhood message propagation to obtain the relationship embeddings of each port is as follows: The initial node features of each port are stacked according to the preset port order to obtain the initial feature matrix; Add self-connects to the topology matrix to obtain an intermediate matrix, and perform symmetric normalization based on the node degree of each element in the intermediate matrix to obtain the propagation matrix; Multiply the initial feature matrix by the propagation matrix to complete one layer of neighborhood message propagation and obtain the next feature matrix for each port; Repeat the multi-layer propagation to obtain the feature matrix of each layer, and then perform a weighted summation of the feature matrices of each layer to obtain the relationship embedding of each port.

6. The flow prediction method as described in claim 1, characterized in that, The process involves determining a gating vector based on the temporal embedding, relational embedding, periodic feature, and topological change intensity of each port, and then fusing the temporal embedding, relational embedding, and periodic feature based on the gating vector to obtain a fused feature. Specifically: The temporal embedding, relational embedding, periodic features, and topology change intensity of each port are input into the gating network to obtain the gating vector; The contribution of the relation embedding is modulated dimensionally using the gate vector, and the contribution of the periodic feature is modulated dimensionally using the complementary amount of the gate vector, so as to obtain the modulated relation embedding and the modulated periodic feature respectively. The modulated relational embedding and the modulated periodic feature are added to the temporal embedding and then normalized to obtain the fused feature.

7. The flow prediction method as described in claim 3, characterized in that, The step of predicting traffic based on the fused features to obtain the predicted value is as follows: Based on the time to be predicted and the effective period, a corresponding historical flow value is selected from the third flow sequence as the period baseline value; The fused features are input into a multilayer perceptron to obtain the residual prediction value; After adding the periodic baseline and the residual prediction value, and then performing a non-negative mapping, the prediction value of each port at the time to be predicted is obtained.

8. A flow prediction system, characterized in that, include: The module includes an acquisition module, a time series module, a topology module, a fusion module, and a prediction module. The acquisition module is used to acquire the sliding window data and periodic features of each port, and to acquire the current topology matrix of each port at the current time step and the previous topology matrix at the previous time step. The timing module is used to extract timing dependencies based on the sliding window data and the periodic features to obtain the timing embedding of each port; The topology module is used to use each of the time-series embeddings as initial node features and the current topology matrix as a graph propagation structure to propagate neighborhood messages and obtain the relationship embeddings of each port. The fusion module is used to calculate the degree of change in the connection state based on the current topology matrix and the previous topology matrix to obtain the topology change intensity; determine the gating vector based on the temporal embedding, the relational embedding, the periodic feature and the topology change intensity of each port; and fuse the temporal embedding, the relational embedding and the periodic feature based on the gating vector to obtain the fused feature. The prediction module is used to predict traffic based on the fusion features and obtain a predicted value.

9. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the traffic prediction method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the traffic prediction method as described in any one of claims 1-7.