Highway traffic flow prediction method, device, equipment and medium
By combining partial differential equations and deep learning technology, the KAN neural network model is used for traffic flow prediction, which solves the problem of insufficient calculation complexity and accuracy of the existing model, and achieves higher prediction accuracy and efficiency.
Patent Information
- Application Number
- CN202411389219.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The existing traffic flow prediction models have limitations in terms of computational complexity and accuracy, and it is difficult to accurately capture the nonlinearity and randomness in actual traffic flows.
The KAN neural network model is used to combine the processing process and deep learning technology, embed the physical constraint, and train the model through the pre -configured loss function to improve the accuracy of the traffic flow forecast.
It effectively solves the problem of insufficient calculation complexity and accuracy of traditional traffic flow prediction models, improves predictive accuracy and calculation efficiency, and provides a scientific basis for the management and control of highway traffic flow.
Smart Images

Figure CN118887812B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of traffic flow prediction, and more specifically, to a method, device, equipment and medium for predicting highway traffic flow. Background Art
[0002] Traditional traffic flow models, such as the Lighthill-Whitham-Richards (LWR) model, are classic methods for describing the dynamic behavior of traffic flow. The LWR model is based on the continuous medium assumption and regards traffic flow as a continuous fluid. It simulates the evolution of traffic flow by describing the relationship between traffic density, flow, and speed. Specifically, the LWR model contains the following two main equations: (1) Continuity equation: describes the change of traffic flow density. The expression of the continuity equation is: ,in, represents the traffic density, Indicates the traffic speed, Indicates time, Indicates the spatial position of the highway. (2) Speed function: describes the relationship between traffic speed and traffic density. The speed function is expressed as: ,in, is a speed-density relationship function, for example, a Greenshield relationship function.
[0003] Although the LWR model plays an important role in traffic flow research, it has some limitations in practical applications. First, the solution process of the LWR model is complex and requires a lot of computing resources. Second, the LWR model's description of traffic flow is relatively idealized, and it is difficult to accurately capture the various nonlinear and random phenomena in actual traffic flow. With the development of computing technology and artificial intelligence, deep learning has shown great potential in dealing with complex nonlinear problems. Multilayer perceptron (MLP), as a typical deep learning model, has been widely used in traffic flow prediction. However, MLP has certain limitations when dealing with complex physical systems, such as low model interpretability, many network parameters, and high training difficulty. For example, it cannot effectively embed physical constraints, resulting in the inconsistency between the model prediction results and the actual physical laws. Summary of the invention
[0004] The purpose of this application is to provide a highway traffic flow prediction method, device, equipment and medium, which solves the problem of low accuracy of current highway traffic flow prediction results and can accurately predict the traffic density and traffic speed of the highway at different time and space points.
[0005] In a first aspect of the present application, a method for predicting highway traffic flow is provided, the method comprising:
[0006] Acquire first traffic flow data of the expressway section at an initial moment, and second traffic flow data at an entrance and exit;
[0007] Constructing an input data matrix including space-time coordinates; wherein the space-time coordinates are discretized space points and time points;
[0008] The KAN neural network model is trained by combining the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function, and a traffic flow prediction model is obtained when the loss function converges or reaches a preset number of training times;
[0009] The traffic flow of the expressway at a certain time and a certain location is predicted according to the traffic flow prediction model.
[0010] In one implementation, the KAN neural network model includes multiple one-dimensional sub-networks and multiple combination networks; wherein the one-dimensional sub-networks are used to convert input data into one-dimensional features, and the combination network is used to combine the one-dimensional features of the outputs of the one-dimensional sub-networks to output prediction results.
[0011] In one implementation, the preconfigured loss function includes an initial condition loss function for characterizing the error between the prediction result at the initial moment and the first traffic flow data, a boundary condition loss function for characterizing the error between the prediction result at the entrance and exit and the second traffic flow data, and a residual loss function for characterizing the degree of deviation between the prediction result and the continuity equation;
[0012] The continuity equation is a function used to describe the relationship between traffic density, traffic speed, time and spatial position.
[0013] In one implementation, the initial condition loss function and the boundary condition loss function are weightedly summed, and the weighted summation result is added to the residual loss function to serve as a preconfigured loss function.
[0014] In one implementation, the KAN neural network model is trained in the following manner: a gradient descent algorithm is used to optimize the loss function and adjust the network parameters of the KAN neural network model.
[0015] In one implementation, the first traffic flow data and the second traffic flow data are both traffic density.
[0016] In a second aspect of the present application, a highway traffic flow prediction device is provided, the device comprising:
[0017] A data acquisition module, used to acquire first traffic flow data of a highway section at an initial time, and second traffic flow data at an entrance and exit;
[0018] An input data matrix construction module is used to construct an input data matrix containing space-time coordinates; wherein the space-time coordinates are discretized space points and time points;
[0019] A model training module, used to train the KAN neural network model in combination with the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function, and obtain a traffic flow prediction model when the loss function converges or reaches a preset number of training times;
[0020] The traffic flow prediction module is used to predict the traffic flow of the expressway at a certain time and a certain location according to the traffic flow prediction model.
[0021] In one implementation, the KAN neural network model includes multiple one-dimensional sub-networks and multiple combination networks; wherein the one-dimensional sub-networks are used to convert input data into one-dimensional features, and the combination network is used to combine the one-dimensional features of the outputs of the one-dimensional sub-networks to output prediction results.
[0022] The third aspect of the present application provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a highway traffic flow prediction method provided in the first aspect of the present application are implemented.
[0023] The fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of a highway traffic flow prediction method provided in the first aspect of the present application are implemented.
[0024] Compared with the prior art, this application has the following beneficial effects:
[0025] In a highway traffic flow prediction method provided in the present application, first, the first traffic flow data of the highway section at the initial moment and the second traffic flow data at the entrance and exit are obtained; an input data matrix containing space-time coordinates is constructed; wherein the space-time coordinates are discretized spatial points and time points; the KAN neural network model is trained in combination with the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function, and the traffic flow prediction model is obtained when the loss function converges or reaches a preset number of training times. It can be seen that the present application combines the partial differential equation solving process with deep learning technology, embeds physical constraints, and then trains the KAN neural network model in combination with a pre-configured loss function, which can effectively solve the computational complexity and insufficient accuracy of traditional traffic flow prediction models, improve prediction accuracy and computational efficiency, and provide a scientific basis for the management and control of highway traffic flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the embodiments of the present application, constitute a part of the present application, and do not constitute a limitation on the embodiments of the present application. In the drawings:
[0027] Figure 1 A schematic diagram of a flow chart of a highway traffic flow prediction method provided in an embodiment of the present application;
[0028] Figure 2 A functional block diagram of a highway traffic flow prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with examples and drawings. The illustrative implementation scheme of the present application and its description are only used to explain the present application and are not intended to limit the present application.
[0030] It should be noted that the terms "include" or "may include" used in various embodiments of the present application indicate the presence of the function, operation or element applied for, and do not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "include", "have" and their cognates are only intended to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items.
[0031] In various embodiments of the present application, terms such as "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0032] First, the KAN neural network model provided in the embodiment of the present application is described as follows:
[0033] Kolmogorov-Arnold Networks (KAN) is a deep learning model based on the Kolmogorov-Arnold representation theorem, which can effectively process high-dimensional input data. The Kolmogorov-Arnold representation theorem states that any continuous function can be represented as a combination of several one-dimensional functions. It can be seen that the core idea of the KAN neural network model is to decompose complex multivariate functions into a series of simpler single-variable functions, thereby simplifying the approximation process of the neural network.
[0034] Specifically, for any continuous function , there exists a set of one-dimensional continuous functions and , so that , d Represents the data dimension. Based on this theorem, the KAN neural network model approximates the complex functional relationship of high-dimensional input data by constructing several one-dimensional sub-networks and combined networks.
[0035] With the development of computing technology and artificial intelligence, deep learning has shown great potential in dealing with complex nonlinear problems. Multilayer Perceptron (MLP), as a typical deep learning model, has been widely used in traffic flow prediction. However, MLP has certain limitations when dealing with complex physical systems, such as lack of interpretability of the model, large number of network parameters, and slow convergence of network training.
[0036] The basic structure of the KAN neural network model is as follows: (1) One-dimensional sub-network : These subnetworks are used to convert high-dimensional input data Convert to one-dimensional feature representation. (2) Combination network :These networks are used to combine the outputs of the one-dimensional sub-networks into the final prediction results. Through the above structure, the KAN neural network model can effectively capture the complex patterns and relationships in high-dimensional input data, improving the generalization ability and prediction accuracy of the model.
[0037] The KAN neural network model has the following advantages over the traditional MLP:
[0038] (1) Interpretability: The design of KAN is based on the Kolmogorov-Arnold theorem, which states that any continuous function can be approximated by a finite number of polynomials. This theoretical foundation makes the structure of KAN clearer and more interpretable, because each layer and each node has a clear mathematical meaning. For example, each layer can be used to approximate polynomials of different orders, which makes the overall function and effect of the network easier to understand and explain.
[0039] (2) Improved prediction accuracy: Compared with MLP, the loss function converges faster during KAN training, and can more accurately simulate and predict the dynamic changes of traffic flow, significantly improving prediction accuracy.
[0040] (3) High parameter efficiency: KAN provides a more parameter-efficient way to construct the network. Compared with MLP, KAN allows the use of fewer parameters to achieve the same approximation accuracy, significantly improving parameter efficiency.
[0041] In summary, in order to solve the problem of low accuracy of current highway traffic flow prediction results, the embodiments of the present application provide a method, device, equipment and medium for predicting highway traffic flow. First, the first traffic flow data of the highway section at the initial moment and the second traffic flow data at the entrance and exit are obtained; an input data matrix containing space-time coordinates is constructed; wherein the space-time coordinates are discretized spatial points and time points; the KAN neural network model is trained in combination with the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function, and a traffic flow prediction model is obtained when the loss function converges or reaches a preset number of training times. It can be seen that the present application combines the partial differential equation solving process with deep learning technology, embeds physical constraints, and then trains the KAN neural network model in combination with a pre-configured loss function, which can effectively solve the computational complexity and insufficient accuracy of the traditional traffic flow prediction model, improve the prediction accuracy and computational efficiency, and provide a scientific basis for the management and control of highway traffic flow.
[0042] The prediction method provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] Please refer to Figure 1 , Figure 1 A schematic diagram of a flow chart of a highway traffic flow prediction method provided in an embodiment of the present application, such as Figure 1 As shown, the method includes:
[0044] S101, obtaining first traffic flow data of a highway section at an initial moment, and second traffic flow data at an entrance and exit.
[0045] In this embodiment, the initial time may be any time point in a day, such as 12:00:00, 1:00:00, etc. Beijing time, or 12:10:10, etc. Beijing time. The entrance and exit of a highway section refers to the entrance and exit of a section in the middle of the highway, such as sensors arranged at a certain interval (100 meters, 200 meters) in the same direction, so that the first traffic flow data of the highway section at the initial time and the second traffic flow data at the entrance and exit can be collected.
[0046] It should be noted that the first traffic flow data and the second traffic flow data are both traffic density.
[0047] Secondly, as is common knowledge in the technical field, the sensor may be a microwave radar measuring instrument, an infrared light measuring instrument, and the like.
[0048] S102, constructing an input data matrix including space-time coordinates; wherein the space-time coordinates are discretized space points and time points.
[0049] In this embodiment, the spatial domain and the time domain are discretized. and time domain , L is the length of the highway, T is the time length. The spatial domain is divided into N equal-length units, each unit is , dividing the time domain into M equal time steps, each time step is The position of the center of the spatial unit is , the time node is ,in , , i Indicates i Space unit, j Indicates j Combined with the discretized data above, construct an input data matrix containing time and space coordinates ,in and are discrete points in space and time respectively.
[0050] S103, combining the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function, training the KAN neural network model, and obtaining a traffic flow prediction model when the loss function converges or reaches a preset number of training times.
[0051] In this embodiment, the first traffic flow data is determined as the initial condition of the traffic flow. , the second traffic flow data is determined as the boundary condition , , as part of the training data of the KAN neural network model.
[0052] Specifically, in some embodiments, the preconfigured loss function includes an initial condition loss function for characterizing the error between the prediction result at the initial moment and the first traffic flow data, a boundary condition loss function for characterizing the error between the prediction result at the entrance and exit and the second traffic flow data, and a residual loss function for characterizing the degree of deviation between the prediction result and the continuity equation; wherein the continuity equation is a function used to describe the relationship between traffic density, traffic speed, time and spatial position.
[0053] Specifically, the loss function of the pre-configured KAN neural network model includes the initial condition loss function, the boundary condition loss function, and the PDE residual loss function. The specific definitions are as follows:
[0054] 1) Initial condition loss function : Measures the error between the prediction result at the initial moment and the initial condition.
[0055] ;in, is the predicted density value at the initial moment, is the true density value at the initial moment.
[0056] 2) Boundary condition loss function : Measures the error between the prediction results at the boundary and the boundary conditions.
[0057] ;in, is the predicted density value at spatial position x=0, is the true density value at spatial position x=0, is the predicted density value at the spatial position x=L, is the true density value at the spatial position x=L.
[0058] 3) PDE residual loss function : Measures the degree of deviation of the prediction results from the continuity equation.
[0059] ;in, For spatial location i and time location j The predicted density value at For spatial location i and time location j The predicted velocity value at , which is a function of density and velocity get.
[0060] Specifically, the initial condition loss function and the boundary condition loss function are weighted and summed, and the weighted summation result is added to the residual loss function to serve as the pre-configured loss function. The expression is: ,in, is the weight coefficient of the initial condition loss function, is the weight coefficient of the boundary condition loss function.
[0061] Among them, the expression of the partial differential equation is: ,in, represents the traffic density, Indicates the traffic speed, t Indicates time, x Indicates the spatial location of the highway.
[0062] Use the gradient descent algorithm to train the KAN neural network model, optimize the pre-configured loss function, and update the network parameters of the KAN neural network model. The training process is as follows:
[0063] 1) Initialize the network parameters of the KAN neural network model, including weights and biases.
[0064] 2) In each training iteration, the model prediction value of the input data (including the input data matrix, the first traffic flow data and the second traffic flow data) is calculated.
[0065] 3) Calculate the loss function, including initial condition loss, boundary condition loss and PDE residual loss.
[0066] 4) Calculate the gradient of the loss function and use the back-propagation algorithm to update the network parameters of the KAN neural network model.
[0067] 5) Repeat the above steps until the loss function converges or reaches a preset number of training iterations, and obtain a traffic flow prediction model that can be used to predict the traffic speed and traffic density of a highway at a certain time and location.
[0068] S104: predicting the traffic flow of the expressway at a certain time and a certain location according to the traffic flow prediction model.
[0069] In this embodiment, predicting the traffic flow of a highway at a certain time and location in combination with a trained traffic flow prediction model is a conventional technical means, and no unnecessary explanation is given in this embodiment.
[0070] In some embodiments, the KAN neural network model includes multiple one-dimensional sub-networks and multiple combination networks; wherein the one-dimensional sub-networks are used to convert input data into one-dimensional features, and the combination network is used to combine the one-dimensional features of the outputs of the one-dimensional sub-networks to output prediction results.
[0071] Specifically, the structural design of the KAN neural network model includes the construction of a one-dimensional sub-network and a combined network. The specific steps are as follows: 1) One-dimensional sub-network Construction: High-dimensional input data Converted to a one-dimensional feature representation. The output of each one-dimensional sub-network is .
[0072] 2) Combined network Construction: Combine the outputs of the one-dimensional sub-networks into the final prediction result. The output of the combined network is Through the above structure, the KAN neural network model can effectively capture the complex patterns and relationships in high-dimensional input data, and improve the generalization ability and prediction accuracy of the traffic flow prediction model.
[0073] The present application also provides a highway traffic flow prediction device, which can be used to execute each step of a highway traffic flow prediction method described in the above embodiment. Figure 2 , Figure 2 A schematic diagram of a highway traffic flow prediction device provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the device comprises:
[0074] The data acquisition module 210 is used to acquire the first traffic flow data of the highway section at the initial time, and the second traffic flow data at the entrance and exit;
[0075] An input data matrix construction module 220 is used to construct an input data matrix including space-time coordinates; wherein the space-time coordinates are discretized space points and time points;
[0076] A model training module 230 is used to train the KAN neural network model by combining the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function, and obtain a traffic flow prediction model when the loss function converges or reaches a preset number of training times;
[0077] The traffic flow prediction module 240 is used to predict the traffic flow of the expressway at a certain time and a certain location according to the traffic flow prediction model.
[0078] A highway traffic flow prediction device in an embodiment of the present application is similar to the above Figure 1The highway traffic flow prediction method shown is a technical solution based on the same concept. Through the detailed description of the highway traffic flow prediction method provided in the above embodiment, those skilled in the art can clearly understand the implementation process of a highway traffic flow prediction device in this embodiment, so for the sake of brevity of the specification, it will not be repeated here.
[0079] Accordingly, the present embodiment provides a highway traffic flow prediction device, which obtains the first traffic flow data of the highway section at the initial moment, and the second traffic flow data at the entrance and exit; constructs an input data matrix containing space-time coordinates; wherein the space-time coordinates are discretized spatial points and time points; combines the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function to train the KAN neural network model, and obtains the traffic flow prediction model when the loss function converges or reaches a preset number of training times. It can be seen that the present application combines the partial differential equation solving process with deep learning technology, embeds physical constraints, and then combines the pre-configured loss function to train the KAN neural network model, which can effectively solve the computational complexity and insufficient accuracy of the traditional traffic flow prediction model, improve the prediction accuracy and computational efficiency, and provide a scientific basis for the management and control of highway traffic flow.
[0080] In some embodiments, the KAN neural network model includes multiple one-dimensional sub-networks and multiple combination networks; wherein the one-dimensional sub-networks are used to convert input data into one-dimensional features, and the combination network is used to combine the one-dimensional features of the outputs of the one-dimensional sub-networks to output prediction results.
[0081] The embodiment of the present application also provides an electronic device. The electronic device includes a processor, a memory, a communication interface, and at least one communication bus for connecting the processor, the memory, and the communication interface. The memory includes but is not limited to a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (PROM), or a portable CD-ROM, and the memory is used for related instructions and data.
[0082] The communication interface is used to receive and send data. The processor can be one or more CPUs. When the processor is a CPU, the CPU can be a single-core CPU or a multi-core CPU. The processor in the electronic device is used to read one or more programs stored in the memory and perform the following operations: obtain the first traffic flow data of the highway section at the initial moment, and the second traffic flow data at the entrance and exit; construct an input data matrix containing time-space coordinates; wherein the time-space coordinates are discretized space points and time points; combine the input data matrix, the first traffic flow data, the second traffic flow data and the pre-configured loss function to train the KAN neural network model, and when the loss function converges or reaches a preset number of training times, obtain a traffic flow prediction model; predict the traffic flow of the highway at a certain time and a certain location according to the traffic flow prediction model.
[0083] It should be noted that the specific implementation of each operation can be Figure 1 The corresponding description of the method embodiment shown, the electronic device can be used to execute a highway traffic flow prediction method of the above method embodiment, which will not be described in detail here.
[0084] In the embodiments of the present disclosure, a computer-readable storage medium is also provided, and the computer-readable storage medium is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in a computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of a highway traffic flow prediction method in the above embodiment. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0085] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A highway traffic flow prediction method, characterized in that: Methods include: Acquire first traffic flow data of the expressway section at an initial moment, and second traffic flow data at an entrance and exit; Construct an input data matrix containing space-time coordinates; The space-time coordinates are discretized space points and time points; The KAN neural network model is trained in combination with the input data matrix, the first traffic flow data, the second traffic flow data and the pre-configured loss function, and a traffic flow prediction model is obtained when the loss function converges or reaches a preset number of training times; wherein the pre-configured loss function includes an initial condition loss function for characterizing the error between the prediction result at the initial moment and the first traffic flow data, a boundary condition loss function for characterizing the error between the prediction result at the entrance and exit and the second traffic flow data, and a residual loss function for characterizing the degree of deviation between the prediction result and the continuity equation; wherein the continuity equation is a function for describing the relationship between traffic density, traffic speed, time and spatial position; the initial condition loss function and the boundary condition loss function are weightedly summed, and the weighted summation result is added to the residual loss function as the pre-configured loss function; the pre-configured loss function The expression is: ,in, is the weight coefficient of the initial condition loss function, is the weight coefficient of the boundary condition loss function; represents the residual loss function, represents the initial condition loss function, represents the boundary condition loss function; the expression of the initial condition loss function is: ;in, is the predicted density value at the initial moment, is the true density value at the initial moment, is a discrete point in the spatial domain, N is the number of equal-length units divided by the spatial domain; the expression of the boundary condition loss function is: ;in, is the predicted density value at spatial position x=0, is the true density value at spatial position x=0, is the predicted density value at the spatial position x=L, is the true density value at the spatial position x=L, is the length of the highway, represents a discrete point in the time domain, M is the number of equal-length units divided by the time domain; the expression of the residual loss function is: ;in, For spatial location i and time location j The predicted density value at For spatial location i and time location j The predicted speed value at ; The traffic flow of the expressway at a certain time and a certain location is predicted according to the traffic flow prediction model.
2. A highway traffic flow prediction method according to claim 1, characterized in that: The KAN neural network model includes multiple one-dimensional sub-networks and multiple combined networks; wherein the one-dimensional sub-networks are used to convert input data into one-dimensional features, and the combined network is used to combine the one-dimensional features of the outputs of the one-dimensional sub-networks to output prediction results.
3. A highway traffic flow prediction method according to claim 1, characterized in that: The KAN neural network model is trained in the following way: the gradient descent algorithm is used to optimize the loss function and adjust the network parameters of the KAN neural network model.
4. A highway traffic flow prediction method according to claim 1, characterized in that: The first traffic flow data and the second traffic flow data are both traffic density.
5. A highway traffic flow prediction device, characterized in that: The device includes: A data acquisition module, used to acquire first traffic flow data of a highway section at an initial time, and second traffic flow data at an entrance and exit; An input data matrix construction module is used to construct an input data matrix containing space-time coordinates; wherein the space-time coordinates are discretized space points and time points; A model training module is used to train the KAN neural network model in combination with the input data matrix, the first traffic flow data, the second traffic flow data and a pre-configured loss function, and obtain a traffic flow prediction model when the loss function converges or reaches a preset number of training times; wherein the pre-configured loss function includes an initial condition loss function for characterizing the error between the prediction result at the initial moment and the first traffic flow data, a boundary condition loss function for characterizing the error between the prediction result at the entrance and exit and the second traffic flow data, and a residual loss function for characterizing the degree of deviation between the prediction result and the continuity equation; wherein the continuity equation is a function for describing the relationship between traffic density, traffic speed, time and spatial position; weighted summing the initial condition loss function and the boundary condition loss function, and adding the weighted summation result to the residual loss function as the pre-configured loss function; the pre-configured loss function The expression is: ,in, is the weight coefficient of the initial condition loss function, is the weight coefficient of the boundary condition loss function; represents the residual loss function, represents the initial condition loss function, represents the boundary condition loss function; the expression of the initial condition loss function is: ;in, is the predicted density value at the initial moment, is the true density value at the initial moment, is a discrete point in the spatial domain, N is the number of equal-length units divided by the spatial domain; the expression of the boundary condition loss function is: ;in, is the predicted density value at spatial position x=0, is the true density value at spatial position x=0, is the predicted density value at the spatial position x=L, is the true density value at the spatial position x=L, is the length of the highway, j Indicates the time position, represents a discrete point in the time domain, M is the number of equal-length units divided by the time domain; the expression of the residual loss function is: ;in, For spatial location i and time location j The predicted density value at For spatial location i and time location j The predicted speed value at ; The traffic flow prediction module is used to predict the traffic flow of the expressway at a certain time and a certain location according to the traffic flow prediction model.
6. A highway traffic flow prediction device according to claim 5, characterized in that: The KAN neural network model includes multiple one-dimensional sub-networks and multiple combined networks; wherein the one-dimensional sub-networks are used to convert input data into one-dimensional features, and the combined network is used to combine the one-dimensional features of the outputs of the one-dimensional sub-networks to output prediction results.
7. An electronic device, characterized in that: The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a highway traffic flow prediction method as described in any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of a highway traffic flow prediction method as claimed in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Traffic prediction method and system based on self-supervised learning
CN118277815A