Urban rail transit meteorological real-time monitoring and early warning method
By using spatial weighted dynamic fusion normalization and environmental feedback gating mechanisms, the importance of meteorological features and parameter coupling relationships are dynamically adjusted, solving the problems of low prediction accuracy and slow response to sudden environmental changes in existing technologies, and realizing efficient prediction of real-time meteorological monitoring and early warning for urban rail transit.
Patent Information
- Application Number
- CN202511168256.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-10-17
AI Technical Summary
Existing real-time meteorological monitoring and early warning methods for urban rail transit suffer from low prediction accuracy, are unable to adapt to early warning needs under different environmental conditions, and cannot respond quickly to sudden environmental changes.
A spatially weighted dynamic fusion normalization method is used to process multi-scale meteorological data, construct an early warning model, and dynamically adjust the importance of meteorological features and the coupling relationship of meteorological parameters by using an environmental feedback gating mechanism and a dynamic convolution kernel generation mechanism, combined with an environmental perception loss function and gradient optimization strategy.
It improves forecast accuracy, can adaptively adjust the importance of meteorological features, respond quickly to sudden environmental changes, and enhances early warning capabilities under different environmental conditions.
Smart Images

Figure CN120802398A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of electric digital data processing, in particular to a real-time monitoring and early warning method for urban rail transit meteorology. BACKGROUND
[0002] Traditional urban rail transit meteorological services are usually analyzed and predicted by meteorological experts in combination with weather live monitoring (published by the meteorological station belonging to the local meteorological authority) on the current weather situation and trend. In recent years, many weather APPs have begun to provide more refined rail transit meteorological services. By constructing automatic meteorological observation stations at urban rail transit stations and along the line to monitor meteorological indicators such as temperature, humidity, air pressure, wind speed, wind direction, and rainfall for a long time, the rail transit meteorological service platform analyzes the meteorological data to generate corresponding meteorological reports and give risk warnings in advance when there is a risk (such as gale, high temperature, low temperature, heavy rain, heavy snow, thunderstorm warning, etc.). The existing urban rail transit meteorological real-time monitoring and early warning method used by the rail transit meteorological service platform independently processes each meteorological feature by the Z-score normalization method, which is easy to cause the loss of key environmental information such as the meteorological difference between the center and the suburbs caused by the urban heat island effect; it cannot dynamically adjust the importance of meteorological features according to real-time passenger flow density, train frequency, and other environmental factors, which leads to insufficient sensitivity of the model to extreme meteorological events during peak hours, noise interference during off-peak hours, and the inability to adapt to the early warning needs under different environmental conditions; the early warning model is based on a traditional convolutional neural network, which is difficult to capture the dynamic nonlinear coupling relationship between temperature, humidity, and other meteorological parameters with environmental changes, and cannot adapt to the changes in meteorological interaction patterns under different environmental conditions; the cross-entropy loss function is used to equally punish the high-risk misjudgment of heavy rain and other key environments during peak hours and the misjudgment of light rain and other low-risk scenarios during off-peak hours, which cannot meet the differentiated needs of meteorological safety warning, and the use of stochastic gradient descent optimization method cannot quickly respond to environmental mutations such as sudden increase in passenger flow, leading to parameter update lagging behind environmental changes, and decreased convergence speed when meteorological conditions fluctuate dramatically.
[0003] Therefore, the existing urban rail transit meteorological real-time monitoring and early warning method has the problem of low prediction accuracy. SUMMARY
[0004] The technical problem to be solved by the present application is to overcome the shortcomings of the prior art and provide an urban rail transit meteorological real-time monitoring and early warning method with high prediction accuracy.
[0005] To solve the above technical problems, the present application provides an urban rail transit meteorological real-time monitoring and early warning method, which comprises:
[0006] S1. Collecting multi-scale meteorological data, labeling the operating environment state label of the multi-scale meteorological data, and obtaining labeled multi-scale meteorological data;
[0007] S2. Dynamic fusion and normalization of multi-scale meteorological data is performed using a dynamic fusion normalization method based on spatial weighting to obtain a plurality of processed meteorological characteristic values, and the plurality of processed meteorological characteristic values constitute a processed feature vector;
[0008] S3. An early warning model is constructed, and the processed meteorological characteristic values are used to train the early warning model to obtain a trained early warning model;
[0009] S4. New multi-scale meteorological data collected in real time are subjected to S2 to obtain new processed meteorological characteristic values, and the new processed meteorological characteristic values are input into the trained early warning model, and the trained early warning model outputs probability values of various operation state labels of the new multi-scale meteorological data.
[0010] As a further improvement of the present application: the collection of multi-scale meteorological data in S1 includes: obtaining local meteorological data with spatial attribute characteristics through vehicle-mounted mobile monitoring equipment installed on urban rail transit vehicles and fixed monitoring equipment deployed at monitoring points of urban rail transit stations and along the line.
[0011] As a further improvement of the present application: the step of S2 includes:
[0012] S201. Based on the latitude and longitude coordinates of the station, the space is divided into multiple partitions using the k-means clustering algorithm, the mean and standard deviation of each meteorological characteristic in each partition are calculated, and the spatial partition meteorological characteristic mean and the spatial partition meteorological characteristic standard deviation are obtained;
[0013] S202. The Euclidean distance between each station latitude and longitude coordinate and the center coordinate of the space cluster to which it belongs is calculated to obtain a spatial gradient value;
[0014] S203. The original meteorological characteristic values are normalized in combination with the spatial partition meteorological characteristic mean, the spatial partition meteorological characteristic standard deviation, and the spatial gradient value.
[0015] As a further improvement of the present application: the step of S3 includes:
[0016] S301. An early warning model is constructed, and the processed feature vector is input;
[0017] S302. An enhanced environment perception feature vector is obtained based on an environmental gating weight vector and a nonlinear transformed meteorological feature vector;
[0018] S303. A dynamic convolution kernel is generated for calculating an environment perception feature tensor;
[0019] S304. Attention scores of feature dimensions are calculated for calculating normalization attention weights of each feature dimension, so as to obtain a weighted feature vector of each feature dimension;
[0020] S305. obtaining probability values of each category in the probability distribution of the final prediction of the early warning model based on the dynamic weight matrix and the transformed feature vector;
[0021] S306. calculating an environment-sensitive weight for obtaining an environment-aware loss function;
[0022] S307. calculating the partial derivative gradient of the environment-aware loss function with respect to the environment feedback vector for obtaining a corrected environment-aware gradient;
[0023] S308. performing early warning model training iteration, updating parameters using the Adam optimizer until the stop iteration condition is met, and obtaining a trained early warning model.
[0024] Preferably, the step of S302 comprises:
[0025] S3021. performing linear transformation on the environment feedback vector through a learnable environment weight matrix and an environment bias term, inputting the transformation result into a Sigmoid activation function, and generating an environment-gated weight vector;
[0026] S3022. performing linear transformation on the processed feature vector and then applying a GELU activation function to perform nonlinear transformation, and obtaining a nonlinearly transformed meteorological feature vector;
[0027] S3023. element-wise multiplying the environment-gated weight vector and the nonlinearly transformed meteorological feature vector to obtain an enhanced environment-aware feature vector.
[0028] Preferably, the step of S303 comprises:
[0029] S3031. generating a weight matrix and a convolution kernel generation bias term through a learnable convolution kernel to generate a dynamic convolution kernel that changes dynamically with the current sample;
[0030] S3032. using the dynamically generated convolution kernel to perform one-dimensional convolution operation on the enhanced environment-aware feature vector, extracting dynamic coupling features between meteorological parameters that change with the environment, and obtaining an environment-aware feature tensor.
[0031] Preferably, the step of S304 comprises:
[0032] S3041. calculating an attention score;
[0033] S3042. converting the attention scores of all feature dimensions into initial weights, using the environment feedback vector, generating an environment-gated factor through a learnable gating weight vector and a gating bias term, and combining a Sigmoid activation function to obtain normalized attention weights;
[0034] S3043. Apply the normalized attention weight to the corresponding feature dimension slice vector of the environmental perception feature tensor and weight it, use the residual coefficient to proportionally superimpose the original feature dimension slice vector onto the weighted result to obtain a weighted feature vector.
[0035] Preferably, the step of S305 comprises:
[0036] S3051. Transform by a multi-layer perception, add the transformation result to the learnable class-specific basis matrix of the corresponding class to generate a dynamic weight matrix for the current sample and each class;
[0037] S3052. Transform the weighted feature matrix using the dynamic weight matrix, and use the coupling coefficient to nonlinearly couple the weighted feature matrix with the learnable weight vector of the corresponding class to obtain a transformed feature vector for each class;
[0038] S3053. Sum each class's transformed feature vector, divide the sum by the value of the environmental sensitive temperature function to obtain a calibration score for each class, and normalize all class calibration scores by a Softmax function to obtain the probability value of each class in the probability distribution of the final prediction of the early warning model.
[0039] Preferably, the step of S306 comprises:
[0040] S3061. Obtain the environmental sensitive weight by calculating the correlation between the environmental feedback vector and the learnable environmental vector of the class;
[0041] S3062. When calculating the environmental perception loss function, incorporate the calculated environmental sensitive weight into the cross-entropy loss function.
[0042] Preferably, the step of S307 comprises:
[0043] S3071. Calculate the partial derivative gradient of the environmental perception loss function with respect to the environmental feedback vector;
[0044] S3072. Add a correction term to the early warning model parameter gradient obtained by regular backpropagation to obtain a corrected environmental perception gradient, and use the corrected environmental perception gradient to update the model parameters.
[0045] The beneficial effects of the present application are as follows: The urban rail transit meteorological real-time monitoring and early warning method provided by the present application has high prediction accuracy.
[0046] S2 adopts a dynamic fusion normalization method based on spatial weighting, partitions the space according to the positions of the monitoring points and calculates statistics, combines the spatial offset degree to normalize the original meteorological data, adaptively adjusts the weight of the edge station, effectively retains the regional meteorological characteristics, and solves the problem that the traditional Z-score normalization method ignores the spatial correlation due to independent processing of each feature, resulting in loss of key environmental information; S302 adopts an environmental feedback gating mechanism, generates an environmental gating weight vector using an environmental feedback vector, and performs element-by-element multiplication on the normalized meteorological features after nonlinear transformation to realize feature enhancement, so that the model can dynamically strengthen or suppress features according to real-time environment, overcoming the defect that the conventional feature processing method cannot dynamically adjust the importance of meteorological features according to real-time environment, resulting in poor performance under different environmental conditions; S303 adopts a dynamic convolution kernel generation mechanism, generates convolution kernel weights in real time based on the enhanced environmental perception feature vector, and uses dynamic convolution kernels to perform convolution operations on the enhanced environmental perception feature vector to extract dynamic coupling features between meteorological parameters that change with the environment, breaking through the limitation of traditional convolutional neural networks that use fixed convolution kernels to capture dynamic nonlinear coupling relationships between meteorological parameters that change with the environment; S306 adopts an environment-weighted classification loss function, calculates the correlation between the environmental feedback vector and the learnable environmental vector of each class to obtain an environmental sensitivity weight, and integrates it into the cross-entropy loss calculation to impose heavier penalties on high-risk misjudgments under environmental mutations, adopts an environmental gradient correction strategy, and obtains a corrected environmental perception gradient based on the model parameter gradient obtained by conventional backpropagation to make the model respond faster in the event of environmental mutations, solving the problem that the conventional cross-entropy loss function ignores the influence of environmental factors on the cost of classification errors and the conventional optimization method cannot quickly respond to environmental mutations, resulting in parameter update lag and decreased convergence speed. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 is a principle block diagram of the present application;
[0048] Figure 2 is a meteorological warning F1 score comparison experiment graph of different normalization methods in different regions;
[0049] Figure 3 is a rainstorm warning effect experiment graph of the environmental feedback gating mechanism at different times;
[0050] Figure 4 is a convergence speed comparison experiment graph of the gradient feedback optimization algorithm. DETAILED DESCRIPTION
[0051] The specific embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0052] Definitions of related terms involved in the present application:
[0053] (1) Urban rail transit: a kind of personnel transportation mode using special rail train in the city. Urban rail transit includes subway, light rail, tram and maglev train.
[0054] (2) The service content of urban rail transit meteorological service includes weather real-time monitoring, short-term weather forecast, medium-term weather forecast, refined weather forecast, customized weather forecast, meteorological disaster monitoring and warning, meteorological disaster early warning information, etc.
[0055] As shown in Figure 1 The urban rail transit meteorological real-time monitoring and early warning method provided by the application comprises:
[0056] S1. Collecting multi-scale meteorological data, labeling the operation environment state label of the multi-scale meteorological data, and obtaining the labeled multi-scale meteorological data;
[0057] The multi-scale meteorological data comprises local meteorological data with spatial attributes; the local meteorological data with spatial attributes comprises a plurality of meteorological features (i.e. meteorological indexes) in a fixed time window (a certain specific time period). After setting the sampling number, the data of different dimensions are connected in sequence into a single long vector in the form of vector splicing, forming an original meteorological feature vector. The vector splicing mode is series connection, and the series connection is as follows: assuming that the sampling number of temperature is 10 and the sampling number of humidity is 12, then temperature is collected every 6 minutes and humidity is collected every 5 minutes within one hour, so that a temperature sequence and a humidity sequence can be obtained. The temperature sequence can be represented as [first sampling temperature, second sampling temperature, …, tenth sampling temperature], and the humidity sequence can be represented as [first sampling humidity, second sampling humidity, …, twelfth sampling humidity]. The original meteorological feature vector obtained by series connection of the two can be represented as [first sampling temperature, second sampling temperature, …, tenth sampling temperature, first sampling humidity, second sampling humidity, …, twelfth sampling humidity]. For example, within a time range of 60 min, the sampling number of temperature is 10, so the sampling interval is 60 min / 10=6 min, i.e. temperature is collected every 6 min, and the sampling time points are 0 min, 6 min, 12 min, 18 min, 24 min, 30 min, 36 min, 42 min, 48 min, 54 min. The first sampling (0 min) temperature is 20.0℃, the second sampling (6 min) temperature is 20.5℃, …, and the tenth sampling (54 min) temperature is 24.5℃, so a temperature sequence composed of temperature sampling values can be obtained:
[0058] [20.0, 20.5, 21.0, 21.5, 22.0, 22.5, 23.0, 23.5, 24.0, 24.5],
[0059] In the time range of 60 minutes, the sampling number of humidity sampling is 12, the sampling interval is 60 minutes / 12=5 minutes, that is, every 5 minutes, the sampling time points are 0 minutes, 5 minutes, 10 minutes, 15 minutes, 20 minutes, 25 minutes, 30 minutes, 35 minutes, 40 minutes, 45 minutes, 50 minutes, 55 minutes, the first sampling (0 minutes) humidity=60.0%, the second sampling (5 minutes) humidity=59.5%,..., the twelfth sampling (55 minutes) humidity=54.5%, then the humidity sequence composed of each humidity sampling value can be obtained:
[0060] [60.0, 59.5, 59.0, 58.5, 58.0, 57.5, 57.0, 56.5, 56.0, 55.5, 55.0, 54.5],
[0061] The temperature sequence and the humidity sequence are concatenated in order to obtain the original meteorological feature vector:
[0062] [20.0, 20.5, 21.0, 21.5, 22.0, 22.5, 23.0, 23.5, 24.0, 24.5, 60.0, 59.5, 59.0, 58.5, 58.0, 57.5, 57.0, 56.5, 56.0, 55.5, 55.0, 54.5]
[0063] Obviously, the first 10 elements in the original meteorological feature vector are the temperature sequence (index 1~10), and the last 12 elements are the humidity sequence (index 11~22), and the meteorological features of different dimensions (temperature and humidity) have been fused into a single long vector.
[0064] Local meteorological data with spatial attribute characteristics are obtained by a vehicle-mounted mobile monitoring device installed on a city rail transit tool and a fixed monitoring device deployed at each monitoring point of a city rail transit site and along the line;
[0065] The vehicle-mounted mobile monitoring device includes a temperature and humidity sensor, a rain sensor, a wind speed sensor, a GPS sensor for obtaining the position (longitude and latitude coordinates) of the monitoring point, etc.; the fixed monitoring device includes a temperature sensor, a humidity sensor, a wind speed sensor, a GPS sensor, etc.
[0066] The operation environment state label includes "normal state", "heavy rain warning", "high temperature warning", "strong wind warning", and "device abnormality".
[0067] An automated and manual collaborative mechanism is used to label the operational environment status of multi-scale meteorological data. This includes: using a rule engine to automatically generate a preliminary warning category label for each piece of multi-scale meteorological data based on pre-set meteorological warning threshold rules, such as precipitation ≥50 mm / h (heavy rain), temperature ≥35°C (high temperature), and wind speed ≥15 m / s (strong wind). All data within the preset thresholds are considered normal. Dispatch center staff manually review each piece of multi-scale meteorological data to check whether the preliminary warning category label is accurate. If accurate, the operational environment status label of the multi-scale meteorological data with the preliminary warning category label of "heavy rain" is labeled "heavy rain warning," the operational environment status label of the multi-scale meteorological data with the preliminary warning category label of "high temperature" is labeled "high temperature warning," the operational environment status label of the multi-scale meteorological data with the preliminary warning category label of "strong wind" is labeled "strong wind warning," and the operational environment status label of the multi-scale meteorological data with the preliminary warning category label of "normal" is labeled "normal state." If there are abnormal data points, they are checked and matched with the corresponding operational environment status label. Noise data caused by equipment failure is labeled "equipment abnormality."
[0068] S2. Dynamically fuse and normalize the multi-scale meteorological data using a dynamic fusion normalization method based on spatial weighting to obtain a plurality of processed meteorological eigenvalues, which constitute a processed eigenvector;
[0069] S201. Calculation of spatial partition statistics;
[0070] Based on the longitude and latitude coordinates of the stations, the k-means clustering algorithm is used to divide the space into multiple partitions. The mean and standard deviation of each meteorological characteristic within each partition are calculated to obtain the mean and standard deviation of the meteorological characteristics of the spatial partitions, providing regional benchmark statistics for normalization. The meteorological characteristics include temperature, humidity, wind speed, etc.
[0071] The mean value of the kth meteorological characteristic in the pth spatial partition The calculation formula is:
[0072]
[0073] Where N p is the total number of sites in the pth partition; p is a positive integer; i is a positive integer; i∈G p represents the i-th site index of the site index set belonging to the p-th partition; G p represents the site index set of the p-th partition; x i,k is the value of the kth meteorological characteristic at the i-th station; k is a positive integer;
[0074] Standard deviation of the kth meteorological characteristic in the pth spatial partition The calculation formula is:
[0075]
[0076] S202. Spatial gradient calculation;
[0077] The Euclidean distance between the latitude and longitude coordinates of each station and the centroid coordinates of the spatial cluster to which it belongs is calculated to obtain the spatial gradient value, which is used to quantify the degree of spatial position deviation of the station relative to the center of its region;
[0078] The spatial gradient value is used to characterize the degree of deviation from the center of the region. The spatial gradient value of the i-th sample is The calculation formula is:
[0079]
[0080] Where, ‖·‖2 is the L2 norm, which is calculated in the same way as the Euclidean distance; Coord i Coord is the latitude and longitude coordinate vector of the i-th sample site; cen is the centroid coordinate vector of the spatial cluster to which the i-th sample belongs;
[0081] S203. Spatial weighted dynamic normalization;
[0082] The original meteorological characteristic values are normalized by combining the spatial partition meteorological characteristic mean, spatial partition meteorological characteristic standard deviation, and spatial gradient value calculated above. This amplifies the meteorological characteristics of edge stations far from the regional center and effectively preserves the regional meteorological characteristics.
[0083] The kth meteorological characteristic value of the processed i-th station The calculation formula is:
[0084]
[0085] Where, γ rf is the spatial sensitivity coefficient, which controls the intensity of the gradient effect and can be set to rf =0.3; ReLU(·) is the ReLU activation function; The term is used to filter negative gradients by This ensures that only the feature weights of edge sites are increased. The item is to adaptively amplify the meteorological characteristics of the station far away from the centroid, which can effectively solve the problem of "meteorological differences between the center and the suburbs caused by the urban heat island effect".
[0086] The processed feature vector of the i-th sample The calculation formula is:
[0087]
[0088] wherein [·] T denotes transpose; is the first weather feature value of the i-th station after processing; is the second weather feature value of the i-th station after processing; is the k-th weather feature value of the i-th station after processing; is the fe-th weather feature value of the i-th station after processing;K fe is the feature number of the processed feature vector;
[0089] Temperature, humidity, wind speed and monitoring point location data have multi-source heterogeneity, numerical features and spatial features are closely related, and the conventional Z-score normalization method only processes each feature independently, ignoring the spatial correlation, which is easy to cause the loss of key environmental information such as the meteorological difference between the center and the suburb caused by the urban heat island effect. S2 proposes a dynamic fusion normalization method based on spatial weighting, which partitions the space according to the monitoring point location and calculates the statistics of the meteorological features in each partition, calculates the spatial offset degree of each station relative to the center of its partition, and the calculation of the spatial partition statistics provides a regional reference for normalization. The spatial gradient calculation quantifies the spatial offset of the sample, thereby driving the weight adjustment, and the original meteorological data is normalized by combining the partition statistics and the spatial offset degree, which adaptively adjusts the weight of the edge station and effectively preserves the regional meteorological characteristics. To verify the superiority of the spatial weighted dynamic fusion normalization method proposed by S2 in preserving regional meteorological characteristics, the meteorological warning performance of the traditional Z-score normalization and the S2 method in three typical scenarios of urban heat island area, suburban transition area and remote station is compared, as shown in Figure 2 The experimental results show that the performance of S2 method in various regions is better than that of traditional method, especially in remote station area, which reflects the synergistic effect of spatial gradient calculation and spatial partition statistics. The traditional method ignores the difference in spatial position of the station, resulting in the loss of key environmental information such as urban heat island effect, while S2 effectively captures the meteorological difference between the center and the suburb by adaptively amplifying the meteorological feature weight of the edge station, making the warning model more accurately identify regional specific meteorological anomalies.
[0090] S3. Constructing a warning model, using the processed weather feature values to train the warning model, obtaining a trained warning model;
[0091] S301. Constructing a warning model, inputting the processed feature vector;
[0092] The deep learning model composed of an environment feedback feature enhancement module, an adaptive convolution kernel meteorological feature extraction module, an environment perception feature attention weighting module, and an environment adaptive classification output module is constructed as the early warning model; the early warning model takes the processed feature vector as input, fuses dynamic environment parameters such as passenger flow density and train frequency through an environment feedback gating mechanism, extracts nonlinear coupling features between meteorological parameters by using a dynamically generated convolution kernel, performs environment perception weighting on the features by using a bilinear attention mechanism, and generates an environment-sensitive probability prediction through a dynamic classification weight matrix. The early warning model adopts a stacked structure design, and the output of a previous module is taken as the input of a subsequent module, forming a cascaded processing flow.
[0093] S302. Obtain an enhanced environment perception feature vector based on the environment gating weight vector and the nonlinearly transformed meteorological feature vector through the environment feedback feature enhancement module;
[0094] S3021. Generate an environment gating weight vector;
[0095] The environment feedback vector is linearly transformed through a learnable environment weight matrix and an environment bias term, and the transformation result is input into a Sigmoid activation function to generate an environment gating weight vector, which is used to quantify the influence intensity of real-time environmental factors on meteorological features;
[0096] The environment gating weight vector of the i-th sample is used for feature enhancement, and the environment gating weight vector G i of the i-th sample is calculated according to the following formula:
[0097] G i = Sig(W e Ca i +b e ),
[0098] In the formula, Sig(·) is a Sigmoid activation function that maps the input to the interval (0, 1); W e is an environment weight matrix, which is a learnable parameter; Ca i is the environment feedback vector of the i-th sample, which contains dynamic environment parameters such as passenger flow density and train frequency, and is obtained externally; b e is an environment bias term, which is a learnable parameter;
[0099] The environment feedback vector Ca i of the i-th sample is obtained externally and can be obtained through a real-time monitoring system, containing dynamic environment parameters such as passenger flow density (unit: person / minute) and train frequency (unit: trips / hour), and the data is collected in real time from a rail transit operation database or an Internet of Things sensor and is normalized and spliced into a vector, i.e., Ca i .
[0100] S3022. Nonlinear transformation of weather features
[0101] The linearly transformed feature vector is first subjected to a linear transformation and then a GELU activation function is applied for nonlinear transformation, to obtain a nonlinearly transformed weather feature vector with stronger nonlinear representation capability;
[0102] The i-th nonlinearly transformed weather feature vector H i is calculated according to the formula:
[0103]
[0104] In the formula, GELU(·) is a Gaussian error linear unit activation function; W f is a feature transformation weight matrix, which is a learnable parameter; is the processed feature vector of the i-th sample;
[0105] Let the input of the Gaussian error linear unit activation function GELU(·) be The implementation is represented as:
[0106]
[0107] In the formula, z h is the input of the Gaussian error linear unit activation function; tanh(·) is a hyperbolic tangent function;
[0108] S3023. Gating feature enhancement
[0109] The generated environmental gating weight vector is multiplied element by element with the nonlinearly transformed weather feature vector to obtain an enhanced environmental perception feature vector, realizing feature enhancement of environmental perception, so that the early warning model can dynamically adjust the feature importance according to the real-time environment;
[0110] The i-th enhanced environmental perception feature vector E i is calculated according to the formula:
[0111] E i = G i ⊙H i ,
[0112] In the formula, ⊙ is a Hadamard product, i.e., an element-by-element multiplication operation;
[0113] The conventional feature processing method cannot dynamically adjust the importance of weather features according to real-time passenger flow density, train frequency, and other environmental factors, resulting in poor performance of the early warning model under different environmental conditions, for example, insufficient sensitivity to extreme weather events during peak hours and susceptibility to noise interference during off-peak hours. The gating feature enhancement realizes feature adaptive enhancement under dynamic environment, and can be configured to have heavy rain during peak hours, then G iClose to 1, extreme weather features are amplified, low peak period, G i Close to 0, irrelevant features are suppressed. S302 adopts an environmental feedback gating mechanism. First, the environmental feedback vector is used to generate an environmental gating weight vector through learnable parameters, and the normalized weather features are nonlinearly transformed. The environmental gating weight is multiplied with the nonlinearly transformed weather features element by element to realize feature enhancement, so that the early warning model can dynamically strengthen or suppress features according to the real-time environment. The all-weather scene containing the dynamic change of passenger flow and the occurrence of rainfall event is constructed, and the effect of the environmental feedback gating mechanism is analyzed through multivariate time series linkage visualization. The passenger flow tidal phenomenon of morning peak and evening peak and the sudden rainstorm event are set in the experiment, and the differences in early warning response with and without the gating mechanism are compared, as shown in Figure 3 Figure 3 A multi-long coordinate design is adopted, the horizontal axis represents the whole day operation period (6:00-22:00, every hour scale), the main longitudinal axis (left blue scale) represents the passenger flow density (person / minute), and the typical double-peak distribution is presented by the blue band marked point solid line; the secondary longitudinal axis (right green scale) represents the rainfall intensity (mm / h), and the rainstorm event from 14:00 to 16:00 is displayed as a green translucent column chart; the third longitudinal axis (the rightmost black scale) represents the rainstorm early warning probability (0-1 range). Figure 3 The red square dotted line represents the traditional method without gating mechanism, the purple triangular solid line represents the early warning probability with environmental gating of S302, the red translucent background marks the heavy rain period (14-16 o'clock), the blue translucent background marks the morning and evening peak (7-9 o'clock and 17-19 o'clock), and the spatiotemporal correlation of passenger flow tide, rainfall event and early warning probability is clearly displayed through multivariate linkage visualization. The experimental data shows that S302 exhibits significant early warning performance improvement in different periods through the environmental feedback gating mechanism. The experiment mainly aims at the difference in the performance of the early warning model caused by environmental factors (or noise generated by environmental factors) and the effect of the S302 environmental feedback mechanism. During the heavy rain event period from 14:00 to 16:00, when the passenger flow density reaches the second peak of about 1500 people / minute and the rainfall intensity breaks through the 60mm / h threshold, S302 can achieve an early warning probability of about 75%, and the traditional method without gating mechanism can achieve an early warning probability of about 90%. Although the traditional method without gating mechanism has a higher prediction probability in heavy rain, it leads to overconfidence in early warning and is easily disturbed by environmental factors such as passenger flow density. It can be seen that during the morning peak period from 7:00 to 9:00, the passenger flow density is already higher than 1000 people / minute, but there is no actual rainfall, and the traditional method produces an early warning probability of about 18% (no actual rainfall can be considered as a false alarm rate). However, S302 significantly reduces the false alarm rate through the environmental feedback mechanism, indicating that the environmental perception feature attention weighting module plays a role. In a high passenger flow environment, the gating factor automatically reduces the weight of irrelevant features through the Sigmoid activation function, avoiding false alarm signals during peak hours. At the same time, during the evening peak period from 17:00 to 19:00, the false alarm rate of S302 is lower than that of the traditional method without gating mechanism. Even during the non-peak period from 20:00 to 22:00, the false alarm rate of S302 is very low. At this time, the low passenger flow triggers the gating weight combined with the residual connection design, which suppresses noise while preserving the stability of the basic features. Therefore, based on the above analysis, it can be concluded that the conventional method has a decreased early warning sensitivity during the passenger flow peak period due to environmental interference, and produces a high false alarm rate during the non-peak period. S302 automatically enhances the meteorological feature recognition ability during peak hours and intelligently suppresses false alarm signals during non-peak hours through the real-time fusion of passenger flow density vectors to construct an environmental perception gating mechanism. The adaptive adjustment characteristics of S302 enable the system to maintain optimal early warning state in scenarios of passenger flow mutation and meteorological change.
[0114] S303. Generating a dynamic convolution kernel for calculating an environmental perception feature tensor;
[0115] S3031. Generating a dynamic convolution kernel;
[0116] The enhanced environment perception feature vector output by the environment feedback feature enhancement module is used to generate a weight matrix and a convolution kernel generation bias item through a learnable convolution kernel, to generate a dynamic convolution kernel that dynamically changes with the current sample. The dynamic convolution kernel can adaptively adjust its weight (i.e., the convolution kernel weight) according to real-time environment information, to adapt to the change of the coupling relationship between meteorological parameters under different environmental conditions.
[0117] The dynamic convolution kernel K d is calculated as follows:
[0118] K d = W k E i + b k ,
[0119] where W k is a convolution kernel generation weight matrix, which is a learnable parameter; and b k is a convolution kernel generation bias item, which is a learnable parameter.
[0120] S3032. Environment perception feature convolution;
[0121] The one-dimensional convolution operation is performed on the enhanced environment perception feature vector using the dynamically generated convolution kernel, to extract dynamic coupling features between meteorological parameters that change with the environment, and to obtain an environment perception feature tensor.
[0122] The calculation formula of the i-th environment perception feature tensor F i is as follows:
[0123] F i = Conv1D(E i , K d ),
[0124] where Conv1D(·) is a one-dimensional convolution operation that slides the convolution kernel along the feature dimension; and the item Conv1D(E i , K d ) needs to reshape E i into a sequence before the convolution operation, such as sliding the convolution kernel along the feature dimension.
[0125] The conventional convolutional neural network fixes the convolution kernel weight and can only perform static feature extraction. In S3032, the environment perception method is used, and the convolution kernel is dynamically generated according to E i . The environment perception method strengthens the correlation of extreme meteorological parameters during peak hours and reduces noise coupling during off-peak hours.
[0126] The traditional convolutional neural network uses a fixed convolution kernel, which is difficult to capture the dynamic nonlinear coupling relationship between temperature, humidity and other meteorological parameters that changes with the environment, and cannot adapt to the changes of meteorological interaction patterns under different environmental conditions. S303 adopts a dynamic convolution kernel generation mechanism, generates convolution kernel weights in real time based on an enhanced environment perception feature vector through learnable parameters, performs convolution operation on the enhanced environment perception feature vector using the dynamic convolution kernel, and extracts dynamic coupling features between meteorological parameters that change with the environment.
[0127] S304. The attention score of the feature dimension is calculated to calculate the normalized attention weight of each feature dimension, so as to obtain the weighted feature vector of each feature dimension.
[0128] S3041. The bilinear attention score is calculated.
[0129] In combination with the environment perception feature tensor and the environment feedback vector, linear transformation is performed through a learnable attention feature weight matrix, an environment weight matrix and an attention bias term, and then GELU activation function processing is performed, a learnable bilinear interaction matrix is used to calculate the bilinear interaction term of the feature dimension slice vector and the environment feedback vector, the linear transformation result is added to the scaled bilinear interaction term, and the attention score is obtained, which quantifies the importance of the feature dimension under a specific environment.
[0130] The attention score e of the mth feature dimension of the ith sample is calculated according to the following formula: i,m
[0131]
[0132] In the formula, is the transpose of v a ; v a is an attention score vector, a learnable parameter; GELU(·) is a Gaussian error linear unit activation function; W a is an attention feature weight matrix, a learnable parameter; f i,m is the feature vector of the mth feature dimension of the ith sample, representing the mth slice of the ith environment perception feature tensor F i ; U a is an environment weight matrix, a learnable parameter; b a is an attention bias term, a learnable parameter; λ bl is a bilinear coefficient, which controls the interaction strength, and λ bl may be set to 0.5. is the transpose of f i,m ; B is a bilinear interaction matrix, a learnable parameter, which is used to capture the high-order correlation between features and environment; i is a positive integer; m is a positive integer. The item represents a bilinear item for capturing the second-order interaction between the feature and the environment, which can be set at peak hours, and the environment feedback vector of the ith sample is the passenger flow density, and the mth slice of the ith environment perception feature tensor F i The mth slice of the ith environment perception feature tensor F
[0133] S3042. Normalize the gating weight;
[0134] First, normalize the attention score of all feature dimensions calculated by the Softmax function to convert it into an initial weight. Then, use the environment feedback vector, the learnable gating weight vector and the gating bias term, and combine them with the Sigmoid activation function to generate the environment gating factor. Multiply the normalized initial weight by the environment gating factor to obtain the normalized attention weight, which realizes dynamic adjustment of the weight amplitude according to the environment.
[0135] The normalized attention weight a i,m of the mth feature dimension of the ith sample is calculated as follows:
[0136]
[0137] where exp(·) is the natural exponential function; e i,m is the attention score of the mth feature dimension of the ith sample; m ′ is a positive integer; M F is the total number of feature dimensions of the ith environment perception feature tensor F i ; e i,m′ is the attention score of the mth ′ feature dimension of the ith sample; is the transpose of w g ; w g is the gating weight vector, which is a learnable parameter; b g is the gating bias term, which is a learnable parameter; The item represents a gating mechanism that dynamically adjusts the weight amplitude according to the environment, such as reducing the weight variance at low peak hours to suppress noise. In addition, the residual connection ensures the stability of the early warning model when the environment suddenly changes, and strengthens the dynamic nature of the feature. The item is the implementation of the Softmax function, which is the gradient log normalization of the discrete probability distribution of a limited number of items, used to normalize the attention score of all feature dimensions calculated by the Softmax function.
[0138] S3043. Residual weighted feature output;
[0139] The obtained normalized attention weight is applied to the feature dimension slice vector of the corresponding environmental perception feature tensor and weighted. The original feature dimension slice vector is proportionally superimposed on the weighted result using the residual coefficient to obtain the weighted feature vector. This strengthens the key features in a dynamic environment and retains the original feature information through residual connection, which enhances the stability of the early warning model in the event of environmental mutations.
[0140] The weighted feature vector h of the mth feature dimension of the i-th sample i,m The calculation formula is:
[0141] h i,m =a i,m ·f i,m +α cs ·f i,m ,
[0142] Where, α cs is the residual coefficient, which controls the proportion of original feature retention. α can be set cs =0.2;
[0143] Output the weighted feature matrix H of the i-th sample i , the weighted feature matrix H of the i-th sample i Expressed as:
[0144]
[0145] Where h i,1 is the weighted feature vector of the first feature dimension of the i-th sample; h i,2 is the weighted feature vector of the second feature dimension of the i-th sample; h i,m is the weighted feature vector of the mth feature dimension of the i-th sample; is the i-th sample M F The weighted feature vector of feature dimensions;
[0146] Conventional feature weighting methods, such as global average pooling, cannot dynamically respond to the impact of environmental factors on feature importance. This can lead to the dilution of key features in critical scenarios such as heavy rain during peak hours, over-amplification of secondary features, and difficulty capturing the dynamic changes in feature relevance brought about by environmental changes. S304 employs an attention weighting mechanism based on environmental feedback. First, it calculates the attention score of each feature dimension by combining environmental perception features and environmental feedback vectors, quantifying its importance in the current environment. The attention score is then normalized using environmental gating. The normalized weights are applied to the features and residual connections are performed to strengthen key features while maintaining stability.
[0147] S305. Obtain the probability value of each category in the probability distribution of the final prediction of the early warning model based on the dynamic weight matrix and the transformed eigenvector;
[0148] S3051. Generating dynamic classification weights;
[0149] Based on the environmental feedback vector, the transformation is performed by a multi-layer perception, and the transformation result is added to the corresponding learnable class-specific base matrix of the class to generate a dynamic weight matrix for the current sample and each class, so that the classifier can dynamically adjust the decision boundary according to the environment;
[0150] The dynamic weight matrix of the i-th sample and the c-th class is The calculation formula is:
[0151]
[0152] In the formula, ReLU(·) is a rectified linear unit activation function; W u1 is the first layer weight matrix, a learnable parameter; b u1 is the first layer bias term, a learnable parameter; is the transpose of W u2 ; W u2 is the second layer weight matrix, a learnable parameter, used for dimension reduction; D c is the class-specific base matrix of the c-th class, a learnable parameter;
[0153] S3052. Environmental perception feature transformation;
[0154] The dynamic weight matrix is used to transform the weighted feature matrix, and the weighted feature matrix is nonlinearly coupled with the learnable weight vector of the corresponding class by using the coupling coefficient to obtain the transformed feature vector of each class;
[0155] The calculation formula of the transformed feature vector z i,c of the i-th sample and the c-th class is:
[0156]
[0157] In the formula, H i is the weighted feature matrix of the i-th sample; v c is the feature aggregation vector of the c-th class, a learnable parameter; β gf is the coupling coefficient, which controls the strength of the nonlinear term, and β gf may be set to 0.3; w c is the weight vector of the c-th class, a learnable parameter; is the transpose of H i ; and the dynamic weight matrix makes the classifier environment-adaptive, and the value of Ca i may be increased during peak periods and heavy rain to strengthen the coupling of extreme weather features by the weight matrix;
[0158] S3053. Probability calibration output;
[0159] The transformation feature vectors of each category are summed, the summing operation result is divided by the value of the environment sensitive temperature function, the calibration scores of each category are obtained, the calibration scores of all categories are normalized by the Softmax function, the probability values of each category in the probability distribution of the final prediction of the early warning model are obtained, so that the prediction probability difference is amplified when the environment mutates, and the classification accuracy is improved;
[0160] The probability value of the cth category in the probability distribution predicted by the early warning model The calculation formula of s
[0161]
[0162] In the formula, s c is the calibration score of the cth category of the ith sample; c ′ is a positive integer; C is the total number of meteorological event categories; s c′ is the calibration score of the cth category of the ith sample; ′ The term is the implementation of the Softmax function;
[0163] The calculation formula of s c is:
[0164]
[0165] In the formula, is the transpose of the all-1 vector; τ(Ca i ) is the environment sensitive temperature function; the environment sensitive temperature function τ(Ca i ) reduces the temperature value when the environment mutates, amplifies the prediction probability difference, and improves the early warning sensitivity of the key scene; the transpose of the all-1 vector is used to set The term represents the dot product operation of two vectors, that is, the sum of all elements of the vector z i,c is calculated, and the calculation result is a scalar, which is further used as the numerator in the calculation formula of s c , and scalar division calculation is performed with the environment sensitive temperature function which is also a scalar.
[0166] The calculation formula of τ(Ca i ) is:
[0167] τ(Ca i ) = (1+γ τ ·‖Ca i -Ca hist ‖2+∈) -1 ,
[0168] In the formula, γ τ For temperature scaling factor, γ can be set τ = 0.1; Ca hist is the historical environment mean vector, Ca hist has the same dimension as Ca i , representing the long-term average level of each environmental parameter; Ca i is the environmental feedback vector of the i-th sample; ∈ is a smoothing term, which can be set as ∈ = 0.001. The smoothing term ∈ must be set and needs to be set to a positive number that is not 0. If there is no such smoothing term, when ‖Ca i -Ca hist ‖2 is large, τ(Ca i ) can be close to 0, causing s c to approach infinity, causing the calculation of Softmax to overflow;
[0169] The traditional classification layer uses fixed weights and cannot adapt to the influence of environmental changes on the decision boundary, resulting in insufficient classification confidence in critical scenarios such as heavy rain during peak hours, and overfitting to noise in low-risk scenarios such as light rain during off-peak hours. S305 adopts a dynamic environment-aware classification layer to generate a dynamic weight matrix for each class based on the environmental feedback vector. The dynamic weight matrix is used to transform and couple the weighted features, calibrate the scores through an environment-sensitive temperature function, and output a probability distribution, so that the prediction result can adapt to environmental changes and improve the sensitivity of critical scene early warning.
[0170] S306. Calculate environment-sensitive weights to obtain an environment-aware loss function;
[0171] S3061. Calculate class environment weight matrix;
[0172] By calculating the correlation between the environmental feedback vector and the learnable environment vector of the class, the environment-sensitive weight is obtained to reflect the degree of association between the current environment and the misjudgment cost of the class;
[0173] The calculation formula of the environment-sensitive weight A i,c of the i-th sample to the c-th class is:
[0174]
[0175] In the formula, λ ed is a scaling factor that controls the strength of environmental influence, which can be set as λ ed = 0.5; is the transpose of Ca i ; Ca i is the environmental feedback vector of the i-th sample; V c is the learnable environment vector of the c-th class; The term represents the environment-related penalty term based on the weight mechanism. When the passenger flow peak meets heavy rain, Ca i and Vc Highly correlated, A i,c >>1, increase the penalty for misjudgment, when the weather is clear during the off-peak period, Ca i With V c Low correlation, A i,c ≈1, maintaining the baseline loss.
[0176] S3062. Calculate environmental weighted losses;
[0177] When calculating the environmental perception loss function, the calculated environmental sensitivity weights are incorporated into the standard cross-entropy loss function to achieve cost-sensitive learning of environmental perception and impose heavier penalties on high-risk misjudgments in critical environments.
[0178] The calculation formula of the environment perception loss function Loss is:
[0179]
[0180] Where C is the total number of meteorological event categories; y c is the component of the cth category in the one-hot encoding of the true label; ln(·) is the natural logarithm function; is the probability value of the cth category in the probability distribution predicted by the early warning model;
[0181] Conventional cross-entropy loss functions ignore the impact of environmental factors on the cost of misclassifications. This results in equal penalties for high-risk misclassifications in critical environments, such as heavy rain during peak hours, and low-risk scenarios, such as light rain during off-peak hours. This fails to meet the differentiated needs of meteorological safety warnings. The S306 uses an environmentally weighted classification loss function. This calculates the correlation between the environmental feedback vector and each class's learnable environmental vector, deriving an environmentally sensitive weight that reflects the degree of correlation between the current environment and the misclassification cost for that class. This weight is then incorporated into the cross-entropy loss calculation, imposing a heavier penalty on high-risk misclassifications under sudden environmental changes.
[0182] S307. Calculate the partial derivative gradient of the environment perception loss function with respect to the environment feedback vector to obtain a modified environment perception gradient;
[0183] S3071. Environmental feedback gradient calculation;
[0184] By calculating the partial derivative gradient of the environment perception loss function with respect to the environment feedback vector, the magnitude of the environment feedback gradient is proportional to the degree to which the current environment deviates from the historical average;
[0185] The partial derivative gradient of the environment perception loss function with respect to the environment feedback vector Ca The calculation formula is:
[0186]
[0187] Where, is the partial derivative symbol; Ca represents the environmental feedback vector, the i-th element of which is Ca i ; Ca hist is the historical environmental mean vector, Ca hist has the same dimension as Ca i , representing the long-term average level of each environmental parameter; represents the unit vector of the environmental mutation direction, which can be set that when the passenger flow suddenly increases, ‖Ca i -Ca hist ‖2 increases, and the gradient amplitude increases;
[0188] Ca hist The calculation formula of Ca
[0189]
[0190] In the formula, N hist is the total number of historical samples.
[0191] S3072. Gradient correction update;
[0192] The correction term is superimposed on the gradient of the early warning model parameter obtained by the conventional back propagation to obtain the modified environmental perception gradient. The correction term is obtained by transforming the environmental feedback gradient through a learnable mapping matrix. On the premise of preserving the original optimization direction, the gradient correction component related to the environmental mutation is injected. When the environment changes dramatically, the correction amplitude increases, so that the model parameters respond more quickly to real-time environmental changes. Finally, the modified environmental perception gradient is used for model parameter update;
[0193] The calculation formula of the modified environmental perception gradient g ′ t is as follows:
[0194]
[0195] In the formula, g t is the conventional back propagation gradient, that is, the gradient of the environmental perception loss function with respect to the model parameters; β is the feedback gain coefficient, which controls the environmental correction strength, and can be set as β = 0.4; W ys is the mapping matrix, which is a learnable parameter and is updated independently using the gradient descent method, so that the dimension of g t is mapped to the dimension of g ;
[0196] Conventional stochastic gradient descent optimization methods cannot quickly respond to sudden environmental changes such as a sudden increase in passenger flow, resulting in parameter updates lagging behind environmental changes. When meteorological conditions fluctuate violently, the convergence speed decreases, affecting the timeliness of predictions. S307 adopts an environmental gradient correction strategy. First, the gradient of the loss to the environmental feedback vector is calculated. Its magnitude is proportional to the degree to which the environment deviates from the historical average. The correction term obtained by the environmental gradient mapping is superimposed on the conventional model parameter gradient. While retaining the original optimization direction, the environmental mutation information is injected, allowing the early warning model to respond faster when the environment changes drastically. The convergence curve comparison under semi-logarithmic coordinates is used to verify the advantages of the gradient feedback optimization algorithm in training efficiency and environmental adaptability. The experiment sets up two sudden environmental changes during the training process to simulate a sudden increase in passenger flow and equipment anomalies, and records the convergence trajectories of the loss functions of different optimization algorithms, such as Figure 4 As shown in the figure, the experimental results show that the loss value of the traditional optimization method fluctuates violently and the convergence speed slows down significantly when the environment changes suddenly. The method provided by S307 perceives environmental changes in real time through the gradient feedback mechanism and injects environmental state information into the parameter update, so that the early warning model can maintain stable and rapid convergence characteristics when encountering sudden interference. The anti-interference ability significantly improves the training efficiency, ensuring that the early warning system has the ability to continuously optimize in the complex and changeable rail transit environment.
[0197] S308. Perform early warning model training iterations through mini-batch gradient descent. After calculating the gradient of the environmental perception loss function in each round, use the Adam optimizer to update the parameters until the stopping condition is met, thereby obtaining a trained early warning model.
[0198] The early warning model is trained using a small-batch gradient descent strategy. Each batch inputs 128 sets of sample data that have been dynamically fused and normalized. After calculating the prediction error using the environmental perception loss function, the gradient feedback optimization algorithm is executed. The specific steps are as follows:
[0199] S3081. First calculate the gradient of the environmental feedback vector and convert it into a model parameter gradient correction term through a mapping matrix;
[0200] S3082. After superimposing the conventional back-propagation gradient, the Adam optimizer is used to update the model weights, with an initial learning rate of 0.001 and a decay of 20% every 10 rounds.
[0201] During the training process, the F1 score and false alarm rate on the validation set are continuously monitored. When the validation loss decreases by less than 0.1% in 20 consecutive iterations, the training is terminated and the optimal model parameters are saved.
[0202] S4. Real-time collected new multi-scale weather data and perform S2 to obtain new processed weather feature values, input the new processed weather feature values into the trained early warning model, and the trained early warning model outputs the probability values of various operating state labels of the new multi-scale weather data. When the probability values of "heavy rain warning", "high temperature warning" or "strong wind warning" exceed the preset probability value threshold, the hierarchical early warning response mechanism is triggered, and the early warning level is adjusted through the feedback verification mechanism.
[0203] The preset probability value threshold of "heavy rain warning" can be set to 0.92, the preset probability value threshold of "high temperature warning" can be set to 0.85, and the preset probability value threshold of "strong wind warning" can be set to 0.88.
[0204] The early warning response mechanism is to automatically generate an early warning message containing the early warning type, affected site and duration, and push it to the dispatch center electronic board and train driver's HUD system, and according to the specific numerical value of the weather feature, the corresponding level of emergency plan is started synchronously, such as wind speed > 17 m / s, the emergency plan is to limit the speed of urban rail transit tools, and wind speed > 20 m / s, the emergency plan is to shut down the urban rail transit tools.
[0205] The feedback verification mechanism is that after the running speed of the urban rail transit tool is reduced or the operating state is changed due to the early warning, the real-time weather feature of the section is continuously compared with the weather warning threshold deviation. If the actual wind speed is lower than the weather warning threshold by 15% for 5 consecutive minutes, the level of emergency plan is reduced.
Claims
1. A method for real-time monitoring and early warning of urban rail transit weather, characterized in that: include: S1. Collect multi-scale meteorological data, label the operating environment status labels of the multi-scale meteorological data, and obtain labeled multi-scale meteorological data; S2. Dynamically fuse and normalize the multi-scale meteorological data using a dynamic fusion normalization method based on spatial weighting to obtain a plurality of processed meteorological eigenvalues, which constitute a processed eigenvector; S3. Build a warning model and train the warning model using the processed meteorological characteristic values to obtain a trained warning model; S4. Collect new multi-scale meteorological data in real time and execute S2 to obtain new processed meteorological feature values, input the new processed meteorological feature values into the trained early warning model, and the trained early warning model outputs the probability values of various operation status labels of the new multi-scale meteorological data.
2. The method for real-time monitoring and early warning of urban rail transit weather according to claim 1, characterized in that: The multi-scale meteorological data collection in S1 includes: obtaining local meteorological data with spatial attribute characteristics through on-board mobile monitoring equipment installed on urban rail transit vehicles and fixed monitoring equipment deployed at urban rail transit stations and various monitoring points along the line.
3. The method for real-time monitoring and early warning of urban rail transit weather according to claim 1, characterized in that: The steps of S2 include: S201. Based on the longitude and latitude coordinates of the stations, the space is divided into multiple partitions using the k-means clustering algorithm. The mean and standard deviation of each meteorological characteristic within each partition are calculated to obtain the mean and standard deviation of the meteorological characteristics of the spatial partitions. S202. Calculate the Euclidean distance between the latitude and longitude coordinates of each station and the centroid coordinates of the spatial cluster to which it belongs to obtain the spatial gradient value; S203. Normalize the original meteorological characteristic values by combining the spatial partition meteorological characteristic mean, the spatial partition meteorological characteristic standard deviation, and the spatial gradient value.
4. The method for real-time monitoring and early warning of urban rail transit weather according to claim 1, characterized in that: The steps of S3 include: S301. Build an early warning model and input the processed feature vector; S302. Obtaining an enhanced environmental perception feature vector based on the environmental gating weight vector and the nonlinear transformation meteorological feature vector; S303. Generate a dynamic convolution kernel for calculating the environment perception feature tensor; S304. The attention scores of the feature dimensions are calculated and used to calculate the normalized attention weights of each feature dimension, thereby obtaining the weighted feature vectors of each feature dimension; S305. Obtain the probability value of each category in the probability distribution of the final prediction of the early warning model based on the dynamic weight matrix and the transformed eigenvector; S306. Calculate the environment-sensitive weight to obtain the environment-aware loss function; S307. Calculate the partial derivative gradient of the environment perception loss function with respect to the environment feedback vector to obtain a modified environment perception gradient; S308. Perform early warning model training iterations and use the Adam optimizer to update parameters until the stop iteration condition is met to obtain a trained early warning model.
5. The method for real-time monitoring and early warning of urban rail transit weather according to claim 4, characterized in that: The step of S302 includes: S3021. Using the environment feedback vector, perform a linear transformation using a learnable environment weight matrix and an environment bias term, and input the transformation result into a Sigmoid activation function to generate an environment gating weight vector. S3022. First, perform a linear transformation on the processed feature vector and then apply a GELU activation function to perform a nonlinear transformation to obtain a nonlinearly transformed meteorological feature vector; S3023. Multiply the environmental gating weight vector and the nonlinear transformation meteorological feature vector element by element to obtain the enhanced environmental perception feature vector.
6. The method for real-time monitoring and early warning of urban rail transit weather according to claim 4, characterized in that: The step of S303 includes: S3031. Generate a dynamic convolution kernel that changes dynamically with the current sample by generating a weight matrix and a bias term through a learnable convolution kernel; S3032. Use the dynamically generated convolution kernel to perform a one-dimensional convolution operation on the enhanced environmental perception feature vector to extract the dynamic coupling characteristics between meteorological parameters that change with the environment and obtain the environmental perception feature tensor.
7. The method for real-time monitoring and early warning of urban rail transit weather according to claim 4, characterized in that: The step of S304 includes: S3041. Calculate attention score; S3042. Convert the attention scores of all feature dimensions into initial weights. Utilize the environment feedback vector, generate the environment gating factor through a learnable gating weight vector and a gating bias term, and combine it with the Sigmoid activation function to obtain the normalized attention weights. S3043. Apply the normalized attention weight to the feature dimension slice vector of the corresponding environmental perception feature tensor and weight it, and use the residual coefficient to proportionally superimpose the original feature dimension slice vector on the weighted result to obtain a weighted feature vector.
8. The method for real-time monitoring and early warning of urban rail transit weather according to claim 4, characterized in that: The step of S305 includes: S3051. Perform the transformation using a multi-layer perceptron and add the transformation result to the learnable category-specific basis matrix of the corresponding category to generate a dynamic weight matrix for the current sample and each category; S3052. Using the dynamic weight matrix, transform the weighted feature matrix, and use the coupling coefficient to nonlinearly couple the weighted feature matrix with the learnable weight vector of the corresponding category to obtain the transformed feature vector of each category; S3053. Perform a sum operation on the transformed feature vectors of each category, divide the sum operation result by the value of the environmental sensitive temperature function, obtain the calibration score of each category, normalize the calibration scores of all categories through the Softmax function, and obtain the probability value of each category in the probability distribution finally predicted by the early warning model.
9. The method for real-time monitoring and early warning of urban rail transit weather according to claim 4, characterized in that: The step of S306 includes: S3061. Obtain an environment-sensitive weight by calculating the correlation between the environment feedback vector and the learnable environment vector of the category; S3062. When calculating the environment perception loss function, the calculated environment sensitivity weight is incorporated into the cross entropy loss function.
10. The method for real-time monitoring and early warning of urban rail transit weather according to claim 4, characterized in that: The step of S307 includes: S3071. Calculate the partial derivative gradient of the environment perception loss function with respect to the environment feedback vector; S3072. Superimpose a correction term on the warning model parameter gradient obtained by conventional back propagation to obtain a corrected environmental perception gradient, and use the corrected environmental perception gradient to update the model parameters.
Citation Information
Cited By
Intelligent detection method and system for aircraft accelerator control state
CN121786594A