Multiscale geographically weighted spatial local xgboost machine learning model

By constructing a multi-scale, geographically weighted, spatially local XGBoost machine learning model, decoupling geographical and non-geographical features, and dynamically adjusting the bandwidth scale and gain function, the problem of decreased prediction accuracy in soil salinization monitoring by traditional models is solved, and high-precision prediction and factor localization of soil salinization are achieved.

CN121051606BActive Publication Date: 2026-06-26HUAIYIN TEACHERS COLLEGE
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAIYIN TEACHERS COLLEGE
Filing Date
2025-09-18
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Traditional XGBoost models fail to effectively decouple the interaction effects of geographic and non-geographic factors in soil salinization monitoring, neglecting the spatial autocorrelation of geographic data. This leads to a decrease in the model's prediction accuracy in spatial transition areas, making it difficult to pinpoint the dominant cause of salinization.

Method used

A spatial local XGBoost machine learning model based on multi-scale geographic weighting is adopted. A dual-channel input structure of geographic and non-geographic features is constructed through a feature decoupling module. Combined with a bandwidth allocation module and a constraint gain module, the bandwidth scale and geographic gain function are dynamically adjusted to extract split features and perform salinity prediction. The contribution decoupling module is used to analyze the contribution index of geographic and non-geographic features.

Benefits of technology

Effectively decoupling the cross-influence of macro-geographic forces such as tidal forces and micro-properties such as soil viscosity improves the model's prediction accuracy and interpretability for soil salinization, enabling the identification of dominant factors and achieving dynamic optimization of the spatial continuity and heterogeneity of soil salinity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121051606B_ABST
    Figure CN121051606B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of machine learning, and particularly discloses a spatial local XGBoost machine learning model based on multi-scale geographical weighting, which comprises the following modules: a feature decoupling module for constructing a double-channel input structure of geographical features and non-geographical features, realizing feature decoupling and fusion through a multi-scale spatial weight matrix; a bandwidth allocation module for dynamically determining a bandwidth scale in an XGBoost tree splitting process and establishing dynamic weights of tree levels; a constraint gain module for generating a splitting point marked with a scale; a contribution decoupling module for extracting splitting features and correlating geographical features and non-geographical features, realizing salted prediction and contribution index extraction; and a verification optimization module for optimizing model parameters through multi-scale heat maps and spatial autocorrelation analysis. The model can capture geographical spatial effects of different scales, improve spatial local prediction accuracy, and be applied to a scene with spatial heterogeneity in soil salinization analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning technology, and in particular to a spatially local XGBoost machine learning model based on multi-scale geographic weighting. Background Technology

[0002] With the widespread application of machine learning technology in spatial prediction, geospatial heterogeneity scenarios such as soil salinization monitoring place higher demands on models. Although the traditional XGBoost model performs well in feature splitting decisions, it has significant limitations.

[0003] Existing methods assume that samples are independent and identically distributed, neglecting the spatial autocorrelation of geographical data. For example, coastal salinization is affected by both macro-tidal gradients and micro-soil texture, causing fixed-bandwidth geographically weighted regression to be unable to adapt to multi-scale effects, and the model's prediction accuracy decreases in spatial transition regions.

[0004] Traditional models directly splice together heterogeneous features such as latitude and longitude and soil properties as inputs, without decoupling the interaction effects of geographical and non-geographical factors, and fail to analyze the contribution of key driving factors. Existing methods are unable to pinpoint the dominant cause of salinization.

[0005] To this end, the present invention provides a spatial local XGBoost machine learning model based on multi-scale geographic weighting. Summary of the Invention

[0006] The purpose of this invention is to provide a spatially local XGBoost machine learning model based on multi-scale geographic weighting to solve the aforementioned background problems.

[0007] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0008] A spatially local XGBoost machine learning model based on multi-scale geographic weighting includes the following modules:

[0009] Feature decoupling module: used to construct a dual-channel input structure of geographic features and non-geographic features, decouple geographic features and non-geographic features, and construct a multi-scale spatial weight matrix;

[0010] Bandwidth allocation module: Based on the spatial weight matrix, it is used to determine the dynamic bandwidth scale during the tree splitting process of the XGBoost machine learning model, and to establish dynamic weights for tree hierarchy binding based on the dynamic bandwidth scale;

[0011] Constrained Gain Module: Used to generate geographic weighted gradients through dynamic weights, construct spatial continuity penalty terms, reconstruct geographic gain functions based on weighted gradients and spatial continuity penalty terms, and output scale-labeled split points;

[0012] Contribution decoupling module: Extract splitting features based on scale-labeled splitting points, establish geographic feature subsets and non-geographic feature subsets and perform salinity prediction, obtain salinity prediction values ​​and determine whether the effect decoupling signal is triggered. If triggered, feature decoupling processing is performed and a single-scale contribution index is extracted.

[0013] In a further technical solution of the present invention, the method for generating the preliminary decoupling fusion feature is as follows:

[0014] Obtain the multi-scale spatial weights of the monitoring area and construct a multi-scale spatial weight matrix;

[0015] Soil salinity characteristics were collected and normalized to establish a normalized salinity matrix;

[0016] Based on the normalized salting matrix and spatial weight matrix, fused features are generated through feature fusion equation.

[0017] In a further technical solution of the present invention, the method for establishing dynamic weights for tree-level binding is as follows:

[0018] During tree splitting in the XGBoost machine learning model, the depth of the current tree node and the entropy of the node sample space are obtained.

