Itinerary safety risk assessment method, device, and medium

By using a dual-channel VAE network and GCN to learn road segment representations, combined with supervised contrastive loss and incremental evaluation, the problem of low accuracy and insufficient generalization ability of existing methods in trip safety risk assessment is solved, and efficient trip safety risk identification is achieved.

CN117033926BActive Publication Date: 2026-01-20INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310820382.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2026-01-20
Estimated Expiration
2043-07-05

AI Technical Summary

Technical Problem

Existing abnormal trip detection methods based on trajectory data cannot effectively assess trip safety risks, especially in the absence of labeled data, and their generalization ability is insufficient to adapt to complex safety-related abnormal trips.

Method used

A dual-channel VAE network is used to extract the movement behavior features and road segment transfer features of the trip trajectory data. Combined with GCN to learn the road segment representation, the normal trip and the risk trip are identified by the fusion network. Supervised contrastive loss and incremental evaluation strategy are introduced to improve the evaluation accuracy and robustness of the model.

Benefits of technology

It improves the accuracy of trip safety risk assessment and the generalization ability of the model, enabling effective identification of risky trips with a small number of labeled samples, and is applicable to real-time assessment in online scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117033926B_ABST
    Figure CN117033926B_ABST
Patent Text Reader

Abstract

The present application provides a kind of trip safety risk assessment method, device, medium, method includes: obtaining trip trajectory data;Extract the moving behavior feature of trajectory in the trip trajectory data, the road network matching is carried out to the trip trajectory data, and the road section transfer feature of trajectory is extracted;The moving behavior feature and the road section transfer feature are respectively as the feature input of one channel of double-channel VAE network, and the moving behavior feature learning model and the road section transfer feature learning model that are independent of each other are generated;The moving behavior feature learning model and the road section transfer feature learning model are aggregated using fusion network, to obtain fusion trajectory feature, identify normal trip and risk trip.The method improves the effectiveness and accuracy of model for real-time evaluation of trip safety risk.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of risk assessment, in particular to a trip safety risk assessment method, device and medium. BACKGROUND

[0002] Currently, the safety of passengers in a ride-hailing service is mainly detected by using in-vehicle monitoring videos and trip recordings, etc. to detect whether an abnormal event occurs by using computer vision and speech recognition technology. However, video and voice data usually endanger the privacy of customers and should be used cautiously in practice. In comparison, trajectory data not only describes the driving manner of a driver, but also effectively reflects environmental information after being combined with road network data and does not contain identification information. Therefore, trajectory data is more suitable for identifying abnormal trips related to safety.

[0003] Existing abnormal trip detection methods based on trajectory data can be mainly divided into two categories, metric-based methods and learning-based methods. The metric-based method uses a pre-defined metric to calculate an abnormal score, thereby measuring the difference between an ongoing trajectory and a reference trajectory. Then a specific threshold is used to identify an abnormal trip. However, these methods cannot model context information such as road conditions and driver behavior, and are prone to false alarms. On the other hand, the metric mechanism is mostly designed for specific scenarios and has poor generalization ability. In order to solve these problems, some scholars have proposed learning-based methods to capture context features that can effectively evaluate abnormalities, while mining deep abnormal features and having better generalization ability.

[0004] However, most existing learning-based abnormal trip detection methods are designed for detours that are quite different from safety-related abnormal trips, and are not suitable for safety analysis of trips, mainly because: on the one hand, safety-related abnormal trips are more complex, and safety events are affected by multiple factors such as booking time, parking time and crime rate in urban areas. Modeling and analyzing multiple related factors are of great significance to trip safety risk assessment. On the other hand, there is a lack of data marked as abnormal trips in trip data. Ride-hailing service platforms rely on passenger reports to collect safety event samples, resulting in the scarcity of labeled data. This requires that the abnormal detection method has strong robustness to train on a small amount of labeled samples. SUMMARY

[0005] In view of the problem that the current learning-based method cannot be applied to trip safety risk assessment, the present application provides a trip safety risk assessment method, device and medium, which improves the effectiveness and accuracy of real-time assessment of trip safety risk by the model.

[0006] To achieve the above purpose, the present application provides a trip safety risk assessment method, comprising:

[0007] obtaining trip trajectory data;

[0008] extracting a moving behavior feature of a trajectory in the trip trajectory data,

[0009] performing road network matching on the trip trajectory data to extract a road segment transition feature of the trajectory;

[0010] inputting the moving behavior feature and the road segment transition feature as feature inputs of one channel of a double-channel VAE network respectively to generate a moving behavior feature learning model and a road segment transition feature learning model which are independent of each other;

[0011] aggregating the moving behavior feature learning model and the road segment transition feature learning model by using a fusion network to obtain a fused trajectory feature, and identifying a normal trip and a risk trip.

[0012] Optionally, the performing road network matching on the trip trajectory data to extract a road segment transition feature of the trajectory comprises:

[0013] performing road network matching on the trip trajectory data to obtain a road segment standard sequence of the trajectory data, and modeling an environment feature of the trip trajectory data;

[0014] learning a road segment representation by using a GCN to generate the road segment transition feature containing traffic condition information.

[0015] Optionally, inputting the moving behavior feature as a feature input of one channel of a double-channel VAE network to generate a moving behavior feature learning model comprises:

[0016] taking a sequence of the moving behavior feature as an input sequence, the moving behavior feature including a speed feature and a distance feature;

[0017] constructing a training task by using a reconstructed average speed and a cumulative distance to obtain a reconstructed sequence, and learning a moving behavior feature hidden space;

[0018] using a cross-entropy loss between the input sequence and the reconstructed sequence to perform model optimization.

[0019] Optionally, inputting the road segment transition feature as a feature input of one channel of a double-channel VAE network to generate a road segment transition feature learning model comprises:

[0020] taking a sequence of the road segment transition feature as an input sequence,

[0021] learning a transition feature of a road segment by maximizing a generation probability of the road segment in observable data to generate the road segment transition feature learning model.

[0022] Optionally, the normal trip and the risk trip are identified by using a supervised contrastive loss, comprising:

[0023]

[0024] wherein, represents a contrastive loss function, hf represents a hidden representation aggregated with time information and start-end point information, h f = concat(t1; h T ; h od );

[0025] h T = concat(mu m , sigma m , mu r , sigma r ), using the relevant vectors (mu m , sigma m ) and (mu r , sigma r ) generated by the dual-channel VAE;

[0026] h od = concat(e1, e k ), e1, e k represent embedding vectors of start-end road segments.

[0027] BN represents the size of the current batch, i, j represent the indices of samples, l i , l j represent the labels of samples i and j, t1 represents the departure time of the trip, tau represents the temperature coefficient.

[0028] Optionally, after using the fusion network to aggregate the mobile behavior feature learning model and the road segment transition feature learning model to obtain the fused trajectory feature and identify normal trips and risky trips, the method further comprises:

[0029] Using a part of the observable trajectory data in the trip trajectory data, a trip anomaly score is calculated through an incremental evaluation strategy to evaluate the safety risk of the trip.

[0030] Optionally, calculating the trip anomaly score through the incremental evaluation strategy comprises:

[0031] For the observable trajectory data, an initial trip state at the current time step is recorded, and the initial trip state comprises an initial trip anomaly score.

[0032] Whether further reasoning is needed is determined by monitoring whether the collected observable trajectory data reaches a new window or switches to a new road segment.

[0033] In the case of further inference, an encoder is initialized with the relevant hidden state, and one step of forward computation is performed on the most recently arrived data.

[0034] The trip anomaly score is recalculated and the record trip state is updated.

[0035] Optionally, a sliding window of a fixed time length is used to extract the moving behavior features of the trajectories in the trip trajectory data.

[0036] Another aspect of the present application also provides a trip safety risk assessment device, which adopts the trip safety risk assessment method described above, and at least comprises:

[0037] A data acquisition module is configured to acquire trip trajectory data.

[0038] A feature extraction module is configured to extract moving behavior features of trajectories in the trip trajectory data, and

[0039] The trip trajectory data is matched with a road network to extract road segment transfer features of the trajectories.

[0040] A model construction module is configured to take the moving behavior features and the road segment transfer features as feature inputs of one channel of a double-channel VAE network respectively, and generate a moving behavior feature learning model and a road segment transfer feature learning model which are independent of each other.

