Road closed state detection method and device, computer equipment and storage medium
By performing trajectory point recall, sequence grouping, feature coding and fusion methods on road closed states, the problem of difficulty in adaptively collecting multi-order road information in the prior art is solved, and more efficient and accurate road closed state detection is achieved.
Patent Information
- Application Number
- CN202510181161.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-27
AI Technical Summary
When detecting the closed state of the road, it is difficult for the prior art to adaptively collect road information of different orders upstream and downstream, resulting in limited effect of classification model and large errors.
By recalling and converting the trajectory points of each road section in the initial road section collection, dividing it into a sequence group of target road sections and non-target road sections, determining the trajectory point feature sequence corresponding to the road section sequence of a preset length, and coding processing and feature fusion, generating the expression characteristics of the target road section, and finally predicting its opening or closed state.
By reflecting the status of the road network from multiple angles, the single road feature dependence of the traditional method is avoided, the ability to represent complex road networks is enhanced, and the timeliness and accuracy of detection is improved.
Smart Images

Figure CN120045919A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of route planning, and particularly to a method, device, computer device and storage medium for detecting the closed state of a road. Background Art
[0002] The problem of road closure and opening refers to the change in the passable state of urban roads due to reasons such as road construction, traffic control, and bad weather. Obtaining the road closure / opening state in a timely and accurate manner is crucial for route planning in urban traffic. Otherwise, it will cause serious problems such as drivers taking a longer route and the recommended route being impassable.
[0003] Currently, the methods for obtaining closure and opening information mainly include news announcement analysis, active notification by traffic management departments, trajectory big data analysis, and user feedback. Among them, the method based on trajectory big data has gradually become the mainstream method in the industry due to its high timeliness and wide coverage. Its basic idea is to detect abnormal behaviors of groups, including U-turns and sudden drops in popularity, by analyzing the spatio-temporal information of a large number of driving trajectories, and then obtain the road closure state that causes the abnormal behavior.
[0004] However, when analyzing the spatio-temporal information of driving trajectories currently, mainly after matching the trajectories with the road network, the characteristic descriptions of the matched roads are manually constructed, such as road grade, number of lanes, length, in-degree and out-degree, and traffic flow of upstream and downstream roads. This method often has insufficient representation ability for the complexity of the road network, such as being unable to adaptively collect road information of different orders of upstream and downstream roads, thus also limiting the effect of the entire classification model and resulting in a large classification error of the road closure state. Summary of the Invention
[0005] Based on this, it is necessary to provide a method, device, computer device and storage medium for detecting the closed state of a road in view of the above technical problems, so as to solve at least one of the problems existing in the above prior art.
[0006] In a first aspect, a method for detecting the closed state of a road is provided, including:
[0007] Recall trajectory points for each road segment in the initial road segment set, and convert the recalled trajectory points into a number of road segment sequences;
[0008] Divide the number of road segment sequences into a first sequence group and a second sequence group, where the first sequence group includes target road segments, and the second sequence group does not include the target road segments;
[0009] Determine the trajectory point feature sequence corresponding to the road segment sequence with a preset length;
[0010] Encode the trajectory point feature sequence, and fuse the encoded trajectory point features in the first sequence group and the second sequence group to obtain the expression features corresponding to the target road segment;
[0011] Based on the expression features of the target road segment, predict whether the target road segment is in an open state or a closed state.
[0012] In one embodiment, the encoding process of the trajectory point feature sequence includes:
[0013] Encode the trajectory point feature sequences corresponding to the first sequence group and the second sequence group respectively to add temporal context to the trajectory point feature sequences;
[0014] Perform an encryption operation or a thinning operation on the trajectory point feature sequence during the encoding process to enhance the trajectory point feature sequence.
[0015] In one embodiment, the encoding process of the trajectory point feature sequences corresponding to the first sequence group and the second sequence group respectively includes:
[0016] Input the trajectory point sequences corresponding to the first sequence group and the second sequence group into an LSTM network, and the LSTM network includes multiple LSTM units;
[0017] Each LSTM unit processes a trajectory point expression feature at each time step to obtain the hidden state at each time step, and each hidden state includes the context temporal information of the trajectory point sequence.
[0018] In one embodiment, the feature fusion of the encoded trajectory point features in the first sequence group and the second sequence group includes:
[0019] Perform average pooling on the encoded trajectory point feature sequence to convert the variable-length temporal features into fixed-length trajectory representation features;
[0020] Concatenate the trajectory point features after average pooling in the first sequence group and the second sequence group according to time slices to obtain the expression features corresponding to the target road segment.
[0021] In one embodiment, the concatenation of the trajectory point features after average pooling in the first sequence group and the second sequence group according to time slices includes:
[0022] Divide the first sequence group and the second sequence group according to the corresponding time slices respectively;
[0023] Add all the trajectory point features within each time slice element by element to obtain the comprehensive trajectory feature for each time slice.
[0024] Concatenate the comprehensive trajectory features obtained by summing the first sequence group and the second sequence group at each time slice in sequence to obtain the trajectory representation feature of the target road segment.
[0025] In one embodiment, determining the trajectory point feature sequence corresponding to the road segment sequence with a preset length includes:
[0026] Construct a road network graph based on the road network data, taking each road and direction as a node in the road network graph, and the edges between the nodes represent the connection status of the roads;
[0027] Perform a graph convolution operation on the road network graph to obtain the initial expression features of each road segment;
[0028] Determine the initial expression feature corresponding to each road segment in the road segment sequence with a preset length as the trajectory point feature sequence.
[0029] In one embodiment, the method further includes:
[0030] Construct a road network graph based on the road network data, and perform a graph convolution operation on the road network graph through a graph neural network to obtain the initial expression features of each road segment;
[0031] Obtain the historical trajectory point data within the preset range of the target road segment within the preset time range, and convert the historical trajectory point data into several road segment sequences;
[0032] Divide the several road segment sequences into a first sequence group and a second sequence group, where the first sequence group includes the target road segment and the second sequence group does not include the target road segment;
[0033] Based on the initial expression features of each road segment, determine the trajectory point features corresponding to the road segment sequence with a preset length;
[0034] Encode the trajectory point features through a feature encoding model, and perform feature fusion on the encoded trajectory point features in the first sequence group and the second sequence group to obtain the expression feature corresponding to the target road segment;
[0035] Based on the expression feature of the target road segment, predict the probability value that the target road segment is in an open state / closed state through a classification model;
[0036] Based on the probability value and a preset loss function, iteratively train the graph neural network, the feature encoding model, and the classification model until a preset convergence condition is met.
[0037] In a second aspect, a road closure state detection device is provided, including:
[0038] A road segment sequence acquisition unit, configured to recall trajectory points for each road segment in an initial road segment set, and convert the recalled trajectory points into a plurality of road segment sequences;
[0039] A road segment sequence grouping unit, configured to divide the plurality of road segment sequences into a first sequence group and a second sequence group, where the first sequence group includes a target road segment, and the second sequence group does not include the target road segment;
[0040] A trajectory point feature sequence determination unit, configured to determine a trajectory point feature sequence corresponding to a road segment sequence with a preset length;
[0041] An encoding unit, configured to perform encoding processing on the trajectory point feature sequence, and perform feature fusion on the encoded trajectory point features in the first sequence group and the second sequence group to obtain an expression feature corresponding to the target road segment;
[0042] A prediction unit, configured to predict whether the target road segment is in an open state / closed state based on the expression feature of the target road segment.
[0043] In a third aspect, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the road closure state detection method as described above are implemented.
[0044] In a fourth aspect, a readable storage medium is provided, where the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the road closure state detection method as described above are implemented.
[0045] The above road closure status detection method, device, computer device and storage medium, the implementation of the method includes: recalling trajectory points for each road segment in the initial road segment set, and converting the recalled trajectory points into a number of road segment sequences; dividing the number of road segment sequences into a first sequence group and a second sequence group, the first sequence group includes the target road segment, and the second sequence group does not include the target road segment; determining a trajectory point feature sequence corresponding to a road segment sequence with a preset length; performing encoding processing on the trajectory point feature sequence, and fusing the encoded trajectory point features in the first sequence group and the second sequence group to obtain an expression feature corresponding to the target road segment; predicting whether the target road segment is in an open state / closed state based on the expression feature of the target road segment. In the embodiments of the present application, the recalled trajectory points are converted into road segment sequences and grouped, comprehensively considering the information of the first sequence group containing the target road segment and the second sequence group not containing the target road segment. This way can reflect the state of the road network from multiple perspectives, avoiding the limitations of traditional methods that only rely on a single road feature, and further enhancing the representation ability of complex road networks. When performing encoding processing on the trajectory point feature sequence, a method capable of capturing temporal information is adopted, such as RNN and its variants. This enables the model to learn the changing rules of the trajectory over time and enhances the expression ability of the features. The entire method realizes an automated processing flow from trajectory point recall, sequence grouping, feature encoding to final prediction, reducing the workload of manual intervention and manual feature construction. This not only improves the processing efficiency but also reduces the errors caused by human factors, further enhancing the timeliness and accuracy of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present invention. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0047] Figure 1 is a schematic diagram of an application environment of the road closure status detection method in an embodiment of the present invention;
[0048] Figure 2 is a schematic flowchart of the road closure status detection method in an embodiment of the present invention;
[0049] Figure 3 is a schematic diagram of an application environment of the model training method in an embodiment of the present invention;
[0050] Figure 4It is a schematic structural diagram of a road closure state detection device in an embodiment of the present invention;
[0051] Figure 5 It is a schematic diagram of a computer device in an embodiment of the present invention. Specific embodiments
[0052] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.
[0053] In one embodiment, as Figure 1 , Figure 2 shown, a method for detecting the road closure state is provided, including the following steps:
[0054] In step S110, recall the trajectory points of each road segment in the initial road segment set, and convert the recalled trajectory points into a number of road segment sequences;
[0055] Optionally, use indicators such as yaw / turnaround behavior and sudden drop in popularity to roughly screen out a set of road segments (links) that may be in a closed state from the entire road network. It should be noted that yaw / turnaround behavior means that the vehicle should originally travel along the normal route, but there is a yaw or turnaround, which may imply that the road ahead is closed; a sudden drop in popularity means that the traffic flow of a certain road suddenly decreases significantly, which may also be caused by road closure. Specifically, a large amount of vehicle travel trajectory data can be collected, which can include information such as the driving position, driving direction, and timestamp of the vehicle. Then, the direction change of the vehicle trajectory can be analyzed to determine whether the vehicle has a yaw or turnaround behavior. For example, the direction angle between adjacent trajectory points can be calculated. If the angle exceeds a certain threshold (such as 90 degrees), it is considered that the vehicle may have a yaw or turnaround. Or count the number of passing vehicles on each road in different time periods, and calculate the change rate of the number of passing vehicles in adjacent time periods. If the change rate exceeds a certain threshold (such as a 50% decrease), it is considered that there is a sudden drop in popularity on this road. Then, the road segments detected with yaw / turnaround behavior or sudden drop in popularity can be added to the roughly screened link set.
[0056] For each link in the rough screening set, recall vehicle trajectories within a certain range around it, and use a map matching algorithm to map these trajectory points to the links in the road network, forming several road segment sequences. Specifically, each link in the rough screening set can be traversed, and according to its geographical location information, the trajectory points located within a certain range around it can be screened out from the collected vehicle trajectory data. Then, common map matching algorithms such as those based on HMM (Hidden Markov Model) can be used to convert the recalled trajectory point strings into several road segment sequences. This algorithm comprehensively considers the spatial position, driving direction of the trajectory points, and the topological structure of the road network, and accurately maps the trajectory points to the corresponding road links.
[0057] It should be noted that the surrounding range can be set according to the actual situation. For example, a circular area with a radius (such as 500 meters) is set with the center point of the link as the center.
[0058] In step S120, divide the several road segment sequences into a first sequence group and a second sequence group. The first sequence group includes target road segments, and the second sequence group does not include the target road segments;
[0059] Optionally, group the obtained several road segment sequences. That is, for each link sequence, check whether it contains the link of the target road. If it contains, divide this sequence into group A; if it does not contain, divide it into group B. Thus, a first sequence group A including target road segments and a second sequence group B not including target road segments are obtained. Among them, the first sequence group A can be used to learn the features and patterns directly related to the target road, and the second sequence group, as a control group, helps the model learn the differential features between the target road and other roads.
[0060] In step S130, determine the trajectory point feature sequence corresponding to the road segment sequence with a preset length;
[0061] Optionally, search for link sequences with a length of n in the first sequence group A and the second sequence group B. For each link sequence with a length of n, by querying the trajectory point expression feature result table obtained by pre - performing graph convolution on the road network through a graph convolutional neural network, obtain the trajectory point feature vector corresponding to each link with a length of n, and convert the link sequence into a trajectory point feature sequence.
[0062] In step S140, perform encoding processing on the trajectory point feature sequence, and perform feature fusion on the encoded trajectory point features in the first sequence group and the second sequence group to obtain the expression feature corresponding to the target road segment;
[0063] Optionally, a feature encoding model RNN (such as variants like LSTM or GRU) can be used to process the trajectory point feature sequence, capture the temporal information in the sequence, and add context information to the features. In the trajectory point feature encoding, the trajectory point feature sequence is arranged in chronological order, and the features of each trajectory point are related to the previous trajectory points to a certain extent. The RNN can utilize its cyclic structure to capture this temporal information, transfer the feature information of the previous trajectory points in the sequence to the subsequent trajectory points, thereby adding context information to each trajectory point feature. It should be noted that during the encoding process, the trajectory points can be encrypted (such as adding noise or feature transformation) or thinned to enhance the data. The trajectory point feature encoding can capture the temporal information through the RNN and its variants, and combined with the data augmentation operation, can provide a richer and more robust feature representation for subsequent model training.
[0064] It can be understood that since the length of the temporal features after encoding processing is indefinite, therefore, it can be converted into a fixed-length trajectory representation through mean pooling. That is, the features can be averaged in the temporal dimension, and the feature sequence can be divided into fixed-length windows and the average value is calculated. For example, for a feature sequence with a length of T, it is divided into several fixed-length windows, and the average value of the features within each window is calculated, so as to obtain a fixed-length feature vector, which synthesizes the average feature information of the entire sequence in different time windows. To achieve the conversion of the encoded features from an indefinite length to a fixed length.
[0065] Among them, the thinning operation refers to selectively reducing some trajectory points to simulate trajectory data with different densities. In practical applications, the collection frequencies of trajectory data may be different. Some trajectory points may be too dense, while some are relatively sparse. Through the thinning operation, the model can perform well on trajectory data with different densities. For example, trajectory points can be sampled at a certain interval, or screened according to the importance of the trajectory points (such as speed change, direction change, etc.), and some key trajectory points are retained, thereby reducing the data volume and also increasing the generalization ability of the model.
[0066] Optionally, after encoding the trajectory point features in the first sequence group and the second sequence group, the corresponding trajectory representation features of the first sequence group and the second sequence group can be grouped and summed according to time slices respectively to obtain the comprehensive trajectory point features corresponding to each time slice, and then the comprehensive trajectory point features corresponding to the first sequence group and the second sequence group of different time slices are concatenated to obtain a long vector as the expression feature of the target road segment for subsequent classification use.
[0067] In step S150, based on the expression feature of the target road segment, it is predicted that the target road segment is in an open state / closed state.
[0068] Optionally, input the obtained expression features of the target road segment into a pre-trained classification model. The classification model includes a fully connected layer and an activation function such as Sigmoid. After processing, a predicted probability value can be output, that is, the probability value that the target road segment is in a closed state or an open state, so as to realize the prediction of the road closed state.
[0069] In an embodiment of the present application, a method for detecting the road closed state is provided, including: recalling trajectory points for each road segment in the initial road segment set, and converting the recalled trajectory points into a number of road segment sequences; dividing the number of road segment sequences into a first sequence group and a second sequence group, the first sequence group includes the target road segment, and the second sequence group does not include the target road segment; determining a trajectory point feature sequence corresponding to a road segment sequence with a preset length; performing encoding processing on the trajectory point feature sequence, and performing feature fusion on the encoded trajectory point features in the first sequence group and the second sequence group to obtain the expression features corresponding to the target road segment; based on the expression features of the target road segment, predicting that the target road segment is in an open state / closed state. In an embodiment of the present application, the recalled trajectory points are converted into road segment sequences and grouped, comprehensively considering the information of the first sequence group including the target road segment and the second sequence group not including the target road segment. This way can reflect the state of the road network from multiple perspectives, avoiding the limitation of traditional methods that only rely on a single road feature, and further enhancing the representation ability of complex road networks. When performing encoding processing on the trajectory point feature sequence, a method capable of capturing temporal information is adopted, such as RNN and its variants. This enables the model to learn the variation law of the trajectory over time and enhances the expression ability of the features. The entire method realizes an automated processing flow from trajectory point recall, sequence grouping, feature encoding to final prediction, reducing the workload of manual intervention and manual feature construction. This not only improves the processing efficiency but also reduces the errors caused by human factors, further enhancing the timeliness and accuracy of the method.
[0070] In an embodiment of the present application, the performing encoding processing on the trajectory point feature sequence includes:
[0071] Performing encoding processing on the trajectory point feature sequences corresponding to the first sequence group and the second sequence group respectively to add temporal context to the trajectory point feature sequences;
[0072] Performing an encryption operation or a thinning operation on the trajectory point feature sequence during the encoding process to enhance the trajectory point feature sequence.
[0073] Optionally, a feature encoding model RNN (such as variants like LSTM or GRU) can be used to process the trajectory point feature sequence, capture the temporal information in the sequence, and add context information to the features. In the trajectory point feature encoding, the trajectory point feature sequence is arranged in chronological order, and the features of each trajectory point are related to the previous trajectory points to a certain extent. Before encoding and processing the trajectory point feature sequence, the trajectory point feature sequence can be enhanced, such as encryption operations or downsampling operations. Performing encryption operations includes adding noise to the trajectory point feature sequence, such as Gaussian noise. Alternatively, linear or non-linear transformations can be performed on the trajectory point feature sequence, such as using a linear scaling algorithm or a non-linear function, such as the ReLU function, to implement the encryption operation. The downsampling operation selectively reduces some of the trajectory points. For example, interval sampling and sampling based on feature importance. Interval sampling means extracting trajectory points at a fixed interval. For example, extracting one trajectory point every \(m\) trajectory points. Sampling based on feature importance means screening according to the feature importance of the trajectory points and retaining some key trajectory points. For example, the importance can be evaluated based on features such as the speed change and direction change of the trajectory points.
[0074] In an embodiment of the present application, the encoding and processing of the trajectory point feature sequences corresponding to the first sequence group and the second sequence group respectively includes:
[0075] Inputting the trajectory point sequences corresponding to the first sequence group and the second sequence group into an LSTM network, the LSTM network including a plurality of LSTM units;
[0076] Each LSTM unit processes the expression feature of one trajectory point at each time step to obtain the hidden state at each time step, and each hidden state includes the context temporal information of the trajectory point sequence.
[0077] Optionally, in practical applications, LSTM or GRU can be selected to solve the problem of gradient vanishing or explosion existing in traditional RNNs. The following takes LSTM as an example for detailed description: The LSTM network consists of a plurality of LSTM units, and each LSTM unit processes the feature vector of one trajectory point at each time step. At time step t = 0, the hidden state and the cell state can be initialized, usually initialized as all-zero vectors. Then, each time step is processed in a loop: calculate the forget gate, input gate, and candidate cell state, and calculate and update the cell state based on the forget gate, input gate, candidate cell state, and the cell state at the previous moment. Then calculate the output gate, and update the hidden state according to the output gate and the updated cell state. Through this process, the hidden state at each time step can be obtained, and these hidden states contain the temporal information of the trajectory point sequence, that is, the encoding of the trajectory point features is completed.
[0078] In an embodiment of the present application, the feature fusion of the encoded trajectory point features in the first sequence group and the second sequence group includes:
[0079] Perform mean pooling on the encoded trajectory point feature sequence to convert the variable-length time-series features into fixed-length trajectory representation features;
[0080] Concatenate the trajectory point features after mean pooling in the first sequence group and the second sequence group according to time slices to obtain the expression features corresponding to the road segment of the target.
[0081] Optionally, since the length of the time-series features after encoding is variable, mean pooling can be used to convert them into fixed-length trajectory representations. That is, the features can be averaged in the time dimension, dividing the feature sequence into fixed-length windows and calculating the average. For example, for a feature sequence of length T, it is divided into several fixed-length windows, and the average value of the features in each window is calculated to obtain a fixed-length feature vector, which synthesizes the average feature information of the entire sequence in different time windows. To achieve the conversion of the encoded features from variable length to fixed length. Then, the trajectory representation features corresponding to the first sequence group and the second sequence group can be grouped and summed according to time slices respectively, and based on the summation results, the trajectory representation features corresponding to the first sequence group and the second sequence group in different time slices are concatenated to obtain the expression features corresponding to the road segment of the target.
[0082] In an embodiment of the present application, the concatenating the trajectory point features after mean pooling in the first sequence group and the second sequence group according to time slices includes:
[0083] Divide the first sequence group and the second sequence group according to the corresponding time slices respectively;
[0084] Add all the trajectory point features in each time slice element by element to obtain the comprehensive trajectory feature in each time slice.
[0085] Concatenate the comprehensive trajectory features obtained by summing in each time slice of the first sequence group and the second sequence group in sequence to obtain the trajectory representation features of the target road segment.
[0086] Wherein, a time slice refers to dividing the time range of the entire trajectory data into several fixed-length time periods. To facilitate the statistics and analysis of trajectory features in different time periods.
[0087] Optionally, for each trajectory point feature in the first sequence group and the second sequence group, grouping can be performed according to the corresponding time slice. Then, within each time slice, all the trajectory point features belonging to that time slice are added element by element. Through grouped summation, multiple trajectory feature information within the same time slice can be integrated to obtain the comprehensive trajectory feature of the group under each time slice. Then, the comprehensive trajectory features obtained by summing the first sequence group and the second sequence group under each time slice can be concatenated in sequence. For example, if the features of the first sequence group at time slices 1, 2, and 3 are A1, A2, and A3 respectively, and the features of the second sequence group at time slices 1, 2, and 3 are B1, B2, and B3 respectively, then the concatenated feature vector is [A1, B1, A2, B2, A3, B3]. By concatenating the features of the two groups at different time slices, the feature information of the target road (the first sequence group) and the non-target road (the second sequence group) at different time slices is fused together to form a long vector, which is used as the expression feature of the target road section for subsequent classification tasks.
[0088] In an embodiment of the present application, the determining the trajectory point feature sequence corresponding to the road section sequence with a preset length includes:
[0089] Constructing a road network graph based on road network data, taking each road and direction as a node in the road network graph, and the edges between the nodes representing the connectivity state of the roads;
[0090] Performing a graph convolution operation on the road network graph to obtain the initial expression features of each road section;
[0091] Determining the initial expression feature corresponding to each road section in the road section sequence with a preset length as the trajectory point feature sequence.
[0092] Optionally, road network data can be obtained, and roads and directions are taken as nodes of the road network topology graph. A two-way road is regarded as two different nodes, corresponding to two driving directions respectively. The edges between the nodes represent the connectivity relationship of the road sections to construct the road network graph corresponding to the road network data. Then, a graph convolutional neural network, such as the GIN (Graph Isomorphism Network) method, can be used for the graph convolution operation. Obtaining the initial feature expression {F i = [f 0 , f 1 , …, f k , i ∈ [0, N]}. Where N is the total number of roads in the road network and k is the road feature length. Through graph convolution, the features of the node itself and the nodes connected to it are fused, so as to generate a more expressive initial feature expression for each link (i.e., the road section corresponding to the edge in the topology graph).
[0093] It should be noted that the GIN algorithm uses the general implementation of the algorithm in PyTorch Geometric [3]. Other graph convolution methods can also be tried here, which are not limited in this application.
[0094] Store the initial expression features of each road segment generated by graph convolution into the feature result table to obtain the feature result table [F 0 ,F 1 ,…,F n . After finding a road segment sequence with a preset length in the road segment sequence, query the feature result table to obtain the initial expression feature corresponding to each road segment as the trajectory point feature sequence.
[0095] Among them, the initial features of the nodes include id-embedding, road length, road grade, number of lanes, etc. A unique identifier can be assigned to each node and embedded into a low-dimensional vector space to obtain id-embedding, so that the model can learn the unique features of each node. This embedding method can help the model better distinguish different road nodes. Use the actual physical length of the road as the initial feature of the node to reflect the scale of the road. Longer roads may have different characteristics in terms of traffic flow, etc. Roads with different road grades have different status and roles in the traffic network and also have different capacities for carrying traffic flow. For example, arterial roads and secondary arterial roads. The number of lanes affects the traffic capacity of the road and is an important indicator for describing road characteristics.
[0096] See Figure 3 , in an embodiment of the present application, the method further includes:
[0097] Construct a road network graph based on road network data, and perform graph convolution operations on the road network graph through a graph neural network to obtain the initial expression features of each road segment;
[0098] Obtain historical trajectory point data within a preset range of a target road segment within a preset time range, and convert the historical trajectory point data into a number of road segment sequences;
[0099] Divide the number of road segment sequences into a first sequence group and a second sequence group. The first sequence group includes the target road segment, and the second sequence group does not include the target road segment;
[0100] Based on the initial expression features of each road segment, determine the trajectory point features corresponding to a road segment sequence with a preset length;
[0101] Encode the trajectory point features through a feature encoding model, and fuse the encoded trajectory point features in the first sequence group and the second sequence group to obtain the expression features corresponding to the target road section;
[0102] Based on the expression features of the target road section, predict the probability value of the target road section being in an open state / closed state through a classification model;
[0103] Based on the probability value and a preset loss function, iteratively train the graph neural network, the feature encoding model, and the classification model until the preset convergence condition is met.
[0104] Optionally, the above road closure state detection result involves a graph convolutional neural network, a feature encoding model, and a classification model. The specific training process of the above models is as follows: Use the road and its direction as the basic unit of the topological graph, that is, each "road + direction" combination forms a node, and the edges between the nodes represent the connection relationship of the nodes. Use a graph neural network, such as the GIN (Graph Isomorphism Network) method, to perform graph convolution operations on the road network graph to obtain the initial expression features of each road section. For the target link, filter out the trajectory data within a certain range (defined by a straight-line distance less than a certain set threshold) around it and within a specific time period. Use a map matching algorithm based on the HMM (Hidden Markov Model) to convert the original trajectory point string into several link sequences.
[0105] Group the obtained several road section sequences, that is, for each link sequence, check whether it contains the link of the target road. If it contains, divide the sequence into group A; if it does not contain, divide it into group B. Thus, obtain the first sequence group A including the target road section and the second sequence group B not including the target road section. Among them, the first sequence group A can be used to learn the features and patterns directly related to the target road, and the second sequence group, as a control group, helps the model learn the differential features between the target road and other roads.
[0106] Search for link sequences of length n in the first sequence group A and the second sequence group B. For each link sequence of length n, obtain the trajectory point feature vector corresponding to each link of length n by querying the trajectory point expression feature result table obtained by preforming graph convolution on the road network through a graph convolutional neural network, and convert the link sequence into a trajectory point feature sequence.
[0107] Then, a feature encoding model RNN (such as variants like LSTM or GRU) can be used to process the trajectory point feature sequence, capture the temporal information in the sequence, and add context information to the features. In the trajectory point feature encoding, the trajectory point feature sequence is arranged in chronological order, and the features of each trajectory point are related to the previous trajectory points to a certain extent. RNN can utilize its cyclic structure to capture this temporal information, transfer the feature information of the previous trajectory points in the sequence to the subsequent trajectory points, thereby adding context information to each trajectory point feature. It should be noted that during the encoding process, the trajectory points can be encrypted (such as adding noise or feature transformation) or thinned to enhance the data. Trajectory point feature encoding can capture temporal information through RNN and its variants, and combined with data augmentation operations, can provide richer and more robust feature representations for subsequent model training.
[0108] It can be understood that since the length of the temporal features after encoding processing is uncertain, therefore, it can be converted into a fixed-length trajectory representation through mean pooling. That is, the features can be averaged in the temporal dimension, dividing the feature sequence into fixed-length windows and calculating the average value. For example, for a feature sequence with a length of T, it is divided into several fixed-length windows, and the average value of the features within each window is calculated, thereby obtaining a fixed-length feature vector, which synthesizes the average feature information of the entire sequence in different time windows. To achieve the conversion of the encoded features from an uncertain length to a fixed length.
[0109] After encoding the trajectory point features in the first sequence group and the second sequence group, the corresponding trajectory representation features of the first sequence group and the second sequence group can be grouped and summed according to time slices respectively to obtain the comprehensive trajectory point features corresponding to each time slice. Then, the comprehensive trajectory point features corresponding to the first sequence group and the second sequence group in different time slices are concatenated to obtain a long vector, which is used as the expression feature of the target road segment for subsequent classification.
[0110] The obtained expression feature of the target road segment is input into a pre-trained classification model, which includes a fully connected layer and an activation function, such as Sigmoid. After processing, a predicted probability value can be output, that is, the probability value that the target road segment is in a closed state or an open state.
[0111] Based on the probability value, the true label, and the loss function Binary Cross-Entropy Loss, the loss value of each iteration process is calculated, and the model parameters of the above graph convolutional neural network, feature encoding model, and classification model are adjusted based on the loss value until the model converges. After the above training process, the weights of the three main modules can be obtained after the model converges:
[0112] The weights of the GIN module: Determine the fusion method and intensity of node features during the graph convolution process, and affect the generation of the initial feature representation of each link.
[0113] The weights of the RNN module: Control the encoding process of the RNN for the feature sequence of trajectory points, including the capture of temporal information and the generation of context features.
[0114] The weights of the classification module: In the fully connected layer, these weights determine how to map the expression features of the target link to the final classification result, and play a key role in the classification performance of the model.
[0115] These weights can be used for subsequent prediction of new data or fine-tuned as initial parameters when the model is further optimized. Compared with manually constructing features, the model training requires fewer hyperparameters to be adjusted (such as the order of upstream and downstream feature construction, etc.), which is convenient for adapting to different regions or different road network data versions, etc.
[0116] In the embodiments of the present application, the recalled trajectory points are converted into a road segment sequence and grouped. The information of the first sequence group containing the target road segment and the second sequence group not containing the target road segment is comprehensively considered. This method can reflect the state of the road network from multiple perspectives, avoids the limitations of traditional methods that only rely on single road features, and further enhances the representation ability of complex road networks. When encoding the feature sequence of trajectory points, methods that can capture temporal information are used, such as RNN and its variants. This enables the model to learn the changing rules of the trajectory over time and enhances the expression ability of features. The entire method realizes an automated processing flow from trajectory point recall, sequence grouping, feature encoding to final prediction, reducing the workload of manual intervention and manual feature construction. This not only improves the processing efficiency but also reduces the errors caused by human factors, further enhancing the timeliness and accuracy of the method.
[0117] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0118] In one embodiment, a road closure state detection device is provided. The road closure state detection device corresponds one-to-one with the road closure state detection method in the above embodiment. As Figure 4 shown, the road closure state detection device includes a road segment sequence acquisition unit 10, a road segment sequence grouping unit 20, a trajectory point feature sequence determination unit 30, and a prediction unit 50. The detailed description of each functional module is as follows:
[0119] The road segment sequence acquisition unit 10 is configured to recall trajectory points for each road segment in the initial road segment set, and convert the recalled trajectory points into a plurality of road segment sequences;
[0120] The road segment sequence grouping unit 20 is configured to divide the plurality of road segment sequences into a first sequence group and a second sequence group, where the first sequence group includes the target road segment, and the second sequence group does not include the target road segment;
[0121] The trajectory point feature sequence determination unit 30 is configured to determine a trajectory point feature sequence corresponding to a road segment sequence with a preset length;
[0122] The encoding unit 40 is configured to perform encoding processing on the trajectory point feature sequence, and perform feature fusion on the encoded trajectory point features in the first sequence group and the second sequence group to obtain an expression feature corresponding to the target road segment;
[0123] The prediction unit 50 is configured to predict whether the target road segment is in an open state or a closed state based on the expression feature of the target road segment.
[0124] In an embodiment of the present application, the encoding unit 40 is further configured to:
[0125] Perform encoding processing on the trajectory point feature sequences corresponding to the first sequence group and the second sequence group respectively to add temporal context to the trajectory point feature sequences;
[0126] Perform an encryption operation or a thinning operation on the trajectory point feature sequence during the encoding process to enhance the trajectory point feature sequence.
[0127] In an embodiment of the present application, the encoding unit 40 is further configured to:
[0128] Input the trajectory point sequences corresponding to the first sequence group and the second sequence group into an LSTM network, where the LSTM network includes a plurality of LSTM units;
[0129] Each LSTM unit processes a trajectory point expression feature at each time step to obtain a hidden state at each time step, and each hidden state includes the context temporal information of the trajectory point sequence.
[0130] In an embodiment of the present application, the encoding unit 40 is further configured to:
[0131] Perform mean pooling processing on the encoded trajectory point feature sequence to convert the variable-length temporal features into fixed-length trajectory representation features;
[0132] Concatenate the trajectory point features after mean pooling in the first sequence group and the second sequence group according to time slices to obtain the expression features corresponding to the road section of the target.
[0133] In an embodiment of the present application, the encoding unit 40 is further configured to:
[0134] Divide the first sequence group and the second sequence group according to the corresponding time slices respectively;
[0135] Add all the trajectory point features in each time slice element by element to obtain the comprehensive trajectory feature under each time slice.
[0136] Concatenate the comprehensive trajectory features obtained by summing the first sequence group and the second sequence group under each time slice in sequence to obtain the trajectory representation features of the target road section.
[0137] In an embodiment of the present application, the trajectory point feature sequence determination unit 30 is further configured to:
[0138] Construct a road network graph based on the road network data, take each road and direction as a node in the road network graph, and the edges between the nodes represent the connectivity status of the roads;
[0139] Perform a graph convolution operation on the road network graph to obtain the initial expression features of each road section;
[0140] Determine the initial expression features corresponding to each road section in the road section sequence with a preset length as the trajectory point feature sequence.
[0141] In an embodiment of the present application, the device further includes a model training unit, which is used for:
[0142] Construct a road network graph based on the road network data, and perform a graph convolution operation on the road network graph through a graph neural network to obtain the initial expression features of each road section;
[0143] Obtain the historical trajectory point data within a preset range of the target road section within a preset time range, and convert the historical trajectory point data into a plurality of road section sequences;
[0144] Divide the plurality of road section sequences into a first sequence group and a second sequence group, where the first sequence group includes the target road section and the second sequence group does not include the target road section;
[0145] Based on the initial expression features of each road section, determine the trajectory point features corresponding to the road section sequence with a preset length;
[0146] The trajectory point features are encoded by a feature encoding model, and the encoded trajectory point features in the first sequence group and the second sequence group are feature fused to obtain the expression features corresponding to the target road section;
[0147] Based on the expression features of the target road section, the probability value that the target road section is in an open state / closed state is predicted through a classification model;
[0148] Based on the probability value and a preset loss function, the graph neural network, the feature encoding model, and the classification model are iteratively trained until a preset convergence condition is met.
[0149] In the embodiment of the present application, the recalled trajectory points are converted into a road section sequence and grouped. The information of the first sequence group containing the target road section and the second sequence group not containing the target road section is comprehensively considered. This method can reflect the state of the road network from multiple perspectives, avoids the limitation of traditional methods that only rely on a single road feature, and further enhances the representation ability of complex road networks. When encoding the trajectory point feature sequence, a method capable of capturing temporal information, such as RNN and its variants, is adopted. This enables the model to learn the variation law of the trajectory over time and enhances the expression ability of the features. The entire method realizes an automated processing flow from trajectory point recall, sequence grouping, feature encoding to final prediction, reducing the workload of manual intervention and manual feature construction. This not only improves the processing efficiency but also reduces the errors caused by human factors, further enhancing the timeliness and accuracy of the method.
[0150] For the specific limitations of the road closure state detection device, reference can be made to the limitations of the road closure state detection method in the above text, which will not be elaborated here. Each module in the above road closure state detection device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form for the processor to call and execute the operations corresponding to the above respective modules.
[0151] In one embodiment, a computer device is provided. The computer device can be a terminal device, and its internal structure diagram can be as Figure 5As shown. The computer device includes a processor, a memory, and a network interface connected by 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 readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a road closure state detection method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0152] In an embodiment of the present application, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the road closure state detection method as described above are implemented.
[0153] In an embodiment of the application, a readable storage medium is provided. The readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps of the road closure state detection method as described above are implemented.
[0154] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. 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 an external cache. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), 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), etc.
[0155] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0156] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for detecting a road closure state, characterized in that: The method comprises: Recalling the trajectory points of each road segment in the initial road segment set, and converting the recalled trajectory points into a number of road segment sequences; Dividing the plurality of road segment sequences into a first sequence group and a second sequence group, wherein the first sequence group includes a target road segment, and the second sequence group does not include the target road segment; Determine a trajectory point feature sequence corresponding to a road segment sequence having a preset length; Encoding the trajectory point feature sequence, and fusing the encoded trajectory point features in the first sequence group and the second sequence group to obtain an expression feature corresponding to the target road section; Based on the expression characteristics of the target road section, it is predicted that the target road section is in an open state / closed state.
2. The road closure status detection method according to claim 1, characterized in that: The encoding process of the trajectory point feature sequence comprises: respectively encoding the trajectory point feature sequences corresponding to the first sequence group and the second sequence group to add a temporal context to the trajectory point feature sequences; During the encoding process, an encryption operation or a thinning operation is performed on the trajectory point feature sequence to enhance the trajectory point feature sequence.
3. The road closure status detection method according to claim 2, characterized in that: The encoding process of the trajectory point feature sequences corresponding to the first sequence group and the second sequence group respectively includes: Inputting the trajectory point sequences corresponding to the first sequence group and the second sequence group into an LSTM network, wherein the LSTM network includes a plurality of LSTM units; Each LSTM unit processes a trajectory point expression feature at each time step to obtain a hidden state at each time step, and each hidden state includes the contextual timing information of the trajectory point sequence.
4. The road closure status detection method according to claim 2, characterized in that: The step of fusing the encoded trajectory point features in the first sequence group and the second sequence group includes: The encoded trajectory point feature sequence is subjected to mean pooling to convert the indefinite-length time series features into fixed-length trajectory representation features; The trajectory point features after mean pooling in the first sequence group and the second sequence group are concatenated according to time slices to obtain the expression features corresponding to the road section of the target.
5. The road closure status detection method according to claim 4, characterized in that: The step of performing feature concatenation of the trajectory point features after mean pooling in the first sequence group and the second sequence group according to time slices includes: respectively dividing the first sequence group and the second sequence group according to corresponding time slices; All trajectory point features in each time slice are added element by element to obtain the comprehensive trajectory features in each time slice. The comprehensive trajectory features obtained by summing the first sequence group and the second sequence group in each time slice are sequentially connected in series to obtain the trajectory representation features of the target road section.
6. The road closure status detection method according to claim 1, characterized in that: The trajectory point feature sequence corresponding to the road segment sequence having a predetermined length is determined to include: Construct a road network graph based on the road network data, taking each road and direction as a node in the road network graph, and the edges between the nodes represent the connectivity status of the roads; Performing a graph convolution operation on the road network graph to obtain initial expression features of each road section; An initial expression feature corresponding to each road segment in a road segment sequence having a preset length is determined as the trajectory point feature sequence.
7. The road closure status detection method according to claim 1, characterized in that: The method further comprises: Construct a road network graph based on the road network data, and perform a graph convolution operation on the road network graph through a graph neural network to obtain the initial expression features of each road section; Acquire historical trajectory point data within a preset range of a target road section within a preset time range, and convert the historical trajectory point data into a plurality of road section sequences; Dividing the plurality of road segment sequences into a first sequence group and a second sequence group, wherein the first sequence group includes a target road segment, and the second sequence group does not include the target road segment; Determining trajectory point features corresponding to a road segment sequence having a preset length based on the initial expression features of each road segment; Encoding the trajectory point features through a feature encoding model, and fusing the encoded trajectory point features in the first sequence group and the second sequence group to obtain expression features corresponding to the target road section; Based on the expression characteristics of the target road section, a probability value of whether the target road section is in an open state or a closed state is predicted by a classification model; Based on the probability value and the preset loss function, the graph neural network, feature encoding model and classification model are iteratively trained until the preset convergence conditions are met.
8. A road closure status detection device, characterized in that: The device comprises: A road segment sequence acquisition unit, used to recall trajectory points of each road segment in the initial road segment set, and convert the recalled trajectory points into a plurality of road segment sequences; a road segment sequence grouping unit, configured to divide the plurality of road segment sequences into a first sequence group and a second sequence group, wherein the first sequence group includes a target road segment, and the second sequence group does not include the target road segment; A trajectory point feature sequence determining unit, used to determine a trajectory point feature sequence corresponding to a road section sequence having a preset length; an encoding unit, configured to encode the trajectory point feature sequence, and perform feature fusion on the encoded trajectory point features in the first sequence group and the second sequence group to obtain an expression feature corresponding to the target road section; The prediction unit is used to predict whether the target road section is in an open state or a closed state based on the expression characteristics of the target road section.
9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the steps of the road closure status detection method as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the road closure status detection method as described in any one of claims 1 to 7 are implemented.