Soil erosion data anomaly detection method and computer readable storage medium

CN122595158BActive Publication Date: 2026-10-30POWERCHINA HUADONG ENG CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611016258.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-30
Estimated Expiration
2046-07-09

AI Technical Summary

Technical Problem

[0005]本发明的目的在于提供一种水土流失数据异常检测方法和计算机可读存储介质,通过依次递进的数据处理,系统性解决了多源数据时空对齐、扰动抑制、边界样本增强与异常精准判别的关键技术问题

Benefits of technology

本发明提供了一种水土流失数据异常检测方法和计算机可读存储介质,首先,多源数据与时空对齐模块通过水文路径约束的空间归并、降雨事件时钟对齐及跨源一致性加权融合,将多源异步、异构、异质的观测序列统一构造为统一对齐张量;接着,稳态基线构建模块提取源间同相主态方向,构建物理一致性稳态基线并与输入求差得到稳态残差,形成第二数据集以抑制非主态扰动;然后,扰动样本与强度控制模块基于事件相位演化规律构建局部演化基准,通过演化违约冲击与强度锁定生成边界扰动样本,形成第三数据集以增强对边界异常的检测能力;最后,异常检测模块计算参照偏离向量,经相位平滑后计算异常分数并映射为异常概率,通过阈值判别完成异常检测与定位输出,本发明通过依次递进的数据处理,系统解决了多源数据时空对齐、扰动抑制、边界样本增强与异常精准判别的关键技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122595158B_ABST
    Figure CN122595158B_ABST
Patent Text Reader

Abstract

The application provides a soil and water loss data anomaly detection method and a computer readable storage medium, and relates to the technical field of data anomaly detection. A multi-source data and space-time alignment module, a steady-state baseline construction module, a disturbance sample and intensity control module, and an anomaly detection module are constructed, and the multi-source data and space-time alignment module is constructed into a space-time alignment tensor; the steady-state baseline construction module is used to extract a same-phase main state direction among sources and construct a physically consistent steady-state baseline, a second data set is formed to suppress non-main state disturbance; the disturbance sample and intensity control module is used to generate a boundary disturbance sample based on an event phase evolution law, a third data set is formed to enhance the detection capability of boundary anomalies; the anomaly detection module is used to realize anomaly score calculation, probability mapping and threshold discrimination, and complete anomaly detection; through the data processing in sequence, the key technical problems of multi-source data space-time alignment, disturbance suppression, boundary sample enhancement and anomaly accurate discrimination are systematically solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data anomaly detection technology, and in particular to a method for detecting soil erosion data anomalies and a computer-readable storage medium. Background Technology

[0002] During the excavation, filling, spoil disposal, and temporary soil stockpiling processes of production and construction projects, surface disturbance is intense and the risk of soil erosion is concentrated. Monitoring data is characterized by inconsistent sampling frequencies, dispersed equipment, significant construction interference, and obvious abrupt changes after heavy rainfall. Current monitoring mainly relies on multiple sources of data acquisition, such as ground observation, surveying, drones, video surveillance, and remote sensing interpretation. Soil erosion monitoring in production and construction projects has entered an era of coexisting multi-source data, covering various types of data sources. However, multi-source data suffers from strong spatial propagation directionality, inconsistent sampling frequencies, and large fluctuations in data quality. How to effectively integrate multi-source heterogeneous data and accurately identify abnormal events has become a key issue that urgently needs to be addressed.

[0003] For the fusion and anomaly detection of multi-source monitoring data, existing technologies mainly use spatial interpolation methods to achieve spatial unification, resampling and interpolation methods to achieve temporal alignment, and construct thresholds and statistical models based on a single data source for anomaly discrimination. Some studies have attempted to use machine learning methods for multi-source joint anomaly detection. These methods have achieved multi-source data processing and anomaly identification to a certain extent.

[0004] However, existing technologies still have significant shortcomings. Spatial fusion, based on Euclidean distance, ignores the physical laws governing the directional propagation of soil erosion along the confluence path, which can easily lead to spatial mismatches and false anomalies. Temporal alignment, based on fixed timestamps, ignores the phased and delayed nature of rainfall events, resulting in distortion of temporal characteristics. Anomaly detection struggles to distinguish between single-source short-term distortions and genuine anomalies, and is insensitive to boundary anomaly identification when faced with scarce, diverse, and unevenly distributed anomaly samples. Therefore, there is an urgent need for an anomaly detection method that fully considers the spatial propagation laws of hydrology, the phase evolution characteristics of events, and the constraints of multi-source physical consistency. Summary of the Invention

[0005] The purpose of this invention is to provide a method for detecting anomalies in soil erosion data and a computer-readable storage medium. Through progressive data processing, it systematically solves the key technical problems of spatiotemporal alignment of multi-source data, disturbance suppression, boundary sample enhancement, and accurate anomaly identification.

[0006] Firstly, this invention provides a method for detecting anomalies in soil erosion data. For typical monitoring scenarios such as construction disturbance areas, spoil heaps, temporary soil stockpiles, runoff plots, and sedimentation basins, it constructs a monitoring data anomaly detection model composed of a multi-source monitoring data spatiotemporal alignment module, a physical consistency steady-state baseline module, a disturbance enhancement module, and an anomaly discrimination module. The method includes: Collect historical multi-source monitoring data on soil and water loss to construct the original dataset; The original dataset is merged into regional units according to the hydrological path distance to obtain spatial aggregated observation vectors. The spatial aggregated observation vectors are then kernel-weighted aligned to obtain event-aligned representations. The consistency error is calculated, mapped to confidence weights, and weighted concatenation is used to obtain a unified alignment tensor. The integrated dataset is then obtained. Based on the first dataset, construct the source-to-source in-phase main state direction, calculate the main state amplitude coefficient and in-phase ratio indicator, introduce the steady-state consistency benchmark to obtain the consistency gating pull-back coefficient, calculate the physical consistency steady-state baseline, subtract it from the unified alignment tensor to obtain the steady-state residual vector, and splice and integrate them to obtain the second dataset. A local evolutionary baseline vector is constructed using the sample vectors of adjacent phase points in the second dataset. The quantile ratio is introduced to form the relative default intensity. The intensity lock-in coefficient is calculated through the target intensity threshold. The product of the coefficient and the evolutionary default impact vector is superimposed on the sample vector to obtain the perturbation sample. The samples are then aggregated to form the third dataset, which is divided into a training set and a test set. Calculate the reference deviation vector of the samples in the training set relative to the reference center, extract the deviation channel to obtain the anomaly score, map it to the anomaly probability, determine the anomaly by the threshold, and design a loss function for training. The test set is input into the trained anomaly detection model for soil and water loss data of production and construction projects, and the final output is the anomaly value of soil and water loss.

