Traffic prediction method, electronic device and computer readable storage medium

By calculating and optimizing the Laplace matrix to reflect the characteristics of traffic sections and inputting the traffic prediction model, the problem of low traffic prediction accuracy is solved and higher traffic prediction accuracy is achieved.

CN119229659BActive Publication Date: 2025-04-29CHINA MOBILE INFORMATION SYST INTEGRATION CO LTD +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411763384.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-29
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

The accuracy of traffic forecast results in the prior art is not high, and it is difficult to effectively alleviate urban congestion.

Method used

By obtaining the historical traffic data of the target traffic section, the first Laplace matrix and the second Laplace matrix are calculated, the characteristics of the traffic section are reflected from different relationship dimensions, and these matrices are optimized based on the target residual matrix, and finally input them into the traffic prediction model for prediction.

Benefits of technology

It improves the accuracy and accuracy of traffic prediction, solves the problem of low accuracy of traffic prediction results, and can more comprehensively capture the road characteristics of traffic sections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229659B_ABST
    Figure CN119229659B_ABST
Patent Text Reader

Abstract

The present application discloses a traffic prediction method, an electronic device and a computer-readable storage medium, which belong to the field of computers. The method includes: obtaining historical traffic data of a target traffic section within a historical time period; obtaining a first Laplace matrix and a second Laplace matrix based on the historical traffic data; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions; obtaining a first target Laplace matrix based on the first Laplace matrix and the target residual matrix; obtaining a second target Laplace matrix based on the second Laplace matrix and the target residual matrix; inputting the first target Laplace matrix and the second target Laplace matrix into the target traffic prediction model respectively to obtain a traffic prediction result. The method is used for traffic flow prediction, which solves the problem of low accuracy of traffic prediction results in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computers, and specifically relates to a traffic prediction method, an electronic device, and a computer-readable storage medium. Background Art

[0002] At present, modern cities are gradually developing into smart cities, and intelligent transportation systems are an indispensable part of smart cities. Among them, traffic prediction is an important part of intelligent transportation systems. In practical applications, accurate traffic prediction results are crucial. For example, traffic flow prediction can effectively help alleviate urban congestion.

[0003] In the process of traffic prediction, the relevant technology has the problem that the accuracy of traffic prediction results is not high. Summary of the invention

[0004] The embodiments of the present application provide a traffic prediction method, an electronic device, and a computer-readable storage medium, which can solve the problem of low accuracy of traffic prediction results existing in related technologies.

[0005] In a first aspect, an embodiment of the present application provides a traffic prediction method, the method comprising:

[0006] Obtain historical traffic data of the target traffic section within a historical time period;

[0007] Based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions;

[0008] Based on the first Laplace matrix and the target residual matrix, a first target Laplace matrix is ​​obtained;

[0009] Based on the second Laplace matrix and the target residual matrix, a second target Laplace matrix is ​​obtained;

[0010] The first target Laplace matrix and the second target Laplace matrix are respectively input into a target traffic prediction model to obtain a traffic prediction result.

[0011] In a second aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0012] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed, the steps of the method described in the first aspect are implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method described in the first aspect.

[0014] At least one of the above technical solutions provided in the embodiments of the present application can achieve the following technical effects:

[0015] In an embodiment of the present application, historical traffic data of a target traffic section within a historical time period is obtained; based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions; based on the first Laplace matrix and the target residual matrix, a first target Laplace matrix is ​​obtained; based on the second Laplace matrix and the target residual matrix, a second target Laplace matrix is ​​obtained; the first target Laplace matrix and the second target Laplace matrix are respectively input into a target traffic prediction model to obtain a traffic prediction result. In this way, after obtaining the first Laplace matrix and the second Laplace matrix based on the historical traffic data of the target traffic section, the first target Laplace matrix and the second target Laplace matrix can be obtained based on the target residual matrix, the first Laplace matrix and the second Laplace matrix, and the first target Laplace matrix and the second target Laplace matrix are input into the target traffic prediction model for traffic prediction. This method no longer performs traffic prediction based on a fixed Laplace matrix and has a better traffic prediction effect. At the same time, the first Laplace matrix and the second Laplace matrix reflect the characteristics of the target traffic section from different relationship dimensions. The first Laplace matrix and the second Laplace matrix can more comprehensively capture the road characteristics of the target traffic section, improve the accuracy of traffic prediction, and solve the problem of low accuracy of traffic prediction results in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 is a flow chart of a traffic prediction method provided by an embodiment of the present application;

[0018] Figure 2-1 is a schematic diagram of a low-order graph provided in an embodiment of the present application;

[0019] Figure 2-2 is a schematic diagram of a hypergraph association matrix provided in an embodiment of the present application;

[0020] Figure 3 is a flow chart of another traffic prediction method provided by an embodiment of the present application;

[0021] Figure 4 is a flow chart of another traffic prediction method provided by an embodiment of the present application;

[0022] Figure 5 is a schematic diagram of a target traffic prediction model provided in an embodiment of the present application;

[0023] Figure 6 is a schematic diagram of a training phase of a target traffic prediction model provided in an embodiment of the present application;

[0024] Figure 7 It is a specific flow chart of a traffic prediction method provided by an embodiment of the present application;

[0025] Figure 8 is a structural block diagram of a traffic prediction device provided in an embodiment of the present application;

[0026] Fig. 9 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0029] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] The traffic prediction method provided in the embodiment of the present application is applied to the traffic flow prediction situation. Specifically, a first Laplace matrix and a second Laplace matrix reflecting the characteristics of the target traffic section from different relationship dimensions are obtained, the first Laplace matrix and the second Laplace matrix are optimized based on the target residual matrix to obtain a first target Laplace matrix and a second target Laplace matrix, and then the first target Laplace matrix and the second target Laplace matrix are input into the target traffic prediction model to perform traffic flow prediction.

