A data dynamic sampling method and system based on an environmental state decision matrix
By constructing an environmental state decision matrix and a multi-objective optimization model, and dynamically adjusting the sampling frequency, the problems of response lag and resource waste in environmental monitoring are solved, and environmental monitoring sampling with forward-looking response and resource conservation is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGJIANG RIVER SCI RES INST CHANGJIANG WATER RESOURCES COMMISSION
- Filing Date
- 2026-06-04
- Publication Date
- 2026-07-03
AI Technical Summary
Existing environmental monitoring sampling methods suffer from response lag, lack of forward-looking drive, and a single decision-making mechanism, resulting in the omission of key environmental change information or the generation of redundant data, and failing to significantly reduce sampling costs while ensuring monitoring accuracy.
By constructing a dynamic data sampling method based on the environmental state decision matrix, combining multidimensional environmental state vectors and historical sampling error sequences, the sampling frequency is dynamically adjusted, and the sampling step size is optimized using a multi-objective optimization model and Pareto optimization algorithm, thereby achieving a forward-looking response to environmental physical driving factors and resource conservation.
It enables timely adjustment of sampling frequency in the early stages of environmental changes, avoids missing critical events, reduces energy consumption of sampling equipment and data storage costs, and achieves refined sampling control in complex environmental scenarios, thereby improving monitoring accuracy and resource utilization efficiency.
Smart Images

