Road disaster early warning method and system based on Internet of Things sensing analysis
Through the feature extraction and fusion of multimodal sensing data and combined with the dynamic adjustment of the disaster prediction model, the accuracy and adaptability of road disaster warnings in the existing technology are solved, and a more accurate, timely and comprehensive warning effect is achieved.
Patent Information
- Application Number
- CN202510348820.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The existing road disaster warning system relies on single sensor data or simple data analysis, and lacks multi-dimensional data support, resulting in low warning accuracy and reliability, and the disaster prediction model lacks dynamic update mechanism, which makes it poor timeliness and adaptability.
By deploying a multimodal sensing device, vibration waveform sequence, surface deformation trajectory, humidity distribution map and visible image flow data, feature extraction and multimodal spatiotemporal feature fusion, road state fusion characteristics are generated, and disaster prediction models are used to calculate disaster probability, trigger dynamic adjustment early warning signals, and hierarchical response mechanism and online update mechanism are set.
It improves the accuracy, timeliness and comprehensiveness of road disaster warnings, reduces false alarms and missed reports, ensures road safety and smoothness, and adapts to dynamic changes in road conditions.
Smart Images

Figure CN120373612A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular, to a road disaster early warning method and system based on Internet of Things sensing analysis. Background Art
[0002] In the operation and maintenance of road infrastructure, the timely early warning of road disasters is crucial, which is directly related to the safety of public life and property and the smooth operation of the transportation system. Currently, road disaster early warning mainly relies on single-sensor data or simple data analysis methods. For example, some systems only judge whether there is a disaster risk on the road based on the information obtained by vibration sensors. Due to the lack of support from multi-dimensional data, it is difficult to comprehensively and accurately reflect the actual condition of the road, resulting in low accuracy and reliability of the early warning. When processing data, some traditional early warning systems fail to fully consider the association and mutual influence between different data, and cannot effectively fuse multi-modal data, making the early warning results have great limitations. Moreover, existing disaster prediction models often lack a dynamic update mechanism and cannot timely adapt to changes in road conditions and newly emerging disaster types, resulting in poor timeliness and adaptability of the models. Therefore, there is an urgent need for a more comprehensive, accurate, and intelligent road disaster early warning method and system to improve the accuracy, timeliness, and effectiveness of road disaster early warning and ensure the safety and smoothness of the road. Summary of the Invention
[0003] The purpose of the present invention is to provide a road disaster early warning method and system based on Internet of Things sensing analysis. The embodiments of the present invention are implemented as follows:
[0004] In a first aspect, an embodiment of the present invention provides a road disaster early warning method based on Internet of Things sensing analysis, the method including: collecting real-time environmental data through a multi-modal sensing device deployed in a road monitoring area, the real-time environmental data including a vibration waveform sequence, a ground deformation trajectory, a humidity distribution map, and a visible light image stream; inputting the vibration waveform sequence into a pre-trained time series feature encoder for waveform feature extraction to obtain vibration fluctuation features, and inputting the ground deformation trajectory into a spatial feature encoder for deformation trajectory analysis to generate a deformation displacement vector; performing regional segmentation on the humidity distribution map to extract humidity gradient features of each segmented region, and performing dynamic frame sampling on the visible light image stream to obtain an image frame sequence and inputting the image frame sequence into an image feature encoder to extract visual texture features; performing multi-modal spatio-temporal feature fusion on the vibration fluctuation features, the deformation displacement vector, the humidity gradient features, and the visual texture features to generate a road state fusion feature; inputting the road state fusion feature into a disaster prediction model for disaster probability calculation to obtain the disaster occurrence probability of the current road area, and triggering an early warning signal matching the disaster type when the disaster occurrence probability exceeds a dynamically adjusted disaster threshold.
[0005] In a second aspect, the present invention provides a computer system comprising: one or more processors; a memory; one or more computer programs; wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method as described above is implemented.
[0006] The embodiment of the present invention extracts and analyzes the features of the vibration waveform sequence and the surface deformation trajectory respectively, and the pre-trained time series feature encoder extracts the vibration fluctuation features, and the spatial feature encoder generates the deformation displacement vector. This processing method for different data characteristics can mine the key information in the data, highlight the essential characteristics of the data, and make the subsequent analysis more targeted. The humidity distribution map is segmented and the humidity gradient features are extracted. The visible light image stream is dynamically frame sampled and the visual texture features are extracted, which further refines the analysis of the data and improves the availability and value of the data. The multi-modal spatiotemporal features of multiple features are fused to generate road state fusion features, breaking the limitations of a single data modality, integrating various information, and making the understanding of the road state more comprehensive and in-depth. The road state fusion features are input into the disaster prediction model to calculate the probability of disaster occurrence, and the warning signal is triggered according to the dynamically adjusted disaster threshold. At the same time, a hierarchical response mechanism for the warning signal and an online update mechanism for the disaster prediction model are set. Based on this, in terms of the accuracy of disaster warning, the collection and fusion of multimodal data, as well as the fine processing and feature extraction of different data, enable the disaster prediction model to more accurately capture the changes in road conditions and potential disaster risks, and reduce false alarms and missed reports. For example, by comprehensively considering vibration, deformation, humidity and visual information, it can more accurately determine whether there are hidden disaster risks such as landslides and collapses on the road. In terms of the timeliness of warning, by real-time data collection and dynamic adjustment of disaster thresholds, it is possible to timely detect changes in the probability of disasters, and quickly trigger corresponding warning signals when disasters are about to occur or there are signs, so as to gain more response time for road maintenance and traffic management departments. In terms of the comprehensiveness of warning, the hierarchical warning mechanism can take different response measures according to the different degrees of disaster probability, not only reminding the road maintenance department to deal with it, but also considering the impact on traffic flow, and ensuring road traffic safety by generating path avoidance suggestion vectors and adjusting the phase timing parameters of traffic signal control nodes. In terms of the adaptability of the model, the online update mechanism of the disaster prediction model can adjust and optimize the model according to the actual situation after the warning, so that the model can adapt to the dynamic changes in road conditions and continuously improve the accuracy and reliability of the prediction. In summary, through a series of technical means, this program has achieved good results in the accuracy, timeliness, comprehensiveness and model adaptability of road disaster warning, and can effectively ensure the safety and smoothness of roads. Description of the Drawings
[0007] Figure 1 is a flowchart of a road disaster early warning method based on Internet of Things sensing analysis provided by an embodiment of the present invention.
[0008] Figure 2 is a schematic diagram of the composition of a computer system provided by an embodiment of the present invention. Detailed Embodiments
[0009] In the embodiments of the present invention, the execution entity of the road disaster early warning method based on Internet of Things sensing analysis is a computer system, including but not limited to servers, personal computers, laptops, tablets, smart phones, etc. The computer system can run alone to implement the present invention, or can be connected to the network and implement the present invention through interaction with other computer systems in the network. Among them, the network where the computer system is located includes but not limited to the Internet, wide area network, metropolitan area network, local area network, VPN network, etc.
[0010] As Figure 1 shown, the road disaster early warning method based on Internet of Things sensing analysis provided by an embodiment of the present invention includes:
[0011] Step S100: Collect real-time environmental data through multi-modal sensing devices deployed in the road monitoring area. The real-time environmental data includes vibration waveform sequences, surface deformation trajectories, humidity distribution maps, and visible light image streams.
[0012] In step S100, the vibration waveform sequence reflects the vibration conditions of the road at different time points. When the road is affected by external forces such as vehicle driving and surrounding construction, vibrations will occur, and these vibrations will be manifested in the form of waveforms. For example, when a large truck drives on the road, it causes obvious vibrations on the road. These vibration information are collected by vibration sensors and converted into waveform data of time series, that is, vibration waveform sequences. For example, an acceleration sensor can be used to sense the vibration of the road. The acceleration sensor can convert the vibration acceleration into an electrical signal, and then through analog-to-digital conversion and other processing, a digital vibration waveform sequence is obtained.
[0013] The surface deformation trajectory reflects the position change of the road surface over a period of time. When factors such as groundwater level changes and geological activities affect, the road surface may undergo displacement. For example, in some mountain roads, due to landslides and other reasons, the road surface may sink or bulge. The position change of the surface is continuously monitored by displacement sensors, and the position information at each time point is recorded to form a surface deformation trajectory. For example, a Global Navigation Satellite System (GNSS) receiver is used to accurately measure the position of the surface by receiving satellite signals, and then the surface deformation trajectory is obtained.
[0014] The humidity distribution map shows the humidity conditions at different positions within the road area. Humidity has an important impact on the stability of the road. Excessive humidity may cause problems such as softening of the road base course and cracks on the road surface. For example, during the rainy season, the humidity of the road surface and the base course will increase significantly. Humidity data at different positions are collected by humidity sensors distributed within the road monitoring area, and these data are processed and analyzed to generate the humidity distribution map. For example, capacitive humidity sensors can be used. The principle is to utilize the change in capacitance caused by humidity changes and obtain humidity information by measuring the capacitance value.
[0015] The visible light image stream is video stream data obtained by continuously shooting the road area through devices such as cameras. The visible light image stream can intuitively reflect the actual condition of the road, such as whether there are obstacles and whether the road surface is damaged. For example, when a traffic accident occurs on the road, the camera can capture the images of the accident scene, and these consecutive image frames are composed into the visible light image stream. For example, high-definition network cameras can be used to transmit the captured image data to be processed through the network.
[0016] Step S200: Input the vibration waveform sequence into a pre-trained temporal feature encoder for waveform feature extraction to obtain vibration fluctuation features, and input the ground deformation trajectory into a spatial feature encoder for deformation trajectory analysis to generate a deformation displacement vector.
[0017] In step S200, for the processing of the vibration waveform sequence, a pre-trained temporal feature encoder is used for waveform feature extraction. This encoder can capture the key features in the vibration waveform through learning historical vibration waveform data. For example, when the road is subjected to external forces such as vehicle driving and surrounding construction, vibrations with different frequencies and amplitudes are generated, which are manifested in the form of waveforms. The temporal feature encoder can extract features reflecting the vibration fluctuation situation from these waveforms, that is, vibration fluctuation features. In the specific implementation process, the pre-trained temporal feature encoder contains multiple dilated convolutional kernels. By performing convolutional operations on the input vibration waveform sequence, waveform features with different scales and time steps can be extracted. The principle is to utilize the dilated convolutional kernels to expand the receptive field of the convolution without increasing the number of convolutional kernel parameters, so as to better capture the long-term dependence relationship of the waveforms. Through further processing of the features output by the convolutional layer, vibration fluctuation features are obtained, which can reflect the change rules and trends of road vibrations.
[0018] For the processing of the ground deformation trajectory, it is input into the spatial feature encoder for deformation trajectory analysis. The ground deformation trajectory records the position change situation of the road surface over a period of time, and information reflecting the deformation direction and intensity is parsed from these trajectory data. The spatial feature encoder generates a deformation displacement vector through the processing and analysis of the trajectory data.
[0019] In the specific implementation process, the spatial feature encoder first samples the ground deformation trajectory at equal intervals of trajectory points, and extracts the three-dimensional coordinate data and the corresponding timestamp of each trajectory point. Then, according to the time difference between adjacent trajectory points, the displacement change rate between adjacent trajectory points is calculated. The three-dimensional coordinate data of each trajectory point is concatenated with the corresponding displacement change rate to generate a displacement change vector for each trajectory point.
[0020] Next, the displacement change vectors of all trajectory points are arranged in chronological order to form a displacement change sequence, and are input into the graph attention network. In the graph attention network, the displacement change vector of each trajectory point is used as the graph node feature, and the directed edge connection relationship between nodes is constructed according to the chronological order of adjacent trajectory points. By aggregating the features of multi-hop neighborhood nodes for each graph node feature, a node aggregation feature containing the local deformation propagation trend is generated.
[0021] Finally, the node aggregation feature is input into the attention weight calculation layer of the graph attention network to calculate the attention weight value between each graph node and the graph node at the previous moment, and the node aggregation feature is weighted and summed according to this weight value to generate a deformation displacement vector reflecting the deformation direction and intensity.
[0022] Step S300: Perform regional segmentation on the humidity distribution map, extract the humidity gradient features of each segmented region, and perform dynamic frame sampling on the visible light image stream to obtain an image frame sequence and input it into the image feature encoder to extract visual texture features.
[0023] In step S300, regional segmentation of the humidity distribution map is carried out to more carefully analyze the humidity conditions in different regions of the road, because the humidity changes in different regions may have different impacts on the occurrence of road disasters. For example, due to different drainage conditions and degrees of influence from the external environment, there may be obvious differences in humidity distribution between the edge area and the central area of the road. The method of threshold-based segmentation is used for regional segmentation, and the humidity distribution map is divided into multiple different regions according to the magnitude of the humidity value. Specifically, one or more humidity thresholds are set, and when the humidity value of a certain region is higher or lower than the threshold, it is divided into different regions. For example, a high humidity threshold and a low humidity threshold are set. The region with a humidity value higher than the high humidity threshold is divided into a high humidity region, the region with a humidity value lower than the low humidity threshold is divided into a low humidity region, and the region between the two is divided into a medium humidity region. After completing the regional segmentation, the humidity gradient features of each segmented region are extracted. The humidity gradient reflects the change rate of humidity in space and is of great significance for judging whether there is water accumulation or rapid drying on the road. The humidity gradient is obtained by calculating the humidity difference between adjacent pixel points. For a two-dimensional humidity distribution map, assuming that the humidity value of a certain pixel point is H(x,y), and the humidity values of its adjacent pixel points are H(x + 1,y), H(x - 1,y), H(x,y + 1), and H(x,y - 1) respectively, then the humidity gradients of this pixel point in the x direction and y direction are: G x = H(x + 1,y) - H(x - 1,y), G y = H(x,y + 1) - H(x,y - 1). By statistically analyzing the humidity gradients of all pixel points in each segmented region, such as calculating the average value, standard deviation, etc., the humidity gradient features of this region are obtained.
[0024] For the visible light image stream, dynamic frame sampling is performed to obtain an image frame sequence. Since the visible light image stream usually contains a large number of consecutive frames, in order to reduce the computational amount while retaining key information, the method of dynamic frame sampling is used. Dynamic frame sampling determines the sampling interval according to the change of the image content. When the image content changes greatly, the sampling interval is small to capture more details; when the image content changes little, the sampling interval is large. For example, during the period when vehicles are driving frequently and the scene changes greatly on the road, one frame can be sampled every 1 frame; while during the period when there are few vehicles and the scene is relatively stable on the road, one frame can be sampled every 5 frames. After obtaining the image frame sequence, it is input into the image feature encoder to extract visual texture features. Visual texture features can reflect the microscopic structure and texture information of the road surface and play an important role in identifying whether there are damages such as cracks and potholes on the road. The image feature encoder usually uses a convolutional neural network (CNN), which extracts features from the image frames through operations such as convolutional layers and pooling layers.
[0025] Taking the ResNet network as an example, it contains multiple residual blocks, and each residual block consists of a convolutional layer, a batch normalization layer, and an activation function. The input image frame first undergoes feature extraction through the convolutional layer to obtain a feature map, and then the feature map is normalized through the batch normalization layer to accelerate the convergence speed of the network. Finally, the activation function is used to introduce non-linear factors to enhance the expression ability of the network. After being processed by multiple residual blocks, the features output by the network are visual texture features. By performing regional segmentation on the humidity distribution map to extract humidity gradient features, and dynamically sampling the visible light image stream and extracting visual texture features, it provides rich and valuable information for subsequent multi-modal spatio-temporal feature fusion and road disaster warning. These features can reflect the state of the road from different angles and help to more accurately judge whether there are potential disaster risks on the road.
[0026] Step S400: Perform multi-modal spatio-temporal feature fusion on the vibration fluctuation feature, the deformation displacement vector, the humidity gradient feature, and the visual texture feature to generate a road state fusion feature.
[0027] In step S400, first, the time correlation between the vibration fluctuation feature and the deformation displacement vector is processed. Although these two describe the road state from different angles, there may be differences in the time dimension. For example, when the road is affected by vehicle driving, the vibration fluctuation feature will respond quickly, while the surface deformation may have a certain delay. Through time alignment operations, the two are synchronized in time to better analyze their correlation. Specifically, by matching the timestamps of the two, the data with similar times are corresponding to generate a vibration-deformation correlation feature. This correlation feature can reflect the mutual influence relationship between vibration and deformation, such as whether vibration will exacerbate surface deformation.
[0028] For the humidity gradient feature and the visual texture feature, due to the possible problem of inconsistent resolutions in their spatial distributions, spatial interpolation processing is performed on the humidity gradient feature. Assuming that the original resolution of the humidity gradient feature is low and the resolution of the visual texture feature is high, based on the known humidity gradient feature points, methods such as bilinear interpolation are used to infer the humidity gradient values at other positions to make the resolution of the humidity gradient feature consistent with the spatial distribution of the visual texture feature. The bilinear interpolation formula is: , where (x,y) is the coordinate of the point to be interpolated, are the coordinates of the surrounding known points, and u and v are the relative coordinate values.
[0029] After the above processing, the vibration-deformation correlation features, humidity gradient features, and visual texture features are input into the cross-modal fusion network. This network includes a channel attention module and a spatial attention module. The channel attention module is used to dynamically allocate channel weights for multi-modal features. The features of different channels may have different importance for the road condition. For example, in some cases, the features of the vibration-related channels may be more capable of reflecting the immediate condition of the road, and the channel attention module will adjust the weights of each channel according to the importance of the features. The spatial attention module then performs importance weighting on the spatial positions of the feature maps. In a road image, the features in some key areas such as the road edges and cracks may be more important, and the spatial attention module will enhance the weights of the features in these areas.
[0030] Finally, the weighted multi-modal features are concatenated in channels, that is, the features of different modalities are connected in the channel dimension to form a feature tensor containing more information. Then, through a dimensionality reduction convolutional layer, the dimension of the features is reduced through convolutional operations to remove redundant information, and finally, the road condition fusion features are generated. This fusion feature combines the advantages of multiple modality data and can more comprehensively and accurately reflect the current state of the road, providing strong support for subsequent disaster prediction.
[0031] Step S500: Input the road condition fusion features into the disaster prediction model to calculate the disaster probability, obtain the disaster occurrence probability of the current road area, and trigger a warning signal matching the disaster type when the disaster occurrence probability exceeds the dynamically adjusted disaster threshold.
[0032] In step S500, after obtaining the road condition fusion features, they are provided as input to the disaster prediction model. This model has been trained to predict the probability of a road disaster based on the input feature data. For example, the road condition fusion features may include various information such as vibration fluctuation features, deformation displacement vectors, humidity gradient features, and visual texture features. The disaster prediction model will comprehensively analyze this information. If the vibration fluctuation features show that the road has extremely strong abnormal vibrations, the deformation displacement vector indicates a large displacement change on the ground surface, the humidity gradient features show an abnormally high local humidity, and the visual texture features show obvious cracks on the road surface, etc., these factors combined will cause the disaster prediction model to judge that the probability of a disaster occurring in this road area increases. In the specific implementation process of the disaster prediction model, a series of calculations and processes are performed on the input road condition fusion features.
[0033] The model can include structures such as gated recurrent unit layers and self-attention mechanism layers. The gated recurrent unit layer can process sequential data. It processes the fused features of road states in the order of time steps, extracts the hidden state features at each time step, and these hidden state features contain road state information at different time points. The self-attention mechanism layer calculates the correlation weight matrix between these hidden state features, and generates the final disaster probability prediction vector by performing weighted summation on the correlation weight matrix. The elements in this vector represent the occurrence probabilities of different disaster types. After obtaining the disaster occurrence probability, it needs to be compared with the dynamically adjusted disaster threshold. The dynamically adjusted disaster threshold is determined based on the historical disaster occurrence probability dataset and actual disaster records of the current road area. First, these historical data will be obtained, and the false alarm rate and miss rate in different probability intervals will be calculated. The false alarm rate refers to the proportion that the model predicts a disaster but it does not actually occur, and the miss rate refers to the proportion that the model predicts no disaster but it actually occurs. Then, an optimization function with the constraint that the false alarm rate does not exceed the first threshold and the miss rate does not exceed the second threshold is constructed, and the particle swarm optimization algorithm is used to solve this optimization function to obtain the dynamic disaster threshold corresponding to the current road area. For example, for a road where landslide disasters often occur, historical data shows that the false alarm rate is relatively high in some probability intervals, and the disaster threshold is adjusted according to these situations to reduce the false alarm rate. When the disaster occurrence probability exceeds the dynamically adjusted disaster threshold, a warning signal matching the disaster type is triggered. The warning signal usually divides different warning level intervals according to the numerical range of the disaster occurrence probability, such as the first-level warning signal, the second-level warning signal, and the third-level warning signal. Different levels of warning signals correspond to different countermeasures. When the first-level warning signal is triggered, the real-time disaster coordinates of the current road area and the disaster image frames in the visible light image stream are extracted, and this information is sent to the road maintenance terminal, and the emergency communication link of the road maintenance terminal is activated. The road maintenance terminal can timely understand the disaster situation and respond according to this information. The emergency response status information feedback by the road maintenance terminal is received through the emergency communication link, and after associating it with the disaster coordinates, it is input into the warning signal continuous monitoring queue. If the disaster occurrence probability does not decrease in three consecutive monitoring cycles in the warning signal continuous monitoring queue, the first-level warning signal is upgraded to the second-level warning signal. When the second-level warning signal is triggered, the traffic flow distribution data and vehicle position dataset of the current road area are further extracted, and a path avoidance suggestion vector is generated based on the disaster coordinates and the vehicle position dataset. For example, if a collapse disaster occurs in a certain area of the road, according to the vehicle positions and traffic flow conditions, a driving path is planned for the vehicle to avoid the collapsed area. Then, the path avoidance suggestion vector is pushed to the in-vehicle terminal corresponding to the vehicle position dataset to remind the vehicle driver to take corresponding measures.Meanwhile, traffic signal control nodes affected by disaster coordinates are extracted from the traffic flow distribution data, and the phase timing parameters of these traffic signal control nodes are adjusted according to the push coverage rate of the path avoidance advice vector. The adjusted phase timing parameters are synchronized to the traffic signal control system to optimize the traffic flow and reduce the impact of disasters on traffic.
[0034] In the subsequent embodiment introduction, the present invention also sets up an online update mechanism for the disaster prediction model. After the warning signal is triggered, the vibration waveform sequence, surface deformation trajectory and visible light image stream of the current road area are continuously collected to generate a data set of road state changes after the warning. The time stamps of this data set are aligned with the types of warning signals that have been triggered to generate an increment training data set with warning labels for the model. Every preset model update period, the increment training samples within the most recent time window are extracted from the increment training data set for the model and input into the disaster prediction model for forward propagation. The increment loss value between the prediction probability of the disaster prediction model for the increment training samples and the warning labels is calculated, and the fine-tuning gradient of the model parameters is generated based on this loss value. After the amplitude of the fine-tuning gradient of the model parameters is constrained using the gradient clipping algorithm, the weight parameters of the fully connected layer of the disaster prediction model are updated. Finally, the updated disaster prediction model is evaluated for the disaster recognition accuracy on the historical validation set. When the disaster recognition accuracy exceeds the evaluation result of the original model, the updated disaster prediction model is deployed to the road monitoring area to improve the prediction accuracy and adaptability of the model.
[0035] In summary, the embodiment of the present invention extracts and analyzes the features of the vibration waveform sequence and the surface deformation trajectory respectively, the pre-trained time series feature encoder extracts the vibration fluctuation features, and the spatial feature encoder generates the deformation displacement vector. This processing method for different data characteristics can mine the key information in the data, highlight the essential characteristics of the data, and make the subsequent analysis more targeted. The humidity distribution map is segmented and the humidity gradient features are extracted, and the visible light image stream is dynamically frame sampled and the visual texture features are extracted, which further refines the analysis of the data and improves the availability and value of the data. The multi-modal spatiotemporal features of multiple features are fused to generate road state fusion features, which breaks the limitations of a single data modality, integrates information from multiple aspects, and makes the understanding of the road state more comprehensive and in-depth. The road state fusion features are input into the disaster prediction model to calculate the probability of disaster occurrence, and the warning signal is triggered according to the dynamically adjusted disaster threshold. At the same time, a hierarchical response mechanism for the warning signal and an online update mechanism for the disaster prediction model are set. Based on this, in terms of the accuracy of disaster warning, the collection and fusion of multimodal data, as well as the fine processing and feature extraction of different data, enable the disaster prediction model to more accurately capture the changes in road conditions and potential disaster risks, and reduce false alarms and missed reports. For example, by comprehensively considering vibration, deformation, humidity and visual information, it can more accurately determine whether there are hidden disaster risks such as landslides and collapses on the road. In terms of the timeliness of warning, by real-time data collection and dynamic adjustment of disaster thresholds, it is possible to timely detect changes in the probability of disasters, and quickly trigger corresponding warning signals when disasters are about to occur or there are signs, so as to gain more response time for road maintenance and traffic management departments. In terms of the comprehensiveness of warning, the hierarchical warning mechanism can take different response measures according to the different degrees of disaster probability, not only reminding the road maintenance department to deal with it, but also considering the impact on traffic flow, and ensuring road traffic safety by generating path avoidance suggestion vectors and adjusting the phase timing parameters of traffic signal control nodes. In terms of the adaptability of the model, the online update mechanism of the disaster prediction model can adjust and optimize the model according to the actual situation after the warning, so that the model can adapt to the dynamic changes in road conditions and continuously improve the accuracy and reliability of the prediction. In summary, through a series of technical means, this program has achieved good results in the accuracy, timeliness, comprehensiveness and model adaptability of road disaster warning, and can effectively ensure the safety and smoothness of roads.
[0036] As an implementation method, the pre-training process of the temporal feature encoder includes:
[0037] Step S201: Acquire a historical vibration waveform data set, where the historical vibration waveform data set includes time series waveform data labeled with disaster types;
[0038] In practical applications, roads generate vibration waveforms with different characteristics under different disaster conditions. For example, when a landslide disaster occurs on a road, the sliding of the mountain body impacts and pulls on the road, causing the road to vibrate at a specific frequency and amplitude. This vibration is recorded by vibration sensors deployed in the road monitoring area, forming time series waveform data. A large amount of such historical data needs to be collected and labeled with disaster types. The labeling process can be judged and marked by professional geological disaster experts based on relevant geological data, on-site investigation results, etc. In this way, a historical vibration waveform data set containing multiple disaster types is obtained. Each time series waveform data in this set corresponds to a specific disaster type, providing rich and targeted samples for subsequent model training.
[0039] Step S202: Divide the historical vibration waveform data set into multiple time window segments, and perform waveform amplitude normalization on each time window segment.
[0040] Time window division is to split continuous time series waveform data into smaller and more manageable segments. For example, it can be divided according to a fixed time length, such as 10 seconds as a time window. A vibration waveform data lasting 100 seconds can be divided into 10 time window segments. The advantage of this is that it can more carefully analyze the characteristic changes of the waveform in different time periods. Waveform amplitude normalization is to eliminate the influence of amplitude differences between different waveforms, enabling the model to focus more on the shape and frequency characteristics of the waveform. The specific method of normalization can use linear normalization, and the formula is: , where x is a certain value in the original waveform data, is the minimum value of the waveform data within this time window segment, is the maximum value, is the normalized value. Through this normalization process, the amplitudes of the waveform data in all time window segments are mapped to the interval [0, 1], making different waveform data comparable and helping to improve the training effect of the model.
[0041] Step S203: Construct a contrastive learning network containing multiple layers of dilated convolutional kernels. Use different time window segments of the same disaster type as positive sample pairs and input them into the contrastive learning network, and use time window segments of different disaster types as negative sample pairs and input them into the contrastive learning network.
[0042] The dilated convolution kernel is a special convolution kernel that introduces the concept of dilation rate on the basis of the ordinary convolution kernel. By inserting zero elements between the convolution kernel elements, it expands the receptive field of the convolution without increasing the number of parameters of the convolution kernel. For example, for an ordinary 3×3 convolution kernel, if the dilation rate is set to 2, it will actually cover a larger area during the convolution calculation. The multi-layer dilated convolution kernel can capture waveform features at different scales and time steps, which helps the model better learn the long-term dependencies of the waveforms. The goal of the contrastive learning network is to improve the model's ability to distinguish different disaster types by learning the differences between positive sample pairs and negative sample pairs. When inputting samples, two different time window segments of the same disaster type are combined into a positive sample pair because they have similar waveform features and represent the same disaster type; while the time window segments of different disaster types are combined into a negative sample pair, and their waveform features are quite different, representing different disaster types. For example, two time window segments labeled as landslide disasters are used as a positive sample pair, and one time window segment labeled as a landslide disaster and one time window segment labeled as an earthquake disaster are used as a negative sample pair. By continuously inputting these positive sample pairs and negative sample pairs into the contrastive learning network, the model can learn the waveform feature patterns corresponding to different disaster types.
[0043] Step S204: Generate a contrastive loss value by calculating the waveform feature similarity of the positive sample pair and the waveform feature difference of the negative sample pair, and optimize the parameters of the contrastive learning network based on the contrastive loss value.
[0044] Specifically, the calculation of the waveform feature similarity can use the cosine similarity, and the formula is: , where A and B are the waveform feature vectors of the two time window segments in the positive sample pair, · represents the dot product of the vectors, and are the norms of the vectors respectively, and sim is the cosine similarity. The closer the value of the cosine similarity is to 1, the more similar the two waveform features are. The calculation of the waveform feature difference can use the Euclidean distance, and the formula is: , where a i and b i are the i-th elements of the waveform feature vectors of the two time window segments in the negative sample pair respectively, n is the dimension of the vector, and dist is the Euclidean distance. The larger the value of the Euclidean distance, the greater the difference between the two waveform features. The calculation of the contrastive loss value can use the triplet loss function, and the formula is: , where is the waveform feature similarity of the positive sample pair, is the waveform feature similarity of the negative sample pair, It is a preset boundary value used to control the difference degree between positive sample pairs and negative sample pairs. According to the contrast loss value, optimization algorithms such as gradient descent are used to adjust the parameters of the contrast learning network, making the similarity of positive sample pairs as high as possible and the similarity of negative sample pairs as low as possible, so as to improve the model's ability to distinguish different disaster types.
[0045] Step S205: Use the output features of the dilated convolutional layer in the optimized contrast learning network as the vibration fluctuation feature extraction result of the time series feature encoder.
[0046] After the contrast learning network is trained and optimized, the dilated convolutional layer inside it has learned the waveform feature patterns corresponding to different disaster types. The dilated convolutional layer can extract the key features of the waveform by performing convolutional operations on the input time window segments. These features include information such as the frequency and amplitude change of the waveform, which can reflect the vibration fluctuation of the road. Directly using these output features as the vibration fluctuation feature extraction result of the time series feature encoder, in this way, when a new vibration waveform sequence is input into the time series feature encoder, the encoder can quickly and accurately extract the vibration fluctuation features according to the previously learned feature patterns, providing strong support for subsequent road disaster warnings. Through such a pre-training process, the time series feature encoder can better adapt to the vibration waveform data of different disaster types, improve the ability to extract road vibration features, and thus lay a foundation for the accuracy and reliability of the entire road disaster warning system.
[0047] As an implementation method, in step S200, input the surface deformation trajectory into the spatial feature encoder for deformation trajectory analysis to generate a deformation displacement vector, including:
[0048] Step S210: Perform equally spaced trajectory point sampling on the surface deformation trajectory, and extract the three-dimensional coordinate data and corresponding timestamps of each trajectory point.
[0049] In an actual road monitoring scenario, the surface deformation trajectory is continuously recorded by high-precision displacement sensors deployed around the road. These trajectory data are continuous, but for subsequent processing and analysis, it is necessary to discretize them, that is, sample the trajectory points at equal intervals. For example, assume that the displacement sensor records the surface position at a frequency of once per second, and the sampling interval is set to 10 seconds. Then, a trajectory point will be selected from the continuous trajectory data every 10 seconds. Each trajectory point contains three-dimensional coordinate data, that is, the x, y, and z coordinates of the point in space, representing the position information in the horizontal, longitudinal, and vertical directions respectively. At the same time, each trajectory point also corresponds to a timestamp, which is used to record the specific time when the point is collected. The timestamp can be accurate to seconds or even milliseconds, facilitating the subsequent analysis of the surface deformation at different time points. Through such sampling and data extraction, the continuous surface deformation trajectory is transformed into a series of discrete trajectory point data with clear time and space information, providing a necessary basis for subsequent calculation of the displacement change rate and generation of the displacement change vector.
[0050] Step S220: Calculate the displacement change rate between adjacent trajectory points according to the time difference between the timestamp of each trajectory point and the timestamp of the previous trajectory point.
[0051] Calculated in this way, it can reflect the deformation speed of the surface in different time periods. Taking the trajectory points sampled in step S210 as an example, assume that the timestamp of a certain trajectory point is , and the timestamp of its previous trajectory point is , and the time difference between the two points. At the same time, the three-dimensional coordinates of the trajectory point are , and the three-dimensional coordinates of the trajectory point P i-1 are , then the displacement vector between the two points. The displacement change rate v can be obtained by dividing the modulus of the displacement vector by the time difference, that is . This displacement change rate can intuitively reflect the deformation speed of the surface between two adjacent sampling time points. If the displacement change rate is large, it indicates that the surface has undergone rapid deformation during this period, and there may be potential disaster risks; if the displacement change rate is small, it means that the surface is relatively stable.
[0052] Step S230: Concatenate the three-dimensional coordinate data of each trajectory point with the corresponding displacement change rate to generate the displacement change vector of each trajectory point.
[0053] This concatenation method combines the position information and deformation speed information of the trajectory points. Continuing with the data in steps S210 and S220 as an example, for the trajectory point Pi , whose three-dimensional coordinates are (x i , y i , z i ), and the displacement change rate is v i , then the displacement change vector v i = (x i , y i , z i , v i ). By splicing the three-dimensional coordinates and the displacement change rate together, the static position information and dynamic change information of the trajectory points can be integrated into a vector, making the information of each trajectory point more rich and comprehensive. The generated displacement change vector can more accurately describe the state of the ground surface at each sampling moment, providing more powerful data support for subsequent analysis of the trend and law of ground surface deformation.
[0054] Step S240: Arrange the displacement change vectors of all trajectory points in chronological order to form a displacement change sequence, and input the displacement change sequence into the graph attention network.
[0055] This step utilizes the powerful ability of the graph attention network to process sequential data with chronological order. According to the displacement change vectors of each trajectory point generated in step S230, they are arranged into a sequence according to the chronological order of the timestamps, such as {v1, v2, …, v n}, where n is the total number of trajectory points. The graph attention network is a neural network based on a graph structure that can automatically learn the relationships and importance among the nodes in the graph. In this scenario, the displacement change vector of each trajectory point can be regarded as a node in the graph, and the chronological order relationship between the nodes can be represented by edges. After inputting the displacement change sequence into the graph attention network, the network can use its internal attention mechanism to perform weighted processing on the displacement change vectors at different time points, highlighting important information, so as to better capture the long-term dependence relationship and local change characteristics of ground surface deformation.
[0056] Step S250: In the graph attention network, use the displacement change vector of each trajectory point as the graph node feature, and construct a directed edge connection relationship between the nodes according to the chronological order of adjacent trajectory points.
[0057] This step constructs a suitable graph structure for the graph attention network. In the graph attention network, the displacement change vector v i of each trajectory point is regarded as a node in the graph, and the feature of the node is the information contained in the displacement change vector. The directed edge connection relationship between the nodes is constructed according to the chronological order of adjacent trajectory points. For example, if the timestamp of trajectory point P i is later than that of trajectory point P i-1 , then there will be an edge from node Pi-1 To node P i Construct a directed edge. This directed edge connection relationship reflects the chronological order and propagation direction of surface deformation in time. By constructing such a graph structure, the graph attention network can utilize the connection information between nodes to better propagate and aggregate node features, thereby uncovering the internal laws and trends of surface deformation.
[0058] Step S260: Aggregate the features of multi-hop neighborhood nodes for each graph node feature to generate a node aggregation feature containing the local deformation propagation trend.
[0059] This step further enhances the ability of the graph attention network to mine surface deformation information. In the graph attention network, each node has its neighborhood nodes, where neighborhood nodes refer to the nodes directly connected to this node by a directed edge. Multi-hop neighborhood nodes refer to the nodes that can be reached through multiple edge connections. For example, for node P i , its one-hop neighborhood nodes are P i-1 and P i+1 , and its two-hop neighborhood nodes may be P i-2 and P i+2 etc. Aggregate the features of the multi-hop neighborhood nodes of each node. The aggregation method can adopt weighted summation. Specifically, for node P i , its node aggregation feature h i can be calculated by the following formula: , where N(i) represents the set of multi-hop neighborhood nodes of node P i , is the attention weight of node P j relative to node P i , which represents the importance degree of the feature of node P j to node P i . Through this aggregation of the features of multi-hop neighborhood nodes, the node aggregation feature h i can contain more local deformation propagation trend information, such as how surface deformation gradually spreads from one area to adjacent areas.
[0060] Step S270: Input the node aggregation feature into the attention weight calculation layer of the graph attention network to calculate the attention weight value between each graph node and the graph node at the previous moment; perform weighted summation on the node aggregation feature according to the attention weight value to generate a deformation displacement vector reflecting the deformation direction and intensity.
[0061] In the attention weight calculation layer of the graph attention network, calculate the attention weight value between each graph node and the graph node at the previous moment. The attention weight value represents the importance degree of the feature of the current node relative to the feature of the node at the previous moment. For example, for node and its previous moment node The attention weight value can be calculated by the following formula:
[0062] ;
[0063] where a is a learnable parameter vector, denotes concatenating the aggregated node features of node P i and node P j , and LeakyReLU is an activation function. After calculating the attention weight values, the aggregated node features are weighted and summed according to these weight values. Suppose the multi-hop neighborhood node set of node P i is N(i), then the deformation displacement vector D i can be calculated by the following formula: . This deformation displacement vector comprehensively considers the attention relationship between nodes and the local deformation propagation trend, and can accurately reflect the deformation direction and intensity of the ground surface at this moment, providing an important basis for road disaster warning.
[0064] As an implementation, in step S400, the vibration fluctuation feature, the deformation displacement vector, the humidity gradient feature, and the visual texture feature are subjected to multi-modal spatio-temporal feature fusion to generate a road state fusion feature, including:
[0065] Step S410: Perform a time alignment operation on the vibration fluctuation feature and the deformation displacement vector to generate a vibration-deformation correlation feature.
[0066] Step S410 aims to ensure the consistency of the two features in the time dimension, so as to accurately reflect the correlation between them. In the road monitoring scenario, the vibration fluctuation feature and the deformation displacement vector are features that describe the road state from different angles, and there may be inconsistencies in time due to factors such as the sampling frequency of sensors and data transmission delays. For example, the vibration sensor may collect data at a higher frequency, while the sampling frequency of the displacement sensor is relatively low, which results in the time stamps of the vibration fluctuation feature and the deformation displacement vector not being exactly corresponding within the same time period. A time alignment operation is performed using a method based on time stamp matching. First, obtain the time stamp sequences of the vibration fluctuation feature and the deformation displacement vector respectively. Suppose the time stamp sequence of the vibration fluctuation feature is , and the time stamp sequence of the deformation displacement vector is . Then, traverse these two time stamp sequences to find the closest time stamp pair. For each time stamp t vi of the vibration fluctuation feature, find the time stamp t dj in the time stamp sequence of the deformation displacement vector with the smallest difference from it., and correlate the corresponding vibration fluctuation characteristics and deformation displacement vectors. In some cases, it may not be possible to find exactly matching timestamps. In such cases, a linear interpolation method can be used to estimate the eigenvalue at the corresponding time point. After completing the time alignment operation, combine the aligned vibration fluctuation characteristics and deformation displacement vectors to generate vibration-deformation correlation characteristics. This correlation characteristic can reflect the mutual influence relationship between road vibration and surface deformation. For example, whether strong vibration will cause greater displacement changes on the surface, providing more valuable information for subsequent disaster analysis.
[0067] Step S420: Perform spatial interpolation processing on the humidity gradient feature to make the resolution of the humidity gradient feature consistent with the spatial distribution of the visual texture feature.
[0068] Step S420 is to eliminate the differences in spatial resolution between different features for effective subsequent feature fusion. The humidity gradient feature and the visual texture feature are obtained from different sensors, and their spatial resolutions may be different. For example, humidity sensors may be distributed at certain specific positions on the road, and the spatial resolution of the collected humidity gradient feature is relatively low; while the visual texture feature generated from the visible light image stream collected by the camera has a high spatial resolution. Use the bilinear interpolation method to perform spatial interpolation processing on the humidity gradient feature. Bilinear interpolation is a method of interpolation in a two-dimensional plane, which estimates the value of the point to be interpolated through the values of four known adjacent points. The formula for bilinear interpolation can refer to the aforementioned relevant introduction and will not be elaborated here. According to the spatial distribution of the visual texture feature, determine the positions that need to be interpolated, and use the bilinear interpolation formula to calculate the humidity gradient values at these positions. Through this spatial interpolation processing, the resolution of the humidity gradient feature is improved and is consistent with the spatial distribution of the visual texture feature, making the two features comparable in space and laying a foundation for subsequent cross-modal fusion.
[0069] Step S430: Input the vibration-deformation correlation feature, the humidity gradient feature, and the visual texture feature into the cross-modal fusion network, which includes a channel attention module and a spatial attention module.
[0070] The purpose of the cross-modal fusion network is to organically combine features from different modalities, fully exploit the complementary information between them, and improve the accuracy of road condition judgment. The channel attention module is used to dynamically adjust the weights of different feature channels because the importance of features in different channels may vary for road conditions. For example, in the vibration-deformation correlation features, some channels may be more capable of reflecting the immediate vibration of the road, while others may be related to the long-term deformation trend of the ground surface. The spatial attention module is used to weight the importance of the spatial positions of the feature map. In the visual texture features, the features in key areas such as the edges and cracks of the road may be more capable of reflecting road damage. The vibration-deformation correlation features, the humidity gradient features after spatial interpolation processing, and the visual texture features are simultaneously input into the cross-modal fusion network. In the network, first, these three features are concatenated in the channel dimension to form a feature tensor containing various information. Then, this feature tensor is processed sequentially through the channel attention module and the spatial attention module. The channel attention module performs global average pooling on each channel of the feature tensor, compressing the feature information of each channel into a scalar. Next, through a fully connected layer and an activation function, the weight value of each channel is calculated. Finally, these weight values are multiplied element-wise with the original feature tensor to achieve dynamic weighting of different channels. The spatial attention module performs operations on the feature tensor processed by the channel attention module in the spatial dimension. It performs max pooling and average pooling on the feature tensor, and then concatenates the results of these two poolings in the channel dimension. Next, through a convolutional layer and an activation function, a spatial attention map is generated, which represents the importance of each spatial position in the feature map. Finally, the spatial attention map is multiplied element-wise with the feature tensor processed by the channel attention module to achieve importance weighting of the spatial positions of the feature map. Through the processing of the channel attention module and the spatial attention module, the cross-modal fusion network can adaptively adjust the weights of different feature channels and spatial positions, highlight important information, and suppress irrelevant noise, thereby improving the effect of multi-modal feature fusion.
[0071] Step S440: Dynamically allocate the channel weights of the multi-modal features through the channel attention module and weight the importance of the spatial positions of the feature map through the spatial attention module.
[0072] Step S440 further refines the specific functions of the channel attention module and the spatial attention module in step S430. In the channel attention module, the specific process of dynamically allocating the channel weights of the multi-modal features is as follows. Assume that the feature tensor input to the channel attention module is , where C represents the number of channels, and H and W represent the height and width of the feature map respectively. First, perform global average pooling on the feature tensor F in the spatial dimension to obtain a vector of length C , the calculation formula is: , where represents the element of the feature tensor F at the c-th channel, the i-th row, and the j-th column. Then, the vector z is input into a neural network containing two fully connected layers. The first fully connected layer reduces the dimension of the vector z from C to , where r is a reduction ratio factor, usually taking a value of 16. Then, a ReLU activation function is introduced to introduce non-linearity. The second fully connected layer restores the dimension from to C, and maps the output value to the interval [0, 1] through a Sigmoid activation function to obtain the channel weight vector . Finally, the channel weight vector w is multiplied by the original feature tensor F channel by channel to obtain the feature tensor F' processed by the channel attention module, and the calculation formula is: . In the spatial attention module, the specific process of importance weighting for the spatial positions of the feature map is as follows. Suppose the feature tensor input to the spatial attention module is . First, the maximum pooling and average pooling operations are respectively performed on the feature tensor F' in the channel dimension to obtain two feature maps and . Then, these two feature maps are concatenated in the channel dimension to obtain a new feature map . Next, a convolutional layer reduces the number of channels of the feature map from 2 to 1, and maps the output value to the interval [0, 1] through a Sigmoid activation function to obtain the spatial attention map . Finally, the spatial attention map M is multiplied by the feature tensor F' element by element to obtain the feature tensor F'' processed by the spatial attention module, and the calculation formula is: . Through the processing of the channel attention module and the spatial attention module, the multi-modal features can be dynamically adjusted and weighted according to the importance of different feature channels and spatial positions, so as to achieve more effective multi-modal feature fusion.
[0073] Step S450: Concatenate the weighted multi-modal features in channels and generate the road state fusion features through a dimensionality reduction convolutional layer.
[0074] After being processed by the channel attention module and the spatial attention module, the multi-modal features have been weighted according to their channel importance and spatial position importance. At this time, these weighted features are concatenated in the channel dimension. Integrate the feature information of different modalities into a unified feature tensor, so that subsequent processing can comprehensively consider the information of multiple modalities.
[0075] After splicing is completed, the spliced feature tensor is input into the dimensionality reduction convolutional layer. The main function of the dimensionality reduction convolutional layer is to reduce the dimension of features, remove redundant information, and at the same time retain the features that are of great significance for judging the road state. The dimensionality reduction convolutional layer is implemented through convolutional operations, and the number of convolutional kernels it uses is, for example, less than the number of channels of the spliced feature tensor. After being processed by the dimensionality reduction convolutional layer, the number of channels of the feature tensor is reduced, and a lower-dimensional and more compact feature representation is obtained. This feature representation is the road state fusion feature, which synthesizes information from multiple aspects such as vibration, deformation, humidity, and vision, and can more comprehensively and accurately reflect the current state of the road.
[0076] As an implementation, the training process of the above disaster prediction model includes the following steps:
[0077] Step S501: The road state fusion features in the historical road state dataset are sliced into a continuous time period sequence in chronological order, and the corresponding disaster occurrence labels are marked at the end of each time period sequence.
[0078] In step S501, the road state fusion features in the historical road state dataset are sliced into a continuous time period sequence in chronological order, and the corresponding disaster occurrence labels are marked at the end of each time period sequence. This is to prepare a suitable data structure for the training of the disaster prediction model. The historical road state dataset contains a large number of road state fusion features, which are obtained by fusing multi-modal features such as vibration fluctuation features, deformation displacement vectors, humidity gradient features, and visual texture features, and reflect the comprehensive state of the road at different time points. These fusion features are divided in chronological order to form a continuous time period sequence. For example, assuming that the historical road state dataset covers the road state information within a month, it can be divided into a sequence with one day as a time period. Each time period sequence contains a series of road state fusion features within that time period, and the corresponding disaster occurrence label is marked at the end of the sequence. The disaster occurrence label is a binary classification label, such as "disaster occurred" is marked as 1, and "no disaster occurred" is marked as 0. This label is determined according to the actual disaster records. For example, if a landslide disaster occurred in a certain road area on a certain day, then the end label of the corresponding time period sequence is 1. Through such division and marking, the historical road state data is transformed into an input and output form suitable for model training, providing a clear goal for subsequent model learning.
[0079] Step S502: The road state fusion features with a set proportion at the front of the time period sequence are used as the training set and input into the bidirectional prediction network, which includes a gated recurrent unit layer and a self-attention mechanism layer connected in sequence.
[0080] Specifically, according to a preset ratio, such as 70%, the time period sequence is divided into a training set and a test set. The first 70% of the road state fusion features in the time period sequence are selected as the training set for training the bidirectional prediction network. The bidirectional prediction network is a neural network capable of processing sequence data, which combines the advantages of the gated recurrent unit layer and the self-attention mechanism layer. The gated recurrent unit (GRU) is a variant of the recurrent neural network. It controls the flow of information through a gating mechanism and can effectively handle long-term dependencies in sequence data. The self-attention mechanism can automatically learn the correlation relationships between different elements in the sequence and capture the global information of the sequence. During the training process, the road state fusion features in the training set are input into the gated recurrent unit layer in the order of time steps. The gated recurrent unit layer calculates the hidden state at the current time step based on the input at the current time step and the hidden state at the previous time step.
[0081] Step S503: In the pre-training stage of the bidirectional prediction network, perform a random masking operation on the road state fusion features of the training set to generate a binary mask matrix with the same dimension as the road state fusion features. After setting the values of some positions in the binary mask matrix to zero according to a set ratio and keeping the values of the remaining positions as 1, multiply the binary mask matrix element by element with the original road state fusion features to obtain the masked features.
[0082] The random masking operation is a data augmentation method that can improve the robustness and generalization ability of the model. For example, generate a binary mask matrix with the same dimension as the road state fusion features, and the elements in the matrix only have two values, 0 and 1. Then, according to a set ratio, such as 30%, randomly select some positions in the binary mask matrix and set the values of these positions to zero, while keeping the values of the remaining positions as 1. For example, for a road state fusion feature with a dimension of T×C (T is the time step and C is the number of channels), the generated binary mask matrix also has a dimension of T×C. Randomly set 30% of its elements to 0 and the remaining 70% of the elements to 1. Finally, multiply the binary mask matrix element by element with the original road state fusion features to obtain the masked features. In this way, the model needs to learn to recover the complete road state information from the partially visible features during the training process, thereby improving the model's ability to process missing data and its understanding of data.
[0083] Step S504: Input the masked features into the gated recurrent unit layer in the order of time steps, sequentially extract the hidden state features at each time step, and concatenate the hidden state features of all time steps into a time series feature.
[0084] In a bidirectional prediction network, the gated recurrent unit layer is a core component for processing sequential data. The masked features are sequentially input into the gated recurrent unit layer in the order of time steps. At each time step, the gated recurrent unit layer calculates the hidden state at the current time step based on the input at the current time step and the hidden state at the previous moment. Through the control of the update gate and the reset gate, the gated recurrent unit can effectively capture the long-term dependencies in the sequential data. The hidden state features calculated at each time step are sequentially saved, and finally, the hidden state features of all time steps are concatenated in the time dimension to form a complete time series feature. This time series feature contains information about the road state at different time steps and provides input for the subsequent self-attention mechanism layer.
[0085] Step S505: Input the time series feature into the self-attention mechanism layer, calculate the correlation weight matrix between the features of each time step in the time series feature, and generate the reconstructed complete road state fusion feature by weighted summation based on the correlation weight matrix.
[0086] The self-attention mechanism layer can automatically learn the correlation relationships between different elements in the sequence. First, the time series feature is multiplied by three learnable weight matrices respectively to obtain the query matrix Q, the key matrix K, and the value matrix V. Then, the dot product of the query matrix Q and the key matrix K is calculated and divided by a scaling factor (d k is the dimension of the key matrix) to obtain the similarity score matrix. Next, the similarity score matrix is transformed into a correlation weight matrix through the Softmax function, so that the sum of each row element in the matrix is 1. Finally, the correlation weight matrix is multiplied by the value matrix V and summed to obtain the reconstructed complete road state fusion feature. In this way, the self-attention mechanism layer can capture the global correlation information between different time steps in the time series feature, thereby better reconstructing the complete road state fusion feature.
[0087] Step S506: Input the reconstructed complete road state fusion feature and the original road state fusion feature into the mean squared error calculation module, and output the feature reconstruction loss value.
[0088] The mean squared error (MSE) is used to measure the degree of difference between two vectors. The reconstructed complete road state fusion feature and the original road state fusion feature are used as inputs and substituted into the mean squared error calculation formula: , where y i is the i-th element in the original road state fusion feature, is the i-th element in the reconstructed complete road state fusion feature, and n is the length of the feature vector. The feature reconstruction loss value reflects the accuracy of the model in reconstructing the road state fusion feature during the pre-training stage. The smaller the loss value, the better the reconstruction effect of the model. By minimizing this loss value, the parameters of the bidirectional prediction network are optimized, enabling the model to better learn the feature patterns of the road state.
[0089] Step S507: In the optimization training stage of the bidirectional prediction network, the unmasked original road state fusion feature is input into the trained gated recurrent unit layer, and the time series feature is output and a disaster probability prediction vector is generated through the self-attention mechanism layer.
[0090] After the pre-training stage, the model has learned certain road state feature patterns. In the optimization training stage, the original road state fusion feature without random masking operation is input into the trained gated recurrent unit layer in the order of time steps. The gated recurrent unit layer calculates the hidden state features of each time step in turn according to the calculation method described above, and concatenates the hidden state features of all time steps into a time series feature. Then, this time series feature is input into the self-attention mechanism layer, and the self-attention mechanism layer generates a disaster probability prediction vector by calculating the correlation weight matrix and weighted summation. Each element in this vector represents the occurrence probability of the corresponding disaster type, and the dimension of the vector is equal to the number of disaster types. For example, if there are three disaster types: landslide, collapse, and debris flow, then the dimension of the disaster probability prediction vector is 3.
[0091] Step S508: The disaster probability prediction vector and the disaster occurrence label are input into the cross-entropy calculation module, and the classification loss value is output.
[0092] Cross-entropy is used to measure the difference between the probability distribution predicted by the model and the true label. Suppose the disaster probability prediction vector is , where represents the predicted probability of the i-th disaster type, and the disaster occurrence label is , where is the true label (0 or 1) of the i-th disaster type. The calculation formula of the cross-entropy loss function is: . The classification loss value reflects the accuracy of the model in disaster classification prediction. The smaller the loss value, the closer the prediction result of the model is to the true label. By minimizing this loss value, the parameters of the bidirectional prediction network are further optimized to improve the model's prediction ability for disaster occurrence.
[0093] Step S509: The feature reconstruction loss value and the classification loss value are superimposed into a joint loss value according to a preset weight ratio, and the network parameters of the gated recurrent unit layer and the self-attention mechanism layer are updated through the backpropagation algorithm until the joint loss value is stabilized within the set threshold range.
[0094] First, according to the preset weight ratio, such as the weight of the feature reconstruction loss value is , and the weight of the classification loss value is , the feature reconstruction loss value and the classification loss value are weighted and superimposed to obtain the combined loss value: . The combined loss value comprehensively considers the performance of the model in two aspects: feature reconstruction and disaster classification prediction. Then, the backpropagation algorithm is used to calculate the gradients of the combined loss value with respect to the network parameters of the gated recurrent unit layer and the self-attention mechanism layer. The backpropagation algorithm starts from the combined loss value and gradually calculates the parameter gradients of each network layer through the chain rule. Next, according to the calculated gradients, an optimization algorithm (such as stochastic gradient descent) is used to update the network parameters. This process is continuously repeated until the combined loss value stabilizes within the set threshold range. When the combined loss value stabilizes, it indicates that the model has converged and can better learn the relationship between the road state and the occurrence of disasters. At this time, the training process ends, and a trained disaster prediction model is obtained.
[0095] As an implementation manner, in the above step S503, the random masking operation on the road state fusion features of the training set may include the following implementation steps:
[0096] Step S5031: Randomly select two consecutive time period sequences from the road state fusion features of the training set, and denote them as the first feature segment and the second feature segment respectively.
[0097] In step S5031, by randomly selecting two consecutive time period sequences from the road state fusion features of the training set and denoting them as the first feature segment and the second feature segment respectively, the diversity of the data and the generalization ability of the model can be increased. In the road disaster warning scenario, the training set contains a large number of road state fusion features in different time periods, and these features reflect the comprehensive state of the road at different times. By randomly selecting two consecutive time period sequences from the training set, for example, if the training set covers the road state information within a month, it may randomly select the time period sequence from the 10th day to the 15th day as the first feature segment and the time period sequence from the 16th day to the 21st day as the second feature segment. This random selection method avoids overfitting of the model to specific time periods caused by fixed selection of certain time periods, enabling the model to learn a wider range of road state change patterns.
[0098] Step S5032: Generate a horizontal masking template for the first feature segment: Randomly mask the continuous channel data of the first preset ratio in the channel dimension of each road state fusion feature, and retain the original values of the remaining second preset ratio channels.
[0099] This step is designed to simulate the missing data in the channel dimension and enhance the robustness of the model to the missing channel information. Assuming that the first preset ratio is 30% and the second preset ratio is 70%, for each road state fusion feature in the first feature segment, it has multiple channels, and each channel represents different types of feature information, such as vibration, deformation, humidity and other related features. Continuous channels will be randomly selected, their data will be set to zero, and this part of the channel information will be masked. For example, a road state fusion feature has 10 channels, and the 3rd to 5th channels may be randomly selected for masking, so that the data of these three channels will not be used by the model in subsequent processing, while the original values of the remaining 7 channels are retained. In this way, the model needs to learn to recover the complete road state features from the partially visible channel information during the training process to improve the ability to handle the missing channel information.
[0100] Step S5033: Generate a longitudinal mask template for the second feature segment: randomly mask a third preset proportion of continuous time node data in the time step dimension of each road state fusion feature, and retain the complete features of the remaining fourth preset proportion of time nodes.
[0101] This step simulates the missing data in the time dimension and improves the model's adaptability to the missing time information. Assuming that the third preset ratio is 20% and the fourth preset ratio is 80%, for each road state fusion feature in the second feature segment, it has multiple time steps in time, and each time step records the road state information at that moment. Continuous time nodes will be randomly selected, and the data of these time nodes will all be set to zero. For example, a road state fusion feature is recorded within 100 time steps, and the 20th to 39th time steps may be randomly selected for masking, so that the data of these 20 time steps are not used by the model, while the complete features of the remaining 80 time steps are retained. In this way, the model can learn to infer the complete road state change trend from the information of some time steps, and enhance the ability to handle the missing time information.
[0102] Step S5034: superimpose the horizontal mask template and the vertical mask template to generate a composite mask matrix, and correct the value of the repeated masking area in the composite mask matrix to a single masking state.
[0103] This step integrates the masking information in the channel dimension and the time dimension into a matrix. The horizontal masking template masks the data in the channel dimension, and the vertical masking template masks the data in the time dimension. By superimposing them, a composite mask matrix that takes into account both the channel and time dimensions can be obtained. During the superimposing process, there may be some regions that are marked as masked in both the horizontal and vertical masking templates. The values in these repeatedly masked regions are corrected to the single-masked state to avoid over-masking. For example, in the composite mask matrix, a certain position is marked as masked in both the horizontal and vertical masking templates. The value at this position is uniformly processed to perform only one masking operation to ensure the reasonable processing of the data.
[0104] Step S5035: Apply the composite mask matrix to the first feature segment and the second feature segment respectively to generate two sets of different masked features.
[0105] This step applies the composite mask matrix to the actual feature data to obtain the masked features. Multiply the composite mask matrix element-wise with the road state fusion feature of the first feature segment, and set the feature data corresponding to the positions where the matrix is 0 to zero, thereby implementing the masking operation on the first feature segment to obtain the first set of masked features. Similarly, multiply the composite mask matrix element-wise with the road state fusion feature of the second feature segment to obtain the second set of masked features. In this way, the feature data of the first feature segment and the second feature segment are randomly masked in both the channel and time dimensions, simulating the data missing situation that may occur in actual applications, and providing more challenging training data for the model.
[0106] Step S5036: Input the two sets of masked features into the gated recurrent unit layer in parallel to extract the first hidden state feature sequence and the second hidden state feature sequence respectively.
[0107] This step uses the gated recurrent unit layer to process the masked features and extract the hidden state information in the sequence. The gated recurrent unit (GRU) can calculate the hidden state at the current moment based on the input sequence data and the hidden state at the previous moment. Input the first set of masked features into the gated recurrent unit layer in the order of time steps. The gated recurrent unit layer calculates the hidden state at each time step in turn according to its internal calculation formula to form the first hidden state feature sequence. Similarly, input the second set of masked features into the gated recurrent unit layer to obtain the second hidden state feature sequence. These two hidden state feature sequences contain the understanding and representation of the road state features by the gated recurrent unit layer in the case of partial data loss.
[0108] Step S5037: Alternately splice the first hidden state feature sequence and the second hidden state feature sequence in the time step dimension to generate a mixed time series feature.
[0109] This step fuses the hidden state feature sequences of two different feature segments to increase the complexity and diversity of the data. In the time step dimension, the first hidden state feature sequence and the second hidden state feature sequence are alternately arranged. For example, if the first hidden state feature sequence has 10 time steps and the second hidden state feature sequence also has 10 time steps, they are alternately spliced into a mixed time series feature with a length of 20. For example, take the first time step of the first hidden state feature sequence, the first time step of the second hidden state feature sequence, the second time step of the first hidden state feature sequence... Through this alternating splicing method, the mixed time series feature contains the feature information of two different time periods, and the arrangement of the feature information is more complex, which helps the model learn richer feature patterns.
[0110] Step S5038: Input the mixed time series feature into the self-attention mechanism layer, calculate the correlation score between each time step feature and the disaster occurrence label, and filter out the time step features with a correlation score higher than the set score to form a high-weight feature set.
[0111] This step uses the self-attention mechanism to mine the feature information closely related to the disaster occurrence in the mixed time series feature. The self-attention mechanism can automatically learn the correlation relationship between different elements in the sequence. Input the mixed time series feature into the self-attention mechanism layer, and through calculating the attention weight matrix, obtain the correlation degree between each time step feature and other time step features. Then, conduct a correlation analysis between each time step feature and the corresponding disaster occurrence label, and calculate the correlation score. The correlation score can be obtained by calculating the similarity between the feature vector and the label vector, such as using cosine similarity calculation. A score threshold can be set to filter out the time step features with a correlation score higher than this threshold, and these features are used to form a high-weight feature set. The features in these high-weight feature sets have a strong correlation with the disaster occurrence.
[0112] Step S5039: Input the high-weight feature set into the fully connected layer for dimensionality reduction processing to generate a compact reconstruction feature, and compare the compact reconstruction feature with the original road state fusion feature channel by channel.
[0113] The fully connected layer multiplies the input feature vector by the weight matrix and adds the bias to obtain the output vector. The high-weight feature set is input into the fully connected layer, and by adjusting the weight matrix of the fully connected layer, the dimension of the high-weight feature set is reduced to generate a compact reconstructed feature. This dimensionality reduction process can remove redundant information and extract key features. Then, the compact reconstructed feature is compared with the original road state fusion feature channel by channel in the channel dimension to calculate the difference value of each channel. For example, for a certain channel, calculate the difference between the value of the compact reconstructed feature in this channel and the value of the original road state fusion feature in this channel. Through this comparison, the error region in the feature reconstruction process can be found.
[0114] Step S5040: Locate the feature reconstruction error region according to the unmatched channel data in the comparison result, and feedback the channel position information of the error region to the composite mask matrix generation module to dynamically adjust the masking ratios of the horizontal masking template and the vertical masking template in subsequent training cycles.
[0115] In this step, the random masking operation is dynamically adjusted according to the information of the feature reconstruction error region to improve the training effect of the model. After comparing the compact reconstructed feature and the original road state fusion feature channel by channel, the unmatched channel data are found, and the channels where these data are located are the feature reconstruction error regions. The channel position information of these error regions is fed back to the composite mask matrix generation module. The composite mask matrix generation module dynamically adjusts the masking ratios of the horizontal masking template and the vertical masking template in subsequent training cycles according to this information. For example, if a certain channel has a large error in the feature reconstruction process, then in subsequent training, the masking ratio of this channel in the horizontal masking template may be reduced to allow the model to have more opportunities to learn the information of this channel, thereby improving the model's processing ability for the information of this channel. Through this dynamic adjustment, the model can better adapt to the data missing situations in different channels and time dimensions, improving the generalization ability of the model and the prediction accuracy of road disasters.
[0116] As an implementation manner, in step S500, the determination process of the dynamically adjusted disaster threshold may include the following steps:
[0117] Step S500a: Obtain the historical disaster occurrence probability data set and actual disaster records of the current road area.
[0118] During the operation of the road disaster warning system, the disaster occurrence probabilities of the current road area are continuously recorded. These probabilities are calculated by the disaster prediction model based on the integrated features of the road conditions. At the same time, the actual disaster situations that occur are recorded, including information such as the time and type of the disaster. For example, the disaster occurrence probabilities of each month in the past year for this road area may be saved, as well as the specific records of actual disasters such as landslides and collapses. By collecting these historical data, a historical disaster occurrence probability dataset and actual disaster records are constructed, which reflect the disaster risk situations and actual disaster occurrence situations in this road area at different times.
[0119] Step S500b: Calculate the false alarm rate and missed alarm rate for different probability intervals according to the historical disaster occurrence probability dataset.
[0120] This step is used to evaluate the accuracy of disaster warnings under different probability thresholds. First, the historical disaster occurrence probability dataset is divided into multiple probability intervals. For example, the probability range from 0 to 1 is divided into intervals such as [0, 0.1), [0.1, 0.2), [0.2, 0.3), etc. For each probability interval, the disaster warning situations within this interval are counted. The false alarm rate refers to the proportion of cases where the model predicts a disaster but no disaster actually occurs within this probability interval. Suppose within the probability interval [0.2, 0.3), the model issues 100 disaster warnings, but only 20 disasters actually occur. Then the number of false alarms is 80, and the false alarm rate is 0.8. The missed alarm rate refers to the proportion of cases where the model predicts no disaster but a disaster actually occurs within this probability interval. For example, within this interval, 20 disasters actually occur, but the model only warns of 10 disasters. Then the number of missed alarms is 10, and the missed alarm rate is 0.5. By calculating the false alarm rates and missed alarm rates for different probability intervals, the reliability of disaster warnings under different probability thresholds can be understood.
[0121] Step S500c: Construct an optimization function with the constraint that the false alarm rate does not exceed the first threshold and the missed alarm rate does not exceed the second threshold.
[0122] This step transforms the accuracy requirements of disaster early warning into a mathematical optimization problem. The first threshold and the second threshold are preset upper limits of the acceptable false alarm rate and missed alarm rate. For example, the first threshold is set to 0.2 and the second threshold is set to 0.1, indicating that the maximum allowable false alarm rate is 20% and the maximum missed alarm rate is 10%. The objective of the optimization function is to find a suitable disaster threshold that can perform disaster early warning as accurately as possible under the premise of meeting the constraints of the false alarm rate and missed alarm rate. Assuming the disaster threshold is t, the false alarm rate is FPR(t), and the missed alarm rate is FNR(t), the optimization function can be expressed as: max f(t), where f(t) is an index related to the accuracy of disaster early warning, such as the accuracy rate of the early warning. At the same time, the constraint conditions are FPR(t) ≤ the first threshold and FNR(t) ≤ the second threshold. By constructing such an optimization function, mathematical methods can be used to find the optimal disaster threshold.
[0123] Step S500d: Solve the optimization function using the particle swarm optimization algorithm to obtain the dynamic disaster threshold corresponding to the current road area.
[0124] This step uses the search ability of the particle swarm optimization algorithm to find the optimal disaster threshold that meets the constraint conditions. The particle swarm optimization algorithm is an optimization algorithm based on swarm intelligence, which simulates the group behavior of bird flocks or fish schools. In this algorithm, a group of particles is first initialized, and each particle represents a possible disaster threshold t. Each particle has two attributes: position and velocity. The position represents the value of the disaster threshold, and the velocity represents the moving direction and speed of the particle in the search space. According to the optimization function and the constraint conditions, the fitness value of each particle is calculated, and the fitness value represents the quality of the disaster threshold corresponding to the particle. Then, each particle in the particle swarm updates its velocity and position according to its own historical optimal position and the global optimal position of the group. In each iteration process, the particles continuously move towards a better position until the termination condition is met, such as reaching the maximum number of iterations or the fitness value converges. Finally, the particle with the optimal fitness value is obtained, and the disaster threshold corresponding to its position is the dynamic disaster threshold corresponding to the current road area. For example, after multiple iterations, the particle swarm finds a disaster threshold t = 0.35, which satisfies the constraint conditions that the false alarm rate does not exceed the first threshold and the missed alarm rate does not exceed the second threshold, and makes the value of the optimization function the largest. Then 0.35 is the dynamic disaster threshold of the current road area. In this way, the disaster threshold suitable for the current road area can be dynamically determined according to historical data and preset accuracy requirements, improving the accuracy and reliability of disaster early warning.
[0125] As an implementation method, in step S500, when the disaster occurrence probability exceeds the dynamically adjusted disaster threshold, an early warning signal matching the disaster type is triggered, including:
[0126] Step S510: Divide three consecutive warning level intervals according to the numerical range of the disaster occurrence probability, and generate a first-level warning signal, a second-level warning signal, and a third-level warning signal;
[0127] Specifically, based on the disaster occurrence probability output by the disaster prediction model, set different probability thresholds to divide the warning level intervals. For example, set the disaster occurrence probability in the range of 0 - 0.3 as the third-level warning interval, 0.3 - 0.7 as the second-level warning interval, and 0.7 - 1 as the first-level warning interval. When the disaster occurrence probability is in the range of 0 - 0.3, generate a third-level warning signal, indicating that the possibility of the disaster occurring is relatively low, but certain attention still needs to be paid; when the probability is in the range of 0.3 - 0.7, generate a second-level warning signal, meaning that the possibility of the disaster occurring is medium, and monitoring and preparation for response measures need to be strengthened; when the probability is in the range of 0.7 - 1, generate a first-level warning signal, indicating that the possibility of the disaster occurring is very high, and immediate action must be taken. This hierarchical warning mechanism can reasonably allocate resources and adopt corresponding response strategies according to the different degrees of disaster risks.
[0128] Step S520: When the first-level warning signal is triggered, extract the real-time disaster coordinates of the current road area and the disaster image frames in the visible light image stream, send the disaster coordinates and the disaster image frames to the road maintenance terminal, and activate the emergency communication link of the road maintenance terminal;
[0129] When the disaster occurrence probability exceeds the lower limit of the first-level warning interval (such as 0.7), quickly obtain the real-time disaster coordinates of the current road area from the geographic information system, and this coordinate accurately indicates the specific location where the disaster may occur. At the same time, screen out the image frames related to the disaster from the visible light image stream, and these image frames can visually display the situation of the road site, such as road surface cracks, collapses, etc. Package the disaster coordinates and the disaster image frames into data information and send them to the road maintenance terminal through network transmission. The road maintenance terminal is usually a device used by road management departments or maintenance personnel. After receiving this information, they can quickly understand the specific location and on-site situation of the disaster. Activate the emergency communication link of the road maintenance terminal, and this link is a communication channel dedicated to emergency situations, ensuring that road maintenance personnel can communicate with relevant departments and personnel in a timely manner to coordinate the work of dealing with the disaster.
[0130] Step S530: Receive the emergency response status information feedback by the road maintenance terminal through the emergency communication link, associate the emergency response status information with the disaster coordinates, and then input them into the warning signal continuous monitoring queue;
[0131] After receiving the disaster coordinates and disaster image frames, the road maintenance terminal evaluates the disaster situation and takes corresponding emergency response measures. At the same time, it feeds back the emergency response status information to... through the emergency communication link. The emergency response status information includes whether rescue personnel have been dispatched, whether rescue supplies are ready, and other contents. After receiving this information, it associates it with the disaster coordinates. For example, it marks the corresponding emergency response status for each disaster coordinate. Then, it inputs the associated information into the early warning signal continuous monitoring queue. This queue is a data structure used to store and manage information related to early warning signals, facilitating the continuous monitoring and tracking of early warning signals.
[0132] Step S540: When the probability of disaster occurrence does not decrease within three consecutive monitoring cycles in the early warning signal continuous monitoring queue, upgrade the first-level early warning signal to a second-level early warning signal;
[0133] Specifically, the probability of disaster occurrence is monitored at regular time intervals (i.e., monitoring cycles), and the monitoring results are updated to the early warning signal continuous monitoring queue. If the probability of disaster occurrence remains within the first-level early warning range and shows no downward trend within three consecutive monitoring cycles, it indicates that the disaster risk has not been effectively alleviated and may even deteriorate further. At this time, upgrade the first-level early warning signal to a second-level early warning signal to remind relevant personnel to take higher-level response measures. This dynamic upgrade mechanism of early warning signals can adjust the early warning level in a timely manner according to the changes in the disaster situation, ensuring the effectiveness of response measures.
[0134] Step S550: When the second-level early warning signal is triggered, extract the traffic flow distribution data and vehicle position data set of the current road area, and generate a path avoidance advice vector based on the disaster coordinates and the vehicle position data set;
[0135] Specifically, when the probability of disaster occurrence is within the second-level early warning range (such as 0.3 - 0.7), extract the traffic flow distribution data of the current road area from the traffic monitoring system. This data reflects the traffic flow volume of different sections of the road. At the same time, obtain the vehicle position data set through the vehicle positioning system. This data set contains the real-time position information of each vehicle on the road. Combine the disaster coordinates and the vehicle position data set to analyze the relative position relationship between each vehicle and the disaster occurrence location. For vehicles that may be affected by the disaster, plan a driving route to avoid the disaster area according to the traffic flow distribution data. The path avoidance advice vector is a vector containing information such as the recommended driving direction and section, which indicates how the vehicle should adjust its driving route to avoid entering the disaster area. For example, it is recommended that the vehicle turn right from the current position and enter another road to bypass the disaster point.
[0136] Step S560: Push the path avoidance recommendation vector to the on-vehicle terminal corresponding to the vehicle location dataset, and extract the traffic signal control nodes affected by the disaster coordinates from the traffic flow distribution data.
[0137] In step S560, the path avoidance recommendation vector is pushed to the on-vehicle terminal corresponding to the vehicle location dataset, and the traffic signal control nodes affected by the disaster coordinates are extracted from the traffic flow distribution data. Through wireless communication technology, the generated path avoidance recommendation vector is sent to the on-vehicle terminal corresponding to the vehicle location dataset. The on-vehicle terminal is usually a navigation device or intelligent terminal installed on the vehicle. After receiving the path avoidance recommendation vector, it displays the recommended driving path on the navigation interface to guide the driver to avoid the disaster area. At the same time, the traffic signal control nodes affected by the disaster coordinates are identified from the traffic flow distribution data. These nodes are key positions in the traffic signal control system, such as the traffic signal control devices at intersections. The traffic signal control nodes affected by the disaster may need to adjust the signal timing to optimize the traffic flow and avoid vehicle congestion near the disaster area.
[0138] Step S570: Adjust the phase timing parameters of the traffic signal control nodes according to the push coverage rate of the path avoidance recommendation vector, and synchronize the adjusted phase timing parameters to the traffic signal control system.
[0139] Specifically, calculate the push coverage rate of the path avoidance recommendation vector, that is, the ratio of the number of vehicles receiving the path avoidance recommendation vector to the total number of vehicles. If the push coverage rate is high, it means that most vehicles can receive the path avoidance recommendation. At this time, the phase timing parameters of the traffic signal control nodes can be appropriately adjusted to cooperate with the detour routes of the vehicles. For example, increase the green light time at the intersections leading to the detour route and reduce the green light time at the intersections leading to the disaster area. Send the adjusted phase timing parameters to the traffic signal control system, and the traffic signal control system adjusts the phase and duration of the traffic lights according to the new parameters to optimize the traffic flow. In this way, when a disaster occurs, vehicles can be guided to avoid the disaster area, while optimizing the traffic signal control, reducing traffic congestion, and improving the safety and traffic efficiency of the road.
[0140] As an implementation manner, the method provided in the embodiment of the present invention may further include an online update mechanism for the disaster prediction model. Specifically, it may include the following steps:
[0141] Step S580: After triggering the warning signal, continuously collect the vibration waveform sequence, surface deformation trajectory, and visible light image stream of the current road area to generate a dataset of road state changes after the warning.
[0142] Specifically, when the disaster prediction model triggers a warning signal, it means that there may be disaster risks on the road. At this time, the monitoring of the road conditions will be strengthened. Through the vibration sensors deployed in the road monitoring area, the vibration waveform sequences are continuously collected. These waveform sequences reflect the vibration conditions of the road after the warning is triggered, such as the vibrations caused by vehicle driving, geological activities, etc. The displacement sensors are used to obtain the surface deformation trajectories and record the position changes of the surface after the warning, such as the uplift, subsidence or horizontal displacement of the ground. At the same time, the visible light image streams are collected through devices such as cameras to visually display the real-time conditions of the road surface, such as whether there are cracks, collapses, etc. The collected data are integrated to generate a dataset of the road condition changes after the warning. This dataset contains multi-faceted condition information of the road for a period of time after the warning is triggered, providing a data basis for subsequent analysis of the change trends of the road conditions.
[0143] Step S590: Align the time stamps of the dataset of the road condition changes after the warning with the types of the triggered warning signals to generate an increment training dataset of the model with warning labels.
[0144] Each data in the dataset of the road condition changes after the warning has a corresponding time stamp, which records the specific time of data collection. Align the time stamps of these data with the types of the triggered warning signals (such as landslide warning, collapse warning, etc.) to ensure that each data point can be accurately corresponded to the corresponding warning signal type. For example, if the warning signal is triggered at a certain moment, find the vibration waveform sequences, surface deformation trajectories and visible light image stream data collected before and after that moment, and associate them with the warning signal type. Through this time stamp alignment operation, warning labels are added to each data point, indicating the warning type corresponding to the data, so as to generate an increment training dataset of the model with warning labels. This dataset will be used as the input for the subsequent increment training of the disaster prediction model to help the model learn the change characteristics of the road conditions under different warning types.
[0145] Step S5100: At every preset model update period, extract the increment training samples within the most recent time window from the increment training dataset of the model, and input the increment training samples into the disaster prediction model for forward propagation.
[0146] Specifically, in the embodiments of the present invention, a model update period is preset, for example, the model is updated once a week or once a month. When each update period arrives, data within a recent period of time is extracted from the model incremental training dataset with warning labels, and this time period is called a time window. For example, data within the most recent week is selected as incremental training samples. These incremental training samples contain the latest road condition information and corresponding warning labels. The incremental training samples are input into the disaster prediction model for forward propagation. Forward propagation refers to the process where data starts from the input layer of the model, passes through the calculations of each hidden layer in sequence, and finally reaches the output layer to obtain the prediction result. During this process, the model processes the incremental training samples according to the current parameters and outputs the predicted disaster occurrence probability and type.
[0147] Step S5110: Calculate the incremental loss value between the prediction probability of the disaster prediction model for the incremental training samples and the warning labels, and generate the fine-tuning gradient of the model parameters according to the incremental loss value.
[0148] Specifically, compare the prediction probability of the disaster prediction model for the incremental training samples with the warning labels, and use a loss function (such as the cross-entropy loss function) to calculate the incremental loss value between the two. The incremental loss value reflects the prediction error of the model when processing the incremental training samples. According to the incremental loss value, use the backpropagation algorithm to calculate the gradient of the model parameters. The backpropagation algorithm, through the chain rule, starts from the loss value and calculates the partial derivative of the loss value with respect to each parameter of the model layer by layer to obtain the fine-tuning gradient of the model parameters. This gradient indicates the direction and magnitude by which the model parameters need to be adjusted in order to reduce the incremental loss value and improve the prediction accuracy of the model.
[0149] As an implementation manner, the generation process of the fine-tuning gradient of the model parameters includes:
[0150] Step S5111: Based on the incremental loss value, screen the top K samples with the largest loss values from the model incremental training dataset to generate a set of key samples.
[0151] In step S5111, the top K samples with the largest loss value are screened from the model incremental training data set based on the incremental loss value to generate a key sample set. This is the process of screening the model incremental training data set, and the purpose is to focus on those samples that have a greater impact on model performance. In the incremental training of the disaster prediction model, an incremental loss value is calculated for each sample, which reflects the degree of difference between the model's prediction result for the sample and the true label. All samples in the model incremental training data set are sorted from large to small according to the incremental loss value. For example, in a model incremental training data set containing 1,000 samples, after calculating the incremental loss value of each sample, they are arranged in descending order. Then, the top K samples after sorting are selected, where K is a pre-set parameter, such as K = 100, that is, the 100 samples with the largest loss value are selected. These samples represent the part where the model prediction effect is poor, and contain important information that the model may not have fully learned. They are formed into a key sample set, and the model will be adjusted for these samples later.
[0152] Step S5112: Freeze the dilated convolution kernel parameters of the temporal feature encoder and the graph attention network parameters of the spatial feature encoder in the disaster prediction model, and keep the channel attention module parameters of the cross-modal fusion network in an updateable state.
[0153] In step S5112, the parameters of the dilated convolution kernel of the temporal feature encoder and the graph attention network of the spatial feature encoder in the disaster prediction model are frozen, and the parameters of the channel attention module of the cross-modal fusion network are kept in an updateable state. This is a strategy to limit the update range of the model parameters. In the disaster prediction model, the temporal feature encoder extracts the features of the vibration waveform sequence through the dilated convolution kernel, the spatial feature encoder uses the graph attention network to process the surface deformation trajectory data, and the channel attention module of the cross-modal fusion network is used to dynamically allocate the channel weights of the multimodal features. Freezing the parameters of the dilated convolution kernel of the temporal feature encoder and the graph attention network parameters of the spatial feature encoder means that these parameters will not be updated in the subsequent training process. This is because these modules have learned some stable feature representations in previous training, and freezing them can avoid destroying these existing feature learning results during the incremental training process. The parameters of the channel attention module of the cross-modal fusion network remain in an updateable state because the module is directly related to the fusion of multimodal features. Adjusting its parameters can make the model better adapt to new incremental training data and optimize the fusion effect of multimodal features. For example, when processing new road status data, the channel attention module can dynamically adjust the weights of different modal feature channels according to the characteristics of the data, thereby improving the model's ability to process new data.
[0154] Step S5113: Input the key sample set into the frozen disaster prediction model, and extract the channel weight distribution output by the channel attention module in the cross-modal fusion network.
[0155] In step S5113, input the key sample set into the frozen disaster prediction model, and extract the channel weight distribution output by the channel attention module in the cross-modal fusion network. This step is to obtain the feature information of the channel attention module when processing key samples. Input the key sample set generated in step S5111 into the frozen model processed in step S5112. During the forward propagation of the model, the channel attention module of the cross-modal fusion network processes the input multi-modal features and dynamically assigns channel weights according to the importance of the features. Record the channel weight distribution output by the channel attention module. This distribution reflects the importance of different modal feature channels when processing key samples. For example, when processing key samples containing multi-modal features such as vibration, deformation, humidity, and vision, the channel attention module may assign higher weights to the channels related to vibration, indicating that vibration features are more important for disaster prediction in these samples, while lower weights may be assigned to some humidity feature channels. By extracting the channel weight distribution, we can understand the focus of the model on different modal features when processing key samples, providing a basis for subsequent parameter adjustment.
[0156] Step S5114: Calculate the gradient change of the channel attention module parameters relative to the incremental loss value according to the direction of the incremental loss value of the channel weight distribution on the key sample set, and generate the initial fine-tuning gradient.
[0157] Specifically, first analyze the direction of the incremental loss value of the channel weight distribution on the key sample set, that is, observe how the incremental loss value changes when the channel weight changes. If increasing the weight of a certain channel causes the incremental loss value to decrease, it means that the weight of this channel should be increased; conversely, if increasing the weight of a certain channel causes the incremental loss value to increase, then the weight of this channel should be decreased. Use the backpropagation algorithm to calculate the gradient change of the channel attention module parameters relative to the incremental loss value. The backpropagation algorithm is based on the chain rule and calculates the partial derivatives of the loss value with respect to each parameter of the channel attention module layer by layer starting from the incremental loss value. These partial derivatives form the initial fine-tuning gradient, which represents the direction and magnitude of the adjustment required for the channel attention module parameters. For example, for a certain weight parameter in the channel attention module, the partial derivative of it with respect to the incremental loss value is calculated through the backpropagation algorithm, and this partial derivative is the corresponding value of this parameter in the initial fine-tuning gradient. The initial fine-tuning gradient provides specific adjustment guidance for subsequent parameter updates.
[0158] Step S5115: Input the initial fine-tuning gradient into a moving average filter to smooth and suppress the instantaneous fluctuations of the initial fine-tuning gradient, and generate a stabilized fine-tuning gradient.
[0159] Step S5115 is to improve the stability of the gradient. The initial fine-tuning gradient may have instantaneous fluctuations, which may be caused by data noise or local instability of the model. If the initial fine-tuning gradient is directly used for parameter update, it may lead to instability in the model training process and even oscillation. The moving average filter is used to process the initial fine-tuning gradient. The basic principle of the moving average filter is to perform weighted averaging on the gradient values over a period of time. Commonly used is the exponential moving average (EMA) method. Suppose the initial fine-tuning gradient sequence is , and the calculation formula for the exponential moving average is , where v t is the moving average gradient at time t, is a smoothing coefficient, usually taking values between 0.9 - 0.99, and v0 = 0. In this way, the moving average filter can smooth out the instantaneous fluctuations in the initial fine-tuning gradient, making the gradient more stable. The generated stabilized fine-tuning gradient can provide more reliable guidance for the update of model parameters, helping the model to converge more smoothly.
[0160] Step S5116: Update the channel weight parameters of the channel attention module using the stabilized fine-tuning gradient to generate an updated channel attention module.
[0161] In Step S5116, the channel weight parameters of the channel attention module are updated using the stabilized fine-tuning gradient to generate an updated channel attention module. This is the step of applying the calculated gradient to the model parameter update. Using an optimization algorithm (such as stochastic gradient descent), the channel weight parameters of the channel attention module are updated according to the stabilized fine-tuning gradient. Suppose a certain channel weight parameter of the channel attention module is w, and the value corresponding to this parameter in the stabilized fine-tuning gradient is , and the formula for updating the parameter using the stochastic gradient descent algorithm is , where is the learning rate, which controls the step size of parameter update. All the channel weight parameters of the channel attention module are updated according to this formula to obtain an updated channel attention module. The updated channel attention module can better adapt to the features of the key sample set, improve the model's processing ability for these samples, and thus enhance the overall prediction performance of the model.
[0162] Step S5117: Reconnect the updated channel attention module to the frozen temporal feature encoder and spatial feature encoder to obtain a temporary disaster prediction model.
[0163] In step S5116, the channel weight parameters of the channel attention module have been updated. The updated channel attention module is reconnected to the previously frozen temporal feature encoder and spatial feature encoder. Since the parameters of the temporal feature encoder and spatial feature encoder remain frozen, a temporary disaster prediction model is formed. On the basis of maintaining the original feature extraction ability, this temporary model adjusts the channel attention module of the cross-modal fusion network, aiming to improve the model's processing ability for key samples and the overall disaster prediction performance. In this way, the model can be locally optimized without destroying the original model structure and feature learning results.
[0164] Step S5118: Input the model incremental training dataset into the temporary disaster prediction model, and calculate the validation incremental loss value of the updated channel attention module with unfrozen parameters.
[0165] Step S5118 is a step to verify the performance of the temporary disaster prediction model. The entire model incremental training dataset is input into the temporary disaster prediction model for forward propagation calculation. In this process, the model makes predictions based on the input data and calculates the incremental loss value between the prediction result and the true label. This incremental loss value is called the validation incremental loss value, which reflects the performance of the updated channel attention module when processing the entire model incremental training dataset. Different from the incremental loss value calculated on the previously obtained key sample set, the validation incremental loss value considers more data samples and can more comprehensively evaluate the improvement effect of the model. For example, if the validation incremental loss value decreases compared with that before the update, it indicates that the updated channel attention module can better predict disaster situations when processing more data, and the performance of the model has been improved.
[0166] Step S5119: When the validation incremental loss value is less than the incremental loss value before the update, use the temporary disaster prediction model as the current disaster prediction model; otherwise, roll back to the parameters of the channel attention module before the update and reduce the subsequent gradient update step size.
[0167] Step S5119 is the evaluation of the model update effect and the adjustment strategy. Compare the verified incremental loss value with the incremental loss value before the update. If the verified incremental loss value is less than the incremental loss value before the update, it indicates that the performance of the model has been improved by updating the parameters of the channel attention module. At this time, the temporary disaster prediction model is used as the current disaster prediction model and continues to be used for subsequent disaster prediction tasks. If the verified incremental loss value is not less than the incremental loss value before the update, it means that this parameter update has not achieved the expected effect and may even lead to a decline in model performance. In this case, roll back to the parameters of the channel attention module before the update to restore the model to its state before the update. At the same time, reduce the step size of subsequent gradient updates, for example, reduce the learning rate to half of the original. Reducing the step size can make the model more cautious during subsequent parameter updates and avoid the model falling into local optima or having unstable performance due to too large an update step size. Through this evaluation and adjustment strategy, it can be ensured that the model is continuously optimized during incremental training, improving the accuracy and reliability of disaster prediction.
[0168] Step S5120: After using the gradient clipping algorithm to constrain the amplitude of the fine-tuning gradient of the model parameters, update the weight parameters of the fully connected layer of the disaster prediction model.
[0169] The gradient clipping algorithm is used to limit the amplitude of the fine-tuning gradient of the model parameters to prevent gradient explosion or gradient vanishing problems. In deep learning, the amplitude of the gradient may become very large or very small, resulting in unstable model training. The gradient clipping algorithm sets a threshold. When the amplitude of the gradient exceeds this threshold, the gradient is scaled so that its amplitude does not exceed the threshold. For example, set the threshold to 1. If the gradient amplitude of a certain parameter is 2, then scale it to 1. After obtaining the clipped gradient, use an optimization algorithm (such as stochastic gradient descent) to update the weight parameters of the fully connected layer of the disaster prediction model. The fully connected layer is the layer that connects each neuron in the model, and its weight parameters determine the mapping relationship between the input and the output. By updating the weight parameters of the fully connected layer, the model can better adapt to the new incremental training samples and improve the ability to predict road disasters.
[0170] Step S5130: Evaluate the disaster recognition accuracy of the updated disaster prediction model on the historical validation set. When the disaster recognition accuracy exceeds the evaluation result of the original model, deploy the updated disaster prediction model to the road monitoring area.
[0171] Specifically, the updated disaster prediction model is evaluated using a historical validation set, which is a set of pre-prepared road condition data containing true disaster labels. The data in the historical validation set is input into the updated model to obtain the predicted disaster occurrence situation, which is then compared with the true disaster labels to calculate the disaster recognition accuracy rate. The accuracy rate is calculated, for example, by dividing the number of correctly predicted samples by the total number of samples. If the disaster recognition accuracy rate of the updated model on the historical validation set exceeds the evaluation result of the original model, it indicates that the model has been improved through incremental training and can more accurately predict road disasters. At this time, the updated disaster prediction model is deployed to the road monitoring area to replace the original model for real-time road disaster early warning work, so as to improve the accuracy and reliability of the early warning.
[0172] An embodiment of the present invention provides a computer system, as Figure 2 shown, the computer system 100 includes: a processor 101 and a memory 103. Among them, the processor 101 and the memory 103 are connected, such as through a bus 102. Optionally, the computer system 100 may further include a transceiver 104. It should be noted that in practical applications, the transceiver 104 is not limited to one, and the structure of the computer system 100 does not constitute a limitation on the embodiments of the present invention.
[0173] An embodiment of the present invention provides a computer system. The computer system in the embodiment of the present invention includes: one or more processors; a memory; one or more computer programs, where one or more computer programs are stored in the memory and are configured to be executed by one or more processors. When the one or more programs are executed by the processor, the above-provided method is implemented.
Claims
1. A road disaster warning method based on Internet of Things sensing analysis, characterized in that, The method includes: Collecting real-time environmental data through a multi-modal sensing device deployed in a road monitoring area, where the real-time environmental data includes a vibration waveform sequence, a surface deformation trajectory, a humidity distribution map, and a visible light image stream; Inputting the vibration waveform sequence into a pre-trained time-series feature encoder for waveform feature extraction to obtain vibration fluctuation features, and inputting the surface deformation trajectory into a spatial feature encoder for deformation trajectory analysis to generate a deformation displacement vector; Performing regional segmentation on the humidity distribution map, extracting humidity gradient features of each segmented region, and performing dynamic frame sampling on the visible light image stream to obtain an image frame sequence and inputting it into an image feature encoder to extract visual texture features; Fusing the vibration fluctuation features, deformation displacement vector, humidity gradient features, and visual texture features into multi-modal spatio-temporal features to generate road state fusion features; Inputting the road state fusion features into a disaster prediction model for disaster probability calculation to obtain the disaster occurrence probability of the current road area, and triggering a warning signal matching the disaster type when the disaster occurrence probability exceeds a dynamically adjusted disaster threshold.
2. The road disaster warning method based on Internet of Things sensing analysis according to claim 1, wherein, The pre-training process of the time-series feature encoder includes: Obtaining a historical vibration waveform data set, where the historical vibration waveform data set includes time-series waveform data with labeled disaster types; Dividing the historical vibration waveform data set into multiple time window segments and performing waveform amplitude normalization processing on each time window segment; Constructing a contrastive learning network containing multiple layers of dilated convolutional kernels, inputting different time window segments of the same disaster type as positive sample pairs into the contrastive learning network, and inputting time window segments of different disaster types as negative sample pairs into the contrastive learning network; Generating a contrastive loss value by calculating the waveform feature similarity of positive sample pairs and the waveform feature difference of negative sample pairs, and optimizing the parameters of the contrastive learning network based on the contrastive loss value; Taking the output features of the dilated convolutional layer in the optimized contrastive learning network as the vibration fluctuation feature extraction result of the time-series feature encoder.
3. The road disaster warning method based on Internet of Things sensing analysis according to claim 1, wherein The step of inputting the surface deformation trajectory into a spatial feature encoder for deformation trajectory analysis to generate a deformation displacement vector includes: Performing equally spaced trajectory point sampling on the surface deformation trajectory, and extracting the three-dimensional coordinate data and corresponding timestamps of each trajectory point; Calculating the displacement change rate between adjacent trajectory points according to the time difference between the timestamp of each trajectory point and the timestamp of the previous trajectory point; Concatenating the three-dimensional coordinate data of each trajectory point with the corresponding displacement change rate to generate a displacement change vector for each trajectory point; Arranging the displacement change vectors of all trajectory points in chronological order into a displacement change sequence, and inputting the displacement change sequence into a graph attention network; In the graph attention network, taking the displacement change vector of each trajectory point as a graph node feature, and constructing a directed edge connection relationship between nodes according to the chronological order of adjacent trajectory points; Performing feature aggregation of multi-hop neighbor nodes on each graph node feature to generate a node aggregation feature containing the local deformation propagation trend; Input the aggregated node features into the attention weight calculation layer of the graph attention network to calculate the attention weight values between each graph node and the graph node at the previous moment; perform weighted summation on the aggregated node features according to the attention weight values to generate a deformation displacement vector reflecting the deformation direction and intensity.
4. The road disaster warning method based on Internet of Things sensing analysis according to claim 1, characterized in that, The multi-modal spatio-temporal feature fusion of the vibration fluctuation features, deformation displacement vector, humidity gradient features, and visual texture features to generate a road state fusion feature includes: Perform a time alignment operation on the vibration fluctuation features and the deformation displacement vector to generate vibration-deformation correlation features; Perform spatial interpolation processing on the humidity gradient features to make the resolution of the humidity gradient features consistent with the spatial distribution of the visual texture features; Input the vibration-deformation correlation features, humidity gradient features, and visual texture features into a cross-modal fusion network, and the cross-modal fusion network includes a channel attention module and a spatial attention module; Dynamically allocate the channel weights of the multi-modal features through the channel attention module, and perform importance weighting on the spatial positions of the feature maps through the spatial attention module; Perform channel concatenation on the weighted multi-modal features, and generate the road state fusion feature through a dimensionality reduction convolutional layer.
5. The road disaster warning method based on Internet of Things sensing analysis according to claim 1, characterized in that, The training process of the disaster prediction model includes: Slice the road state fusion features in the historical road state dataset into a continuous time period sequence in chronological order, and label the corresponding disaster occurrence labels at the end of each time period sequence; Use a set proportion of the road state fusion features at the front of the time period sequence as the training set and input it into a bidirectional prediction network, and the bidirectional prediction network includes a gated recurrent unit layer and a self-attention mechanism layer connected in sequence; In the pre-training stage of the bidirectional prediction network, perform a random masking operation on the road state fusion features of the training set to generate a binary mask matrix with the same dimension as the road state fusion features. After setting the values of some set proportion of positions in the binary mask matrix to zero and keeping the values of the remaining positions as 1, multiply the binary mask matrix and the original road state fusion features element by element to obtain the masked features; Input the masked features into the gated recurrent unit layer in time step order, extract the hidden state features of each time step in sequence, and concatenate the hidden state features of all time steps into a time series feature; Input the time series feature into the self-attention mechanism layer, calculate the correlation weight matrix between the features of each time step in the time series feature, and generate a reconstructed complete road state fusion feature through weighted summation based on the correlation weight matrix; Input the reconstructed complete road state fusion feature and the original road state fusion feature into a mean square error calculation module, and output a feature reconstruction loss value; In the optimization training stage of the bidirectional prediction network, input the unmasked original road state fusion features into the trained gated recurrent unit layer, output the time series feature and generate a disaster probability prediction vector through the self-attention mechanism layer; Input the disaster probability prediction vector and the disaster occurrence label into a cross-entropy calculation module, and output a classification loss value; Superimpose the feature reconstruction loss value and the classification loss value according to a preset weight ratio to obtain a combined loss value, and update the network parameters of the gated recurrent unit layer and the self-attention mechanism layer through the backpropagation algorithm until the combined loss value is stabilized within a set threshold range.
6. The road disaster warning method based on Internet of Things sensing analysis according to claim 5, characterized in that, The random masking operation on the road state fusion features of the training set includes: Randomly select two consecutive time period sequences from the road state fusion features of the training set, and denote them as the first feature segment and the second feature segment respectively; Generate a horizontal masking template for the first feature segment: randomly mask continuous channel data of a first preset ratio in the channel dimension of each road state fusion feature, and retain the original values of the remaining second preset ratio of channels; Generate a vertical masking template for the second feature segment: randomly mask continuous time node data of a third preset ratio in the time step dimension of each road state fusion feature, and retain the complete features of the remaining fourth preset ratio of time nodes; Overlay the horizontal masking template and the vertical masking template to generate a composite mask matrix, and correct the values in the repeatedly masked areas of the composite mask matrix to a single masking state; Apply the composite mask matrix to the first feature segment and the second feature segment respectively to generate two sets of different masked features; Input the two sets of masked features into the gated recurrent unit layer in parallel to extract the first hidden state feature sequence and the second hidden state feature sequence respectively; Alternately splice the first hidden state feature sequence and the second hidden state feature sequence in the time step dimension to generate a mixed time series feature; Input the mixed time series feature into the self-attention mechanism layer, calculate the correlation score between each time step feature and the disaster occurrence label, and filter out the time step features with a correlation score higher than the set score to form a high-weight feature set; Input the high-weight feature set into the fully connected layer for dimensionality reduction processing to generate a compact reconstruction feature, and compare the compact reconstruction feature with the original road state fusion feature channel by channel; Locate the feature reconstruction error region according to the un-matched channel data in the comparison result, and feedback the channel position information of the error region to the composite mask matrix generation module to dynamically adjust the masking ratios of the horizontal masking template and the vertical masking template in subsequent training cycles.
7. The road disaster warning method based on Internet of Things sensing analysis according to claim 1, wherein The method for determining the dynamically adjusted disaster threshold includes: Obtain the historical disaster occurrence probability data set and actual disaster records of the current road area; Calculate the false alarm rate and the missed alarm rate in different probability intervals according to the historical disaster occurrence probability data set; Construct an optimization function with the constraint that the false alarm rate does not exceed the first threshold and the missed alarm rate does not exceed the second threshold; Use the particle swarm optimization algorithm to solve the optimization function to obtain the dynamically adjusted disaster threshold corresponding to the current road area.
8. The method for road disaster warning based on Internet of Things sensing analysis according to claim 1, wherein When the disaster occurrence probability exceeds the dynamically adjusted disaster threshold, trigger a warning signal matching the disaster type, including: Divide three consecutive warning level intervals according to the numerical range of the disaster occurrence probability, and generate a first-level warning signal, a second-level warning signal and a third-level warning signal; When the first-level warning signal is triggered, extract the real-time disaster coordinates of the current road area and the disaster image frames in the visible light image stream, send the disaster coordinates and disaster image frames to the road maintenance terminal, and activate the emergency communication link of the road maintenance terminal; Receive the emergency response status information fed back by the road maintenance terminal through the emergency communication link, associate the emergency response status information with the disaster coordinates, and input them into the warning signal continuous monitoring queue; When the probability of disaster occurrence does not decrease within three consecutive monitoring cycles in the warning signal continuous monitoring queue, upgrade the first-level warning signal to a second-level warning signal; When the second-level warning signal is triggered, extract the traffic flow distribution data and vehicle position data set of the current road area, and generate a path avoidance recommendation vector according to the disaster coordinates and the vehicle position data set; Push the path avoidance recommendation vector to the in-vehicle terminal corresponding to the vehicle position data set, and extract the traffic signal control nodes affected by the disaster coordinates from the traffic flow distribution data; Adjust the phase timing parameters of the traffic signal control nodes according to the push coverage rate of the path avoidance recommendation vector, and synchronize the adjusted phase timing parameters to the traffic signal control system.
9. The method for road disaster warning based on Internet of Things sensing analysis according to claim 4, characterized in that The method further includes an online update mechanism for the disaster prediction model: After triggering the warning signal, continuously collect the vibration waveform sequence, surface deformation trajectory and visible light image stream of the current road area, and generate a data set of road state changes after warning; Align the time stamps of the data set of road state changes after warning with the type of warning signal that has been triggered to generate an increment training data set with warning labels; Every preset model update period, extract the increment training samples within the most recent time window from the increment training data set, and input the increment training samples into the disaster prediction model for forward propagation; Calculate the increment loss value between the prediction probability of the disaster prediction model for the increment training samples and the warning labels, and generate a fine-tuning gradient of the model parameters according to the increment loss value; After using the gradient clipping algorithm to constrain the amplitude of the fine-tuning gradient of the model parameters, update the weight parameters of the fully connected layer of the disaster prediction model; Evaluate the disaster recognition accuracy of the updated disaster prediction model on the historical validation set. When the disaster recognition accuracy exceeds the evaluation result of the original model, deploy the updated disaster prediction model to the road monitoring area.
10. A computer system, characterized in that, Comprising: One or more processors; A memory; One or more computer programs; Wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors. When the one or more computer programs are executed by the processors, the method described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Mountain road slope real-time monitoring and early warning device
CN104217542A
Road defect detection method combining PVT and U-Net deep learning
CN118229681A
Urban agglomeration geological disaster identification method based on time sequence InSAR technology
CN118366057A
Natural disaster intelligent early warning system based on image processing
CN119132031A
Road traffic natural disaster early warning, prevention and control system based on AIOT
CN119169769A
Cited By
Task-specific cross-city migration method
CN120633767A
Pavement performance monitoring method and device based on multi-source data feature matching and medium
CN121354031A