[0031] The traffic prediction method provided in the embodiment of the present application can be executed by a target device, wherein the target device can be one electronic device or multiple electronic devices. That is to say, the traffic prediction method provided in the embodiment of the present application can be executed by one electronic device, wherein the electronic device can be a terminal device such as a desktop computer, a laptop computer, a mobile phone, a tablet, etc., or a server, such as an independent physical server, a server cluster composed of multiple servers, and a cloud server capable of cloud computing. In the case where the traffic prediction method provided in the embodiment of the present application is executed by multiple electronic devices, these multiple electronic devices can form a service cluster, which cooperate with each other to complete each step.

[0032] The traffic prediction method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0033] See also Figure 1 , Figure 1 : is a flow chart of a traffic prediction method provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0034] Step 110: Obtain historical traffic data of the target traffic section within a historical time period.

[0035] In the embodiment of the present application, the historical traffic data includes at least one of vehicle speed, vehicle flow rate and lane occupancy. In an actual road network, N detection points are set on the target traffic section to obtain traffic data of the section where the detection points are located. The historical time period can be selected arbitrarily, such as one hour, one day or one week.

[0036] Specifically, each detection point on the target traffic section can be regarded as a node in the target traffic section, and each node is marked, and the traffic data corresponding to each node is cleaned and normalized. Then, according to the data dimension (vehicle speed, vehicle flow rate and lane occupancy), the data value is selected at a fixed time interval to obtain the historical time series data of traffic data of different dimensions of each node. The historical time series data of traffic data of different dimensions of all nodes on the target traffic section is the historical traffic data of the road network vehicle information on the target traffic section.

[0037] Among them, N detection points can be regarded as N nodes, and the historical time series data of traffic data of different dimensions of N nodes can be expressed as X, , , represents the historical time series data of different dimensions of the i-th node in the target traffic section, N represents the number of detection points in the target traffic section, and F represents the number of dimensions of traffic data recorded by each node at each time point. For example, the following dimensions of traffic data can be recorded: vehicle speed, vehicle flow speed, and lane occupancy, that is, the number of dimensions is 3.

[0038] For the historical time series data of different dimensions at the i-th detection point , Wherein, P represents the number of time points recorded in the historical time period, Represents the historical time series data of different dimensions obtained at the i-th detection point at the t-th time point.

[0039] Step 120: Based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions.

[0040] In the embodiment of the present application, the first Laplacian matrix may be obtained by graph-constructing the target traffic section through a low-order graph (e.g., a directed graph or an undirected graph), and the second Laplacian matrix may be obtained by graph-constructing the target traffic section through a high-order graph (e.g., a hypergraph). The target traffic section is graph-constructed through different relationship dimensions to comprehensively capture the characteristics of the target traffic section, thereby more comprehensively and realistically simulating the spatial structure of the road network of the target traffic section.

[0041] Specifically, in one embodiment of the present application, the step 120 of obtaining the first Laplace matrix and the second Laplace matrix based on the historical traffic data includes: determining the adjacency matrix and the hypergraph of the target detection point based on the historical traffic data; the target detection point is a detection point on the target traffic section; determining the first Laplace matrix of the target detection point based on the adjacency matrix of the target detection point; and determining the second Laplace matrix of the target detection point based on the hypergraph of the target detection point.

[0042] In the embodiment of the present application, the target detection points on the target traffic section are taken as nodes, and a low-order graph (directed graph or undirected graph) and a hypergraph between the target detection points can be constructed based on the historical traffic data, and the target detection points include N detection points. Among them, the correlation strength between the two detection points can be determined by the Euclidean distance between the two detection points, and when the correlation strength is greater than the correlation threshold, an edge between the two detection points can be constructed.

[0043] For the construction of a low-order graph, the N detection points can be used as N nodes. First, the connection relationship between the N nodes is determined according to the Euclidean distance between the N nodes (that is, whether there is an edge between any two nodes among the N nodes) to obtain a low-order graph. Figure 2-1 , Figure 2-1 is a schematic diagram of a low-order graph provided in an embodiment of the present application, and the low-order graph may be, for example Figure 2-1 Figure 2. Figure 2-1 As shown, the low-order graph includes 6 nodes (V1, V2, V3, V4, V5, V6) and the connection relationship between the 6 nodes. Then, based on the connection relationship between the N nodes, the adjacency matrix can be obtained by the following formula:

[0044] ;

[0045] in, is the element in the i-th row and j-th column of the adjacency matrix.

[0046] After obtaining the adjacency matrix, the first Laplacian matrix can be determined by the following formula:

[0047] ;

[0048] in, is the identity matrix, , is the first Laplacian matrix, and A is the adjacency matrix.

[0049] For example, in the construction of a hypergraph, a hypergraph consisting of N nodes can be constructed first, and the hypergraph association matrix and the hypergraph node degree matrix corresponding to the hypergraph can be obtained, and the hyperedge degree matrix and the hyperedge weight matrix corresponding to the hyperedges in the hypergraph can be obtained at the same time. Then, based on the hypergraph association matrix, the hypergraph node degree matrix, the hyperedge degree matrix and the hyperedge weight matrix, the second Laplace matrix of the N nodes is determined.

[0050] Specifically, in the process of constructing a hypergraph consisting of N nodes, the strength of the correlation between nodes is measured by the Euclidean distance. For each of the N nodes, the node is taken as the central node, and the K-nearest neighbor classification (KNN) method is used to select K nodes from other nodes as the nearest neighbors of the node, and then these nodes are connected using hyperedges.

[0051] After the hypergraph is constructed, the hypergraph association matrix of the hypergraph is determined. Specifically, represents the hypergraph, V represents a set of N nodes, and E represents a set of hyperedges. The hypergraph association matrix of the hypergraph can be determined by the following formula:

[0052] ;

[0053] in, Used to represent the i-th node, Used to represent the jth hyperedge, Used to represent the element in the i-th row and j-th column in the hypergraph association matrix.