[0041] A model optimization module is configured to aggregate the moving behavior feature learning model and the road segment transfer feature learning model by using a fusion network to obtain fused trajectory features, and identify normal trips and risky trips.

[0042] Another aspect of the present application also provides a storage medium for storing a computer program for executing the trip safety risk assessment method described above.

[0043] As can be seen from the above solutions, the present application has the following advantages:

[0044] The travel safety risk assessment method provided by this invention extracts the movement behavior features of the trajectory from the travel trajectory data and performs road network matching on the travel trajectory data to extract the road segment transition features of the trajectory. Then, the movement behavior features and road segment transition features are used as feature inputs to one channel of a dual-channel VAE network to generate independent movement behavior feature learning models and road segment transition feature learning models. The dual-channel modeling method improves the model's ability to learn effective features and further improves the model's assessment accuracy. Simultaneously, a fusion network is used to aggregate the movement behavior feature learning models and road segment transition feature learning models to obtain fused trajectory features, identifying normal and risky travel routes. Supervised contrastive loss is introduced, enabling the assessment model to be effectively applied to scenarios with only a small number of samples. Furthermore, an incremental scoring strategy is adopted, allowing the model to be applied to online scenarios and effectively improving its inference efficiency. Attached Figure Description

[0045] Figure 1 A flowchart illustrating the trip safety risk assessment method provided in an embodiment of the present invention is shown;

[0046] Figure 2 The model structure diagram of a dual-channel VAE is shown;

[0047] Figure 3 The model structure diagram of the fusion network is shown;

[0048] Figure 4 A schematic diagram of the trip safety risk assessment device 200 is shown.

[0049] Figure 5 A schematic diagram of the electronic device is shown;

[0050] in,

[0051] 200 - Travel safety risk assessment device;

[0052] 201 - Data Acquisition Module;

[0053] 202 - Feature Extraction Module;

[0054] 203 - Model Building Module;

[0055] 204 - Model Optimization Module;

[0056] 300 - Electronic devices;

[0057] 301 - Processor;

[0058] 302 - Memory. Detailed Implementation

[0059] In order to make the above features and effects of the present application more clear and easy to understand, the following embodiments are specifically described below with reference to the accompanying drawings.

[0060] As shown in Figure 1 , Figure 1 The flowchart of the trip safety risk assessment method provided by the embodiments of the present application is shown, and the details are as follows:

[0061] A trip safety risk assessment method comprises:

[0062] S1, obtaining trip trajectory data;

[0063] S2, extracting the moving behavior features of the trajectory in the trip trajectory data, and

[0064] The trip trajectory data is matched with the road network, and the road segment transfer features of the trajectory are extracted.

[0065] In practice, the moving behavior and path transfer features of the trajectory are of great significance for estimating the occurrence of abnormal trip events. Therefore, the moving behavior features and road segment transfer features in the trip trajectory data need to be extracted in the embodiments.

[0066] In order to model the moving behavior features, a fixed time length sliding window is used. Specifically, for a given trip trajectory data T, the average speed v i , the starting time stamp t i and the cumulative distance s i are selected as features in the window, and the moving behavior sequence <(v1, t1, s1)…(v i , t i , s i )…(v L , t L , s L ) > is obtained. In order to obtain the feature vector, it is necessary to further map the continuous behavior features to the discrete feature space. For time information, TripSafe divides the time of a day into 24 time periods, and uses a randomly initialized matrix Each time period is mapped to a vector. Similarly, the speed information and distance information are also processed in the same way. Through the above process, the moving behavior features of the trajectory in the trip trajectory data are extracted.

[0067] To model the road segment information features, first, the trip trajectory data T is matched with the road network, i.e., the trip trajectory data is converted into a standard sequence of road segments. In the road network, each road segment has several environmental features, such as road category, length, and speed limit. To model these environmental features, TripSafe models the road network data as a graph G' = (V', E'). Each node in G' is a road segment. The adjacency matrix represents the connectivity between roads, and the feature matrix represents the set of road features. Then, the embedding matrix of the road segments is learned using a two-layer GCN, and the GCN is used to learn the road segment representation, generating road segment transition features containing traffic condition information.