[0007] In some preferred embodiments of the present invention, the original dataset includes the timestamp, spatial location coordinates, and multi-channel original observation vectors for each observation sample; wherein, the multi-channel original observation vectors include parameters such as rainfall intensity, cumulative rainfall, soil moisture content, soil temperature, runoff, water level, flow velocity, sediment content, sediment transport rate, sediment concentration, slope, aspect, catchment area, air temperature, evapotranspiration, wind speed, surface reflectance, vegetation index, and soil moisture index.

[0008] In some preferred embodiments of the present invention, the original dataset is merged into regional units according to hydrological path distance to obtain spatially aggregated observation vectors, including: For any observation point and the center of any regional unit, first calculate the hydrological path distance between them. Divide the negative value of the hydrological path distance by the spatial influence scale. The index is then taken to obtain the contribution intensity of the observation point to the regional unit. The ratio of the contribution intensity to the sum of the contribution intensity of the observation point to all regional units is used as the spatial merging weight. The original observation vectors at the same timestamp are weighted and summed according to spatial merging weights to obtain the weighted observation cumulative value. The spatial merging weights of all observation points at the same timestamp are summed to obtain the weighted cumulative value. The ratio of the weighted observation cumulative value to the weighted cumulative value is used as the spatial aggregated observation vector. .

[0009] In some preferred embodiments of the present invention, kernel-weighted alignment of spatially aggregated observation vectors to obtain event-aligned representations includes: For any time The event clock is obtained by convolving and integrating the average rainfall intensity sequence of the project's impact area prior to the current time with an exponentially decaying kernel function. Calculate the event clock value and event clock sampling point at each valid sampling time. The absolute value of the difference, divided by the smoothing scale After taking a negative exponent, the alignment kernel is obtained for each sampling time. The weighted sum of the spatial aggregation observation vector and the alignment kernel is calculated, and the sum of all alignment kernel weights is also calculated. A very small positive number is added to prevent division by zero anomalies, resulting in the cumulative alignment kernel weight. The event alignment representation is obtained by the ratio of the weighted sum to the cumulative alignment kernel weight. .

[0010] In some preferred embodiments of the present invention, the consistency error is calculated based on the event alignment representation, mapped to a confidence weight, and weighted concatenation is used to obtain a unified alignment tensor. The integrated dataset includes: Calculate the number of divisions. The average of the event alignment representations of all data sources other than the first data source is used as the first... Based on the reference of the first data source, calculate the first... The event alignment representation of each data source is a vector of differences from the reference baseline. This vector is then subjected to a 2-norm operation to obtain the consistency error. Introducing error scale parameters The confidence weight is obtained by performing an exponential operation. By aligning the source events and connecting them at the channel level, a unified aligned tensor is obtained. Integrate and generate the first dataset .

[0011] In some preferred embodiments of the present invention, a physically consistent steady-state baseline is determined based on a first dataset, the difference between the physically consistent steady-state baseline and the uniform alignment tensor is determined as a steady-state residual vector, and the physically consistent steady-state baseline and the steady-state residual vector are concatenated and integrated to obtain a second dataset, including: Calculate the uniform alignment tensor To obtain the L2 norm, a very small positive number is added to the denominator to prevent computational anomalies when the norm is zero. The unified alignment tensor is divided by the denominator to obtain the in-phase principal state directions between sources. The dominant state amplitude coefficients are obtained by transposing the in-phase dominant state directions between sources and multiplying them by the uniform alignment tensor. Calculate the square of the dominant state amplitude coefficient as the dominant state projection energy, calculate the square of the L2 norm of the uniform alignment tensor, add a minimal positive number to the denominator as the input total energy, and use the ratio of the dominant state projection energy to the input total energy as the in-phase proportion indicator. The consistency gating pull-back coefficient is obtained by calculating the ratio of the in-phase percentage indicator to the sum of the steady-state consistency benchmark and the smallest positive number. The physically consistent steady-state baseline is obtained by multiplying the uniformity gating pull-back coefficient by the in-phase dominant state direction and dominant state amplitude coefficient between sources. The steady-state residual vector is obtained by calculating the difference between the uniform alignment tensor and the physically consistent steady-state baseline. The physically consistent steady-state baseline and the steady-state residual vector together constitute the sample vector. The second dataset is obtained by integration. .

[0012] In some preferred embodiments of the present invention, the evolving default shock vector is determined based on samples of adjacent phase points in the second dataset, and the intensity lock-in coefficient is determined through a preset target intensity threshold. The product of the evolving default shock vector and the intensity lock-in coefficient is superimposed on the second dataset to obtain perturbation samples, which are then aggregated to form a third dataset, including: The local evolution reference vector is obtained by adding the sample vector of the region unit at the adjacent preceding event clock sampling point and the sample vector at the adjacent following event clock sampling point, and then multiplying the sum by one-half. The evolved default shock vector is obtained by subtracting the sample vector from the local evolutionary baseline vector. Calculate the absolute values ​​of the components of the evolving default impact vector, introduce quantiles as the numerator, calculate the absolute values ​​of the components of the local evolutionary benchmark vector, take the quantiles and add them to the smallest positive number as the denominator, and use the ratio of the numerator to the denominator as the relative default intensity. The ratio of the target strength threshold to the sum of the relative default strength and the smallest positive number is used as the initial coefficient. This initial coefficient is then constrained between a preset minimum cutoff value and a maximum cutoff value to obtain the strength locking coefficient. The perturbation sample is obtained by adding the product of the sample vector and the intensity lock-in coefficient and the evolved default impact vector. The third dataset is obtained by combining the data. The training set and the test set are divided according to a preset ratio.

[0013] In some preferred embodiments of the present invention, determining a smoothed deviation vector based on the reference deviation vector between the samples of the training set in the third dataset and the reference center, and determining the average of the absolute values ​​of a preset number of smoothed deviation vectors as the anomaly score includes: Calculate the mean of the perturbation samples in the training set across each channel to obtain the channel-level reference center template parameters. For any region cell and any event clock sampling point, the difference between the disturbance sample and the channel-level reference center template parameter is used to obtain the reference deviation vector. Units in the same region The reference deviation vectors at adjacent event phase points are multiplied by preset weight coefficients, summed, and then divided by the total weights to obtain the smoothed deviation vector. Calculate the absolute values ​​of each component of the smoothed deviation vector, and select the one with the largest value. Calculate the sum of the components, then divide by . Resulting in abnormal scores .