[0054] Please refer to Figure 2-2 , Figure 2-2 is a schematic diagram of a hypergraph association matrix provided in an embodiment of the present application. Figure 2-2 The hypergraph association matrix shown in FIG. After obtaining the hypergraph association matrix, the hypergraph node degree matrix can be determined based on the hypergraph association matrix. In fact, for each of the N nodes, the number of hyperedges connected to the node is calculated, and the number of hyperedges connected to the node can be determined as the degree of the node. Specifically, the hypergraph node degree matrix can be determined in the following way:

[0055] ;

[0056] ;

[0057] in, Used to represent the i-th node The degree of is used to represent the element in the i-th row and j-th column of the hypergraph association matrix, It is used to represent the node degree matrix of the hypergraph, N is the number of nodes, and J is used to represent the number of hyperedges.

[0058] Similar to the way the hypergraph node degree matrix is ​​determined, the hypergraph edge degree matrix can be determined by the following formula:

[0059] ;

[0060] ;

[0061] in, Used to represent the jth hyperedge The degree of is used to represent the element in the i-th row and j-th column of the hypergraph association matrix, It is used to represent the hyperedge degree matrix, N is the number of nodes, and J is used to represent the number of hyperedges.

[0062] In the process of determining the hyperedge weight matrix, for any hyperedge among the J hyperedges, the sum of the Pearson correlation coefficients (PCC) of all nodes contained in the hyperedge can be determined as the weight of the hyperedge. Specifically, the PCC value between any two nodes among the N nodes can be determined by the following PCC formula:

[0063] ;

[0064] in, is a set of N nodes, i and j are any two nodes among the N nodes, , are the historical time series data of different dimensions corresponding to these two nodes. is the data value of the fth dimension of the i-th node at the t-th time point, is the data value of the fth dimension of the jth node at the tth time point, is the average value of the historical time series data of different dimensions corresponding to the i-th node, is the average value of the historical time series data of different dimensions corresponding to the jth node. F is used to represent the number of dimensions of the traffic data recorded by each node at each time point, and P is used to represent the number of time points recorded in the historical time period. Used to represent the PCC value between the i-th node and the j-th node.

[0065] Then, the weight of each of the J hyperedges can be determined by the following formula, and the hyperedge weight matrix can be determined:

[0066] ;

[0067] ;

[0068] in, Used to represent the jth hyperedge The weight of K is the same as N in value, which is the number of nodes. Used to represent the hyperedge weight matrix, Used to represent the PCC value between the i-th node and the k-th node, Used to represent the element in the i-th row and j-th column in the hypergraph association matrix.

[0069] After determining the hypergraph association matrix, the hypergraph node degree matrix, the hyperedge degree matrix, and the hyperedge weight matrix, the second Laplace matrix can be determined by the following formula:

[0070] ;

[0071] in, Used to represent the hyperedge weight matrix, It is used to represent the node degree matrix of the hypergraph, is used to represent the hyper-edge degree matrix, H is used to represent the hypergraph association matrix, Used to represent the second Laplacian matrix.

[0072] Step 130: Obtain a first target Laplacian matrix based on the first Laplacian matrix and the target residual matrix.

[0073] In an embodiment of the present application, the target residual matrix may be a preset residual matrix or a residual matrix obtained by updating the preset residual matrix. Based on the target residual matrix, the first Laplace matrix may be dynamically optimized to obtain a first target Laplace matrix. Specifically, the sum of the first Laplace matrix and the target residual matrix may be determined as the first target Laplace matrix.

[0074] Step 140: Obtain a second target Laplacian matrix based on the second Laplacian matrix and the target residual matrix.

[0075] In an embodiment of the present application, the second Laplacian matrix may be dynamically optimized based on the target residual matrix to obtain a second target Laplacian matrix. Specifically, the sum of the second Laplacian matrix and the target residual matrix may be determined as the second target Laplacian matrix.

[0076] Step 150: Input the first target Laplace matrix and the second target Laplace matrix into a target traffic prediction model respectively to obtain a traffic prediction result.

[0077] In an embodiment of the present application, the traffic prediction result includes traffic data of different dimensions (vehicle speed, vehicle flow rate, and lane occupancy) at K future time points. The target traffic prediction model may be a deep learning model. In order to comprehensively capture the characteristics of the target traffic section, the first Laplace matrix and the second Laplace matrix used to capture the characteristics of the target traffic section from different relationship dimensions may be input into the target traffic prediction model to obtain the traffic prediction result.

[0078] In an embodiment of the present application, historical traffic data of a target traffic section within a historical time period is obtained; based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions; based on the first Laplace matrix and the target residual matrix, a first target Laplace matrix is ​​obtained; based on the second Laplace matrix and the target residual matrix, a second target Laplace matrix is ​​obtained; the first target Laplace matrix and the second target Laplace matrix are respectively input into a target traffic prediction model to obtain a traffic prediction result. In this way, after obtaining the first Laplace matrix and the second Laplace matrix based on the historical traffic data of the target traffic section, the first target Laplace matrix and the second target Laplace matrix can be obtained based on the target residual matrix, the first Laplace matrix and the second Laplace matrix, and the first target Laplace matrix and the second target Laplace matrix are input into the target traffic prediction model for traffic prediction. This method no longer performs traffic prediction based on a fixed Laplace matrix and has a better traffic prediction effect. At the same time, the first Laplace matrix and the second Laplace matrix reflect the characteristics of the target traffic section from different relationship dimensions. The first Laplace matrix and the second Laplace matrix can more comprehensively capture the road characteristics of the target traffic section, improve the accuracy of traffic prediction, and solve the problem of low accuracy of traffic prediction results in related technologies.

[0079] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of another traffic prediction method provided by an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0080] Step 310: Obtain historical traffic data of the target traffic section within a historical time period.

[0081] Step 320: Based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions.