[0019] A bandwidth equation is established based on the tree node depth and the spatial entropy of node samples to obtain a dynamic bandwidth scale.

[0020] Based on the dynamic bandwidth scale, the multi-scale bandwidth parameters are adjusted, the spatial weight matrix is ​​reconstructed, and dynamic weights bound to the tree hierarchy are established.

[0021] In a further technical solution of the present invention, the method for obtaining the spatial entropy of node samples is as follows:

[0022] The conductivity and texture entropy of the soil at each monitoring point are obtained. Based on the conductivity and texture entropy, the spatial entropy of the node samples is obtained through the entropy equation.

[0023] In a further technical solution of the present invention, the method for outputting the scale-marked split points is as follows:

[0024] Obtain the node distribution and hierarchical order of the decision tree in the XGBoost model, and decompose the geographically weighted gradient into the left node weighted gradient and the right node weighted gradient;

[0025] Obtain the second-order gradient of the left parent node and the second-order gradient of the right parent node, as well as the penalty term for spatial continuity. Combine the weighted gradients of the left and right nodes to calculate the geographic gain value.

[0026] Based on the geographic gain value, a split point selection and scale partitioning strategy is formulated for the unsplit nodes of the XGBoost model to obtain split points with scale labels.

[0027] In a further technical solution of the present invention, the method for formulating the split point selection and scale division strategy is as follows:

[0028] Obtain unsplit nodes and bind them to geographic scales;

[0029] Candidate splits are performed based on the unsplit nodes that have been bound;

[0030] Based on the unsplit nodes that have completed candidate splits, the optimal split point is selected and the scale label is bound.

[0031] In a further technical solution of the present invention, the method for determining whether a decoupling signal for the triggering effect is:

[0032] Obtain the splitting features and associate them with geographic features and non-geographic features to obtain geographic feature subsets and non-geographic feature subsets;

[0033] Construct a geographical Shapley equation, input geographical and non-geographical features into the geographical Shapley equation, and output the salinity prediction value for each monitoring point;

[0034] Based on comparative analysis of salt prediction values, the triggering conditions for effect decoupling signals were obtained.

[0035] In a further technical solution of the present invention:

[0036] Verification and optimization module: Based on the single-scale contribution index, multi-scale heat maps are drawn, which are used to identify unstable regions in the multi-scale heat maps by combining local condition number analysis. Global autocorrelation analysis is performed on the unstable regions to obtain the degree of geospatial information capture.

[0037] In a further technical solution of the present invention, the method for performing the global autocorrelation analysis is as follows:

[0038] Obtain the unstable regions of the multi-scale heat map, obtain and calculate the difference between the predicted and measured salinity values ​​at the monitoring points, and obtain the salinity residual;

[0039] Obtain the salinity residuals and multi-scale spatial weights of all unstable regions, perform global autocorrelation analysis, and obtain the spatial autocorrelation values;

[0040] The degree to which the feature decoupling module captures geospatial information is determined based on spatial autocorrelation values.

[0041] In a further technical solution of the present invention, the unstable region is obtained by means of:

[0042] Spatial correlation analysis was performed on the single-scale contribution index within the grid adjacent to the monitoring point, a spatial correlation matrix was constructed, and the maximum and minimum eigenvalues ​​of the spatial correlation matrix within the grid of the jump tolerance radius were obtained.

[0043] The local condition number is obtained by taking the ratio of the largest and smallest eigenvalues.

[0044] By overlaying local condition numbers onto a multi-scale heatmap and then performing regional decomposition on the multi-scale heatmap, the unstable regions of the multi-scale heatmap are obtained.

[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0046] (1) By constructing a dual-channel input structure of geographic feature matrix and non-geographic feature matrix, combining multi-scale spatial weight equation to quantify the land-sea gradient effect, and using gating coefficient to control the feature fusion intensity, the cross-influence of macro-geographic forces such as tidal action and micro-attributes such as soil viscosity is effectively decoupled, and the prediction bias caused by spatial mixing effect is reduced.

[0047] (2) Based on node depth and spatial entropy, a dynamic bandwidth equation is constructed so that the weight matrix automatically switches the scale bandwidth with the tree level, which is conducive to the XGBoost model capturing the spatial differentiation pattern between mixed salt patches and homogeneous farmland; the local effect is strengthened by the geographic gain function, the salinity mutation penalty term suppresses spatial jump splitting, and the splitting point with scale label is output, which is conducive to the decision boundary conforming to the spatial continuity pattern of soil salinity.

[0048] (3) Based on scale label aggregation split path, the geographic main effect and non-geographic feature interaction effect are decoupled through the geographic Shapley equation, and the total contribution index and single-scale contribution index are output to locate the dominant factor when triggering salinity warning; multi-resolution heat map is generated through single-scale contribution index, and unstable areas are identified by combining local condition number. The rationality of the gate coefficient is judged by using the global Moran index of salinity residual: which is conducive to fully capturing geographic information and dynamically optimizing to achieve spatial fitting balance. Attached Figure Description

[0049] Figure 1 This is a block diagram of the present invention;

[0050] Figure 2 This is a flowchart illustrating the strategy for selecting split points and dividing scales in this invention;

[0051] Figure 3 This is a flowchart of the trigger effect decoupling signal of the present invention. Detailed Implementation

[0052] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention.

[0053] Example 1

[0054] enter Figure 1As shown, the present invention is a spatial local XGBoost machine learning model based on multi-scale geographic weighting, which includes the following modules;