[0068] In this embodiment, by extracting the moving behavior features of the trajectories in the trip trajectory data and the road segment transition features, explicit modeling of the moving behavior features contained in the trip trajectory data can be achieved. At the same time, by combining the road network information, semantic-rich road segment representations containing traffic condition information can be obtained.

[0069] S3, the moving behavior features and the road segment transition features are respectively input as the features of one channel of the dual-channel VAE network, and a moving behavior feature learning model and a road segment transition feature learning model are generated.

[0070] In this embodiment, the occurrence of a safety event is usually accompanied by unconventional road segment selection (deviation, detour, etc.) and dangerous moving behavior (stopping, disappearing, etc.). To comprehensively analyze the potential path transition features and moving behavior features in the trip trajectory data, this embodiment constructs an evaluation model based on a dual-channel VAE network, Figure 2 The model structure diagram of the dual-channel VAE is shown, and the LSTM-based network structure is used as the basic network structure of the dual-channel VAE. The moving behavior features and the road segment transition features are respectively input as the features of one channel of the dual-channel VAE network, and a moving behavior feature learning model and a road segment transition feature learning model are generated. For each channel, a VAE network is used as the basic structure, and the model is optimized by maximizing the generation probability of the observable data.

[0071] VAE is a deep learning-based generative model composed of an encoder and a decoder. To introduce prior knowledge, VAE encodes the input data into a distribution on the latent space, and the decoder is used to subsequently restore the input data. Therefore, VAE has three key steps: encoding, latent representation sampling, and decoding. For an input sequence <x1, …, x MFirst, an encoding network is used to extract sequence information, generating a representation vector h. Then, in the latent representation sampling stage, h is used to obtain the mean μ and standard deviation σ of the corresponding Gaussian distribution, respectively. To perform gradient backpropagation, a reparameterization trick is introduced to sample z. Finally, z is used as input to the decoding network to recover the original input. The formulaic description of the specific process is as follows:

[0072] Encoding: h = LSTM e (x1, …, x M )

[0073] Sampling: μ = g1(h), σ = g2(h),

[0074] Decoding:

[0075] For learning of mobile behavior patterns, in this embodiment, specifically, mobile behavior features are taken as feature input sequences of one channel of a double-channel VAE network, and the mobile behavior features include speed features and distance features. A training task is constructed by reconstructing the average speed and cumulative distance to obtain a reconstructed sequence, and the mobile behavior feature latent space is learned. Finally, cross-entropy loss between the input sequence and the reconstructed sequence is used for model optimization. The vector of the i-th time step of the decoder is The specific process and formulaic description of the corresponding loss are as follows:

[0076]

[0077] The cumulative distance and average speed in the reconstructed output sequence are as follows:

[0078]

[0079] Loss function:

[0080] where s i and v i represent the cumulative distance and average speed of the input sequence, respectively; a s and a v represent the output vectors of the MLP; KL[] represents the KL divergence, CE represents the cross-entropy, represents the normal distribution with mean and variance, respectively L represents the sequence length, and j represents the sample index.

[0081] For the learning of the link transition feature, the link transition feature is taken as the feature input of another channel of the dual-channel VAE network, the generation probability of the link in the observable data is maximized, the transition feature of the link is learned, and a link transition feature learning model is generated. The specific process and the formulaic description of the corresponding loss function are as follows:

[0082]

[0083] Loss function

[0084] wherein KL[] represents the KL divergence, CE represents the cross-entropy, represents the normal distribution of the mean and variance respectively , L represents the sequence length, and j represents the sample index.

[0085] In this embodiment, the mobile behavior feature and the link transition feature are taken as the feature input of one channel of the dual-channel VAE network respectively, and the mobile behavior feature learning model and the link transition feature learning model which are independent of each other are generated. The two models can map the target trajectory to the corresponding hidden space to obtain two trajectory representation vectors with different semantic information. The method of dual-channel modeling improves the learning ability of the evaluation model to effective features, and further improves the evaluation accuracy of the model.

[0086] S4, using the fusion network to aggregate the mobile behavior feature learning model and the link transition feature learning model, identifying normal trips and risk trips.

