A debris flow risk monitoring method, device, equipment and readable storage medium
By acquiring and analyzing the image and weather information of the mudslide monitoring area, calculating risk scores and early warnings, the problem of single dimensions in the existing technology is solved, and the accuracy of mudslide risk assessment and early warnings are improved.
Patent Information
- Application Number
- CN202510330514.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-20
AI Technical Summary
The existing mudslide monitoring technology has a single dimension and cannot effectively reflect the risk of mudslide.
By obtaining the mudslide monitoring area images and weather information at different moments within the preset period, the first risk score and the second risk score are calculated, and early warning is made based on these scores.
Risk assessment is conducted from the two angles of the displacement and shape of the hillside. Compared with a single angle assessment, the method can better reflect the degree of mudslide risk and improve the accuracy of early warning.
Smart Images

Figure CN119851217B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of debris flow monitoring, and more specifically, to a method, device, equipment and readable storage medium for debris flow risk monitoring. Background Art
[0002] As a common geological disaster, debris flow has powerful impact energy, which can instantly destroy houses, villages, factories and other site facilities, submerge people and livestock, and even raise the riverbed and change the topography and landform, causing a large number of casualties, traffic interruptions and infrastructure paralysis. Therefore, it is very necessary to monitor the risk of debris flow. At present, when monitoring some mountain slopes, the monitoring dimension is relatively single and cannot well reflect the risk of debris flow occurrence. Summary of the Invention
[0003] The purpose of the present invention is to provide a method, device, equipment and readable storage medium for debris flow risk monitoring to improve the above problems.
[0004] To achieve the above purpose, the embodiments of the present application provide the following technical solutions:
[0005] In the first aspect, the embodiments of the present application provide a method for debris flow risk monitoring, and the method includes:
[0006] Obtain first images of a debris flow monitoring area at different times within a preset time period, where the first images include mountain slopes where debris flow has occurred; and obtain weather information within the preset time period;
[0007] Calculate a first risk score for debris flow occurrence based on all the first images, and at the same time calculate a second risk score for debris flow occurrence based on all the first images and the weather information within the preset time period; calculate a third risk score according to the first risk score and the second risk score. When the third risk score is greater than a preset score threshold, obtain weather information within a future time period, and issue different levels of warnings according to the weather information within the future time period and the third risk score.
[0008] In the second aspect, the embodiments of the present application provide a debris flow risk monitoring device, including:
[0009] An acquisition module, configured to obtain first images of a debris flow monitoring area at different times within a preset time period, where the first images include mountain slopes where debris flow has occurred; and obtain weather information within the preset time period;
[0010] An early warning module, configured to calculate a first risk score of debris flow occurrence based on all the first images, and at the same time calculate a second risk score of debris flow occurrence based on all the first images and weather information within the preset time period; calculate a third risk score according to the first risk score and the second risk score, and when the third risk score is greater than a preset score threshold, obtain weather information within a future time period, and perform early warnings of different levels according to the weather information within the future time period and the third risk score.
[0011] In a third aspect, an embodiment of the present application provides a debris flow risk monitoring device, which includes a memory and a processor. The memory is used to store a computer program; the processor is configured to implement the steps of the above-mentioned debris flow risk monitoring method when executing the computer program.
[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and the computer program implements the steps of the above-mentioned debris flow risk monitoring method when executed by a processor.
[0013] The beneficial effects of the present invention are as follows:
[0014] In the present invention, from the perspective of data acquisition, the present invention only needs to acquire images of the hillside, and the data acquisition is simple and easy; after acquisition, first calculate the central position information of the hillside at different times according to the images at different times, calculate the displacement change information within the preset time period according to the central position information, and calculate the first risk score according to the displacement change information; then, predict according to the shapes of the images at different times, predict the risk category to which it belongs, and finally calculate the second risk score according to the risk categories at different times; finally, perform early warnings of different levels according to the first risk score, the second risk score and future weather information. In the present invention, the acquisition of the original data is simple and easy, and the risk assessment is carried out from two angles of the displacement and shape of the hillside. Compared with the risk assessment from a single angle, the method in the present invention can better reflect the risk degree of debris flow occurrence on the hillside.
[0015] Other features and advantages of the present invention will be described in the subsequent description, and part of them will become obvious from the description, or be understood by implementing the embodiments of the present invention. The objectives and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. Description of the Drawings
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0017] Figure 1 is a schematic flowchart of the debris flow risk monitoring method described in the embodiments of the present invention;
[0018] Figure 2 is a schematic structural diagram of the debris flow risk monitoring device described in the embodiments of the present invention;
[0019] Figure 3 is a schematic structural diagram of the debris flow risk monitoring equipment described in the embodiments of the present invention. Detailed implementation manners
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and shown in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
[0021] It should be noted that: similar reference numerals or letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, terms such as "first" and "second" are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0022] Embodiment 1
[0023] As Figure 1 shown, this embodiment provides a debris flow risk monitoring method, which includes step S1 and step S2.
[0024] Step S1: Obtain the first images of the debris flow monitoring area at different times within a preset time period, where the first images include the slopes where debris flows have occurred; and obtain the weather information within the preset time period;
[0025] In this step, the cut-off moment of the preset time period can be the current moment. The time length of the preset time period can be 5 minutes, 3 minutes, 2 minutes, 1 minute, etc. The specific time length can be custom-set according to requirements. Among them, the debris flow monitoring area includes the hillslope where debris flow has occurred. At the same time, within the preset time period, the first image can be acquired at the same time interval, that is, the time length between the acquisition moments of any two adjacent first images is the same.
[0026] Step S2: Calculate the first risk score of debris flow occurrence based on all the first images. At the same time, calculate the second risk score of debris flow occurrence based on all the first images and the weather information within the preset time period. Calculate the third risk score according to the first risk score and the second risk score. When the third risk score is greater than the preset score threshold, obtain the weather information in the future time period, and issue warnings at different levels according to the weather information in the future time period and the third risk score.
[0027] In this step, the specific implementation steps for calculating the first risk score of debris flow occurrence based on all the first images include step S21.
[0028] Step S21: Calculate the central position information of the hillslope in the first image. The calculation method includes respectively recording two adjacent first images as the third image and the fourth image, where the acquisition moment corresponding to the third image is earlier than that of the fourth image. Perform filtering processing on the third image and the fourth image respectively. Among them, filter out the tricolor values in the image, and obtain the fifth image and the sixth image respectively after filtering. Segment the hillslope in the fourth image based on the fifth image and the sixth image, calculate the central position information of the hillslope in the fourth image according to the segmented hillslope image, calculate the risk degree of debris flow occurrence according to the calculated central position information, and calculate the first risk score according to the risk degree.
[0029] In this step, considering that the hillslope will slide when debris flow occurs, the displacement change is judged according to the central position of the hillslope at different moments within a period of time, and then the score calculation is carried out according to the displacement change. At the same time, in order to obtain accurate central position information, the first image is segmented, and the hillslope in it is segmented and then its central position information is calculated. Among them, in this step, the specific implementation steps for calculating the central position information of the hillslope in the fourth image according to the segmented hillslope image, calculating the risk degree of debris flow occurrence according to the calculated central position information, and calculating the first risk score according to the risk degree include step S211 and step S212.
[0030] Step S211: Subtract the grayscale value of each pixel in the sixth image from the grayscale value of each pixel in the fifth image to obtain a seventh image; perform adaptive histogram equalization on the seventh image, where it is divided into 8×8 sub-blocks, and histogram equalization is performed within each sub-block, with the contrast slope limited to ≤3; then perform adaptive threshold binarization, where the Otsu algorithm is used to automatically determine the optimal threshold; then perform erosion filtering and dilation processing in sequence to obtain an eighth image; determine the contour information of the hillside in the eighth image, and calculate the center position information of the hillside in the fourth image based on the contour information; correct the center position information, and after correction, arrange all the calculated center position information in chronological order, and successively reflect the corresponding center position information at different times on the two-dimensional coordinate axis;
[0031] In this step, the center position information of the hillside in the fourth image can be obtained according to this calculation method. If the center position information of the hillside in the third image needs to be calculated, it can be calculated according to the same calculation method based on the first image collected at the previous moment, and then the center position information of the hillside at each moment within the preset time period can be obtained; at the same time, in this step, considering that the deformation of the hillside is a dynamic change process, that is, the area of the hillside may be different at the previous moment and the next moment, so the center position information of the hillside at different times is calculated separately;
[0032] After processing, the eighth image usually presents the contour of the hillside. Therefore, the minimum bounding rectangle can be used as the contour information of the hillside in the eighth image, and the center point coordinates of the minimum bounding rectangle are used as the center position information of the hillside in the fourth image, and then correct it; after that, establish horizontal and vertical coordinate axes, and reflect the corresponding center position information at different times in the form of points on the coordinate axes;
[0033] Among them, the correction is carried out according to the following formula;
[0034] X c1 (t)=x c (t)+w noise (t)+w light (t)+w shape (t)+w res (t)+w morph (t),
[0035] y c1 (t)=y c (t)+w noise (t)+w light (t)+w shape (t)+w res (t)+w morph (t),
[0036] w noise (t) = k noise (1 / SNR(t)),
[0037] w light (t) = k light ΔL(t),
[0038] w shape (t) = k shape (ΔA(t) / A(t)),
[0039] w res (t) = k res (1 - R(t) / R base ),
[0040] w morph (t) = k morph ((K erode + K dilate ), / 2),
[0041] In the formula, x c (t) is the abscissa of the center position at time t before correction, y c (t) is the ordinate of the center position at time t before correction; x c1 (t) is the abscissa of the center position at time t after correction, y c1 (t) is the ordinate of the center position at time t after correction; w noise (t) is the noise correction factor, k noise is the weight coefficient of the noise effect (take 0.2), SNR(t) is the signal-to-noise ratio of the image at time t; w light (t) is the illumination correction factor, k light is the weight coefficient of the illumination effect (take 0.4), ΔL(t) is the change in image brightness at time t, and the change in image brightness at time t minus the image brightness at t - 1 is the change in brightness; w shape (t) is the shape correction factor, k shape is the weight coefficient of the shape effect (take 0.5), ΔA(t) is the change in contour area at time t, and the change in contour area at time t minus the contour area of the image at t - 1 is the change in contour area, A(t) is the current contour area, and the area of the minimum bounding rectangle is taken as the contour area; w res (t) is the resolution correction factor, k res is the weight coefficient of the resolution effect (take 0.08), R(t) is the resolution of the image at time t, R baseis the reference resolution, and the nominal resolution of the camera that captures the first image is used as the reference resolution; w morph (t) is the morphological correction factor, k morph is the weight coefficient of the morphological influence (taking 0.3), K erode is the size of the erosion kernel, which is 3×3, K dilate is the size of the dilation kernel, which is 5×5.
[0042] Step S212: Connect the central position information corresponding to different moments. After connection, calculate the first information between two adjacent line segments. Specifically, extend one of the two adjacent line segments closer to the ordinate, and record the sine value of the angle between the extended line segment and the other line segment as the first information; calculate the first-order difference of two adjacent first information to obtain the second information; calculate the standard deviation of all the second information, compare and analyze the standard deviation with the preset standard deviation threshold range to obtain the risk level of the hillside, and calculate the first risk score according to the risk level.
[0043] In this step, after the central position information is represented in the form of points and then connected, the sine value of the angle can be calculated between two adjacent line segments, and then the standard deviation can be calculated. Among them, the calculated standard deviation can be understood as the discrete feature of all the first-order differences, and the change of the included angle of multiple displacement directions is determined through the discrete feature; at the same time, in this step, the preset standard deviation threshold can be custom-set according to user needs; after setting, it can be compared with the calculated standard deviation. Specifically: if the standard deviation is less than the lower limit of the standard deviation threshold range, the risk level is level one; if it is greater than or equal to the lower limit of the standard deviation threshold range and less than or equal to the upper limit of the standard deviation threshold range, the risk level is level two; if the standard deviation is greater than the upper limit of the standard deviation threshold range, the risk level is level three; different risk levels correspond to different first risk scores. For example, a risk level of level one corresponds to 10 points, a risk level of level two corresponds to 20 points, and a risk level of level three corresponds to 30 points, which can be specifically custom-set according to user needs;
[0044] Through the calculation method in this step, the corresponding risk score can be reflected by monitoring the position change of the hillside at different moments. In addition to monitoring from the perspective of position information, this embodiment also monitors from the perspective of the shape of the hillside. Specifically, in step S2, the specific implementation steps of calculating the second risk score of debris flow based on all the first images and the weather information within the preset time period include step S22 and step S23;
[0045] Step S22: Obtain multiple historical first images, annotate each first image to obtain the annotated historical first images. The annotation information includes three risk categories and the true probability of each risk category. The three risk categories are primary risk, secondary risk, and tertiary risk respectively. Take the risk category with the highest true probability corresponding to each first image as the target risk category. Extract the feature information of the annotated historical first images.
[0046] In this step, during annotation, annotate the three risk categories of primary risk, secondary risk, and tertiary risk in sequence. At the same time, when annotating, the staff annotate the risk category according to the shape of the hillside in the historical first image and some factors existing in the hillside (such as cracks, bulges, the appearance of white water flows, etc.). In this way, the risk of debris flow occurrence on the hillside can be calculated from the perspective of the hillside shape. At the same time, the historical first image is the first image obtained at a historical time.
[0047] Step S23: Cluster all the annotated historical first images based on the feature information to obtain multiple clusters. For each cluster, count the number of annotated historical first images with the target risk category of primary risk to obtain a first value, count the number of annotated historical first images with the target risk category of secondary risk to obtain a second value, count the number of annotated historical first images with the target risk category of tertiary risk to obtain a third value, and count the number of annotated historical first images included in each cluster to obtain a fourth value. Denote the ratio of the maximum value among the first value, the second value, and the third value to the fourth value as a fifth value. Screen all the annotated historical first images according to the fifth value, and use the remaining annotated historical first images after screening to train the model to obtain a risk recognition model, and obtain the second risk score based on the risk recognition model.
[0048] In this step, considering that all the annotated historical first images may contain noise samples, which may affect the subsequent training of the model, so data screening is performed in this step. Among them, screening all the annotated historical first images according to the fifth value, using the remaining annotated historical first images after screening to train the model to obtain a risk recognition model, and the specific implementation steps of obtaining the second risk score based on the risk recognition model include Step S231 and Step S232.
[0049] Step S231: Compare the fifth value with a preset first numerical threshold. If the fifth value is greater than the first numerical threshold, analyze whether the target risk categories corresponding to all the labeled historical first images in this cluster are the same. If they are the same, use all the labeled historical first images in this cluster as target samples. If they are not the same, find the maximum value among the first, second, and third numerical values, and use all the labeled historical first images corresponding to the target risk category of the maximum value as target samples. Compare the fifth value with the preset first numerical threshold. If the fifth value is less than or equal to the first numerical threshold, count the number of labeled historical first images to obtain a sixth value, record the ratio of the fourth value to the sixth value as a seventh value, and compare the seventh value with a preset second numerical threshold. If the seventh value is greater than the second numerical threshold, use all the labeled historical first images in this cluster as target samples.
[0050] In this step, using all the labeled historical first images corresponding to the target risk category of the maximum value as target samples can be understood as: if the target risk category of the maximum value is a first-level risk, then use the labeled historical first images belonging to the first-level risk in this cluster as target samples.
[0051] Meanwhile, in this step, if the seventh value is less than or equal to the second numerical threshold, discard all the labeled historical first images in this cluster as target samples, so it is not reflected in the above steps. Through the methods in step S23 and step S231, all the labeled historical first images can be screened, noise samples can be removed, the quality of the samples can be improved, which is conducive to training the model and improving the accuracy of the model.
[0052] Step S232: Use the target samples obtained after screening to train the model. During the training process, for each labeled historical first image, first input each labeled historical first image into the convolutional layer for convolutional operation, and after the convolutional operation, perform normalization, non-linear activation, and pooling processing in sequence to obtain a first calculation result. The first calculation result is the feature map after pooling. Based on the first calculation result, complete the training process to obtain a risk recognition model, and obtain the second risk score based on the risk recognition model.
[0053] In this step, the specific implementation steps of completing the training process based on the first calculation result to obtain a risk recognition model and obtaining the second risk score based on the risk recognition model include step S2321 and step S2322.
[0054] Step S2321: Multiply the first calculation result by a three-dimensional preset matrix to obtain a three-dimensional feature matrix. Among them, the three values in the three-dimensional feature matrix respectively correspond to the prediction probabilities of three different risk categories; calculate the difference between the three prediction probabilities and the three true probabilities through formula (1). The formula (1) includes:
[0055] ,
[0056] In formula (1), is the difference size, is the weight coefficient of the i-th risk category, is the true probability of the i-th risk category, and the generation time is ; is the prediction probability of the i-th risk category, and the generation time is ; , , is the moment when the calculation of the difference size starts; is the time decay rate of the true probability, taking 0.05; is the time decay rate of the prediction probability, taking 0.1.
[0057] In the above formula, and can also take 0.1 at the same time; the above formula calculates the time decay of each parameter independently, more accurately reflects the impact of data timeliness on risk assessment, and thus makes the calculated difference size more accurate.
[0058] In this step, the first risk category, the second risk category, and the third risk category can respectively correspond to the first-level risk, the second-level risk, and the third-level risk;
[0059] Multiplying the first calculation result by a three-dimensional preset matrix to obtain a three-dimensional feature matrix can be understood as: multiplying the first calculation result by a three-dimensional preset matrix can map the features in the pooled feature map to 3D. Finally, the 3 values in the obtained 3D feature matrix respectively correspond one-to-one to the prediction probabilities of 3 risk categories, and then the prediction probabilities of 3 risk categories can be obtained. For example, the first value corresponds to the prediction probability of the first-level risk, the second value corresponds to the prediction probability of the second-level risk, and the third value corresponds to the prediction probability of the third-level risk. In addition, the initial values in the preset matrix can be randomly set, and the values in the preset matrix are continuously adjusted through training and learning;
[0060] Step S2322: Analyze the magnitude of the difference. If the magnitude of the difference is greater than the preset difference threshold, adjust the parameters in the convolutional layer, the parameters in the normalization layer, and the values in the matrix, and continue training after the adjustment. When the magnitude of the difference is less than the preset difference threshold, stop training, and use the model at the time of stopping training as the risk identification model; input each of the first images into the risk identification model, output multiple risk categories corresponding to each of the first images and the probability of each risk category, sort all the risk categories in descending order according to the probability of each risk category to obtain the sorted risk categories; use the sorted risk categories as the final risk categories corresponding to each of the first images; calculate the second risk score of debris flow occurrence according to the final risk category corresponding to each of the first images and the weather information within the preset time period.
[0061] In this step, the parameters in the convolutional layer and the parameters in the normalization layer can be the weight matrix of each convolutional kernel, the normalization coefficient, etc. in the convolutional layer; the specific implementation steps of calculating the second risk score of debris flow occurrence according to the final risk category corresponding to each of the first images and the weather information within the preset time period include Step S23221 and Step S23222;
[0062] Step S23221: Aggregate the risk categories ranked first in the final risk categories corresponding to each of the first images to obtain a risk category set; count the proportion of each risk category in the risk category set, and use the risk category with the largest proportion as the risk category within the preset time period; obtain the risk score within the preset time period according to the corresponding table between risk categories and presets, where different risk categories in the corresponding table correspond to different risk scores;
[0063] In this step, for example, if the risk category with the largest proportion is the secondary risk, then the secondary risk is used as the risk category within the preset time period; then the risk score within the preset time period can be obtained according to the corresponding table;
[0064] Step S23222: Analyze the weather information within the preset time period. Among them, if the weather information is cloudy or sunny, use the risk score as the second risk score. Otherwise, obtain the impact factor, multiply the impact factor by the risk score, and record the multiplication result as the second risk score.
[0065] In this step, considering that when it is cloudy or sunny, the weather basically has no impact on the hillside slope, but other weathers such as rainy days, thunderstorms, and hail weather will further affect the hillside slope. Therefore, at this time, it is necessary to obtain the impact factor, and the impact factor can be set by the staff according to the weather information. For example, the impact factor can be 1.2;
[0066] In step S2, a third risk score is calculated based on the first risk score and the second risk score. When the third risk score is greater than a preset score threshold, weather information within a future time period is obtained, and the specific implementation steps for issuing warnings of different levels based on the weather information within the future time period and the third risk score include step S24;
[0067] Step S24: The first risk score and the second risk score are weighted and summed according to their respective corresponding weights to obtain the third risk score; when the third risk score is greater than the preset score threshold, a weather score within the future time period is calculated based on the weather information within the future time period and a preset score table, where different weather information in the score table corresponds to different weather scores; the third risk score and the weather score are weighted and summed to obtain a fourth risk score, and warnings of different levels are issued according to different fourth risk scores.
[0068] In this step, when the third risk score is less than or equal to the preset score threshold, no warning needs to be issued. Therefore, in this embodiment, only the case of being greater is considered. In the case of being greater, if the future weather is bad, such as heavy rain, debris flow may occur. Therefore, the score of the future weather needs to be added, and finally warnings of different levels are issued according to the calculated fourth score. The start time of the future time period is the current time, and the time length of the future time period can be 30 minutes, 60 minutes, etc.;
[0069] In this embodiment, from the perspective of data acquisition, this embodiment only needs to acquire an image of the hillside, and the data acquisition is simple and easy; after acquisition, first, the central position information of the hillside at different times is calculated based on the images at different times, the displacement change information within a preset time period is calculated based on the central position information, and the first risk score is calculated based on the displacement change information; then, the shape of the images at different times is predicted, and the risk category it belongs to is predicted. Finally, the second risk score is calculated based on the risk categories at different times; finally, warnings of different levels are issued based on the first risk score, the second risk score, and the future weather information. In this embodiment, the acquisition of the original data is simple and easy, and the risk assessment is carried out from two angles of the displacement and shape of the hillside. Compared with the risk assessment from only a single angle, the method in this embodiment can better reflect the risk degree of debris flow occurrence on the hillside.
[0070] Embodiment 2
[0071] As Figure 2 shown, this embodiment provides a debris flow risk monitoring device, and the device includes an acquisition module 1 and a warning module 2.
[0072] An acquisition module 1, configured to acquire first images of the debris flow monitoring area at different times within a preset time period, where the first images include slopes where debris flows have occurred; and acquire weather information within the preset time period;
[0073] An early warning module 2, configured to calculate a first risk score of debris flow occurrence based on all the first images, and at the same time calculate a second risk score of debris flow occurrence based on all the first images and the weather information within the preset time period; calculate a third risk score according to the first risk score and the second risk score, and when the third risk score is greater than a preset score threshold, acquire weather information within a future time period, and issue different levels of early warnings according to the weather information within the future time period and the third risk score.
[0074] In a specific implementation manner of the present disclosure, the early warning module 2 further includes a first calculation unit 21.
[0075] The first calculation unit 21 is configured to calculate the central position information of the slope in the first image. The calculation method includes respectively recording two adjacent first images as a third image and a fourth image, where the acquisition time corresponding to the third image is earlier than that of the fourth image; respectively performing filtering processing on the third image and the fourth image, where the tricolor values in the image are filtered out, and after filtering, a fifth image and a sixth image are respectively obtained; based on the fifth image and the sixth image, the slope in the fourth image is segmented, and the central position information of the slope in the fourth image is calculated according to the segmented slope image, the risk degree of debris flow occurrence is calculated according to the calculated central position information, and the first risk score is calculated according to the risk degree.
[0076] In a specific implementation manner of the present disclosure, the first calculation unit 21 further includes a second calculation unit 211 and a third calculation unit 212.
[0077] The second calculation unit 211 is configured to subtract the gray value of each pixel in the sixth image from the gray value of each pixel in the fifth image to obtain a seventh image; perform adaptive histogram equalization processing on the seventh image, where it is segmented into 8×8 sub-blocks, histogram equalization is performed within each sub-block, and the contrast slope is limited to ≤3; then perform adaptive threshold binaryzation processing, where the Otsu algorithm is used to automatically determine the optimal threshold; then perform erosion filtering and dilation processing in sequence to obtain an eighth image; determine the contour information of the slope in the eighth image, and calculate the central position information of the slope in the fourth image according to the contour information; correct the central position information, and after correction, sequentially reflect the corresponding central position information at different times on a two-dimensional coordinate axis in chronological order;
[0078] A third computing unit 212 is configured to connect the center position information corresponding to each moment, and after connection, calculate a first piece of information between two adjacent line segments. Specifically, extend one of the two adjacent line segments closer to the ordinate, and record the sine value of the angle between the extended line segment and the other line segment as the first piece of information; calculate the first-order difference of two adjacent first pieces of information to obtain a second piece of information; calculate the standard deviation of all the second pieces of information, compare and analyze the standard deviation with a preset standard deviation threshold range to obtain the risk level of the hillside, and calculate the first risk score according to the risk level.
[0079] In a specific embodiment of the present disclosure, the warning module 2 further includes an acquisition unit 22 and a training unit 23.
[0080] The acquisition unit 22 is configured to acquire multiple historical first images, label each first image to obtain a labeled historical first image, where the labeling information includes three risk categories and the true probability of each risk category. The three risk categories are primary risk, secondary risk, and tertiary risk respectively; take the risk category with the highest true probability corresponding to each first image as the target risk category; extract the feature information of the labeled historical first images.
[0081] The training unit 23 is configured to cluster all the labeled historical first images based on the feature information to obtain multiple clusters; for each cluster, count the number of labeled historical first images with the target risk category of primary risk to obtain a first value, count the number of labeled historical first images with the target risk category of secondary risk to obtain a second value, count the number of labeled historical first images with the target risk category of tertiary risk to obtain a third value, and count the number of labeled historical first images included in each cluster to obtain a fourth value; record the ratio of the maximum value among the first value, the second value, and the third value to the fourth value as a fifth value; screen all the labeled historical first images according to the fifth value, and use the remaining labeled historical first images after screening to train the model to obtain a risk recognition model, and obtain the second risk score based on the risk recognition model.
[0082] It should be noted that regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0083] Embodiment 3
[0084] Corresponding to the above method embodiments, the present disclosure embodiments also provide a debris flow risk monitoring device, and the debris flow risk monitoring device described below can be mutually referred to with the debris flow risk monitoring method described above.
[0085] Figure 3 is a block diagram of a debris flow risk monitoring device 300 shown according to an exemplary embodiment. As Figure 3 shown, the debris flow risk monitoring device 300 may include: a processor 301, a memory 302. The debris flow risk monitoring device 300 may further include one or more of a multimedia component 303, an I / O interface 304, and a communication component 305.
[0086] Among them, the processor 301 is used to control the overall operation of the debris flow risk monitoring device 300 to complete all or part of the steps in the above-mentioned debris flow risk monitoring method. The memory 302 is used to store various types of data to support the operation of the debris flow risk monitoring device 300. These data may include, for example, instructions for any application or method operating on the debris flow risk monitoring device 300, as well as application-related data, such as contact data, sent and received messages, pictures, audio, video, and so on. The memory 302 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The multimedia component 303 may include a screen and an audio component. Among them, the screen may be a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, and the microphone is used to receive external audio signals. The received audio signals may be further stored in the memory 302 or sent through the communication component 305. The audio component further includes at least one speaker for outputting audio signals. The I / O interface 304 provides an interface between the processor 301 and other interface modules. The above-mentioned other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 305 is used for wired or wireless communication between the debris flow risk monitoring device 300 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them. Therefore, the corresponding communication component 305 may include: a Wi-Fi module, a Bluetooth module, and an NFC module.
[0087] In an exemplary embodiment, the debris flow risk monitoring device 300 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above-mentioned debris flow risk monitoring method.
[0088] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above-mentioned debris flow risk monitoring method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 302 including program instructions, and the above program instructions can be executed by the processor 301 of the debris flow risk monitoring device 300 to complete the above-mentioned debris flow risk monitoring method.
[0089] Embodiment 4
[0090] Corresponding to the above method embodiments, the embodiments of the present disclosure further provide a readable storage medium. A readable storage medium described below can be correspondingly referred to the debris flow risk monitoring method described above.
[0091] A readable storage medium has a computer program stored thereon. When the computer program is executed by a processor, the steps of the debris flow risk monitoring method in the above method embodiments are implemented.
[0092] The readable storage medium can specifically be various readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc., that can store program codes.
[0093] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A debris flow risk monitoring method, characterized in that: include: Acquire a first image of a debris flow monitoring area at different times within a preset time period, wherein the first image includes a hillside where the debris flow has occurred; and obtaining weather information within the preset time period; Calculating a first risk score for a debris flow based on all the first images, and calculating a second risk score for a debris flow based on all the first images and weather information within the preset time period; Calculating a third risk score according to the first risk score and the second risk score, and when the third risk score is greater than a preset score threshold, obtaining weather information in a future time period, and issuing different degrees of early warning according to the weather information in the future time period and the third risk score; A first risk score of a debris flow is calculated based on all first images, including: Calculating the central position information of the hillside in the first image, the calculation method includes recording two adjacent first images as a third image and a fourth image, respectively, wherein the acquisition time corresponding to the third image is earlier than that of the fourth image; filtering the third image and the fourth image respectively, wherein the three primary color values in the image are filtered out, and a fifth image and a sixth image are obtained after filtering respectively; segmenting the hillside in the fourth image based on the fifth image and the sixth image, calculating the central position information of the hillside in the fourth image according to the segmented hillside image, calculating the risk degree of debris flow according to the calculated central position information, and calculating the first risk score according to the risk degree; Calculating a second risk score of debris flow based on all the first images and weather information within the preset time period includes: Acquire multiple historical first images, annotate each first image, and obtain an annotated historical first image, wherein the annotated information includes three risk categories and the true probability of each risk category, and the three risk categories are level one risk, level two risk, and level three risk; take the risk category with the highest true probability corresponding to each first image as the target risk category; extract feature information of the annotated historical first image; Based on the feature information, all the annotated historical first images are clustered to obtain multiple clusters; for each cluster, the number of annotated historical first images with a target risk category of level one risk is counted to obtain a first value, the number of annotated historical first images with a target risk category of level two risk is counted to obtain a second value, the number of annotated historical first images with a target risk category of level three risk is counted to obtain a third value, and the number of annotated historical first images contained in each cluster is counted to obtain a fourth value; the ratio of the maximum value among the first value, the second value, and the third value to the fourth value is recorded as a fifth value; all the annotated historical first images are screened according to the fifth value, the model is trained using the remaining annotated historical first images after the screening to obtain a risk identification model, and the second risk score is obtained based on the risk identification model.
2. The debris flow risk monitoring method according to claim 1, characterized in that: Calculating the center position information of the hillside in the fourth image according to the segmented hillside image, calculating the risk level of debris flow according to the calculated center position information, and calculating the first risk score according to the risk level, including: Subtract the grayscale value of each pixel in the fifth image from the grayscale value of each pixel in the sixth image to obtain a seventh image; perform adaptive histogram equalization on the seventh image, wherein the image is divided into 8×8 sub-blocks, and histogram equalization is performed in each sub-block, and the contrast slope is limited to ≤3; then perform adaptive threshold binarization, wherein the Otsu algorithm is used to automatically determine the optimal threshold; then perform corrosion filtering and dilation processing in sequence to obtain an eighth image; determine the contour information of the hillside in the eighth image, and calculate the center position information of the hillside in the fourth image based on the contour information; correct the center position information, and after the correction, all the calculated center position information is sequentially displayed on the two-dimensional coordinate axis in chronological order, and the corresponding center position information at different times; The center position information corresponding to different moments is connected, and after the connection, the first information between two adjacent line segments is calculated, wherein one of the two adjacent line segments close to the ordinate is extended, and the sine value of the angle between the extended line segment and the other line segment is recorded as the first information; the first-order difference of two adjacent first information is calculated to obtain the second information; the standard deviation of all the second information is calculated, and the standard deviation is compared and analyzed with the preset standard deviation threshold range to obtain the risk degree of the slope, and the first risk score is calculated according to the risk degree.
3. A debris flow risk monitoring device, characterized in that: include: An acquisition module, used to acquire a first image of the debris flow monitoring area at different times within a preset time period, wherein the first image includes a hillside where the debris flow has occurred; and obtaining weather information within the preset time period; An early warning module, configured to calculate a first risk score of a debris flow based on all the first images, and to calculate a second risk score of a debris flow based on all the first images and weather information within the preset time period; Calculating a third risk score according to the first risk score and the second risk score, and when the third risk score is greater than a preset score threshold, obtaining weather information in a future time period, and issuing different degrees of early warning according to the weather information in the future time period and the third risk score; A first risk score of a debris flow is calculated based on all first images, including: Calculating the central position information of the hillside in the first image, the calculation method includes recording two adjacent first images as a third image and a fourth image, respectively, wherein the acquisition time corresponding to the third image is earlier than that of the fourth image; filtering the third image and the fourth image respectively, wherein the three primary color values in the image are filtered out, and a fifth image and a sixth image are obtained after filtering respectively; segmenting the hillside in the fourth image based on the fifth image and the sixth image, calculating the central position information of the hillside in the fourth image according to the segmented hillside image, calculating the risk degree of debris flow according to the calculated central position information, and calculating the first risk score according to the risk degree; Calculating a second risk score of debris flow based on all the first images and weather information within the preset time period includes: Acquire multiple historical first images, annotate each first image, and obtain an annotated historical first image, wherein the annotated information includes three risk categories and the true probability of each risk category, and the three risk categories are level one risk, level two risk, and level three risk; take the risk category with the highest true probability corresponding to each first image as the target risk category; extract feature information of the annotated historical first image; Based on the feature information, all the annotated historical first images are clustered to obtain multiple clusters; for each cluster, the number of annotated historical first images with a target risk category of level one risk is counted to obtain a first value, the number of annotated historical first images with a target risk category of level two risk is counted to obtain a second value, the number of annotated historical first images with a target risk category of level three risk is counted to obtain a third value, and the number of annotated historical first images contained in each cluster is counted to obtain a fourth value; the ratio of the maximum value among the first value, the second value, and the third value to the fourth value is recorded as a fifth value; all the annotated historical first images are screened according to the fifth value, the model is trained using the remaining annotated historical first images after the screening to obtain a risk identification model, and the second risk score is obtained based on the risk identification model.
4. The debris flow risk monitoring device according to claim 3, characterized in that: Early warning module, including: A first calculation unit is used to calculate the central position information of the hillside in the first image, and the calculation method includes recording two adjacent first images as a third image and a fourth image, respectively, and the acquisition time corresponding to the third image is earlier than that of the fourth image; filtering the third image and the fourth image respectively, wherein the three primary color values in the image are filtered out, and a fifth image and a sixth image are obtained after filtering respectively; the hillside in the fourth image is segmented based on the fifth image and the sixth image, and the central position information of the hillside in the fourth image is calculated according to the segmented hillside image, and the risk degree of debris flow is calculated according to the calculated central position information, and the first risk score is calculated according to the risk degree.
5. The debris flow risk monitoring device according to claim 4, characterized in that: The first computing unit comprises: The second calculation unit is used to subtract the grayscale value of each pixel in the fifth image from the grayscale value of each pixel in the sixth image to obtain a seventh image; perform adaptive histogram equalization processing on the seventh image, wherein the image is divided into 8×8 sub-blocks, and histogram equalization is performed in each sub-block, and the contrast slope is limited to ≤3; then perform adaptive threshold binarization processing, wherein the optimal threshold is automatically determined using the Otsu algorithm; then perform corrosion filtering and dilation processing in sequence to obtain an eighth image; determine the contour information of the hillside in the eighth image, and calculate the center position information of the hillside in the fourth image according to the contour information; correct the center position information, and after the correction, all the calculated center position information is sequentially reflected on the two-dimensional coordinate axis according to the chronological order. The third calculation unit is used to connect the central position information corresponding to different moments, and calculate the first information between two adjacent line segments after the connection, wherein a line segment close to the ordinate of the two adjacent line segments is extended, and the sine value of the angle between the line segment and the other line segment after the extension is recorded as the first information; calculate the first-order difference of two adjacent first information to obtain the second information; calculate the standard deviation of all the second information, compare and analyze the standard deviation with a preset standard deviation threshold range to obtain the risk level of the slope, and calculate the first risk score based on the risk level.
6. The debris flow risk monitoring device according to claim 4, characterized in that: Early warning module, including: an acquisition unit, used to acquire a plurality of historical first images, annotate each first image, and obtain an annotated historical first image, wherein the annotated information includes three risk categories and the true probability of each risk category, wherein the three risk categories are level one risk, level two risk, and level three risk; the risk category with the highest true probability corresponding to each first image is taken as the target risk category; and feature information of the annotated historical first image is extracted; A training unit is used to cluster all the annotated historical first images based on the feature information to obtain multiple clusters; for each cluster, count the number of annotated historical first images with a target risk category of level one risk to obtain a first value, count the number of annotated historical first images with a target risk category of level two risk to obtain a second value, count the number of annotated historical first images with a target risk category of level three risk to obtain a third value, and count the number of annotated historical first images contained in each cluster to obtain a fourth value; record the ratio of the maximum value among the first value, the second value, and the third value to the fourth value as a fifth value; screen all the annotated historical first images according to the fifth value, train the model using the annotated historical first images remaining after the screening to obtain a risk identification model, and obtain the second risk score based on the risk identification model.
7. A debris flow risk monitoring device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the debris flow risk monitoring method as described in any one of claims 1 to 2 when executing the computer program.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the debris flow risk monitoring method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Debris flow and landslide positioning and classifying method based on natural images
CN119107483A
Mountain debris flow dynamic early warning method based on deep learning
CN119559764A