[0082] Step 330: Based on the first Laplacian matrix and the first residual matrix included in the target residual matrix, obtain a first sub-matrix in the first target Laplacian matrix.

[0083] Step 340: Based on the first Laplacian matrix and the second residual matrix included in the target residual matrix, obtain a second sub-matrix in the first target Laplacian matrix.

[0084] In an embodiment of the present application, the target traffic prediction model may include a graph convolutional network (GCN) and a gated recurrent unit (GRU) network. In the process of feature extraction through the GCN network and the GRU network, there are matrices with different spatial attributes. Please refer to the introduction of the GCN network and the GRU network below, which will not be introduced here. In this regard, different graph matrices (such as the first sub-matrix and the second sub-matrix) can be used to process matrices with different spatial attributes (such as the following and ).

[0085] Based on matrices with different spatial attributes, different residual matrices can be customized, that is, the first residual matrix and the second residual matrix can be customized. The sum of the first Laplacian matrix and the first residual matrix can be determined as the first submatrix, and the sum of the first Laplacian matrix and the second residual matrix can be determined as the second submatrix. In addition, the first submatrix and the second submatrix can be matrices obtained after standardization.

[0086] Specifically, in one embodiment of the present application, the first sub-matrix and the second sub-matrix are obtained by the following formula:

[0087] ;

[0088] ;

[0089] ;

[0090] ;

[0091] in, is the first sub-matrix, is the second sub-matrix, is the first Laplacian matrix, is the unnormalized first submatrix, is the unnormalized second submatrix, is the unnormalized first submatrix The degree matrix of is the unnormalized second submatrix The degree matrix of is the first residual matrix, is the second residual matrix.

[0092] Step 350: Based on the second Laplacian matrix and the target residual matrix, a second target Laplacian matrix is ​​obtained, where the target residual matrix includes the first residual matrix and the second residual matrix.

[0093] In the embodiment of the present application, based on the same processing as the first Laplacian matrix, the second Laplacian matrix can be optimized to obtain a second target Laplacian matrix.

[0094] That is, in one embodiment of the present application, the second target Laplacian matrix includes a third submatrix and a fourth submatrix. The step 350 of obtaining the second target Laplacian matrix based on the second Laplacian matrix and the preset target residual matrix includes: obtaining the third submatrix based on the second Laplacian matrix and the first residual matrix; and obtaining the fourth submatrix based on the second Laplacian matrix and the second residual matrix.

[0095] In the embodiment of the present application, the sum of the second Laplacian matrix and the first residual matrix can be determined as the third submatrix, and the sum of the second Laplacian matrix and the second residual matrix can be determined as the fourth submatrix. In addition, the third submatrix and the fourth submatrix can be matrices obtained after normalization.

[0096] Specifically, in one embodiment of the present application, the third sub-matrix and the fourth sub-matrix are obtained by the following formula:

[0097] ;

[0098] ;

[0099] ;

[0100] ;

[0101] in, is the third sub-matrix, is the fourth sub-matrix, is the second Laplacian matrix, is the unnormalized third submatrix, is the unnormalized fourth submatrix, is the unnormalized third submatrix The degree matrix of is the unnormalized fourth submatrix The degree matrix of is the first residual matrix, is the second residual matrix.

[0102] Step 360: Input the first target Laplace matrix and the second target Laplace matrix into a target traffic prediction model respectively to obtain a traffic prediction result, wherein the first target Laplace matrix includes the first sub-matrix and the second sub-matrix.

[0103] In an embodiment of the present application, during the process of feature extraction in the target traffic prediction model, there are matrices of different spatial data, and different first residual matrices and second residual matrices can be customized. The first Laplace matrix and / or the second Laplace matrix are optimized through the first residual matrix and the second residual matrix. The first target Laplace matrix and the second target Laplace matrix obtained in this way are input into the target traffic prediction model, and the traffic prediction result obtained is more accurate.

[0104] See also Figure 4 , Figure 4 FIG. 1 is a flow chart of another traffic prediction method provided by an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:

[0105] Step 410: Obtain historical traffic data of the target traffic section within a historical time period.

[0106] Step 420: Based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions.

[0107] Step 430: Obtain a first target Laplacian matrix based on the first Laplacian matrix and the target residual matrix.

[0108] Step 440: Obtain a second target Laplacian matrix based on the second Laplacian matrix and the target residual matrix.

[0109] Step 450: Input the first target Laplacian matrix into the target traffic prediction model for feature extraction processing to obtain a first processing result, wherein the target traffic prediction model includes a first part and a second part, wherein the first part is used to extract spatial features, and the second part is used to extract temporal features.

[0110] In the embodiments of this application, please refer to Figure 5 , Figure 5 is a schematic diagram of a target traffic prediction model provided in an embodiment of the present application. Figure 5As shown, the target traffic prediction model may include a first part and a second part, wherein the first part includes a GCN network and the second part includes a GRU network. The GCN network may be used to extract spatial features of a data structure (topological graph), and the GRU network may be used to capture dependencies with large intervals in time series data, that is, may be used to extract temporal features.

[0111] like Figure 5 As shown in Figure 1, the first Laplacian matrix used to describe the low-order graph features can be input into the first part (GCN network) of the target traffic prediction model. The following will first introduce the theory of GCN using the low-order graph as an example. It can be expressed as , U is the first Laplacian matrix The matrix composed of the eigenvectors of ,in, is the first Laplacian matrix in descending order According to the theory of GCN, the graph can be convolved in the spectral domain as shown in the following formula:

[0112] ;

[0113] in, is the convolution parameter, is the convolution operation in Fourier space, It is the historical traffic data input into the target traffic prediction model at the tth time point.

[0114] This method is a good way to perform graph convolution, but due to the first Laplacian matrix The decomposition of makes the calculation complexity of the above formula high. Based on this, the present application proposes a method using Chebyshev polynomials as an alternative The approximate model is as follows:

[0115] ;

[0116] in, is the convolution parameter, , is the identity matrix, and is the first Laplacian matrix The largest eigenvalue of . is a Chebyshev polynomial, m=0, 1, ..., M. The Chebyshev polynomial is defined as follows:

[0117] ;

[0118] ;

[0119] ;

[0120] Based on this, the above convolution operation formula can be changed to the following formula:

[0121] ;

[0122] ;

[0123] Therefore, the graph convolution result can be expressed as , Used to represent the convolution operation in the original domain, It is used to represent the convolution operation in the spectral domain. It should be noted that the above process is introduced by taking the feature extraction of the first Laplacian matrix as an example, and the feature extraction of the second Laplacian matrix can refer to the above process, which will not be repeated here.

[0124] Then, the graph convolution result obtained in the first part can be input into the GRU network for event feature extraction. Among them, GRU is a variant of recurrent neural network (RNN). The GRU network is different from the traditional RNN. The characteristic of the GRU network is that each recursive unit can adaptively capture dependencies of different time scales. Specifically, the GRU network can be composed of several parts:

[0125] ;

[0126] ;

[0127] ;

[0128] ;

[0129] In the above formula, is used to represent the Hadamard product (element-wise multiplication) of two matrices, is the historical traffic data of the tth time point input into the target traffic model, It is used to represent the output of the previous GRU unit and is also the input of the current GRU unit. Used to represent the output of the reset gate, Used to indicate that the reset gate The candidate activation of the control, which determines the output of the previous GRU unit degree of forgetfulness. Used to represent the output of the update gate, It is used to represent the output of the current GRU unit and is also the input of the next GRU unit. , , , , and is the parameter of the GRU unit during training, , , For the convenience of description, the above parameters can be abbreviated as W, V and b.

[0130] By combining the GCN network and the GRU network together, it is recorded as the GCGRU (GCN and GRU) model. Specifically, it can be expressed by the following formula:

[0131] ;

[0132] ;

[0133] ;

[0134] ;

[0135] in, , , , Please refer to the above introduction to the GRU network. The parameters of the GCGRU model are the historical traffic data at the tth time point of the input target traffic model. , , and , , It can be simply written as , , bias parameter , It can be simply written as The output of the GCGRU model after combining GCN and GRU is , is the output of the previous GRU unit and also the input of the current GRU unit.

[0136] Through the above method, such as Figure 5 As shown, the first Laplacian matrix can be input into the GCN to extract spatial features. Then, the output of the GCN network can be input into the GRU network to obtain a first processing result.

[0137] In fact, referring to the content of the GCGRU model above, we can know that the first Laplacian matrix of the input GCGRU model is fixed. And for different spatial attributes and , the same Laplace matrix is ​​used, which is not the optimal solution. Different graph matrices can be used for matrices with different spatial attributes, and they can be expressed as the sum of the initial Laplace matrix and the parameterized residual matrix. Specifically, please refer to the introduction of steps 330 to 350 above, which will not be expanded here.

[0138] Step 460: Input the second target Laplace matrix into the target traffic prediction model for feature extraction processing to obtain a second processing result.

[0139] In the embodiment of the present application, based on the same method as in step 450, the second Laplacian matrix used to describe the high-order graph (hypergraph) features can be input into the GCN to extract spatial features. Then, the output of the GCN network can be input into the GRU network to obtain the second processing result. The specific process can refer to the introduction in step 450, which will not be repeated here.

[0140] In one embodiment of the present application, after the first target Laplace matrix and the second target Laplace matrix are respectively input into the target traffic prediction model through steps 450 and 460, the method further includes: updating the target residual matrix to obtain an updated target residual matrix; wherein the updated target residual matrix is ​​used to determine the traffic prediction result at a second time point, and the second time point is after the first time point.

[0141] In the embodiments of this application, please refer to Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a training phase of a target traffic prediction model provided in an embodiment of the present application. Figure 6 As shown in , in the process of traffic prediction, historical traffic data at different time points will be continuously input. In order to solve the shortcomings of the fixed Laplace matrix, we can explore the optimization of the graph matrix (such as , , and ).

[0142] That is to say, after the current input data processing is completed, the target residual matrix can be updated to obtain an updated target residual matrix, and the updated target residual matrix is ​​used to update the graph, that is, Figure 5 The process of updating the graph using the updated target residual matrix can refer to the description of the above steps 340 and 350. After obtaining the optimized updated Laplacian matrix, the , , and Instead of updating the Laplacian matrix before, the following is used , Instead of the original Laplace matrix, it is used as an example for further introduction.

[0143] Based on this, the present application proposes an optimized mixed hypergraph convolution gating model (OMHGCGRU), and the target traffic prediction model may be an OMHGCGRU model. Specifically, refer to the following formula:

[0144] ;

[0145] ;

[0146] ;

[0147] ;

[0148] in, , , , Please refer to the above introduction to the GRU network. The parameters of the OMHGCGRU model are the historical traffic data at the tth time point of the input target traffic model. , , and , , It can be simply written as , , bias parameter , It can be simply written as The output of the OMHGCGRU model is , and To optimize the updated Laplacian matrix, is the output of the previous GRU unit and also the input of the current GRU unit.

[0149] Step 470: Based on the first processing result and the second processing result, obtain a traffic prediction result for a first time point.

[0150] In the embodiment of the present application, the first processing result is the processing result obtained by extracting low-order graph structure features by the target traffic prediction model, and the second processing result is the processing result obtained by extracting high-order graph structure features by the target traffic prediction model. Figure 5As shown, after obtaining the first processing result and the second processing result, the first processing result and the second processing result can be fused, that is, the first processing result and the second processing result are spliced ​​to obtain a target processing result. The target processing result is obtained by encoding the spatial features and temporal features of the high-order graph and the low-order graph by the target traffic prediction model.