Figure CN122332837A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of environmental monitoring and data sampling technology, and in particular relates to a dynamic data sampling method and system based on an environmental state decision matrix. Background Technology
[0002] In the field of environmental monitoring, traditional sampling methods mostly adopt a fixed-frequency sampling mode, that is, data is collected according to a preset constant time interval. This fixed sampling method has obvious technical defects: when environmental parameters change drastically, the fixed sampling frequency may miss key events (such as pollution peaks or sudden drops in dissolved oxygen) due to being too low, resulting in the loss of important information on environmental changes; while when environmental parameters are relatively stable, an excessively high sampling frequency will generate a large amount of redundant data, resulting in a waste of energy consumption of sampling equipment, data transmission costs, and data storage costs.
[0003] To address the aforementioned issues, several adaptive sampling methods have been proposed in existing technologies. For example, adaptive sampling methods based on the statistical characteristics of the data itself dynamically adjust the sampling frequency by detecting the magnitude of data changes; adaptive sampling methods based on historical trend prediction utilize time series forecasting models to estimate data change trends. However, these methods generally suffer from the following technical bottlenecks: First, there is a response lag. Existing adaptive sampling methods mostly rely on statistical analysis or trend prediction of collected data. In the early stages of sudden changes in environmental parameters, not enough change data have been collected, making it difficult to adjust the sampling strategy in a timely manner. This results in the inability to capture enough data points when critical sudden events occur.
[0004] Second, there is a lack of forward-looking drive. Existing methods ignore the driving role of environmental physical factors (such as rainfall, season, wind speed, etc.) on changes in target parameters, and make decisions based solely on the data itself. They lack the ability to predict potential environmental changes, and the sampling strategies are not forward-looking or sensitive enough.
[0005] Third, the decision-making mechanism is simplistic. Existing methods typically adjust the sampling frequency based on a single variable or simple rules, failing to construct a systematic mapping relationship between the multi-dimensional environmental state space and the sampling strategy, making it difficult to achieve refined sampling control in complex environmental scenarios.
[0006] Therefore, how to provide a dynamic data sampling method that can proactively respond to environmental changes, comprehensively consider multiple physical driving factors, and significantly reduce sampling costs while ensuring monitoring accuracy is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0007] This invention provides a dynamic data sampling method and system based on an environmental state decision matrix, aiming to solve the technical problems of existing adaptive sampling methods such as slow response, lack of forward-looking drive, and single decision-making mechanism.
[0008] In a first aspect, the present invention provides a dynamic data sampling method based on an environmental state decision matrix, comprising: Acquire time series data of environmental parameters within the target monitoring area. The time series data of environmental parameters includes at least one environmental driving variable and environmental parameter data to be monitored. The environmental driving variable data is used to characterize the physical driving factors that affect the changing trend of the environmental parameter data to be monitored. Based on the preset environmental state discretization rules, the data of each environmental driving variable at the current moment are mapped to a state, generating a multi-dimensional environmental state vector composed of multiple discretized environmental state identifiers. The multidimensional environmental state vector is matched with the pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is a multidimensional matrix constructed based on historical environmental data and prior knowledge. The matrix elements of the environmental state decision matrix define the sampling interval corresponding to a specific combination of environmental states. Obtain the historical sampling error sequence, and calculate the error accumulation trend index at the current moment based on the historical sampling error sequence, wherein the error accumulation trend index is used to quantify the degree of accumulation of deviation between the actual value and the predicted value of the environmental parameter to be monitored; Based on the baseline sampling step size and the error accumulation trend index, the optimal sampling step size at the current moment is dynamically calculated using a preset sampling frequency correction function. The next sampling time point is determined based on the optimal sampling step size, and the sampling device is controlled to perform sampling operations at the next sampling time point to obtain environmental parameter data to be monitored.
[0009] Secondly, the present invention provides a data dynamic sampling system based on an environmental state decision matrix, comprising: The acquisition module is configured to acquire time series data of environmental parameters within the target monitoring area. The time series data of environmental parameters includes at least one environmental driving variable and environmental parameter data to be monitored. The environmental driving variable data is used to characterize the physical driving factors that affect the changing trend of the environmental parameter data to be monitored. The generation module is configured to perform state mapping on the current environmental driving variable data according to the preset environmental state discretization rules, and generate a multi-dimensional environmental state vector composed of multiple discretized environmental state identifiers. The matching module is configured to match the multidimensional environmental state vector with a pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is a multidimensional matrix constructed based on historical environmental data and prior knowledge. The matrix elements of the environmental state decision matrix define the sampling interval corresponding to a specific combination of environmental states. The first calculation module is configured to acquire a historical sampling error sequence and calculate an error accumulation trend index at the current moment based on the historical sampling error sequence, wherein the error accumulation trend index is used to quantify the degree of accumulation of deviation between the actual value and the predicted value of the environmental parameter to be monitored. The second calculation module is configured to dynamically calculate the optimal sampling step size at the current moment based on the benchmark sampling step size and the error accumulation trend index using a preset sampling frequency correction function. The execution module is configured to determine the next sampling time point based on the optimal sampling step size, and control the sampling device to perform sampling operations at the next sampling time point to obtain environmental parameter data to be monitored.
[0010] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the data dynamic sampling method based on an environmental state decision matrix according to any embodiment of the present invention.
[0011] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the steps of the data dynamic sampling method based on an environmental state decision matrix according to any embodiment of the present invention.
[0012] The data dynamic sampling method and system based on the environmental state decision matrix in this application have the following advantages: By identifying key environmental driving variables (such as rainfall intensity, season, wind speed, etc.) related to the parameters to be monitored, a multidimensional environmental state decision matrix is constructed, enabling sampling decisions to proactively respond to changes in environmental physical driving factors, rather than simply relying on lagging data statistical characteristics. This allows for timely adjustment of the sampling frequency in the early stages of environmental abrupt changes, avoiding the omission of key events. A cumulative trend index of historical sampling error sequences is introduced, and the degree of prediction deviation accumulation is quantified by an exponentially decaying weighted method. The baseline sampling step size is then dynamically adjusted based on the error accumulation trend. When the prediction error continues to increase, the sampling step size is automatically shortened to increase the monitoring density; when the prediction error stabilizes, the sampling step size is restored to the baseline value to save resources, thus realizing adaptive closed-loop control of the sampling strategy. By using an environmental state decision matrix, high-risk environmental states are assigned to high-frequency sampling and low-risk environmental states are assigned to low-frequency sampling. Combined with a multi-objective optimization model (Pareto optimization), the sampling step size allocation strategy is optimized to achieve the optimal balance between monitoring accuracy and data sampling rate, which significantly reduces the energy consumption of sampling equipment, data transmission cost and data storage cost.
[0013] In summary, the environmental state discretization rules, decision matrix construction methods, error accumulation calculation methods, and sampling frequency correction functions in this invention can all be flexibly configured according to different monitoring scenarios, different target parameters, and different driving factors. They have good universality and scalability and can be widely applied to various environmental monitoring fields such as water quality monitoring, air quality monitoring, and soil parameter monitoring. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart illustrating a dynamic data sampling method based on an environmental state decision matrix, provided in an embodiment of the present invention; Figure 2 A structural block diagram of a data dynamic sampling system based on an environmental state decision matrix provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0016] 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, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] Please see Figure 1The diagram shows a flowchart of a dynamic data sampling method based on an environmental state decision matrix according to this application.
[0018] like Figure 1 As shown, the dynamic data sampling method based on the environmental state decision matrix specifically includes the following steps: Step S101: Obtain time series data of environmental parameters within the target monitoring area. The time series data of environmental parameters includes at least one environmental driving variable data and environmental parameter data to be monitored. The environmental driving variable data is used to characterize the physical driving factors that affect the changing trend of the environmental parameter data to be monitored.
[0019] In this step, before acquiring time-series data of environmental parameters within the target monitoring area, the method further includes: A multi-objective optimization model is constructed to optimize the parameters of the sampling step size allocation strategy in the environmental state decision matrix. The multi-objective optimization model includes a first optimization objective and a second optimization objective, wherein the first optimization objective is to minimize the prediction error of the environmental parameter data to be monitored, and the second optimization objective is to minimize the data sampling rate. The Pareto optimization algorithm is used to solve the multi-objective optimization model to obtain the Pareto optimal solution set; Target optimization parameters are selected from the Pareto optimal solution set according to the preset weighting factors, and the sampling step size allocation of the high-risk state node set, medium-risk state node set, and low-risk state node set in the environmental state decision matrix is updated according to the target optimization parameters.
[0020] It should be noted that the expression for the objective function of the multi-objective optimization model is: , , In the formula, and These are the minimum and maximum sampling step sizes to be optimized, corresponding to the sampling step sizes of the high-risk state node set and the low-risk state node set, respectively. These are preset weighting factors used to balance the importance of prediction error and data sampling rate. To use the minimum sampling step size and the maximum sampling step size When performing dynamic sampling, the root mean square error of the prediction of the environmental parameter data to be monitored is... To use the minimum sampling step size and maximum sampling step size Data sampling rate during dynamic sampling This refers to the actual number of samples taken using a dynamic sampling strategy within a preset time period. This refers to the total number of samples taken continuously within the same time period using a fixed minimum sampling step size. The root mean square error is the baseline.
[0021] In one specific embodiment, an environmental sensor network is first deployed within the target monitoring area. This network includes at least two types of sensors: the first type consists of environmental driving variable sensors, used to collect data on physical driving factors affecting the changing trends of the monitored parameters, such as rain gauges, temperature sensors, and anemometers; the second type consists of sensors for the monitored parameters, used to collect core monitoring indicators, such as dissolved oxygen probes in water quality monitoring and PM2.5 sensors in air quality monitoring. The sensors collect data at an initial sampling frequency (e.g., once per minute), and the collected data is sorted by timestamp through a data acquisition terminal to form time-series data of the environmental parameters.
[0022] Before acquiring time-series data of environmental parameters, this invention also provides a method for optimizing the sampling step size allocation strategy of the decision matrix to determine the optimal sampling step size parameters, ensuring that the dynamic sampling method can achieve the optimal balance between monitoring accuracy and data sampling rate during actual deployment. Specifically, it includes the following sub-steps: Sub-step S101-1: Construct a multi-objective optimization model.
[0023] Since the sampling step size allocation strategy in the environmental state decision matrix directly affects the performance of the monitoring system, specifically: a smaller sampling step size (higher sampling frequency) results in higher monitoring accuracy, but also a higher data sampling rate (i.e., the ratio of actual sampling times to total sampling times), leading to increased energy consumption, data transmission, and storage costs; conversely, a larger sampling step size reduces costs but may decrease accuracy. Therefore, it is necessary to construct a multi-objective optimization model to find the optimal trade-off between prediction error and data sampling rate.
[0024] The multi-objective optimization model includes a first optimization objective and a second optimization objective: The primary optimization objective is to minimize the prediction error of the environmental parameter data to be monitored, that is, to minimize the deviation between the data reconstructed or predicted by the prediction model and the true value after adopting a dynamic sampling strategy. The second optimization objective is to minimize the data sampling rate, that is, to reduce the actual number of samplings as much as possible while ensuring monitoring quality, so as to reduce system energy consumption and resource consumption.
[0025] The sampling step size allocation parameters to be optimized are represented as a parameter set θ. In this embodiment, θ includes at least the minimum sampling step size L corresponding to the high-risk state node set and the maximum sampling step size U corresponding to the low-risk state node set. The sampling step size M of the medium-risk state node set can be calculated from L and U, for example... Alternatively, optimization can be performed using independent parameters. To simplify the optimization process, L and U can be used as the core optimization variables.
[0026] The objective function expression of the multi-objective optimization model is: , In the formula: The preset weighting factor, with a value range of [0,1], is used to balance the importance of prediction error and data sampling rate. A larger value (e.g., 0.8) indicates a greater emphasis on reducing prediction error; when... A smaller value (such as 0.2) indicates a greater emphasis on reducing the data sampling rate; This refers to the root mean square error of the prediction of the environmental parameter data to be monitored when using dynamic sampling with minimum sampling step size L and maximum sampling step size U. This error is calculated by applying the dynamic sampling strategy to the historical dataset, using a prediction model (such as an ARIMA model, Kalman filter, or long short-term memory network) to interpolate or predict the data at unsampled times, and then comparing it with the true values. The root mean square error (RMSE) is the prediction error achievable on the same historical dataset using a fixed minimum sampling step size (i.e., full sampling). It is used to predict the accuracy of predictions. Normalization is performed.
[0027] Sub-step S101-2 uses the Pareto optimization algorithm to solve the multi-objective optimization model.
[0028] Because the two optimization objectives are mutually constrained (i.e., improving accuracy usually requires increasing the sampling rate, while decreasing the sampling rate usually leads to a decrease in accuracy), there is no single optimal solution that simultaneously optimizes both objectives. Therefore, the Pareto optimization algorithm is used to solve the multi-objective optimization problem, yielding a set of Pareto optimal solutions. In this solution set, any improvement in one objective by any solution inevitably leads to a deterioration in the other objective.
[0029] Specifically, this embodiment employs a non-dominated sorting genetic algorithm (NSGA-II) with an elitist strategy to optimize the parameter space. Perform a search. The search process includes: Initialize the population, with each individual corresponding to a set of (L, U) parameter combinations; For each individual, a dynamic sampling process is simulated on a historical environmental dataset to calculate the corresponding... and ; The population individuals are non-dominated and ordered based on the two objective function values, and the crowding distance is calculated. The next generation population is generated through selection, crossover, and mutation operations; Repeat the iteration until the preset number of generations or convergence condition is reached; The final output is a Pareto optimal solution set, which contains multiple non-dominated (L, U) parameter combinations.
[0030] Sub-step S101-3: Select target optimization parameters from the Pareto optimal solution set according to the preset weight factors, and update the environmental state decision matrix.
[0031] In practical applications, users or system administrators can select an optimal compromise solution from the Pareto optimal solution set based on specific business needs and resource constraints. For example, if the monitoring scenario has extremely high requirements for data accuracy (such as drinking water source quality monitoring), a solution with smaller prediction errors can be selected, even if its data sampling rate is relatively high; if the monitoring scenario focuses more on equipment endurance and cost control (such as distributed monitoring in remote areas), a solution with a lower data sampling rate can be selected.
[0032] To facilitate automated selection, a preset weighting factor λ can be introduced to select the target optimization parameters from the Pareto optimal solution set. Specifically, for each candidate solution (L, U) in the Pareto optimal solution set, its comprehensive score is calculated: , The solution with the smallest score is selected as the objective optimization parameter. This selection method is consistent with the form of the objective function, ensuring the logical consistency of parameter selection.
[0033] After determining the target optimization parameters (i.e., the optimal minimum sampling step size) and maximum sampling step size After that, the sampling step size allocation in the environmental state decision matrix is updated according to this parameter: Assign a sampling step size to each state node in the high-risk state node set. ; Assign a sampling step size to each state node in the low-risk state node set. ; Assign a sampling step size to each state node in the medium-risk state node set. ,For example .
[0034] After completing the above parameter optimization and decision matrix update, the dynamic sampling system can execute the real-time dynamic sampling process from steps S102 to S106 according to the optimized sampling step size allocation strategy.
[0035] Step S102: According to the preset environmental state discretization rules, perform state mapping on the data of each environmental driving variable at the current moment to generate a multi-dimensional environmental state vector composed of multiple discretized environmental state identifiers.
[0036] In this step, the first continuous value of the first environment driving variable at the current time is obtained, and the first continuous value is converted into a first discrete state identifier according to a preset first discretization mapping function, wherein the first discretization mapping function is: , In the formula, This is the identifier for the first discrete state. This is the first consecutive value of the first environment-driven variable. For the preset discretization quantiles, For the corresponding discrete state identifier, The total number of discrete states; Obtain the second continuous value of the second environment driving variable at the current time, and convert the second continuous value into a second discrete state identifier according to the preset second discretization mapping function; The first discrete state identifier and the second discrete state identifier are combined to generate a multidimensional environment state vector composed of the first discrete state identifier and the second discrete state identifier.
[0037] In one specific embodiment, the continuous values of a first environmental driving variable at the current time t are obtained from an environmental sensor network. The first environmental driving variable refers to one of the physical driving factors that has the most significant impact on the changing trend of the target environmental parameter to be monitored. For example, in the scenario of dissolved oxygen monitoring in water quality, rainfall intensity can be selected as the first environmental driving variable; in the scenario of PM2.5 monitoring in air quality, wind speed can be selected as the first environmental driving variable.
[0038] For example, taking dissolved oxygen monitoring in water quality as an example, rainfall intensity is selected as the first environmental driving variable. Based on the meteorological classification standards for rainfall intensity, the discretization quantiles are set as follows: =0.5 mm / h (light rain threshold) =4.0 mm / h (moderate rain threshold). =8.0 mm / h (heavy rain threshold).
[0039] If the current rainfall intensity sensor reading is x1 = 5.2 mm / h, then according to the above mapping rule, 5.2 ∈ [4.0, 8.0), corresponding to the first discrete state identifier. Moderate rain.
[0040] Similarly, obtain the continuous values of the second environment driving variable at the current time t. The second environmental driving variable refers to the physical driving factor that has the second highest influence on the trend of change of the target environmental parameter being monitored, and it is usually complementary to the first environmental driving variable. For example, in the scenario of dissolved oxygen monitoring in water quality, the season (represented by months) can be selected as the second environmental driving variable; in the scenario of PM2.5 monitoring in air quality, temperature can be selected as the second environmental driving variable.
[0041] According to the preset second discretization mapping function, continuous numerical values are... Mapped to the second discrete state identifier The second discretization mapping function has a similar form to the first discretization mapping function, but the meaning of the quantile settings and state identifiers is determined independently based on the physical characteristics of the driving variable.
[0042] The first discrete state identifier obtained from the above steps Second discrete state identifier The states are combined to generate a multidimensional environment state vector V(t) for the current time t. The form of this vector depends on the encoding method of the discrete state identifiers used, and can be represented as ordered pairs, string concatenation, or tuples.
[0043] In summary, by converting continuous environmental driving variables into finite discrete states and compressing infinitely possible environmental states into a finite state space, it becomes possible to construct a decision matrix. This compression does not lose key information because the selection of discretization quantiles is based on physical meaning or data distribution characteristics, which can effectively distinguish environmental states with different risk levels. By combining the discrete states of multiple environmental driving variables, a multidimensional environmental state vector is constructed, enabling sampling decisions to comprehensively consider the synergistic effects of multiple factors. For example, considering only rainfall intensity may not accurately determine the risk of dissolved oxygen changes, while considering both season and rainfall intensity can identify the high-risk combination of "summer + heavy rainfall," significantly improving the foresight and accuracy of the sampling strategy. The parameters (quantiles, number of states) of the discretized mapping function can be flexibly configured according to the specific monitoring scenario, geographical region and prior knowledge, and have good domain adaptability and interpretability. Compared with the sampling decision of the black box model, the method of this invention has higher maintainability and reliability.
[0044] Step S103: Match the multidimensional environmental state vector with the pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is a multidimensional matrix constructed based on historical environmental data and prior knowledge. The matrix elements of the environmental state decision matrix define the sampling interval corresponding to a specific combination of environmental states.
[0045] In this step, the method for constructing the environmental state decision matrix includes: Obtain a historical environment dataset, which contains environmental driving variable data and corresponding environmental parameter data to be monitored at multiple historical moments; Discretize the environmental driving variable data in the historical environmental dataset to construct a multidimensional environmental state space, and map each historical moment to a unique state node in the multidimensional environmental state space. For each state node in the multidimensional environmental state space, extract the environmental parameter data to be monitored for all historical moments corresponding to the state node, and calculate the index of the degree of drastic change of parameters under the state node. Based on the parameter change intensity index and combined with the preset risk assessment function, each state node in the multidimensional environmental state space is divided into a high-risk state node set, a medium-risk state node set, and a low-risk state node set. A first sampling step size is assigned to each state node in the high-risk state node set, a second sampling step size is assigned to each state node in the low-risk state node set, and a third sampling step size is assigned to each state node in the medium-risk state node set, wherein the first sampling step size is smaller than the third sampling step size, and the third sampling step size is smaller than the second sampling step size. The environmental state decision matrix is constructed based on the mapping relationship between each state node and the sampling step size assigned to the state node.
[0046] Further, a first continuous data sequence corresponding to the first environmental driving variable is obtained, and a second continuous data sequence corresponding to the second environmental driving variable is obtained, wherein the first environmental driving variable and the second environmental driving variable are the two driving factors with the highest degree of influence on the environmental parameter data to be monitored; The first continuous data sequence is divided into multiple first discrete state intervals according to a preset first quantile threshold, and a unique first discrete state identifier is assigned to each first discrete state interval. The second continuous data sequence is divided into multiple second discrete state intervals according to a preset second quantile threshold, and a unique second discrete state identifier is assigned to each second discrete state interval. The first discrete state identifier and the second discrete state identifier are combined to generate a two-dimensional environment state space, thus obtaining a multi-dimensional environment state space. Each state node in the two-dimensional environment state space is determined by a unique first discrete state identifier and a unique second discrete state identifier.
[0047] In one specific embodiment, firstly, an environmental dataset of the target monitoring area over a historical time period is acquired. This historical environmental dataset contains environmental driving variable data from multiple historical moments and their corresponding environmental parameter data to be monitored. The length of the historical time period can be determined based on data availability and the monitoring scenario. For example, for water quality monitoring scenarios with significant seasonal variations, historical data from the past 1-3 years can be selected to ensure coverage of various typical environmental conditions.
[0048] In one specific embodiment, taking dissolved oxygen monitoring in water quality as an example, the collected historical environmental dataset includes: daily rainfall intensity data (continuous values, unit mm / h), the corresponding seasonal identifier for each day (which can be derived from the month), and daily dissolved oxygen concentration data (unit mg / L). The data sampling interval can be determined according to the frequency of the data source, for example, one record per day.
[0049] To construct a finite state space, the continuous environmental driving variable data needs to be discretized. This embodiment uses two of the most important environmental driving variables as examples, but this method is also applicable to higher-dimensional state spaces.
[0050] First, obtain the first continuous data sequence corresponding to the first environmental driving variable. The first environmental driving variable refers to the driving factor with the highest influence on the environmental parameter data to be monitored. For example, in the dissolved oxygen monitoring scenario, rainfall intensity can be selected as the first environmental driving variable because rainfall brings surface runoff, carrying oxygen-consuming organic matter into the water body, which significantly affects the dissolved oxygen concentration.
[0051] The first continuous data sequence is divided into multiple first discrete state intervals based on a preset first quantile threshold, and a unique first discrete state identifier is assigned to each first discrete state interval. The quantile threshold can be selected using an equal-frequency binning method, ensuring that the number of historical data points within each discrete state interval is approximately equal, thus guaranteeing that each state node has sufficient historical data for subsequent analysis. For example, based on the distribution of rainfall intensity data, quantile thresholds of 0.5 mm / h, 2.5 mm / h, and 8.0 mm / h are set, dividing rainfall intensity into four discrete states: "no rainfall," "light rain," "moderate rain," and "heavy rain."
[0052] Secondly, obtain the second continuous data sequence corresponding to the second environmental driving variable. The second environmental driving variable refers to the driving factor with the second highest influence on the monitored environmental parameter data. In the dissolved oxygen monitoring scenario, the season (expressed in months) can be selected as the second environmental driving variable because water temperature changes significantly with the seasons, affecting dissolved oxygen saturation and microbial activity.
[0053] The second continuous data sequence is divided into multiple second discrete state intervals based on a preset second quantile threshold, and a unique second discrete state identifier is assigned to each second discrete state interval. For example, based on the monthly distribution, the seasons are divided into four discrete states: "Spring" (March-May), "Summer" (June-August), "Autumn" (September-November), and "Winter" (December-February).
[0054] Finally, the first discrete state identifier and the second discrete state identifier are combined to generate a two-dimensional environmental state space. Each state node in this two-dimensional state space is determined by a unique first discrete state identifier and a unique second discrete state identifier; for example, (summer, heavy rain) constitutes a state node. Thus, each historical moment is mapped to a unique state node in this two-dimensional state space based on its rainfall intensity and season.
[0055] For each state node (i,j) in the two-dimensional state space, extract the sequence of environmental parameter data to be monitored for all historical moments corresponding to that state node from the historical environmental dataset. For example, the state node (summer, heavy rain) corresponds to the dissolved oxygen concentration data recorded on all historical days in summer when the rainfall intensity was heavy rain.
[0056] For this data sequence, an index of the degree of parameter change is calculated. This index quantifies the magnitude and volatility of the environmental parameters under monitoring conditions. One or a combination of the following indices may be used: Standard deviation: reflects the degree of dispersion of data around the mean; the larger the standard deviation, the more drastic the change. Range: The difference between the maximum and minimum values, reflecting the extreme fluctuation range; Coefficient of variation: The ratio of standard deviation to mean, eliminating the influence of dimensions, and suitable for comparing parameters of different magnitudes; The mean of the absolute values of the first-order differences reflects the average rate of change between adjacent time points and is sensitive to rapid changes.
[0057] In one specific embodiment, the standard deviation is used as an indicator of the drasticness of parameter changes. For a state node (summer, heavy rain), the standard deviation of dissolved oxygen concentration for all historical states under this condition is calculated. .like A relatively large value indicates that the dissolved oxygen concentration is prone to drastic fluctuations under these environmental conditions, which is considered a high-risk state.
[0058] A pre-defined risk assessment function is used to map the degree of parameter change to a risk level. The risk assessment function can use a threshold-based approach. , In the formula, and These are preset high-risk and low-risk thresholds, which can be determined based on historical data distribution or domain expert knowledge. For example, for dissolved oxygen monitoring, if the standard deviation of dissolved oxygen concentration under a certain condition exceeds 0.5 mg / L, it is judged as high-risk; below 0.2 mg / L, it is judged as low-risk; and between the two is considered medium-risk.
[0059] Based on the risk assessment function described above, all state nodes are divided into three sets: High-risk state node set : Contains all state nodes with a risk level of High; medium-risk state node set : Contains all state nodes with a risk level of Medium; Low-risk state node set : Includes all state nodes with a risk level of Low.
[0060] Different sampling step sizes are assigned based on the risk level: For high-risk state node set Each state node is assigned a first sampling step size L (minimum sampling interval), i.e., a high-frequency sampling mode, to ensure that rapid fluctuations in environmental parameters can be captured. For low-risk state node set Each state node in the process is assigned a second sampling step size U (maximum sampling interval), i.e., a low-frequency sampling mode, to save energy and data resources; For medium-risk state node set Each state node in the process is assigned a third sampling step size M, where M is between L and U, for example... Alternatively, other interpolation methods may be used to determine this.
[0061] The specific values of L, U, and M can be determined by the multi-objective optimization model in step S101, or they can be preset according to the system hardware constraints.
[0062] The above mapping relationships are organized into a multidimensional matrix form. For a two-dimensional environment state space, a matrix S of size m×n is constructed, where m is the number of discrete states of the first environment driving variable and n is the number of discrete states of the second environment driving variable. The matrix element S(i,j) is the sampling step size corresponding to the state node (i,j).
[0063] Taking dissolved oxygen monitoring as an example, assuming the number of seasonal states is 4 (spring, summer, autumn, winter) and the number of rainfall intensity states is 4 (no rain, light rain, moderate rain, heavy rain), then the decision matrix S is a 4×4 matrix: , Based on the risk assessment results, high-risk nodes (such as summer + heavy rain) are assigned the matrix element value L, low-risk nodes (such as winter + no rain) are assigned the value U, and medium-risk nodes are assigned the value M.
[0064] After the decision matrix is constructed, during the real-time sampling process, when the system generates the multidimensional environmental state vector V(t) at the current moment, the corresponding baseline sampling step size B(t) = S(V(t)) can be quickly obtained by directly querying the matrix S with V(t) as the index.
[0065] Step S104: Obtain the historical sampling error sequence and calculate the error accumulation trend index at the current moment based on the historical sampling error sequence. The error accumulation trend index is used to quantify the degree of cumulative deviation between the actual value and the predicted value of the environmental parameter to be monitored.
[0066] In this step, the sampling error values of N consecutive sampling times before the current time are obtained to form the historical sampling error sequence. Each sampling error value in the historical sampling error sequence is the absolute difference or relative difference between the actual value and the predicted value of the environmental parameter to be monitored at the corresponding sampling time. The weighted sum of each sampling error value in the historical sampling error sequence is obtained by weighted summation. Based on the weighted error and the preset error accumulation threshold, the error accumulation trend index at the current moment is calculated, expressed as: , , In the formula, For the current moment The cumulative error trend indicator The preset error accumulation threshold, To find the minimum value function, For the current moment The weighted error sum, For the first The sampling error value at each sampling time. The preset attenuation factor, The length of the historical sampling error sequence.
[0067] In one specific embodiment, during the dynamic sampling process, the system obtains the actual value y(t) of the monitored environmental parameter at each sampling moment by performing a sampling operation. Simultaneously, the system generates a predicted value for that moment based on historical sampling data using a preset prediction model. The prediction model can employ lightweight time series prediction methods, such as exponential smoothing, ARIMA models, Kalman filters, or linear extrapolation based on historical trends, to adapt to the computing capabilities of low-power embedded devices.
[0068] The sampling error ε(t) is defined as the deviation between the actual value and the predicted value, and can be expressed as an absolute difference or a relative difference. Absolute difference: Relative difference: (When y(t)>0) In scenarios where the monitored parameters have distinct dimensions and their range of variation is known, it is simpler to use absolute difference calculations; in scenarios where the parameter variation range is large, using relative difference calculations can avoid the influence of dimensions.
[0069] At the current sampling time t (i.e., the moment when a sampling has just been completed and the actual value y(t) has been obtained), the system acquires the sampling error values of the N consecutive sampling times preceding the current time, forming a historical sampling error sequence {ε(t-1), ε(t-2),..., ε(tN)}. Here, N is the preset historical window length, which can be set according to the dynamic characteristics of the monitoring scenario. For example, N=10, meaning the error values of the most recent 10 samples are used for analysis.
[0070] In one specific embodiment, taking dissolved oxygen monitoring as an example, the system collects dissolved oxygen concentration data at a dynamic sampling frequency. Assuming the current time t is the completion time of a certain sampling, the system has recorded the actual and predicted dissolved oxygen concentrations at the previous 10 sampling times, and calculates the absolute error sequence of each sampling: ε(t-1)=0.12 mg / L, ε(t-2)=0.08 mg / L, ε(t-3)=0.15 mg / L, ..., ε(t-10)=0.05 mg / L, which constitutes the historical sampling error sequence.
[0071] To reflect the greater impact of recent errors on current decisions, this invention employs an exponentially decaying weighted summation of historical sampling error sequences. This weighting method assigns higher weights to more recent error values, enabling a faster response to recent trends while retaining some historical information to avoid misjudgments caused by instantaneous noise.
[0072] For example, continuing the dissolved oxygen monitoring scenario, with β=0.3 and N=10, the historical error sequence is: ε(t-1)=0.12, ε(t-2)=0.08, ε(t-3)=0.15, ε(t-4)=0.10, ε(t-5)=0.07, ε(t-6)=0.09, ε(t-7)=0.11, ε(t-8)=0.06, ε(t-9)=0.08, ε(t-10)=0.05. Calculate the weighted error sum: =1.000×0.12+0.741×0.08+0.549×0.15+0.407×0.10+0.301×0.07+0.223×0.09+0.165×0.11+0.122×0.06+0.091×0.08+0.067×0.05=0.12+0.0593+0.0824+0.0407+0.0211+0.0201+0.0182+0.0073+0.0073+0.0034=0.3798 That is, weighted error sum ≈0.38mg / L.
[0073] The error accumulation trend index R(t) is used to normalize the weighted error to the [0,1] interval, representing the proportion of the current error accumulation relative to a preset threshold. Its expression is: , Error accumulation threshold The setting needs to be combined with the actual dimensions of the monitoring parameters and the monitoring requirements. For example, in dissolved oxygen monitoring scenarios, the dissolved oxygen concentration is usually required to be maintained above 4 mg / L, and the acceptable prediction deviation range is 0.3-0.5 mg / L. Therefore, the error accumulation threshold can be set to... mg / L indicates that when the weighted error and cumulative error reach 0.4 mg / L, the error is considered to be significant, and the maximum sampling frequency correction needs to be initiated.
[0074] In a specific embodiment, the calculations obtained above are continued. , preset ,but: , The current error accumulation trend index is 0.95, indicating that the prediction error has accumulated to a high level (close to the threshold). The subsequent sampling frequency correction function will shorten the sampling step size accordingly to increase the density of sampling and capture parameter changes.
[0075] In another scenario, if the system operates stably and the weighted error sum is only 0.10 mg / L, then This indicates that the degree of error accumulation is low and the correction magnitude of the sampling frequency is small.
[0076] It should be noted that, to ensure the accuracy of the predictions, the prediction model needs to be updated in real time as the sampled data accumulates. After each sampling and obtaining the actual value y(t), the system adds the data point to the training dataset and performs incremental updates or parameter reestimation on the prediction model. For example, if exponential smoothing is used, the smoothing parameters are updated; if a Kalman filter is used, the state estimate and covariance matrix are updated. This real-time update mechanism ensures that the prediction model can adapt to the changing trends of the current environment, thereby improving the reliability of error calculation.
[0077] Step S105: Based on the reference sampling step size and the error accumulation trend index, dynamically calculate the optimal sampling step size at the current moment using a preset sampling frequency correction function.
[0078] In this step, the current time is obtained. The reference sampling step size corresponding to the multidimensional environment state vector ; Get the current time Error cumulative trend indicator Based on the baseline sampling step size and the error accumulation trend index, the optimal sampling step size is calculated using a sampling frequency correction function, expressed as: , In the formula, For the current moment The optimal sampling step size, The preset correction strength coefficient, and These are the minimum and maximum sampling step sizes, respectively, which are the parameters to be optimized. This is the floor function. and These are the functions for finding the maximum value and the function for finding the minimum value, respectively.
[0079] In one specific embodiment, the baseline sampling step size output by the environmental state decision matrix is fused with the error accumulation trend index calculated by the error feedback mechanism. The optimal sampling step size at the current moment is then dynamically calculated using a sampling frequency correction function. The core idea of this correction function is: when the error accumulation trend index increases, it indicates a continuous deviation between the current prediction model and the actual environment, requiring more frequent sampling to improve monitoring accuracy; when the error accumulation trend index is small, it indicates that the current sampling strategy can effectively capture parameter changes, and the baseline sampling step size can be maintained or restored to save resources.
[0080] Specifically, this step includes the following sub-steps: Sub-step S105-1: Obtain the reference sampling step size at the current time.
[0081] The system queries the environmental state decision matrix constructed in step S103 based on the multidimensional environmental state vector V(t) at the current time t to obtain the corresponding baseline sampling step size B(t). This baseline sampling step size reflects the risk assessment results based on environmental driving factors: high-risk states correspond to small step sizes (high-frequency sampling), and low-risk states correspond to large step sizes (low-frequency sampling).
[0082] In one specific embodiment, taking dissolved oxygen monitoring in water as an example, assuming the current environmental state vector is (summer, heavy rain), the baseline sampling step size B(t) = 10 minutes is obtained by querying the decision matrix. This step size indicates that, based solely on the environmental state assessment, the system should sample at 10-minute intervals.
[0083] Sub-step S105-2: Obtain the error accumulation trend index at the current moment.
[0084] The system obtains the error accumulation trend index R(t) at the current time t from step S104. The index ranges from [0,1] and quantifies the degree of accumulation of recent prediction errors. The closer R(t) is to 1, the more severe the error accumulation, requiring a greater degree of sampling density; the closer R(t) is to 0, the less severe the error accumulation, and the sampling strategy can maintain the baseline or be moderately relaxed.
[0085] Continuing with the above embodiment, assuming that the error accumulation trend index R(t) = 0.6 is calculated at the current moment through step S104, it indicates that the prediction error has reached the threshold level of 60%, and there is a certain degree of deviation accumulation.
[0086] Sub-step S105-3: Calculate the optimal sampling step size using the sampling frequency correction function.
[0087] The sampling frequency correction function combines the baseline sampling step size with an error accumulation trend indicator to generate the final optimal sampling step size. Its expression is: , Among them, the corrected strength coefficient Minimum sampling step size and maximum sampling step size This can be determined through the multi-objective optimization model in step S101 above. Specifically, in the Pareto optimization process, the... , , As parameters to be optimized, with prediction error RMSE and data sampling rate η as objectives, a Pareto optimal solution set is searched. Users can select appropriate parameter combinations from the Pareto optimal solution set according to the accuracy requirements and resource constraints of the actual scenario.
[0088] In the absence of optimization conditions or during the system initialization phase, empirical values can be used for setting: =0.5 (medium correction strength) The minimum sampling interval supported by the sensor hardware (e.g., 5 minutes). This refers to the maximum sampling interval (e.g., 60 minutes) set according to the monitoring specifications.
[0089] In summary, the calculation of the absolute time point based on the optimal sampling step size and the control of the hardware timer ensure the timeliness of the sampling operation and avoid sampling time drift caused by task scheduling delays. This is of great significance for the analysis of environmental parameters that require strict time alignment (such as spectrum analysis and correlation analysis).
[0090] Step S106: Determine the next sampling time point based on the optimal sampling step size, and control the sampling device to perform sampling operations at the next sampling time point to obtain environmental parameter data to be monitored.
[0091] In this step, the system maintains the current sampling time point. (i.e., the timestamp of the most recent completed sampling). Based on the optimal sampling step size obtained in step S105. Calculate the next sampling time point : , Timestamps can be absolute timestamps (such as Unix timestamps, accurate to milliseconds) or relative timestamps (such as millisecond counts since system startup). To ensure the accuracy of sampling time, a high-precision real-time clock (RTC) should be used or periodically synchronized via the Network Time Protocol (NTP).
[0092] In summary, the system acquires time-series data of environmental parameters within the target monitoring area, including environmental driving variable data and environmental parameter data to be monitored; it performs state mapping on the environmental driving variable data at the current moment to generate a multi-dimensional environmental state vector; it matches the multi-dimensional environmental state vector with a pre-constructed environmental state decision matrix to obtain the baseline sampling step size; it acquires historical sampling error sequences and calculates the error accumulation trend index; based on the baseline sampling step size and the error accumulation trend index, it dynamically calculates the optimal sampling step size using a sampling frequency correction function; it determines the next sampling time point based on the optimal sampling step size and controls the sampling equipment to perform sampling operations; and it achieves forward-looking adjustment of the sampling strategy through the environmental state decision matrix, combined with an error feedback mechanism to achieve adaptive correction, significantly reducing sampling energy consumption while ensuring monitoring accuracy.
[0093] Please see Figure 2 The diagram shows a structural block diagram of a data dynamic sampling system based on an environmental state decision matrix according to this application.
[0094] like Figure 2As shown, the data dynamic sampling system 200 includes an acquisition module 210, a generation module 220, a matching module 230, a first calculation module 240, a second calculation module 250, and an execution module 260.
[0095] The acquisition module 210 is configured to acquire time series data of environmental parameters within the target monitoring area. The time series data includes at least one environmental driving variable and environmental parameter data to be monitored. The environmental driving variable data characterizes the physical driving factors influencing the changing trend of the environmental parameter data to be monitored. The generation module 220 is configured to perform state mapping on each environmental driving variable data at the current moment according to a preset environmental state discretization rule, generating a multidimensional environmental state vector composed of multiple discretized environmental state identifiers. The matching module 230 is configured to match the multidimensional environmental state vector with a pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is based on historical environmental data and... The multidimensional matrix constructed from empirical knowledge defines the sampling interval corresponding to a specific combination of environmental states in the matrix elements of the environmental state decision matrix. The first calculation module 240 is configured to acquire a historical sampling error sequence and calculate the error accumulation trend index at the current moment based on the historical sampling error sequence, wherein the error accumulation trend index is used to quantify the degree of accumulation of deviation between the actual value and the predicted value of the environmental parameter to be monitored. The second calculation module 250 is configured to dynamically calculate the optimal sampling step size at the current moment based on the benchmark sampling step size and the error accumulation trend index through a preset sampling frequency correction function. The execution module 260 is configured to determine the next sampling time point based on the optimal sampling step size and control the sampling device to perform sampling operations at the next sampling time point to acquire the environmental parameter data to be monitored.
[0096] It should be understood that Figure 2 The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 2 The various modules in the document will not be described in detail here.
[0097] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the data dynamic sampling method based on the environment state decision matrix in any of the above method embodiments. In one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, which are configured as follows: Acquire time series data of environmental parameters within the target monitoring area. The time series data of environmental parameters includes at least one environmental driving variable and environmental parameter data to be monitored. The environmental driving variable data is used to characterize the physical driving factors that affect the changing trend of the environmental parameter data to be monitored. Based on the preset environmental state discretization rules, the data of each environmental driving variable at the current moment are mapped to a state, generating a multi-dimensional environmental state vector composed of multiple discretized environmental state identifiers. The multidimensional environmental state vector is matched with the pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is a multidimensional matrix constructed based on historical environmental data and prior knowledge. The matrix elements of the environmental state decision matrix define the sampling interval corresponding to a specific combination of environmental states. Obtain the historical sampling error sequence, and calculate the error accumulation trend index at the current moment based on the historical sampling error sequence, wherein the error accumulation trend index is used to quantify the degree of accumulation of deviation between the actual value and the predicted value of the environmental parameter to be monitored; Based on the baseline sampling step size and the error accumulation trend index, the optimal sampling step size at the current moment is dynamically calculated using a preset sampling frequency correction function. The next sampling time point is determined based on the optimal sampling step size, and the sampling device is controlled to perform sampling operations at the next sampling time point to obtain environmental parameter data to be monitored.
[0098] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of a data dynamic sampling system based on an environment state decision matrix. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely located relative to a processor, which can be connected to the data dynamic sampling system based on an environment state decision matrix via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0099] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 3As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3 Taking a bus connection as an example, the memory 320 is the computer-readable storage medium described above. The processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 320, thereby implementing the dynamic data sampling method based on the environmental state decision matrix described in the above method embodiment. The input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the dynamic data sampling system based on the environmental state decision matrix. The output device 340 may include a display screen or other display device.
[0100] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.
[0101] In one implementation, the above-described electronic device is applied in a data dynamic sampling system based on an environmental state decision matrix, for a client, and includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Acquire time series data of environmental parameters within the target monitoring area. The time series data of environmental parameters includes at least one environmental driving variable and environmental parameter data to be monitored. The environmental driving variable data is used to characterize the physical driving factors that affect the changing trend of the environmental parameter data to be monitored. Based on the preset environmental state discretization rules, the data of each environmental driving variable at the current moment are mapped to a state, generating a multi-dimensional environmental state vector composed of multiple discretized environmental state identifiers. The multidimensional environmental state vector is matched with the pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is a multidimensional matrix constructed based on historical environmental data and prior knowledge. The matrix elements of the environmental state decision matrix define the sampling interval corresponding to a specific combination of environmental states. Obtain the historical sampling error sequence, and calculate the error accumulation trend index at the current moment based on the historical sampling error sequence, wherein the error accumulation trend index is used to quantify the degree of accumulation of deviation between the actual value and the predicted value of the environmental parameter to be monitored; Based on the baseline sampling step size and the error accumulation trend index, the optimal sampling step size at the current moment is dynamically calculated using a preset sampling frequency correction function. The next sampling time point is determined based on the optimal sampling step size, and the sampling device is controlled to perform sampling operations at the next sampling time point to obtain environmental parameter data to be monitored.
[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0103] 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for dynamic sampling of data based on environmental state decision matrix, characterized in that, include: Acquire time series data of environmental parameters within the target monitoring area. The time series data of environmental parameters includes at least one environmental driving variable and environmental parameter data to be monitored. The environmental driving variable data is used to characterize the physical driving factors that affect the changing trend of the environmental parameter data to be monitored. Based on the preset environmental state discretization rules, the data of each environmental driving variable at the current moment are mapped to a state, generating a multi-dimensional environmental state vector composed of multiple discretized environmental state identifiers. The multidimensional environmental state vector is matched with the pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is a multidimensional matrix constructed based on historical environmental data and prior knowledge. The matrix elements of the environmental state decision matrix define the sampling interval corresponding to a specific combination of environmental states. Obtain the historical sampling error sequence, and calculate the error accumulation trend index at the current moment based on the historical sampling error sequence, wherein the error accumulation trend index is used to quantify the degree of accumulation of deviation between the actual value and the predicted value of the environmental parameter to be monitored; Based on the baseline sampling step size and the error accumulation trend index, the optimal sampling step size at the current moment is dynamically calculated using a preset sampling frequency correction function. The next sampling time point is determined based on the optimal sampling step size, and the sampling device is controlled to perform sampling operations at the next sampling time point to obtain environmental parameter data to be monitored.
2. The method of claim 1, wherein, The step of mapping the current environmental driving variable data to a state based on a preset environmental state discretization rule, and generating a multidimensional environmental state vector composed of multiple discretized environmental state identifiers, includes: Obtain the first continuous value of the first environment driving variable at the current time, and convert the first continuous value into a first discrete state identifier according to a preset first discretization mapping function, wherein the first discretization mapping function is: , wherein, is a first discrete state identifier, is a first continuous numerical value of a first environmental driving variable, is a pre-determined discretization fractile, is a corresponding discrete state identifier, is a total number of discrete states; Obtain the second continuous value of the second environment driving variable at the current time, and convert the second continuous value into a second discrete state identifier according to the preset second discretization mapping function; The first discrete state identifier and the second discrete state identifier are combined to generate a multidimensional environment state vector composed of the first discrete state identifier and the second discrete state identifier.
3. The method of claim 1, wherein, The method for constructing the environmental state decision matrix includes: Obtain a historical environment dataset, which contains environmental driving variable data and corresponding environmental parameter data to be monitored at multiple historical moments; Discretize the environmental driving variable data in the historical environmental dataset to construct a multidimensional environmental state space, and map each historical moment to a unique state node in the multidimensional environmental state space. For each state node in the multidimensional environmental state space, extract the environmental parameter data to be monitored for all historical moments corresponding to the state node, and calculate the index of the degree of drastic change of parameters under the state node. Based on the parameter change intensity index and combined with the preset risk assessment function, each state node in the multidimensional environmental state space is divided into a high-risk state node set, a medium-risk state node set, and a low-risk state node set. A first sampling step size is assigned to each state node in the high-risk state node set, a second sampling step size is assigned to each state node in the low-risk state node set, and a third sampling step size is assigned to each state node in the medium-risk state node set, wherein the first sampling step size is smaller than the third sampling step size, and the third sampling step size is smaller than the second sampling step size. The environmental state decision matrix is constructed based on the mapping relationship between each state node and the sampling step size assigned to the state node.
4. The method of claim 3, wherein, The discretization of the environmental driving variable data in the historical environmental dataset to construct a multidimensional environmental state space includes: Obtain a first continuous data sequence corresponding to a first environmental driving variable, and obtain a second continuous data sequence corresponding to a second environmental driving variable, wherein the first environmental driving variable and the second environmental driving variable are the two driving factors with the highest degree of influence on the environmental parameter data to be monitored; The first continuous data sequence is divided into multiple first discrete state intervals according to a preset first quantile threshold, and a unique first discrete state identifier is assigned to each first discrete state interval. The second continuous data sequence is divided into multiple second discrete state intervals according to a preset second quantile threshold, and a unique second discrete state identifier is assigned to each second discrete state interval. The first discrete state identifier and the second discrete state identifier are combined to generate a two-dimensional environment state space, thus obtaining a multi-dimensional environment state space. Each state node in the two-dimensional environment state space is determined by a unique first discrete state identifier and a unique second discrete state identifier.
5. The method of claim 1, wherein, The step of obtaining the historical sampling error sequence and calculating the error accumulation trend index at the current moment based on the historical sampling error sequence includes: The sampling error values of N consecutive sampling times before the current time are obtained to form the historical sampling error sequence, wherein each sampling error value in the historical sampling error sequence is the absolute difference or relative difference between the actual value and the predicted value of the environmental parameter to be monitored at the corresponding sampling time. The weighted sum of each sampling error value in the historical sampling error sequence is obtained by weighted summation. Based on the weighted error and the preset error accumulation threshold, the error accumulation trend index at the current moment is calculated, expressed as: , , In the formula, is an error accumulation trend index of a current time point, is a preset error accumulation threshold, is a minimum value function, is a weighted error sum of a current time point, is an error value of a sampling time point, is a preset attenuation factor, is a length of a historical sampling error sequence. 6. The method of claim 1, wherein, The step of dynamically calculating the optimal sampling step size at the current moment based on the benchmark sampling step size and the error accumulation trend index using a preset sampling frequency correction function includes: acquiring a current time a reference sampling step length corresponding to a multi-dimensional environment state vector of the current time ; acquiring a current time an error accumulation trend index and according to the reference sampling step and the error accumulation trend index, an optimal sampling step is calculated by using a sampling frequency correction function, expressed as: , In the formula, For the current moment The optimal sampling step size, The preset correction strength coefficient, and These are the minimum and maximum sampling step sizes, respectively, which are the parameters to be optimized. This is the floor function. and These are the functions for finding the maximum value and the function for finding the minimum value, respectively.
7. The data dynamic sampling method based on the environmental state decision matrix according to claim 1, characterized in that, Before acquiring time-series data of environmental parameters within the target monitoring area, the method further includes: A multi-objective optimization model is constructed to optimize the parameters of the sampling step size allocation strategy in the environmental state decision matrix. The multi-objective optimization model includes a first optimization objective and a second optimization objective, wherein the first optimization objective is to minimize the prediction error of the environmental parameter data to be monitored, and the second optimization objective is to minimize the data sampling rate. The Pareto optimization algorithm is used to solve the multi-objective optimization model to obtain the Pareto optimal solution set; Target optimization parameters are selected from the Pareto optimal solution set according to the preset weighting factors, and the sampling step size allocation of the high-risk state node set, medium-risk state node set, and low-risk state node set in the environmental state decision matrix is updated according to the target optimization parameters.
8. The data dynamic sampling method based on the environmental state decision matrix according to claim 7, characterized in that, The objective function of the multi-objective optimization model is expressed as follows: , , In the formula, and These are the minimum and maximum sampling step sizes to be optimized, corresponding to the sampling step sizes of the high-risk state node set and the low-risk state node set, respectively. These are preset weighting factors used to balance the importance of prediction error and data sampling rate. To use the minimum sampling step size and the maximum sampling step size When performing dynamic sampling, the root mean square error of the prediction of the environmental parameter data to be monitored is... To use the minimum sampling step size and maximum sampling step size Data sampling rate during dynamic sampling This refers to the actual number of samples taken using a dynamic sampling strategy within a preset time period. This refers to the total number of samples taken continuously within the same time period using a fixed minimum sampling step size. The root mean square error is the baseline.
9. A dynamic data sampling system based on an environmental state decision matrix, characterized in that, include: The acquisition module is configured to acquire time series data of environmental parameters within the target monitoring area. The time series data of environmental parameters includes at least one environmental driving variable and environmental parameter data to be monitored. The environmental driving variable data is used to characterize the physical driving factors that affect the changing trend of the environmental parameter data to be monitored. The generation module is configured to perform state mapping on the current environmental driving variable data according to the preset environmental state discretization rules, and generate a multi-dimensional environmental state vector composed of multiple discretized environmental state identifiers. The matching module is configured to match the multidimensional environmental state vector with a pre-constructed environmental state decision matrix to obtain the benchmark sampling step size corresponding to the current environmental state. The environmental state decision matrix is a multidimensional matrix constructed based on historical environmental data and prior knowledge. The matrix elements of the environmental state decision matrix define the sampling interval corresponding to a specific combination of environmental states. The first calculation module is configured to acquire a historical sampling error sequence and calculate an error accumulation trend index at the current moment based on the historical sampling error sequence, wherein the error accumulation trend index is used to quantify the degree of accumulation of deviation between the actual value and the predicted value of the environmental parameter to be monitored. The second calculation module is configured to dynamically calculate the optimal sampling step size at the current moment based on the benchmark sampling step size and the error accumulation trend index using a preset sampling frequency correction function. The execution module is configured to determine the next sampling time point based on the optimal sampling step size, and control the sampling device to perform sampling operations at the next sampling time point to obtain environmental parameter data to be monitored.