[0055] Feature decoupling module: used to construct a dual-channel input structure of geographic features and non-geographic features, decouple geographic features and non-geographic features, and construct a multi-scale spatial weight matrix;

[0056] The method for constructing a dual-channel input structure for geographic features and non-geographic features, and decoupling geographic features from non-geographic features, is as follows:

[0057] Preferably, in the monitoring of soil salinization in the coastal plain area, the soil salinization monitoring area is divided, and the longitude and latitude of n monitoring points in the monitoring area are collected to construct an n*2-dimensional geographic feature matrix;

[0058] A multi-scale spatial weight equation is established based on the geographic feature matrix to obtain the multi-scale spatial weights;

[0059] The construction method corresponding to the channel input structure of geographic features is as follows:

[0060] A multi-scale spatial weight matrix is ​​constructed based on the multi-scale spatial weight of the monitoring area.

[0061] Preferably, by formula: Obtaining multi-scale spatial weights Quantify the land-sea gradient effect;

[0062] in, To calculate the geographic spherical distance from monitoring point i to other monitoring points j within the same node using a spherical distance function, Let π be the mathematical constant, and k be the scale number. Here, e is the base of the exponential function, and the multi-scale bandwidth parameter is the preset value.

[0063] As will be understood by those skilled in the art, scale refers to the size of different spatial influence ranges or spatial heterogeneity domains in geospatial analysis;

[0064] In the XGBoost machine learning model, a node represents a local spatial region partitioned by a specific splitting rule during the decision tree growth process. For example, a decision tree with shallow nodes has a node depth of 3 or less, corresponding to a macroscopic scale region, namely the tidal influence zone, with a scale bandwidth. ;

[0065] In decision trees with deep nodes, the node depth is greater than 6, corresponding to a microscale region, namely the tidal influence zone, with a scale bandwidth. ;

[0066] The construction method for the channel input structure that is not geographically characteristic is as follows:

[0067] Preferably, soil salinity characteristics in m dimensions from n monitoring points in the monitoring area are collected as non-geographical features to establish an n x m dimensional soil salinity matrix. ;

[0068] Understandably, soil salinity characteristics include: vegetation index and soil viscosity content;

[0069] The soil salinity matrix was normalized to construct a normalized salinity matrix. ;

[0070] Based on the normalized saltiness matrix and spatial weight matrix, the feature fusion equation is as follows: Generate fusion feature F;

[0071] in, This is a feature concatenation operator, used to decouple geographic and non-geographic features in the feature space;

[0072] It should be noted that the feature concatenation operator achieves decoupling through a logic of separation followed by fusion: latitude and longitude, distance from the coastline (geographic features), and soil viscosity and vegetation index (non-geographic features) are processed through independent channels, preserving their respective feature spatial structures; during concatenation, the fusion intensity is controlled by a gating coefficient α to reduce direct mixing of the two features in the original space, and effective interaction is achieved by dynamically adjusting the weights;

[0073] For example, in coastal salinization analysis, geographical features reflect the spatial gradient at macro scales such as tides, while non-geographical features reflect micro-attributes such as soil texture. The splicing operator keeps the two relatively independent dimensions in the feature space, while the fusion equation achieves targeted information complementarity, thereby capturing their respective influencing mechanisms more accurately in subsequent model training.

[0074] The purpose of constructing the dual-channel input structure and decoupling it is as follows:

[0075] Firstly, it reduces spatial confounding effects: Geographical and non-geographical features influence salinization through different mechanisms, and direct splicing can lead to cross-interference between macroscopic spatial patterns and microscopic attributes. The dual-channel structure preserves the characteristic distribution of each channel through independent channels. After decoupling, it can reduce the problem of tidal effects being masked by soil texture noise and improve the model's ability to identify key driving factors.

[0076] Function 2: Adapting to Multi-Scale Spatial Effects: The influence of geographical features is multi-scale, such as large-scale land-sea gradients and small-scale micro-topography, while non-geographical features reflect more local attributes. After decoupling, the geographical feature channel can quantify spatial correlations at different scales through a multi-scale spatial weight matrix, while the non-geographical feature channel focuses on modeling local attributes, enabling the model to capture salinization patterns at both macro and micro levels.

[0077] Thirdly, it improves prediction accuracy and interpretability: After decoupling, the model can analyze the contribution index of geographical features and non-geographical features separately through the contribution decoupling module, clarifying the influence weight of different factors. For example, in salinization early warning, it can determine whether geographical factors (such as coastline expansion) or non-geographical factors (such as improper irrigation) are dominant, providing a basis for targeted management and reducing prediction bias caused by feature confounding.

[0078] The preset gating coefficient, The value range is [0,1];

[0079] Preferably, The initial value is 0.5;

[0080] A fusion feature matrix is ​​built based on the fusion features, and the fusion feature matrix is ​​input into the XGBoost machine learning model.

[0081] Those skilled in the art will understand that after the fused feature matrix is ​​input into the XGBoost machine learning model, the model will, during the tree splitting process, determine the dynamic bandwidth scale based on node depth and spatial entropy through the bandwidth allocation module, establish dynamic weights binding the tree hierarchy, and then use the constraint gain module to generate a geographic weighted gradient using the dynamic weights. Combined with the spatial continuity penalty term, the geographic gain function is reconstructed and scale-labeled split points are output. The contribution decoupling module extracts splitting features based on these split points and performs salinity prediction to obtain salinity prediction values. At the same time, it can trigger effect decoupling signals to extract single-scale contribution indices, ultimately realizing the prediction of soil salinization and the analysis of related feature contributions. Through the above process, the XGBoost model effectively captures geospatial effects at different scales, strengthens spatial local prediction capabilities, and makes its prediction results more consistent with the spatial continuity and heterogeneity of soil salinity.