[0151] It should be noted that Figure 5 The GCN network and GRU network used to extract low-order graph structure features are the same GCN network and GRU network used to extract high-order graph structure features. Figure 5 It is only used to indicate that low-order graph structure features and high-order graph structure features are processed separately.

[0152] In order to obtain the final traffic prediction results, a feature output layer can be designed to perform traffic prediction, which can use the historical traffic data sequence within the historical time period (from the tth time point to the t+P-1th time point) , to predict the traffic forecast results for the future time period (from t+P-1 time point to t+P+K-1 time point) That is, the traffic data at the future K time points can be predicted by inputting the historical traffic data at the historical P time points, where K is less than or equal to P.

[0153] Among them, the objective function of the feature output layer can refer to the following formula, and the output result of the target traffic prediction model can be input into the feature output layer to obtain the traffic prediction result for the first time point. The first time point is a time point in the future time period (from the t+P-1 time point to the t+P+K-1 time point), which can be recorded as the t+P+kK time point, k=0,...,K-1.

[0154] ;

[0155] in, , is the weight matrix, Used to represent the traffic prediction result at the t+P+kth time point. is the output of the OMHGCGRU model. If the output of the OMHGCGRU model has F features, that is ,So, , , the traffic prediction result of the OMHGCGRU model is .

[0156] To better understand the above process, please refer to Figure 6 ,like Figure 6As shown, by inputting historical traffic data of P time points into the OMHGCGRU model ,OMHGCGRU model output By inputting the output of the OMHGCGRU model into the feature output layer, the traffic prediction results within the next K time points (from t+P-1 time point to t+P+K-1 time point) can be obtained. .

[0157] In the embodiment of the present application, the target traffic prediction model is a trained model. For the acquisition of training data, the historical traffic data of the traffic section (such as the target traffic section) within the historical time period can be obtained, and the historical traffic data of the section can be divided in order according to the number of time points, and the front no less than 60% can be divided into training data, and the rest can be divided into verification data. Then, a sliding window with a time step of P time points can be used to divide the training data and verification data respectively, and each type of data obtains a number of historical time series data containing N nodes at t time points with different data dimensions (vehicle speed, vehicle flow rate and lane occupancy). One of the historical time series data of N nodes from the tth time point to the t+P-1th time point is used as the input data of the model, and another historical time series data of N nodes from the t+Pth to the t+P+K-1th time point of the same data is used as the true value, so that a data sample of a data is obtained. According to the historical time series data of N nodes of each data at P time points in different data dimensions, several data samples of each data are obtained respectively. The training set is a data sample set of training data, and the verification set is a data sample set of verification data.

[0158] In the embodiment of the present application, a loss function as shown in the following formula is established based on the difference between the traffic prediction result output by the OMHGCGRU model and the actual traffic data (true value):

[0159] ;

[0160] Where K is the number of prediction time points, The traffic prediction result at the t+P+kth time point output by the OMHGCGRU model. is the actual traffic data at the t+P+kth time point, and To optimize the updated Laplacian matrix, , and These are the parameters of the OMHGCGRU model. and Both are weight matrices of the OMHGCGRU model.

[0161] like Figure 6 As shown, the traffic prediction results at K time points based on the output of the OMHGCGRU model , and the actual traffic data at K time points, and the loss function is calculated by the above formula. By analyzing the loss function value, the smaller the loss function value, the more accurate the result of the OMHGCGRU model. In the training stage of the OMHGCGRU model, the optimization graph can be learned in a data-driven way to obtain the optimal model parameters of the OMHGCGRU model, which can be used to understand and explore the complex spatiotemporal properties of the evolution of traffic time series data of each traffic section, and at the same time improve the accuracy of traffic data prediction results.

[0162] In an embodiment of the present application, the target traffic prediction model includes a GCN network for extracting spatial features and a GRU network for extracting temporal features. A new spatiotemporal neural network model (OMHGCGRU model) for traffic prediction is constructed to understand and explore the complex spatiotemporal properties of traffic evolution in each road section and provide more accurate traffic prediction results.

[0163] See also Figure 7 , Figure 7 This is a specific flow chart of a traffic prediction method provided by an embodiment of the present application. Figure 7 As shown, the method comprises the following steps:

[0164] Step 710: Obtain historical traffic data of the target traffic section within a historical time period.

[0165] Step 720: Based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions.

[0166] In an embodiment of the present application, the step 720 of obtaining a first Laplace matrix and a second Laplace matrix based on the historical traffic data includes: determining an adjacency matrix and a hypergraph of a target detection point based on the historical traffic data, wherein the target detection point is a detection point on the target traffic section; determining a first Laplace matrix of the target detection point based on the adjacency matrix of the target detection point; and determining a second Laplace matrix of the target detection point based on the hypergraph of the target detection point.

[0167] Step 730: Obtain a first sub-matrix based on the first Laplacian matrix and the first residual matrix.

[0168] In the embodiment of the present application, based on the first Laplacian matrix and the first residual matrix, the first sub-matrix can be obtained by the following formula:

[0169] ;

[0170] ;

[0171] in, is the first sub-matrix, is the first Laplacian matrix, is the unnormalized first submatrix, for The degree matrix of is the first residual matrix.

[0172] Step 740: Obtain a second sub-matrix based on the first Laplacian matrix and the second residual matrix.

[0173] In the embodiment of the present application, based on the first Laplacian matrix and the second residual matrix, the second sub-matrix can be obtained by the following formula:

[0174] ;

[0175] ;

[0176] in, is the second sub-matrix, is the first Laplacian matrix, is the unnormalized second submatrix, for The degree matrix of is the second residual matrix.

[0177] Step 750: Obtain a third sub-matrix based on the second Laplacian matrix and the first residual matrix.

[0178] In the embodiment of the present application, based on the second Laplacian matrix and the first residual matrix, the third sub-matrix can be obtained by the following formula:

[0179] ;

[0180] ;

