A tunnel risk prediction method based on sensor data analysis
By arranging multiple sensors in the tunnel and using traffic cameras to monitor data, and combining machine learning models for risk assessment, the problem of multi-dimensional data comprehensive analysis of tunnel risk prediction in the existing technology is solved, efficient evaluation and early warning of risks in the tunnel is achieved, and the effectiveness of tunnel safety management is ensured.
Patent Information
- Application Number
- CN202410967588.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2044-07-18
AI Technical Summary
The prior art 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 collected data in the tunnel, lacking a comprehensive assessment of the overall traffic situation of the tunnel, affecting the effectiveness of tunnel safety management.
By arranging a variety of sensors (such as temperature, humidity, gas, vibration and displacement sensors) in the tunnel for data acquisition, combining traffic camera monitoring data, using machine learning models for data analysis and risk assessment, dynamically adjusting thresholds to determine tunnel abnormalities and pass risks, and issuing pass risk warnings.
It realizes efficient abnormality detection and risk assessment of multi-dimensional data in the tunnel. Through multi-level data fusion and analysis, the comprehensiveness and accuracy of risk assessment are ensured, and strong decision-making support is provided for tunnel management and risk warning, ensuring the safety of vehicles and personnel.
Smart Images

Figure CN118981718B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tunnel risk prediction, and particularly to a tunnel risk prediction method based on sensor data analysis. Background Art
[0002] Traditional tunnel monitoring mainly relies on manual inspections and simple monitoring with fixed sensors. Although it can detect and prevent potential risks to a certain extent, there are obvious deficiencies in 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 tunnel environment can be processed and analyzed, improving automation and intelligence;
[0003] Although the existing technology has made significant progress in traffic camera data collection and preliminary analysis, it is inconvenient to conduct comprehensive analysis for tunnel risk prediction based on the acquisition of multi-dimensional data, and it is difficult to dynamically adjust according to real-time data, resulting in limitations in the accuracy and flexibility of risk assessment. For the application of traffic camera data, it mostly stays at the simple traffic flow monitoring level, fails to effectively integrate with the data collected in the tunnel, lacks a comprehensive assessment of the overall traffic situation in the tunnel, and affects the effectiveness of tunnel safety management. Summary of the Invention
[0004] In view of the problems existing in the above-mentioned existing tunnel risk prediction method based on sensor data analysis, the present invention is proposed.
[0005] Therefore, the problems to be solved by the present invention are inconvenient for comprehensive analysis based on the acquisition of multi-dimensional data, difficult to dynamically adjust according to real-time data, resulting in limitations in the accuracy and flexibility of risk assessment. For the application of traffic camera data, it mostly stays at the simple traffic flow monitoring level, fails to effectively integrate with the data collected in the tunnel, lacks a comprehensive assessment of the overall traffic situation in the tunnel, and affects the effectiveness of tunnel safety management.
[0006] To solve the above technical problems, the present invention provides the following technical solution: A tunnel risk prediction method based on sensor data analysis, which includes,
[0007] Sensors are arranged based on the tunnel to collect tunnel data, the tunnel data collected by the sensors is analyzed to obtain a comprehensive anomaly score, a prediction optimization threshold of a machine learning model is set, and tunnel anomalies are determined;
[0008] According to the determination of tunnel anomalies, the traffic situation in the tunnel is monitored and analyzed through traffic cameras, combined with the comprehensive anomaly score, a comprehensive risk assessment of the tunnel is carried out, a prediction risk threshold of a machine learning model is set, and the tunnel traffic risk is determined;
[0009] Based on the determination of the tunnel traffic risk, a traffic risk warning is issued in the tunnel.
[0010] As a preferred embodiment of the tunnel risk prediction method based on sensor data analysis according to the present invention, wherein: arranging sensors based on the tunnel to collect tunnel data, including,
[0011] Arranging 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] According to the length of the tunnel and the detection range of the sensors, determine the arrangement positions of the sensors, and the sensors transmit the collected tunnel data to the cloud server through a wireless network.
[0013] As a preferred embodiment of the tunnel risk prediction method based on sensor data analysis according to the present invention, wherein: analyzing the data collected by the sensors to perform a comprehensive anomaly score, including,
[0014] Analyze the data collected by the sensors and perform a comprehensive anomaly score, expressed as:
[0015]
[0016] Where A(t,x) represents the comprehensive anomaly score at time t and position x, represents the tunnel data measurement value of the jth sensor at time t and position x, μ j (t) and σ j (t) respectively represent the moving average and moving standard deviation of the tunnel data measurement values of the jth sensor, w j represents the weight of the jth sensor, N represents the total number of sensors, α represents the moving average coefficient, μ j (t - 1) and σ j (t - 1) respectively represent the moving average and moving standard deviation of the jth sensor at time t - 1;
[0017] Use the cross - validation method to update α within the range of candidate values determined based on historical data, and select the α value with the minimum average error as the optimal moving average coefficient;
[0018] For each sensor j, calculate the variance of its measurement value, calculate the reciprocal of the variance and perform normalization processing, and define it as the weight w j ;
[0019] Use the newly collected sensor data to calculate the comprehensive anomaly score A(t,x).
[0020] As a preferred embodiment of the tunnel risk prediction method based on sensor data analysis according to the present invention, wherein: setting a machine learning model prediction optimization threshold to determine tunnel anomalies, including,
[0021] Collect historical data, calculate the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), select a 95% confidence interval according to the distribution of the comprehensive anomaly score, and set k based on the range of the z-score of 1.645 for the standard normal distribution t value;
[0022] Calculate the optimization threshold T according to the selected confidence interval w , expressed as:
[0023] T w = μ A + k t ·σ A ;
[0024] where μ A and σ A respectively represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), k t represents the adjustment coefficient, and T w represents the optimization threshold;
[0025] If A(t,x) calculated from newly collected sensor data is greater than or equal to the optimization threshold T w , it is determined that the tunnel is abnormal.
[0026] As a preferred solution of the tunnel risk prediction method based on sensor data analysis according to the present invention, wherein: according to the determination of tunnel abnormality, the tunnel traffic conditions are monitored and analyzed through traffic cameras, including
[0027] When it is determined that the tunnel is abnormal, obtaining the tunnel traffic camera monitoring data includes lane occupancy rate, vehicle speed, and traffic flow data;
[0028] According to the monitoring data, the vehicle speed data and lane occupancy rate data in each traffic camera monitoring data are respectively subjected to Z-score standardization, which are respectively expressed as:
[0029]
[0030] where V k (t,x) represents the vehicle speed monitored by the kth camera at time t and position x, and O k (t,x) represents the lane occupancy rate monitored by the kth camera at time t and position x, and respectively represent the historical mean and historical standard deviation of the vehicle speed monitored by the kth camera, and respectively represent the historical mean and historical standard deviation of the lane occupancy rate monitored by the kth camera, represents the standardized vehicle speed data, Represents the standardized lane occupancy data;
[0031] Taking the traffic flow data as an adjustment factor, which is expressed as:
[0032]
[0033] Among them, F k (t,x) represents the adjustment factor of traffic flow, and S k (t,x) represents the traffic flow monitored by the k-th camera at time t and position x, and γ and θ represent the sensitivity coefficient and threshold for adjusting the traffic flow score;
[0034] Calculating the historical mean μ of the traffic flow data S Let it be the threshold θ of the traffic flow score, and select an appropriate coefficient k based on historical experience w to balance the sensitivity γ of the traffic flow score;
[0035] Performing a summation average process according to the standardized vehicle speed data and lane occupancy data,, which is expressed as:
[0036]
[0037] Among them, I k (t,x) represents the comprehensive eigenvalue, and M represents the total number of traffic cameras;
[0038] Analyzing the cumulative effect of the time integral of the comprehensive eigenvalue for normalization processing to define the tunnel passage score, which is expressed as:
[0039]
[0040] Among them, C k (t,x) represents the tunnel passage score of the k-th camera at time t and position x, and λ k represents the normalization factor of the tunnel passage score, T represents the considered time, and dt represents the integration operation at each time point t.
[0041] As a preferred scheme of the tunnel risk prediction method based on sensor data analysis described in the present invention, wherein: combining the comprehensive anomaly score to perform a comprehensive risk assessment on the tunnel, including,
[0042] Obtaining the tunnel passage score C k (t,x) Combining the comprehensive anomaly score A to analyze the tunnel passage risk, which is expressed as:
[0043]
[0044] Among them, B(t,x) represents the tunnel passage risk score, and γ k represents the normalization factor of the traffic camera data, Sk (t, x) represents the traffic flow monitored by the k-th camera at time t and position x;
[0045] Calculate the sum of squares of standardized values based on sensor measurement values and find the mean value to comprehensively determine the degree of change of tunnel data at each time point, expressed as:
[0046]
[0047] where μ j (t) and σ j (t) respectively represent the moving average and moving standard deviation of the tunnel data measurement values of the j-th sensor at time t and position x, M(t, x) represents the degree of change of tunnel data at each time point, N represents the total number of sensors, represents the tunnel data measurement value monitored by the j-th sensor at time t and position x;
[0048] Calculate the probability density of the comprehensive anomaly score A(t, x), expressed as:
[0049]
[0050] where G(t, x) represents the probability density of the comprehensive anomaly score, μ A and σ A respectively represent the mean value and standard deviation of the historical comprehensive anomaly score A'(t, x);
[0051] Conduct a comprehensive risk assessment of the traffic conditions in the tunnel, expressed as:
[0052]
[0053] where R(t, x) represents the comprehensive risk score.
[0054] As a preferred solution of the method for predicting risks in a tunnel based on sensor data analysis according to the present invention, wherein: setting a machine learning model to predict a risk threshold and determine the tunnel traffic risk includes,
[0055] Collect historical comprehensive risk score R(t, x) data and their corresponding abnormal and normal labels, record the risk scores under different time periods and different conditions, form a data set and divide it into a training set and a test set;
[0056] 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 adjusted parameters and then use the training set to verify the model;
[0057] Using the mean and standard deviation of the comprehensive risk scores of the normal and abnormal tags in the test set, determining the initial threshold using the 95th percentile, calculating the prediction error in the test set, and confirming the final risk threshold D;
[0058] 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.
[0059] As a preferred solution of the tunnel risk prediction method based on sensor data analysis according to the present invention, wherein: based on the determination of the tunnel passage risk, a passage risk warning is issued in the tunnel, including,
[0060] When it is determined that the tunnel passage risk is high, the controller is used to control the LED warning screens at the tunnel entrance and inside the tunnel to display warning information;
[0061] The controller is used to control the traffic lights at the tunnel entrance and exit and inside the tunnel to turn red to give a risk warning to the driving vehicles;
[0062] The controller is used to control the speaker to prompt the driver that there is a passage risk ahead and to suggest decelerating or stopping;
[0063] The information indicating that the tunnel passage risk is high is uploaded to the cloud server for data backup.
[0064] A computer device, comprising: a memory and a processor; the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned tunnel risk prediction method based on sensor data analysis are implemented.
[0065] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned tunnel risk prediction method based on sensor data analysis are implemented.
[0066] The beneficial effects of the present invention are as follows: by comprehensively integrating the eigenvalue of each sensor in a weighted summation manner and dynamically adjusting the threshold in cooperation with the machine learning model, the multi-dimensional sensing data is maintained with high-efficiency anomaly detection ability. By comprehensively evaluating the traffic conditions through the monitoring data of traffic cameras and combining the sensor data, multi-level data fusion and analysis are realized, reflecting the environmental changes in the tunnel, ensuring the comprehensiveness and accuracy of risk assessment, providing strong decision-making support for tunnel management and risk warning, and enabling the warning measures based on risk warning to respond quickly to ensure the safety of vehicles and personnel. Description of the Drawings
[0067] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0068] Figure 1 It is a schematic flowchart of a tunnel risk prediction method based on sensor data analysis.
[0069] Figure 2 It is a schematic flowchart of the tunnel anomaly analysis of the tunnel risk prediction method based on sensor data analysis.
[0070] Figure 3 It is a schematic flowchart of the comprehensive risk assessment of the tunnel risk prediction method based on sensor data analysis. Specific Embodiments
[0071] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the specific embodiments of the present invention in detail with reference to the drawings of the specification.
[0072] In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0073] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation of the present invention. The "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it an embodiment that is separate or selectively mutually exclusive with other embodiments.
[0074] Embodiment 1
[0075] Referring to Figure 1 、 Figure 2 and Figure 3 , it is the first embodiment of the present invention. This embodiment provides a tunnel risk prediction method based on sensor data analysis. The tunnel risk prediction method based on sensor data analysis includes
[0076] S1. Arrange sensors based on the tunnel, collect tunnel data, analyze the tunnel data collected by the sensors for comprehensive anomaly scoring, set the prediction optimization threshold of the machine learning model, and determine tunnel anomalies.
[0077] Preferably, arranging sensors based on the tunnel and collecting tunnel data includes
[0078] 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;
[0079] Determine the arrangement positions of the sensors according to the length of the tunnel and the detection ranges of the sensors. The sensors transmit the collected tunnel data to the cloud server through a wireless network.
[0080] Through the arrangement of multiple sensors, comprehensive monitoring of the tunnel environment, traffic, and structural conditions is achieved to ensure tunnel safety. Through the wireless network, real-time transmission and processing of data are realized, enabling timely detection and response to abnormal situations in the tunnel, improving the timeliness of risk assessment, providing a centralized management platform, facilitating tunnel management personnel to monitor and analyze data, improving management efficiency, and ensuring no monitoring blind spots inside the tunnel and achieving full coverage by reasonably arranging sensor positions and determining detection ranges.
[0081] Furthermore, analyze the data collected by the sensors to conduct a comprehensive anomaly score, including,
[0082] Analyze the data collected by the sensors and conduct a comprehensive anomaly score, expressed as:
[0083]
[0084] where A(t,x) represents the comprehensive anomaly score at time t and position x, represents the tunnel data measurement value of the j-th sensor at time t and position x, μ j (t) and σ j (t) respectively represent the moving average and moving standard deviation of the tunnel data measurement values of the j-th sensor, w j represents the weight of the j-th sensor, N represents the total number of sensors, α represents the moving average coefficient, μ j (t - 1) and σ j (t - 1) respectively represent the moving average and moving standard deviation of the j-th sensor at time t - 1;
[0085] Use the cross-validation method to update α within the range of candidate values determined based on historical data, and select the α value with the minimum average error as the optimal moving average coefficient;
[0086] For each sensor j, calculate the variance of its measurement value, expressed as:
[0087]
[0088] where represents the variance of the data of the j-th sensor, μ jrepresents the mean of the j-th sensor data, and T represents the total number of observation times;
[0089] The reciprocal of the variance is calculated and normalized, and then defined as the weight w j ;
[0090] Using the newly collected sensor data, calculate the comprehensive anomaly score A(t, x).
[0091] By calculating the moving mean and moving standard deviation, the short-term fluctuations in the sensor data can be smoothed, the influence of noise can be reduced, and it can be ensured that the eigenvalue changes significantly when an accident occurs, reflecting the changes in the sensor data in real time, ensuring the timeliness of anomaly detection. By standardization, the influence of different sensor data ranges is eliminated, making the data of different sensors more comparable and improving the robustness of detection. The assignment of the weight w j makes the data of important sensors have a greater impact on the anomaly score, improving the accuracy of anomaly detection. By summing the eigenvalues of each sensor in a weighted manner, a comprehensive anomaly score is generated, providing a basis for subsequent anomaly judgment and making the anomaly detection results more accurate and reliable.
[0092] Furthermore, set the prediction optimization threshold of the machine learning model to determine tunnel anomalies, including
[0093] Collect historical data, calculate the mean and standard deviation of the historical comprehensive anomaly score A'(t, x), select the 95% confidence interval according to the distribution of the comprehensive anomaly score, and set the k t value based on the range where the z-score of the standard normal distribution is 1.645;
[0094] According to the selected confidence interval, calculate the optimization threshold T w , expressed as:
[0095] T w = μ A + k t · σ A ;
[0096] where μ A and σ A represent the mean and standard deviation of the historical comprehensive anomaly score A'(t, x) respectively, k t represents the adjustment coefficient, and T w represents the optimization threshold;
[0097] If A(t, x) calculated by the newly collected sensor data is greater than or equal to the optimization threshold T w , then it is judged that the tunnel is abnormal.
[0098] Through k tValue, which can scientifically and reasonably determine the optimization threshold T w , ensuring the accuracy of risk assessment, and dynamically adjusting the optimization threshold T according to the actual distribution of data w , which can improve the flexibility and adaptability of risk assessment. The threshold method set by this method is simple and easy to implement, applicable to different data scenarios, can make full use of existing data resources, ensure the rationality and reliability of the assessment results, is easy to understand and interpret, and improves the transparency and credibility of the method.
[0099] S2. According to the determination of tunnel anomalies, monitor and analyze the tunnel traffic conditions through traffic cameras, and combine the comprehensive anomaly score to conduct a comprehensive risk assessment of the tunnel, set a machine learning model to predict the risk threshold, and determine the tunnel traffic risk;
[0100] Preferably, according to the determination of tunnel anomalies, monitor and analyze the tunnel traffic conditions through traffic cameras, including
[0101] When determining tunnel anomalies, obtain the tunnel traffic camera monitoring data including lane occupancy rate, vehicle speed and traffic flow data;
[0102] According to the monitoring data, perform Z-score standardization on the vehicle speed data and lane occupancy rate data in each traffic camera monitoring data respectively, and are expressed as:
[0103]
[0104] Where V k (t,x) represents the vehicle speed monitored by the kth camera at time t and position x, and O k (t,x) represents the lane occupancy rate monitored by the kth camera at time t and position x and respectively represent the historical mean and historical standard deviation of the vehicle speed monitored by the kth camera, and respectively represent the historical mean and historical standard deviation of the lane occupancy rate monitored by the kth camera, represents the standardized vehicle speed data, represents the standardized lane occupancy rate data;
[0105] Take the traffic flow data as an adjustment factor, and express it as:
[0106]
[0107] Where F k (t,x) represents the adjustment factor of traffic flow, and S k (t,x) represents the traffic flow monitored by the kth camera at time t and position x, and γ and θ represent the sensitivity coefficient and threshold for adjusting the traffic flow score;
[0108] Calculate the historical mean μ of the traffic flow data S Set it as the threshold θ of the traffic flow score, and select an appropriate coefficient k based on historical experience w To balance the sensitivity γ of the traffic flow score, expressed as:
[0109]
[0110] The normalization factor λ of the tunnel passage score k Calculated through the historical mean and standard deviation of the camera data, expressed as:
[0111]
[0112] Where and respectively represent the historical mean and standard deviation of the vehicle speed data of the k-th camera, and respectively represent the historical mean and standard deviation of the lane occupancy data of the k-th camera;
[0113] Perform a summation average process based on the standardized vehicle speed data and lane occupancy data, expressed as:
[0114]
[0115] Where I k (t,x) represents the comprehensive eigenvalue, and M represents the total number of traffic cameras;
[0116] Analyze the cumulative effect of the time integral of the comprehensive eigenvalue for normalization processing to define the tunnel passage score, expressed as:
[0117]
[0118] Where C k (t,x) represents the tunnel passage score of the k-th camera at time t and position x, λ k represents the normalization factor of the tunnel passage score, T represents the considered time, and dt represents the integration operation at each time point t;
[0119] The formula takes into account the cumulative effect of data through time integration, enabling the score to reflect the comprehensive situation over a period of time rather than relying solely on data at a single moment. By normalizing the eigenvalues, the influence of the data ranges of different sensors is eliminated, enhancing the comparability of data from different sensors. The normalized data reflects the degree of deviation of sensor data from the historical mean, facilitating the identification of abnormal situations. The traffic flow adjustment factor converts traffic flow data into values between 0 and 1, making the data smoother and more stable. By averaging the data from L traffic cameras, it ensures that the data from all cameras have equal weight in the scoring, avoiding the excessive influence of the data from a single camera on the scoring result.
[0120] By integrating various traffic camera monitoring data such as vehicle speed, lane occupancy, and traffic flow, data fusion and analysis are carried out from multiple dimensions. Through normalization processing and time integration calculation, it provides detailed information on the changes in sensor status. The traffic camera data scoring part combines vehicle speed, lane occupancy, and traffic flow and uses a logical function for adjustment, which can accurately reflect traffic mobility and congestion, and can reflect the changing trend of traffic conditions in the tunnel in real time. The time decay factor ensures the reasonable influence of historical data on the current risk assessment, preventing the interference of outdated data on the assessment result, ensuring the timeliness and accuracy of the assessment result, and enabling a comprehensive, dynamic, real-time, and efficient risk assessment of the traffic conditions in the tunnel, providing strong decision-making support for tunnel management and ensuring the smoothness and safety of traffic in the tunnel.
[0121] Furthermore, combining the comprehensive anomaly score, a comprehensive risk assessment of the tunnel is carried out, including
[0122] Obtain the tunnel passage score C k (t,x) Analyze the tunnel passage risk in combination with the comprehensive anomaly score A, expressed as:
[0123]
[0124] where B(t,x) represents the tunnel passage risk score, and γ k represents the normalization factor of traffic camera data, and S k (t,x) represents the traffic flow monitored by the k-th camera at time t and location x;
[0125] Calculate the sum of the squares of the normalized values based on the sensor measurement values and find the mean to comprehensively determine the degree of change in tunnel data at each time point, expressed as:
[0126]
[0127] where μ j (t) and σ jThe moving average and moving standard deviation of the tunnel data measurement values of the j-th sensor at position x at time t are denoted as (t) respectively, M(t, x) represents the degree of change of the tunnel data at each time point, and N represents the total number of sensors. Denotes the tunnel data measurement value monitored by the j-th sensor at position x at time t;
[0128] Calculate the probability density of the comprehensive anomaly score A(t, x), which is expressed as:
[0129]
[0130] where G(t, x) represents the probability density of the comprehensive anomaly score, μ A and σ A respectively represent the mean and standard deviation of the historical comprehensive anomaly score A'(t, x);
[0131] Conduct a comprehensive risk assessment of the traffic conditions in the tunnel, which is expressed as:
[0132]
[0133] where R(t, x) represents the comprehensive risk score;
[0134] By using the probability density function of the Gaussian distribution to evaluate the normalized value of the comprehensive anomaly score A(t, x), it reflects the severity of the current abnormal situation in the tunnel. By standardizing the sensor data processing, the influence of different sensor data ranges is eliminated, making the data of different sensors comparable. By integrating to calculate the standardized change of the sensor data over a period of time and considering the time decay factor e -λτ , it reflects the cumulative impact of the 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 various data provided by traffic cameras (such as vehicle speed, lane occupancy rate, and traffic flow). By using a normalization factor, the dimensional differences of different data types are eliminated, making all data have a consistent scale in the comprehensive score and ensuring the rationality of the assessment results. By using a logarithmic function to smooth the changes in the vehicle flow data, the influence of extreme values on the assessment results is avoided, enhancing the stability of the data and better reflecting the impact of traffic conditions on the risk.
[0135] 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 the time decay factor enable the formula to dynamically adapt to data changes in different time periods and reflect the environmental changes in the tunnel in real time. The probability density function of the comprehensive anomaly score further quantifies the severity of abnormal situations. By integrating data changes over a period of time through time integration, a more comprehensive risk assessment result is provided. The introduction of traffic camera data, through standardization and logical function processing, accurately reflects the real-time traffic flow and road occupancy, ensuring the comprehensiveness and accuracy of risk assessment, being able to 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.
[0136] Preferably, a machine learning model is set to predict the risk threshold and determine the tunnel passage risk, including
[0137] Collect historical comprehensive risk score R(t,x) data and their corresponding abnormal and normal labels, record the risk scores under different time periods and different conditions, form a data set and divide it into a training set and a test set;
[0138] Based on the Scikit-learn library environment, a support vector machine model is constructed, the radial basis function kernel is selected, and the support vector machine model is trained using the training set data. After updating and confirming the adjusted parameters, the training set is used to verify the model;
[0139] Use the mean and standard deviation of the comprehensive risk scores of the 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;
[0140] 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.
[0141] Through the support vector machine model and error analysis, the threshold T can be accurately adjusted, improving the accuracy and reliability of risk assessment, and being able to dynamically adapt to data changes in different time periods and different environments, improving the adaptability of threshold setting, ensuring the scientificity and rationality of threshold setting, enhancing the engineering application value of risk assessment, providing effective decision-making support for tunnel management, ensuring traffic smoothness and safety, and improving management efficiency.
[0142] S3. Based on the determination of the tunnel passage risk, a passage risk warning is issued in the tunnel;
[0143] Furthermore, based on the determination of the tunnel passage risk, a passage risk warning is issued in the tunnel, including
[0144] When it is determined that the risk of passing through the tunnel is high, the controller is used to control the LED warning screens at the tunnel entrance and inside the tunnel to display warning information;
[0145] The controller is used to control the traffic lights at the tunnel entrance and exit and inside the tunnel to turn red, warning the driving vehicles of the risk;
[0146] The controller is used to control the speaker to prompt the driver that there is a risk of passing ahead, and it is recommended to slow down or stop passing;
[0147] The information indicating that the risk of passing through the tunnel is high is uploaded to the cloud server for data backup.
[0148] Through the real-time monitoring and risk assessment system, the risk of passing through the tunnel can be identified in the first time, and warnings can be issued in time to prevent accidents. Combining various warning means such as vision, sound, signs and intelligent lighting improves the warning effect, ensures that the driver can obtain risk information in time, provides comprehensive risk information and safety guidance, optimizes the traffic flow, reduces traffic congestion and accidents, and ensures that a rapid response can be made when the risk of passing through the tunnel is relatively high, guaranteeing the safety of vehicles and personnel.
[0149] Embodiment 2
[0150] If the described function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. And the aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical discs and other various media that can store program codes.
[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definitional sequence list of executable instructions for implementing logical functions, which can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in conjunction with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0152] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.
[0153] It should be understood that the various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0154] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by 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; 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: Where A(t,x) represents the comprehensive anomaly score at time t and location 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 the sliding average coefficient within the candidate value range determined based on historical data, and select the sliding average coefficient value with the smallest average error as the optimal sliding average coefficient; For each sensor, calculate the variance of its measurement value, expressed as: 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; Calculate the inverse of the variance and normalize it to define the weight w j ; Using the newly acquired sensor data, a comprehensive anomaly score is calculated; 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 vehicle speed data and lane occupancy rate data in each traffic camera monitoring data are Z-score standardized; The traffic flow data is used as the adjustment factor, expressed as: where F k (t,x) represents the adjustment factor of traffic flow, S k (t,x) represents the traffic flow monitored by the kth 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 w To balance the sensitivity γ of the traffic flow score, it is expressed as: 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, Represents the normalized vehicle speed data, represents normalized lane occupancy data; The cumulative effect of the time integral of the comprehensive characteristic value is analyzed and normalized to define the tunnel traffic score 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 dt represents the integration operation at each time point t; The above-mentioned comprehensive risk assessment of the tunnel is carried out by combining the comprehensive anomaly score, including: The tunnel traffic score is obtained and combined with the comprehensive abnormality score A to analyze the tunnel traffic 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 degree of change of the tunnel data at each time point, which is expressed as: where μ j (t) and σ j (t) represents the sliding mean and sliding standard deviation of the tunnel data measurement value of the jth sensor at the position x at time t, M(t,x) represents the degree of change of the tunnel data at each time point, N represents the total number of sensors, represents the tunnel data measurement value monitored by the jth sensor at time t and position x; Calculate the probability density of the comprehensive anomaly score, expressed as: Where G(t,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.
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 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 k based on the range of 1.645 of the z score of the standard normal distribution. t value; According to the selected confidence interval, calculate the optimal threshold T w , expressed as: T w =μ A +k t ·s A ; where μ A and σ A They represent the mean and standard deviation of the historical comprehensive anomaly score A'(t,x), k t represents the adjustment coefficient, T w 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 w , then the tunnel is judged to be abnormal.
4. The method for predicting risks in a tunnel based on sensor data analysis according to claim 3, 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: 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 k (t,x) represents the vehicle speed monitored by the kth camera at time t and position x, O k (t,x) represents the lane occupancy rate monitored by the kth camera at time t and position x, and They represent the historical mean and historical standard deviation of the vehicle speed monitored by the kth camera, and They represent the historical mean and historical standard deviation of the lane occupancy rate monitored by the kth camera, Represents the normalized vehicle speed data, Represents normalized lane occupancy data.
5. The method for predicting risks in a tunnel based on sensor data analysis according to claim 4, 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 training set and 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.
6. The method for predicting risks in a tunnel based on sensor data analysis according to claim 5, 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 high risk of passage is uploaded to the cloud server for data backup.
7. 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 6 are implemented.
8. 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 6 are implemented.
Citation Information
Patent Citations
Tunnel accident risk assessment method, system and equipment
CN118014349A
KR20230091400A