[0014] In some preferred embodiments of the present invention, an anomaly probability is obtained by linear transformation based on anomaly scores adjusted using scalar parameters. The anomaly probability is used to determine whether data anomalies exist. The scalar parameters are then gradually adjusted according to a preset loss function until a preset completion condition is met, resulting in a data anomaly detection model. Multi-source monitoring data of soil erosion is input into the data anomaly detection model, and the final output of soil erosion anomaly values ​​includes: Multiply the outlier score by the first scalar parameter. Then with the second scalar parameter The sums are then subjected to a nonlinear transformation to obtain the predicted anomaly probability. Anomaly detection mask is constructed using indicator functions. To determine whether an anomaly exists, a loss function is constructed. The cross-entropy between the true label and the predicted anomaly probability is calculated. The cross-entropy of all samples is summed and divided by the total number of samples. The negative value is then used to train the model using the loss function until the preset completion condition is met, thus obtaining the data anomaly detection model. The multi-source monitoring data of soil erosion is input into the data anomaly detection model, and finally, the soil erosion anomaly value is output.

[0015] In a second aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method provided in the first aspect.

[0016] This invention brings the following beneficial effects: This invention provides a method for detecting anomalies in soil erosion data and a computer-readable storage medium. First, a multi-source data and spatiotemporal alignment module uses spatial merging of hydrological path constraints, rainfall event clock alignment, and cross-source consistency weighted fusion to construct a unified alignment tensor from asynchronous, heterogeneous, and heterogeneous observation sequences from multiple sources. Next, a steady-state baseline construction module extracts the in-phase dominant state directions between sources, constructs a physically consistent steady-state baseline, and calculates the difference between this baseline and the input to obtain the steady-state residual, forming a second dataset to suppress non-dominant state disturbances. Then, a disturbance sample and intensity control module constructs a local evolutionary benchmark based on the event phase evolution law, and generates boundary disturbance samples through evolutionary violation impact and intensity locking, forming a third dataset to enhance the detection capability of boundary anomalies. Finally, an anomaly detection module calculates the reference deviation vector, performs phase smoothing, calculates the anomaly score, maps it to anomaly probability, and completes anomaly detection and location output through threshold discrimination. This invention, through sequentially progressive data processing, systematically solves the key technical problems of spatiotemporal alignment of multi-source data, disturbance suppression, boundary sample enhancement, and accurate anomaly discrimination. Attached Figure Description

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 A flowchart of a method for detecting anomalies in soil erosion data provided in an embodiment of the present invention; Figure 2 A data processing flowchart for a multi-source data and spatiotemporal alignment module provided in an embodiment of the present invention; Figure 3 A data processing flowchart for a steady-state baseline construction module provided in an embodiment of the present invention; Figure 4 A flowchart of data processing for a disturbance sample and intensity control module is provided in an embodiment of the present invention; Figure 5 A schematic diagram of a model training process provided in an embodiment of the present invention; Figure 6 A schematic diagram of data detection provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0019] Icons: 400 - Memory; 401 - Processor; 402 - Bus; 403 - Communication Interface. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0021] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0022] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0023] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0024] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0025] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0026] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0027] This invention provides a method for detecting anomalies in soil erosion data. (See also...) Figure 1 The flowchart shown in this embodiment of the invention provides a method for detecting anomalies in soil erosion data. The method includes: Step S102: Collect historical multi-source monitoring data on soil erosion and construct the original dataset.

[0028] Step S104: The original dataset is merged into regional units according to the hydrological path distance to obtain the spatially aggregated observation vector.

[0029] Step S106: Perform kernel-weighted alignment on the spatial aggregated observation vectors to obtain the event-aligned representation.

[0030] Step S108: Calculate the consistency error based on the event alignment representation, map it to the confidence weight, and weighted concatenate to obtain the unified alignment tensor, which is then integrated to obtain the first dataset.

[0031] Step S110: Determine the physically consistent steady-state baseline based on the first dataset, determine the difference between the physically consistent steady-state baseline and the unified alignment tensor as the steady-state residual vector, and concatenate and integrate the physically consistent steady-state baseline and the steady-state residual vector to obtain the second dataset.

[0032] Step S112: Determine the evolving default impact vector based on samples of adjacent phase points in the second dataset, and determine the intensity lock-in coefficient through a preset target intensity threshold. Superimpose the product of the evolving default impact vector and the intensity lock-in coefficient with the second dataset to obtain the perturbation sample, and aggregate them to form the third dataset.

[0033] Step S114: Determine the smoothed deviation vector based on the reference deviation vector between the samples in the training set and the reference center in the third dataset, and determine the average of the absolute values ​​of a preset number of smoothed deviation vectors as the anomaly score.

[0034] Step S116: Based on the anomaly score, a linear transformation is performed after adjusting the scalar parameters to obtain the anomaly probability. Based on the anomaly probability, it is determined whether there is data anomaly. The scalar parameters are gradually adjusted according to the preset loss function until the preset completion condition is met, thus obtaining the data anomaly detection model. The multi-source monitoring data of soil and water loss is input into the data anomaly detection model, and finally the soil and water loss anomaly value is output.

[0035] Specifically, the dataset in this embodiment contains 3,000 sets of historical soil and water loss monitoring data from production and construction projects. This includes the timestamp, spatial coordinates, and multi-channel raw observation vectors for each observation sample. The multi-channel raw observation vectors include rainfall intensity, cumulative rainfall, soil moisture content, soil temperature, runoff, water level, flow velocity, sediment content, sediment transport rate, sediment concentration, slope, aspect, catchment area, air temperature, evapotranspiration, wind speed, surface reflectance, vegetation index, and soil moisture index. Rainfall intensity and cumulative rainfall are collected in real-time by automatic rain gauges deployed within the project area, with a sampling frequency of 1 minute. The data is then transmitted wirelessly to the monitoring center. Soil moisture content and soil temperature are monitored using a frequency domain reflectance type soil moisture sensor for stratified monitoring. The sampling frequency was 10 minutes, with a measurement accuracy of ±2%. Runoff, water level, and flow velocity were monitored jointly by radar level gauges and flow meters deployed at the channel outlet, with a sampling frequency of 5 minutes. Sediment content, sediment transport rate, and sediment concentration were manually collected during the runoff process using suspended sediment samplers at a sampling interval of 30 minutes and determined by drying and weighing. Slope, aspect, and catchment area were extracted based on a digital elevation model with a spatial resolution of 5 m. Air temperature, evapotranspiration, and wind speed were obtained through automatic weather stations with a sampling frequency of 30 minutes. Surface reflectance, vegetation index, and soil moisture index were generated by inversion from satellite remote sensing data with a temporal resolution of 10 days. All monitoring data recorded the observation time with timestamps and identified the geographical location of the observation points with spatial coordinates, which together constituted the original dataset.