[0087] In the specific implementation, in the process of implementing the feature fusion based on the supervised contrast loss, the hidden representation learned by the trained dual-channel VAE is used as the model input, the fusion network based on the MLP is used to realize the fusion of the features, and further, the fused features are used to evaluate the abnormal scores. Figure 3 The model structure diagram of the fusion network is shown. This part uses the labeled samples as the training set, and uses the cross-entropy loss between the evaluation results and the labels to optimize the model.

[0088] Specifically, for the in-progress trip trajectory data sequence T, first, the dual-channel VAE is used to generate the related vectors, i.e. (μ m , σ m ) and (μ r , σ r ). In order to better evaluate, the start point and the end point information are introduced into the evaluation model as supplementary knowledge, and the cross-entropy is used to fine-tune the model. The formulaic description of the specific process is as follows:

[0089] h T = concat(μ m , σ m , μr , s r ), h od = concat(e1, e k )

[0090] h f = concat(t1; h T ; h od ), o T = sof max(MLP(h f ))

[0091]

[0092] where o T is the real-time anomaly score, h T denotes the trajectory representation aggregated from two channel modes, h od denotes the vector after concatenating the start-end road segment embedding vectors, h f denotes the representation vector after aggregating the time information, start-end road segment information and trajectory sequence information, e1, e k denotes the start-end road segment embedding vectors of the trajectory, l i denotes the label information of the i-th sample.

[0093] In addition, in order to be applicable to the scene with only a small number of labeled samples, a supervised contrastive loss is introduced to explicitly guide the encoder to learn to distinguish normal trips and risky trips, and the formulaic description of the supervised contrastive loss is as follows:

[0094]

[0095] where, denotes the contrastive loss function, BN denotes the size of the current batch, i, j denote the indexes of the samples, l i , l j denote the labels of samples i and j, t1 denotes the departure time of the trip, and τ denotes the temperature coefficient.

[0096] In the embodiment, through the fusion process described above, the trajectory representation learned by the dual-channel VAE can be effectively fused, and the fused trajectory representation can be further used to evaluate the anomaly score, and thus the safety risk assessment can be realized. At the same time, the supervised contrastive loss is adopted, and this part uses the labeled samples as the training set, and uses the cross-entropy loss between the evaluation result and the label to optimize the model, which effectively alleviates the problem of insufficient model learning due to the small number of labeled samples. In this way, the evaluation model can achieve good performance in the case of a small number of labeled samples.

[0097] Further, in order to realize real-time evaluation of travel safety risk, that is, to calculate the abnormal score using part of the observable trajectory, an incremental inference strategy is adopted for real-time calculation. Specifically, for the ongoing travel trajectory data T, a triple is recorded, where o T is the real-time abnormal score, and are the hidden layer representations corresponding to the two encoders in the double-channel VAE. First, the travel state at the current time step and the model parameters are recorded. Then, by monitoring whether the collected travel trajectory data reaches a new window or switches to a new road segment, it is determined whether further inference is needed. If so, an encoder is initialized using the relevant hidden state, and one-step forward calculation is performed on the recently arrived travel trajectory data. Finally, the abnormal score o T of the travel is recalculated, and the record is updated. The incremental scoring strategy adopted in this embodiment enables the model to be applied to online scenarios, effectively improving its inference efficiency.

[0098] In summary, the travel safety risk evaluation method provided by the present application extracts the moving behavior features of the trajectory in the travel trajectory data and extracts the road segment transfer features of the trajectory by matching the travel trajectory data with the road network. Then, the moving behavior features and the road segment transfer features are input as features of one channel of the double-channel VAE network to generate a moving behavior feature learning model and a road segment transfer feature learning model that are independent of each other. The double-channel modeling method improves the learning ability of the model for effective features and further improves the evaluation accuracy of the model. At the same time, the fusion network is used to aggregate the moving behavior feature learning model and the road segment transfer feature learning model to obtain fused trajectory features, identify normal travel and risky travel, and introduce a supervised contrast loss, so that the evaluation model can be effectively applied to scenarios with only a small number of samples. In addition, the incremental scoring strategy enables the model to be applied to online scenarios, effectively improving its inference efficiency.