[0082] Bandwidth allocation module: Based on the spatial weight matrix, it is used to determine the dynamic bandwidth scale during the tree splitting process of the XGBoost machine learning model, and to establish dynamic weights for tree hierarchy binding based on the dynamic bandwidth scale;

[0083] The method for determining the dynamic bandwidth scale during the XGBoost machine learning model tree splitting process is as follows:

[0084] Obtain the soil conductivity Ec and soil texture entropy at each monitoring point, and then use the conductivity and texture entropy as a basis for the analysis. Through the entropy equation: Obtain the spatial entropy of node samples ;

[0085] in, , The maximum and minimum values ​​of conductivity, respectively;

[0086] Preferably, the adjustment coefficient for the coastal monitoring area is 0.3;

[0087] Among them, texture entropy is an indicator used to quantify the heterogeneity of different texture types in a soil sample. It is calculated by measuring the volume percentage of sand, loam, and clay at the monitoring points to obtain the sand percentage. loam soil ratio Clay content ;

[0088] The proportion of sandy soil loam soil ratio Clay content Based on the principle of information entropy, using the entropy formula: Obtain the mass entropy b is the soil type number;

[0089] When a certain texture has a very high proportion, the texture entropy approaches 0, indicating that the soil texture is homogeneous; when the proportions of multiple textures are close, the texture entropy increases, indicating that the texture is mixed.

[0090] The physical meaning of obtaining the spatial entropy of node samples is as follows: when the spatial entropy of node samples is higher than 0.8, the monitoring point is a salt patch or a mixed texture area; when the spatial entropy of node samples is lower than 0.3, the monitoring point is determined to be a homogeneous farmland.

[0091] In the XGBoost machine learning model, during tree splitting, obtain the current tree node depth dh;

[0092] It is understandable that tree node depth dh≤3 corresponds to the macroscopic scale, and dh>6 corresponds to the microscopic scale;

[0093] A bandwidth equation is established based on the tree node depth and the spatial entropy of node samples to obtain a dynamic bandwidth scale.

[0094] Preferably, by formula: Obtain the dynamic bandwidth scale ;

[0095] in, To integrate the training parameters of the XGBoost machine learning model for tidal action coefficients, such as those for coastal areas. =10、 =0.5;

[0096] The attenuation coefficient adjusts the rate at which bandwidth decreases as the tree node depth increases. A larger attenuation coefficient means the bandwidth shrinks faster as the node depth increases, resulting in a model that is more focused on local details. This is the spatial entropy weighting coefficient, which controls the strength of the contribution of the node sample spatial entropy to the bandwidth.

[0097] Understandable, As an exponentially decaying term, the deeper the tree node, the narrower the bandwidth. This simulates deep nodes to focus on local patterns. For example, the root node analyzes large-scale trends, while the leaf nodes analyze small-scale variations. The spatial entropy term represents the spatial entropy of the node samples. The larger the bandwidth, the wider the bandwidth. Simulating heterogeneous samples requires a larger range of smoothing to extract patterns. For example, regions with mixed textures require a larger bandwidth to integrate information.

[0098] The dynamic bandwidth formula is based on the natural relationship between tree depth and spatial entropy. Tree splitting makes the samples purer when the tree is deeper, and the spatial entropy of the node samples increases. The higher the depth, the more inversely it requires bandwidth: deeper depths need narrower bandwidth to focus on local areas, while more complex samples require wider bandwidth to accommodate heterogeneity. Therefore, by using an exponential term (which decays with depth, driving bandwidth contraction and adapting to the desired level of detail) and... The antagonistic synergy of entropy terms enables the hierarchical scale gradient of root node mining for macroscopic data and deep node mining for detailed data. It satisfies the local compensation of wide bandwidth for heterogeneous nodes and narrow bandwidth for homogeneous nodes within the same layer, adapts to the multi-scale and heterogeneous patterns of geographic space, and enables the XGBoost model to dynamically capture spatial effects.

[0099] The multi-scale bandwidth parameters in the multi-scale spatial weights are adjusted based on the dynamic bandwidth scale, the spatial weight matrix is ​​reconstructed, and dynamic weights bound to the tree hierarchy are established.

[0100] Understandably, based on the dynamic bandwidth scale, the implementation substitutes the dynamic bandwidth specific to the tree node into the spatial weight kernel function (such as the Gaussian kernel to calculate the spatial correlation strength between samples) to reconstruct the node-level spatial weight matrix; the tree-level binding utilizes the difference in dynamic bandwidth scale between nodes at different depths (e.g., shallow nodes have wide bandwidth and deep nodes have narrow bandwidth) to allow shallow weights to cover the wide-area spatial correlation of regional tidal influences, while deep weights focus on the local neighborhood dependence of micro-topography salinity interactions.

[0101] The role of establishing dynamic weights that bind tree hierarchy is to enable the model to dynamically adapt to multi-scale spatial effects during tree splitting: wide weights capture the macroscopic patterns of watershed salinity migration, narrow weights mine the microscopic variations of salt patch aggregation, strengthen the coupling between spatial locality and tree hierarchy scale, and make salinization prediction fit the spatial heterogeneity and continuity of soil salinity.

[0102] Example 2

