CN115240428B - Tunnel operation abnormality detection method and device, electronic equipment and storage medium - Google Patents

Tunnel operation abnormality detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115240428B
CN115240428B CN202210904583.5A CN202210904583A CN115240428B CN 115240428 B CN115240428 B CN 115240428B CN 202210904583 A CN202210904583 A CN 202210904583A CN 115240428 B CN115240428 B CN 115240428B
Authority
CN
China
Prior art keywords
data
estimation model
probability estimation
abnormal
optimal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210904583.5A
Other languages
Chinese (zh)
Other versions
CN115240428A (en
Inventor
李文浩
钟方杰
郭洪雨
李长俊
郑云辉
孙飞
陆钰铨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Shuzhijiaoyuan Technology Co Ltd
Original Assignee
Zhejiang Shuzhijiaoyuan Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Shuzhijiaoyuan Technology Co Ltd filed Critical Zhejiang Shuzhijiaoyuan Technology Co Ltd
Priority to CN202210904583.5A priority Critical patent/CN115240428B/en
Publication of CN115240428A publication Critical patent/CN115240428A/en
Application granted granted Critical
Publication of CN115240428B publication Critical patent/CN115240428B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing

Landscapes

  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The application discloses a method and a device for detecting tunnel operation abnormality, electronic equipment and a storage medium, and relates to the technical field of tunnel operation and maintenance safety. The method comprises the following steps: acquiring prestored monitoring data, wherein the monitoring data is used for representing the operation state in a tunnel; after preprocessing the monitoring data, acquiring a data set conforming to Gaussian distribution; determining an improved probability estimation model and an optimal judgment threshold value based on data in the data set; and after new monitoring data is input into the improved probability estimation model, judging whether the tunnel operation is abnormal or not based on the predicted result value output by the improved probability estimation model and an optimal judgment threshold value. Therefore, the method has the advantages of quickly and accurately judging whether the tunnel operation is abnormal or not and early warning in time, and can effectively save manpower and material resources.

Description

Tunnel operation abnormality detection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of tunnel operation and maintenance security, and in particular, to a method and apparatus for detecting tunnel operation abnormality, an electronic device, and a storage medium.
Background
With the rapid promotion of the urban process, the urban traffic jam problem is also more serious, and the urban tunnel is an important ring for solving the urban jam problem. The tunnel is used as a relatively closed structure, the operation environment is very complex, traffic accidents are easy to occur, and once the accidents occur, the consequences are more serious, so that how to make the tunnel operate more safely and efficiently is an extremely important problem; in the daily operation management of tunnels, how to automatically detect abnormal conditions in tunnel operation quickly and accurately is an important research topic.
The current abnormal event detection in the tunnel operation process still stays in a more traditional mode, mainly relies on the real-time monitoring of on-site management personnel to the monitoring picture, has very big consumption to manpower and material resources, and the mode of manual monitoring is difficult to guarantee all-weather monitoring, and the omission rate is very high, can not accurately confirm the speed and the ageing of detection. Traffic event detection systems are currently used in a small number of tunnels to solve this problem, and based on fixed cameras, a frame difference method, an edge detection method, an optical flow method and a background method are generally used to monitor tunnel anomalies, wherein the background method is most used. The method requires a relatively fixed detection background, and under the condition, the algorithm cannot model through data shot by a remotely-controllable rotary cradle head camera arranged at a tunnel entrance and a tunnel exit, so that blind spots for abnormal event detection are easily caused.
Disclosure of Invention
The application aims to provide a method, a device, electronic equipment and a storage medium for detecting tunnel operation abnormality, which can rapidly and accurately judge whether the tunnel operation process is abnormal or not through monitoring data reflecting the operation condition in a tunnel and a probability estimation model established based on a Gaussian distribution principle.
Embodiments of the present application are implemented as follows:
The first aspect of the embodiment of the application provides a method for detecting tunnel operation abnormality, which comprises the following steps: acquiring prestored monitoring data, wherein the monitoring data is used for representing the operation state in a tunnel; after preprocessing the monitoring data, acquiring a data set conforming to Gaussian distribution; determining an improved probability estimation model and an optimal judgment threshold value based on data in the data set; and after new monitoring data is input into the improved probability estimation model, judging whether the tunnel operation is abnormal or not based on the predicted result value output by the improved probability estimation model and an optimal judgment threshold value.
In one embodiment, determining an improved probability estimation model and an optimal decision threshold based on data in a dataset comprises: dividing the data set into a training set, a verification set and a test set based on the type of the data in the data set; establishing a probability estimation model based on data in the training set; determining an optimal judgment threshold value based on the probability estimation model and data in the verification set; and adjusting the probability estimation model based on the optimal judgment threshold value and the data in the test set to obtain an improved probability estimation model.
In one embodiment, the types of data in the dataset include normal data and abnormal data, and the dataset is divided into a training set, a validation set and a test set based on the types of data in the dataset, including: all abnormal data in the data set are distributed to the verification set and the test set evenly; and distributing all normal data in the data set to the training set, the verification set and the test set according to a fixed proportion.
In an embodiment, the data set includes a plurality of sets of target feature data, where the target feature data is used to evaluate whether an abnormality occurs in a corresponding target feature during tunnel operation; establishing a probability estimation model based on data in the training set, comprising: based on the target feature data in the training set, calculating basic parameters for establishing probability density functions corresponding to the target features; establishing a probability density function corresponding to the target feature based on the basic parameters; and establishing a probability estimation model based on probability density functions corresponding to all the target features.
In one embodiment, determining an optimal decision threshold based on the probability estimation model and the data in the validation set includes: inputting the data in the verification set into a probability estimation model, and obtaining a simulation prediction result output by the probability estimation model; based on the simulation prediction result, a plurality of preset judgment thresholds and whether the data in the verification set are actually abnormal, calculating model quality values corresponding to the judgment thresholds; after comparing the plurality of model quality values, an optimal decision threshold is determined.
In an embodiment, the data set includes a plurality of sample data sets formed by target feature data corresponding to different target features, where the target feature data is used to evaluate whether an abnormality occurs in a corresponding target feature during tunnel operation; adjusting the probability estimation model based on the optimal decision threshold, the data in the test set, to obtain an improved probability estimation model, comprising: after a plurality of sample data sets in a test set are input into a probability estimation model, calculating an evaluation value of the probability estimation model based on a simulation prediction result output by the probability estimation model, an optimal judgment threshold value and a preset model quality judgment function; and adjusting target characteristics corresponding to the target characteristic data for establishing the probability estimation model based on the evaluation value and the abnormal target characteristic data causing the simulation prediction result error so as to acquire an improved probability estimation model.
In an embodiment, after inputting new monitoring data to the improved probability estimation model, determining whether the tunnel operation is abnormal based on the predicted result value output by the improved probability estimation model and the optimal decision threshold value includes: judging whether the value of the predicted result is smaller than an optimal judging threshold value or not; if the value of the predicted result is smaller than the optimal judgment threshold value, determining that the tunnel operation is abnormal; and if the value of the predicted result is not smaller than the optimal judgment threshold value, determining that the tunnel operation is not abnormal.
The second aspect of the present application provides a device for detecting tunnel operation abnormality, which includes: the device comprises a first acquisition module, a second acquisition module, a determination module and a judgment module; the first acquisition module is used for acquiring prestored monitoring data, wherein the monitoring data is used for representing the operation state in the tunnel; the second acquisition module is used for acquiring a data set conforming to Gaussian distribution after preprocessing the monitoring data; the determining module is used for determining an improved probability estimation model and an optimal judgment threshold value based on data in the data set; the judging module is used for judging whether the tunnel operation is abnormal or not based on the predicted result value output by the improved probability estimation model and the optimal judging threshold value after new monitoring data are input to the improved probability estimation model.
A third aspect of an embodiment of the present application provides an electronic device, including: a processor and a memory for storing processor-executable instructions; the processor is configured to execute the method for detecting the tunnel operation abnormality in the first aspect of the embodiment and any embodiment of the first aspect of the application.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program. The computer program may be executed by a processor to perform the method for detecting a tunnel operation anomaly according to the first aspect of the embodiment of the present application and any one of the embodiments thereof.
Compared with the prior art, the application has the beneficial effects that:
The method can effectively solve the problem of large consumption of manpower and material resources caused by human eye monitoring when monitoring images in real time in the traditional tunnel operation anomaly detection, and has the advantages of real-time self-learning of a diagnosis model, intelligent improvement, manpower and material resource saving and effective improvement of the speed and timeliness of tunnel operation anomaly detection.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
Fig. 2 is a flow chart of a method for detecting tunnel operation abnormality according to an embodiment of the present application;
FIG. 3 is a schematic diagram of feature engineering for data preprocessing to approximate Gaussian distribution according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of step S300 according to an embodiment of the present application;
FIG. 5 is a schematic diagram of data set partitioning according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a multivariate model according to an embodiment of the present application;
fig. 7 is a flow chart of a method for detecting tunnel operation abnormality according to an embodiment of the present application;
Fig. 8 is a schematic structural diagram of a tunnel operation abnormality detection device according to an embodiment of the present application.
Reference numerals: 1-an electronic device; 11-a processor; 12-bus; 13-memory; 600-detecting device for abnormal tunnel operation; 610-a first acquisition module; 620-a second acquisition module; 630-a determination module; 640-determination module.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
Like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
The technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device 1 according to an embodiment of the application. As shown in fig. 1, the electronic device 1 comprises at least one processor 11 and a memory 13, one processor 11 being exemplified in fig. 1. The processor 11 and the memory 13 are connected through the bus 12, and the memory 13 stores instructions executable by the at least one processor 11, the instructions being executed by the at least one processor 11 to cause the at least one processor 11 to execute a tunnel operation anomaly detection method in the following embodiment.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for detecting tunnel operation abnormality according to an embodiment of the present application. The method is performed by the electronic device 1, as shown in fig. 2, and comprises the following steps:
s100: acquiring prestored monitoring data, wherein the monitoring data is used for representing the operation state in a tunnel;
In this step, the monitoring data refers to the acquired signal data of each type of electromechanical device and the environmental monitoring data of each type of environmental monitoring data related to the tunnel operation from the data sources of each type of electromechanical device and the environmental monitoring device in the tunnel by the electronic device 1.
The monitoring data reflecting the tunnel operation state has extremely strong skewness, the tunnel abnormal condition comprises a plurality of types such as fire disaster, car accident, dangerous chemical leakage, structural loss and the like, and under the condition that the tunnel operation data is basically normal data, few or almost no abnormal data, any algorithm can not learn the rule for judging the abnormal operation condition from a small amount of monitoring data with few characteristic categories. Therefore, the application uses the comprehensive data of tunnel operation with large time span and multiple characteristic category data sources to learn the data rule of the tunnel under the normal operation condition, thereby evaluating the abnormal condition of the tunnel.
In one embodiment, the monitoring data may include operation status values and detection values (electromechanical device signal data) of various electromechanical devices such as tunnel ventilation devices, lighting devices, traffic signal devices, fire control devices, broadcasting devices, etc., and various environmental monitoring data such as CO, NO2, visibility, illuminance, wind speed, temperature, humidity, flammable and explosive gas detection, smoke concentration, electricity consumption, etc. The above-described data of each category may be regarded as each feature data for evaluating the tunnel operation state.
S200: after preprocessing the monitoring data, acquiring a data set conforming to Gaussian distribution;
referring to fig. 3, fig. 3 is a schematic diagram of feature engineering for preprocessing data to approximate gaussian distribution according to an embodiment of the present application. As shown in fig. 3, for each monitoring data of the operation feedback tunnel operation condition, the monitoring data which does not conform to the gaussian distribution needs to be preprocessed to meet the gaussian distribution, so that appropriate anomaly detection algorithm features are designed or selected in a subsequent step, and a probability estimation model is built based on the gaussian distribution principle.
In this step, since anomaly detection models operation features in a tunnel based on gaussian distribution, and distribution of feature data of some tunnel operations does not conform to gaussian distribution, feature data needs to be preprocessed to be used after approaching gaussian distribution, and common feature data processing methods include log taking, power raising, power lowering, log taking after addition and subtraction constants, and the like. After preprocessing the characteristic data (monitoring data), the electronic equipment obtains a data set composed of a plurality of characteristic data of different types with normal or abnormal operation conditions of the operation feedback tunnel.
S300: determining an improved probability estimation model and an optimal judgment threshold value based on data in the data set;
In the step, after dividing the data in the data set, the electronic device establishes, verifies and tests to obtain an improved probability estimation model and an optimal judgment threshold based on a machine learning algorithm running in the edge device in real time, wherein the algorithm mainly comprises a characteristic processing function, a parameter estimation function, a distribution density function, a judgment function and a model quality judgment function. According to the characteristics of the anomaly detection algorithm, the function composition and parameter selection of each probability estimation model are different, and the key depends on the application scene and the data characteristics.
S400, after new monitoring data is input into the improved probability estimation model, judging whether the tunnel operation is abnormal or not based on the predicted result value output by the improved probability estimation model and an optimal judgment threshold value.
In the step, after new monitoring data are acquired, calculating a predicted result value corresponding to the new monitoring data through a probability estimation model, judging whether the tunnel operation has abnormal conditions or not through a comparison result with an optimal judgment threshold epsilon, and when the tunnel operation data are in a normal condition, judging that the predicted result p (x) is more than or equal to epsilon; when the tunnel operation is abnormal, the prediction result p (x) < epsilon is predicted, and the abnormality detection system sends out early warning information and uploads the early warning information to the tunnel management room to remind the manager of paying attention to site abnormality.
In another embodiment of the present application, the electronic device may further perform the steps S100 to S300 in real time after acquiring the new monitoring data, and output, update and adjust the optimal decision threshold epsilon, the probability evaluation model M and the prediction result p (x) in real time, so as to implement real-time self-learning and intelligent improvement of the machine learning algorithm related to the probability evaluation model, thereby being beneficial to improving accuracy, timeliness and reliability of tunnel operation anomaly detection.
Referring to fig. 4, fig. 4 is a schematic flow chart illustrating a sub-process of step S300 according to an embodiment of the application. As shown in fig. 4, step S300: based on the data in the data set, determining an improved probability estimation model and an optimal decision threshold, comprising the following sub-steps:
S310: dividing the data set into a training set, a verification set and a test set based on the type of the data in the data set;
In this step, the electronic device divides the entire data set into a training set (DATASETTRAIN), a validation set (DATASETCV), and a test set (DATASETTEST). Wherein the vast majority of the data sets are normal data and typically skewed data, with very few abnormal data. When the data set is divided, all the data divided into the training set are normal data, and are used for training and establishing a model; the verification set and the test set contain partial abnormal data, and the verification set is used for super-parameter adjustment of the model after the model is established and selection of an optimal judgment threshold value so as to select the model with the best performance on the verification set; the data of the test set is used to test the model and to further refine the model based on the test results.
Referring to fig. 5, fig. 5 is a schematic diagram of data set partitioning according to an embodiment of the application. As shown in fig. 5, when the data set includes normal data and abnormal data and the data set is divided into a training set, a verification set and a test set, the electronic device will evenly distribute all abnormal data in the data set to the verification set and the test set; and distributing all normal data in the data set to the training set, the verification set and the test set according to a fixed proportion.
S320: a probabilistic estimation model is built based on the data in the training set.
The data set comprises a plurality of sample data sets formed by target feature data corresponding to different target features, when normal data in the data set is divided into a training set, the electronic equipment classifies and gathers the target feature data corresponding to each type of target feature to form a plurality of groups of target feature data in the training set, and the target feature data are used for evaluating whether the corresponding target feature in tunnel operation is abnormal or not.
Referring to fig. 6, fig. 6 is a schematic diagram of a multivariate model according to an embodiment of the application. As shown in fig. 6, the probability estimation model is composed of probability density functions corresponding to two target features. In other embodiments of the present application, the probability estimation model may be built up from a combination of probability density functions corresponding to more types of target features. The electronic equipment firstly calculates basic parameters of probability density functions of a plurality of corresponding target features through a plurality of groups of target feature data in a training set, wherein the probability density functions are feature processing functions adopting Gaussian distribution functions; the electronic equipment establishes a probability estimation model corresponding to the sample data set containing multi-category target feature data on the basis of probability density functions corresponding to the target features.
S330: and determining an optimal judgment threshold value based on the probability estimation model and the data in the verification set.
In this step, the electronic device uses the data of the verification set to verify and pick the optimal decision threshold epsilon. Specifically, the electronic device substitutes data of the verification set into the probability estimation model, calculates a corresponding simulation prediction result value p (x), and then selects an optimal judgment threshold epsilon according to the simulation prediction result value p (x), a series of preliminarily set judgment thresholds and a judgment result of whether actual data belongs to abnormal data (whether the data accords with a y value).
In one embodiment, the initially set series of decision thresholds are typically selected to have a smaller probability value, such as {0.02,0.01,0.005,0.002 … }.
S340: and adjusting the probability estimation model based on the optimal judgment threshold value and the data in the test set to obtain an improved probability estimation model.
In the step, the electronic equipment tests the probability estimation model through data in the test set, substitutes the data in the test set into the probability estimation model to obtain a simulation prediction result output by the probability estimation model, and comprehensively evaluates the quality of the probability estimation model according to the simulation prediction result, an optimal judgment threshold and whether the data are abnormal data or not.
For the sample data set with larger deviation of the output simulation prediction result and with wrong prediction result, the electronic equipment analyzes the abnormal sample data set with wrong prediction result, confirms the target characteristics in the sample data set with wrong prediction result, and generalizes new target characteristics to replace the target characteristics with wrong prediction result so as to adjust the probability estimation model and acquire the improved probability estimation model.
Referring to fig. 7, fig. 7 is a flowchart illustrating a method for detecting tunnel operation abnormality according to an embodiment of the present application. As shown in fig. 7, the method includes:
S501: acquiring prestored monitoring data, wherein the monitoring data is used for representing the operation state in a tunnel;
In this step, the monitoring data refers to various types of electromechanical device signal data and various types of environmental monitoring data, which are acquired by the electronic device 1 from various electromechanical device data sources and environmental monitoring device data sources in the tunnel and are related to tunnel operation.
The monitoring data reflecting the tunnel operation state has extremely strong skewness, the tunnel abnormal condition comprises a plurality of types such as fire disaster, car accident, dangerous chemical leakage, structural loss and the like, and under the condition that the tunnel operation data is basically normal data, few or almost no abnormal data, any algorithm can not learn the rule for judging the abnormal operation condition from a small amount of monitoring data with few characteristic categories. Therefore, the application uses the comprehensive data of tunnel operation with large time span and multiple characteristic category data sources to learn the data rule of the tunnel under the normal operation condition, thereby evaluating the abnormal condition of the tunnel. The monitoring data may include operation state values and detection values (electromechanical device signal data) of various electromechanical devices such as tunnel ventilation devices, lighting devices, traffic signal devices, fire protection devices, broadcasting devices, etc., and various environmental monitoring data such as CO, NO2, visibility, illuminance, wind speed, temperature, humidity, flammable and explosive gas detection, smoke concentration, electricity consumption, etc. The above-described data of each category may be regarded as each feature data for evaluating the tunnel operation state.
S502: after preprocessing the monitoring data, acquiring a data set conforming to Gaussian distribution;
Referring to fig. 3, fig. 3 is a schematic diagram of feature engineering for preprocessing data to approximate gaussian distribution according to an embodiment of the present application. As shown in fig. 3, for each monitoring data of the operation feedback tunnel operation condition, the monitoring data which does not conform to the gaussian distribution needs to be preprocessed to meet the gaussian distribution, so that appropriate anomaly detection algorithm features are designed or selected in a subsequent step, and a probability estimation model is built based on the gaussian distribution principle. This step is similar to step S200 described above, and please refer to step S200 for specific details.
S503: dividing the data set into a training set, a verification set and a test set based on the type of the data in the data set;
referring to fig. 5, in this step, the electronic device divides the data of the whole dataset into a training set (DATASETTRAIN), a verification set (DATASETCV) and a test set (DATASETTEST), respectively. The data set comprises a plurality of sample data sets formed by target feature data corresponding to different target features, and when normal data in the data set is divided into a training set, if certain target feature data in the sample data sets has no abnormal data, the sample data sets are abnormal. The vast majority of the data sets are normal data, and the abnormal data is very few. When the data set is divided, all the data divided into the training set are normal data, and are used for training and establishing a model; the verification set and the test set contain partial abnormal data, and the verification set is used for super-parameter adjustment and optimal judgment threshold selection after the model is established so as to select the model with the best performance on the verification set; the data of the test set is used to test the model and to further refine the model based on the test results. Normal data and abnormal data (where there is much more normal data than abnormal data) in the sample data set are distributed in different proportions to the training set, the validation set and the test set. The normal data are distributed to the training set, the verification set and the test set according to the proportion of 6:2:2, the abnormal data are distributed to the training set, the verification set and the test set according to the proportion of 0:1:1, namely, the training set is the normal data, and the abnormal data are distributed in the verification set and the test set only.
In other embodiments of the present application, the ratio of the data amount to the ratio of the abnormal data divided into the verification set and the test set may be set to other ratios according to the actual modeling requirement.
S511: based on the target feature data in the training set, basic parameters for establishing probability density functions corresponding to the target features are calculated.
In this step, when calculating the basic parameters of the probability density function corresponding to each target feature, a training set DATASETTRAIN in m×n dimensions is used to obtain a target feature data set { x n (1),…,xn (m) } corresponding to a certain target feature, where x n∈Rn is calculated by using the following formula of the parameter estimation function to obtain μ n and μ n
Mu n is the mathematical expected mean value of the probability density function corresponding to the target feature; The m is the number of the target feature data corresponding to the target feature, which is the target feature data (the data in the target feature data set { x n (1),…,xn (m) }).
Wherein,The variance of the probability density function corresponding to the target feature; /(I)The m is the number of the target feature data corresponding to the target feature, which is the target feature data (the data in the target feature data set { x n (1),…,xn (m) }).
S512: based on the basic parameters, a probability estimation model is established.
In the step, based on the basic parameters corresponding to the target features calculated in the step, a probability density function corresponding to the target features is establishedSpecifically, a gaussian distribution function is adopted as a feature processing function, namely a probability density function of the target feature, and a function formula is shown as follows.
Mu n is the mathematical expected mean value of the probability density function corresponding to the characteristic of a certain target dimension; x n is the target feature data corresponding to the target feature of a certain dimension in the monitored data,The variance of the probability density function corresponding to the target feature of a certain dimension.
After obtaining probability density functions corresponding to target features of each dimension, establishing a calculation function corresponding to a probability estimation model based on the probability density functions corresponding to all the target features, wherein the formula is as follows:
S521: inputting the data in the verification set into a probability estimation model, and obtaining a simulation prediction result output by the probability estimation model;
in this step, the electronic device inputs data in a plurality of sample data groups in the verification set into the probability estimation model, and then obtains a numerical value p (x) of a plurality of simulation prediction results outputted by the probability estimation model.
S522: based on the simulation prediction result, a plurality of preset judgment thresholds and whether the data in the verification set are actually abnormal, calculating model quality values corresponding to the judgment thresholds;
After acquiring a preset judgment threshold value and a plurality of simulation prediction results p (x), the electronic device judges whether the sample data is abnormal or not based on a judgment function, correspondingly outputs the judgment result, and the relevant formula of the judgment function is as follows:
p (x) is more than or equal to epsilon, and judging to be normal;
p (x) < ε, abnormality was determined.
Because a plurality of judging thresholds are preset to finally select the optimal judging threshold epsilon, judging functions corresponding to different judging thresholds are different; after the same plurality of simulation prediction results are input to different determination functions, the determination results as to whether the same sample data is abnormal or not may be output to be different. Thus, based on a plurality of sets of judgment results (each set of judgment results including judgment results of respective sample data in the verification set) output by a plurality of preset judgment thresholds, it is necessary to calculate model quality values corresponding to different judgment thresholds to further select an optimal judgment threshold epsilon.
In this step, the anomaly detection algorithm uses an F-value function as a model quality decision function, and the electronic device further selects an optimal decision threshold epsilon according to the simulation prediction result value p (x) output by the probability estimation model and the decision result of whether the actual data belongs to the anomaly data (whether the actual data meets the y-value). The correlation calculation formula of the standard-model quality decision function for selecting decision thresholds is shown below, and model quality values F corresponding to different decision thresholds are calculated respectively.
F=2PR/(P+R)
Wherein: p is the precision; r is the recall rate.
The precision P is used to characterize how large a proportion of samples predicted to be abnormal are actually abnormal samples, so the precision p=the number of samples predicted to be abnormal and actually abnormal/the number of samples predicted to be abnormal; recall R is used to characterize how much proportion of the actual anomaly sample is predicted to be accurate in all the actual anomaly samples, so recall R = the number of samples predicted to be anomaly and actual anomaly/actual anomaly samples. The accuracy of the prediction result is reflected from different dimensions by the precision P and recall R of the prediction result.
S523: and (5) model parameter adjustment, and selecting an optimal judgment threshold epsilon.
In this step, the model quality value F is a value for evaluating the prediction result by integrating the precision ratio P and the recall ratio R, and the larger the model quality value F is, the more ideal the prediction result of the abnormal sample is, and therefore, the determination threshold value corresponding to the largest F value is selected as the optimal determination threshold value epsilon. That is, the electronic device compares the model quality values F corresponding to the plurality of determination thresholds, and then selects the determination threshold corresponding to the highest model quality value F as the optimal determination threshold epsilon.
In an embodiment, the set of preliminary decision thresholds are typically selected to have smaller probability values, for example {0.02,0.01,0.005,0.002..degree }, and then the electronic device calculates a model quality value F corresponding to each selected decision threshold according to the performance of the sample data of the verification set on the probability estimation model, and further selects a decision threshold corresponding to the largest model quality value F as the optimal decision threshold epsilon.
S531: and after a plurality of sample data sets in the test set are input into the probability estimation model, obtaining a simulation prediction result output by the probability estimation model.
In the step, the electronic equipment tests the probability estimation model through data in the test set, and obtains a simulation prediction result output by the probability estimation model by substituting the data in the test set into the probability estimation model.
S532: calculating an evaluation value of the probability estimation model based on the simulation prediction result, the optimal judgment threshold and a preset model quality judgment function;
In this step, the electronic device calculates an evaluation value of the current probability estimation model according to the simulation prediction result, the optimal determination threshold, the predetermined model quality determination function, and whether the data is actually abnormal data, so as to comprehensively evaluate the quality of the probability estimation model. The specific evaluation method of the probability estimation model (i.e. the evaluation result is confirmed by calculating the model quality value F) is the same as the above steps, but the sample data is taken from the test set, and the specific details refer to step S522 or other steps.
Whether a certain group of sample data is abnormal or not is determined based on a comparison result of a predicted result value p (x) output by the probability estimation model and an optimal judgment threshold value, so that the model quality value in the embodiment of the application is mainly used for measuring whether a calculation function of the probability estimation model or the optimal judgment threshold value is accurate or not and whether further adjustment is needed or not.
S533: and adjusting target characteristics corresponding to the target characteristic data for establishing the probability estimation model based on the evaluation value and the abnormal target characteristic data causing the simulation prediction result error so as to acquire an improved probability estimation model.
In the step, for a sample data set with larger deviation of the output simulation prediction result and lower evaluation value of the probability estimation model, the electronic equipment analyzes the abnormal sample data set with the prediction result error, confirms the target characteristics in the sample data set with the prediction result error, and generalizes the new target characteristics to replace the target characteristics with the prediction result error so as to adjust the probability estimation model and acquire the improved probability estimation model.
S541, after new monitoring data is input into the improved probability estimation model, judging whether the tunnel operation is abnormal or not based on the predicted result value output by the improved probability estimation model and an optimal judgment threshold value.
In the step, after the electronic equipment receives the latest monitoring data, each target feature data in the monitoring data is input into the improved probability estimation model, a predicted result value corresponding to the latest monitoring data is output by the probability estimation model, and whether the tunnel operation is abnormal or not is judged by comparing whether the predicted result value is smaller than an optimal judgment threshold value. If yes, go to step S543; if not, step S542 is performed.
S542, if the value of the predicted result is not smaller than the optimal judgment threshold value, determining that the tunnel operation is not abnormal.
When the tunnel operation data is in a normal condition, the predicted result p (x) is not less than epsilon.
S543, if the value of the predicted result is smaller than the optimal judgment threshold value, determining that the tunnel operation is abnormal;
When the tunnel operation is abnormal, the prediction result p (x) < epsilon is predicted, and the abnormality detection system sends out early warning information and uploads the early warning information to the tunnel management room to remind the manager of paying attention to site abnormality.
In step S541, the electronic device may further perform the above steps in real time based on the new monitoring data, so as to output the predicted result value p (x) in real time, update the optimal decision threshold epsilon and adjust the probability estimation model in real time based on the predicted result value, and realize the advantages of self-learning and intelligent adjustment improvement of the machine learning algorithm.
The tunnel operation anomaly detection method provided by the application is essentially executed by the electronic equipment based on a prestored anomaly detection algorithm based on Gaussian distribution, and the core idea of the algorithm is as follows: giving an m x n dimension training set, converting the training set into n dimension Gaussian distribution, calculating mathematical expectation mu and variance sigma 2 of the training set on each target feature dimension through distribution analysis of m training samples (target feature data), and further obtaining probability density functions of each dimension and a probability estimation function (probability estimation model) of the whole training set; thereafter, an optimal decision threshold ε is determined by validating the data in the collection. When the model is built and a new monitoring data comprising various target feature data is given, judging whether the monitoring data is abnormal or not according to the predicted result value p (x) calculated on the Gaussian distribution and the optimal judging threshold epsilon: when p (x) < ε is determined to be abnormal, p (x) > ε is determined to be non-abnormal.
The anomaly detection algorithm is an expression mode of the whole sample data structure, the expression mode usually captures the general property of the whole sample, and points which are completely inconsistent with the whole sample in the property are called anomaly data points, the generation mechanism of the anomaly data points is completely inconsistent with the whole sample, and the anomaly detection algorithm is extremely sensitive to the anomaly data points, so that the anomaly data different from the normal situation can be better captured. By training the abnormality detection model through a large amount of sample data extracted from the historical database, the monitoring data of whether the latest operation in the feedback tunnel is abnormal can be accurately, reliably and timely predicted, so that whether the data (operation in the tunnel) is abnormal or not can be judged.
The method for detecting the abnormal tunnel operation can effectively solve the problem that human and material resources are consumed greatly due to human eye monitoring when monitoring images are monitored in real time in the traditional abnormal tunnel operation detection.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a tunnel operation abnormality detection apparatus 600 according to an embodiment of the application. As shown in fig. 8, the apparatus includes: the first acquiring module 610, the second acquiring module 620, the determining module 630 and the judging module 640.
The first obtaining module 610 is configured to obtain pre-stored monitoring data, where the monitoring data is used to characterize an operation state in a tunnel; the second obtaining module 620 is configured to obtain a data set that conforms to gaussian distribution after preprocessing the monitoring data; the determining module 630 is configured to determine, based on the data in the data set, an improved probability estimation model and an optimal decision threshold; the judging module 640 is configured to judge whether an abnormality occurs in the tunnel operation based on the predicted result value output by the improved probability estimation model and the optimal judgment threshold value after new monitoring data is input to the improved probability estimation model.
The implementation process of the functions and roles of each module in the device is specifically shown in the implementation process of the corresponding steps in the tunnel operation abnormality detection method, and is not repeated here.
In the several embodiments provided in the present application, the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
Embodiments of the present application provide a computer-readable storage medium storing a computer program. The computer program may be executed by the processor 11 to perform a method of detecting a tunnel operation anomaly.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (8)

1. A method for detecting a tunnel operation anomaly, the method comprising:
acquiring pre-stored monitoring data, wherein the monitoring data is used for representing the operation state in a tunnel;
After preprocessing the monitoring data, acquiring a data set conforming to Gaussian distribution;
based on the data in the dataset, determining an improved probability estimation model and an optimal decision threshold, comprising:
Dividing the data set into a training set, a verification set and a test set based on the type of the data in the data set; establishing a probability estimation model based on the data in the training set; determining an optimal decision threshold based on the probability estimation model and the data in the verification set; adjusting the probability estimation model based on the optimal judgment threshold value and the data in the test set to obtain an improved probability estimation model;
the data set comprises a plurality of sample data sets which are formed by target feature data corresponding to different target features, and the target feature data are used for evaluating whether the corresponding target features are abnormal or not in tunnel operation; the adjusting the probability estimation model based on the optimal decision threshold and the data in the test set to obtain an improved probability estimation model includes:
After a plurality of sample data sets in the test set are input into the probability estimation model, calculating an evaluation value of the probability estimation model based on a simulation prediction result output by the probability estimation model, the optimal judgment threshold value and a preset model quality judgment function;
based on the evaluation value and abnormal target feature data causing the simulation prediction result error, adjusting target features corresponding to the target feature data for establishing the probability estimation model to obtain an improved probability estimation model;
And after new monitoring data is input into the improved probability estimation model, judging whether the tunnel operation is abnormal or not based on the predicted result value output by the improved probability estimation model and an optimal judgment threshold value.
2. The method of claim 1, wherein the types of data in the dataset include normal data and abnormal data, and wherein the dividing the dataset into a training set, a validation set, and a test set based on the types of data in the dataset comprises:
Distributing all the abnormal data in the data set to the verification set and the test set in an average manner;
and distributing all the normal data in the data set to the training set, the verification set and the test set according to fixed proportion.
3. The method according to claim 1, wherein the data set comprises a plurality of sets of target feature data, the target feature data being used to evaluate whether a corresponding target feature at tunnel operation is abnormal; the establishing a probability estimation model based on the data in the training set comprises the following steps:
calculating basic parameters for establishing probability density functions corresponding to the target features based on the target feature data in the training set;
based on the basic parameters, establishing probability density functions corresponding to the target features;
and establishing the probability estimation model based on probability density functions corresponding to all the target features.
4. The method of claim 1, wherein the determining an optimal decision threshold based on the probabilistic estimation model and the data in the validation set comprises:
inputting the data in the verification set into the probability estimation model, and then obtaining a simulation prediction result output by the probability estimation model;
calculating model quality values corresponding to a plurality of preset judging thresholds based on the simulation prediction result, the plurality of preset judging thresholds and whether the data in the verification set are actually abnormal;
after comparing a plurality of the model quality values, determining the optimal decision threshold.
5. The method according to claim 1, wherein after inputting new monitoring data to the improved probability estimation model, determining whether an abnormality occurs in tunnel operation based on a predicted result value output by the improved probability estimation model and an optimal determination threshold value, comprises:
Judging whether the predicted result value is smaller than the optimal judgment threshold value or not;
If the value of the predicted result is smaller than the optimal judgment threshold value, determining that the tunnel operation is abnormal;
and if the value of the predicted result is not smaller than the optimal judgment threshold value, determining that the tunnel operation is not abnormal.
6. A device for detecting tunnel operation anomalies, the device comprising:
the first acquisition module is used for acquiring prestored monitoring data, wherein the monitoring data is used for representing the operation state in the tunnel;
The second acquisition module is used for acquiring a data set conforming to Gaussian distribution after preprocessing the monitoring data;
a determining module, configured to determine an improved probability estimation model and an optimal decision threshold based on the data in the dataset, where the determining module is further configured to:
Dividing the data set into a training set, a verification set and a test set based on the type of the data in the data set; establishing a probability estimation model based on the data in the training set; determining an optimal decision threshold based on the probability estimation model and the data in the verification set; adjusting the probability estimation model based on the optimal judgment threshold value and the data in the test set to obtain an improved probability estimation model;
the data set comprises a plurality of sample data sets which are formed by target feature data corresponding to different target features, and the target feature data are used for evaluating whether the corresponding target features are abnormal or not in tunnel operation; the adjusting the probability estimation model based on the optimal decision threshold and the data in the test set to obtain an improved probability estimation model includes:
After a plurality of sample data sets in the test set are input into the probability estimation model, calculating an evaluation value of the probability estimation model based on a simulation prediction result output by the probability estimation model, the optimal judgment threshold value and a preset model quality judgment function;
based on the evaluation value and abnormal target feature data causing the simulation prediction result error, adjusting target features corresponding to the target feature data for establishing the probability estimation model to obtain an improved probability estimation model;
and the judging module is used for judging whether the tunnel operation is abnormal or not based on the predicted result value output by the improved probability estimation model and the optimal judging threshold value after new monitoring data are input into the improved probability estimation model.
7. An electronic device, the electronic device comprising:
A processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of detecting a tunnel operation anomaly of any one of claims 1-5.
8. A computer readable storage medium, characterized in that the storage medium stores a computer program executable by a processor to perform the method of detecting a tunnel operation anomaly of any one of claims 1-5.
CN202210904583.5A 2022-07-29 2022-07-29 Tunnel operation abnormality detection method and device, electronic equipment and storage medium Active CN115240428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210904583.5A CN115240428B (en) 2022-07-29 2022-07-29 Tunnel operation abnormality detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210904583.5A CN115240428B (en) 2022-07-29 2022-07-29 Tunnel operation abnormality detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115240428A CN115240428A (en) 2022-10-25
CN115240428B true CN115240428B (en) 2024-05-14

Family

ID=83676606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210904583.5A Active CN115240428B (en) 2022-07-29 2022-07-29 Tunnel operation abnormality detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115240428B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007026300A (en) * 2005-07-20 2007-02-01 Matsushita Electric Ind Co Ltd Traffic flow abnormality detector and traffic flow abnormality detection method
CN101872382A (en) * 2009-04-21 2010-10-27 同济大学 Dynamic detection method of operation safety condition of road tunnel
CN104766302A (en) * 2015-02-05 2015-07-08 武汉大势智慧科技有限公司 Method and system for optimizing laser scanning point cloud data by means of unmanned aerial vehicle images
CN106683405A (en) * 2016-12-28 2017-05-17 安徽科力信息产业有限责任公司 Road traffic state evaluation method based on road traffic flow density
CN206931362U (en) * 2017-04-19 2018-01-26 杭州派尼澳电子科技有限公司 A kind of freeway tunnel safety monitoring system
CN107979602A (en) * 2017-12-01 2018-05-01 西安交通大学 A kind of method for detecting abnormality based on semi-supervised statistics in cellular network
CN209388480U (en) * 2019-01-25 2019-09-13 河北中岗通讯工程有限公司 Freeway tunnel safe operation monitors system
CN112215307A (en) * 2020-11-19 2021-01-12 薛蕾 Method for automatically detecting signal abnormality of seismic instrument by applying machine learning
CN113408878A (en) * 2021-06-07 2021-09-17 山东电工电气集团有限公司 Cable tunnel running state evaluation method based on multi-source information and area control system
CN113569428A (en) * 2021-08-26 2021-10-29 华能西藏雅鲁藏布江水电开发投资有限公司 Tunnel abnormity detection method, device and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007026300A (en) * 2005-07-20 2007-02-01 Matsushita Electric Ind Co Ltd Traffic flow abnormality detector and traffic flow abnormality detection method
CN101872382A (en) * 2009-04-21 2010-10-27 同济大学 Dynamic detection method of operation safety condition of road tunnel
CN104766302A (en) * 2015-02-05 2015-07-08 武汉大势智慧科技有限公司 Method and system for optimizing laser scanning point cloud data by means of unmanned aerial vehicle images
CN106683405A (en) * 2016-12-28 2017-05-17 安徽科力信息产业有限责任公司 Road traffic state evaluation method based on road traffic flow density
CN206931362U (en) * 2017-04-19 2018-01-26 杭州派尼澳电子科技有限公司 A kind of freeway tunnel safety monitoring system
CN107979602A (en) * 2017-12-01 2018-05-01 西安交通大学 A kind of method for detecting abnormality based on semi-supervised statistics in cellular network
CN209388480U (en) * 2019-01-25 2019-09-13 河北中岗通讯工程有限公司 Freeway tunnel safe operation monitors system
CN112215307A (en) * 2020-11-19 2021-01-12 薛蕾 Method for automatically detecting signal abnormality of seismic instrument by applying machine learning
CN113408878A (en) * 2021-06-07 2021-09-17 山东电工电气集团有限公司 Cable tunnel running state evaluation method based on multi-source information and area control system
CN113569428A (en) * 2021-08-26 2021-10-29 华能西藏雅鲁藏布江水电开发投资有限公司 Tunnel abnormity detection method, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
公路隧道运营安全技术研究;王永东;《中国博士学位论文全文数据库工程科技Ⅱ辑》(第3期);C034-25 *

Also Published As

Publication number Publication date
CN115240428A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN116246407B (en) Agriculture and forestry area fire early warning supervisory systems based on artificial intelligence
CN109325692B (en) Real-time data analysis method and device for water pipe network
CN115578015B (en) Sewage treatment whole process supervision method, system and storage medium based on Internet of things
CN116105802B (en) Underground facility safety monitoring and early warning method based on Internet of things
CN114429308B (en) Enterprise safety risk assessment method and system based on big data
CN111191855B (en) Water quality abnormal event identification and early warning method based on pipe network multi-element water quality time sequence data
CN116934262B (en) Construction safety supervision system and method based on artificial intelligence
CN112668873A (en) Mine safety situation analysis and prediction early warning method
CN114023399A (en) Air particulate matter analysis early warning method and device based on artificial intelligence
US11934522B2 (en) System and method for detecting malicious activities and anomalies in building systems
CN117193222A (en) Intelligent quality control system based on industrial Internet of things and big data and control method thereof
CN115240428B (en) Tunnel operation abnormality detection method and device, electronic equipment and storage medium
US20240005771A1 (en) Methods and systems for gas leakage safety warning based on internet of things (iot) of smart gas
CN117150298A (en) Deep learning-based subway FAS fire alarm system debugging method
CN116665401A (en) Accident prevention alarm system for chemical production
CN116151799A (en) BP neural network-based distribution line multi-working-condition fault rate rapid assessment method
CN112672299B (en) Sensor data reliability evaluation method based on multi-source heterogeneous information fusion
CN105187821A (en) Video quality intelligent diagnostic analysis system
CN113685166A (en) Drilling accident early warning method and system
CN112032567A (en) Buried gas pipeline leakage risk prediction system
CN106021656A (en) A random safety coefficient-based fire disaster safety coefficient calculating method and system
CN116962063A (en) Industrial control real-time intrusion detection method based on Fourier series fitting
Yuan et al. Method for intelligently identifying underground safety accidents based on fully connected neural network
CN117640636A (en) Cloud computing-based dynamic ring monitoring method and system
CN117499426A (en) Administrative safety monitoring and early warning system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant