In-tunnel risk prediction method based on sensor data analysis
By arranging sensors in the tunnel and using traffic camera data, and combining machine learning models for comprehensive risk assessment, the multi-dimensional data analysis and data fusion problems of tunnel risk prediction in the existing technology are solved, and efficient risk assessment and early warning are achieved. Improve the effectiveness of tunnel safety management.
Patent Information
- Application Number
- CN202410967588.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-18
AI Technical Summary
The existing technology is difficult to conduct comprehensive analysis based on multi-dimensional data in tunnel risk prediction, resulting in limited accuracy and flexibility of risk assessment, and traffic camera data cannot be effectively integrated into the tunnel to collect data, affecting the effectiveness of tunnel safety management. .
By arranging sensor modules (including temperature, humidity, gas, vibration sensors) in the tunnel for data acquisition and analysis, combining machine learning models to predict optimization thresholds, determining tunnel abnormalities, and using traffic camera monitoring data for comprehensive risk assessment, setting risk thresholds , issue a pass risk warning.
It realizes efficient abnormality detection and risk assessment of multi-dimensional data, ensures the comprehensiveness and accuracy of risk assessment, provides strong decision-making support for tunnel management, improves the response speed of risk warnings, and ensures the safety of vehicles and personnel. .
Smart Images

Figure CN118981718A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of tunnel risk prediction, and in particular to a method for predicting risks in a tunnel based on sensor data analysis. Background Art
[0002] Traditional tunnel monitoring mainly relies on manual inspections and simple monitoring by fixed sensors. Although it can detect and prevent potential risks to a certain extent, it is obviously insufficient in terms of the real-time, comprehensiveness and accuracy of data. In recent years, with the popularization and use of Internet of Things technology and traffic cameras, the environment inside the tunnel can be processed and analyzed, which improves automation and intelligence.
[0003] Although existing technologies have made significant progress in traffic camera data collection and preliminary analysis, risk prediction for tunnels is not convenient for comprehensive analysis based on the acquisition of multi-dimensional data, and it is difficult to dynamically adjust according to real-time data, which limits the accuracy and flexibility of risk assessment. The application of traffic camera data also remains at the simple traffic flow monitoring level, failing to effectively integrate with the collected data in the tunnel. There is a lack of comprehensive assessment of the overall traffic conditions in the tunnel, which affects the effectiveness of tunnel safety management. Summary of the invention
[0004] In view of the problems existing in the above-mentioned existing risk prediction methods in tunnels based on sensor data analysis, the present invention is proposed.
[0005] Therefore, the problem to be solved by the present invention is that it is inconvenient to conduct comprehensive analysis based on the acquisition of multi-dimensional data, and it is difficult to dynamically adjust according to real-time data, which limits the accuracy and flexibility of risk assessment. The application of traffic camera data also remains at the simple traffic flow monitoring level, and fails to be effectively integrated with the collected data in the tunnel. There is a lack of comprehensive evaluation of the overall traffic conditions in the tunnel, which affects the effectiveness of tunnel safety management.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for predicting risks in a tunnel based on sensor data analysis, comprising:
[0007] Based on the tunnel layout sensors, tunnel data collection is carried out, the tunnel data collected by sensors is analyzed for comprehensive anomaly scoring, and the machine learning model prediction optimization threshold is set to determine tunnel anomalies;
[0008] Based on the determination of tunnel anomalies, the tunnel traffic conditions are monitored and analyzed through traffic cameras. Combined with the comprehensive anomaly score, a comprehensive risk assessment of the tunnel is conducted, and the machine learning model is set to predict the risk threshold to determine the tunnel traffic risk.
[0009] Based on the tunnel traffic risk assessment, a traffic risk warning is issued in the tunnel.
[0010] As a preferred solution of the risk prediction method in a tunnel based on sensor data analysis of the present invention, the method of arranging sensors in the tunnel to collect tunnel data includes:
[0011] Arrange sensor modules based on the internal structure of the tunnel, including temperature sensors, humidity sensors, gas sensors, vibration sensors and displacement sensors, to collect tunnel data;
[0012] The sensor's layout is determined based on the length of the tunnel and the sensor's detection range. The sensor transmits the collected tunnel data to the cloud server via a wireless network.
[0013] As a preferred solution of the tunnel risk prediction method based on sensor data analysis of the present invention, wherein: the analysis sensor collects data for comprehensive abnormality scoring, including:
[0014] The collected data of the sensor is analyzed and a comprehensive abnormality score is given, which is expressed as:
[0015]
[0016] μ j (t) = α·S j (t,x)+(1-α)·μ j (t-1);
[0017]
[0018] Where A(t,x) represents the comprehensive anomaly score at time t and location x, S j (t,x) represents the tunnel data measurement value of the jth sensor at time t and position x, μ j (t) and σ j (t) represents the sliding mean and sliding standard deviation of the j-th sensor tunnel data measurement value, w j represents the weight of the jth sensor, N represents the total number of sensors, α represents the sliding average coefficient, μ j (t-1) and σ j (t-1) represents the sliding mean and sliding standard deviation of the j-th sensor at time t-1;
[0019] Use the cross-validation method to update α within the candidate value range determined based on historical data, and select the α value with the smallest average error as the optimal sliding average coefficient;
[0020] For each sensor j, the variance of its measured value is calculated, and the inverse of the variance is calculated and normalized to be defined as the weight w j ;
[0021] Using the newly acquired sensor data, calculate the comprehensive anomaly score A(t,x).
[0022] As a preferred solution of the tunnel risk prediction method based on sensor data analysis of the present invention, wherein: the setting of the machine learning model prediction optimization threshold and the determination of tunnel abnormality include:
[0023] Collect historical data, calculate the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), select a 95% confidence interval based on the distribution of the comprehensive anomaly score, and set the k value based on the range of the z score of the standard normal distribution of 1.645;
[0024] According to the selected confidence interval, the optimized threshold T is calculated and expressed as:
[0025] T=μ A +k·σ A ;
[0026] where μ A and σ A They represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), k represents the adjustment coefficient, and T represents the optimization threshold;
[0027] If A(t,x) calculated by the newly collected sensor data is greater than or equal to the optimization threshold T, the tunnel is judged to be abnormal.
[0028] As a preferred solution of the risk prediction method in the tunnel based on sensor data analysis of the present invention, wherein: the determination of tunnel abnormality and monitoring and analyzing the tunnel traffic conditions through traffic cameras include:
[0029] When determining tunnel anomalies, obtain tunnel traffic camera monitoring data including lane occupancy, vehicle speed, and traffic flow data;
[0030] According to the monitoring data, the speed data and lane occupancy data in each traffic camera monitoring data are Z-score standardized, which are expressed as:
[0031]
[0032] Where V i (t,x) represents the vehicle speed monitored by the i-th camera at time t and position x, O i (t,x) represents the lane occupancy rate monitored by the i-th camera at time t and position x, and They represent the historical mean and historical standard deviation of the vehicle speed monitored by the i-th camera, and They represent the historical mean and historical standard deviation of the lane occupancy rate monitored by the i-th camera, Represents the normalized vehicle speed data, represents normalized lane occupancy data;
[0033] The traffic flow data is used as the adjustment factor, expressed as:
[0034]
[0035] Among them, F i (t,x) represents the adjustment factor of traffic flow, S i (t,x) represents the traffic flow monitored by the i-th camera at time t and location x, γ and θ represent the sensitivity coefficient and threshold for adjusting the traffic flow score;
[0036] Calculate the historical mean μ of traffic flow data S Set as the threshold θ of the traffic flow score, and select an appropriate coefficient k based on historical experience to balance the sensitivity γ of the traffic flow score;
[0037] The standardized vehicle speed data and lane occupancy rate data are summed and averaged, expressed as:
[0038]
[0039] Among them I k (t,x) represents the comprehensive eigenvalue, M represents the total number of traffic cameras;
[0040] The cumulative effect of the time integral of the comprehensive characteristic value is analyzed and normalized to define the tunnel traffic score, which is expressed as:
[0041]
[0042] Among them C k (t,x) represents the tunnel passability score of the kth camera at time t and position x, λ k represents the normalization factor of the tunnel traffic score, T represents the consideration time, and dτ represents the integration operation at each time point τ.
[0043] As a preferred solution of the tunnel risk prediction method based on sensor data analysis of the present invention, wherein: the comprehensive risk assessment of the tunnel is performed in combination with the comprehensive anomaly score, including:
[0044] Get tunnel pass rating C k (t,x) is combined with the comprehensive abnormality score A to analyze the tunnel passage risk, which is expressed as:
[0045]
[0046] Where B(t,x) represents the tunnel passage risk score, γ k represents the normalization factor of traffic camera data, S k (t,x) represents the traffic flow monitored by the kth camera at time t and location x;
[0047] Based on the sensor measurement values, the square sum of the standardized values is calculated and the average is obtained to comprehensively determine the traffic flow changes at each time point, which is expressed as:
[0048]
[0049] where μ j and σ j They represent the historical mean and standard deviation of the jth sensor at time τ and position x, respectively. M(τ,x) represents the degree of change in traffic flow at each time point. N represents the total number of sensors. S j (τ,x) represents the traffic volume monitored by the jth camera at time τ and position x;
[0050] Calculate the probability density of the comprehensive anomaly score A(t,x), expressed as:
[0051]
[0052] Where G(τ,x) represents the probability density of the comprehensive anomaly score, μ A and σ A They represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x) respectively;
[0053] A comprehensive risk assessment of the traffic conditions in the tunnel is performed, expressed as:
[0054]
[0055] Where R(t,x) represents the comprehensive risk score.
[0056] As a preferred solution of the tunnel risk prediction method based on sensor data analysis of the present invention, wherein: the setting of the machine learning model prediction risk threshold and the determination of the tunnel passage risk include:
[0057] Collect historical comprehensive risk score R(t,x) data and its corresponding abnormal and normal labels, record risk scores in different time periods and under different conditions, construct a data set and divide it into a training set and a test set;
[0058] Build a support vector machine model based on the Scikit-learn library environment, select the radial basis function kernel, and use the training set data to train the support vector machine model. Update and confirm the adjustment parameters and use the training set to verify the model.
[0059] Using the mean and standard deviation of the combined risk scores of normal and abnormal labels in the test set, determine the initial threshold using the 95th percentile, calculate the prediction error in the test set and confirm the final risk threshold D;
[0060] When the calculated R(t,x) is greater than or equal to the risk threshold D, it is determined that the tunnel passage risk is high.
[0061] As a preferred solution of the tunnel risk prediction method based on sensor data analysis of the present invention, wherein: the tunnel risk determination based on the tunnel risk warning is issued in the tunnel, including:
[0062] When it is determined that the tunnel passage risk is high, the controller controls the LED warning screens at the tunnel entrance and inside the tunnel to display warning information;
[0063] The controller controls the traffic lights at the tunnel entrance and exit and inside the tunnel to turn red, giving risk warnings to drivers;
[0064] The controller controls the speaker to remind the driver that there is a risk of passing ahead, and recommends slowing down or stopping;
[0065] The information that determines the tunnel has a greater risk of passage is uploaded to the cloud server for data backup.
[0066] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of the above-mentioned method for predicting risks in a tunnel based on sensor data analysis when executing the computer program.
[0067] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for predicting risks in a tunnel based on sensor data analysis.
[0068] The beneficial effects of the present invention are as follows: by integrating the characteristic values of each sensor in a weighted summation manner, and dynamically adjusting the threshold in conjunction with a machine learning model, the multi-dimensional sensor data maintains efficient anomaly detection capabilities, the traffic situation is evaluated by integrating traffic camera monitoring data, and multi-level data fusion and analysis are achieved in combination with sensor data to reflect environmental changes in the tunnel, thereby ensuring the comprehensiveness and accuracy of risk assessment, providing strong decision-making support for tunnel management and risk warning, and warning measures based on risk warnings can respond quickly to ensure the safety of vehicles and personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0070] Figure 1 Schematic diagram of the flow of the risk prediction method in the tunnel based on sensor data analysis.
[0071] Figure 2 Schematic diagram of the tunnel anomaly analysis process of the tunnel risk prediction method based on sensor data analysis.
[0072] Figure 3 Schematic diagram of the comprehensive risk assessment process of the risk prediction method in the tunnel based on sensor data analysis. DETAILED DESCRIPTION
[0073] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0074] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0075] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.
[0076] Example 1
[0077] Reference Figure 1 , Figure 2 and Figure 3 , which is the first embodiment of the present invention, and which provides a method for predicting risks in a tunnel based on sensor data analysis. The method for predicting risks in a tunnel based on sensor data analysis includes:
[0078] S1, based on the tunnel layout sensors, collect tunnel data, analyze the tunnel data collected by sensors for comprehensive anomaly scoring, set the machine learning model prediction optimization threshold, and determine tunnel anomalies;
[0079] Preferably, based on the arrangement of sensors in the tunnel, tunnel data collection is performed, including:
[0080] Arrange sensor modules based on the internal structure of the tunnel, including temperature sensors, humidity sensors, gas sensors, vibration sensors and displacement sensors, to collect tunnel data;
[0081] The sensor's layout is determined based on the length of the tunnel and the sensor's detection range. The sensor transmits the collected tunnel data to the cloud server via a wireless network.
[0082] Through the arrangement of various sensors, comprehensive monitoring of the environment, traffic and structural conditions in the tunnel is achieved to ensure tunnel safety. Real-time data transmission and processing are achieved through wireless networks, which can promptly detect and respond to abnormal situations in the tunnel, improve the timeliness of risk assessment, and provide a centralized management platform to facilitate tunnel managers to monitor and analyze data and improve management efficiency. By reasonably arranging sensor positions and determining the detection range, it is ensured that there are no monitoring blind spots inside the tunnel and comprehensive coverage is achieved.
[0083] Furthermore, the sensor collected data is analyzed for comprehensive anomaly scoring, including:
[0084] The collected data of the sensor is analyzed and a comprehensive abnormality score is given, which is expressed as:
[0085]
[0086] μ j (t) = α·S j (t,x)+(1-α)·μ j (t-1);
[0087]
[0088] Where A(t,x) represents the comprehensive anomaly score at time t and location x, S j (t,x) represents the tunnel data measurement value of the jth sensor at time t and position x, μ j (t) and σ j (t) represents the sliding mean and sliding standard deviation of the j-th sensor tunnel data measurement value, w j represents the weight of the jth sensor, N represents the total number of sensors, α represents the sliding average coefficient, μ j (t-1) and σ j (t-1) represents the sliding mean and sliding standard deviation of the j-th sensor at time t-1;
[0089] Use the cross-validation method to update α within the candidate value range determined based on historical data, and select the α value with the smallest average error as the optimal sliding average coefficient;
[0090] For each sensor j, the variance of its measurement value is calculated, which is expressed as:
[0091]
[0092] in represents the variance of the jth sensor data, μ j represents the mean value of the jth sensor data, and T represents the total number of observation times;
[0093] Calculate the inverse of the variance and normalize it to define the weight w j ;
[0094] Using the newly acquired sensor data, calculate the comprehensive anomaly score A(t,x).
[0095] By calculating the sliding mean and sliding standard deviation, short-term fluctuations in sensor data can be smoothed, the impact of noise can be reduced, and the characteristic value can be significantly changed when an accident occurs, reflecting the changes in sensor data in real time, ensuring the timeliness of anomaly detection. The influence of different sensor data ranges is eliminated through standardization, which enhances the comparability of data from different sensors and improves the robustness of detection. The weight w j The distribution makes the data of important sensors have a greater impact on the anomaly score, improves the accuracy of anomaly detection, and generates a comprehensive anomaly score by combining the characteristic values of each sensor through weighted summation, which provides a basis for subsequent anomaly judgment and makes the anomaly detection results more accurate and reliable.
[0096] Furthermore, the machine learning model prediction optimization threshold is set to determine tunnel anomalies, including:
[0097] Collect historical data, calculate the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), select a 95% confidence interval based on the distribution of the comprehensive anomaly score, and set the k value based on the range of the z score of the standard normal distribution of 1.645;
[0098] According to the selected confidence interval, the optimized threshold T is calculated and expressed as:
[0099] T=μ A +k·σ A ;
[0100] where μ A and σ A They represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), k represents the adjustment coefficient, and T represents the optimization threshold;
[0101] If A(t,x) calculated by the newly collected sensor data is greater than or equal to the optimization threshold T, the tunnel is judged to be abnormal.
[0102] By setting the k value based on statistical analysis and confidence interval, the optimization threshold T can be determined scientifically and reasonably to ensure the accuracy of risk assessment. The optimization threshold T can be dynamically adjusted according to the actual distribution of data to improve the flexibility and adaptability of risk assessment. The threshold method set by this method is simple and easy, suitable for different data scenarios, and can make full use of existing data resources to ensure the rationality and reliability of the evaluation results, which is easy to understand and explain, and improves the transparency and credibility of the method.
[0103] S2, based on the determination of tunnel anomalies, monitors and analyzes tunnel traffic conditions through traffic cameras, combines comprehensive anomaly scores, conducts a comprehensive risk assessment of the tunnel, sets a machine learning model to predict risk thresholds, and determines tunnel traffic risks;
[0104] Preferably, according to the determination of tunnel anomaly, the tunnel traffic condition is monitored and analyzed by a traffic camera, including:
[0105] When determining tunnel anomalies, obtain tunnel traffic camera monitoring data including lane occupancy, vehicle speed, and traffic flow data;
[0106] According to the monitoring data, the speed data and lane occupancy data in each traffic camera monitoring data are Z-score standardized, which are expressed as:
[0107]
[0108] Where V i (t,x) represents the vehicle speed monitored by the i-th camera at time t and position x, O i (t,x) represents the lane occupancy rate monitored by the i-th camera at time t and position x, and They represent the historical mean and historical standard deviation of the vehicle speed monitored by the i-th camera, and They represent the historical mean and historical standard deviation of the lane occupancy rate monitored by the i-th camera, Represents the normalized vehicle speed data, represents normalized lane occupancy data;
[0109] The traffic flow data is used as the adjustment factor, expressed as:
[0110]
[0111] Among them, F i (t,x) represents the adjustment factor of traffic flow, S i (t,x) represents the traffic flow monitored by the i-th camera at time t and location x, γ and θ represent the sensitivity coefficient and threshold for adjusting the traffic flow score;
[0112] Calculate the historical mean μ of traffic flow data S Set as the threshold θ of the traffic flow score, and select an appropriate coefficient k based on historical experience to balance the sensitivity γ of the traffic flow score, expressed as:
[0113]
[0114] Normalization factor λ of tunnel passability score k Calculated through the historical mean and standard deviation of camera data, expressed as:
[0115]
[0116] in and They represent the historical mean and standard deviation of the k-th camera speed data, and They represent the historical mean and standard deviation of the lane occupancy data of the kth camera respectively;
[0117] The standardized vehicle speed data and lane occupancy rate data are summed and averaged, expressed as:
[0118]
[0119] Among them I k (t,x) represents the comprehensive eigenvalue, M represents the total number of traffic cameras;
[0120] The cumulative effect of the time integral of the comprehensive characteristic value is analyzed and normalized to define the tunnel traffic score, which is expressed as:
[0121]
[0122] Among them C k (t,x) represents the tunnel passability score of the kth camera at time t and position x, λ k represents the normalization factor of the tunnel traffic score, T represents the consideration time, and dτ represents the integration operation at each time point τ;
[0123] The formula takes into account the cumulative effect of data through time integration, so that the score can reflect the comprehensive situation over a period of time, rather than relying solely on data at a certain moment. By standardizing the eigenvalues, the influence of different sensor data ranges is eliminated, making the data comparability of different sensors more comparable. The standardized data reflects the degree of deviation of sensor data from the historical mean, which helps to identify abnormal situations. The traffic flow data is converted into a value between 0 and 1 through the traffic flow adjustment factor, making the data smoother and more stable. By averaging the data of L traffic cameras, it is ensured that the data of all cameras have equal weight in the score, avoiding the excessive influence of a certain camera data on the score result.
[0124] By integrating various traffic camera monitoring data such as vehicle speed, lane occupancy and traffic flow, data fusion and analysis are performed from multiple dimensions. Detailed sensor status changes are provided through standardized processing and time integration calculation. The traffic camera data scoring part combines vehicle speed, lane occupancy and traffic flow, and uses logical functions for adjustment. It can accurately reflect traffic mobility and congestion, and reflect the changing trend of traffic conditions in tunnels in real time. The time decay factor ensures the reasonable influence of historical data on current risk assessment, prevents outdated data from interfering with the assessment results, ensures the real-time and accuracy of the assessment results, and can achieve comprehensive, dynamic, real-time and efficient risk assessment of traffic conditions in tunnels, provide strong decision-making support for tunnel management, and ensure smooth and safe traffic in tunnels.
[0125] Furthermore, combined with the comprehensive anomaly score, a comprehensive risk assessment of the tunnel is conducted, including:
[0126] Get tunnel pass rating C k (t,x) is combined with the comprehensive abnormality score A to analyze the tunnel passage risk, which is expressed as:
[0127]
[0128] Where B(t,x) represents the tunnel passage risk score, γ k represents the normalization factor of traffic camera data, S k (t,x) represents the traffic flow monitored by the kth camera at time t and location x;
[0129] Based on the sensor measurement values, the square sum of the standardized values is calculated and the average is obtained to comprehensively determine the traffic flow changes at each time point, which is expressed as:
[0130]
[0131] where μ j and σ jThey represent the historical mean and standard deviation of the jth sensor at time τ and position x, respectively. M(τ,x) represents the degree of change in traffic flow at each time point. N represents the total number of sensors. S j (τ,x) represents the traffic volume monitored by the jth camera at time τ and position x;
[0132] Calculate the probability density of the comprehensive anomaly score A(t,x), expressed as:
[0133]
[0134] Where G(τ,x) represents the probability density of the comprehensive anomaly score, μ A and σ A They represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x) respectively;
[0135] A comprehensive risk assessment of the traffic conditions in the tunnel is performed, expressed as:
[0136]
[0137] Where R(t,x) represents the comprehensive risk score;
[0138] The normalized value of the comprehensive anomaly score A(t,x) is evaluated by using the probability density function of the Gaussian distribution to reflect the severity of the current abnormal situation in the tunnel. The influence of different sensor data ranges is eliminated by standardized sensor data processing, making the data of different sensors comparable. The standardized change of sensor data over a period of time is calculated by integration, and the time decay factor e is considered. -λτ , reflects the cumulative impact of sensor data over time. The time decay factor ensures that the most recent data has a greater impact on the current risk assessment, while the impact of earlier data gradually decreases, enhancing the real-time and dynamic adaptability of the assessment. B(t,x) combines a variety of data provided by traffic cameras (such as vehicle speed, lane occupancy, and traffic flow). The normalization factor eliminates the dimensional differences of different data types, so that all data have a consistent scale in the comprehensive score, ensuring the rationality of the assessment results. The logarithmic function smoothes the changes in vehicle flow data, avoids the impact of extreme values on the assessment results, enhances the stability of the data, and better reflects the impact of traffic conditions on risks.
[0139] Through the comprehensive risk scoring formula, sensor data, time decay, anomaly scores and traffic camera data are organically combined to achieve multi-dimensional and multi-level data fusion and analysis. The standardized processing of sensor data and the introduction of time decay factors enable the formula to dynamically adapt to data changes in different time periods and reflect environmental changes in the tunnel in real time. The probability density function of the comprehensive anomaly score further quantifies the severity of the abnormal situation, accumulates data changes over a period of time by time integration, and provides a more comprehensive risk assessment result. The introduction of traffic camera data, through standardization and logic function processing, accurately reflects the real-time traffic flow and road occupancy, ensures the comprehensiveness and accuracy of risk assessment, and can accurately judge whether a vehicle is suitable for passage, providing strong decision-making support for tunnel management and evaluating the smoothness and safety of traffic.
[0140] Preferably, setting a machine learning model prediction risk threshold to determine the tunnel passage risk includes:
[0141] Collect historical comprehensive risk score R(t,x) data and its corresponding abnormal and normal labels, record risk scores in different time periods and under different conditions, construct a data set and divide it into a training set and a test set;
[0142] Build a support vector machine model based on the Scikit-learn library environment, select the radial basis function kernel, and use the training set data to train the support vector machine model. Update and confirm the adjustment parameters and use the training set to verify the model.
[0143] Using the mean and standard deviation of the combined risk scores of normal and abnormal labels in the test set, determine the initial threshold using the 95th percentile, calculate the prediction error in the test set and confirm the final risk threshold D;
[0144] When the calculated R(t,x) is greater than or equal to the risk threshold D, it is determined that the tunnel passage risk is high.
[0145] Through the support vector machine model and error analysis, the threshold T can be accurately adjusted to improve the accuracy and reliability of risk assessment. It can also dynamically adapt to data changes in different time periods and environments, improve the adaptability of threshold setting, ensure the scientificity and rationality of threshold setting, enhance the engineering application value of risk assessment, provide effective decision-making support for tunnel management, ensure smooth and safe traffic, and improve management efficiency.
[0146] S3, based on the tunnel traffic risk assessment, a traffic risk warning is issued in the tunnel;
[0147] Furthermore, based on the tunnel traffic risk assessment, a traffic risk warning is issued in the tunnel, including:
[0148] When it is determined that the tunnel passage risk is high, the controller controls the LED warning screens at the tunnel entrance and inside the tunnel to display warning information;
[0149] The controller controls the traffic lights at the tunnel entrance and exit and inside the tunnel to turn red, giving risk warnings to drivers;
[0150] The controller controls the speaker to remind the driver that there is a risk of passing ahead, and recommends slowing down or stopping;
[0151] The information that determines the tunnel has a greater risk of passage is uploaded to the cloud server for data backup.
[0152] Through real-time monitoring and risk assessment systems, tunnel traffic risks can be identified at the first time, and warnings can be issued in time to prevent accidents. Combining multiple warning methods such as vision, sound, signs and intelligent lighting, the warning effect is improved to ensure that drivers can obtain risk information in a timely manner, provide comprehensive risk information and safety guidance, optimize traffic flow, reduce traffic congestion and accidents, and ensure that when the risk of tunnel traffic is high, they can respond quickly to ensure the safety of vehicles and personnel.
[0153] Example 2
[0154] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0155] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0156] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0157] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0158] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for predicting risks in tunnels based on sensor data analysis, characterized in that: include, Based on the tunnel layout sensors, tunnel data collection is carried out, the tunnel data collected by sensors is analyzed for comprehensive anomaly scoring, and the machine learning model prediction optimization threshold is set to determine tunnel anomalies; Based on the determination of tunnel anomalies, the tunnel traffic conditions are monitored and analyzed through traffic cameras. Combined with the comprehensive anomaly score, a comprehensive risk assessment of the tunnel is conducted, and the machine learning model is set to predict the risk threshold to determine the tunnel traffic risk. Based on the tunnel traffic risk assessment, a traffic risk warning is issued in the tunnel.
2. The method for predicting risks in a tunnel based on sensor data analysis according to claim 1, characterized in that: The method of collecting tunnel data based on the arrangement of sensors in the tunnel includes: Arrange sensor modules based on the internal structure of the tunnel, including temperature sensors, humidity sensors, gas sensors, vibration sensors and displacement sensors, to collect tunnel data; The sensor's layout is determined based on the length of the tunnel and the sensor's detection range. The sensor transmits the collected tunnel data to the cloud server via a wireless network.
3. The method for predicting risks in a tunnel based on sensor data analysis according to claim 2, characterized in that: The analysis sensor collects data for comprehensive anomaly scoring, including: The collected data of the sensor is analyzed and a comprehensive abnormality score is given, which is expressed as: m j (t)=α·S j (t,x)+(1-a)·μ j (t-1); Where A(t,x) represents the comprehensive anomaly score at time t and location x, S j (t,x) represents the tunnel data measurement value of the jth sensor at time t and position x, μ j (t) and σ j (t) represents the sliding mean and sliding standard deviation of the j-th sensor tunnel data measurement value, w j represents the weight of the jth sensor, N represents the total number of sensors, α represents the sliding average coefficient, μ j (t-1) and σ j (t-1) represents the sliding mean and sliding standard deviation of the j-th sensor at time t-1; Use the cross-validation method to update α within the candidate value range determined based on historical data, and select the α value with the smallest average error as the optimal sliding average coefficient; For each sensor j, the variance of its measured value is calculated, and the inverse of the variance is calculated and normalized to be defined as the weight w j ; Using the newly acquired sensor data, calculate the comprehensive anomaly score A(t,x).
4. The method for predicting risks in a tunnel based on sensor data analysis according to claim 3, characterized in that: The setting of the machine learning model prediction optimization threshold to determine tunnel abnormality includes: Collect historical data, calculate the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), select a 95% confidence interval based on the distribution of the comprehensive anomaly score, and set the k value based on the range of the z score of the standard normal distribution of 1.645; According to the selected confidence interval, the optimized threshold T is calculated and expressed as: T=μ A +k·s A ; where μ A and σ A They represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), k represents the adjustment coefficient, and T represents the optimization threshold; If A(t,x) calculated by the newly collected sensor data is greater than or equal to the optimization threshold T, the tunnel is judged to be abnormal.
5. The method for predicting risks in a tunnel based on sensor data analysis according to claim 4, characterized in that: The above-mentioned method of monitoring and analyzing the tunnel traffic conditions through traffic cameras according to the determination of tunnel abnormalities includes: When determining tunnel anomalies, obtain tunnel traffic camera monitoring data including lane occupancy, vehicle speed, and traffic flow data; According to the monitoring data, the speed data and lane occupancy data in each traffic camera monitoring data are Z-score standardized, which are expressed as: Where V i (t,x) represents the vehicle speed monitored by the i-th camera at time t and position x, O i (t,x) represents the lane occupancy rate monitored by the i-th camera at time t and position x, and They represent the historical mean and historical standard deviation of the vehicle speed monitored by the i-th camera, and They represent the historical mean and historical standard deviation of the lane occupancy rate monitored by the i-th camera, Represents the normalized vehicle speed data, represents normalized lane occupancy data; The traffic flow data is used as the adjustment factor, expressed as: Among them, F i (t,x) represents the adjustment factor of traffic flow, S i (t,x) represents the traffic flow monitored by the i-th camera at time t and location x, γ and θ represent the sensitivity coefficient and threshold for adjusting the traffic flow score; Calculate the historical mean μ of traffic flow data S Set as the threshold θ of the traffic flow score, and select an appropriate coefficient k based on historical experience to balance the sensitivity γ of the traffic flow score; The standardized vehicle speed data and lane occupancy rate data are summed and averaged, expressed as: Among them I k (t,x) represents the comprehensive eigenvalue, M represents the total number of traffic cameras; The cumulative effect of the time integral of the comprehensive characteristic value is analyzed and normalized to define the tunnel traffic score, which is expressed as: Among them C k (t,x) represents the tunnel passability score of the kth camera at time t and position x, λ k represents the normalization factor of the tunnel traffic score, T represents the consideration time, and dτ represents the integration operation at each time point τ.
6. The method for predicting risks in a tunnel based on sensor data analysis according to claim 5, characterized in that: The above-mentioned comprehensive risk assessment of the tunnel is carried out by combining the comprehensive abnormality score. include, Get tunnel pass rating C k (t,x) is combined with the comprehensive abnormality score A to analyze the tunnel passage risk, which is expressed as: Where B(t,x) represents the tunnel passage risk score, γ k represents the normalization factor of traffic camera data, S k (t,x) represents the traffic flow monitored by the kth camera at time t and location x; Based on the sensor measurement values, the square sum of the standardized values is calculated and the average is obtained to comprehensively determine the traffic flow changes at each time point, which is expressed as: where μ j and σ j They represent the historical mean and standard deviation of the jth sensor at time τ and position x, respectively. M(τ,x) represents the degree of change in traffic flow at each time point. N represents the total number of sensors. S j (τ,x) represents the traffic volume monitored by the jth camera at time τ and position x; Calculate the probability density of the comprehensive anomaly score A(t,x), expressed as: Where G(τ,x) represents the probability density of the comprehensive anomaly score, μ A and σ A They represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x) respectively; A comprehensive risk assessment of the traffic conditions in the tunnel is performed, expressed as: Where R(t,x) represents the comprehensive risk score.
7. The method for predicting risks in a tunnel based on sensor data analysis according to claim 6, characterized in that: The setting of the machine learning model prediction risk threshold to determine the tunnel passage risk includes: Collect historical comprehensive risk score R(t,x) data and its corresponding abnormal and normal labels, record risk scores in different time periods and under different conditions, construct a data set and divide it into a training set and a test set; Build a support vector machine model based on the Scikit-learn library environment, select the radial basis function kernel, and use the training set data to train the support vector machine model. Update and confirm the adjustment parameters and use the training set to verify the model. Using the mean and standard deviation of the combined risk scores of normal and abnormal labels in the test set, determine the initial threshold using the 95th percentile, calculate the prediction error in the test set and confirm the final risk threshold D; When the calculated R(t,x) is greater than or equal to the risk threshold D, it is determined that the tunnel passage risk is high.
8. The method for predicting risks in a tunnel based on sensor data analysis according to claim 7, characterized in that: The method of issuing a tunnel risk warning based on tunnel traffic risk determination includes: When it is determined that the tunnel passage risk is high, the controller controls the LED warning screens at the tunnel entrance and inside the tunnel to display warning information; The controller controls the traffic lights at the tunnel entrance and exit and inside the tunnel to turn red, giving risk warnings to drivers; The controller controls the speaker to remind the driver that there is a risk of passing ahead, and recommends slowing down or stopping; The information that determines the tunnel has a greater risk of passage is uploaded to the cloud server for data backup.
9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, the steps of the tunnel risk prediction method based on sensor data analysis described in any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting risks in a tunnel based on sensor data analysis according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Tunnel accident risk assessment method, system and equipment
CN118014349A
Traffic surveillance detection system in a tunnel
KR1020110081636A
KR20230091400A
Cited By
Threshold management method and system based on financial risk
CN119273364A
Shield tunneling machine abnormal data detection method and system based on weighted adaptive variable coefficient
CN119807950A
Shield machine abnormal data detection method and system based on weighted adaptive coefficient of variation
CN119807950B
Train operation anomaly detection method based on multiple data
CN120462483A
Tunnel traffic risk prediction method and system based on multi-source data
CN120598137A
