Traffic accident prediction method and system based on Lie group manifold and time sequence knowledge graph
Through the method of combining Liqun manifold with time sequence knowledge graph, the problem of dynamic characteristics and multidimensional factor representation in traffic accident risk prediction is solved, the prediction accuracy is improved, the time dependence and multivariate information are highlighted, and the prediction ability of the model is enhanced.
Patent Information
- Application Number
- CN202411227687.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-03
AI Technical Summary
Existing traffic accident risk prediction methods are difficult to accurately capture dynamic characteristics and multidimensional factors in representation learning, and traditional machine learning algorithms assume that feature independence ignores complex relationships, resulting in low prediction accuracy.
Using a method based on Li group manifold and timing knowledge graph, features are extracted through Li group manifold mapping, a timing knowledge graph model is established, and a graph convolution network and deep learning algorithms (such as TGAT) are used to optimize the prediction model to highlight time dependence and multivariate information.
It improves the accuracy of traffic accident prediction, makes up for the limitations of traditional methods in accuracy and complex relationship processing, and enhances the prediction ability of the model.
Smart Images

Figure CN119204664A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a traffic accident prediction method and system based on Lie group manifold and time series knowledge graph. Background Art
[0002] In today's society, with the rapid development of the economy and the intensification of urbanization, traffic safety issues have gradually become the focus of people's attention, especially in urban transportation systems. Traffic accidents not only threaten people's lives and property safety, but also seriously affect traffic efficiency and the smooth operation of cities. Traffic congestion and frequent accidents have become common problems faced by many cities, which not only increase citizens' travel time, but also have a negative impact on the environment. Therefore, in-depth research and accurate prediction of traffic accident risks have important social value and practical significance for improving traffic management, reducing accidents, and ensuring citizens' travel safety. Through scientific accident prediction and management, cities can effectively reduce the frequency of accidents, improve road safety, and optimize traffic flow, thereby enhancing the overall operation efficiency of the city and the quality of life of residents.
[0003] With the development of big data technology and the continuous progress of artificial intelligence algorithms, using historical traffic accident data to explore the laws of accident occurrence and achieve accurate section-level traffic accident risk prediction has become an important direction for the construction of intelligent transportation systems. Big data technology enables traffic management departments to collect and analyze data from various sensors, surveillance cameras and social media in real time, while artificial intelligence models and predicts these massive data through deep learning and machine learning algorithms. Data-driven intelligent transportation systems can not only monitor and analyze traffic flow in real time, but also predict possible future traffic accident risks based on historical data and real-time information. This predictive ability can help traffic management departments take measures in advance to optimize traffic signal control and adjust traffic flow, thereby reducing the probability of accidents and improving the overall level of traffic safety. In addition, accurate predictions can also help transportation departments formulate more reasonable traffic planning and emergency plans, further enhancing the resilience of the transportation system and its ability to respond to emergencies. And with the rapid development of emerging technologies such as big data and artificial intelligence in recent years, relevant traffic data resources have been integrated. Using advanced intelligent algorithms to analyze these data can improve the accuracy of traffic accident predictions. At present, support vector machine (SVM), negative binomial regression and decision tree are representative technologies, which play an important role in traffic accident analysis.
[0004] However, in the representation learning of traffic accident risk prediction, the problem of vector representation is particularly critical because they need to accurately capture and reflect the dynamic characteristics and multidimensional factors of traffic accident risks. Existing methods face many difficulties in converting entities and attributes related to traffic accidents into vector representations. For example, traditional vector representations are difficult to adapt to the rapid changes in traffic accident risks over time, and the effective integration of temporal information requires the model to be able to handle different time scales and time dependencies. In addition, high-dimensional traffic accident data may lose key information when converted to low-dimensional vectors, affecting the prediction ability of the model. Traditional machine learning algorithms, such as support vector machines (SVMs) and decision trees, have achieved certain results in traffic accident prediction, but they usually have limitations in the following aspects. First, these algorithms usually assume that features are independent of each other. Although this assumption simplifies the complexity of the model in many cases, it ignores the potential complex relationships between features. The prediction of static data usually uses the knowledge graph link prediction model, but most traffic data is dynamic and time-series, so it is difficult to predict it accurately and efficiently.
[0005] Therefore, traditional traffic accident prediction methods often have the problem of low prediction accuracy. Summary of the invention
[0006] Based on this, in order to solve the above technical problems, a traffic accident prediction method and system based on Lie group manifold and time series knowledge graph is provided to improve the accuracy of traffic accident prediction.
[0007] A traffic accident prediction method based on Lie group manifold and time series knowledge graph, the method comprising:
[0008] Collecting historical traffic accident data, and performing data cleaning operations on the historical traffic accident data to obtain cleaned historical traffic accident data;
[0009] Using a Lie group manifold mapping method to extract and sort the cleaned historical traffic accident data, determine the nonlinear correlation between variables, and obtain a feature set;
[0010] Establishing a time series knowledge graph according to the feature set, and constructing a preliminary prediction model based on the time series knowledge graph, wherein the preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model;
[0011] Determine the time series information of the prediction target and input it into the knowledge graph prediction model, predict the dependency relationship between the prediction target entity and each entity, and predict the risk of traffic accidents based on the dependency relationship to obtain a prediction result.
[0012] In one embodiment, the method further comprises:
[0013] Obtaining a traffic accident occurrence result, and comparing the traffic accident occurrence result with the prediction result to obtain a comparison result;
[0014] Determine a model evaluation index, and evaluate the knowledge graph prediction model according to the model evaluation index based on the comparison result to obtain an evaluation result;
[0015] The knowledge graph prediction model is optimized and adjusted according to the evaluation results.
[0016] In one embodiment, the method further comprises:
[0017] Decomposing the fourth-order tensor in the time series knowledge graph to obtain various factor tensors;
[0018] Mapping each of the factor tensors to the Lie group space to obtain a rotation matrix;
[0019] The rotation matrix is converted into a skew-symmetric matrix using a logarithmic mapping to obtain a factor tensor after mapping;
[0020] Each factor tensor is optimized based on the mapped factor tensor.
[0021] In one embodiment, the constructing a preliminary prediction model based on the time series knowledge graph includes:
[0022] The entities and relationships in the feature set mapped to the Lie group flow are mapped to the graph structure through the relational data RGCN model of the graph convolutional network;
[0023] Based on the graph structure, the relationship between entities is learned using graph convolution operations;
[0024] According to the entities and the relationships between the learned entities, the entities and relationships in the time series knowledge graph are vectorized to build a preliminary prediction model.
[0025] In one embodiment, the method further comprises:
[0026] During the graph convolution operation, a basis decomposition regularization operation is performed on the entities and relations in the feature set;
[0027] The data after the basis decomposition regularization operation is passed through multiple layers of graph convolution in the graph structure, and softmax is used in the last layer of graph convolution for classification and result prediction, thereby completing the optimization of the preliminary prediction model.
[0028] In one embodiment, the preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model, including:
[0029] Introducing TGAT into the RGCN model;
[0030] Extracting the time information mapped onto the Lie group manifold, using the TGAT to encode the time information using a time encoding function through Monte Carlo integral approximation;
[0031] Obtaining a learning weight matrix, and calculating a self-attention mechanism according to the learning weight matrix;
[0032] The preliminary prediction model is optimized based on the self-attention mechanism and the encoded information to obtain a knowledge graph prediction model.
[0033] In one embodiment, the historical traffic accident data includes accident time, location, weather conditions, and road type.
[0034] In one embodiment, performing a data cleaning operation on the historical traffic accident data to obtain the cleaned historical traffic accident data includes:
[0035] The historical traffic accident data is subjected to an operation of removing outliers, missing values or duplicate values to obtain cleaned historical traffic accident data.
[0036] A traffic accident prediction system based on Lie group manifold and time series knowledge graph, the system comprising:
[0037] A data processing module, used for collecting historical traffic accident data and performing data cleaning operations on the historical traffic accident data to obtain cleaned historical traffic accident data;
[0038] A Lie group manifold mapping module, used to extract and sort the cleaned historical traffic accident data using a Lie group manifold mapping method, determine the nonlinear correlation between variables, and obtain a feature set;
[0039] A model building module, used to build a time series knowledge graph according to the feature set, and to construct a preliminary prediction model based on the time series knowledge graph, wherein the preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model;
[0040] The prediction module is used to determine the time series information of the prediction target and input it into the knowledge graph prediction model, predict the dependency relationship between the prediction target entity and each entity, and predict the risk of traffic accidents based on the dependency relationship to obtain a prediction result.
[0041] The above-mentioned traffic accident prediction method and system based on Lie group manifold and time series knowledge graph, by using Lie group manifold mapping method to extract and sort features, combined with time series knowledge graph training to obtain a knowledge graph prediction model for traffic accident prediction, can make more accurate predictions for the time series knowledge graph in the field of traffic accident prediction than the existing technology; the use of TGAT can highlight the potential time dependency and multivariate information between traffic accident-related indicators, and use serialization learning to effectively mine their dependencies, which makes up for the limitation of low accuracy of traditional link prediction models and improves the accuracy of link prediction that combines Lie group manifold analysis, TGAT processing and time series knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is an application environment diagram of a traffic accident prediction method based on Lie group manifold and time series knowledge graph in one embodiment;
[0043] Figure 2 It is a flowchart of a traffic accident prediction method based on Lie group manifold and time series knowledge graph in one embodiment;
[0044] Figure 3 A schematic diagram of a process of performing data processing using Lie group manifold mapping in one embodiment;
[0045] Figure 4 Schematic diagram of a flow chart of performing a graph convolution operation in one embodiment;
[0046] Figure 5 A schematic diagram of a process of sequential learning in one embodiment;
[0047] Figure 6 is a structural block diagram of a traffic accident prediction system based on Lie group manifold and time series knowledge graph in one embodiment;
[0048] Figure 7 It is a structural block diagram of a traffic accident prediction system based on Lie group manifold and time series knowledge graph in another embodiment;
[0049] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] The traffic accident prediction method based on Lie group manifold and time series knowledge graph provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 As shown, the application environment includes a computer device 110. The computer device 110 can collect historical traffic accident data and perform data cleaning operations on the historical traffic accident data to obtain cleaned historical traffic accident data; the computer device 110 can use the Lie group manifold mapping method to extract and sort the cleaned historical traffic accident data, determine the nonlinear correlation between variables, and obtain a feature set; the computer device 110 can establish a time series knowledge graph based on the feature set, and build a preliminary prediction model based on the time series knowledge graph. The preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model; the computer device 110 can determine the time series information of the prediction target and input it into the knowledge graph prediction model, predict the dependency relationship between the prediction target entity and each entity, and predict the risk of traffic accidents based on the dependency relationship to obtain a prediction result. Among them, the computer device 110 can be, but not limited to, various personal computers, laptops, smart phones, robots, unmanned aerial vehicles and other devices.
[0052] In one embodiment, Figure 2 As shown, a traffic accident prediction method based on Lie group manifold and time series knowledge graph is provided, comprising the following steps:
[0053] Step 202: collect historical traffic accident data, and perform data cleaning operations on the historical traffic accident data to obtain cleaned historical traffic accident data.
[0054] The computer device may collect historical traffic accident data, wherein, in one embodiment, the historical traffic accident data includes accident time, location, weather conditions, road type, and other relevant data.
[0055] After the historical traffic accident data is collected, a data cleaning operation can be performed on the historical traffic accident data to obtain cleaned historical traffic accident data. Specifically, in one embodiment, a traffic accident prediction method based on Lie group manifold and time series knowledge graph can also include a data cleaning process, which specifically includes: removing outliers, missing values or duplicate values from the historical traffic accident data to obtain cleaned historical traffic accident data.
[0056] Step 204 , using the Lie group manifold mapping method to extract and sort the cleaned historical traffic accident data, determine the nonlinear correlation between variables, and obtain a feature set.
[0057] In the Lie group manifold mapping process, the computer equipment can use the Lie group manifold mapping method to extract and sort the features of each data to determine the nonlinear correlation between variables and generate a feature set.
[0058] In one embodiment, a traffic accident prediction method based on Lie group manifold and time series knowledge graph provided may also include a Lie group manifold mapping process, the specific process including: decomposing the fourth-order tensor in the time series knowledge graph to obtain each factor tensor; mapping each factor tensor to the Lie group space to obtain a rotation matrix; using a logarithmic mapping to convert the rotation matrix into a skew-symmetric matrix to obtain a mapped factor tensor; and optimizing each factor tensor based on the mapped factor tensor.
[0059] Computer equipment can decompose the fourth-order tensor Y in the time series knowledge graph: Among them, Y is the target tensor, u r ,v r ,w r ,t r is the factor tensor, λ r is the scaling factor; each factor tensor e is then mapped to the SO(2) Lie group space to obtain the rotation matrix R: The computer device can then use a logarithmic map to convert the rotation matrix on SO(2) to a skew-symmetric matrix in SO(2): Where θ(R) is the rotation angle of the matrix R, calculated as: trace(R) is the trace of R, that is, the sum of the diagonal elements.
[0060] Next, we can compute the difference between the original factor tensor and the mapped factor tensor: Then use the optimized factor tensor to perform tensor decomposition and optimize the loss function: Then use the full multi-class logarithmic softmax loss function and N3 regularization to optimize the factor tensor: Among them, λμ is the weight of N3 regularization, is the inverse of the relationship, φ is the scoring function, which completes the mapping of the factor tensor to the Lie group manifold and obtains the mapped feature matrix.
[0061] In one embodiment, Figure 3 As shown, a traffic accident prediction method based on Lie group manifold and time series knowledge graph is provided, which can also include a process of extracting features and sorting the cleaned historical traffic accident data using the Lie group manifold mapping method, such as Figure 3 As shown, the specific process includes: selecting traffic accident data indicators and determining parameter sequences; mapping factors in the data into a form suitable for Lie group manifold analysis; performing Lie group manifold mapping; and then performing feature extraction and feature fusion.
[0062] Step 206, establish a time series knowledge graph according to the feature set, and build a preliminary prediction model based on the time series knowledge graph. The preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model.
[0063] Among them, in the process of establishing the time series knowledge graph prediction model, the main focus is on the feature set of Lie group manifold analysis, building a knowledge graph model for training to predict the relationship between the target entity and other entities and generate a time series knowledge graph prediction model. Then, deep learning can be performed through TGAT to optimize the preliminary prediction model.
[0064] In one embodiment, a traffic accident prediction method based on Lie group manifold and time series knowledge graph is provided, which may also include a process of constructing a preliminary prediction model. The specific process includes: mapping entities and relationships in a feature set mapped to the Lie group flow to a graph structure through an RGCN model; based on the graph structure, using graph convolution operations to learn the relationship between each entity; according to the relationship between each entity and the learned entity, vectorizing the entities and relationships in the time series knowledge graph to construct a preliminary prediction model.
[0065] Specifically, the computer device can use the Relational Data with Graph Convolutional Networks (RGCN) model to map entities and relationships into a graph structure, and then use graph convolution operations to learn the relationships between entities to achieve vectorization of entities and complex semantic relationships in the temporal knowledge graph.
[0066] In one embodiment, a traffic accident prediction method based on Lie group manifold and time series knowledge graph may also include a process of performing graph convolution operations, such as Figure 4 As shown in the figure, the specific process includes: input data, feature matrix after Lie group manifold transformation; then feature embedding; then graph convolution operation; finally data output through the output layer.
[0067] In one embodiment, a traffic accident prediction method based on Lie group manifold and time series knowledge graph is provided, which may also include a model optimization process, the specific process including: performing a basis decomposition regularization operation on the entities and relationships in the feature set during the graph convolution operation; passing the data after the basis decomposition regularization operation through multiple layers of graph convolution in the graph structure, and using softmax in the last layer of graph convolution for classification and result prediction, thereby completing the optimization of the preliminary prediction model.
[0068] In this embodiment, a directed, labeled multigraph G mapped to a Lie group manifold can be subjected to a graph convolution operation to update the hidden state of the node. Where V is a set of nodes (entities), E is a set of labeled edges (relationships), and R is a set of relationship types. Given a node v i The hidden state at layer l Its new state at layer l+1 It can be calculated by the formula: in, Indicates that node v under relation r i The neighbor node index set, c i,r is a problem-specific normalization constant that can be fixed or learnable, is the weight matrix for relation r, is the self-connected weight matrix and σ is the activation function.
[0069] Next, we can perform a regularization operation on the basis of decomposition during the convolution process: After multiple layers of graph convolution layers, softmax is used in the last layer for multi-class classification and result prediction. The loss function is cross entropy loss: Among them, Y is a set of labeled node indices, is the kth entry in the network output, corresponding to the labeled node i, t ik is the corresponding true label, and the model is optimized accordingly.
[0070] In one embodiment, a traffic accident prediction method based on Lie group manifold and time series knowledge graph is provided, which may also include a process of introducing a time series graph attention mechanism, and the specific process includes: introducing TGAT in the RGCN model; extracting the time information mapped to the Lie group manifold, using TGAT to approximate the Monte Carlo integral, and encoding the time information using a time coding function; obtaining a learning weight matrix, and calculating a self-attention mechanism based on the learning weight matrix; optimizing the preliminary prediction model based on the self-attention mechanism and the encoded information to obtain a knowledge graph prediction model.
[0071] Specifically, TGAT can be introduced into the RGCN model, adding information from the temporal knowledge graph to perform sequential learning. Figure 5 As shown, the process of sequential learning can include: determining the feature matrix after passing through the Lie group manifold; then performing functional time encoding; calculating the self-attention mechanism through the time graph attention layer; and then entering the convolution layer of RGCN.
[0072] Specifically, the time information mapped to the Lie group manifold can be encoded through a drThe time kernel K can be expressed as: K(t1,t2)=<φ(t1),φ(t2)>; where φ is obtained by Fourier transform: K(t1,t2)=E w [cos(w(t1-t2))]; where w is the frequency, i is the imaginary unit, and E is the expected value; by Monte Carlo integration approximation, the time encoding function φ d (t) is expressed as: Where d is the encoding dimension, w i The frequency parameter of random sampling, t is the timestamp; then, the combination of node and time encoding can be performed: Among them, h i (t i ) is the node v i At time t i The hidden state of Represents vector concatenation.
[0073] Among them, the calculation of the self-attention mechanism can include: Self-attention query (Query) calculation: Q(t) = Z(t)W Q ; Self-attention key calculation: K(t)=Z(t)W K ; Self-attention value calculation: V(t) = Z(t)W V ;W Q ,W K ,W V is a learnable weight matrix. The attention weight is: Where N(v0; t) is the set of neighbor nodes of the target node V0 at time t. The neighbor information aggregation can be expressed as: Among them, V i is the linear transformation W V The obtained node V i The value (Value) indicates: V i =h i (t)W V ; Finally enter the feedforward neural network: FFN is a feed-forward neural network; entering the convolutional layer of RGCN.
[0074] Step 208, determine the time series information of the prediction target and input it into the knowledge graph prediction model, predict the dependency relationship between the prediction target entity and each entity, and predict the risk of traffic accidents based on the dependency relationship to obtain a prediction result.
[0075] Specifically, in the process of data prediction, the computer device can use the trained knowledge graph prediction model according to the time series information of the prediction target, and perform link prediction on the time series knowledge graph in the field of traffic accidents by predicting the dependency relationship between the target entity and other entities, thereby obtaining the prediction result.
[0076] In this embodiment, data collection is first performed to collect traffic accident data, including accident time, location, weather conditions, road type and other relevant data; data cleaning is then performed to clean the collected data, including removing outliers, missing values or duplicate values; Lie group manifold analysis is performed, and the Lie group manifold analysis method is used to extract and sort features of various environmental data to determine the nonlinear correlation between variables and generate a feature set; then a time series knowledge graph model is established, and a knowledge graph model is constructed for training based on the feature set of Lie group manifold analysis to predict the relationship between the target entity and other entities and generate a prediction model; and data prediction is performed, according to the time series information of the prediction target, using the trained knowledge graph prediction model, by predicting the dependency between the target entity and other entities, a link prediction of the risk of traffic accidents is performed; model evaluation is performed, and finally the prediction results are evaluated, including error analysis, accuracy analysis, etc., to determine the reliability of the prediction model. Due to the adoption of the TGAT time-series graph attention mechanism, the potential temporal dependency and multivariate information between traffic accident-related indicators can be highlighted, and serialization learning can be used to effectively mine their dependencies, which makes up for the limitation of low accuracy of traditional link prediction models and improves the accuracy of link prediction that combines Lie group manifold analysis and time-series knowledge graphs.
[0077] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0078] In one embodiment, Figure 6 As shown, a traffic accident prediction system based on Lie group manifold and time series knowledge graph is provided, including: a data processing module 610, a Lie group manifold mapping module 620, a model building module 630 and a prediction module 640, wherein:
[0079] The data processing module 610 is used to collect historical traffic accident data and perform data cleaning operations on the historical traffic accident data to obtain cleaned historical traffic accident data;
[0080] Lie group manifold mapping module 620, used to extract and sort the cleaned historical traffic accident data using Lie group manifold mapping method, determine the nonlinear correlation between variables, and obtain a feature set;
[0081] A model building module 630 is used to build a time series knowledge graph according to the feature set, and to construct a preliminary prediction model based on the time series knowledge graph. The preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model.
[0082] The prediction module 640 is used to determine the time series information of the prediction target and input it into the knowledge graph prediction model, predict the dependency relationship between the prediction target entity and each entity, and predict the risk of traffic accidents based on the dependency relationship to obtain a prediction result.
[0083] like Figure 7 As shown, in one embodiment, a traffic accident prediction system based on Lie group manifold and time series knowledge graph is provided, which also includes a model evaluation and adjustment module 650, which is used to obtain the result of the traffic accident, and compare the result of the traffic accident with the prediction result to obtain a comparison result; determine the model evaluation index, and evaluate the knowledge graph prediction model according to the model evaluation index based on the comparison result to obtain an evaluation result; optimize and adjust the knowledge graph prediction model according to the evaluation result
[0084] In one embodiment, the Lie group manifold mapping module 620 is also used to decompose the fourth-order tensor in the time series knowledge graph to obtain various factor tensors; map each factor tensor to the Lie group space to obtain a rotation matrix; use a logarithmic mapping to convert the rotation matrix into a skew-symmetric matrix to obtain a mapped factor tensor; and optimize each factor tensor based on the mapped factor tensor.
[0085] In one embodiment, the model building module 630 is also used to map the entities and relationships in the feature set mapped on the Lie group flow into the graph structure through the RGCN model; based on the graph structure, use graph convolution operations to learn the relationships between various entities; according to the relationships between various entities and the learned entities, realize the vectorization of entities and relationships in the time series knowledge graph, and build a preliminary prediction model.
[0086] In one embodiment, the model building module 630 is also used to perform basis decomposition regularization operations on entities and relationships in the feature set during the graph convolution operation; the data after the basis decomposition regularization operation is passed through multiple layers of graph convolution in the graph structure, and softmax is used in the last layer of graph convolution for classification and result prediction, thereby completing the optimization of the preliminary prediction model.
[0087] In one embodiment, the model building module 630 is also used to introduce the TGAT timing graph attention mechanism into the RGCN model; extract the time information mapped to the Lie group manifold, use TGAT to approximate the Monte Carlo integral, and use the time coding function to encode the time information; obtain the learning weight matrix, and calculate the self-attention mechanism according to the learning weight matrix; optimize the preliminary prediction model based on the self-attention mechanism and the encoded information to obtain the knowledge graph prediction model.
[0088] In one embodiment, the historical traffic accident data includes accident time, location, weather conditions, and road type.
[0089] In one embodiment, the data processing module 610 is further used to remove abnormal values, missing values or duplicate values from the historical traffic accident data to obtain cleaned historical traffic accident data.
[0090] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a traffic accident prediction method based on Lie group manifold and time series knowledge graph is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0091] Those skilled in the art will understand that Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0092] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of a traffic accident prediction method based on Lie group manifold and time series knowledge graph are implemented.
[0093] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a traffic accident prediction method based on Lie group manifold and time series knowledge graph are implemented.
[0094] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0095] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0096] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A traffic accident prediction method based on Lie group manifold and time series knowledge graph, characterized in that: The method comprises: Collecting historical traffic accident data, and performing data cleaning operations on the historical traffic accident data to obtain cleaned historical traffic accident data; Using a Lie group manifold mapping method to extract and sort the cleaned historical traffic accident data, determine the nonlinear correlation between variables, and obtain a feature set; Establishing a time series knowledge graph according to the feature set, and constructing a preliminary prediction model based on the time series knowledge graph, wherein the preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model; Determine the time series information of the prediction target and input it into the knowledge graph prediction model, predict the dependency relationship between the prediction target entity and each entity, and predict the risk of traffic accidents based on the dependency relationship to obtain a prediction result.
2. The traffic accident prediction method based on Lie group manifold and time series knowledge graph according to claim 1 is characterized in that: The method further comprises: Obtaining a traffic accident occurrence result, and comparing the traffic accident occurrence result with the prediction result to obtain a comparison result; Determine a model evaluation index, and evaluate the knowledge graph prediction model according to the model evaluation index based on the comparison result to obtain an evaluation result; The knowledge graph prediction model is optimized and adjusted according to the evaluation results.
3. The traffic accident prediction method based on Lie group manifold and time series knowledge graph according to claim 1 is characterized in that: The method further comprises: Decomposing the fourth-order tensor in the time series knowledge graph to obtain various factor tensors; Mapping each of the factor tensors to the Lie group space to obtain a rotation matrix; The rotation matrix is converted into a skew-symmetric matrix using a logarithmic mapping to obtain a factor tensor after mapping; Each factor tensor is optimized based on the mapped factor tensor.
4. The traffic accident prediction method based on Lie group manifold and time series knowledge graph according to claim 1 is characterized in that: The constructing of a preliminary prediction model based on the time series knowledge graph includes: The entities and relationships in the feature set mapped to the Lie group flow are mapped to the graph structure through the relational data RGCN model of the graph convolutional network; Based on the graph structure, the relationship between entities is learned using graph convolution operations; According to the entities and the relationships between the learned entities, the entities and relationships in the time series knowledge graph are vectorized to build a preliminary prediction model.
5. The traffic accident prediction method based on Lie group manifold and time series knowledge graph according to claim 4 is characterized in that: The method further comprises: During the graph convolution operation, a basis decomposition regularization operation is performed on the entities and relations in the feature set; The data after the basis decomposition regularization operation is passed through multiple layers of graph convolution in the graph structure, and softmax is used in the last layer of graph convolution for classification and result prediction, thereby completing the optimization of the preliminary prediction model.
6. The traffic accident prediction method based on Lie group manifold and time series knowledge graph according to claim 4 is characterized in that: The preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model, including: Introducing TGAT into the RGCN model; Extracting the time information mapped onto the Lie group manifold, using the TGAT to encode the time information using a time encoding function through Monte Carlo integral approximation; Obtaining a learning weight matrix, and calculating a self-attention mechanism according to the learning weight matrix; The preliminary prediction model is optimized based on the self-attention mechanism and the encoded information to obtain a knowledge graph prediction model.
7. The traffic accident prediction method based on Lie group manifold and time series knowledge graph according to claim 1 is characterized in that: The historical traffic accident data includes accident time, location, weather conditions, and road type.
8. The traffic accident prediction method based on Lie group manifold and time series knowledge graph according to claim 1 is characterized in that: Performing a data cleaning operation on the historical traffic accident data to obtain cleaned historical traffic accident data includes: The historical traffic accident data is subjected to an operation of removing outliers, missing values or duplicate values to obtain cleaned historical traffic accident data.
9. A traffic accident prediction system based on Lie group manifold and time series knowledge graph, characterized in that: The system comprises: A data processing module, used for collecting historical traffic accident data and performing data cleaning operations on the historical traffic accident data to obtain cleaned historical traffic accident data; A Lie group manifold mapping module, used to extract and sort the cleaned historical traffic accident data using a Lie group manifold mapping method, determine the nonlinear correlation between variables, and obtain a feature set; A model building module, used to build a time series knowledge graph according to the feature set, and to construct a preliminary prediction model based on the time series knowledge graph, wherein the preliminary prediction model is deeply learned and optimized through TGAT to obtain a knowledge graph prediction model; The prediction module is used to determine the time series information of the prediction target and input it into the knowledge graph prediction model, predict the dependency relationship between the prediction target entity and each entity, and predict the risk of traffic accidents based on the dependency relationship to obtain a prediction result.
10. The traffic accident prediction system based on Lie group manifold and time series knowledge graph according to claim 9 is characterized in that: The system further comprises a model evaluation and adjustment module, which is used to obtain the traffic accident occurrence result and compare the traffic accident occurrence result with the prediction result to obtain a comparison result; Determine a model evaluation index, evaluate the knowledge graph prediction model according to the model evaluation index based on the comparison result, and obtain an evaluation result; and optimize and adjust the knowledge graph prediction model according to the evaluation result.
Citation Information
Patent Citations
Knowledge graph embedding model training method and system and electronic equipment
CN112182245A
Resource allocation method and device, equipment and medium
CN114443303A
Multi-modal knowledge graph representation learning method based on graph neural network
CN114443858A
Marine environment prediction model training method and related device
CN116882538A
Time sequence graph link prediction method based on deep learning
CN117972450A
Cited By
High-speed traffic knowledge graph system, method and device and storage medium
CN120012890A
High-speed traffic knowledge graph system, method, device and storage medium
CN120012890B
Hardware defect risk distribution prediction method, device, equipment, storage medium and program product
CN120013255A
Traffic accident risk prediction method, electronic device, storage medium and program product
CN122175388A