[0099] In addition, the above-mentioned embodiments of the present application can be applied to terminal devices for travel safety risk evaluation method functions, which can include personal terminals, host computer terminals, and the like, and the embodiments of the present application do not limit this. The terminal can support Windows, Android, IOS, Windows Phone, and other operating systems.

[0100] A travel safety risk evaluation device 200 is applied to a travel safety risk evaluation method that can be applied to personal terminals and host computer terminal devices, and can realize the travel safety risk evaluation method as shown in Figure 1 The travel safety risk evaluation device provided by the embodiments of the present application can realize each process of the travel safety risk evaluation method.Figure 4 A schematic diagram of the trip safety risk assessment device 200 is shown.

[0101] A trip safety risk assessment device 200 at least includes:

[0102] A data collection module 201 is configured to acquire trip trajectory data.

[0103] A feature extraction module 202 is configured to extract moving behavior features of trajectories in the trip trajectory data, and

[0104] The trip trajectory data is matched with a road network to extract road segment transition features of trajectories.

[0105] A model construction module 203 is configured to take the moving behavior features and the road segment transition features as feature inputs of one channel of a double-channel VAE network respectively, and generate a moving behavior feature learning model and a road segment transition feature learning model which are independent of each other.

[0106] A model optimization module 204 is configured to aggregate the moving behavior feature learning model and the road segment transition feature learning model by using a fusion network to obtain fused trajectory features, and identify normal trips and risk trips.

[0107] In addition, it should be understood that, in the trip safety risk assessment device 200 according to the embodiments of the present application, only the division of the above-mentioned functional modules is exemplified, and in actual applications, the above-mentioned functions can be completed by different functional modules according to needs, that is, the trip safety risk assessment device 200 can be divided into different functional modules from the above-mentioned exemplified modules to complete all or part of the functions described above.

[0108] Figure 5 is a structural schematic diagram of an electronic device provided by the embodiments of the present application.

[0109] As Figure 5 As shown in the above-mentioned embodiments, the embodiments of the present application also provide an electronic device 300, which includes a processor 301, a memory 302, a program or instructions stored in the memory 302 and executable on the processor 301, the program or instructions being executed by the processor 301 to implement the steps of the above-mentioned trip safety risk assessment method and achieve the same technical effects.

[0110] It should be noted that the electronic device in the embodiments of the present application can include mobile electronic devices and non-mobile electronic devices.

[0111] The embodiments of the present application also provide a readable storage medium, which stores a program or instructions, the program or instructions being executed by a processor to implement the steps of the above-mentioned trip safety risk assessment method and achieve the same technical effects.

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

[0113] It should be noted that, in this document, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element. In addition, it should be noted that the scope of the methods and apparatus of the present embodiments are not limited by the order of the steps or the order of the functions performed in the steps, and can include performing the functions in different orders, or substantially simultaneously, or in reverse order, such as described, and can also include adding, omitting, or combining various steps. In addition, features described with reference to certain examples can be combined in other examples.

[0114] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for making a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in various embodiments of the present application.

[0115] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above specific embodiments, and the above specific embodiments are only illustrative, not restrictive, and those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

Claims