[0181] in, is the third sub-matrix, is the second Laplacian matrix, is the unnormalized third submatrix, is the unnormalized third submatrix The degree matrix of is the first residual matrix.

[0182] Step 760: Obtain a fourth sub-matrix based on the second Laplacian matrix and the second residual matrix.

[0183] In the embodiment of the present application, based on the second Laplacian matrix and the second residual matrix, the fourth sub-matrix can be obtained by the following formula:

[0184] ;

[0185] ;

[0186] in, is the fourth sub-matrix, is the second Laplacian matrix, is the unnormalized fourth submatrix. is the unnormalized fourth submatrix The degree matrix is ​​used for standardization. is the second residual matrix.

[0187] Step 770: Input the first target Laplace matrix into the target traffic prediction model for feature extraction processing to obtain a first processing result, wherein the target traffic prediction model includes a first part and a second part, wherein the first part is used to extract spatial features, and the second part is used to extract temporal features, and the first target Laplace matrix includes a first sub-matrix and a second sub-matrix.

[0188] Step 780: Input the second target Laplace matrix into the target traffic prediction model for feature extraction processing to obtain a second processing result, wherein the second target Laplace matrix includes a third sub-matrix and a fourth sub-matrix.

[0189] In an embodiment of the present application, after the first target Laplacian matrix and the second target Laplacian matrix are input into the target traffic prediction model for feature extraction processing in steps 770 and 780, the traffic prediction method, in addition to steps 710 to 790, also includes: updating the target residual matrix to obtain an updated target residual matrix; wherein the updated target residual matrix is ​​used to determine the traffic prediction result at a second time point, and the second time point is after the first time point.

[0190] Step 790: Based on the first processing result and the second processing result, obtain a traffic prediction result for a first time point.

[0191] In an embodiment of the present application, historical traffic data of a target traffic section within a historical time period is obtained; based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions; based on the first Laplace matrix and the target residual matrix, a first target Laplace matrix is ​​obtained; based on the second Laplace matrix and the target residual matrix, a second target Laplace matrix is ​​obtained; the first target Laplace matrix and the second target Laplace matrix are respectively input into a target traffic prediction model to obtain a traffic prediction result. In this way, after obtaining the first Laplace matrix and the second Laplace matrix based on the historical traffic data of the target traffic section, the first target Laplace matrix and the second target Laplace matrix can be obtained based on the target residual matrix, the first Laplace matrix and the second Laplace matrix, and the first target Laplace matrix and the second target Laplace matrix are input into the target traffic prediction model for traffic prediction. This method no longer performs traffic prediction based on a fixed Laplace matrix and has a better traffic prediction effect. At the same time, the first Laplace matrix and the second Laplace matrix reflect the characteristics of the target traffic section from different relationship dimensions. The first Laplace matrix and the second Laplace matrix can more comprehensively capture the road characteristics of the target traffic section, improve the accuracy of traffic prediction, and solve the problem of low accuracy of traffic prediction results in related technologies.

[0192] It is important to understand that Figures 1 to 7 The explanations of the same or corresponding steps in the following can be referred to each other. Figure 1 The explanation of step 110 and step 120 in Figure 3 Step 310 and step 320 in .

[0193] At the same time, it should be understood that a traffic prediction method provided in an embodiment of the present application may have the following beneficial effects: First, the traffic prediction method provided in the present application combines the high-order relations in the road network depicted by the hypergraph with the low-order relations in the road network captured by the ordinary graph, so as to more comprehensively and realistically simulate the spatial structure of the road network, and thus obtain better traffic prediction results. Second, the traffic prediction method provided in the present application proposes a graph update strategy for constructing an optimized graph matrix in the training step of the graph network. Third, the method provided in the present application is based on the GCN network and the GRU network to construct a new spatiotemporal neural network for traffic prediction, that is, an optimized hybrid hypergraph convolutional gating model, which aims to understand and explore the complex spatiotemporal properties of traffic evolution in each section and improve the accuracy of traffic prediction results. Fourth, traffic prediction is an important function in the intelligent transportation system. It predicts traffic conditions in the future by analyzing historical traffic data and real-time traffic data. This prediction can help traffic management departments formulate countermeasures in advance to avoid the occurrence of traffic congestion or reduce its impact, which is not only related to the smoothness and safety of urban traffic, but also to the sustainable development of the city and the happiness index of residents.

[0194] See also Figure 8 , Figure 8 is a structural block diagram of a traffic prediction device provided in an embodiment of the present application. Figure 8 As shown, an embodiment of the present application provides a traffic prediction device 800 , and the traffic prediction device 800 includes: an acquisition module 810 , a determination module 820 and a prediction module 830 .

[0195] The acquisition module 810 is used to acquire historical traffic data of the target traffic section within a historical time period; based on the historical traffic data, acquire a first Laplace matrix and a second Laplace matrix; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions;

[0196] The determining module 820 is configured to obtain a first target Laplace matrix based on the first Laplace matrix and the target residual matrix; and obtain a second target Laplace matrix based on the second Laplace matrix and the target residual matrix;

[0197] The prediction module 830 is used to input the first target Laplace matrix and the second target Laplace matrix into a target traffic prediction model respectively to obtain a traffic prediction result.

[0198] In an embodiment of the present application, historical traffic data of a target traffic section within a historical time period is obtained; based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions; based on the first Laplace matrix and the target residual matrix, a first target Laplace matrix is ​​obtained; based on the second Laplace matrix and the target residual matrix, a second target Laplace matrix is ​​obtained; the first target Laplace matrix and the second target Laplace matrix are respectively input into a target traffic prediction model to obtain a traffic prediction result. In this way, after obtaining the first Laplace matrix and the second Laplace matrix based on the historical traffic data of the target traffic section, the first target Laplace matrix and the second target Laplace matrix can be obtained based on the target residual matrix, the first Laplace matrix and the second Laplace matrix, and the first target Laplace matrix and the second target Laplace matrix are input into the target traffic prediction model for traffic prediction. This method no longer performs traffic prediction based on a fixed Laplace matrix and has a better traffic prediction effect. At the same time, the first Laplace matrix and the second Laplace matrix reflect the characteristics of the target traffic section from different relationship dimensions. The first Laplace matrix and the second Laplace matrix can more comprehensively capture the road characteristics of the target traffic section, improve the accuracy of traffic prediction, and solve the problem of low accuracy of traffic prediction results in related technologies.

[0199] The traffic prediction device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0200] like Fig. 9As shown, an embodiment of the present application also provides an electronic device 900. The electronic device 900 includes: a processor 910 and a memory 920, and the memory 920 stores a program or instruction, and the program or instruction implements the steps of any of the methods described above when executed by the processor 910. For example, when the program is executed by the processor 910, the following process is implemented: obtaining historical traffic data of the target traffic section within a historical time period; based on the historical traffic data, obtaining a first Laplace matrix and a second Laplace matrix; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions; based on the first Laplace matrix and the target residual matrix, a first target Laplace matrix is ​​obtained; based on the second Laplace matrix and the target residual matrix, a second target Laplace matrix is ​​obtained; the first target Laplace matrix and the second target Laplace matrix are respectively input into the target traffic prediction model to obtain a traffic prediction result. In this way, after obtaining the first Laplace matrix and the second Laplace matrix based on the historical traffic data of the target traffic section, the first target Laplace matrix and the second target Laplace matrix can be obtained based on the target residual matrix, the first Laplace matrix and the second Laplace matrix, and the first target Laplace matrix and the second target Laplace matrix are input into the target traffic prediction model for traffic prediction. This method no longer performs traffic prediction based on a fixed Laplace matrix and has a better traffic prediction effect. At the same time, the first Laplace matrix and the second Laplace matrix reflect the characteristics of the target traffic section from different relationship dimensions. The first Laplace matrix and the second Laplace matrix can more comprehensively capture the road characteristics of the target traffic section, improve the accuracy of traffic prediction, and solve the problem of low accuracy of traffic prediction results in related technologies.

[0201] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of each embodiment of the traffic prediction method are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0202] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0203] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0204] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0205] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0206] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0207] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A traffic prediction method, characterized in that: include: Obtain historical traffic data of the target traffic section within a historical time period; Based on the historical traffic data, a first Laplace matrix and a second Laplace matrix are obtained; the first Laplace matrix and the second Laplace matrix are used to reflect the characteristics of the target traffic section from different relationship dimensions, the first Laplace matrix is ​​obtained by graph-constructing the target traffic section through a directed graph or an undirected graph, and the second Laplace matrix is ​​obtained by graph-constructing the target traffic section through a hypergraph; Based on the first Laplace matrix and the target residual matrix, a first target Laplace matrix is ​​obtained; Based on the second Laplace matrix and the target residual matrix, a second target Laplace matrix is ​​obtained; Inputting the first target Laplace matrix and the second target Laplace matrix into a target traffic prediction model respectively to obtain a traffic prediction result; The target residual matrix includes a first residual matrix and a second residual matrix, and the first target Laplace matrix includes a first submatrix and a second submatrix; the obtaining the first target Laplace matrix based on the first Laplace matrix and the target residual matrix includes: obtaining a first submatrix based on the first Laplace matrix and the first residual matrix; obtaining a second submatrix based on the first Laplace matrix and the second residual matrix; The first sub-matrix and the second sub-matrix are obtained by the following formula: ; ; ; ; in, is the first sub-matrix, is the second sub-matrix, is the first Laplacian matrix, is the unnormalized first submatrix, is the unnormalized second submatrix, for The degree matrix of for The degree matrix of is the first residual matrix, is the second residual matrix.

2. The method according to claim 1, characterized in that The second target Laplacian matrix includes a third sub-matrix and a fourth sub-matrix; Based on the second Laplace matrix and a preset target residual matrix, a second target Laplace matrix is ​​obtained, including: Based on the second Laplacian matrix and the first residual matrix, a third sub-matrix is ​​obtained; A fourth sub-matrix is ​​obtained based on the second Laplacian matrix and the second residual matrix.

3. The method according to claim 1, characterized in that The target traffic prediction model includes a first part and a second part, the first part is used to extract spatial features, and the second part is used to extract temporal features; Inputting the first target Laplace matrix and the second target Laplace matrix into a target traffic prediction model respectively to obtain a traffic prediction result, including: Inputting the first target Laplace matrix into a target traffic prediction model for feature extraction processing to obtain a first processing result; Inputting the second target Laplace matrix into the target traffic prediction model for feature extraction processing to obtain a second processing result; Based on the first processing result and the second processing result, a traffic prediction result for a first time point is obtained.

4. The method according to claim 3, characterized in that After inputting the first target Laplace matrix and the second target Laplace matrix into a target traffic prediction model respectively, the method further includes: Updating the target residual matrix to obtain an updated target residual matrix; The updated target residual matrix is ​​used to determine the traffic prediction result at a second time point, which is after the first time point.

5. The method according to claim 1, characterized in that Based on the historical traffic data, obtaining a first Laplace matrix and a second Laplace matrix includes: Based on the historical traffic data, determining an adjacency matrix and a hypergraph of a target detection point; the target detection point is a detection point on the target traffic section; Determine a first Laplacian matrix of the target detection point based on the adjacency matrix of the target detection point; Based on the hypergraph of the target detection points, a second Laplacian matrix of the target detection points is determined.

6. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium, characterized in that: The medium stores a program or an instruction, and when the program or the instruction is executed, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when being executed by a processor.

Citation Information

Patent Citations

  • Water flow prediction method and device based on neural network and electronic equipment

    CN112561134A

  • OD passenger flow prediction method based on dynamic hypergraph convolutional neural network

    CN114611798A