[0103] like Figure 1 As shown, the spatially local XGBoost machine learning model based on multi-scale geographic weighting also includes the following modules:

[0104] Constrained Gain Module: Used to generate geographic weighted gradients through dynamic weights, construct spatial continuity penalty terms, reconstruct geographic gain functions based on weighted gradients and spatial continuity penalty terms, and output scale-labeled split points;

[0105] The method for obtaining the geographically weighted gradient by performing split gain processing on the XGBoost model based on dynamic weights and injecting spatial continuity constraints is as follows:

[0106] Based on dynamic weights, the monitoring points to be split in the XGBoost model are obtained, and the monitoring point set I to be split is established.

[0107] The monitoring data set includes the location and salinity value of each monitoring point;

[0108] Obtain the first gradient of the loss function of the monitoring points in the monitoring point set of the XGBoost model, and multiply the first gradient with the dynamic weights to obtain the geographically weighted gradient G.

[0109] The loss function is constructed based on the XGBoost model objective (such as constraints such as the fusion of the sum of squared salt residuals and spatial autocorrelation bias). The first gradient is obtained by taking the partial derivative of the predicted value of the loss function for each monitoring point. XGBoost uses a custom loss function interface to calculate the first gradient of the monitoring point set in batches based on Taylor expansion.

[0110] The spatial continuity penalty term is obtained in the following way:

[0111] Salinity mutation detection was performed on the monitoring points in the set of monitoring points to obtain the salinity mutation coefficient;

[0112] A penalty equation is established based on the salinity mutation coefficient to obtain a penalty term for spatial continuity;

[0113] Preferably, the salt mutation detection equation is used: Obtaining the salt mutation coefficient ;

[0114] in, This represents the set of monitoring points within the domain of monitoring point i. To measure the soil conductivity at monitoring point i, This indicates the number of monitoring points in the set of monitoring points. This indicates the number of monitoring points within the area of ​​monitoring point i;

[0115] Through the formula: Establish a penalty equation to obtain the penalty term for spatial continuity;

[0116] in, For example, a preset penalty intensity coefficient, such as for sandy soil. =1.0, for clay soil take 2.5;

[0117] R is the preset jump tolerance radius;

[0118] The method for performing geographic gain fusion processing on the gradient and penalty term is as follows:

[0119] Obtain the node distribution and hierarchical order of the decision tree in the XGBoost model, and decompose the geographically weighted gradient into the left node weighted gradient. Weighted gradient of the right node ;

[0120] As will be understood by those skilled in the art, the nodes of a decision tree include the initial root node, the parent node, and the child nodes (including the left and right child nodes) connected to the parent node. If a child node does not have any child nodes connected to it, then the child node is a leaf node.

[0121] By establishing a geographical gain equation: Obtain geographic gain value ;

[0122] in, , These are the second-order gradients of the left parent node and the right parent node, respectively.

[0123] The method for obtaining scale-labeled split points is as follows:

[0124] Based on the geographic gain value, a split point selection and scale partitioning strategy is formulated for the unsplit nodes of the XGBoost model to obtain split points with scale labels.

[0125] like Figure 2 As shown, the strategy for selecting split points and scaling is formulated as follows:

[0126] S301. Obtain unsplit nodes and bind them to geographic scales;

[0127] Preferably, leaf nodes in the decision tree of the XGBoost model that have not been further divided are obtained. Based on the tree depth dh of the decision tree where the leaf node is located and the spatial entropy of the node sample space, the dynamic bandwidth scale of the leaf node is obtained. The dynamic bandwidth scale is mapped to a semantic label and bound to the leaf node, that is, the binding of unsplit nodes and geographic scale is realized.

[0128] S302. Perform candidate splits based on the unsplit nodes that have been bound;

[0129] Preferably, for unsplit nodes, all input features are traversed: clay content, vegetation index, distance from coastline, and all possible thresholds for the features, such as sample values ​​of continuous features and categories of discrete features, to generate all possible combinations of features and thresholds to achieve candidate splitting;

[0130] For example, if the clay content is >20% and the distance from the coastline is >10km, for each candidate split, the geographic gain value is calculated based on the dynamic scale k of the current node.

[0131] S303. Based on the unsplit nodes that have completed candidate splits, perform optimal split point selection and scale label binding;

[0132] Preferably, from all candidate splits, the feature and threshold combination with the largest geographical gain value is selected as the optimal split node for the unsplit node;

[0133] The dynamic scale k of the optimal split node is marked in the metadata of the optimal split point to generate a split point with scale marking;

[0134] The function of outputting the scale-labeled split points is as follows:

[0135] Function 1: Supporting feature decoupling: By using scale labels to distinguish the geographical and non-geographical attributes and corresponding scales of split features, geographical and non-geographical feature subsets are divided to reduce feature mixing;

[0136] Function 2: Driving dynamic weights: Split points at different scales correspond to spatial weights bound to the tree hierarchy. Wide bandwidth adapts to macro-split points, and narrow bandwidth adapts to micro-split points, allowing tree splitting to adapt to multi-scale spatial effects, that is, grasping trends at the macro level and uncovering variations at the micro level.

[0137] Thirdly, the decomposition of foundational effects: scaled split points can be directly associated with geographic main effects, enabling salinization prediction to analyze the independent and coupled contributions of geographic and non-geographic features at different scales, thereby improving the model's analytical power for spatial heterogeneity and predictive interpretability.