1. A trip safety risk assessment method, characterized by, The method comprises the following steps: obtaining travel trajectory data; extracting moving behavior features of trajectories in the travel trajectory data, performing road network matching on the travel trajectory data to extract road segment transition features, including: performing road network matching on the travel trajectory data to obtain a standard sequence of road segments of the travel trajectory data, and modeling environmental features of the travel trajectory data; learning road segment representations using GCN to generate the road segment transition features containing traffic condition information; inputting the moving behavior features as feature inputs of one channel of a double-channel VAE network to generate a moving behavior feature learning model, including: inputting a sequence of the moving behavior features as an input sequence, the moving behavior features including speed features and distance features; constructing a training task by reconstructing average speed and cumulative distance to obtain a reconstructed sequence, and learning a hidden space of the moving behavior features; performing model optimization using cross-entropy loss between the input sequence and the reconstructed sequence; inputting the road segment transition features as feature inputs of another channel of the double-channel VAE network to generate a road segment transition feature learning model, including: inputting a sequence of the road segment transition features as an input sequence, learning transition features of road segments by maximizing generation probabilities of the road segments in observable data to generate the road segment transition feature learning model; aggregating the moving behavior feature learning model and the road segment transition feature learning model using a fusion network to obtain fused trajectory features, and identifying normal travel and risky travel; wherein the normal travel and the risky travel are identified using a supervised contrastive loss, including: wherein, represents a contrast loss function, h f represents a hidden representation aggregated with time information and start-end point information, h f = concat(t1; h T ; h od ); h T = concat(μ m ,σ m ,μ r ,σ r ), the relevant vectors (μ m ,σ m ) and (μ r ,σ r ) generated using the two-channel VAE; h od = concat(e1, e k ), e1, e k denote the embedding vectors of the start and end road segments; BN denotes the size of the current batch, i, j denote the indices of the samples, l i j denotes the label of the samples i and j, t1 denotes the departure time of the trip, τ denotes the temperature coefficient.​ 2. The method of claim 1, wherein, after the fused trajectory features are obtained by aggregating the moving behavior feature learning model and the road segment transition feature learning model using the fusion network to identify the normal travel and the risky travel, the method further comprises: using a part of observable trajectory data in the travel trajectory data, calculating travel anomaly scores through an incremental evaluation strategy, and evaluating travel safety risks.

3. The method of claim 1, wherein, The travel anomaly scores are calculated through the incremental evaluation strategy, including: for the observable trajectory data, recording an initial travel state at a current time step, the initial travel state including an initial travel anomaly score; determining whether further reasoning is needed by monitoring whether the collected observable trajectory data reaches a new window or switches to a new road segment; in the case of further reasoning, initializing an encoder using relevant hidden states, and performing one-step forward calculation on the recently arrived data; recalculating the travel anomaly score and updating the recorded travel state.

4. The method of claim 1, wherein: a fixed-length sliding window is used to extract the moving behavior features of trajectories in the travel trajectory data.

5. A trip safety risk assessment apparatus, characterized by, The travel safety risk evaluation method of any one of claims 1-4 comprises at least: a data acquisition module for obtaining travel trajectory data; a feature extraction module for extracting moving behavior features of trajectories in the travel trajectory data, and performing road network matching on the travel trajectory data to extract road segment transition features, including: The trip trajectory data is matched with a road network to obtain a standard sequence of road segments of the trajectory data, and environmental characteristics of the trip trajectory data are modeled; a GCN is used to learn a road segment representation, and the road segment transition features containing traffic condition information are generated; The model construction module is configured to: input the mobile behavior features as features of one channel of a double-channel VAE network to generate a mobile behavior feature learning model, including: input a sequence of the mobile behavior features as an input sequence, the mobile behavior features including speed features and distance features; construct a training task by reconstructing average speed and cumulative distance to obtain a reconstructed sequence, learn a mobile behavior feature hidden space; and use a cross-entropy loss between the input sequence and the reconstructed sequence to optimize the model; input the road segment transition features as features of another channel of the double-channel VAE network to generate a road segment transition feature learning model, including: input a sequence of the road segment transition features as an input sequence, and learn transition features of road segments by maximizing a generation probability of the road segments in observable data to generate the road segment transition feature learning model; The model optimization module is configured to aggregate the mobile behavior feature learning model and the road segment transition feature learning model by using a fusion network to obtain fused trajectory features, and identify normal trips and risky trips; The normal trips and the risky trips are identified by using a supervised contrastive loss, including: wherein, represents a contrast loss function, h f represents a hidden representation aggregated with time information and start-end point information, h f = concat(t1; h T ; h od ); h T = concat(μ m ,σ m ,μ r ,σ r ), the relevant vectors (μ m ,σ m ) and (μ r ,σ r ) generated using the dual-channel VAE; h od = concat(e1, e k ), e1, e k denote the embedding vectors of the start and end road segments; BN denotes the size of the current batch, i, j denote the indices of the samples, l i j denotes the label of samples i and j, t1 denotes the departure time of the trip, τ denotes the temperature coefficient.​ 6. A storage medium for storing a computer program for performing the trip safety risk assessment method of any one of claims 1-4.