Training method and device of all-terrain landslide trajectory prediction model
Patent Information
- Application Number
- CN202311634335.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-11-30
AI Technical Summary
然而,由于公式(1)示出的损失函数的目标项和模型的输出结果没有函数关系
[0048] Since the loss function used when training the all-terrain landslide trajectory prediction model calculates the loss value based on the predicted landslide distance, meaning that the result of the loss function and the model function have a functional relationship, the gradient value can be obtained based on the loss value. Then, the gradient value can be used to train the all-terrain landslide trajectory prediction model using backpropagation, thereby reducing the probability of model training failure due to the loss function being unrelated to the model's output, which helps to reduce the difficulty of predicting landslide trajectories.
Smart Images

Figure CN117726898B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geological hazards, specifically to a training method and apparatus for an all-terrain landslide trajectory prediction model. Background Technology
[0002] A landslide is a natural disaster where a large amount of soil and rock slides down a slope. Landslides are a major type of geological hazard, commonly found in mountainous areas, and pose a significant threat to life and property. Therefore, assessing landslide risk and its subsequent impact is crucial for disaster prevention and mitigation. Assessing the impact of a landslide can be described as predicting its trajectory based on topographical and geological information and triggering factors such as rainfall, given a known landslide source. The area affected by this trajectory and the extent of the landslide's impact constitute the landslide trajectory prediction.
[0003] When using a deep learning model to predict landslide trajectories, during the model training phase, a loss function can be constructed based on the matching error of the optimal stop point on the elevation map and the actual matching error of the optimal stop point. The results of the loss function can then be used to adjust the model parameters.
[0004] For example, during the model training phase, the loss function used is as shown in the following formula (1).
[0005]
[0006] In formula (1), J(θ) is the output of the loss function, and J(θ) is used to measure the performance of the model. N is the number of landslide records, i represents the i-th landslide record, and L... i The distance represents the actual landslide distance corresponding to the i-th landslide record, and T represents the elevation map. This represents the distance between the optimal stop point k on the path with the steepest slope corresponding to the i-th landslide record and the landslide source on the elevation map. k represents the number of the optimal stop point selected by the minimum matching error method.
[0007] Deep learning models commonly use backpropagation to update model parameters, which involves taking the partial derivatives of the loss function with respect to the model parameters and then updating the model parameters based on these partial derivatives, thus bringing the model's predictions closer to the direction of minimizing the loss function. However, since the objective term of the loss function shown in Equation (1) and the model's output have no functional relationship, the lack of a functional relationship means that partial derivatives cannot be calculated, which in turn means that gradients cannot be calculated. This renders gradient-based model optimization infeasible, causing model training failure and making it impossible to predict landslide trajectories using the model. Summary of the Invention
[0008] This application provides a training method and apparatus for an all-terrain landslide trajectory prediction model, which helps reduce the probability of model training failure due to the loss function being unrelated to the model's output, thereby reducing the difficulty of predicting landslide trajectories. The technical solution is as follows.
[0009] In a first aspect, a training method for an all-terrain landslide trajectory prediction model is provided. The method includes: inputting all-terrain landslide trajectory samples into the all-terrain landslide trajectory prediction model, and determining a predicted landslide distance based on the all-terrain landslide trajectory samples through the all-terrain landslide trajectory prediction model, wherein the predicted landslide distance indicates the distance between the landslide source and the landslide stopping point.
[0010] A loss function is used to calculate the loss value based on the predicted landslide distance and the sample landslide distance. The loss function is used to enable the all-terrain landslide trajectory prediction model to perform a selection task. The loss value is used to indicate the performance of the all-terrain landslide trajectory prediction model in performing the selection task, which is a learning task of selecting the optimal stop point from the candidate stop points among the landslide stop points.
[0011] Based on the loss value and the current model parameters of the all-terrain landslide trajectory prediction model, the gradient value is obtained;
[0012] The current model parameters of the all-terrain landslide trajectory prediction model are updated using back gradient propagation based on the gradient value, so that the loss value corresponding to the predicted landslide distance determined by the all-terrain landslide trajectory prediction model meets the predetermined conditions.
[0013] In some implementations, the step of employing a loss function based on the predicted landslide distance and the sample landslide distance to obtain the loss value of the all-terrain landslide trajectory prediction model performing the selection task includes:
[0014] The first matching error corresponding to the optimal stop point is determined based on the predicted landslide distance corresponding to the optimal stop point and the sample landslide distance corresponding to the optimal stop point;
[0015] The second matching error corresponding to the non-optimal stop point is determined based on the predicted landslide distance corresponding to the non-optimal stop point and the sample landslide distance corresponding to the non-optimal stop point. The non-optimal stop point is any stop point other than the optimal stop point among the candidate stop points.
[0016] The loss value of the all-terrain landslide trajectory prediction model for performing the selection task is determined based on the first matching error and the second matching error, wherein the loss value of the selection task is positively correlated with the difference between the first matching error and the second matching error.
[0017] In some implementations, determining the first matching error corresponding to the optimal stopping point based on the predicted landslide distance corresponding to the optimal stopping point and the sample landslide distance corresponding to the optimal stopping point includes:
[0018] Based on the grid where the landslide source is located on the elevation map and the grid where the optimal resting point is located on the elevation map, the landslide distance on the elevation map corresponding to the optimal resting point is determined. The landslide distance on the elevation map indicates the distance between the optimal resting point and the landslide source on the elevation map.
[0019] The difference between the landslide distance on the elevation map corresponding to the optimal stop point and the predicted landslide distance corresponding to the optimal stop point is determined to obtain the first matching error corresponding to the optimal stop point.
[0020] In some implementations, determining the second matching error corresponding to the non-optimal stopping point based on the predicted landslide distance corresponding to the non-optimal stopping point and the sample landslide distance corresponding to the non-optimal stopping point includes:
[0021] Based on the grid where the landslide source is located on the elevation map and the grid where the non-optimal resting point is located on the elevation map, the landslide distance on the elevation map corresponding to the non-optimal resting point is determined. The landslide distance on the elevation map indicates the distance between the non-optimal resting point and the landslide source on the elevation map.
[0022] The difference between the landslide distance on the elevation map corresponding to the non-optimal stop point and the predicted landslide distance corresponding to the non-optimal stop point is determined to obtain the second matching error corresponding to the non-optimal stop point.
[0023] In some implementations, determining the loss value for the all-terrain landslide trajectory prediction model to perform the selection task based on the first matching error and the second matching error includes:
[0024] The maximum value is determined from the gap between the first matching error and the second matching error and a predetermined gap term to obtain the loss value of the all-terrain landslide trajectory prediction model when performing the selection task.
[0025] In some implementations, the loss function is calculated based on the predicted landslide distance and the sample landslide distance to obtain a loss value, including:
[0026] For each non-optimal stop point among all candidate stop points in the landslide path, determine the second matching error corresponding to each non-optimal stop point based on the predicted landslide distance corresponding to each non-optimal stop point and the sample landslide distance corresponding to each non-optimal stop point.
[0027] Determine the difference between the second matching error corresponding to each of the non-optimal stopping points and the first matching error corresponding to the optimal stopping point;
[0028] Based on the sum of the differences in the second matching errors corresponding to each of the non-optimal stopping points and the total number of all candidate stopping points in the landslide path, the loss value of the all-terrain landslide trajectory prediction model in performing the selection task is determined.
[0029] In some implementations, the all-terrain landslide trajectory sample includes multiple landslide records, and the loss function is used to calculate the loss value based on the predicted landslide distance and the sample landslide distance, including:
[0030] Each landslide record in the multiple landslide records is traversed, and calculations are performed based on the predicted landslide distance and the sample landslide distance corresponding to each landslide record to obtain the matching error corresponding to each landslide record.
[0031] The average matching error for each landslide record is determined to obtain the loss value.
[0032] Secondly, a training device for an all-terrain landslide trajectory prediction model is provided, the device comprising:
[0033] The input unit is used to input all-terrain landslide trajectory samples into the all-terrain landslide trajectory prediction model, and the all-terrain landslide trajectory prediction model determines the predicted landslide distance based on the all-terrain landslide trajectory samples. The predicted landslide distance indicates the distance between the landslide source and the landslide stopping point.
[0034] The computation unit is used to perform calculations based on the predicted landslide distance and the sample landslide distance using a loss function to obtain a loss value. The loss function is used to enable the all-terrain landslide trajectory prediction model to perform a selection task. The loss value is used to indicate the performance of the all-terrain landslide trajectory prediction model in performing the selection task, which is a learning task of selecting the optimal stop point from the candidate stop points among the landslide stop points.
[0035] An adjustment unit is used to obtain a gradient value based on the loss value and the current model parameters of the all-terrain landslide trajectory prediction model; and to update the current model parameters of the all-terrain landslide trajectory prediction model using backgradient propagation based on the gradient value, so that the loss value corresponding to the predicted landslide distance determined by the all-terrain landslide trajectory prediction model meets a predetermined condition.
[0036] In some implementations, the computing unit is configured to: determine a first matching error corresponding to the optimal stop point based on the predicted landslide distance corresponding to the optimal stop point and the sample landslide distance corresponding to the optimal stop point; determine a second matching error corresponding to a non-optimal stop point based on the predicted landslide distance corresponding to a non-optimal stop point and the sample landslide distance corresponding to the non-optimal stop point, wherein the non-optimal stop point is another stop point among the candidate stop points besides the optimal stop point; and determine a loss value for the all-terrain landslide trajectory prediction model to perform the selection task based on the first matching error and the second matching error, wherein the loss value of the selection task is positively correlated with the difference between the first matching error and the second matching error.
[0037] In some embodiments, the computing unit is configured to determine the landslide distance on the elevation map corresponding to the optimal stopping point based on the grid where the landslide source is located and the grid where the optimal stopping point is located on the elevation map, wherein the landslide distance on the elevation map indicates the distance between the optimal stopping point and the landslide source on the elevation map; and to determine the difference between the landslide distance on the elevation map corresponding to the optimal stopping point and the predicted landslide distance corresponding to the optimal stopping point, so as to obtain a first matching error corresponding to the optimal stopping point.
[0038] In some embodiments, the computing unit is configured to determine, based on the grid on the elevation map where the landslide source is located and the grid on the elevation map where the non-optimal resting point is located, the landslide distance on the elevation map indicates the distance between the non-optimal resting point and the landslide source on the elevation map; and to determine the difference between the landslide distance on the elevation map corresponding to the non-optimal resting point and the predicted landslide distance corresponding to the non-optimal resting point, so as to obtain a second matching error corresponding to the non-optimal resting point.
[0039] In some implementations, the determining unit is configured to determine a maximum value from the gap between the first matching error and the second matching error and a predetermined gap term to obtain the loss value of the all-terrain landslide trajectory prediction model performing the selection task.
[0040] In some implementations, the determining unit is configured to traverse each non-optimal stop point among all candidate stop points in the landslide path, determine a second matching error corresponding to each non-optimal stop point based on the predicted landslide distance corresponding to each non-optimal stop point and the sample landslide distance corresponding to each non-optimal stop point; determine the difference between the second matching error corresponding to each non-optimal stop point and the first matching error corresponding to the optimal stop point; and determine the loss value of the all-terrain landslide trajectory prediction model performing the selection task based on the sum of the differences of the second matching errors corresponding to each non-optimal stop point and the total number of all candidate stop points in the landslide path.
[0041] In some implementations, the calculation unit is used to traverse each of the multiple landslide records, perform calculations based on the predicted landslide distance corresponding to each landslide record and the sample landslide distance corresponding to each landslide record, to obtain the matching error corresponding to each landslide record; and determine the average value of the matching error corresponding to each landslide record to obtain the loss value.
[0042] In some embodiments, the all-terrain landslide trajectory sample includes landslide source characteristics, surrounding environment characteristics, and landslide induction characteristics. The landslide source characteristics include landslide source length and landslide source width. The surrounding environment characteristics include elevation difference of landslide descent, slope, curvature, vegetation cover type, and geological type. The landslide induction characteristics include maximum 4-hour precipitation and maximum 24-hour precipitation.
[0043] Thirdly, a computing device is provided, comprising a processor coupled to a memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computing device to implement the method provided by the first aspect or any alternative embodiment of the first aspect. Specific details of the computing device provided in the third aspect can be found in the first aspect or any alternative embodiment of the first aspect, and will not be repeated here.
[0044] Fourthly, a computer-readable storage medium is provided, which stores at least one instruction that, when executed on a computer, causes the computer to perform the method provided in the first aspect or any alternative method of the first aspect.
[0045] Fifthly, a computer program product is provided, the computer program product comprising one or more computer program instructions, which, when loaded and run by a computer, cause the computer to perform the method provided in the first aspect or any alternative method of the first aspect.
[0046] In a sixth aspect, a chip is provided, including a memory and a processor, the memory for storing computer instructions, and the processor for calling and executing the computer instructions from the memory to perform the methods described in the first aspect and any possible implementation thereof.
[0047] The embodiments of this application have the following beneficial effects:
[0048] Since the loss function used when training the all-terrain landslide trajectory prediction model calculates the loss value based on the predicted landslide distance, meaning that the result of the loss function and the model function have a functional relationship, the gradient value can be obtained based on the loss value. Then, the gradient value can be used to train the all-terrain landslide trajectory prediction model using backpropagation, thereby reducing the probability of model training failure due to the loss function being unrelated to the model's output, which helps to reduce the difficulty of predicting landslide trajectories.
[0049] Furthermore, the loss function satisfies the objective of enabling the model to select the optimal stopping point, allowing the model to select the optimal stopping point on the maximum slope path generated by the potential energy algorithm during training, thereby improving the accuracy of landslide trajectory prediction. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of a potential energy reduction algorithm provided in an embodiment of this application;
[0051] Figure 2 This is a flowchart illustrating a training method for an all-terrain landslide trajectory prediction model provided in an embodiment of this application;
[0052] Figure 3 This is a flowchart illustrating a training method for an all-terrain landslide trajectory prediction model provided in an embodiment of this application;
[0053] Figure 4 This application provides a schematic diagram of the structure of a training device for an all-terrain landslide trajectory prediction model.
[0054] Figure 5 This application provides a schematic diagram of the structure of a computing device. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0056] The following explains some terms and concepts involved in the embodiments of this application.
[0057] Matching error: This can be measured by calculating the absolute value abs(ab). A smaller matching error indicates a smaller difference between a and b, meaning a and b are closer. Therefore, matching error can be used to measure the similarity or dissimilarity of two values. For example, matching error is used to measure the difference between a predicted value and the actual value. For instance, matching error is used to measure the difference between the predicted landslide distance and the actual landslide distance.
[0058] The optimal stopping point is the point with the smallest matching error between the landslide distance from the landslide starting point and the actual landslide trajectory among all stopping points on the path with the steepest slope.
[0059] Landslide initiation point: This refers to the location where a landslide begins, i.e., the location of the landslide source or the starting point of the landslide trajectory. For example, based on actual landslide site surveys, the landslide initiation point (the center point of the initial landslide area) can be obtained.
[0060] The maximum slope path refers to the path along which a landslide body slides down its center of gravity during a landslide. Maximum slope paths are generated, for example, by potential energy reduction algorithms. After predicting the landslide's stopping point using machine learning algorithms, the maximum slope path is truncated based on this stopping point to obtain the landslide trajectory. The maximum slope path is, for example, where the slope is greatest in the eight directions surrounding the elevation map. Maximum slope paths generate the greatest potential energy on elevation maps; furthermore, areas with steep slopes typically have poor support, thus making them prone to landslides.
[0061] Landslide distance: This refers to the distance between the starting point and the stopping point of a landslide. For example, after projecting both the starting point and the stopping point onto a two-dimensional horizontal plane, the distance between the projections of the starting point and the stopping point onto the horizontal plane is determined as the landslide distance.
[0062] Actual landslide distance: This refers to the actual landslide distance along the actual landslide trajectory. For example, the actual landslide distance is the distance between the starting point and the stopping point of the landslide along the actual landslide trajectory. For instance, by taking the starting and ending points of the actual landslide trajectory, projecting both onto a two-dimensional horizontal plane, and then determining the distance between the projection of the starting point and the ending point onto the horizontal plane, this distance is taken as the actual landslide distance.
[0063] All-terrain landslide trajectory samples include information such as landslide source characteristics and the terrain traversed by the landslide trajectory. For example, an all-terrain landslide trajectory sample includes landslide trajectory samples from all terrain types. For instance, all-terrain landslide trajectory samples are mainly divided into three categories: landslide source characteristics, surrounding environmental characteristics, and landslide induction characteristics. For example, the content of an all-terrain landslide trajectory sample is shown below.
[0064] Table 1. Sample content of all-terrain landslide trajectories
[0065]
[0066]
[0067] Landslide source characteristics include the length and width of the landslide source. These characteristics help measure the size and shape of the landslide source. The length and width of the landslide source can affect the scale and velocity of the landslide. The slope, curvature, and vegetation cover type of the surrounding environment can influence the stability and sliding mode of the landslide. Furthermore, landslide-inducing characteristics such as precipitation describe the rainfall conditions prior to the landslide; the amount of precipitation can affect the probability of landslide occurrence. Taking all these characteristics into account helps improve the accuracy of models in predicting landslide behavior.
[0068] A loss function indicates the desired outcome of a model, or in other words, the result of the loss function can be used to measure the model's performance on a specific task. The output of the loss function guides how to optimize model parameters. For example, adjusting model parameters based on the output of the loss function can improve the model's performance on a specific task. In some implementations, the loss function includes a loss function that indicates the difference between the model's predictions and the actual results. The smaller the output of the loss function, the closer the model's predictions are to the actual results. Loss functions are typically used during model training, where gradients are calculated using the backpropagation algorithm to update the model's parameters to minimize the loss function.
[0069] Forward propagation is a crucial step in deep learning models. Starting from the model's input, it computes and transmits data layer by layer until it reaches the model's output. During forward propagation, the model uses parameters to compute and transform the input, generating predictions. Specifically, forward propagation passes data along the forward path of the neural network from the input layer to the output layer. The input data at each layer is processed by weights and activation functions, and the resulting output becomes the input for the next layer. This process continues until the output layer, where the model provides its prediction of the input data.
[0070] Backpropagation is a crucial step in deep learning models used for updating parameters. During training, a loss function is typically used to measure the accuracy of the model's predictions. For example, backpropagation updates model parameters by calculating the partial derivatives of the loss function with respect to the model parameters (i.e., gradients), propagating gradient information backward from the output layer along the neural network's path from the input layer to the output layer. Specifically, in backpropagation, the gradient of the output layer is first calculated, and then this gradient is propagated backward to each preceding layer, calculating the gradient of each parameter layer by layer, and updating the parameters based on the gradient information. The gradient calculation and propagation process utilizes the chain rule, which efficiently calculates the gradient of each layer, enabling parameter updates.
[0071] Predicted landslide distance: refers to the landslide distance as the output of the model.
[0072] The following are examples illustrating the application scenarios of embodiments of this application.
[0073] The embodiments of this application can be applied to scenarios involving landslide trajectory prediction, such as large-scale, all-terrain landslide trajectory prediction. For large-scale (1,000 square kilometers or more) landslide trajectory prediction, traditional numerical modeling methods are not feasible due to their high modeling costs and slow computation speed. Data-driven models are more efficient and faster, making them suitable for large-scale landslide trajectory prediction. Traditional data-driven statistical models only consider landslide source information and not complete landslide terrain information, resulting in low prediction accuracy. Therefore, it is necessary to input all-terrain data into the model to improve prediction accuracy. Related literature provides a theoretical method for terrain-matching landslide distance prediction machine learning models that consider all terrain, but the loss functions given in these literatures cannot be practically used for model training. Therefore, it is necessary to design a loss function that considers all terrain, enabling the model to quickly fit on known landslide data and correctly generalize to unknown landslide data. The landslide trajectory prediction method will be further explained below.
[0074] There are two main approaches to landslide trajectory prediction: the first is based on numerical calculation models driven by physical laws, and the second is based on data-driven models. Numerical models can model the entire landslide movement process, taking into account the surrounding terrain data. However, this approach is costly, slow, and often only applicable to single landslides, making it difficult to scale up widely. Data-driven models, on the other hand, use statistical or machine learning methods to fit the relationship between key features and the final landslide distance based on past landslide data, thus predicting future landslide trajectories. Data-driven models are fast, computationally efficient, and easily scaled up. From a physical perspective, landslide movement follows the law of energy conservation. The potential energy released during the descent of the landslide source is dissipated due to friction and other factors during the landslide. Therefore, data-driven models need to consider information along the entire three-dimensional landslide path (such as geological information and vegetation cover) to better depict the potential energy dissipation during the landslide process. Furthermore, traditional data-driven methods are often one-dimensional, treating the slope as an equivalent profile, making it difficult to depict the landslide-affected area. This also requires modeling dimensions, modeling and predicting landslide trajectories in three-dimensional space.
[0075] In landslide distance prediction scenarios, common data-driven models include logistic regression, tree aggregation models (random forests, extreme random trees), and deep learning models. Compared to other models, deep learning models are more scalable and have greater potential. Deep learning models are designed based on the neuronal structure of the human brain, theoretically capable of fitting arbitrary function forms. The network structure and number of network parameters can be adjusted based on the characteristics and size of the dataset. In many artificial intelligence fields such as machine vision and natural language processing, the optimal models are deep learning models. Deep learning models optimize model parameters based on backpropagation, meaning that as long as the loss function is differentiable, the model can fit the data. The latter provides a high degree of freedom in loss function design; within a training batch of data, different learning objectives can be set for different ranges of data and combined into the neural network for learning.
[0076] In a technical solution for landslide distance prediction (Ju LY, Xiao T, He J, et al. Predicting landslide runout paths using terrain matching-targeted machine learning[J].Engineering Geology,2022,311:106902.), the landslide distance prediction is divided into two parts: the first part is the potential energy algorithm, and the second part is the deep learning model.
[0077] The primary responsibility of the potential energy algorithm is to continuously select the most probable landslide path from the current landslide source on the elevation map, based on the criterion of maximizing potential energy decrease. This algorithm only imposes basic constraints on the length of the landslide trajectory. For example, when the distance reaches 1.5 times the historically observed maximum landslide distance, the landslide path is truncated. For an example, please refer to... Figure 1 , Figure 1 A schematic diagram of the potential energy reduction algorithm is shown. Figure 1 Each ball represents a possible stopping point (hereinafter referred to as a candidate stopping point). The optimal stopping point is, for example,... Figure 1 The stop point on the path with the steepest moderate slope where the distance to the landslide source (landslide distance) is closest to the actual landslide distance. For example, in... Figure 1 Among the four balls shown, if the stopping point of the actual landslide trajectory is closest to the third ball, then the third ball is the optimal stopping point. Figure 1 Each ball's position represents one grid cell.
[0078] The primary responsibility of deep learning models is to predict the location where a landslide will stop, based on the landslide path generated by the potential energy algorithm. It's important to note that, for computational convenience, the continuously changing physical world is abstracted as a series of grid cells, i.e., an elevation map, and the physical properties (such as elevation and curvature) within each individual grid cell are assumed to be identical. Therefore, the landslide trajectory generated by the potential energy algorithm is viewed as a line connecting a series of continuous grid cells. The model's prediction of the landslide's stopping location is equivalent to predicting the grid cell where the landslide will stop; this grid cell is the landslide stopping point.
[0079] The deep learning model employs a multilayer perceptron architecture. The input features are categorized into three types: landslide source features, surrounding environment features, and landslide-inducing features, as detailed in Table 1 above. Regarding the processing of specific surrounding environment features, this approach considers the aggregation of features along the entire landslide trajectory, and aggregates all environmental features along the path up to the current possible stop grid (averaging numerical features; using soft voting to obtain the percentage of each category along the path for categorical features). In other words, all surrounding environment features consider information along the path, thus enabling the model to perceive information along the entire landslide path through these features.
[0080] Specifically, for the i-th landslide record among N landslide records, the maximum slope path corresponding to the i-th landslide record is generated using a potential energy algorithm. The optimal stopping point is determined from the maximum slope path using the minimum matching error method. The matching error of the i-th landslide record is determined based on the landslide distance of the optimal stopping point on the elevation map and the actual landslide distance corresponding to the i-th landslide record. The overall matching error of the N landslide records is determined based on the matching error of each individual landslide record. For example, the square of the matching error of each of the N landslide records is calculated, and the summation and averaging of the squared matching errors are used as a loss function to measure the performance of the landslide prediction model.
[0081] For example, during the model training phase, the loss function used is as shown in the following formula (1).
[0082]
[0083] In formula (1), J(θ) is the output of the loss function, and J(θ) is used to measure the performance of the model. N is the number of landslide records, i represents the i-th landslide record, and L... i The distance represents the actual landslide distance corresponding to the i-th landslide record, and T represents the elevation map. This represents the distance between the optimal stop point k on the path with the steepest slope corresponding to the i-th landslide record and the landslide source on the elevation map. k represents the number of the optimal stop point selected by the minimum matching error method.
[0084] In some implementations of determining the optimal stopping point based on the minimum matching error, the computing device traverses all candidate stopping points corresponding to the i-th landslide record in the sample. For each candidate stopping point traversed, the predicted landslide distance of the candidate stopping point is determined based on the model. The predicted landslide distance of the candidate stopping point is compared with the landslide distance of the candidate stopping point on the elevation map to obtain the matching error of the candidate stopping point. After determining the matching error of all candidate stopping points by traversing all candidate stopping points, the computing device selects the stopping point with the smallest matching error from all candidate stopping points based on the matching error of all candidate stopping points, thereby determining the optimal stopping point. For example, the minimum matching error method is described by the following formula (2).
[0085]
[0086] In formula (2), n i The potential energy algorithm generates the number of grid cells on the path with the steepest slope for the i-th landslide record. The model records the predicted landslide distance on the j-th grid corresponding to the landslide path for the i-th landslide. The superscript * in the text represents the predicted value, and the absence of the superscript * represents the actual value. Let be the logarithm of the predicted landslide distance in the j-th grid corresponding to the landslide path of the i-th landslide record. To record the distance from the landslide source to the j-th grid cell corresponding to the landslide path for the i-th landslide. This is the logarithm of the landslide distance from the landslide source to the j-th grid cell corresponding to the landslide path of the i-th landslide record. k is the identifier of the optimal stopping point. The processing logic represented by formula (2) includes comparing the predicted landslide distance with the landslide distance on the elevation map to determine the optimal matching point.
[0087] In general, the starting point of the loss function corresponding to formula (1) is to enable the model to predict the landslide stopping point on the landslide path generated by the potential energy algorithm during training, that is, to select the optimal landslide stopping point. In the prediction stage, the model can select the optimal stopping point based on formula (2), and obtain the predicted landslide distance after calculating the planar distance between the stopping point and the landslide source.
[0088] However, the loss function in this scheme cannot be used for backpropagation. Specifically, the loss function shown in equation (1) in this scheme... With log(L) i The results of equation (2) have no functional relationship with the model's output. The lack of a functional relationship means that partial derivatives cannot be calculated, which in turn means that gradients cannot be calculated, rendering gradient-based model optimization infeasible. To verify this idea, an experiment was conducted on PyTorch, the most commonly used framework in deep learning. The corresponding equation (2) was implemented using the torch.argmin() interface. The operation is based on the torch.abs() interface to implement the loss calculation operation of formula (1). However, when calling the "backward()" operation to calculate the gradient of the loss function calculation result, the PyTorch framework reports the error "RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn" (the calculation result does not support backward gradient calculation). This indicates that the loss function provided by the existing solution cannot be directly used to train the deep learning model. Therefore, it is necessary to construct a loss function that can be used to train the model based on the goal of "letting the model select the best stopping point".
[0089] Considering that the above schemes do not provide a loss function for calculating the backpropagation gradient to facilitate model training convergence, some implementations of this application construct a loss function that can be used to train the model, based on the objective of "allowing the model to select the optimal stopping point". The model's learning objective can be represented by the loss function, and the following text uses the implementation of the loss function to reflect the changes in the model's learning objective.
[0090] First Embodiment
[0091] First, based on the potential energy descent algorithm, the corresponding maximum slope path is generated based on each landslide record. Based on the greedy algorithm and the idea of minimizing the loss function in formula (1), the optimal stopping point is determined from each maximum slope path. Then, the landslide distance predicted by the model is updated in the direction with the minimum matching error corresponding to the optimal stopping point. That is, a loss function that can calculate the reverse gradient is designed. At the same time, the loss function meets the goal of "letting the model select the best stopping point".
[0092] Specifically, the process of selecting the optimal stopping point based on the greedy algorithm can be described by the following formula (3):
[0093]
[0094] In formula (3) above, k represents the number of the optimal stopping point. i represents the identifier of the landslide record. L i This represents the actual landslide distance corresponding to the i-th landslide record. This represents the distance on the elevation map between the grid cell containing the optimal stop point k on the steepest path corresponding to the i-th landslide record and the grid cell containing the landslide source on the elevation map, in a two-dimensional horizontal plane. The steepest path is generated, for example, using a potential energy descent algorithm. argmin represents the parameter value that minimizes a certain function. log represents taking the logarithm.
[0095] The processing logic represented by formula (3) above includes comparing the predicted landslide distance with the actual landslide distance to determine the optimal matching point. Determining the optimal stopping point by comparing it with the actual landslide distance helps to construct a loss function that can perform backpropagation of gradients. Specifically, in the process of determining the optimal stopping point corresponding to the i-th landslide record in the sample, all candidate stopping points corresponding to the i-th landslide record are traversed; for the current candidate stopping point that has been traversed, the distance between the grid where the current candidate stopping point is located on the elevation map and the grid where the landslide source is located (the landslide distance on the elevation map) is used to determine the optimal stopping point. ) and the actual landslide distance corresponding to the i-th landslide record (log(L i Determine the landslide distance on the elevation map corresponding to the current candidate stop point. The absolute value of the difference between the current candidate stopping point and the actual landslide distance is used to obtain the matching error. Based on the matching error of all candidate stop points corresponding to the i-th landslide record, the stop point with the smallest matching error is determined from all candidate stop points corresponding to the i-th landslide record (argmin operation), and is taken as the optimal stop point.
[0096] After selecting the optimal stopping point for each landslide record using formula (3), the matching error corresponding to the optimal stopping point is obtained by comparing the predicted landslide distance output by the model for the optimal stopping point with the landslide distance of the optimal stopping point on the elevation map. The matching error corresponding to the non-optimal stopping point is obtained by comparing the predicted landslide distance output by the model for the non-optimal stopping point with the landslide distance of the non-optimal stopping point on the elevation map. The result of the loss function is determined based on the difference between the matching error corresponding to the optimal stopping point and the matching error corresponding to the non-optimal stopping point, and the update direction of the model parameters is adjusted based on the result of the loss function.
[0097] For example, the following formula (4) can be used to adjust the direction of model parameter updates so that J(θ) changes during the update process. select It's getting smaller and smaller.
[0098]
[0099] In formula (4) above, k represents the number of the optimal stopping point, and i represents the number of the landslide record. i J(θ) represents the number of the optimal stopping point recorded in the i-th landslide; θ represents the model parameters. select This indicates the output of the loss function corresponding to the selected task (e.g., the loss value). The subscript "select" indicates comparison. The partial derivative of the loss function with respect to the model parameters is the partial derivative. i For example, it was selected using formula (3). This represents the matching error for the optimal stopping point, specifically... This represents the predicted landslide distance for the model based on the optimal stopping point k in the i-th landslide record. This represents the predicted landslide distance for the model based on the non-optimal stopping point j in the i-th landslide record. This is used to indicate the difference between the predicted landslide distance of the optimal stop point and the landslide distance of the optimal stop point on the elevation map. This represents the matching error for non-optimal dwell points. Specifically, This is used to indicate the difference between the predicted landslide distance at the non-optimal stop point and the landslide distance on the non-optimal stop point elevation map. This represents the difference between the matching error of the optimal stop point and the matching error of the non-optimal stop point, and is used to make the matching error of the optimal stop point smaller than the matching error of the non-optimal stop point.
[0100] Since formula (4) reflects the difference between the matching error of the optimal stop point and the matching error of the non-optimal stop point, the difference between the matching error of the optimal stop point and the matching error of the non-optimal stop point can be gradually widened through back gradient propagation, so that the model can distinguish between the optimal stop point and the non-optimal stop point.
[0101] Furthermore, since the matching error of the optimal stop point in formula (4) is determined based on the landslide distance on the elevation map, the matching error of the non-optimal stop point is also determined based on the landslide distance on the elevation map. Therefore, it helps the model to determine the matching error based on the same landslide distance in the training and prediction phases, thus avoiding poor model performance due to the different algorithms for determining the matching error based on the landslide distance in the training and prediction phases when the loss function is based on the real landslide distance.
[0102] C i It iterates through the i-th landslide record, incrementing from the stop point number 1 to the stop point number n. i The set formed by the set C i It will exclude the optimal stopping point k i That is, set C i It consists of non-optimal dwell points. This means traversing all the optimal stopping points in the i-th landslide record. Since traversing all the optimal stopping points in the i-th landslide record is equivalent to referencing the terrain information of all the optimal stopping points in the i-th landslide record, thereby improving the accuracy of the model's prediction results and enhancing the model's generalization ability.
[0103] n i This represents the number of candidate stopping points in the path with the maximum potential energy generated by the landslide record. For example, n i This represents the number of grid cells traversed along a path with maximum potential energy. In formula (4) above... This is to improve convergence stability. Without 1 / n_i, the path length generated from the landslide record would directly affect the loss function calculation. That is, longer paths would carry more weight in the loss function calculation. However, by dividing by n_i, the loss function values of different paths can fall into the same order of magnitude, thus balancing the weights among different paths. This 1 / n_i can be understood as a "scaling factor" for each landslide record generation path. The more candidate stop points in the path, the smaller this scaling factor; the fewer candidate stop points in the path, the larger the scaling factor. Therefore, when calculating the loss function, the weights among different paths can be more balanced, thereby improving the model's training stability and convergence speed.
[0104] N represents the number of all-terrain landslide trajectory samples, in the above formula (4) This is to maintain the stability of the magnitude of the loss function.
[0105] ε is a number greater than 0, also known as the distance term. By adding -ε to the max function, the loss function requires that the matching error calculated for non-optimal stop points be ε greater than the matching error for the optimal stop point. This ε constraint is for numerical stability. Without it, the model might over-optimize in pursuit of a smaller loss function value, thus learning unnecessary noise. In other words, -ε prevents the model from overfitting during optimization. When the difference between the model's predicted landslide distance and the sample landslide distance is sufficiently small—that is, when a relatively stable level is reached—further optimization may only increase the noise without significantly improving model performance. Therefore, by limiting the difference between non-optimal and optimal stop points, overfitting can be effectively prevented, thereby improving the model's generalization ability.
[0106] This represents the optimal stopping point k on the path with the maximum slope corresponding to the i-th landslide record. i The distance between the landslide source and the elevation map. k represents the number of the optimal stopping point selected by the minimum matching error method.
[0107] Because J(θ) select The matching error between the optimal stop point and the non-optimal stop point is positively correlated. Therefore, after adjusting the model parameters based on the loss value of the task selection, the difference between the matching error between the optimal stop point and the non-optimal stop point becomes smaller and smaller. In other words, the error of the optimal stop point is becoming smaller and smaller relative to the error of the non-optimal stop point, thus enabling the model to select the optimal stop point.
[0108] Compared to the original formula (1), the biggest advantage of formula (4) is that it can solve for the backpropagation gradient. First, the terms in formula (4) All are predicted by the model and have a functional relationship with the model parameters; secondly, the operators used in formula (4) are differentiable in most numerical ranges. This is the implementation idea of the single learning task loss function. This learning idea allows the model to predict a smaller matching error at the optimal dwell point than at other dwell points.
[0109] First Embodiment
[0110] The first embodiment is a generalization of the method described in the first embodiment. For example, please refer to the appendix. Figure 3 , attached Figure 3 This is a flowchart illustrating a training method for an all-terrain landslide trajectory prediction model provided in an embodiment of this application. (Attached) Figure 3 The method shown includes the following steps S510 to S540.
[0111] Step S510: The computing device inputs the all-terrain landslide trajectory samples into the all-terrain landslide trajectory prediction model.
[0112] In some implementations, the all-terrain landslide trajectory sample includes N landslide records, where N is a positive integer greater than or equal to 1. The computing device sequentially inputs each of the N landslide records into the all-terrain landslide trajectory prediction model to obtain N predicted landslide distances corresponding to the N landslide records.
[0113] In some implementations, the all-terrain landslide trajectory sample is a comprehensive landslide trajectory sample. For example, N landslide records include landslide records from various terrain types.
[0114] In some implementations, the all-terrain landslide trajectory sample includes the features shown in Table 1. Because the all-terrain landslide trajectory sample includes features of both the landslide source and the landslide trajectory, the model can consider not only the landslide source but also the terrain of the area traversed by the landslide trajectory, thereby improving the accuracy of the model's predictions.
[0115] In step S520, the computing device determines the predicted landslide distance based on the all-terrain landslide trajectory samples using the all-terrain landslide trajectory prediction model. The predicted landslide distance indicates the distance between the landslide source and the landslide stopping point.
[0116] In some implementations, the computing device generates N paths with the maximum slope based on N landslide records in the all-terrain landslide trajectory sample using a potential energy reduction algorithm; for the i-th path with the maximum slope among the N paths with the maximum slope, the computing device determines the optimal stopping point from the path with the maximum slope using a greedy algorithm; the computing device determines the predicted landslide distance output by the optimal stopping point through the all-terrain landslide trajectory prediction model.
[0117] In some implementations for determining the optimal stop point, the computing device compares the actual landslide distance with the elevation map distance (landslide distance on the elevation map) between each candidate stop point and the landslide source along a path with the steepest slope, thereby determining the difference between the elevation map distance and the actual landslide distance for each candidate stop point. Based on the difference between the elevation map distance and the actual landslide distance for each candidate stop point, the computing device determines the matching error for each candidate stop point. Based on the matching error for each candidate stop point, the computing device determines the stop point with the smallest matching error from among the candidate stop points, thus obtaining the optimal stop point. The matching error for a candidate stop point is, for example, the difference or ratio between the elevation map distance and the actual landslide distance for that candidate stop point.
[0118] In some implementations, the computing device performs forward propagation based on all-terrain landslide trajectory samples using an all-terrain landslide trajectory prediction model, and generates and outputs the predicted landslide distance using the all-terrain landslide trajectory prediction model.
[0119] In some implementations, the computing device extracts features from all-terrain landslide trajectory samples using current parameters in the all-terrain landslide trajectory prediction model, obtaining the features of the all-terrain landslide trajectory samples. Based on the features of the all-terrain landslide trajectory samples, the computing device uses a planning function to calculate the predicted landslide distance.
[0120] In some implementations, the all-terrain landslide trajectory prediction model employs a multilayer perceptron (MLP) neural network structure. An MLP is a deep learning model that consists of an input layer, several hidden layers, and an output layer. Each layer comprises neurons connected by weights and biases.
[0121] In some implementations, the computing device uses the following formula (8) to determine the predicted landslide distance based on all-terrain landslide trajectory samples.
[0122] log(L*)=w2*f(w1*x+b1)+b2;Formula (8)
[0123] In formula (8), w1, w2, b1, and b2 represent the model parameters, f() represents the activation function, and x represents the features of the input sample. Through the forward propagation process of the model, the features of the landslide source and the landslide trajectory contained in the all-terrain landslide trajectory sample undergo a series of calculations and transformations to finally obtain the predicted landslide distance. Specifically, the feature x of the all-terrain landslide trajectory sample is multiplied by the weight w1 and a bias b1 is added. Then, through the action of the activation function f(), a nonlinear transformation is performed on this result. Next, the transformed result is multiplied by the weight w2 and a bias b2 is added again. Applying the logarithmic (log) function to this result, the predicted landslide distance log(L*) is obtained. By adjusting the model parameters w1, w2, b1, and b2, and selecting an appropriate activation function f(), the all-terrain landslide trajectory prediction model can provide a prediction of the landslide distance based on the features of the input sample.
[0124] In step S530, the computing device uses a loss function to perform calculations based on the predicted landslide distance and the sample landslide distance to obtain the loss value of the all-terrain landslide trajectory prediction model for performing the selected task.
[0125] The loss function is used to enable the all-terrain landslide trajectory prediction model to perform a selection task. For example, the loss function is used to enable the model to select a target stop point from all candidate stop points corresponding to a landslide record. In some implementations, the loss function includes formula (4).
[0126] The task is selected as a learning task to select the optimal stop point from the candidate stop points in the landslide stop point selection.
[0127] The loss value is used to indicate the performance of the all-terrain landslide trajectory prediction model in performing a selection task. Specifically, the loss value is used to evaluate the performance of the all-terrain landslide trajectory prediction model when performing a selection task. The loss value also represents the performance of the current parameters of the all-terrain landslide trajectory prediction model on all-terrain landslide trajectory samples. The loss value can guide the optimization of the parameters of the all-terrain landslide trajectory prediction model, thereby improving the accuracy of the prediction results.
[0128] In some implementations, the loss function includes a loss function that enables the all-terrain landslide trajectory prediction model to perform a selection task. The following provides an example of a data processing method using a loss function.
[0129] In some implementations, the computing device uses a loss function to determine a first matching error corresponding to the optimal stop point and a second matching error corresponding to a non-optimal stop point, where the non-optimal stop point is any stop point other than the optimal stop point among the candidate stop points. The computing device then uses the loss function to determine the loss value for the all-terrain landslide trajectory prediction model to perform a selection task based on the first and second matching errors. The loss value for the selection task is positively correlated with the difference between the first and second matching errors. Because the loss value for the selection task is positively correlated with the difference between the first and second matching errors, adjusting the model parameters based on the loss value for the selection task makes the difference between the first and second matching errors increasingly smaller. In other words, the error at the optimal stop point becomes increasingly smaller than the error at the non-optimal stop point, thus enabling the model to select the optimal stop point.
[0130] In some implementations, the computing device uses a loss function to compare the predicted landslide distance corresponding to the optimal stop point with the sample landslide distance corresponding to the optimal stop point to obtain a first matching error, which indicates the difference between the predicted landslide distance corresponding to the optimal stop point and the sample landslide distance corresponding to the optimal stop point; and uses a loss function to compare the predicted landslide distance corresponding to the non-optimal stop point with the sample landslide distance corresponding to the non-optimal stop point to obtain a second matching error, which indicates the difference between the predicted landslide distance corresponding to the non-optimal stop point and the sample landslide distance corresponding to the non-optimal stop point.
[0131] In some implementations, the computing device employs a loss function to determine the maximum value from the difference between the first matching error and the second matching error, as well as a predetermined gap term, to obtain the loss value for the all-terrain landslide trajectory prediction model to perform the selection task.
[0132] For example, the loss function includes formula (4), and the loss value for selecting the task includes J(θ) in formula (4). select The first matching error corresponding to the optimal dwell point includes the following in formula (4): The second matching error corresponding to the non-optimal dwell point includes the following in formula (4): The predetermined gap term includes -ε in formula (4). In other embodiments, formula (4) is used instead of -ε. The difference between the predicted landslide distance and the actual landslide distance at the optimal stopping point is replaced by the loss function.
[0133] In some implementations, the computing device takes the logarithm of the predicted landslide distance corresponding to the optimal stop point; the computing device takes the logarithm of the sample landslide distance corresponding to the optimal stop point; the computing device determines a loss value based on the logarithm of the predicted landslide distance corresponding to the optimal stop point, the logarithm of the sample landslide distance corresponding to the optimal stop point, the predicted landslide distance corresponding to the non-optimal stop point, and the logarithm of the sample landslide distance corresponding to the non-optimal stop point, and uses the loss value to adjust the parameters of the model.
[0134] Considering that the logarithmic value of the landslide distance falls within a relatively small range (1-10), while the original landslide distance without logarithmic calculation would range from 1-2000, the larger range of the original landslide distance means that the model would need to learn larger weights and biases. This implies that the model would have to travel a longer distance from its initial values to its optimal values during training, resulting in slower convergence and less stability. Therefore, by taking the logarithm of the landslide distance, the model can directly fit the logarithmic landslide distance, leading to faster and more stable training convergence.
[0135] In some implementations, the computing device determines a sample landslide distance corresponding to the optimal stopping point based on the grid on the elevation map where the landslide source is located and the grid on the elevation map where the optimal stopping point is located. The sample landslide distance indicates the distance between the optimal stopping point and the landslide source on the elevation map. Based on the grid on the elevation map where the landslide source is located and the grid on the elevation map where the non-optimal stopping point is located, the computing device determines a sample landslide distance corresponding to the non-optimal stopping point. The sample landslide distance indicates the distance between the non-optimal stopping point and the landslide source on the elevation map.
[0136] In some implementations, the computing device traverses every non-optimal stop point among all candidate stop points in the landslide path. The computing device uses a loss function to determine the second matching error corresponding to each non-optimal stop point; it then determines the difference between the second matching error corresponding to each non-optimal stop point and the first matching error corresponding to the optimal stop point; based on the sum of the differences in the second matching errors corresponding to each non-optimal stop point and the total number of candidate stop points in the landslide path, it determines the loss value for the all-terrain landslide trajectory prediction model to perform the selection task. Since every non-optimal stop point among all candidate stop points in the landslide path is traversed, it is equivalent to achieving screening across the entire terrain, meaning the model can perceive all candidate stop points in the path with the steepest slope and can distinguish the optimal stop point. Because the model references more terrain information, its generalization ability is enhanced.
[0137] In some implementations, the distance between the starting point of the actual landslide trajectory and the actual landslide stopping point is determined to obtain the actual landslide distance corresponding to the optimal stopping point; the predicted landslide distance corresponding to the optimal stopping point is compared with the actual landslide distance corresponding to the optimal stopping point to obtain a first matching error.
[0138] In some implementations, the distance between the grid cell where the landslide source is located on the elevation map and the grid cell where the optimal resting point is located on the elevation map is determined to obtain the landslide distance on the elevation map corresponding to the optimal resting point;
[0139] The predicted landslide distance corresponding to the optimal stop point is compared with the landslide distance on the elevation map corresponding to the optimal stop point to obtain the first matching error.
[0140] Step S540: The computing device obtains the gradient value based on the loss value and the current model parameters of the all-terrain landslide trajectory prediction model.
[0141] In step S550, the computing device updates the current model parameters of the all-terrain landslide trajectory prediction model based on the gradient value using back gradient propagation, so that the loss value corresponding to the predicted landslide distance determined by the all-terrain landslide trajectory prediction model meets the predetermined conditions.
[0142] For example, after determining the loss value based on the current model parameters and loss function of the landslide trajectory model, the gradient of the loss value with respect to the current model parameters is determined, and the current model parameters are updated based on the gradient, so that the current model parameters move closer to the direction with smaller loss value (better to perform the selection task and approximation task).
[0143] In some implementations, the loss value of performing a selection task on the all-terrain landslide trajectory prediction model is fused with the loss value of performing an approximation task on the all-terrain landslide trajectory prediction model to obtain a target loss value; the parameters of the all-terrain landslide trajectory prediction model are adjusted based on the target loss value.
[0144] In some implementations, the target loss value is obtained by weighting and summing the loss values of the all-terrain landslide trajectory prediction model performing the selection task and the approximation task, based on the weights corresponding to the selection task and the approximation task.
[0145] In some implementations, if the loss function of the all-terrain landslide trajectory prediction model on the training set does not decrease after training for several epochs, indicating that the model's performance on the training data has not significantly improved, then training is stopped. For example, a maximum number of epochs can be set, and the number of training epochs can be recorded. Once the maximum number of training epochs is reached, training is stopped, thereby controlling training time and resource consumption and reducing the probability of overfitting.
[0146] The method provided in this embodiment applies the idea of multi-task learning to the business scenario of landslide trajectory prediction. It uses a loss function that includes multiple learning tasks to train the landslide distance prediction model, which enables the landslide distance prediction model to not only select the optimal stop point from the candidate stop points, but also to predict the landslide distance at the optimal stop point to be close to the sample landslide distance, thereby improving the accuracy of landslide trajectory prediction.
[0147] Figure 4 This application provides a schematic diagram of the structure of a training device 600 for an all-terrain landslide trajectory prediction model, the device comprising:
[0148] The input unit 610 is used to input all-terrain landslide trajectory samples into the all-terrain landslide trajectory prediction model, and to determine the predicted landslide distance based on the all-terrain landslide trajectory samples through the all-terrain landslide trajectory prediction model. The predicted landslide distance indicates the distance between the landslide source and the landslide stopping point.
[0149] The computation unit 620 is used to perform calculations based on the predicted landslide distance and the sample landslide distance using a loss function to obtain the loss value of the all-terrain landslide trajectory prediction model performing the selection task. The loss function is used to enable the all-terrain landslide trajectory prediction model to perform the selection task, which includes a selection task and an approximation task. The loss value is used to indicate the performance of the all-terrain landslide trajectory prediction model in performing the selection task and the approximation task. The selection task is a learning task to select the optimal stop point from the candidate stop points in the landslide stop points. The approximation task is a learning task to predict the landslide distance at the optimal stop point to be close to the sample landslide distance.
[0150] The adjustment unit 630 is used to adjust the parameters of the all-terrain landslide trajectory prediction model based on the loss value, so that the loss value corresponding to the predicted landslide distance determined by the all-terrain landslide trajectory prediction model meets the predetermined conditions.
[0151] In some implementations, the loss function includes a loss function that enables the all-terrain landslide trajectory prediction model to perform a selection task. The computing unit 620 is used to determine, using the loss function, a first matching error corresponding to the optimal stop point and a second matching error corresponding to a non-optimal stop point, wherein the non-optimal stop point is any stop point other than the optimal stop point among the candidate stop points; and using the loss function, based on the first matching error and the second matching error, to determine the loss value of the all-terrain landslide trajectory prediction model performing the selection task, wherein the loss value of the selection task is positively correlated with the difference between the first matching error and the second matching error.
[0152] In some embodiments, the computation unit 620 is configured to compare the predicted landslide distance corresponding to the optimal stop point with the sample landslide distance corresponding to the optimal stop point using a loss function to obtain a first matching error, the first matching error indicating the difference between the predicted landslide distance corresponding to the optimal stop point and the sample landslide distance corresponding to the optimal stop point; and to compare the predicted landslide distance corresponding to the non-optimal stop point with the sample landslide distance corresponding to the non-optimal stop point using a loss function to obtain a second matching error, the first matching error indicating the difference between the predicted landslide distance corresponding to the non-optimal stop point and the sample landslide distance corresponding to the non-optimal stop point.
[0153] In some embodiments, the apparatus further includes:
[0154] The determination unit is used to determine the sample landslide distance corresponding to the optimal rest point based on the grid where the landslide source is located on the elevation map and the grid where the optimal rest point is located on the elevation map. The sample landslide distance indicates the distance between the optimal rest point and the landslide source on the elevation map. Based on the grid where the landslide source is located on the elevation map and the grid where the non-optimal rest point is located on the elevation map, the determination unit is used to determine the sample landslide distance corresponding to the non-optimal rest point. The sample landslide distance indicates the distance between the non-optimal rest point and the landslide source on the elevation map.
[0155] In some implementations, a determining unit is used to employ a loss function to determine the maximum value from the gap between the first matching error and the second matching error, as well as a predetermined gap term, to obtain the loss value of the all-terrain landslide trajectory prediction model performing the selection task.
[0156] In some implementations, a determining unit is used to traverse each non-optimal stopping point among all candidate stopping points in the landslide path, and use a loss function to determine the second matching error corresponding to each non-optimal stopping point; determine the difference between the second matching error corresponding to each non-optimal stopping point and the first matching error corresponding to the optimal stopping point; and determine the loss value for the all-terrain landslide trajectory prediction model to perform the selection task based on the sum of the differences of the second matching errors corresponding to each non-optimal stopping point and the total number of all candidate stopping points in the landslide path.
[0157] In some implementations, the loss function includes a second loss function, which enables the all-terrain landslide trajectory prediction model to perform an approximation task. The computing unit 620 is used to compare the predicted landslide distance corresponding to the optimal stop point with the sample landslide distance corresponding to the optimal stop point using the second loss function to obtain a first matching error corresponding to the optimal stop point. Based on the first matching error corresponding to the optimal stop point, the loss value of the all-terrain landslide trajectory prediction model performing the approximation task is determined, and the loss value of the approximation task is positively correlated with the first matching error.
[0158] In some implementations, the calculation unit 620 is used to determine the distance between the starting point of the actual landslide trajectory and the actual landslide stopping point to obtain the actual landslide distance corresponding to the optimal stopping point; and to compare the predicted landslide distance corresponding to the optimal stopping point with the actual landslide distance corresponding to the optimal stopping point to obtain a first matching error.
[0159] In some implementations, the calculation unit 620 is used to determine the distance between the grid where the landslide source is located on the elevation map and the grid where the optimal rest point is located on the elevation map, so as to obtain the landslide distance on the elevation map corresponding to the optimal rest point; and to compare the predicted landslide distance corresponding to the optimal rest point with the landslide distance on the elevation map corresponding to the optimal rest point to obtain a first matching error.
[0160] Figure 5 This application provides a schematic diagram of the structure of a computing device 800, which includes a processor 801 coupled to a memory 802. The memory 802 stores at least one computer program instruction, which is loaded and executed by the processor 801 to enable the computing device 800 to perform... Figure 3 The method provided in the embodiments.
[0161] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0162] A references B, which means that A is the same as B or A is a simple variation of B.
[0163] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects, and should not be construed as indicating or implying relative importance. For example, "loss function" and "second loss function" are used to distinguish different loss functions, not to describe a specific order of loss functions, and should not be construed as implying that the first loss function is more important than the second loss function.
[0164] In this application, unless otherwise stated, "at least one" means one or more, and "multiple" means two or more. For example, multiple loss functions refer to two or more loss functions.
[0165] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, they can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0166] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A training method for an all-terrain landslide trajectory prediction model, characterized in that, The method includes: All-terrain landslide trajectory samples are input into the all-terrain landslide trajectory prediction model. The all-terrain landslide trajectory prediction model determines the predicted landslide distance based on the all-terrain landslide trajectory samples. The predicted landslide distance indicates the distance between the landslide source and the landslide stopping point. A loss function is used to calculate the loss value based on the predicted landslide distance and the sample landslide distance. The loss function is used to enable the all-terrain landslide trajectory prediction model to perform a selection task. The loss value is used to indicate the performance of the all-terrain landslide trajectory prediction model in performing the selection task, which is a learning task of selecting the optimal stop point from the candidate stop points among the landslide stop points. Based on the loss value and the current model parameters of the all-terrain landslide trajectory prediction model, the gradient value is obtained; The current model parameters of the all-terrain landslide trajectory prediction model are updated using back gradient propagation based on the gradient value, so that the loss value corresponding to the predicted landslide distance determined by the all-terrain landslide trajectory prediction model meets the predetermined conditions. The loss function is calculated based on the predicted landslide distance and the sample landslide distance to obtain the loss value of the all-terrain landslide trajectory prediction model for performing the selection task, including: The first matching error corresponding to the optimal stop point is determined based on the predicted landslide distance corresponding to the optimal stop point and the sample landslide distance corresponding to the optimal stop point; The second matching error corresponding to the non-optimal stop point is determined based on the predicted landslide distance corresponding to the non-optimal stop point and the sample landslide distance corresponding to the non-optimal stop point. The non-optimal stop point is any stop point other than the optimal stop point among the candidate stop points. The loss value of the all-terrain landslide trajectory prediction model for performing the selection task is determined based on the first matching error and the second matching error, wherein the loss value of the selection task is positively correlated with the difference between the first matching error and the second matching error.
2. The method according to claim 1, characterized in that, The determination of the first matching error corresponding to the optimal stopping point based on the predicted landslide distance corresponding to the optimal stopping point and the sample landslide distance corresponding to the optimal stopping point includes: Based on the grid where the landslide source is located on the elevation map and the grid where the optimal resting point is located on the elevation map, the landslide distance on the elevation map corresponding to the optimal resting point is determined. The landslide distance on the elevation map indicates the distance between the optimal resting point and the landslide source on the elevation map. The difference between the landslide distance on the elevation map corresponding to the optimal stop point and the predicted landslide distance corresponding to the optimal stop point is determined to obtain the first matching error corresponding to the optimal stop point.
3. The method according to claim 1, characterized in that, The determination of the second matching error corresponding to the non-optimal stop point based on the predicted landslide distance corresponding to the non-optimal stop point and the sample landslide distance corresponding to the non-optimal stop point includes: Based on the grid where the landslide source is located on the elevation map and the grid where the non-optimal resting point is located on the elevation map, the landslide distance on the elevation map corresponding to the non-optimal resting point is determined. The landslide distance on the elevation map indicates the distance between the non-optimal resting point and the landslide source on the elevation map. The difference between the landslide distance on the elevation map corresponding to the non-optimal stop point and the predicted landslide distance corresponding to the non-optimal stop point is determined to obtain the second matching error corresponding to the non-optimal stop point.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the loss value for the all-terrain landslide trajectory prediction model to perform the selection task based on the first matching error and the second matching error includes: The maximum value is determined from the gap between the first matching error and the second matching error and a predetermined gap term to obtain the loss value of the all-terrain landslide trajectory prediction model when performing the selection task.
5. The method according to claim 1, characterized in that, The step of using a loss function to calculate a loss value based on the predicted landslide distance and the sample landslide distance includes: For each non-optimal stop point among all candidate stop points in the landslide path, determine the second matching error corresponding to each non-optimal stop point based on the predicted landslide distance corresponding to each non-optimal stop point and the sample landslide distance corresponding to each non-optimal stop point. Determine the difference between the second matching error corresponding to each of the non-optimal stopping points and the first matching error corresponding to the optimal stopping point; Based on the sum of the differences in the second matching errors corresponding to each of the non-optimal stopping points and the total number of all candidate stopping points in the landslide path, the loss value of the all-terrain landslide trajectory prediction model in performing the selection task is determined.
6. The method according to claim 1, characterized in that, The all-terrain landslide trajectory sample includes multiple landslide records. The loss function is used to calculate the loss value based on the predicted landslide distance and the sample landslide distance, including: Each landslide record in the multiple landslide records is traversed, and calculations are performed based on the predicted landslide distance and the sample landslide distance corresponding to each landslide record to obtain the matching error corresponding to each landslide record. The average matching error for each landslide record is determined to obtain the loss value.
7. The method according to claim 1, characterized in that, The all-terrain landslide trajectory sample includes landslide source characteristics, surrounding environment characteristics, and landslide induction characteristics. The landslide source characteristics include the length and width of the landslide source. The surrounding environment characteristics include the elevation difference of the landslide descent, slope, curvature, vegetation cover type, and geological type. The landslide induction characteristics include the maximum 4-hour precipitation and the maximum 24-hour precipitation.
8. A training device for an all-terrain landslide trajectory prediction model, characterized in that, The device includes: The input unit is used to input all-terrain landslide trajectory samples into the all-terrain landslide trajectory prediction model, and the all-terrain landslide trajectory prediction model determines the predicted landslide distance based on the all-terrain landslide trajectory samples. The predicted landslide distance indicates the distance between the landslide source and the landslide stopping point. The computation unit is used to perform calculations based on the predicted landslide distance and the sample landslide distance using a loss function to obtain a loss value. The loss function is used to enable the all-terrain landslide trajectory prediction model to perform a selection task. The loss value is used to indicate the performance of the all-terrain landslide trajectory prediction model in performing the selection task, which is a learning task of selecting the optimal stop point from the candidate stop points among the landslide stop points. An adjustment unit is used to obtain a gradient value based on the loss value and the current model parameters of the all-terrain landslide trajectory prediction model; and to update the current model parameters of the all-terrain landslide trajectory prediction model using back gradient propagation based on the gradient value, so that the loss value corresponding to the predicted landslide distance determined by the all-terrain landslide trajectory prediction model meets a predetermined condition. The computational unit is specifically configured to: determine a first matching error corresponding to the optimal stop point based on the predicted landslide distance corresponding to the optimal stop point and the sample landslide distance corresponding to the optimal stop point; determine a second matching error corresponding to a non-optimal stop point based on the predicted landslide distance corresponding to a non-optimal stop point and the sample landslide distance corresponding to the non-optimal stop point, wherein the non-optimal stop point is any stop point other than the optimal stop point among the candidate stop points; and determine the loss value of the all-terrain landslide trajectory prediction model for performing the selection task based on the first matching error and the second matching error, wherein the loss value of the selection task is positively correlated with the difference between the first matching error and the second matching error.
9. A computing device, characterized in that, The computing device includes: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computing device to implement the method of any one of claims 1-7.