[0138] Contribution decoupling module: Extract splitting features based on scale-labeled splitting points, and associate the splitting features with geographic features and non-geographic features to establish geographic feature subsets and non-geographic feature subsets and perform salinity prediction, obtain salinity prediction values ​​and determine whether the effect decoupling signal is triggered. If triggered, feature decoupling processing is performed to extract the total contribution index and single-scale contribution index.

[0139] The method for aggregating geographic action paths by node scale is as follows:

[0140] Obtain the splitting path from the root node to the leaf node in the XGBoost model decision tree, classify them according to the dynamic scale k, and extract the geographical effects at different scales.

[0141] Those skilled in the art will understand that the structure of each tree is obtained by using the function interface of the XGBoost model, traversing all leaf nodes and recording the split point sequence from the root node to the leaf node, and using the split process recorded in the split sequence as the split path.

[0142] For example, if the split point sequence is: root node - split point 1 - split point 2 - leaf node, then the split process recorded in the split point sequence "root node - split point 1 - split point 2 - leaf node" is used as the split path.

[0143] For each leaf node's path, the split points are grouped according to node scale k, and the sum of split gains at each scale k within each group, as well as the split features corresponding to each scale k, are obtained.

[0144] Based on the split gain and the split features corresponding to each scale k, the high-contribution geographic scales and their corresponding split features are determined.

[0145] Those skilled in the art will understand that the splitting path of the leaf node records all splitting points from the root to the leaf; by traversing the path, splitting points of the same scale k are grouped together, and the splitting gain sum within the group is calculated; by comparing the gain sums of different scale groups, groups with significantly higher gain sums are selected, corresponding to high-contribution geographical scales, and the splitting features within the group are extracted.

[0146] The method for decoupling predicted values ​​using the extended GeoShapley equation is as follows:

[0147] Obtain the split features corresponding to the high-contribution geographic scale k and the high-contribution non-geographic scale. Associate the split features with geographic features G and non-geographic features F to obtain geographic feature subsets and non-geographic feature subsets.

[0148] Understandably, after extracting splitting features from scale-marked splitting points, their affiliation is determined based on feature attributes. If the splitting features originate from spatially related features such as latitude and longitude, distance from the coastline, etc., they are classified into the geographical feature subset; if they originate from non-geographical features such as soil viscosity, vegetation index, etc., they are classified into the non-geographical feature subset. Through classification and association, the specific roles of the two types of features in the splitting process are clarified, laying the foundation for subsequent salinity prediction, effect decoupling, and contribution index extraction.

[0149] Construct a GeoShapley equation, inputting geographic and non-geographic features into the equation, and outputting the predicted salinity value for each monitoring point. ;

[0150] Preferably, by formula:

[0151] Construct a geographical Shapley equation to output the predicted salinity value for each monitoring point. ;

[0152] in, The baseline value is the predicted value when all features are averaged, such as... =2dS / m, representing the background salinization level;

[0153] The contribution of the main geographical effect at scale k is the salinization contribution driven solely by that geographical scale, such as the influence of macro-tidal zone fluctuations, and is unrelated to non-geographical features.

[0154] The contribution value of the main effect of non-geographic feature m is represented by the salinization contribution driven solely by this attribute, such as salt accumulation caused by water retention in clay, which is independent of the geographic scale.

[0155] This represents the contribution value of the interaction effect between geographic features and non-geographic features m at scale k. , and use;

[0156] It should be explained that the contribution value of the main effect is the quantitative impact on the salinization prediction results when it acts independently at a single geographical scale.

[0157] Taking the main geographical effect as an example: fix all non-geographical features (such as soil viscosity and vegetation index) as the mean, and only the geographical scale k (such as the rise and fall of the macro tidal zone) drives the salinization change alone. The output value is the main effect contribution value at that scale. Similarly, for non-geographical main effects, fix the geographical scale as the mean, and only the non-geographical features (such as clay water retention) drive the salinization change value alone.

[0158] K is the total number of scales of geographical features. For example, if we divide the spatial scale into three categories: macro-tidal zone, meso-microtopography, and micro-pore, then K=3. k is the specific scale identifier (e.g., k=macro-tidal zone represents the spatial scale type and is used to distinguish geographical effects at different scales).

[0159] M represents the total number of non-geographical features (e.g., soil viscosity, vegetation index, and pH value are three types of attributes, so M=3), and the specific type identifier of the non-geographical feature (e.g., m=clay represents clay content, m=NDVI represents vegetation index, used to distinguish the non-geographical effects of different attributes).

[0160] like Figure 3 As shown, the salt stain prediction value is compared with the preset salt stain warning value. If the salt stain prediction value is higher than or equal to the salt stain warning value, the effect decoupling signal is triggered; otherwise, the salt stain warning value is continuously monitored.

[0161] The method for performing feature decoupling processing and extracting the total contribution index and single-scale contribution index is as follows:

[0162] Based on the received effect decoupling signal, the total contribution equation is established by the geographical main effect value at scale k and the interaction effect of geographical features and non-geographical features m at scale k, and the total contribution index is extracted.

[0163] Preferably, by formula: Obtain the Total Contribution Index (GCI);

[0164] For each scale k, calculate the proportion of each scale's geographical main effect value in the total geographical main effect values ​​to obtain the single-scale contribution index.

[0165] Verification and optimization module: Based on the single-scale contribution index, multi-scale heat maps are drawn, which are used to identify unstable regions in the multi-scale heat maps by combining local condition number analysis, and global autocorrelation analysis is performed on the unstable regions to obtain the degree of geospatial information capture;