[0036] Further, see Figure 2 The illustrated embodiment of the present invention provides a data processing flowchart for a multi-source data and spatiotemporal alignment module. It sequentially constructs a spatial merging model with hydrological path constraints, a rainfall event clock alignment model, and a cross-source consistency self-calibration fusion model. This unifies multi-source asynchronous, heterogeneous, and heterogeneous observation sequences into a spatiotemporal alignment tensor that can be directly input into the subsequent anomaly detection module. The flowchart shows the process flow of a multi-source data and spatiotemporal alignment module. The original observation samples from each data source are represented as follows: , For the first The number of valid sampling entries for each data source within the monitoring period. For timestamps, The spatial coordinates of the observation point The original observation vector is used to divide the impact range of the production and construction project and the downstream impact range of the confluence into the following categories: Each regional unit serves as a monitoring and evaluation unit. After processing by a multi-source data and spatiotemporal alignment module, the first dataset is finally output. ,in The number of regional units, The number of steps away from the event clock. This represents the total number of channels. This represents the total number of data sources; in this example, the value is 7. For the first The number of channels for each data source, in this example The value is 64. The value is 51. The value is 19.

[0037] Specifically, construct within the project's impact area. regional unit center For any observation point and the center of any regional unit, the hydrological path distance between them is first calculated. Divide the negative value of the hydrological path distance by the spatial influence scale. The index is then taken to obtain the contribution intensity of the observation point to the regional unit. The ratio of the contribution intensity to the sum of the contribution intensity of the observation point to all regional units is used as the spatial merging weight. The mathematical model is: ; in, and , For the first The center coordinates of each regional unit The hydrological path distance represents the flow direction along the digital elevation model from... arrive The cumulative path length is used to characterize the actual propagation channels of erosion, sediment production, and runoff in the gullies. From arrive Hydrological path distance For the first The spatial influence scale of each source is used to adjust the path distance decay rate. This indicates exponentiation.

[0038] In this embodiment, the following is set The value is the median hydrological path distance from the source sample to the center of the nearest regional unit. This value can obtain a decay scale that matches the source spatial resolution and is robust to extreme points, thereby avoiding excessive smoothing and ensuring continuous and stable spatial merging. Through the above design, the exponential decay and normalization form can form a continuous, differentiable and controllable merging probability among multiple regional units, avoiding boundary breaks and pseudo-anomaly jumps caused by hard allocation.

[0039] Since multiple source points have varying spatial density and locations, direct averaging would introduce placement bias. Therefore, the original observation vectors at the same time stamp are weighted and summed according to spatial merging weights to obtain a weighted observation cumulative value. The spatial merging weights of all observation points at the same time stamp are then summed to obtain a weighted cumulative value. The ratio of the weighted observation cumulative value to the weighted cumulative value is used as the spatially aggregated observation vector. The mathematical model is: ; in, For the first source The original observation vectors of each sample, summation condition Indicates the same timestamp The following is a set of observations belonging to the data source. To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... This value selection allows for both numerical stabilization and preservation of the physical magnitude of the aggregated value. Through the aforementioned hydrological path constraints, the influence of upstream points on downstream regional units can be expressed, reducing spurious anomalies caused by spatial mismatch.

[0040] Anomalies in soil erosion are often related to different phases of rainfall events rather than fixed moments. Different sources within the same rainfall event have different sampling frequencies and response lags. Aligning solely by timestamps can lead to mismatches between different phases of the same event. To eliminate time mismatches caused by inconsistent sampling frequencies from different sources and erosion response lags, for any given moment... The event clock is obtained by convolving and integrating the average rainfall intensity sequence of the project's impact area prior to the current time with an exponentially decaying kernel function. As a unified alignment axis, used to characterize the cumulative intensity of rainfall event progression, the mathematical model is as follows: ; in, For integration variables, This is the average rainfall intensity sequence for the area affected by the project. To influence the length of memory affected by rainfall, this method is used to characterize the cumulative and hysteretic effects of rainfall-runoff-erosion, and to depict the hysteretic contribution of rainfall to runoff and erosion. In this embodiment, it is set... A value of 6 is chosen to simultaneously cover the major contributions of short-duration heavy rainfall and subsequent surface responses at an engineering scale, through the construction of an event clock. The alignment axis can be changed from time to event progression, making the data comparable in event phase.

[0041] When sampling times from different sources are inconsistent or even missing, hard interpolation can introduce step errors and amplify spurious anomalies. Therefore, it is necessary to construct equally spaced sampling points in the event clock domain. Calculate the event clock value and event clock sampling point at each valid sampling time. The absolute value of the difference, divided by the smoothing scale After taking a negative exponent, the alignment kernel is obtained for each sampling time. The weighted sum of the spatial aggregation observation vector and the alignment kernel is calculated, and the sum of all alignment kernel weights is also calculated. A very small positive number is added to prevent division by zero anomalies, resulting in the cumulative alignment kernel weight. The event alignment representation is obtained by the ratio of the weighted sum to the cumulative alignment kernel weight. The mathematical model is: ; in, For the first Source in regional unit Upper event clock sampling point Event alignment representation, For the first Source in regional unit The effective sampling time on, For the sampling point index, take , Indicates the number of valid sampling points. For the first Data sources in regional units ,time Spatial aggregated observation vectors, For a moment Event clock, For the first The source is a smooth scale in the event clock domain. To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... . For the alignment kernel of the event clock domain, Sample pairs used to control the proximity of event phases The contribution range is set to 5% of the span between the maximum and minimum event clocks in this example. This value can control the contribution range of the event phase kernel and avoid step errors introduced by sparse sampling. Through the above design, the event clock domain kernel weighting can be continuously aligned based on the principle of event phase proximity, so that data of similar stages of the same erosion event can be flexibly aggregated, while keeping the alignment process controllable and stable.

[0042] When detecting abnormal soil erosion in production and construction projects, distortions from a single source can be confused with actual process anomalies. These changes often exhibit inconsistencies between sources. To avoid misjudging short-term distortions from a single source as abnormal soil erosion, calculations should be performed except for the first... The average of the event alignment representations of all data sources other than the first data source is used as the first... Based on the reference of the first data source, calculate the first... The event alignment representation of each data source is a vector of differences from the reference baseline. After L2 operation, the consistency error is obtained. The mathematical model is as follows: ; in, For the first Source in regional unit Event clock point Consistency error, Total number of data sources For the first Source in regional unit Upper event clock sampling point Event alignment representation, To exclude the first Mean reference from sources other than the source. The L2 norm operation is used to compress the differences between multi-dimensional channels into a comparable degree of deviation. Through the above design, it is possible to directly quantify whether the data source deviates from the multi-source consensus, providing an underlying basis for subsequent credibility weighting.

[0043] By converting the consistency error into multiplicative weights, the exponential mapping ensures that the weights are monotonically decreasing and always positive, thus avoiding the fusion out-of-phase problem caused by negative weights. An error scaling parameter is then introduced. The confidence weight is obtained by performing an exponential operation. The mathematical model is: ; in, Indicates the first Source Credibility weight, This is the error scaling parameter, used to control the sensitivity of error to weight decay.

[0044] This embodiment is set The initial value is the median of all cross-source consistency errors. This value provides a robust scale against a small number of extreme distortions. Subsequent updates are performed slowly. The mathematical model is as follows: ; in, The update rate controls the proportion of new information; in this example, it's set to 0.05. This value means that each update introduces only 5% of new scale information, thus achieving slow updates and ensuring... Stable, avoiding weight fluctuations Represents the set of all consistency errors within the current period. Taking the median, the source events are finally aligned and connected at the channel level with confidence weighting, outputting a unified alignment tensor. The mathematical model is as follows: ; in, This indicates that the data is assembled and generated according to the channel order. As the first dataset, it provides a stable and physically meaningful multi-source spatiotemporally aligned input for the subsequent anomaly detection module.

[0045] For uniform alignment tensors The problem still exists, including event-period fluctuations, residual noise between sources, and short-term distortion leading to false anomalies in subsequent anomaly detection. This embodiment constructs a steady-state baseline construction module, see [link to module]. Figure 3 The illustrated embodiment of the present invention provides a data processing flowchart for a steady-state baseline construction module, which calculates the uniform alignment tensor. The L2 norm is used to prevent computational anomalies when the norm is zero by adding a very small positive number to the denominator. The unified alignment tensor is divided by the denominator to obtain the in-phase principal state direction between sources. This direction is used to extract the directional consistency skeleton of the common response of multiple sources without changing the input channel structure, providing a projectable reference direction for the physical consistency constraint of the subsequent steady-state baseline. The mathematical model is as follows: ; in, Representing regional units Event clock point The direction of the in-phase principal state between sources, Used to extract the overall magnitude of the input vector and perform direction normalization. To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... Through the above design, the steady-state baseline prioritizes preserving the common change direction of multiple sources, rather than directly smoothing the dimensions.

[0046] To quantify the interpretable common response strength of the current input in the dominant direction, dominant state amplitude coefficients are constructed so that the steady-state baseline can be expressed in a direction-amplitude decoupled form. The dominant state amplitude coefficients are obtained by multiplying the in-phase dominant state directions between sources by the transpose operation and the unified alignment tensor. The mathematical model is as follows: ; in, The dominant state amplitude coefficient, Indicates transpose. The dot product represents the projection amplitude of the input vector in the dominant direction. In the process of soil erosion events in production and construction projects, the common response of multi-source data usually shows the same direction of enhancement and attenuation. The physical consistency is more reflected in the projection energy in the dominant direction. The dominant amplitude coefficient obtained by the dot product can compress the common response of multiple sources into a scalar while maintaining decoupling from the original channel structure. This facilitates the subsequent suppression of non-steady-state components during the event period without introducing any additional external parameters and model structures.

[0047] To constrain the steady-state baseline from the ground up to satisfy the physical consistency condition of dominant cross-source in-phase response, an in-phase proportion indicator is constructed to measure the proportion of the dominant state projected energy in the total energy, thereby identifying the strength of non-steady-state disturbances during the event period. The square of the dominant state amplitude coefficient is calculated as the dominant state projected energy, and the square of the L2 norm of the alignment tensor is uniformly aligned. A minimal positive number is added to the denominator as the input total energy. The ratio of the dominant state projected energy to the input total energy is used as the in-phase proportion indicator. The mathematical model is as follows: ; in, This is an indicator of the proportion of phases in the same phase. To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... . To input the overall energy, through the above design, when the responses of each source have strong commonality, The dominant projected energy will account for the majority of the total energy. It will approach 1; when there is single-source distortion, cross-source phase inconsistency, and short-time noise superposition, the input energy is more distributed in the non-dominant state direction. The physical consistency will decrease, which can transform the subjective description of physical consistency into a calculable proportional quantity, providing a direct drive for subsequent steady-state gating.

[0048] To be The input is transformed into a steady-state baseline that satisfies physical consistency constraints. The consistency gating pull-back coefficient is obtained by ratioing the in-phase percentage indicator to the steady-state consistency benchmark and the sum of the smallest positive numbers. This ensures a stronger steady-state pull-back when the current in-phase percentage is below the benchmark, and maintains the input structure when the in-phase percentage is close to the benchmark. The mathematical model is as follows: ; in, For consistency-gated pullback coefficient, To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... , As a steady-state consistency benchmark, the average value of the in-phase percentage indicator within the event clock window is calculated. In this example, the event clock window length is 21, which ensures that the value covers the main stages of the event and avoids long-term drift mixing. Through the above design, the steady-state baseline should not unconditionally follow the peak fluctuations during the event period, but should adaptively adjust the pullback strength according to the degree of deviation of the current consistency from the steady-state level. Using a ratio form can naturally normalize the benchmark differences of different regional units, making the gating comparable across regions, while ensuring that the pullback strength corresponds monotonically to the degree of deviation of physical consistency.

[0049] Based on consistency-gated pullback coefficient Construct a physically consistent steady-state baseline The mathematical model preserves the input vector in the dominant state direction and suppresses non-dominant state perturbations: ; Through the direction of the in-phase dominant state between sources To ensure the baseline retains directional consistency of the in-phase response across sources, the dominant state amplitude coefficient is used. Preserve the magnitude of the physical strength of the common response and control the pull-back coefficient through consistency gating. The baseline strength is tied to the current consistency level, resulting in stronger baseline pullback when consistency is low, providing a cleaner reference for subsequent anomaly detection. Then, the unified alignment tensor is calculated. Physically Consistent Steady-State Baseline The difference yields the steady-state residual vector. This is used to characterize the degree of deviation of the input from the physically consistent steady-state baseline. Ultimately, the sample vector is composed of the physically consistent steady-state baseline and the steady-state residual vector. The mathematical model is as follows: ; Final integration This serves as the second dataset for input to the subsequent anomaly detection module.

[0050] To address the issue that multi-source monitoring data on soil erosion in production and construction projects often exhibits scarce, diverse, and unevenly distributed anomalous samples during heavy rainfall events, leading to insensitivity to boundary anomaly identification and insufficient differentiation between short-term abrupt changes and link distortions in subsequent anomaly detection, this embodiment constructs a disturbance sample and intensity control module. (See [link to module]). Figure 4 The illustrated embodiment of the present invention provides a data processing flowchart for a disturbance sample and intensity control module. Taking a second dataset as input, it extracts the phase evolution violation features of the soil erosion process on the event clock axis, focusing on the phased smooth evolution and abrupt changes of abnormal disturbances. While maintaining the isomorphism of the sample structure, it performs anomaly injection and controls the synthetic anomaly to be near the target intensity through a quantile intensity locking mechanism, forming a difficult example sample set that can be used to improve the robustness of the detection threshold.

[0051] Sample vector The evolution should be continuous on the event clock axis, but real anomalies usually manifest as phase abrupt changes, thus deviating from continuous evolution. To obtain the minimum evolution reference when there is no anomaly impact, the sample vector of the region unit at the adjacent previous event clock sampling point is added to the sample vector at the adjacent subsequent event clock sampling point, and then multiplied by one half to obtain the local evolution reference vector. The mathematical model is: ; in, Representing regional units At the event clock point The local evolution reference vector, and They are the same regional units At adjacent event clock points and The sample vector. In this example, the coefficients The symmetrical average weight is used to form a minimum benchmark determined only by adjacent phases without introducing additional parameters. The symmetrical average allows the benchmark to reflect local continuity without carrying directional bias. By constructing a local evolution benchmark vector, a reference can be provided for subsequent evolutionary default shocks, thus establishing anomaly synthesis on the laws of process evolution.

[0052] Considering the significant differences in sample size across different regional units and event phases, to ensure cross-regional and cross-phase comparability of subsequent intensity control, quantile ratios are introduced to form relative default intensity. The mathematical model is: ; in, This indicates taking the absolute value of each component of the vector. The 75th quantile is used because the median underestimates the typical strength of medium- to high-amplitude disturbances, while the maximum value is easily dominated by a few extreme channels. The 75th quantile can highlight representative, larger disturbances and remain robust to extreme values, thus obtaining a stable and comparable strength scale. To evolve the default impact vector, it is used as an anomalous morphology seed, through sample vectors. With local evolution reference vector The difference was calculated to obtain the result. To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... The relative default intensity is obtained through the above design. This is used to provide a unified strength metric for subsequent strength locking.

[0053] If the synthetic intensity is too weak, it will be difficult to improve the detection sensitivity; if it is too strong, the sample will deviate from the true distribution and introduce bias. To lock the synthetic intensity of different samples to the same target level, a target intensity locking coefficient is introduced. The mathematical model is as follows: ; in, This is the strength locking coefficient. This is a limiting function used to constrain the intensity locking coefficient within a certain range. The target intensity threshold is used to specify the boundary intensity range that the synthetic sample should fall into. and To truncate the upper and lower boundaries, used to prevent Too small a value can cause the coefficient to explode or An excessively large coefficient results in an ineffective synthesis, as demonstrated in this example. The value is set to 0.12, which ensures that the sample is detectable without being excessively outlier. and Values ​​of 0.6 and 1.6 were used to cover the range of mild to strong injections, while suppressing physically infeasible synthesis caused by extreme amplification. To ensure the denominator is a very small positive number and prevent it from being zero, this embodiment uses... .

[0054] To address the issues of diverse anomaly patterns and insufficient boundary samples near thresholds in soil erosion during production and construction projects, leading to insensitivity of anomaly detection modules in identifying weak and critical anomalies and insufficient stability in threshold setting, this example proposes a controllable anomaly injection approach while maintaining the sample structure. This generates perturbation samples that satisfy both evolutionary breach direction constraints and intensity locking constraints. The mathematical model is as follows: ; in, As perturbation samples, the above construction achieves dual controllable constraints on the direction and intensity of abnormal injection without changing the sample dimension and channel structure. This forms the most valuable boundary hard example samples for improving threshold robustness. Finally, all region units are... Phase point of the event The perturbation samples are aggregated to obtain the third dataset. The training and testing sets were divided in a 7:3 ratio for subsequent training and validation of the anomaly detection module.

[0055] This embodiment constructs an anomaly detection module. Taking a third dataset as input, it completes anomaly detection and localization through a chain of processes: reference deviation extraction, event phase smoothing constraint, anomaly score calculation, threshold discrimination, and localization output.

[0056] First, since anomaly detection requires a stable reference to avoid score drift with sample fluctuations, the mean of the perturbed samples in the training set is calculated for each channel to obtain the channel-level reference center template parameters. For any region cell and any event clock sampling point, the difference between the disturbance sample and the channel-level reference center template parameter is used to obtain the reference deviation vector. The mathematical model is: ; in, For channel-level reference center template parameters, perturbation samples are calculated. The mean value is obtained. This design can transform each sample into deviation evidence relative to the reference center, which facilitates subsequent stable anomaly scoring and threshold discrimination.

[0057] Since isolated jumps may originate from short-term noise rather than actual process anomalies, and real soil erosion anomalies tend to be continuous segments in the event phase, a smoothing deviation vector of the event phase is constructed to suppress isolated jumps while preserving phase continuity. The mathematical model is as follows: ; in, For smooth deviation vectors; , , They are the same regional units The reference deviation vectors at adjacent event phase points have coefficients of 1, 2, and 1, respectively, and are used to achieve local phase consistency constraints without introducing additional model parameters. In this example, the boundary phase... and When using single-sided neighbor substitution to ensure feasibility, this design can reduce false alarms of isolated points and enhance the continuity and interpretability of the positioning results.

[0058] To highlight key deviation channels and obtain stable outlier scores, the absolute values ​​of each component of the smoothed deviation vector are calculated, and the component with the largest value is selected. Calculate the sum of the components, then divide by . The abnormal scores were obtained, and the mathematical model is as follows: ; in, These are abnormal scores. This indicates taking the absolute value of each component. This means taking the vector with the largest value. Each component is summed. The number of aggregated channels is taken as [value] in this example. This is used to cover a few significantly deviated channels and avoid relying solely on single-channel extrema, thereby improving sensitivity and stability to boundary anomalies near the threshold.

[0059] Multiply the outlier score by the first scalar parameter. Then with the second scalar parameter The sum is then subjected to a nonlinear transformation to obtain the probability of the detected anomaly. The mathematical model is as follows: ; in, The probability of detecting an anomaly. For the Sigmoid function, and Let be the scalar parameters to be trained, used to map anomaly scores to probability outputs, where Controlling score sensitivity, Control the discrimination bias, in this example and The initial values ​​are 1 and 0.1 respectively. These values ​​are used to maintain the probability output in a neutral state without saturation at the beginning of training, which facilitates stable gradient updates. Then, an anomaly detection mask is constructed to determine whether something is an anomaly. The mathematical model is as follows: ; in, For indicator functions; This is an anomaly detection mask; 1 indicates anomaly, and 0 indicates normal. To obtain the threshold used for discrimination during the training phase, the mathematical model is as follows: ; in, and Here, represents the mean and variance of the outlier scores in the training set, respectively. The threshold coefficient is set to 3 in this example. This value sets the discrimination threshold near the upper bound of the training score fluctuation, thereby effectively suppressing false alarms without significantly sacrificing sensitivity to boundary anomalies. Through the above design, the outputs of different regional units and different event phases can be unified into the probability space, which is convenient for subsequent consistent output with fixed discrimination rules. At the same time, the boundary samples near the threshold can be transformed into continuously changing probabilities, thereby avoiding the abrupt jumps and instability caused by directly using hard thresholds for score discrimination.

[0060] To minimize the deviation between the model's detected values ​​and the true labels, and to improve the accuracy and stability of the detection results, a loss function is constructed. To update parameters and The mathematical model is: ; in, For the training set index set, The number of training samples, For real labels, The natural logarithm function is used to construct the loss term in log-likelihood form, which is achieved by minimizing the update. and , making the predicted probability Consistent with the true label, this enables the learning of discriminative ability for boundary samples near the threshold. See [link / reference]. Figure 5 The diagram shown is a model training process according to an embodiment of the present invention, with 300 training rounds. Figure 5As can be seen, with the increase of the number of training rounds, the model converges and stabilizes during the training process, and finally, a well-trained model for detecting anomalies in soil and water loss data of production and construction projects is obtained.

[0061] Validate the model using the test set. See [link / reference] Figure 6 The diagram shown is a data detection illustration provided by an embodiment of the present invention. The horizontal axis represents the sample number, the vertical axis represents the anomaly probability, the solid dotted line represents the anomaly probability detected by the model, the dashed line represents the threshold used for anomaly judgment, the box represents the true label, and the star represents the model detecting anomalies. Figure 6 As can be seen, the samples detected as abnormal are basically consistent with the true labels. The verification results show that the anomaly detection model for soil and water loss data in production and construction projects can effectively detect soil and water loss.

[0062] Acquire multi-source monitoring data on soil erosion, input it into the trained anomaly detection model for soil erosion data in production and construction projects, and output anomaly values ​​for soil erosion.

[0063] This invention provides a method for detecting anomalies in soil erosion data. First, a multi-source data and spatiotemporal alignment module uses spatial merging of hydrological path constraints, rainfall event clock alignment, and cross-source consistency weighted fusion to construct a unified alignment tensor from asynchronous, heterogeneous, and heterogeneous observation sequences from multiple sources. Next, a steady-state baseline construction module extracts the in-phase dominant state directions between sources, constructs a physically consistent steady-state baseline, and calculates the difference between the baseline and the input to obtain the steady-state residual, forming a second dataset to suppress non-dominant state disturbances. Then, a disturbance sample and intensity control module constructs a local evolution benchmark based on the event phase evolution law, and generates boundary disturbance samples through evolutionary violation impact and intensity locking, forming a third dataset to enhance the detection capability of boundary anomalies. Finally, an anomaly detection module calculates the reference deviation vector, calculates the anomaly score after phase smoothing, and maps it to anomaly probability. Anomaly detection and location output are completed through threshold discrimination. This invention systematically solves the key technical problems of spatiotemporal alignment of multi-source data, disturbance suppression, boundary sample enhancement, and accurate anomaly discrimination through sequential progressive data processing.

[0064] This invention also provides an electronic device for running a method for detecting anomalies in soil erosion data; see [link to related documentation]. Figure 7 The schematic diagram of an electronic device provided by the embodiment of the present invention shown above includes a memory 400 and a processor 401. The memory 400 is used to store one or more computer instructions, which are executed by the processor 401 to realize the above-mentioned method for detecting abnormal soil erosion data.

[0065] Furthermore, Figure 7The electronic device shown also includes a bus 402 and a communication interface 403. The processor 401, the communication interface 403 and the memory 400 are connected via the bus 402.

[0066] The memory 400 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 403 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 402 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0067] Processor 401 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 401 or by instructions in software form. Processor 401 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 400, and processor 401 reads information from memory 400 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0068] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the above-mentioned method for detecting anomalies in soil and water loss data. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0069] The computer program products of the soil erosion data anomaly detection method, device and electronic equipment provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. The program can be developed in the Python programming language in a computing platform and built based on the PyTorch framework. It can be deployed in a processing device with computing capabilities. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0070] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0071] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0072] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the 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 or all of the technical features; and these 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 the present invention.

Claims

1. A method for detecting anomalies in soil erosion data, characterized in that, include: Collect historical multi-source monitoring data on soil and water loss to construct the original dataset; The original dataset is merged into regional units according to hydrological path distance to obtain a spatially aggregated observation vector; The spatial aggregated observation vectors are kernel-weighted and aligned to obtain an event-aligned representation; Based on the event alignment representation, the consistency error is calculated, mapped to a confidence weight, and weighted concatenation is used to obtain a unified alignment tensor, which is then integrated to obtain the first dataset. Based on the first dataset, a physically consistent steady-state baseline is determined. The difference between the physically consistent steady-state baseline and the unified alignment tensor is determined as the steady-state residual vector. The physically consistent steady-state baseline and the steady-state residual vector are concatenated and integrated to obtain the second dataset. The evolutionary default shock vector is determined based on samples of adjacent phase points in the second dataset, and the intensity lock-in coefficient is determined by a preset target intensity threshold. The product of the evolutionary default shock vector and the intensity lock-in coefficient is superimposed on the second dataset to obtain perturbation samples, which are then aggregated to form the third dataset. Based on the reference deviation vector between the samples in the training set and the reference center in the third dataset, a smooth deviation vector is determined, and the average of the absolute values ​​of a preset number of smooth deviation vectors is determined as the anomaly score. The abnormality score is linearly transformed based on the scalar parameter adjustment to obtain the abnormality probability. The abnormality probability is used to determine whether there is data abnormality. The scalar parameter is gradually adjusted according to the preset loss function until the preset completion condition is reached to obtain the data abnormality detection model. The multi-source monitoring data of soil and water loss is input into the data abnormality detection model, and finally the soil and water loss abnormal value is output. Based on the first dataset, a physically consistent steady-state baseline is determined. The difference between the physically consistent steady-state baseline and the unified alignment tensor is determined as the steady-state residual vector. The physically consistent steady-state baseline and the steady-state residual vector are concatenated and integrated to obtain the second dataset, including: calculating the L2 norm of the unified alignment tensor as the denominator; dividing the unified alignment tensor by the denominator to obtain the inter-source in-phase principal state direction; multiplying the inter-source in-phase principal state direction by the unified alignment tensor after transposition to obtain the principal state amplitude coefficient; using the square of the principal state amplitude coefficient as the principal state projection energy; and using the unified alignment tensor... The square of the L2 norm is used as the input total energy. The ratio of the main state projected energy to the input total energy is used as the in-phase proportion indicator. The in-phase proportion indicator is used as the ratio of the steady-state consistency benchmark and the sum of the smallest positive numbers to obtain the consistency gating pull-back coefficient. The consistency gating pull-back coefficient is multiplied by the source in-phase main state direction and the main state amplitude coefficient to obtain the physical consistency steady-state baseline. The difference between the unified alignment tensor and the physical consistency steady-state baseline is determined to obtain the steady-state residual vector. The physical consistency steady-state baseline and the steady-state residual vector together constitute the sample vector, which is then integrated to obtain the second dataset.

2. The method according to claim 1, characterized in that, The original dataset includes the timestamp, spatial coordinates, and multi-channel original observation vectors for each observation sample; wherein, the multi-channel original observation vectors include parameters such as rainfall intensity, cumulative rainfall, soil moisture content, soil temperature, runoff, water level, flow velocity, sediment content, sediment transport rate, sediment concentration, slope, aspect, catchment area, air temperature, evapotranspiration, wind speed, surface reflectance, vegetation index, and soil moisture index.

3. The method according to claim 1, characterized in that, The original dataset is merged into regional units according to hydrological path distance to obtain spatially aggregated observation vectors, including: For any observation point and the center of any regional unit, the hydrological path distance between them is first calculated. The negative value of the hydrological path distance is divided by the spatial influence scale and the exponent is taken to obtain the contribution intensity of the observation point to the regional unit. The ratio of the contribution intensity to the sum of the contribution intensity of the observation point to all regional units is used as the spatial merging weight. The original observation vectors at the same timestamp are weighted and summed according to the spatial merging weights to obtain the weighted observation cumulative amount. The spatial merging weights of all observation points at the same timestamp are summed to obtain the weight cumulative amount. The ratio of the weighted observation cumulative amount to the weight cumulative amount is used as the spatial aggregated observation vector.

4. The method according to claim 1, characterized in that, The event-aligned representation obtained by kernel-weighted alignment of the spatial aggregated observation vectors includes: For any given time, the average rainfall intensity sequence of the area affected by the project before the current time is convolved and integraled with the exponential decay kernel function to obtain the event clock. The absolute value of the difference between the event clock value and the event clock sampling point at each effective sampling time is calculated, divided by the smoothing scale, and then the negative exponent is taken to obtain the alignment kernel for each sampling time. The weighted sum of the spatial aggregation observation vector and the alignment kernel is calculated, and the sum of all alignment kernel weights is also calculated to obtain the cumulative alignment kernel weight. The event alignment representation is obtained by the ratio of the weighted sum to the cumulative alignment kernel weight.

5. The method according to claim 1, characterized in that, Based on the event alignment representation, the consistency error is calculated, mapped to a confidence weight, and weighted concatenation is used to obtain a unified alignment tensor. The integrated dataset includes: Calculate the average value of the event alignment representation of all data sources except the s-th data source, and use it as the reference benchmark for the s-th data source. Calculate the difference vector between the event alignment representation of the s-th data source and the reference benchmark, and obtain the consistency error by performing a 2-norm operation. By introducing an error scaling parameter and performing an exponential operation to obtain the confidence weight, the aligned representations of each source event are connected at the channel level to obtain a unified alignment tensor, which is then integrated to generate the first dataset.

6. The method according to claim 1, characterized in that, The evolving default shock vector is determined based on samples from adjacent phase points in the second dataset, and the intensity lock-in coefficient is determined through a preset target intensity threshold. The product of the evolving default shock vector and the intensity lock-in coefficient is superimposed on the second dataset to obtain perturbation samples, which are then aggregated to form the third dataset, including: The local evolution reference vector is obtained by adding the sample vector of the region unit at the adjacent previous event clock sampling point and the sample vector at the adjacent subsequent event clock sampling point, and then multiplying the result by one-half. The difference between the sample vector and the local evolutionary benchmark vector is used to obtain the evolutionary default shock vector. The relative default intensity is determined by multiplying the absolute value of the component of the evolving default impact vector with a preset quantile as the numerator and adding the product of the absolute value of the component of the local evolution reference vector with the preset minimum positive number as the denominator. The ratio of the preset target strength threshold to the sum of the relative default strength and the smallest positive number is used as the initial coefficient. The initial coefficient is constrained between the preset minimum cutoff value and the maximum cutoff value to obtain the strength locking coefficient. The perturbation sample is obtained by adding the product of the sample vector with the strength locking coefficient and the evolution default impact vector, and then aggregated to obtain the third dataset.

7. The method according to claim 1, characterized in that, Based on the reference deviation vector between the samples in the training set of the third dataset and the reference center, a smoothed deviation vector is determined. The average of the absolute values ​​of a predetermined number of these smoothed deviation vectors is then used to determine the anomaly score, including: Calculate the mean of the perturbation samples in the training set in each channel to obtain the channel-level reference center template parameters; For any region cell and any event clock sampling point, the difference between the disturbance sample and the channel-level reference center template parameter is used to obtain the reference deviation vector; Multiply the reference deviation vectors of the same region unit at adjacent event phase points by preset weight coefficients, sum them, and divide by the total weight to obtain the smoothed deviation vector; The abnormality score is obtained by selecting a predetermined number of components with the largest absolute values ​​among the components of the smooth deviation vector and averaging them.

8. The method according to claim 1, characterized in that, The abnormality score is linearly transformed based on the scalar parameter adjustment to obtain the abnormality probability. The abnormality probability is used to determine whether there is data abnormality. The scalar parameter is gradually adjusted according to the preset loss function until the preset completion condition is reached to obtain the data abnormality detection model. The multi-source monitoring data of soil erosion is input into the data anomaly detection model, and the final output of soil erosion anomaly values ​​includes: The anomaly score is multiplied by the first scalar parameter and then added to the second scalar parameter. The result of the addition is then subjected to a nonlinear transformation to obtain the predicted anomaly probability. An anomaly detection mask is constructed based on a preset indicator function to determine whether an anomaly exists; The model is trained using the loss function until the preset completion conditions are met, thus obtaining a data anomaly detection model. The multi-source monitoring data of soil and water loss is input into the data anomaly detection model, and finally the soil and water loss anomaly value is output.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Real-time predictive systems for intelligent energy monitoring and management of electrical power networks

    CA2882796A1

  • Water and soil loss monitoring model processing method and device and electronic equipment

    CN117274822A