A method for analyzing data of total phosphorus measurement of water quality
By constructing coordinate line segments and normal boundary projection space, the changes in total phosphorus concentration in water quality are identified, solving the problem of difficulty in identifying concentration mutation points in existing technologies, and realizing dynamic monitoring and trend prediction of total phosphorus in water quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies fail to effectively identify the location and trend of concentration abrupt changes in total phosphorus content measurement in water. In particular, they are difficult to accurately identify concentration anomalies in complex flow environments, leading to distorted monitoring results and a lack of accurate prediction of future trends.
By acquiring observed values of total phosphorus in water and GPS coordinates, we construct coordinate line segments and calculate azimuth angles to identify changes in total phosphorus concentration, establish a normal boundary projection space, correct the attribution of abrupt change regions, reconstruct the concentration change response curve, analyze the inflection point behavior characteristics, and predict future evolution trends.
Dynamically capturing the spatial gradient trend of concentration changes enhances the ability to perceive the location of abnormal concentration fluctuations, enables spatial consistency correction and trend prediction for concentration mutation areas, and improves the accuracy of water quality change pattern identification and prediction capabilities.
Smart Images

Figure CN120913687B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental data processing technology, and in particular to a method for analyzing water quality total phosphorus content measurement data by a mobile survey. Background Technology
[0002] The field of environmental data processing technology involves the efficient processing and in-depth analysis of multi-source heterogeneous data collected in environmental monitoring, including the collection, transmission, preprocessing, classification, analysis and visualization of environmental data.
[0003] Among them, the mobile water quality total phosphorus measurement data analysis method refers to using shipborne automatic sampling equipment to measure the total phosphorus concentration of water body point by point along a predetermined water route, combining the geographical location information obtained by the Global Positioning System, and forming a corresponding dataset by associating the total phosphorus concentration data of each sampling point with the corresponding coordinates.
[0004] Existing technologies rely solely on static matching of concentration values at sampling points with their geographic coordinates, without systematically quantifying the directionality and concentration change trends between adjacent observation points. This makes it difficult to accurately identify the location and trend of concentration abrupt changes in complex water flow environments, especially in boundary areas where concentration data can easily become confused. There is a lack of dynamic correction methods for spatially assigning abrupt change areas. Furthermore, the lack of a time-series trend path makes it impossible to identify key inflection points and spatial offset directions of concentration changes, resulting in a lack of accurate prediction of future total phosphorus trends. When dealing with waters where the migration and diffusion rate of total phosphorus changes rapidly or where flow boundaries are blurred, this may cause distortion of concentration monitoring results, affecting the accurate analysis of the dynamic evolution mechanism of water quality. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and to propose a mobile method for measuring and analyzing total phosphorus content in water.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for analyzing total phosphorus content in water quality using a mobile survey system, comprising the following steps:
[0007] S1: Obtain the total phosphorus content observation value of the water quality recorded during the specified period of navigation and the corresponding GPS coordinates, construct coordinate line segments, calculate the azimuth angle of each line segment and the difference of total phosphorus content at both ends, and obtain the total phosphorus concentration change data.
[0008] S2: Extract the total phosphorus concentration change data located in the water boundary line segment area during the navigation process, smooth the change trend according to the corresponding coordinate line segment, identify the abrupt change region of total phosphorus concentration, and construct a set of abrupt change candidate regions;
[0009] S3: Based on each coordinate line segment in the candidate mutation region set, establish the normal boundary projection space of the line segment, determine the distribution of the coordinates of each mutation region in the entire boundary projection space, correct the attribution label of each mutation region, and obtain the attribution correction dataset.
[0010] S4: Reconstruct the concentration change response curve of each water body according to the attribution correction dataset, extract the inflection point of total phosphorus change in the curve, analyze the future evolution trend of the inflection point, and obtain the inflection point behavior characteristics.
[0011] S5: Extract the trend direction, positional shift, and continuous change pattern of the inflection point from the inflection point behavior characteristics to obtain the total phosphorus evolution trend analysis results.
[0012] As a further aspect of the present invention, the step of obtaining the total phosphorus concentration change data specifically includes:
[0013] S111: Obtain the total phosphorus content observation value and corresponding GPS coordinates of the water quality recorded during the specified period of navigation, extract the coordinates of adjacent observation points according to the observation order, construct continuous connected coordinate line segments, and record the start and end point index and coordinates of each coordinate line segment to generate coordinate line segment structure information.
[0014] S112: Based on the coordinate line segment structure information, extract the latitude and longitude coordinates of the starting and ending points of each coordinate line segment, convert them into planar direction coordinates according to the coordinate difference, calculate the azimuth angle of each coordinate line segment, and pair the azimuth angle with the line segment index to generate coordinate line segment azimuth angle data.
[0015] S113: Based on the coordinate line segment structure information and the coordinate line segment azimuth data, extract the total phosphorus content observation value of the water quality corresponding to the start and end points of each coordinate line segment, calculate the concentration difference between the two ends of the observation value and record it together with the azimuth angle to generate total phosphorus content concentration change data.
[0016] As a further aspect of the present invention, the step of obtaining the mutation candidate region set specifically includes:
[0017] S211: Extract the total phosphorus concentration change data located in the water boundary line area during the navigation process. Based on the coordinate index and spatial coordinates associated in each data point, match the coordinate line segments within the water boundary line area, filter the corresponding concentration change values and azimuth angles, and establish a boundary line concentration dataset.
[0018] S212: Based on the boundary segment concentration dataset, construct a concentration change trend sequence along the continuous navigation direction, and use a local weighted regression algorithm to smoothly fit the sequence to establish a smooth concentration change trend sequence;
[0019] S213: Extract the direction change segment of the slope of the concentration change smooth trend sequence, determine the concentration change pattern based on the slope reversal position and the concentrated change interval, identify the coordinate line segment where abrupt changes occur in the continuous trend, and generate a set of abrupt change candidate regions.
[0020] As a further aspect of the present invention, the step of obtaining the attribution correction dataset specifically includes:
[0021] S311: Based on each coordinate line segment in the mutation candidate region set, extract the direction angle information of each coordinate line segment, construct the boundary projection space downward according to the direction angle, and mark the corresponding projection range index to generate boundary projection space structure information.
[0022] S312: Based on the boundary projection space structure information, obtain the projection position of the coordinate point corresponding to each abrupt change region in the boundary projection space, count the distribution on both sides of the boundary line corresponding to the projection position, extract the number of coordinates and spatial aggregation range on each side, and obtain the boundary projection distribution data.
[0023] S313: Based on the boundary projection distribution data, compare the distribution density and aggregation direction of each mutation region on both sides of the boundary, determine the boundary side region to which it should belong based on the density value and distribution trend, update the region label of the mutation region according to the initial belonging information, and generate the belonging correction dataset.
[0024] As a further aspect of the present invention, the step of obtaining the inflection point behavior feature specifically includes:
[0025] S411: According to the attribution region in the attribution correction dataset, classify and sort the total phosphorus observation points in each water body, reconstruct the concentration change response curve of each water body, identify the change path index used for trend extraction, and generate the water body concentration change response curve.
[0026] S412: Obtain the concentration change direction and slope trend of continuous coordinate points in the water concentration change response curve, identify the position where the concentration change slope reverses, extract the target reversal point as the inflection point of total phosphorus change, and mark the corresponding curve position and the slope direction before and after, and generate the inflection point position marker of total phosphorus change.
[0027] S413: Based on the inflection point markers of total phosphorus change, extract the coordinate position, direction of change and connection trend of each inflection point, construct a sequence state set according to the concentration fluctuation state before and after the inflection point, use a conditional random field model to model the spatial state of the inflection point sequence, predict the future trend direction, position offset and continuous change pattern of each inflection point, and generate inflection point behavior features.
[0028] As a further aspect of the present invention, the steps for obtaining the total phosphorus evolution trend analysis results are as follows:
[0029] S511: Extract the inflection point behavior features, and classify the direction vector and spatial offset distance of each inflection point into the corresponding region according to the water area to generate integrated data of trend direction and position offset.
[0030] S512: Based on the integrated data of trend direction and position offset, summarize the inflection point sequence number, change time sequence and trend attribution label corresponding to the continuous change pattern field in each water area, and output the total phosphorus evolution trend analysis results to describe the dynamic migration characteristics of total phosphorus between regions.
[0031] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0032] In this invention, by establishing continuous line segments between observed total phosphorus values and coordinate data and analyzing their direction angles and concentration differences, the spatial gradient trend of concentration changes can be dynamically captured. By identifying abrupt change patterns in concentration changes in boundary regions, the ability to perceive the location of abnormal concentration fluctuations is enhanced. By constructing a normal boundary projection space and analyzing the density and aggregation direction inside and outside the region, spatial consistency correction of the attribution of abrupt change regions is achieved. By reconstructing the concentration response change curve through inflection point sequences and modeling its change trend, the dynamic migration law of total phosphorus concentration distribution along the water body can be fully revealed. Furthermore, by extracting trend direction, position offset, and continuous change features, the spatial prediction ability of future concentration evolution paths is enhanced. Overall, the precision and spatial explanatory power of water quality change law identification are improved, and the system synergy of concentration abrupt change identification, attribution judgment, and trend prediction is achieved. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of the main steps of the present invention;
[0034] Figure 2 This is a flowchart of step S1 of the present invention;
[0035] Figure 3 This is a flowchart of step S2 of the present invention;
[0036] Figure 4 This is a flowchart of step S3 of the present invention;
[0037] Figure 5 This is a flowchart of step S4 of the present invention;
[0038] Figure 6 This is a flowchart of step S5 of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0040] Please see Figure 1 This invention provides a technical solution: a method for analyzing total phosphorus content measurement data in water using a mobile survey system, comprising the following steps:
[0041] S1: Obtain the total phosphorus content observation value of the water quality recorded during the specified period of navigation and the corresponding GPS coordinates, construct coordinate line segments, calculate the azimuth angle of each line segment and the difference of total phosphorus content at both ends, and obtain the total phosphorus concentration change data.
[0042] S2: Extract the total phosphorus concentration change data in the water boundary line area during the navigation process, smooth the change trend according to the corresponding coordinate line segment, identify the abrupt change area of total phosphorus concentration, and construct a set of abrupt change candidate areas;
[0043] S3: Based on each coordinate line segment in the candidate mutation region set, establish the normal boundary projection space of the line segment, determine the distribution of the coordinates of each mutation region in the entire boundary projection space, correct the attribution label of each mutation region, and obtain the attribution correction dataset.
[0044] S4: Reconstruct the concentration change response curve of each water body according to the attribution region in the attribution correction dataset, extract the inflection point of total phosphorus change in the curve, analyze the future evolution trend of the inflection point, and obtain the inflection point behavior characteristics.
[0045] S5: Extract the trend direction, positional shift, and continuous change pattern of inflection point changes from the inflection point behavior characteristics to obtain the results of the total phosphorus evolution trend analysis.
[0046] Please see Figure 2 The specific steps for obtaining data on changes in total phosphorus concentration are as follows:
[0047] S111: Obtain the total phosphorus content observation value and corresponding GPS coordinates of the water quality recorded during the specified period of navigation, extract the coordinates of adjacent observation points according to the observation order, construct continuous connected coordinate line segments, and record the start and end point index and coordinates of each coordinate line segment to generate coordinate line segment structure information.
[0048] During actual data collection, the mobile monitoring equipment records the total phosphorus concentration and the latitude and longitude coordinates of the current location at regular intervals. For example, if sampling is set to occur every minute, 60 sets of data can be recorded between 9:00 and 10:00. After the data is recorded, it is organized sequentially, with the first record at the beginning and the last record at the end. The location coordinates corresponding to the first and second data points are extracted as the start and end points of the first line segment. Then, the data from the second and third data points are extracted as the next line segment, and so on, connecting every two adjacent data points to form a line segment. Each line segment needs to record its start and end point numbers. For example, the first line segment connects the first... For example, if point 1 is 120.4567 and point 2 is 2, then the starting point is numbered 1 and the ending point is numbered 2. The longitude and latitude of the starting point are also recorded. For instance, if point 1 is 120.4567 and 31.2345, and the ending point is 120.4570 and 31.2348, then the information for this line segment is 1-2, from 120.4567 and 31.2345 to 120.4570 and 31.2348. All line segment information is compiled in this way. The total number of line segments will be one less than the number of data points. If 5 points are recorded, then 4 line segments are formed. All line segment structure information includes the starting point number, starting point coordinates, ending point number, and ending point coordinates. After connecting all line segments, all structure information is compiled into a single table or imported into a GIS system.
[0049] S112: Based on the coordinate line segment structure information, extract the latitude and longitude coordinates of the starting and ending points of each coordinate line segment, convert them into planar direction coordinates according to the coordinate difference, calculate the azimuth angle of each coordinate line segment, and pair the azimuth angle with the line segment index to generate coordinate line segment azimuth angle data.
[0050] After extracting the latitude and longitude of the starting and ending points from each line segment, the coordinate differences need to be converted into planar direction differences. In actual calculations, first calculate the longitude of the ending point minus the longitude of the starting point. For example, if the longitude of the ending point is 120.4570 and the longitude of the starting point is 120.4567, then the longitude difference is 120.4570 - 120.4567 = 0.0003. Then calculate the latitude of the ending point minus the latitude of the starting point. For example, if the latitude of the ending point is 31.2348 and the latitude of the starting point is 31.2345, then the latitude difference is 31.2348 - 31.2345 = 0.0003. To calculate the direction angle, these two differences need to be considered as the horizontal and vertical distances in the planar direction. These two differences are used to calculate the direction angle using the arctangent function. For example, the direction angle is the result of the arctangent function calculation. The specific process is to substitute the horizontal and vertical differences into the calculation. For example, direction angle = arctangent(0.0003 / 0.0003). In the calculation, an angle of approximately 45 degrees is obtained. This angle indicates that the direction of this line segment is inclined along the northeast direction. The same calculation is performed on all line segments in turn to calculate the direction angle of each line segment. Each angle value corresponds to the corresponding line segment number. For example, the angle corresponding to line segment 1 is 45 degrees, and line segment 2 may be 60 degrees. After all the direction angle results are sorted, a structured data paired with the line segment number is formed.
[0051] S113: Based on the coordinate line segment structure information and coordinate line segment azimuth data, extract the total phosphorus content observation value of the water quality corresponding to the start and end points of each coordinate line segment, calculate the concentration difference between the two ends of the observation value and record it together with the azimuth angle to generate total phosphorus content concentration change data.
[0052] Extract the total phosphorus concentration of the water corresponding to the start and end points of each recorded line segment. For example, if the starting concentration of the first line segment is 0.12 and the ending concentration is 0.15, the concentration difference is calculated as 0.15 - 0.12 = 0.03. Similarly, if the starting concentration of the second line segment is 0.15 and the ending concentration is 0.11, the concentration difference is calculated as 0.11 - 0.15 = -0.04. Calculate the concentration difference for each line segment in this way, subtracting the starting value from the ending value. A positive value indicates an increase in concentration, and a negative value indicates a decrease in concentration. If the absolute value of the concentration difference for a certain line segment is less than 0... If the value is 01, it is recorded as a slow-changing segment. For example, the concentration difference of the third line segment is 0.09-0.08=0.01, which does not belong to the slow segment. However, if it is 0.09-0.085=0.005, it belongs to the slow segment. The concentration difference results must be retained to three decimal places and paired with the number of each line segment and its direction angle to form a three-item combination data. For example, if line segment 1 is numbered 1, its direction angle is 45 degrees, and its concentration difference is 0.03, then the corresponding data are 1, 45, 0.03. All data are combined into a record set to represent the direction and concentration change of each line segment.
[0053] Please see Figure 3 The specific steps for obtaining the mutation candidate region set are as follows:
[0054] S211: Extract the total phosphorus concentration change data in the water boundary line area during the navigation process. Based on the coordinate index and spatial coordinates associated with each data point, match the coordinate line segments within the water boundary line area, filter the corresponding concentration change values and azimuth angles, and establish the boundary line concentration dataset.
[0055] When extracting line segment data near the water boundary during navigation, the first step is to select the segments that fall near the water boundary from all generated coordinate line segments. This requires defining the spatial extent of the water boundary, which can be done using preset latitude and longitude boundaries. For example, the east, west, south, and north boundaries can be set to 120.4600, 120.4550, 31.2300, and 31.2400 respectively. Only line segments falling within this range are retained. Then, based on the calculated concentration change data and azimuth, these line segments located in the boundary area are filtered out one by one. The matching method is to compare the coordinates of the start and end points of the line segments. Whether it is within the boundary range. For example, if the starting coordinates of a line segment are 120.4555 and 31.2350, and the ending coordinates are 120.4558 and 31.2353, and both points are within the preset boundary, then the line segment meets the condition. Its concentration change value and direction angle are extracted. If the concentration change value is 0.04 and the direction angle is 60 degrees, these two values are added to the dataset as the concentration information of the line segment. This process is repeated until all line segments that meet the spatial boundary conditions have been filtered out. Finally, a concentration data set specifically for the boundary area is formed, including the number of each boundary line segment, the concentration difference, and the direction angle information.
[0056] S212: Based on the boundary line segment concentration dataset, a concentration change trend sequence is constructed in the continuous navigation direction. The local weighted regression algorithm is used to smoothly fit the sequence and establish a smooth trend sequence of concentration changes.
[0057] To establish a sequence of total phosphorus concentration changes along a continuous navigation direction, the concentration difference data of the water boundary region needs to be sequentially processed. The data for each boundary segment consists of the total phosphorus concentration difference and its spatial location, and the order can be based on the spatial connection order of the segments. After extracting the concentration difference values of these segments, an original concentration change sequence is obtained. To eliminate local disturbances and present the overall trend, the Local Weighted Regression Algorithm (LOESS) is used to smooth the sequence. This algorithm performs a weighted fitting on each data point using the observations of its surrounding neighboring points. The mathematical expression for the smoothing result is as follows:
[0058] ;
[0059] in, : indicates the first The smoothed total phosphorus concentration difference (unit: mg / L) at each coordinate line segment is used for subsequent trend change analysis; : Represents the first in the original concentration difference sequence The observed concentration difference (unit: mg / L) of the line segments is derived from mobile survey measurements; : indicates the first The line segment to the first The regression weights of the line segments are used to adjust their degree of participation in the fit; : Represents the bandwidth coefficient, which controls the width of the left and right neighboring regions (in terms of the number of line segments) involved in the smoothing calculation at each position. : Indicates the index of the target line segment that is currently undergoing smoothing; : indicates falling into Within the central bandwidth window, the neighborhood segment index participates in smoothing.
[0060] To enhance attenuation control at distant points, an adjustable parameter is introduced. This is used to adjust the decay of the kernel function weights. The weight calculation method is modified as follows:
[0061] ;
[0062] in, : No. The position number of the line segment (e.g., the 3rd one) ); : No. The position number of each adjacent line segment; : No. line segment and the first The distance between the line segments is expressed as the difference in indices; : Attenuation factor, used to adjust the degree of influence of distance on weight, with a value range of 0 to 1. The larger the value, the smaller the weight of points that are farther away.
[0063] There are 5 consecutive route segments, numbered in spatial order as follows: The corresponding original concentration differences are as follows: , , , , Now regarding the first Smooth fitting is performed on the line segments, i.e., calculation Set bandwidth Select the point within the window as arrive ,Pick .
[0064] Calculate the following based on the weighting formula:
[0065] ;
[0066] ;
[0067] ;
[0068] ;
[0069] ;
[0070] Multiply these weights by the original concentration differences and sum them to obtain the molecule: ;
[0071] The total weights are: ;
[0072] The final smoothed value is: .
[0073] This value is the smoothed concentration difference for the third line segment. Repeating the above steps will smooth the concentration differences at all locations, constructing a complete concentration change trend sequence. This sequence will be used in subsequent stages to identify abrupt slope changes and spatial variation patterns.
[0074] To smooth the concentration difference sequence of each navigation segment in the water boundary area and obtain a continuous curve reflecting the trend of total phosphorus concentration change, the first calculation formula represents the smoothed concentration difference obtained by weighted averaging of the concentration differences of multiple neighboring segments in the original concentration sequence for each segment. This is used to weaken the interference of local fluctuations on the overall trend judgment. The second calculation formula is used to calculate the weight value of each neighboring segment to the target segment. The larger the value, the stronger the influence of the neighboring point on the smoothing result. The weight value is determined by the distance from the target point and the attenuation factor. The closer the point is, the higher the weight, and the farther the point is, the weaker the influence is. In the entire calculation process, firstly, the smoothing bandwidth is set, that is, how many points are taken to the left and right of each point for calculation. Then, the attenuation factor is set to control the strength of the influence between near and far points. Then, the smoothed concentration difference value of each segment is calculated one by one to obtain a smoothed concentration difference change sequence.
[0075] S213: Extract the direction change segment of the slope of the smooth trend sequence of concentration change, determine the concentration change pattern based on the slope reversal position and the concentrated change interval, identify the coordinate line segment where abrupt change occurs in the continuous trend, and generate a set of abrupt change candidate regions.
[0076] After obtaining the smoothed concentration change trend sequence, it is necessary to further extract the slope information reflecting the rate of change in the sequence and perform directional analysis on the slope values to identify the turning points of the trend. Specifically, the slope is calculated for each pair of adjacent concentration difference points. For example, if the smoothed concentration difference from the second to the third line segment is 0.036 and 0.038 respectively, the slope can be expressed as 0.038 minus 0.036, resulting in 0.002. This difference calculation is performed point by point along the entire sequence to form a continuous set of slope values. These slope values are then analyzed to find the points where the trend reverses from positive to negative or vice versa. If a certain segment has multiple consecutive positive slope values that gradually increase, and then suddenly becomes negative with an increase in the absolute value of the slope, it can be considered that there is a sign of a mutation. The position number of the position is marked in the concentration trend sequence. Then, the coordinate line segment information corresponding to the number is traced back, the start and end coordinates of the line segment are recorded, and the line segment is included in the mutation candidate region set. All line segments that meet the characteristics of trend reversal and sudden increase in slope are extracted in sequence and summarized to form a set of mutation candidate regions.
[0077] Please see Figure 4 The specific steps for obtaining the attribution correction dataset are as follows:
[0078] S311: Based on each coordinate line segment in the candidate mutation region set, extract the direction angle information of each coordinate line segment, construct the boundary projection space downward according to the direction angle, and mark the corresponding projection range index to generate the boundary projection space structure information.
[0079] For each coordinate line segment in the mutation candidate region set, its orientation angle must first be calculated. This orientation angle is obtained based on the spatial difference between the starting and ending coordinates of the line segment. The specific process is as follows: First, calculate the difference in longitude, which can be expressed by the formula: Ending longitude - Starting longitude = Longitude difference. For example, if the ending longitude is 120.4587 and the starting longitude is 120.4567, the longitude difference is 0.4587 - 0.4567 = 0.0020. Then, calculate the difference in latitude, i.e., Ending latitude - Starting latitude = Latitude difference. For example, if the ending latitude is 31.2358 and the starting latitude is 31.2348, the latitude difference is 0.0010. Then, use these two differences to calculate the orientation angle, which is the angle formed by the lateral difference and the longitudinal difference. It can be calculated using the arctangent function. An example angle is arctangent (0.0020 ÷ 0.0010) ≈ 63.4 degrees. After determining the orientation angle, the normal orientation angle is calculated by adding 90° to the orientation angle, for example, 63.4 + 90 = 153.4 degrees. A symmetrical projection zone is constructed using this direction as an axis. Assuming a projection width of 10 meters, extending 5 meters to each side, it is divided into 10 segments along the 153.4-degree direction, each segment being 1 meter wide and numbered from 1 to 10. These numbers form the index structure of the boundary projection space, used to indicate the distribution of subsequent projection points within the spatial zone. The orientation angles, normal angles, and projection numbering structures of all segments are combined to form complete boundary projection space structure information.
[0080] S312: Based on the boundary projection spatial structure information, obtain the projection position of the coordinate point corresponding to each abrupt change region in the boundary projection space, count the distribution on both sides of the boundary line corresponding to the projection position, extract the number of coordinates and spatial clustering range on each side, and obtain the boundary projection distribution data.
[0081] Based on the boundary projection space structure, the coordinates of points near the abrupt change line segment are projected into the constructed normal space. In practice, the projection center (the midpoint of the line segment) must first be determined. Then, the projection distance from each point to this center is calculated using the normal direction as the axis. For example, if a coordinate point is 2.4 meters from the central axis, and each meter is assigned a number segment, then this point belongs to segment 3. The same mapping calculation is performed on all projected points. Subsequently, the distribution of these points on both sides of the boundary is statistically analyzed based on their numbers. For example, numbers 1 to 5 represent the left side region, and numbers 6 to 10 represent the right side region. If numbers 1 to 5 contain 22 points, and numbers 6 to 10 contain 39 points, then the number of points on both sides can be expressed by the formula: right side number - left side number = difference, i.e., 39 - 22 = 17. When calculating density, the average density is calculated as: number of points ÷ width. For example, the average density is 22 ÷ 5 = 4.4 on the left and 39 ÷ 5 = 7.8 on the right, with the unit being points per meter. Additionally, the maximum clustering distance on each side needs to be calculated. For instance, the straight-line distance between the two farthest points on a certain side is 4 meters on the right and 9 meters on the left. This can be calculated using the formula: farthest point coordinate distance = end point position - start point position, for example, 9.0 - 0 = 9.0 meters. Finally, the number of points, average density, and clustering width on each side are obtained, forming the boundary projection distribution data.
[0082] S313: Based on the boundary projection distribution data, compare the distribution density and aggregation direction of each mutation region on both sides of the boundary, determine the boundary side region to which it should belong based on the density value and distribution trend, update the region label of the mutation region according to the initial classification information, and generate the classification correction dataset.
[0083] After obtaining the projected distribution data on both sides of the boundary, it is necessary to re-determine the region to which each abrupt change segment belongs by comparing the density values and clustering degree on both sides. The density comparison is expressed by the formula: number of points on each side ÷ region width = density on that side. For example, the density on the left is 22 ÷ 5 = 4.4, and on the right is 39 ÷ 5 = 7.8. Then, the density difference is calculated as: right-side density - left-side density = 7.8 - 4.4 = 3.4. If the difference is positive and exceeds a preset threshold, the right side is considered denser. Furthermore, clustering distance is used for supplementary analysis. For example, if the clustering width on the right is 4 meters and on the left is 9 meters, the difference is 9 - 4 = 5 meters, indicating a higher degree of clustering on the right. Combining density and clustering direction, the boundary to which the abrupt change segment should belong is determined. If the determined belonging differs from the original label, the belonging label is updated. For example, if the original belonging was to the left but the analysis indicates it belongs to the right, the label is corrected to the right. This judgment and update process is performed for each abrupt change segment, forming a corrected belonging dataset.
[0084] Please see Figure 5 The specific steps for obtaining inflection point behavioral characteristics are as follows:
[0085] S411: According to the attribution region in the attribution correction dataset, classify and sort the corresponding total phosphorus observation points in each water body, reconstruct the concentration change response curve of each water body, identify the change path index used for trend extraction, and generate the water body concentration change response curve.
[0086] Based on the clearly defined regional attribution labels of each observation point in the attribution-corrected dataset, the total phosphorus water quality observation points are classified and sorted. First, all observation points in the dataset are assigned to two independent temporary datasets based on the labels "Southern Water Area" and "Northern Water Area." For example, all 35 observation points labeled "Southern Water Area" are extracted into the Southern Water Area dataset. Specifically, the attribution-corrected dataset is traversed, and the "Regional Label" field of each record is read. If the value of this field is "Southern Water Area," the "Observation Point Number," "GPS Coordinates," and "Total Phosphorus Observation Value" of that record are copied completely to the Southern Water Area dataset. After processing all dataset records, the observation points within each independent regional dataset are sorted. The sorting criterion is the timestamp recorded during the original survey observations, and the observation points are sorted according to their earliest timestamps. The data is arranged in chronological order. For example, in the dataset for the southern water area, the timestamp of observation point P101 is 10:15:00, and the timestamp of P105 is 10:16:00. Therefore, P101 is placed before P105. After sorting, the observation points for each water area form an ordered sequence. Based on this ordered sequence, the concentration change response curve for that water area is reconstructed. Specifically, the sorted observation point number is used as the horizontal axis, and the corresponding total phosphorus concentration is used as the vertical axis. These coordinate points are connected sequentially to form a line graph, which is the concentration change response curve. For example, the total phosphorus concentration values of the first 5 sorted observation points in the southern water area are 0.052 mg / L, 0.055 mg / L, 0.059 mg / L, 0.056 mg / L, and 0.053 mg / L, respectively. Then, the points (1, ..., ...) are plotted sequentially on the graph. (0,052), (2, 0,055), (3, 0,059), (4, 0,056), (5, 0,053) are concatenated. Then, a change path index is generated for each reconstructed response curve. This index is a set of consecutive integer numbers that correspond one-to-one with the sorted observation points. For example, for the 35 observation points in the southern water area, the change path index is an integer sequence from 1 to 35. This index is then associated with the observation point number and the total phosphorus concentration value and stored to generate the water concentration change response curve.
[0087] S412: Obtain the direction and slope trend of concentration change at continuous coordinate points in the water concentration change response curve, identify the position where the slope of concentration change reverses, extract the target reversal point as the inflection point of total phosphorus change, and mark the corresponding curve position and the slope direction before and after, and generate the inflection point position marker of total phosphorus change.
[0088] Based on the generated water concentration change response curve, the direction and slope of concentration change between continuous coordinate points are extracted. First, the concentration difference between two adjacent observation points is calculated to determine the direction of concentration change. For example, for the second observation point (concentration 0.055 mg / L) and the first observation point (concentration 0.052 mg / L) on the south side water concentration change response curve, the concentration difference is 0.055 - 0.052 = +0.003 mg / L. This positive value indicates an upward trend in concentration change. Conversely, the concentration difference between the fourth observation point (0.056 mg / L) and the third observation point (0.059 mg / L) is 0.056 - 0.059 = -0.003 mg / L, this negative value indicates a decreasing concentration change. These point-by-point concentration differences are serialized to form the basic data for the slope trend. Then, the locations where the sign reverses in the slope trend are identified. A location is determined to be a slope reversal point if the signs of two consecutive concentration differences are opposite. For example, at the 3rd observation point, the concentration difference with the previous point (point 2) is +0.004 mg / L, and the concentration difference with the next point (point 4) is -0.003 mg / L. The concentration difference changes from positive to negative, so the 3rd observation point is identified as a potential reversal point. To ensure the validity of the extracted reversal points, a slope change validity judgment threshold is set. This threshold is set to 0.0025 mg / L, based on a statistical analysis of the concentration differences of 1000 sets of continuous observation data during historical hydrological stability periods, which found that 95% of adjacent concentration differences were absolutely negative. Since the value is below 0.0025 mg / L, this value is used as the boundary to distinguish between normal fluctuations and trend changes. For a potential reversal point to be confirmed as an inflection point in total phosphorus change, the absolute value of the two concentration differences before and after it must be greater than 0.0025 mg / L. In the example above, the absolute values of the concentration differences before and after the third observation point are 0.004 mg / L and 0.003 mg / L, respectively, both of which are greater than 0.0025 mg / L. Therefore, the third observation point is confirmed as a valid inflection point in total phosphorus change. All target reversal points that meet this condition are extracted, and each inflection point is labeled with information including the position index of the inflection point in the response curve (e.g., 3), its specific total phosphorus concentration value (0.059 mg / L), and the slope direction before and after it ("positive to negative"). Finally, the labeled inflection point information of all water areas is integrated to generate the inflection point location marker of total phosphorus change.
[0089] S413: Based on the inflection point markers of total phosphorus changes, extract the coordinate position, direction of change and connection trend of each inflection point, construct a sequence state set according to the concentration fluctuation state before and after the inflection point, use a conditional random field model to model the spatial state of the inflection point sequence, predict the future trend direction, position offset and continuous change pattern of each inflection point, and generate inflection point behavior features.
[0090] Based on the inflection point markers of total phosphorus changes, the coordinates, direction of change, and connection trends of each inflection point are extracted, and a sequence state set is constructed. Specifically, a threshold is set based on the concentration difference distribution statistics in historical data. For example, an absolute value of concentration difference greater than 0.005 mg / L is defined as "violent fluctuation". This threshold is the lower limit of the absolute value of concentration difference in the top 10% of historical data. The concentration fluctuation state before and after each inflection point is combined with the inflection point type, such as "peak point", into a state description, such as forming a state record of "stable fluctuation - peak point - violent fluctuation". Then, the inflection point sequence is modeled. By calculating the transition frequency between each state in the historical sequence, the future trend is predicted. Specifically, the highest frequency item for the transition from the current state to the subsequent state is found, and the future trend direction is determined by this item. Based on the average position index interval of this transition pattern in historical data, for example, if the average interval is 5.2 points, the predicted position offset is 5 observation points. Then, the predicted subsequent state is taken as a continuous change pattern, and all prediction results are integrated to generate inflection point behavior features.
[0091] Please see Figure 6 The specific steps for obtaining the total phosphorus evolution trend analysis results are as follows:
[0092] S511: Extract the behavioral features of inflection points, and classify the direction vector and spatial offset distance of each inflection point into the corresponding region according to the water area to generate integrated data of trend direction and position offset.
[0093] Based on the trend direction and spatial offset information of each inflection point in the inflection point behavior feature dataset, it is necessary to further classify and organize them into their respective water areas. The operation process is as follows: read the belonging area label in each inflection point record, and then map its direction vector to the corresponding spatial offset distance to classify it into that area. For example, if an inflection point belongs to the southern water area, its direction vector is northeast, and its offset distance is 3.2 meters, then in the southern area, the direction of this inflection point is recorded as northeast, and the offset is 3.2 meters. Continue to read the information of other inflection points, and so on, incorporating the direction and offset distance of all inflection points into the spatial dataset of their respective water areas. After classification, each water area will form an integrated data structure of trend direction and spatial offset, containing the direction description information of each inflection point (such as "east-northeast", "southwest", etc.) and the actual offset value, such as an offset of 4.1 meters to the south, an offset of 1.5 meters to the north, etc. This direction information is uniformly labeled with a standard orientation naming method, and the offset data is retained to one decimal place. All datasets are used to further describe the trend evolution characteristics within the area.
[0094] S512: Based on trend direction and location offset integrated data, summarize the inflection point sequence number, change time sequence and trend attribution label corresponding to the continuous change pattern field in each water area, and output the total phosphorus evolution trend analysis results to describe the dynamic migration characteristics of total phosphorus between regions.
[0095] After obtaining the trend direction and offset data for each water area, it is necessary to identify and classify the inflection points exhibiting continuous change patterns. The method involves traversing the inflection point list for each water area, analyzing inflection point segments with consistent trend labels. For example, if three consecutive inflection points have the trend labels "rising" or "weakening offset," this is considered a continuous trend segment, and the index of these inflection points is recorded, such as 24, 25, and 26. The corresponding change time points are also recorded; these time points can be obtained from the timestamp field in the survey data. For example, if the time for inflection point 24 is 10:05, 25 is 10:06, and 26 is 10:07, this forms a continuous change time sequence. Combined with the trend label, such as "increasing rise," the trend of this segment is classified as rising. The same processing is performed on each continuous trend segment, ultimately forming a summary dataset containing the inflection point sequence number, change time sequence, trend direction, and classification label for each water area. For example, the eastern water area contains three consecutive rising trend segments, and the western water area contains two weakening offset segments. All the summarized results are used to represent the trend migration path between water areas. For example, from the east to the south, the inflection point of high concentration value is observed to shift southward. Combining the shift direction with the trend time relationship, it can be determined that the migration is a southward trend migration, forming the final conclusion of the total phosphorus evolution trend analysis.
[0096] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for analyzing water quality total phosphorus content measurement data using a mobile survey system, characterized in that, Includes the following steps: S1: Obtain the observed total phosphorus content in the water quality and the corresponding GPS coordinates during the specified period of navigation, construct coordinate line segments, calculate the azimuth of each line segment and the difference in total phosphorus content at both ends, and obtain the total phosphorus concentration change data. S2: Extract the total phosphorus concentration change data located in the water boundary line segment area during the navigation process, smooth the change trend according to the corresponding coordinate line segment, identify the abrupt change region of total phosphorus concentration, and construct a set of abrupt change candidate regions; S3: Based on each coordinate line segment in the candidate mutation region set, establish the normal boundary projection space of the line segment, determine the distribution of the coordinates of each mutation region in the entire boundary projection space, correct the attribution label of each mutation region, and obtain the attribution correction dataset. S4: Reconstruct the concentration change response curve of each water body according to the attribution labels in the attribution correction dataset, extract the inflection point of total phosphorus change in the curve, analyze the future evolution trend of the inflection point, and obtain the inflection point behavior characteristics. S5: Extract the trend direction, positional shift, and continuous change pattern of the inflection point from the inflection point behavior characteristics to obtain the total phosphorus evolution trend analysis results; The specific steps for obtaining the attribution correction dataset are as follows: S311: Based on each coordinate line segment in the mutation candidate region set, extract the direction angle information of each coordinate line segment, construct the boundary projection space downward according to the direction angle, and mark the corresponding projection range index to generate boundary projection space structure information. S312: Based on the boundary projection space structure information, obtain the projection position of the coordinate point corresponding to each abrupt change region in the boundary projection space, count the distribution on both sides of the boundary line corresponding to the projection position, extract the number of coordinates and spatial aggregation range on each side, and obtain the boundary projection distribution data. S313: Based on the boundary projection distribution data, compare the distribution density and aggregation direction of each mutation region on both sides of the boundary, determine the boundary side region to which it should belong based on the density value and distribution trend, update the region belonging label of the mutation region by comparing with the initial belonging information, and generate a belonging correction dataset.
2. The method for analyzing total phosphorus content in water quality using a mobile surveying system according to claim 1, characterized in that, The specific steps for obtaining the total phosphorus concentration change data are as follows: S111: Obtain the total phosphorus content observation value and corresponding GPS coordinates of the water quality recorded during the specified period of navigation, extract the coordinates of adjacent observation points according to the observation order, construct continuous connected coordinate line segments, and record the start and end point index and coordinates of each coordinate line segment to generate coordinate line segment structure information. S112: Based on the coordinate line segment structure information, extract the latitude and longitude coordinates of the starting and ending points of each coordinate line segment, convert them into planar direction coordinates according to the coordinate difference, calculate the azimuth angle of each coordinate line segment, and pair the azimuth angle with the line segment index to generate coordinate line segment azimuth angle data. S113: Based on the coordinate line segment structure information and the coordinate line segment azimuth data, extract the total phosphorus content observation value of the water quality corresponding to the start and end points of each coordinate line segment, calculate the concentration difference between the two ends of the observation value and record it together with the azimuth angle to generate total phosphorus content concentration change data.
3. The method for analyzing total phosphorus content in water quality using a mobile surveying system according to claim 2, characterized in that, The specific steps for obtaining the mutation candidate region set are as follows: S211: Extract the total phosphorus concentration change data located in the water boundary line area during the navigation process. Based on the coordinate index and spatial coordinates associated in each data point, match the coordinate line segments within the water boundary line area, filter the corresponding concentration change values and azimuth angles, and establish a boundary line concentration dataset. S212: Based on the boundary segment concentration dataset, construct a concentration change trend sequence along the continuous navigation direction, and use a local weighted regression algorithm to smoothly fit the sequence to establish a smooth concentration change trend sequence; S213: Extract the direction change segment of the slope of the concentration change smooth trend sequence, determine the concentration change pattern based on the slope reversal position and the concentrated change interval, identify the coordinate line segment where abrupt changes occur in the continuous trend, and generate a set of abrupt change candidate regions.
4. The method for analyzing total phosphorus content in water quality using a mobile surveying system according to claim 1, characterized in that, The specific steps for obtaining the inflection point behavior features are as follows: S411: According to the attribution labels in the attribution correction dataset, classify and sort the total phosphorus observation points in each water body, reconstruct the concentration change response curve of each water body, identify the change path index used for trend extraction, and generate the water body concentration change response curve. S412: Obtain the concentration change direction and slope trend of continuous coordinate points in the water concentration change response curve, identify the position where the concentration change slope reverses, extract the target reversal point as the inflection point of total phosphorus change, and mark the corresponding curve position and the slope direction before and after, and generate the inflection point position marker of total phosphorus change. S413: Based on the inflection point markers of total phosphorus change, extract the coordinate position, direction of change and connection trend of each inflection point, construct a sequence state set according to the concentration fluctuation state before and after the inflection point, use a conditional random field model to model the spatial state of the inflection point sequence, predict the future trend direction, position offset and continuous change pattern of each inflection point, and generate inflection point behavior features.
5. The method for analyzing total phosphorus content in water quality using a mobile surveying system according to claim 4, characterized in that, The specific steps for obtaining the total phosphorus evolution trend analysis results are as follows: S511: Extract the inflection point behavior features, and classify the direction vector and spatial offset distance of each inflection point into the corresponding region according to the water area to generate integrated data of trend direction and position offset. S512: Based on the integrated data of trend direction and position offset, summarize the inflection point sequence number, change time sequence and trend attribution label corresponding to the continuous change pattern field in each water area, and output the total phosphorus evolution trend analysis results to describe the dynamic migration characteristics of total phosphorus between regions.
Citation Information
Patent Citations
Underground water source water supply safety assessment method and system
CN120279401A
Dynamic water quality monitoring system based on unmanned ship and data acquisition and distribution algorithm
CN120317559A