[0166] The method for drawing multi-scale heat maps based on single-scale contribution indices and identifying unstable regions in multi-scale heat maps by combining local condition number analysis is as follows:

[0167] A spatial dataset is constructed by associating the single-scale contribution index with the longitude and latitude of the monitoring points;

[0168] Heat maps are generated for each scale based on the spatial dataset, with scale k corresponding to different spatial resolutions;

[0169] It is understandable that coarse resolution is used at the macro scale and fine resolution at the micro scale, and the tidal gradient zone at the macro scale is superimposed with the salt spot distribution at the micro scale.

[0170] In the heat distribution map, the monitoring points are used as the boundary points of the grid to divide the heat distribution map into grid points;

[0171] Spatial correlation analysis was performed on the single-scale contribution index within the grid of the jump tolerance radius of monitoring point i, a spatial correlation matrix was constructed, and the maximum and minimum eigenvalues ​​of the spatial correlation matrix within the grid of the jump tolerance radius were obtained.

[0172] First, the spatial grid around the monitoring point is delineated by the jump tolerance radius (set based on the degree of local salinization variation to filter out abrupt change points), and the single-scale contribution index of each sample point in the grid is extracted. Then, the Moran index is used to analyze the spatial clustering of the index. Positive indexes represent that the contribution of the same scale is continuously distributed in space, such as the salinization effect of the tidal zone clustering along the coastline; negative indexes represent discrete distribution.

[0173] The local condition number is obtained by taking the ratio of the largest and smallest eigenvalues.

[0174] The local condition numbers are overlaid onto the multi-scale heatmap using color, and the multi-scale heatmap is divided into stable and unstable regions.

[0175] It needs to be explained that the local condition number is normalized to the [0,1] interval and mapped to a gradient color band (such as red-yellow-blue, where red represents unstable areas). This is then overlaid on the heatmap at the corresponding scale with 50% transparency, forming a composite visualization of the original thermal trend and stability warning. Finally, a condition number threshold is set (such as >5 for unstable areas), and spatial clustering algorithms (such as DBSCAN) are used to automatically divide the regions. High-value red areas are marked as unstable areas, corresponding to salinization mutation sensitive zones, while low-value blue areas are marked as stable areas, corresponding to homogeneous farmland or stable salinized zones.

[0176] Among them, the method for determining the degree of geospatial information capture by the feature decoupling module is as follows: Global autocorrelation analysis is performed on unstable regions.

[0177] Based on the unstable region of the multi-scale heat map, the difference between the predicted and measured salinity values ​​at the monitoring points is obtained and calculated to obtain the salinity residual.

[0178] Obtain the salinity residuals and multi-scale spatial weights of all unstable regions, perform global autocorrelation analysis, and obtain the spatial autocorrelation values;

[0179] The P-value was obtained by statistically testing the spatial autocorrelation values.

[0180] Those skilled in the art will understand that, based on the salinity residuals of all unstable regions and multi-scale spatial weights, the Moran index is calculated, and the Moran index value is used as the spatial autocorrelation value to achieve global autocorrelation analysis; the Moran index is statistically tested to obtain the P-value, which is achieved through a permutation test: the salinity residuals of the monitoring points are randomly rearranged, and the Moran index after the rearrangement is calculated repeatedly NA times to form a randomly distributed reference system; the Moran index observed in reality is compared with this reference system, and the P-value is the proportion of the Moran index in the random rearrangement that is greater than or equal to the actual value;

[0181] Preferably, NA > 1000;

[0182] The degree to which the feature decoupling module captures geospatial information is determined based on spatial autocorrelation values;

[0183] It is understandable that the spatial autocorrelation value is in the range of [-0.1, 0.1] and the P value is higher than 0.05, which means that the residual has no spatial autocorrelation. This indicates that the decoupling module has captured all geospatial information, meaning that the gating coefficient is set reasonably.

[0184] The spatial autocorrelation value is higher than 0.1 and the P value is lower than or equal to 0.05, which means that there is a positive correlation in the residuals (high residual clustering). This indicates that the decoupling module has not fully captured all geospatial information, that is, the gating coefficient is set inappropriately.

[0185] The spatial autocorrelation value is below 0.1 and the P-value is below or equal to 0.05, indicating negative residual correlation (alternating between high and low residuals). This suggests that the decoupling module is overfitting geospatial information and the gating coefficient needs to be adjusted.

[0186] If the gate coefficient is set unreasonably or needs to be adjusted, the fusion of geographic features and non-geographic features can be achieved by optimizing the gate coefficient of the feature decoupling module based on the spatial autocorrelation value and the salinity residual.

[0187] Those skilled in the art will understand that the gating coefficient is first set ( The weights for representing geographic features in the fusion process, 1- (For non-geographical features), a loss function is constructed that integrates salt residuals and spatial autocorrelation constraints: the prediction accuracy is measured by the sum of squared residuals (SSE) between predicted and true values, and the Moran index, which is contributed by geographical features, is used. To measure spatial continuity, let the loss function be... , ( (Weighting the balance between accuracy and spatial regularity); iteratively adjusted using gradient descent. If the current Large residuals and Deviation Then calculate L pairs The partial derivatives are gradually corrected. For example, the initial =0.5, after iteration, due to strong spatial continuity but high residuals caused by geographical effects, it was adjusted to =0.7, at which point the residual decreases and Closer This allows the gating coefficients to adapt to geographic spatial patterns and prediction accuracy, achieving better fusion after feature decoupling;

[0188] in, It is the prior benchmark value of the Moran index, which is the inherent spatial pattern of the geographical features of the study area and is set by those skilled in the art based on their prior knowledge of the geographical laws of the study area.

[0189] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.

Claims

1. A spatially local XGBoost machine learning model based on multi-scale geographic weighting, characterized by: Includes the following modules: Feature decoupling module: used to construct a dual-channel input structure of geographic features and non-geographic features, decouple geographic features and non-geographic features, and construct a multi-scale spatial weight matrix; Bandwidth allocation module: Based on the spatial weight matrix, it is used to determine the dynamic bandwidth scale during the tree splitting process of the XGBoost machine learning model, and to establish dynamic weights for tree hierarchy binding based on the dynamic bandwidth scale; Constrained Gain Module: Used to generate geographic weighted gradients through dynamic weights, construct spatial continuity penalty terms, reconstruct geographic gain functions based on weighted gradients and spatial continuity penalty terms, and output scale-labeled split points; Contribution decoupling module: Extract splitting features based on scale-labeled splitting points, establish geographic feature subsets and non-geographic feature subsets and perform salinity prediction, obtain salinity prediction values ​​and determine whether the effect decoupling signal is triggered. If triggered, feature decoupling processing is performed and single-scale contribution index is extracted. The method for decoupling geographical features from non-geographical features is as follows: Obtain the multi-scale spatial weights of the monitoring area and construct a multi-scale spatial weight matrix; Soil salinity characteristics were collected and normalized to establish a normalized salinity matrix; Based on the normalized salting matrix and spatial weight matrix, fused features are generated through feature fusion equations. The method for establishing dynamic weights for tree hierarchy binding is as follows: During tree splitting in the XGBoost machine learning model, the depth of the current tree node and the entropy of the node sample space are obtained. A bandwidth equation is established based on the tree node depth and the spatial entropy of node samples to obtain a dynamic bandwidth scale. Based on the dynamic bandwidth scale, the multi-scale bandwidth parameters are adjusted, the spatial weight matrix is ​​reconstructed, and dynamic weights bound to the tree hierarchy are established. The method for obtaining the spatial entropy of node samples is as follows: The conductivity and texture entropy of the soil at each monitoring point are obtained. Based on the conductivity and texture entropy, the spatial entropy of the node samples is obtained through the entropy equation.

2. The spatial local XGBoost machine learning model based on multi-scale geographic weighting according to claim 1, characterized in that: The method for outputting the scale-marked split points is as follows: Obtain the node distribution and hierarchical order of the decision tree in the XGBoost model, and decompose the geographically weighted gradient into the left node weighted gradient and the right node weighted gradient; Obtain the second-order gradient of the left parent node and the second-order gradient of the right parent node, as well as the penalty term for spatial continuity. Combine the weighted gradients of the left and right nodes to calculate the geographic gain value. Based on the geographic gain value, a split point selection and scale partitioning strategy is formulated for the unsplit nodes of the XGBoost model to obtain split points with scale labels.

3. The spatial local XGBoost machine learning model based on multi-scale geographic weighting according to claim 2, characterized in that: The method for formulating the split point selection and scale division strategy is as follows: Obtain unsplit nodes and bind them to geographic scales; Candidate splits are performed based on the unsplit nodes that have been bound; Based on the unsplit nodes that have completed candidate splits, the optimal split point is selected and the scale label is bound.

4. The spatial local XGBoost machine learning model based on multi-scale geographic weighting according to claim 1, characterized in that: The method for determining whether a decoupling signal has been triggered is as follows: Obtain the splitting features and associate them with geographic features and non-geographic features to obtain geographic feature subsets and non-geographic feature subsets; Construct a geographical Shapley equation, input geographical and non-geographical features into the geographical Shapley equation, and output the salinity prediction value for each monitoring point; Based on comparative analysis of salt prediction values, the triggering conditions for effect decoupling signals were obtained.

5. The spatial local XGBoost machine learning model based on multi-scale geographic weighting according to claim 1, characterized in that: It also includes the following modules: Verification and optimization module: Based on the single-scale contribution index, multi-scale heat maps are drawn, which are used to identify unstable regions in the multi-scale heat maps by combining local condition number analysis. Global autocorrelation analysis is performed on the unstable regions to obtain the degree of geospatial information capture.

6. The spatially local XGBoost machine learning model based on multi-scale geographic weighting according to claim 5, characterized in that: The method for performing the global autocorrelation analysis is as follows: Obtain the unstable regions of the multi-scale heat map, obtain and calculate the difference between the predicted and measured salinity values ​​at the monitoring points, and obtain the salinity residual; Obtain the salinity residuals and multi-scale spatial weights of all unstable regions, perform global autocorrelation analysis, and obtain the spatial autocorrelation values; The degree to which the feature decoupling module captures geospatial information is determined based on spatial autocorrelation values.

7. The spatially local XGBoost machine learning model based on multi-scale geographic weighting according to claim 6, characterized in that: The method for obtaining the unstable region is as follows: Spatial correlation analysis was performed on the single-scale contribution index within the grid adjacent to the monitoring point, a spatial correlation matrix was constructed, and the maximum and minimum eigenvalues ​​of the spatial correlation matrix within the grid of the jump tolerance radius were obtained. The local condition number is obtained by taking the ratio of the largest and smallest eigenvalues. By overlaying local condition numbers onto a multi-scale heatmap and then performing regional decomposition on the multi-scale heatmap, the unstable regions of the multi-scale heatmap are obtained.

Citation Information

Patent Citations

  • CN119203768A