An end-cloud cooperation-based precise measurement data processing and analysis method
By using an edge-cloud collaborative approach, the spatial location of measurement data is restored and features are extracted and clustered, which solves the problem of insufficient spatial correlation in precision measurement data and enables efficient multi-view error distribution display and real-time response.
Patent Information
- Application Number
- CN202611223525.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-11-06
AI Technical Summary
Existing technologies struggle to effectively preserve the spatial correlation of measurement data in precision measurement data processing, leading to inconsistent error distribution results, high computational resource consumption, and difficulty in meeting the dynamic observation needs of operators.
By using edge-cloud collaboration, the spatial location of the measured values is restored. A decision tree ensemble algorithm with spatial neighborhood error gradient as a splitting constraint is used to extract multidimensional features, perform spatial partitioning and clustering and multi-level aggregation, generate a pre-calculated result matrix, and dynamically extract or recalculate data according to the observation perspective to generate a three-dimensional error distribution chromatogram.
It improves the ability to express spatial error characteristics of precision measurement data, reduces cloud computing load and query response time, and enables real-time output and accurate error distribution display from multiple perspectives.
Smart Images

Figure CN123049172A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of precision measurement, data analysis, and cloud computing technologies, specifically to a precision measurement data processing and analysis method based on edge-cloud collaboration. Background Technology
[0002] Precision measurement data analysis is widely used in high-end manufacturing, aerospace, and precision instruments to analyze dimensional deviations, form and position errors, and quality fluctuations of the measured object. As measurement accuracy and density continue to improve, the amount of data generated in a single measurement process continues to increase, and the measurement results are usually related to the spatial position of the measured object, the measurement trajectory, and local structural features. Therefore, statistical analysis based solely on discrete measurement values is insufficient to fully reflect the distribution and variation of errors in different spatial regions of the measured object.
[0003] In existing technologies, measuring devices typically upload collected measurement values to remote servers or the cloud for centralized processing to reduce the data processing burden on the measuring devices themselves. However, during the data upload process, some data processing methods focus primarily on the measurement values themselves, neglecting to utilize the spatial relationships between different measurement values and the correlation of measurement trajectories. When the amount of measurement data is large and the distribution of measuring points is complex, the correlation between spatially adjacent measurement data is often insufficient in subsequent analysis, affecting the accurate representation of local error changes and the overall error distribution. For large amounts of precise measurement data aggregated in the cloud, existing analysis methods usually require feature extraction, classification, or aggregation of the measurement data. However, errors in precise measurement data often exhibit significant spatial continuity and local variation characteristics, and different spatial regions may also have different error variation trends. If data is divided solely based on the size of the measurement values or general statistical characteristics, data with different spatial error variation patterns may be mixed or data with similar error distribution patterns may be fragmented, thereby increasing the amount of data and computational complexity in subsequent analysis and affecting the stability of the error distribution results. Furthermore, to provide operators with multi-dimensional measurement results, the cloud typically needs to generate corresponding analysis results based on different analysis conditions such as product object, measurement area, time range, batch, and observation direction. When the control terminal changes the observation perspective or filtering conditions, existing methods often require data extraction, aggregation, and calculation from a large amount of measurement data again. Especially when the measurement data is large, the analysis levels are numerous, and query operations are frequent, the same or similar analysis content may be repeatedly calculated, resulting in high consumption of cloud computing resources and increased feedback time for analysis results.
[0004] Meanwhile, in actual quality inspection processes, operators' observation needs are often dynamic. For example, operators may continuously switch between overall error distribution, local area error, and error trends across different batches or time ranges. Existing technologies struggle to simultaneously accommodate pre-generated analytical results and the observation needs of temporary changes. When observation conditions differ from existing analytical results, it is usually necessary to reprocess a large range of data. Conversely, directly using existing results for display may fail to meet the analytical accuracy requirements under specific perspectives or filtering conditions, creating a contradiction between analytical depth and interactive response speed. On the other hand, when filtered discrete measurement data is directly used for 3D error visualization from different observation perspectives, uneven spatial distribution of measurement points, differences in local measurement density, and insufficient spatial correlation may cause local abrupt changes, discontinuities, or distortions in the error distribution map. As the observation perspective changes, this problem may further affect the consistency of error distribution results under different perspectives, making it difficult for operators to timely and accurately judge the local error status and overall quality change trend of the measured object. Summary of the Invention
[0005] The purpose of this invention is to provide a precision measurement data processing and analysis method based on edge-cloud collaboration, thereby solving the problems existing in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a precision measurement data processing and analysis method based on edge-cloud collaboration, comprising: S1, acquiring the original measurement values uploaded to the cloud by the edge device, recovering the spatial position corresponding to each original measurement value according to the edge measurement trajectory, and constructing a cloud data set containing multi-dimensional spatial coordinates in the cloud; S2, extracting multi-dimensional feature vectors from the cloud data set using a decision tree ensemble algorithm with spatial neighborhood error gradient as a splitting constraint, to obtain a feature set; S3, spatially partitioning the feature set using a spatial partitioning clustering algorithm to obtain multiple data clusters with error distribution characteristics; S4, performing multi-level aggregation operations on the multiple data clusters according to a preset analysis dimension to determine a pre-calculated result matrix; S5, receiving the pre-calculated result matrix sent to the cloud by the control terminal. The query command includes the target observation perspective and filtering conditions; S6. If the target observation perspective in the query command completely matches the analysis dimension corresponding to the pre-calculated result matrix, the target matrix block is located according to the aggregation level corresponding to the target observation perspective, and the first data subset is extracted from the pre-calculated result matrix; S7. If the target observation perspective in the query command does not completely match the analysis dimension corresponding to the pre-calculated result matrix, multiple data clusters are re-extracted and recalculated to obtain the first data subset; S8. The first data subset is subjected to multi-dimensional filtering processing according to the filtering conditions in the query command to obtain the second data subset; S9. The spatial neighborhood error field is reconstructed using the second data subset according to the target observation perspective, a three-dimensional error distribution chromatogram is generated, and the three-dimensional error distribution chromatogram is sent to the control terminal to realize real-time output of multiple perspectives.
[0007] Preferably, step S1 includes acquiring the original measurement values and the measurement trajectory uploaded by the end-side device; obtaining an interpolation fitting function based on the end-side measurement trajectory to determine the initial spatial position corresponding to the original measurement values; if the offset of the initial spatial position is greater than a preset offset threshold, then correcting to obtain the target spatial position; converting the original measurement values based on the target spatial position to obtain calibrated measurement values; generating multidimensional spatial coordinates based on the calibrated measurement values and the target spatial position, and constructing a cloud data set containing multidimensional spatial coordinates in the cloud through the multidimensional spatial coordinates.
[0008] Preferably, step S2 includes acquiring a cloud-based data set, calculating the prediction residuals based on the cloud-based data set to obtain an initial residual sequence, calculating the residual change rate based on the initial residual sequence to obtain a spatial neighborhood error gradient, determining whether the spatial neighborhood error gradient is greater than a preset threshold, and if the spatial neighborhood error gradient is greater than the preset threshold, determining a splitting constraint condition, performing node partitioning on the decision tree based on the splitting constraint condition to obtain a decision tree ensemble algorithm, and traversing the input samples according to the decision tree ensemble algorithm to extract multi-dimensional feature vectors and obtain a feature set.
[0009] Preferably, step S3 includes obtaining a feature set, constructing a distance matrix based on the feature set, obtaining a core object set if the distance matrix satisfies a density threshold, determining the core object set using a spatial partitioning clustering algorithm to obtain connected regions, performing boundary attribution determination on the connected regions to obtain initial data clusters, extracting error distribution features based on the initial data clusters, and marking them using the error distribution features to obtain multiple data clusters with error distribution features.
[0010] Preferably, step S4 includes dividing multiple data clusters to obtain a multi-dimensional hierarchical node set; constructing an aggregation path network for the multi-dimensional hierarchical node set; assigning weights to the aggregation path network to determine the target aggregation path; if the target aggregation path meets the conditions, performing operations on multiple data clusters along the target aggregation path to obtain a multi-dimensional summary value; generating row and column indexes based on the multi-dimensional summary value; and constructing a pre-calculated result matrix using the row and column indexes.
[0011] Preferably, step S5 includes receiving a query instruction, which includes a target observation viewpoint and filtering conditions; obtaining a viewpoint parse tree based on the target observation viewpoint; reorganizing the filtering conditions using the viewpoint parse tree to obtain a conditional predicate; extracting a data block index if the conditional predicate matches a pre-calculated result matrix; reading data fragments based on the data block index to construct a matching mapping table; assembling data fragments using the matching mapping table to obtain a query response set; and receiving the query instruction containing the target observation viewpoint and filtering conditions sent from the control terminal to the cloud for the pre-calculated result matrix.
[0012] Preferably, step S6 includes obtaining a query instruction, extracting the target observation perspective and aggregation level from the query instruction, wherein the target observation perspective is used to compare the analysis dimensions of the pre-calculated result matrix to obtain a matching status; if the matching status is a complete match, then determining the target block index according to the aggregation level; addressing and locating the target block in the pre-calculated result matrix according to the target block index to obtain the target matrix block corresponding to the target block index; reading data from the target matrix block and extracting a first data subset from the pre-calculated result matrix.
[0013] Preferably, step S7 includes obtaining a query command to extract the target observation perspective, comparing the target observation perspective with the analysis dimensions of the pre-calculated result matrix to obtain a matching status; if the matching status is not completely matched, extracting difference features to obtain dimension difference identifiers; determining multiple data clusters in the pre-calculated result matrix based on the dimension difference identifiers, re-extracting the underlying detailed data for the multiple data clusters to obtain a basic detailed dataset; and recalculating the basic detailed dataset according to the target observation perspective to obtain a first data subset.
[0014] Preferably, step S8 includes obtaining a first data subset and a query instruction; parsing the query instruction to extract multi-dimensional filtering conditions; constructing multi-dimensional filtering rules based on the filtering conditions; performing attribute mapping between the multi-dimensional filtering rules and the first data subset to determine the target data slice range; performing multi-dimensional filtering processing within the target data slice range to calculate the matching metric value for each detailed data item; and if the matching metric value reaches a preset threshold, extracting the corresponding detailed data and summarizing it to obtain a second data subset.
[0015] Preferably, step S9 includes acquiring a second data subset and a target viewing angle; processing the second data subset according to the target viewing angle to obtain viewing angle alignment data; calculating a spatial neighborhood error field based on the viewing angle alignment data; determining three-dimensional error distribution data for the spatial neighborhood error field; generating a three-dimensional error distribution chromatogram using the three-dimensional error distribution data; and sending the three-dimensional error distribution chromatogram to the control terminal if the rendering frame rate of the three-dimensional error distribution chromatogram is greater than a preset frame rate threshold, thereby achieving real-time output from multiple perspectives.
[0016] As can be seen from the above technical solution, the present invention has the following beneficial effects: This precision measurement data processing and analysis method based on edge-cloud collaboration recovers the spatial location corresponding to the original measurement values by combining the measurement trajectory at the edge, enabling the measurement data uploaded to the cloud to retain the spatial correlation during the measurement process. It extracts multi-dimensional features reflecting local error changes using a decision tree ensemble algorithm with spatial neighborhood error gradients as splitting constraints. Furthermore, it utilizes spatial partitioning and clustering to form data clusters with error distribution characteristics, thereby improving the expressive power of spatial error features in precision measurement data. Based on this, multiple data clusters are aggregated at multiple levels according to preset analysis dimensions to form a pre-calculated result matrix. When the control terminal changes the target observation perspective, the analysis is performed based on the correspondence between the target observation perspective and the pre-calculated result matrix. Based on dimensional matching, data can be directly extracted from the target matrix block at the corresponding aggregation level or the data cluster can be re-extracted and recalculated. This reduces the repetitive processing of large-scale raw measurement data under the same or similar analysis conditions, and reduces cloud computing load and query response time while taking into account different observation needs. Furthermore, target data is filtered according to filtering conditions, and a three-dimensional error distribution chromatogram is generated by reconstructing the spatial neighborhood error field according to the target observation perspective. This can enhance the spatial continuity and expression consistency of error distribution under different observation perspectives, realize the multi-view real-time output of precision measurement results, thereby improving the collaborative processing efficiency between end-side measurement data and cloud analysis resources, as well as the ability of precision measurement data analysis to support on-site quality judgment. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method of the present invention; Figure 2This is a flowchart illustrating the data processing to pre-calculated matrix generation process of this invention. Figure 3 This is a comparison chart showing the impact of the trajectory thinning ratio of the present invention on the spatial position recovery error; Figure 4 This is a comparison chart of query response times under different data scales according to the present invention; Figure 5 This is a bar chart showing the impact of the spatial neighborhood error gradient constraint on the feature representation effect of the present invention. Figure 6 This is a line graph showing the effect of the grid density of this invention on the chromatogram generation delay and rendering frame rate. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.
[0019] Example 1:
[0020] like Figure 1 and Figure 6 As shown, the present invention provides a technical solution: a method for precision measurement data processing and analysis based on edge-cloud collaboration, comprising: S1. Obtain the original measurement values uploaded to the cloud by the end device, restore the spatial position corresponding to each original measurement value according to the end measurement trajectory, and build a cloud data set containing multi-dimensional spatial coordinates in the cloud. S2. Based on the cloud dataset, a decision tree ensemble algorithm with spatial neighborhood error gradient as the splitting constraint is used to extract multidimensional feature vectors and obtain a feature set. S3. By using a spatial partitioning clustering algorithm to spatially partition the feature set, multiple data clusters with error distribution characteristics are obtained; S4. Perform multi-level aggregation operations on multiple data clusters according to preset analysis dimensions to determine the pre-calculated result matrix; S5. Receive the query command sent from the control terminal to the cloud, which includes the target observation angle and filtering conditions, in response to the pre-calculated result matrix. S6. If the target observation perspective in the query command completely matches the analysis dimension corresponding to the pre-calculated result matrix, then locate the target matrix block according to the aggregation level corresponding to the target observation perspective, and extract the first data subset from the pre-calculated result matrix. S7. If the target observation perspective in the query command does not completely match the analysis dimension corresponding to the pre-calculated result matrix, then multiple data clusters are re-extracted and recalculated to obtain the first data subset. S8. Perform multi-dimensional filtering on the first data subset according to the filtering conditions in the query instruction to obtain the second data subset; S9. Using the second data subset, the spatial neighborhood error field is reconstructed according to the target observation perspective, a three-dimensional error distribution chromatogram is generated, and the three-dimensional error distribution chromatogram is sent to the control terminal to realize real-time output from multiple perspectives.
[0021] In this embodiment, when the end-side device performs a precision measurement task, it simultaneously records the original measurement values and the end-side measurement trajectory.
[0022] Among them, the original measurement values are used to characterize the measurement results obtained by the measured object at the corresponding measurement position, and the end-side measurement trajectory is used to characterize the spatial position changes of the measurement probe, measurement actuator or the measured object during continuous sampling. After the end-side device completes the current measurement task, it uploads the original measurement values, the end-side measurement trajectory and the corresponding sampling time information to the cloud.
[0023] Furthermore, after receiving the original measurement values and the end-side measurement trajectory, the cloud first establishes the correspondence between the original measurement values and the trajectory positions according to the sampling time.
[0024] In cases where the sampling time of the original measurement value coincides with the recording time of a certain trajectory node, the three-dimensional spatial coordinates of that trajectory node are directly determined as the spatial position of the corresponding original measurement value. In cases where the sampling time of the original measurement value is between the recording times of two adjacent trajectory nodes, the time interval between the sampling time and the recording time of the previous trajectory node is first determined, and then the total time interval between the recording times of the two adjacent trajectory nodes is determined. The two time intervals are divided to obtain the position interpolation ratio. Subsequently, the coordinate differences of the two adjacent trajectory nodes in the three spatial coordinate directions are calculated respectively. Each coordinate difference is multiplied by the position interpolation ratio, and the results are superimposed on the three spatial coordinates corresponding to the previous trajectory node to obtain the three-dimensional spatial coordinates corresponding to the original measurement value.
[0025] Furthermore, the cloud sequentially restores the spatial position of all original measurement values and binds each original measurement value to its corresponding three-dimensional spatial coordinates.
[0026] Specifically, each cloud data record includes at least the first spatial coordinate, the second spatial coordinate, the third spatial coordinate, and the corresponding original measurement value; the cloud stores all data records corresponding to the current measurement task according to a unified data structure, thereby forming a cloud data set containing multi-dimensional spatial coordinates.
[0027] Furthermore, after the cloud-based data set is constructed, spatial neighborhood relationships are established based on the three-dimensional spatial coordinates corresponding to each data record.
[0028] Specifically, for the current data record, the three-dimensional spatial distance between the current data record and the other data records is calculated. The calculation process of the three-dimensional spatial distance is as follows: determine the coordinate difference between the two data records in the three spatial coordinate directions, perform a square operation on the three coordinate differences respectively, add the three square results together, and then perform a square root operation on the sum, thereby obtaining the spatial distance between the two data records.
[0029] In this embodiment, the cloud determines the spatial neighborhood of the current data record according to the pre-configured spatial neighborhood rules.
[0030] When using the neighborhood radius method, all data records whose spatial distance does not exceed the preset neighborhood radius are assigned to the spatial neighborhood corresponding to the current data record. When using the fixed adjacency number method, the remaining data records are sorted in order from the minimum to the maximum spatial distance, and the corresponding data records are selected sequentially from the starting position of the sorting result according to the preset adjacency number. The selected data records are assigned to the spatial neighborhood corresponding to the current data record. The preset neighborhood radius or preset adjacency number is written into the cloud parameter configuration information when the current measurement task is established.
[0031] Furthermore, after establishing the spatial neighborhood of the current data record, the local reference measurement value corresponding to the data record is calculated.
[0032] Specifically, the original measurement values of all data records in its spatial neighborhood are read, the read original measurement values are added together, and the sum is divided by the total number of data records in the spatial neighborhood to obtain the local reference measurement value corresponding to the current data record; then, the local reference measurement value is subtracted from the original measurement value of the current data record to obtain the local error corresponding to the current data record.
[0033] Furthermore, the cloud obtains the local error corresponding to each data record in the spatial neighborhood in the same way, and calculates the spatial neighborhood error gradient based on the local error and spatial distance.
[0034] Specifically, for the current data record and any adjacent data record in the spatial neighborhood, the absolute value of the difference between their local errors is first calculated, and then the absolute value is divided by the spatial distance between them to obtain the unit spatial distance error change value of the current data record relative to the adjacent data record. The above calculation is repeated for each adjacent data record in the spatial neighborhood, and all the obtained unit spatial distance error change values are added together and then divided by the number of adjacent data records involved in the calculation. The result is used as the spatial neighborhood error gradient corresponding to the current data record.
[0035] Through this process, each data record obtains a corresponding spatial neighborhood error gradient value, which is used to characterize the degree to which the error around the corresponding measurement location changes with spatial location.
[0036] Furthermore, after calculating the spatial neighborhood error gradient of all data records in the cloud dataset, the spatial neighborhood error gradient is used as a splitting constraint in the decision tree node splitting process.
[0037] Specifically, when constructing a decision tree, the cloud sequentially selects candidate features within the current node to be split and generates candidate split thresholds according to the data values corresponding to the candidate features. For each candidate split threshold, the data records in the current node are divided into two candidate child nodes. One candidate child node stores data records whose corresponding feature values satisfy the first split condition, and the other candidate child node stores data records that do not satisfy the first split condition.
[0038] In addition, for each candidate splitting method, the discreteness of the error gradient of the node before splitting and the internal spatial neighborhood of the two candidate child nodes is calculated.
[0039] Specifically, for a given node, the spatial neighborhood error gradients of all data records within that node are first summed and divided by the number of data records in that node to obtain the average spatial neighborhood error gradient of that node. Subsequently, the difference between the spatial neighborhood error gradient of each data record and the average spatial neighborhood error gradient is calculated, and each difference is squared. All the squared results are summed and then divided by the number of data records in that node to obtain the discrete value of the spatial neighborhood error gradient corresponding to that node.
[0040] Furthermore, after obtaining the discrete values of the spatial neighborhood error gradients corresponding to the two candidate child nodes, the proportion of the number of data records contained in the two candidate child nodes to the total number of data records after splitting is calculated. Each proportion is multiplied by the discrete value of the spatial neighborhood error gradient of the corresponding candidate child node, and the two products are added together to obtain the discrete value of the gradient after splitting corresponding to the candidate splitting method.
[0041] Subsequently, the discrete value of the spatial neighborhood error gradient of the node before splitting is subtracted from the discrete value of the gradient after splitting to obtain the spatial neighborhood error gradient splitting result corresponding to the candidate splitting method.
[0042] As a preferred implementation, the cloud simultaneously calculates the basic splitting result corresponding to each candidate splitting method; the basic splitting result is obtained according to the node purity evaluation rule adopted by the decision tree.
[0043] Subsequently, the basic splitting results are weighted according to preset basic weights, and the spatial neighborhood error gradient splitting results are weighted according to preset gradient weights. The two weighted results are then added together to obtain the comprehensive splitting evaluation result of the corresponding candidate splitting method. After the cloud completes the evaluation of all candidate splitting methods for the current node, the comprehensive splitting evaluation results are sorted, and the candidate splitting method ranked first is selected as the execution splitting method for the current node.
[0044] Furthermore, the decision tree is continuously constructed according to the above node splitting process until the preset stopping condition is met.
[0045] Specifically, the preset stopping conditions include the number of node data records reaching a preset minimum node data volume, the decision tree level reaching a preset maximum level, or the current node not having a candidate splitting method that satisfies the preset splitting conditions; the cloud repeatedly executes the decision tree construction process according to the preset number of decision trees to form a decision tree integrated model composed of the preset number of decision trees.
[0046] Furthermore, each data record in the cloud dataset is sequentially input into the decision tree ensemble model.
[0047] Specifically, for a given data record, the node splitting path it traverses in each decision tree, the final leaf node it enters, and the corresponding spatial neighborhood error gradient are recorded. The above information is then converted into continuously arranged feature data according to a preset feature encoding order. Each feature data is combined according to a unified dimension to form a multidimensional feature vector corresponding to the data record. After the cloud performs the same processing on all data records, all multidimensional feature vectors are stored according to the index relationship of the corresponding data records to obtain a feature set.
[0048] Furthermore, after obtaining the feature set, the cloud uses a spatial partitioning clustering algorithm to spatially partition the feature set.
[0049] First, read the three spatial coordinates of all data records in the cloud dataset, determine the minimum and maximum coordinate values in the three spatial coordinate directions, and determine the three-dimensional spatial range corresponding to the current measurement task based on the minimum and maximum coordinate values. Then, divide the spatial boundaries sequentially along the three spatial coordinate directions according to the preset spatial division size, thereby dividing the three-dimensional spatial range into spatial units.
[0050] Furthermore, for each spatial unit, data records whose spatial coordinates are within the range of that spatial unit are read, and the multidimensional feature vector of the corresponding data record is obtained.
[0051] For each feature dimension in the multidimensional feature vector, the values of all data records in the spatial unit on the corresponding feature dimension are added together and divided by the number of data records in the spatial unit to obtain the feature center value corresponding to the feature dimension. After completing the calculation in sequence for all feature dimensions, the feature center corresponding to the spatial unit is formed.
[0052] In addition, for two spatial units with a preset spatial adjacency relationship, the feature distance between their feature centers is calculated.
[0053] Specifically, the numerical differences between the two feature centers along each feature dimension are calculated, each difference is squared, all squared results are summed, and the square root of the sum is then calculated to obtain the feature distance between the two spatial units. This feature distance is compared with a preset clustering threshold. If the feature distance does not exceed the preset clustering threshold, the two spatial units are grouped into the same data cluster; if the feature distance exceeds the preset clustering threshold, the two spatial units are grouped into different data clusters. After processing all spatial units according to a preset spatial adjacency order, data clusters with corresponding spatial ranges and error distribution characteristics are formed.
[0054] Furthermore, after the data clusters are divided, the cloud performs hierarchical aggregation operations on the data clusters according to preset analysis dimensions.
[0055] Specifically, the preset analysis dimensions are written into the analysis configuration table during the current measurement task establishment phase, and each analysis dimension corresponds to a determined aggregation level and aggregation field.
[0056] For example, in the spatial region analysis dimension, the measurement area is divided into corresponding spatial ranges according to the pre-set spatial hierarchy; in the data cluster analysis dimension, corresponding aggregation units are established according to the data cluster identifiers; in the trajectory segment analysis dimension, corresponding aggregation units are established according to the preset segment boundaries corresponding to the end-side measurement trajectory.
[0057] In addition, for each analysis dimension and each aggregation level, the cloud reads the data records belonging to the current aggregation unit and calculates the preset statistical items.
[0058] Specifically, the number of measurement data is obtained by counting each record; the average result of the measurement values is obtained by adding all the measurement values in the current aggregation unit and dividing by the number of data records; the maximum result of the measurement values is obtained by sorting the measurement values from the maximum to the minimum and reading the first data in the sorted order; the minimum result of the measurement values is obtained by sorting the measurement values from the minimum to the maximum and reading the first data in the sorted order; the average result of the errors is obtained by adding all the error values in the current aggregation unit and dividing by the number of data records; the maximum result of the absolute value of the errors is obtained by taking the absolute value of each error value, sorting it from the maximum to the minimum absolute value, and reading the first data in the sorted order; and the average result of the spatial neighborhood error gradient is obtained by adding all the spatial neighborhood error gradients in the current aggregation unit and dividing by the number of data records.
[0059] In this embodiment, the calculation results corresponding to different analysis dimensions, different aggregation levels, and different aggregation units are written into the pre-calculated result matrix according to a unified index structure.
[0060] Specifically, the index structure sequentially records the analysis dimension identifier, aggregation level identifier, and aggregation unit identifier, so that any pre-calculated result can be located through the corresponding analysis dimension, aggregation level, and aggregation unit; thus, the aggregation result calculation corresponding to the preset analysis dimension is completed before the query command reaches the cloud.
[0061] When the control terminal needs to view the measurement and analysis results, it generates a query command based on the current display requirements and sends the query command to the cloud.
[0062] Specifically, the query command includes at least the target observation perspective and the filtering conditions; the target observation perspective records the analysis dimension, aggregation level and observation area corresponding to the current query; the filtering conditions record the data fields to be filtered, the comparison relationship and the corresponding filtering threshold.
[0063] Furthermore, after receiving the query command, the cloud sequentially reads the analysis dimensions recorded in the target observation perspective and matches the read analysis dimensions with the analysis dimension indexes stored in the pre-calculated result matrix item by item.
[0064] Subsequently, the analysis dimension combination, aggregation level, and aggregation relationship in the target observation perspective are compared to the index combination that has been established in the pre-calculated result matrix. When all the analysis dimensions required by the target observation perspective have corresponding indices, and the analysis dimension combination, aggregation level, and aggregation relationship all have corresponding pre-calculated results, it is determined that the target observation perspective and the pre-calculated result matrix are completely matched.
[0065] In cases where the target observation perspective and the pre-calculated result matrix are perfectly matched, the cloud determines the corresponding index based on the analysis dimension identifier, aggregation level identifier, and observation area identifier in the target observation perspective. The target matrix block in the pre-calculated result matrix is located directly through this index, and the aggregation results stored in the target matrix block are read. All read results corresponding to the current target observation perspective are reorganized according to the data order required by the query instruction to form the first data subset.
[0066] As a preferred implementation, when there are analysis dimensions in the target observation perspective that do not have corresponding indexes in the pre-calculated result matrix, or when the combination of analysis dimensions, aggregation level, or aggregation relationship corresponding to the target observation perspective is inconsistent with the index combination already stored in the pre-calculated result matrix, it is determined that the target observation perspective and the pre-calculated result matrix do not fully match; at this time, the cloud re-determines the data range participating in the current query based on the target observation perspective.
[0067] In this embodiment, the cloud first reads the spatial boundary corresponding to the target observation viewpoint, and compares the spatial range of each data cluster with the spatial boundary corresponding to the target observation viewpoint one by one; when the spatial range of a certain data cluster overlaps with the spatial range corresponding to the target observation viewpoint, the data cluster is determined as the data cluster corresponding to the current query.
[0068] Subsequently, data records are read one by one from the determined data clusters, and it is determined whether the three-dimensional spatial coordinates of each data record are within the spatial range corresponding to the target observation viewpoint. Only data records whose spatial coordinates satisfy the spatial range are extracted. The cloud then performs regrouping and re-aggregation on the extracted data records according to the analysis dimension and aggregation level specified by the query command, and the recalculated results are combined into the first data subset.
[0069] Furthermore, after obtaining the first subset of data, the cloud reads the filtering conditions in the query command and performs the filtering item by item according to the order of the filtering conditions.
[0070] Specifically, each filtering condition includes the field to be filtered, the comparison relationship, and the filtering threshold. The cloud reads the data value of the corresponding field in the first data subset and compares it with the filtering threshold according to the preset comparison relationship among greater than, equal to, less than, not greater than, not less than, or interval inclusion relationship. When the query instruction sets two or more filtering conditions, the filtering results are combined according to the logical relationship recorded in the query instruction. Data records that satisfy all specified logical relationships are retained, and data records that do not satisfy the specified logical relationships are deleted. The retained data records form the second data subset.
[0071] In addition, the cloud uses a second subset of data to reconstruct the spatial neighborhood error field according to the target observation perspective.
[0072] First, a three-dimensional spatial grid is established based on the three-dimensional spatial range corresponding to the target observation perspective and the preset grid spacing, so that each grid node has a definite three-dimensional spatial coordinate; then, the measurement data in the second data subset is mapped to the three-dimensional spatial grid according to the spatial position.
[0073] In cases where the spatial location of a grid node coincides with the spatial location of a measurement data point in the second data subset, the error value corresponding to that measurement data is directly assigned to the grid node.
[0074] If the spatial location of a grid node is inconsistent with the spatial location of all measurement data in the second data subset, the measurement data around the grid node are selected according to the preset neighborhood range, and the error value of the grid node is determined by the inverse distance weighting method.
[0075] When using the inverse distance weighting method, for a given grid node to be calculated, the spatial distance between the grid node and each measurement data point involved in the calculation is first calculated. Then, a preset number of power operations are performed on each spatial distance, and the reciprocal of the result is used as the distance weight for the corresponding measurement data. Next, the error value of each measurement data point is multiplied by its corresponding distance weight to obtain the corresponding weighted error value. All weighted error values are summed, and all distance weights are summed simultaneously. Finally, the sum of the weighted error values is divided by the sum of the distance weights to obtain the error value corresponding to that grid node. This same calculation process is applied to all grid nodes within the target observation area that require interpolation, thereby obtaining the spatial neighborhood error field corresponding to the target observation viewpoint.
[0076] Furthermore, after the spatial neighborhood error field is constructed, the cloud reads the mapping relationship between the preset error range and the color code.
[0077] Specifically, each error interval has a defined start value, end value, and corresponding color code. For each grid node, its error value is read and matched in the order from the first error interval to the last error interval. When the error value of a grid node falls into a certain error interval, the color code corresponding to that error interval is read and associated with the three-dimensional spatial coordinates and error value of that grid node.
[0078] In this embodiment, the cloud determines the display direction, display range, and display level of the three-dimensional spatial coordinates according to the target observation perspective, and generates a three-dimensional error distribution chromatogram based on the three-dimensional spatial coordinates and color codes of each grid node.
[0079] Specifically, each spatial location in the three-dimensional error distribution chromatogram is characterized by a corresponding color code to represent the error range of that location, thereby converting the discrete error information corresponding to the second data subset into the spatial error distribution result under the target observation perspective.
[0080] Furthermore, after the three-dimensional error distribution chromatogram is generated in the cloud, it is sent to the control terminal.
[0081] Specifically, after receiving the three-dimensional error distribution chromatogram, the control terminal displays it according to the target observation perspective corresponding to the query command. When the control terminal changes the target observation perspective or changes the filtering conditions, it regenerates the query command and sends it to the cloud. The cloud then performs the pre-calculated result matrix matching, first data subset acquisition, filtering, second data subset generation, spatial neighborhood error field reconstruction, and three-dimensional error distribution chromatogram generation process again, thereby realizing the real-time output of precise measurement data corresponding to different observation perspectives and different filtering conditions.
[0082] Design experiments to verify the effectiveness of this application.
[0083] Experimental Environment and Experimental Data End-side equipment: Coordinate measuring machine (equipped with a contact probe), sampling frequency 100Hz. During the measurement process, the three-dimensional spatial coordinate trajectory of the probe and the corresponding original measurement values (height deviation of the measured surface relative to the reference) are recorded synchronously, and the sampling time information corresponding to the two is also recorded, which conforms to the data format of end-side measurement trajectory + original measurement values + sampling time in S1 of this method.
[0084] Test subject: Object A: 300 mm × 300 mm precision machined aluminum alloy plate (design flatness 0.01 mm), used for Experiment 1 (position recovery accuracy comparison) and Experiment 3 (gradient constraint ablation comparison).
[0085] Object B: Measurement point set of medium-complexity link-type parts, used to construct cloud data sets of 10,000 / 50,000 / 200,000 / 500,000 records with different sampling densities, for Experiment 2 (query response efficiency comparison).
[0086] Cloud computing environment: A single server (10-core, 20-thread CPU, 64GB memory) is used to deploy the edge-cloud collaborative data processing and analysis algorithm corresponding to this method, and a traditional baseline algorithm for comparison is also deployed. Both run in the same hardware environment to ensure the fairness of the comparison.
[0087] Control terminal: Industrial tablet PC, which communicates with the cloud server via a local area network to simulate the interactive process of on-site operators switching viewing angles, switching filter conditions, and rotating and zooming 3D chromatograms.
[0088] Experiment 1: Comparison of Spatial Position Recovery Accuracy under Trajectory Thinning Ratio Measurement trajectories and original measurement values are continuously collected along a regular path on the surface of object A at a sampling frequency of 100Hz. This set of continuously collected coordinate data is considered the true values of the spatial positions corresponding to each measurement point. Subsequently, the trajectory nodes are thinned out at ratios of 1 / 2, 1 / 5, and 1 / 10 (simulating the common working condition where only a portion of the trajectory nodes are uploaded under limited bandwidth at the simulating end, and the original measurement value sampling time falls between two trajectory nodes). For the thinned-out measurement points, two methods are used to recover their spatial positions: Interpolation recovery method: According to the S1 procedure of this method, based on the time interval ratio between the sampling time of the measurement point and the recording time of the two adjacent trajectory nodes, the three coordinate differences of the two adjacent trajectory nodes are interpolated and superimposed to obtain the recovered coordinates; Nearest neighbor rounding method: directly take the coordinates of the trajectory node that is closest in time as the spatial position of the measurement point (without interpolation) and use it as the reference baseline.
[0089] The position recovery error is obtained by averaging the three-dimensional spatial distance between the recovered coordinates and the true coordinates obtained by the two methods over all the thinned points.
[0090] Experimental data: Table 1. Comparison of errors between the two position recovery methods under different trajectory thinning ratios (unit: mm)
[0091] like Figure 3 As shown in Table 1, with the increase of the trajectory thinning ratio (the sparser the uploaded trajectory), the position recovery error of both methods increases accordingly. This is consistent with the general rule that the larger the distance between adjacent trajectory nodes, the more difficult it is for the position change to be accurately represented by a single point coordinate. However, the error of the interpolation recovery method remains in the range of 0.01 to 0.04 mm, and its growth rate is much slower than that of the nearest neighbor rounding method (0.24 to 1.22 mm). In the extreme case of a thinning ratio of 1 / 10, the error of the interpolation recovery method still does not exceed 0.04 mm, while the error of the nearest neighbor rounding method has reached 1.22 mm, a difference of about 30 times. This result shows that the spatial position recovery method in S1 of this method, which interpolates the coordinates of adjacent trajectory nodes according to the sampling time ratio, can still maintain a high accuracy in the correspondence between the original measurement values and the spatial position even when the uploaded data on the end side is sparse and discontinuous. This provides a reliable spatial coordinate basis for subsequent cloud data set construction, feature extraction, and error field reconstruction.
[0092] Experiment 2: Comparison of query response efficiency under different data sizes Based on the measurement point set of linkage-type parts of object B, cloud-based datasets of four scales (10,000, 50,000, 200,000, and 500,000 data points) are constructed by controlling the sampling density. Spatial location recovery, multi-dimensional feature extraction, spatial partitioning and clustering, and multi-level aggregation are completed according to S1–S4 of this method, forming a pre-calculated result matrix for the corresponding scale. Subsequently, a set of query commands that perfectly match the existing analysis dimensions of the pre-calculated result matrix are issued from the control terminal (e.g., viewing the average error result of a certain block according to the established spatial region hierarchy). The query response time for the following three processing methods is measured: Direct extraction based on perfect viewpoint matching: Following method S6, the target matrix block corresponding to the aggregation level in the pre-calculated result matrix is hit, and the aggregation result is read directly; Perspective partial matching recalculation: According to method S7, the target observation perspective in the query command is manually set to include a new analysis dimension combination that has not been indexed in the pre-calculated result matrix, triggering the re-extraction and re-aggregation of related data clusters; Traditional full-scale computation: Without constructing a pre-computed result matrix, each query re-executes grouping and aggregation operations on all the original measurement data of the cloud dataset of that scale as a baseline.
[0093] Each query was executed 10 times independently for each size and each method, and the average response time was taken.
[0094] Experimental data: Table 2 Comparison of response times for three query processing methods under different data sizes (unit: ms)
[0095] like Figure 4As shown, as the data scale increases from 10,000 to 500,000 records, the response time of the traditional full-scale calculation method rapidly increases from 210ms to 9650ms (approximately 46 times), which is insufficient to meet the interactive requirements of real-time on-site viewing. The response time of the viewpoint-matching direct extraction method remains consistently low at 12-24ms, showing almost no significant increase with the data scale, and the speedup factor gradually increases from 17.5 times to 402.1 times, indicating that the benefits of the pre-calculated result matrix are more significant with larger data scales. The response time of the viewpoint-partial matching recalculation method falls between the two. Although it still requires re-aggregating the hit data clusters, since this method has already divided the data clusters according to the spatial neighborhood error distribution characteristics in S3, the recalculation scope is limited to the data clusters overlapping with the spatial range of the target observation viewpoint, resulting in an efficiency improvement of 2-3 times or more compared to the traditional full-scale calculation. These results demonstrate that this method, through the pre-calculated result matrix and viewpoint matching judgment mechanism, effectively reduces the amount of redundant cloud calculations and query response time while ensuring flexibility for different observation viewpoints, with particularly prominent advantages in scenarios with large data scales.
[0096] Experiment 3: Ablation Comparison of Feature Representation Effects under Spatial Neighborhood Error Gradient Constraints Based on the cloud dataset constructed from the same batch of measurement data on the surface of object A, a decision tree ensemble model was trained and subsequent spatial partitioning and clustering were completed using the following two methods: Gradient constraint: As described in S2 of this method, the spatial neighborhood error gradient splitting result is weighted with the basic splitting result according to the preset gradient weight, and used together as the basis for node splitting; Without gradient constraints: Node splitting is performed only according to the conventional node purity evaluation rules of decision trees (basic splitting results), without introducing spatial neighborhood error gradient splitting results as a control baseline.
[0097] The decision tree ensemble models trained in two different ways were used to extract multidimensional feature vectors and perform spatial partitioning and clustering under the same parameters according to method S3, resulting in two sets of data cluster partitioning results. The intra-cluster error standard deviation (which measures the consistency of local errors within the same data cluster; the smaller the value, the more concentrated the error distribution characteristics of the data cluster and the better it reflects the local true error state) and the error field reconstruction RMSE (the root mean square error of the reconstructed spatial neighborhood error field using their respective data clusters according to the S9 process and compared with the high-density reference error value obtained independently within the region; the smaller the value, the closer the reconstructed error field is to the true error distribution) were calculated for the two sets of results.
[0098] Experimental data: Table 3. Impact of spatial neighborhood error gradient constraints on feature representation and error field reconstruction (unit: mm)
[0099] like Figure 5 As shown in Table 3, after introducing the spatial neighborhood error gradient as a decision tree splitting constraint, the standard deviation of the error within the cluster decreased from 0.034 mm to 0.015 mm, a reduction of approximately 55.9%; the RMSE of the reconstructed error field decreased from 0.047 mm to 0.021 mm, a reduction of approximately 55.3%. Both indicators showed significant improvement, indicating that considering the dispersion of the spatial neighborhood error gradient during the decision tree node splitting process enables the multidimensional feature vectors extracted by the decision tree ensemble model to more fully reflect the pattern of local error variation with spatial location, thereby making the error distribution within the data clusters obtained by subsequent spatial partitioning and clustering more concentrated and consistent. Furthermore, the spatial neighborhood error field reconstructed from these data clusters with more concentrated error distribution features is also closer to the true error distribution state. This result verifies the effectiveness of the feature extraction mechanism of using the spatial neighborhood error gradient as a splitting constraint in this method for improving the ability to express spatial error features of precision measurement data.
[0100] Experiment 4: Test of Generation Delay and Rendering Frame Rate of 3D Error Distribution Chromatography under Different Mesh Densities Based on the cloud dataset of 200,000 data points and its corresponding data clusters from Experiment 2, three-dimensional spatial grids (corresponding to coarse, medium, and fine grid spacing) were set with three different numbers of grid nodes (50,000, 400,000, and 3.2 million) under the same target observation perspective and spatial range. Spatial neighborhood error field reconstruction (including distance inverse weighted interpolation) and three-dimensional error distribution chromatogram generation were performed according to method S9. The generation delay of the chromatogram (the time taken from the second data subset being in place to the completion of the chromatogram data generation) and the rendering frame rate when the control terminal received the chromatogram and performed rotation and scaling operations were recorded.
[0101] Table 4 Comparison of chromatogram generation delay and rendering frame rate under different grid densities
[0102] like Figure 6As shown in Table 4, when the number of grid nodes increases from 50,000 to 3.2 million, the chromatogram generation delay increases from 22ms to 210ms, while the rendering frame rate decreases from 38fps to 9fps. With grid node counts of 50,000 and 400,000, the generation delay remains within 100 milliseconds, and the rendering frame rate exceeds the 15fps threshold. This satisfies the condition in S9 of this method that the chromatogram is sent only when the rendering frame rate exceeds the preset frame rate threshold, enabling real-time multi-view output. This ensures a smooth and continuous display when the control terminal switches viewing angles. However, with an excessively fine grid setting of 3.2 million grid nodes, the rendering frame rate drops to 9fps, below the frame rate threshold. According to the method's judgment logic, the grid density should be appropriately reduced or progressive rendering should be adopted to guarantee the interactive experience of real-time multi-view output. These results demonstrate that the grid density and frame rate threshold judgment mechanism set in S9 of this method can reasonably balance the spatial resolution of the chromatogram with the smoothness of real-time interaction, providing timely and continuous spatial error distribution feedback for on-site quality judgment.
[0103] Example 2:
[0104] S1 includes acquiring the original measurement values and measurement trajectory uploaded by the end-side device; obtaining an interpolation fitting function based on the end-side measurement trajectory to determine the initial spatial position corresponding to the original measurement values; if the offset of the initial spatial position is greater than a preset offset threshold, then correcting to obtain the target spatial position; converting the original measurement values based on the target spatial position to obtain calibrated measurement values; generating multidimensional spatial coordinates based on the calibrated measurement values and the target spatial position, and constructing a cloud data set containing multidimensional spatial coordinates in the cloud.
[0105] In this embodiment, when the end-side device performs a measurement task, it simultaneously samples the raw measurement values output by the measurement sensor and the motion trajectory of the measurement actuator.
[0106] Specifically, for each original measurement value obtained, the sampling time corresponding to the original measurement value is recorded; the end-side measurement trajectory records the position of the measurement actuator in three spatial coordinate directions according to the trajectory sampling time; the end-side device uploads the original measurement value, the sampling time of the original measurement value, the trajectory sampling time and the corresponding trajectory position to the cloud, so that the measurement value and the trajectory position can correspond according to the time relationship.
[0107] Furthermore, after the cloud-based receiver measures the trajectory, it first arranges the trajectory nodes from front to back according to the trajectory sampling time, and then uses two trajectory nodes that are adjacent in time to form an interpolation interval.
[0108] Specifically, for each interpolation interval, the positions of the previous and next trajectory nodes in the three spatial coordinate directions are obtained respectively, thereby establishing a piecewise interpolation fitting relationship between sampling time and spatial position; for trajectory segments without abrupt changes in direction within the trajectory sampling interval, linear interpolation is used to determine the position within the interval; when the trajectory passes through a turning point, the trajectory node corresponding to the turning point is used as the common endpoint of the two adjacent interpolation intervals, and interpolation is performed separately to avoid directly connecting the trajectory across the turning point.
[0109] When determining the initial spatial location of a certain original measurement value, the sampling time corresponding to the original measurement value is read, and the interpolation interval in which the sampling time is located is determined.
[0110] Specifically, first, the time difference obtained by subtracting the start time of the interval from the sampling time is calculated. Then, the interval duration obtained by subtracting the start time of the interval from the end time of the interval is calculated. The time difference is divided by the interval duration to obtain the time position ratio of the sampling time in the current interpolation interval. Subsequently, the coordinate differences between the next trajectory node and the previous trajectory node in three spatial coordinate directions are calculated respectively. Each coordinate difference is multiplied by the time position ratio, and the calculation results are added to the coordinate value of the corresponding direction of the previous trajectory node to obtain three spatial coordinate values. These three spatial coordinate values together constitute the initial spatial position corresponding to the original measurement value. If the sampling time of the original measurement value is the same as the sampling time of the trajectory node, the spatial coordinates of the trajectory node are directly used as the initial spatial position, and interpolation is not performed.
[0111] Furthermore, after the initial spatial position is determined, a position offset judgment is performed on it.
[0112] Before implementing this method, when the measuring equipment completes the spatial coordinate calibration, a reference measuring trajectory is generated according to the motion path specified in the current measuring task, and the spatial coordinates of each reference node on the reference measuring trajectory and the corresponding trajectory progress are saved; when the offset judgment is made on the current original measuring value, the reference spatial position corresponding to the same trajectory progress is obtained in the reference measuring trajectory according to the trajectory progress corresponding to the sampling time.
[0113] In addition, the offset is determined according to the straight-line distance between the initial spatial position and the reference spatial position.
[0114] Specifically, the coordinates of the initial spatial position in each of the three spatial coordinate directions are subtracted from the coordinates of the reference spatial position in the corresponding directions. The three coordinate differences are squared, the three squared results are added together, and the square root of the sum is taken. The resulting spatial distance is the offset of the initial spatial position.
[0115] In this embodiment, the offset threshold is determined before the measurement task is established based on the device's positioning capability and the position error allowed by the current measurement task.
[0116] Specifically, the positioning repeatability accuracy value obtained by the calibrated measuring device is read, and the maximum allowable position error specified for the current measurement task is read. The minimum value is calculated on the two values, and the resulting value is used as the offset threshold for the current measurement task. The offset threshold is then associated with and stored with the measurement task identifier. After adopting this determination method, the offset threshold will not exceed the positioning constraint that the device can achieve after calibration, nor will it exceed the allowable position error range of the current measurement task.
[0117] In addition, the calculated offset is compared with the offset threshold.
[0118] Specifically, when the offset is not greater than the offset threshold, it indicates that the initial spatial position is within the allowable position error range of the current measurement task, and the initial spatial position is used as the target spatial position; when the offset is greater than the offset threshold, the initial spatial position is corrected based on the reference spatial position.
[0119] In addition, when performing position correction, the coordinate differences between the reference spatial position and the initial spatial position in three spatial coordinate directions are calculated respectively, and the obtained three coordinate differences are used as the position correction amount in the corresponding spatial coordinate directions.
[0120] Subsequently, each position correction is added to the coordinate value in the direction corresponding to the initial spatial position to obtain three corrected spatial coordinate values, and these three spatial coordinate values are used to form the target spatial position. Since the position correction is derived from the actual coordinate difference between the reference spatial position and the initial spatial position under the same trajectory progress, the target spatial position after correction is consistent with the reference spatial position corresponding to the current trajectory progress.
[0121] Furthermore, after obtaining the target spatial location, position compensation is performed on the original measurement values based on the target spatial location.
[0122] Specifically, before performing a formal measurement task, the measuring equipment completes spatial position calibration using a calibration component with known standard values; measurement values are collected at each calibration position, and the standard value of the corresponding position of the calibration component is subtracted from the measurement value obtained at the calibration position. The difference is used as the measurement deviation of the calibration position, and the three spatial coordinates of the calibration position are stored in correspondence with the measurement deviation to form position compensation data.
[0123] In addition, for the current target spatial position, if there is a calibration position in the position compensation data that has the same spatial coordinates as the target spatial position, the measurement deviation corresponding to the calibration position is directly obtained; if there is no calibration position with completely consistent coordinates, the spatial distance between the target spatial position and each calibration position is calculated, and a preset number of calibration positions are selected in order of increasing spatial distance to participate in the compensation value calculation; the preset number is fixed in the equipment calibration stage, and the same number of calibration positions are used for each position compensation.
[0124] As a preferred embodiment, the compensation value is calculated using a distance-inverse weighted average.
[0125] Specifically, the spatial distances between the target spatial location and each of the calibration locations involved in the calculation are obtained. The reciprocal of each spatial distance is taken to obtain the corresponding distance weight. The measurement deviation corresponding to each calibration location is then multiplied by its distance weight, and all products are added together. At the same time, all distance weights are added together. The sum of the products of the measurement deviation and the distance weights is divided by the sum of the distance weights, and the resulting value is used as the measurement compensation value corresponding to the target spatial location. When the target spatial location coincides with one of the calibration locations, the measurement deviation corresponding to that calibration location is directly used, and the reciprocal distance calculation is not performed again.
[0126] The measurement deviation in the position compensation data is obtained by subtracting the standard value from the measured value of the calibrated position. Therefore, when converting the original measurement values, the measurement compensation value corresponding to the target spatial position is subtracted from the original measurement values, and the result is used as the calibration measurement value.
[0127] Therefore, the conversion direction of the original measurement value is consistent with the method of obtaining the measurement deviation, and there is no need to select a compensation direction separately based on the positive or negative sign of the error.
[0128] Furthermore, after the cloud completes the position correction and measurement calibration, it combines the coordinate values of the target spatial position in three spatial coordinate directions with the corresponding calibration measurement values into a single multidimensional spatial data record. The three spatial coordinates are used to determine the actual position of the measurement point in the measurement area, and the calibration measurement values are used to record the measurement result corresponding to that position. Each multidimensional spatial data record also retains its measurement time and data index to maintain the correspondence between the measurement data before and after calibration.
[0129] The above processing is performed sequentially on all the original measurement values in the current measurement task. The generated multidimensional spatial data records are written into the cloud data storage area according to the measurement task identifier, and a spatial location index is established according to three spatial coordinates. The cloud data set is composed of all the multidimensional spatial data records.
[0130] Example 3:
[0131] S2 includes acquiring a cloud-based dataset, calculating the predicted residuals based on the cloud-based dataset to obtain an initial residual sequence, calculating the residual change rate based on the initial residual sequence to obtain the spatial neighborhood error gradient, determining whether the spatial neighborhood error gradient is greater than a preset threshold, and if the spatial neighborhood error gradient is greater than the preset threshold, determining the splitting constraint condition, performing node partitioning on the decision tree based on the splitting constraint condition to obtain the decision tree ensemble algorithm, and traversing the input samples according to the decision tree ensemble algorithm to extract multi-dimensional feature vectors and obtain a feature set.
[0132] In this embodiment, after obtaining the cloud data set, the cloud data is arranged according to the order of the end-side measurement trajectory corresponding to each data record, and the 3D spatial coordinates and calibration measurement values in each data record are read; the prediction residual is determined according to the difference between the actual measurement value at the current measurement position and the predicted value of its spatial neighborhood.
[0133] Specifically, for any given data record, the spatial distance between that data record and the other data records is calculated.
[0134] The spatial distance calculation process is as follows: Calculate the coordinate differences of two data records in three spatial coordinate directions, square each of the three coordinate differences, add the squared values together, and then perform a square root operation on the sum. Arrange the remaining data records in ascending order of spatial distance. In this embodiment, the top 6 data records are selected to form the spatial neighborhood of the current data record. For cases where there are repeated measurement data at the same spatial location, first calculate the arithmetic mean of the calibration measurement values corresponding to that spatial location, and then use the average value as the measurement value for that spatial location in subsequent calculations.
[0135] Specifically, when determining the predicted measurement value of the current data record, distance weights are calculated for each of the six neighboring data records.
[0136] Specifically, the reciprocal of the spatial distance between the current data record and each neighboring data record is taken, and the resulting value is used as the distance weight of the corresponding neighboring data record. The calibration measurement value of each neighboring data record is multiplied by the corresponding distance weight, and the resulting products are summed. At the same time, the six distance weights are summed, and the sum of the products is divided by the sum of the distance weights, and the resulting value is used as the predicted measurement value of the current data record. The predicted measurement value of the current data record is subtracted from the calibration measurement value to obtain the predicted residual of the current data record. The same processing is performed on all data records in the cloud dataset, and the predicted residuals are arranged according to the order of the edge measurement trajectories to form an initial residual sequence.
[0137] Furthermore, after the initial residual sequence is formed, the residual change rate is calculated according to the adjacent measurement positions.
[0138] Specifically, for two adjacent data records in the trajectory sequence, the absolute value of the difference between the two prediction residuals is first calculated, and then the spatial distance between the two data records is calculated. The absolute value of the residual difference is divided by the spatial distance, and the result is used as the residual change rate between two adjacent measurement positions. If there are data records with the same spatial coordinates in the continuous sampling data, they are merged according to their spatial positions before calculating the residual change rate, and the arithmetic mean of all prediction residuals at that spatial position is used as the merged prediction residual, thereby ensuring that there is a non-zero spatial distance between adjacent positions participating in the calculation of the residual change rate.
[0139] In this embodiment, the spatial neighborhood error gradient is determined based on the distribution of the residual change rate within the local spatial range.
[0140] Specifically, for the current data record, the aforementioned 6 spatial neighborhood data records are still used. The residual change rate associated with the current data record and the corresponding neighborhood position is read. The read residual change rates are added together and then divided by the number of residual change rates involved in the calculation. The result is used as the spatial neighborhood error gradient of the current data record.
[0141] Therefore, the spatial neighborhood error gradient directly reflects the degree of change in the prediction residual within a unit spatial distance, rather than just the magnitude of the residual at a single measurement location.
[0142] In addition, the threshold used to determine the error gradient in the spatial neighborhood is obtained by calibration using standard parts before the formal measurement.
[0143] Specifically, after the equipment completes position calibration and measurement value calibration, it uses standard parts with known standard values to perform repeated measurements according to the same trajectory, sampling interval and measurement parameters as the formal measurement, so that 10 valid measurement results are obtained for each trajectory sampling position; the data formed in the calibration stage are processed according to the aforementioned calculation process of prediction residual, residual change rate and spatial neighborhood error gradient to obtain the reference spatial neighborhood error gradient set.
[0144] The average value of the baseline gradient is obtained by summing all the values in the neighborhood error gradient set of the baseline space and then dividing by the total number of gradient values.
[0145] Subsequently, the difference between the error gradient of each reference spatial neighborhood and the average value of the reference gradient is calculated. Each difference is squared, all squared values are summed and divided by the total number of gradient values, and the result is squared to obtain the standard deviation of the reference gradient. The standard deviation of the reference gradient is multiplied by 3, and the result is added to the average value of the reference gradient to obtain the judgment threshold of the spatial neighborhood error gradient. This judgment threshold is stored in accordance with the end-side device identifier and the measurement task type, and remains unchanged during the formal measurement.
[0146] In this embodiment, the cloud compares the spatial neighborhood error gradient of each data record with the judgment threshold one by one.
[0147] Specifically, when the spatial neighborhood error gradient is not greater than the judgment threshold, the data record participates in the decision tree node partitioning as a normal training sample; when the spatial neighborhood error gradient is greater than the judgment threshold, the data record is determined as a constraint sample, and the data record with the smallest spatial distance and whose spatial neighborhood error gradient is not greater than the judgment threshold is selected as the reference sample, and the constraint sample and the reference sample form a split constraint pair; if all data records in the current spatial neighborhood are greater than the judgment threshold, the scope is expanded to the second layer of spatial neighborhood after the current data record, and the reference sample is determined according to the same rules.
[0148] In constructing the decision tree, 3D spatial coordinates, calibration measurement values, prediction residuals, and spatial neighborhood error gradients are used as node splitting features. For each splitting feature in the current node, the data records in the node are first arranged in ascending order of the feature value. The arithmetic mean of two adjacent feature values with different values is calculated, and the result is used as the candidate splitting threshold.
[0149] In addition, when performing trial splits using the candidate split threshold, data records with feature values not greater than the candidate split threshold are assigned to the first child node, and data records with feature values greater than the candidate split threshold are assigned to the second child node.
[0150] When there is a pair of splitting constraints in the current node, the candidate splitting scheme must make the corresponding constraint sample and the reference sample enter the two child nodes respectively; the candidate splitting scheme that does not separate the constraint sample and the reference sample is directly excluded.
[0151] Therefore, the location where the spatial neighborhood error gradient exceeds the judgment threshold is transformed into an explicit constraint in the node partitioning process.
[0152] Furthermore, the degree of residual dispersion after splitting is calculated for candidate splitting schemes that meet the splitting constraints.
[0153] Specifically, for the first child node, all predicted residuals in the child node are summed and divided by the number of data records to obtain the average residual. Then, the difference between each predicted residual and the average residual is calculated, the difference is squared, the squared values are summed and divided by the number of data records in the child node to obtain the discrete residual value of the first child node. The second child node obtains the corresponding discrete residual value by following the same process.
[0154] Next, calculate the proportion of the number of data records of the two child nodes to the total number of data records of the nodes before the split. Multiply the two proportions by the residual discrete value of the corresponding child node, and add the two products to obtain the residual discrete value after the split of the current candidate splitting scheme.
[0155] After calculating all candidate splitting schemes that satisfy the splitting constraints, sort them in ascending order of the discrete residual values after splitting, and select the candidate splitting scheme ranked first to perform node partitioning; if there are no candidate splitting schemes that satisfy the splitting constraints within a node, the current node is determined as a leaf node.
[0156] This embodiment uses sampling with replacement to construct 30 decision trees.
[0157] Specifically, each time, the same number of training samples as the total number of data records in the cloud dataset are extracted, and a decision tree is constructed according to the aforementioned process of spatial neighborhood error gradient judgment, split constraint determination and node partitioning; this is repeated 30 times to form a decision tree ensemble algorithm; the 30 decision trees share the same judgment threshold and split constraint rules, and each decision tree uses independently extracted training data.
[0158] Furthermore, after the decision tree ensemble algorithm is established, the input samples to be processed are sequentially input into 30 decision trees.
[0159] Specifically, when an input sample reaches a non-leaf node, the splitting features and splitting threshold stored in that node are read, and the feature value corresponding to the input sample is compared with the splitting threshold. If the feature value is not greater than the splitting threshold, the sample enters the first child node; if the feature value is greater than the splitting threshold, the sample enters the second child node. This process is repeated until a leaf node is reached.
[0160] Furthermore, after the input sample reaches the leaf node, four feature data items are extracted from the leaf node: the number of node layers the input sample passes through from the root node to the leaf node, the arithmetic mean of the prediction residuals of all training samples in the leaf node, the arithmetic mean of the error gradients of the spatial neighborhood of all training samples in the leaf node, and the proportion of the number of training samples in the leaf node to the total number of training samples in the corresponding decision tree. The four feature data items generated by each decision tree are then concatenated in a fixed arrangement order of the 30 decision trees to form a multidimensional feature vector containing 120 feature data items.
[0161] Perform the same decision tree traversal and feature extraction on all input samples in the cloud dataset, store the obtained multidimensional feature vectors in the original data record index order, and form a feature set from all multidimensional feature vectors.
[0162] Example 4:
[0163] S3 includes obtaining a feature set, constructing a distance matrix based on the feature set, and obtaining a core object set if the distance matrix meets a density threshold; using a spatial partitioning clustering algorithm to determine the core object set and obtain connected regions; performing boundary attribution determination on the connected regions to obtain initial data clusters; extracting error distribution features based on the initial data clusters; labeling the data clusters based on the error distribution features to obtain multiple data clusters with error distribution features.
[0164] In this embodiment, after the cloud obtains the generated feature set, it reads the multi-dimensional feature vectors corresponding to each measurement data according to the data index, and establishes the correspondence between the feature vectors and the target spatial location, prediction residuals, and spatial neighborhood error gradients.
[0165] Since the numerical ranges corresponding to different feature dimensions are different, each feature dimension is normalized before calculating the feature distance. For any feature dimension, the maximum and minimum values among all feature values of that dimension are obtained first. The minimum value is then subtracted from the current feature value. The difference is then divided by the difference between the maximum and minimum values to obtain the normalized result of the feature value. When the maximum and minimum values are equal, the normalized result corresponding to that feature dimension is set to 0.
[0166] Furthermore, after the normalization process is completed, the feature distance between any two feature vectors is calculated sequentially.
[0167] Specifically, the numerical differences between the two feature vectors in each corresponding feature dimension are calculated, each numerical difference is squared, and the sum of all squared results is used to perform a square root operation. The result is taken as the feature distance between the two feature vectors. According to the data index order of the feature vectors, each feature distance is written into the corresponding row and column positions, thus forming a distance matrix. Each row in the distance matrix corresponds to one feature vector, and the values in each column are used to represent the distance relationship between the feature vector and the other feature vectors.
[0168] In addition, before determining the density of the distance matrix, the neighborhood distance and density threshold are determined first.
[0169] Specifically, the neighborhood distance is obtained using the benchmark data corresponding to the current type of measurement task. After the equipment is calibrated, three measurements are performed using standard parts according to the trajectory and sampling interval consistent with the formal measurement, and a benchmark feature set is generated according to the processing procedure in Example 3. The feature distances between adjacent measurement points in the trajectory of the benchmark feature set are calculated. All feature distances are added together and divided by the number of feature distances to obtain the average benchmark distance. The difference between each feature distance and the average benchmark distance is calculated separately. The difference is squared, and all squared results are added together and divided by the number of feature distances. The square root of the result is then calculated to obtain the standard deviation of the benchmark distance. Twice the standard deviation of the benchmark distance is added to the average benchmark distance, and the result is used as the neighborhood distance.
[0170] In this embodiment, the density threshold is also determined based on the aforementioned set of benchmark features.
[0171] Specifically, for each feature vector in the baseline feature set, the number of other feature vectors in the distance matrix whose feature distance to that feature vector is no greater than the neighborhood distance is counted to obtain the number of neighborhood objects corresponding to that feature vector. The total number of neighborhood objects is summed and divided by the total number of baseline feature vectors to obtain the average number of neighborhood objects. The difference between the number of each neighborhood object and this average is calculated, the difference is squared, all squared results are summed and divided by the total number of baseline feature vectors, and the square root of the result is performed to obtain the standard deviation of the number of neighborhood objects. The average number of neighborhood objects is subtracted from the standard deviation of the number of neighborhood objects, and the result is rounded down. The integer obtained is used as the density threshold. When the rounded result is less than 1, the density threshold is set to 1. The neighborhood distance and density threshold are written to the cloud parameter table before the current type of measurement task is officially executed and remain unchanged during the formal data processing.
[0172] Furthermore, after obtaining the distance matrix, the core objects are determined row by row.
[0173] Specifically, for the current feature vector, the number of feature vectors in that row, excluding its own corresponding position, whose feature distance is not greater than the neighborhood distance is counted; when the counted number is not less than the density threshold, the current feature vector is determined as a core object; when the counted number is less than the density threshold, the current feature vector is not included in the core object set; the determination of all feature vectors is completed in the same way, and the core object set is formed by the feature vectors that meet the density condition.
[0174] Furthermore, after the core object set is formed, spatial partitioning is performed based on the target spatial location corresponding to the core object.
[0175] Specifically, the cloud reads the coordinate range of all core objects in three spatial coordinate directions, and uses the average spatial distance between adjacent sampling points in the end-side measurement trajectory as the spatial division size. The average spatial distance is obtained by calculating the spatial distance between every two adjacent sampling points in the trajectory, adding all spatial distances together and dividing by the number of adjacent sampling intervals. The measurement area is divided along the three spatial coordinate directions according to the obtained spatial division size, so that each core object corresponds to a specific spatial unit.
[0176] When determining connectivity for core objects, both spatial positional relationships and feature distance relationships are used. For any two core objects, if the two core objects are located in the same spatial unit, or if the two spatial units have a common surface, common edge, or common vertex, and the feature distance between the two core objects is not greater than the neighborhood distance, the two core objects are determined to be connected. If the aforementioned conditions are not met, a connectivity relationship is not established.
[0177] In this embodiment, the connected regions are determined starting from the core object with the smallest data index value that has not yet been assigned.
[0178] Specifically, core objects that satisfy the connectivity condition with the core object are included in the same connected region. Then, other core objects that satisfy the connectivity condition are searched using the newly included core objects until no new core objects can be added to the current connected region. Subsequently, the core object with the smallest data index value is selected from the remaining unassigned core objects, and the above process is repeated until all core objects in the core object set have been assigned to regions, thus obtaining each connected region.
[0179] Furthermore, after the connected regions are determined, boundary attribution is determined for feature vectors that are not identified as core objects.
[0180] Specifically, for a single object to be assigned, a core object whose feature distance is no greater than its neighborhood distance is searched in the distance matrix. If all the core objects found belong to the same connected region, the object to be assigned is assigned to that connected region. If the core objects found belong to more than two connected regions, the average feature distance between the object to be assigned and the core objects in each connected region is calculated, and the object to be assigned is assigned to the connected region with the smallest average feature distance.
[0181] Specifically, when the average feature distance values corresponding to two or more connected regions are the same, the spatial distance between the object to be assigned and the spatial center of each connected region is further calculated. The spatial center of the connected region is obtained by taking the arithmetic mean of the coordinate values of all core objects in the region in three spatial coordinate directions. The object to be assigned is assigned to the connected region with the smallest spatial distance value. If the spatial distance is still the same, it is assigned to the connected region with the smallest region number value. Through the above determination, each object to be assigned has a unique region affiliation. The core objects in each connected region are merged with the boundary objects belonging to that region to obtain the corresponding initial data cluster.
[0182] Furthermore, after the initial data clusters are formed, error distribution features are extracted from the prediction residuals and spatial neighborhood error gradients corresponding to each initial data cluster.
[0183] Specifically, for an initial data cluster, the sum of all predicted residuals within the cluster is divided by the number of data records to obtain the average residual; the absolute value of each predicted residual is taken, and the sum of all absolute values is divided by the number of data records to obtain the average absolute residual; all absolute residual values are arranged in descending order of value, and the first value in the sorted order is taken as the maximum absolute residual value.
[0184] Simultaneously, the average spatial neighborhood error gradient is obtained by summing all spatial neighborhood error gradients within the initial data cluster and dividing by the number of data records. Then, the number of data records with prediction residuals greater than 0, equal to 0, and less than 0 are counted separately and divided by the total number of data records in the initial data cluster to obtain the data proportions corresponding to the three residual directions. The error distribution characteristics of the initial data cluster are composed of the average residual, the average absolute residual, the maximum absolute residual, the average spatial neighborhood error gradient, and the data proportions corresponding to the three residual directions.
[0185] Finally, the error distribution characteristics of each initial data cluster are associated with the corresponding data cluster number and written into the attribute record of that data cluster. The attribute record is associated with all data indexes within the cluster, so that subsequent aggregation operations can directly read the corresponding residual level, error magnitude and spatial neighborhood error gradient according to the data cluster number. After marking the error distribution characteristics of all initial data clusters, multiple data clusters with error distribution characteristics are obtained.
[0186] Example 5:
[0187] S4 includes partitioning multiple data clusters to obtain a multi-dimensional hierarchical node set; constructing an aggregation path network for the multi-dimensional hierarchical node set; assigning weights to the aggregation path network to determine the target aggregation path; if the target aggregation path meets the conditions, performing operations on multiple data clusters along the target aggregation path to obtain multi-dimensional summary values; generating row and column indices based on the multi-dimensional summary values; and constructing and determining the pre-calculated result matrix using the row and column indices.
[0188] In this embodiment, after obtaining each generated data cluster in the cloud, the data cluster number, spatial location range, trajectory segment and error distribution characteristics corresponding to each data cluster are read, and a hierarchical relationship is established according to the analysis dimensions predetermined by the current measurement task.
[0189] This embodiment employs three analysis dimensions: spatial region, trajectory segment, and data cluster. For the spatial region dimension, the spatial range corresponding to a single data cluster is used as the first-level node. First-level nodes located within the same preset spatial partition are merged into second-level nodes, and second-level nodes belonging to the same measurement region are merged into third-level nodes. For the trajectory segment dimension, a single trajectory sampling segment is used as the first-level node. First-level nodes that are consecutive and belong to the same trajectory segment are merged into second-level nodes, and second-level nodes belonging to the same measurement task are merged into third-level nodes. For the data cluster dimension, a single data cluster is used as the first-level node, and region-level nodes and task-level nodes are established sequentially according to the spatial region to which the data cluster belongs. Each node records its analysis dimension, level, included data cluster number, and direct superior node number, thereby forming a multi-dimensional hierarchical node set.
[0190] Furthermore, after the multi-dimensional hierarchical node set is established, an aggregated path network is constructed according to the merging relationship between the nodes.
[0191] Specifically, if the data in the next-level node can be directly merged to form a certain upper-level node, then an aggregation connection is established between the two nodes, pointing from the next-level node to the upper-level node. When the aggregation involves more than two analysis dimensions, after the previous analysis dimension completes one hierarchical merging, the connection continues to be established according to the next analysis dimension node to which the merging result belongs, until the target level corresponding to the preset analysis dimension can be reached. Through the above processing, a definite aggregation path is formed from the basic data cluster to any target analysis level.
[0192] As a preferred embodiment, each connection in the aggregation path network is weighted according to the number of data records actually participating in this aggregation.
[0193] Specifically, for a connection merged from one lower-level node to a higher-level node, the total number of data records contained in that lower-level node is read, and this total number of data records is used as the weight of the connection. For a case where one higher-level node merges with two or more lower-level nodes at the same time, the number of data records of each lower-level node participating in this merge is counted, and the sum of the number of data records is used as the weight of the connection. This weight directly reflects the number of data records that need to be read and processed to perform the corresponding aggregation step.
[0194] In addition, when determining the target aggregation path, the starting node and the ending node are first determined based on the pre-calculated task.
[0195] Specifically, the starting node is the base-level node where the data cluster to be processed resides, and the ending node is the node corresponding to the current analysis dimension and aggregation level. The cloud traverses all reachable paths from the starting node to the ending node, and for each path, it sequentially reads the weight of each connection along the way, adds up all connection weights to obtain the cumulative weight corresponding to the path, sorts all reachable paths in ascending order of cumulative weight, and determines the path with the smallest cumulative weight as the target aggregation path. If there are two or more paths with the same cumulative weight, the number of connections contained in each path is compared, and the path with the fewest connections is determined as the target aggregation path. If the number of connections is still the same, the path is determined according to the preset order of the analysis dimensions in the task configuration table.
[0196] In this embodiment, a path condition check is performed after the target aggregation path is determined.
[0197] Specifically, first, check whether the starting node of the path contains the data cluster to be processed; second, check whether the ending node of the path is consistent with the analysis dimension and aggregation level specified by the pre-computation task; third, check whether there is an established direct merge relationship between adjacent nodes in the path; when all three conditions are met, the target aggregation path is determined to meet the execution conditions; if any condition is not met, the path is discarded, and the next path is selected according to the cumulative weight ranking result to re-check the conditions.
[0198] Furthermore, once the target aggregation path meets the execution conditions, the data clusters are aggregated level by level starting from the path's starting node.
[0199] Specifically, upon reaching each aggregation node, all the next-level nodes contained in that node are read first, and the data records corresponding to each next-level node are obtained; records with the same data index are only retained once to avoid the same measurement data from being repeatedly included in the calculation at the same aggregation node.
[0200] In addition, for each aggregation node, the following parameters are calculated: the number of measurement data, the average value of calibration measurements, the average value of prediction residuals, the maximum absolute value of residuals, and the average value of spatial neighborhood error gradients. The number of measurement data is obtained by counting the number of data records after deduplication; the average value of calibration measurements is obtained by summing all calibration measurements and then dividing by the number of data records; the average value of prediction residuals is obtained by summing all prediction residuals and then dividing by the number of data records; the maximum absolute value of residuals is obtained by taking the absolute value of each prediction residual and selecting the largest value; the average value of spatial neighborhood error gradients is obtained by summing all spatial neighborhood error gradients and then dividing by the number of data records.
[0201] When the target aggregation path continues to merge from the next level node that has already been aggregated to the next level node, the number of measurement data is directly taken as the sum of the number of data records of each next level node.
[0202] Specifically, for the average value of calibration measurement, the average value of prediction residuals, and the average value of spatial neighborhood error gradients, the average value stored in each next-level node is first multiplied by the corresponding number of data records, then the products are added together, and finally divided by the sum of the number of data records in each next-level node to obtain the average result corresponding to the previous level node. For the maximum absolute value of residuals, the maximum absolute value of residuals in each next-level node is directly compared, and the result with the largest value is taken as the result of the previous level node. The above operations are performed step by step according to the target aggregation path until the aggregation of the terminal node is completed. The statistical results obtained from each aggregation node constitute a multidimensional summary value.
[0203] Furthermore, after the multidimensional summary values are generated, a row index is created based on the analysis dimension, aggregation level, and aggregation node to which they belong.
[0204] Specifically, the row index consists of the analysis dimension number, the aggregation level number, and the aggregation node number in sequence. Within the same analysis dimension, the aggregation level is arranged from the base level to the next higher level. Within the same level, the aggregation node numbers are arranged from smallest to largest, thus ensuring that each aggregation node corresponds to a unique row position.
[0205] In this embodiment, the column index is determined according to the summary item, and is set in sequence as the number of measurement data, the average value of calibration measurement, the average value of prediction residual, the maximum value of residual absolute value, and the average value of spatial neighborhood error gradient. Each summary item corresponds to a unique column position.
[0206] The cloud determines the row where the corresponding aggregation node is located according to the row index, and then writes the multidimensional summary values of each item into the corresponding column according to the column index; after writing all analysis dimensions and aggregation levels of the current measurement task, a pre-calculated result matrix is formed.
[0207] Example 6:
[0208] S5 includes receiving a query instruction, which includes a target observation viewpoint and filtering conditions; obtaining a viewpoint parse tree based on the target observation viewpoint; reorganizing the filtering conditions using the viewpoint parse tree to obtain a conditional predicate; extracting a data block index if the conditional predicate matches a pre-calculated result matrix; reading data fragments based on the data block index to construct a matching mapping table; assembling data fragments using the matching mapping table to obtain a query response set; and completing the process of receiving the query instruction containing the target observation viewpoint and filtering conditions sent from the control terminal to the cloud based on the pre-calculated result matrix.
[0209] In this embodiment, after receiving the query command sent by the control terminal, the cloud analyzes the target observation perspective and filtering conditions in the query command.
[0210] Specifically, the target observation perspective includes at least the analysis dimension, aggregation level, and observation range, and the filtering conditions include the filtering fields, comparison relationships, and limit values. The cloud first reads the analysis dimension and matches it with the analysis dimension number used in the pre-calculated result matrix in Example 5; then it reads the aggregation level and associates the aggregation level with the level number under the corresponding analysis dimension; and then it determines the aggregation node involved in this query based on the observation range.
[0211] After the above processing is completed, the target observation perspective is transformed into a definite correspondence between analysis dimensions, aggregation levels, and aggregation nodes.
[0212] When constructing the perspective parse tree based on the target observation perspective, the current query task is used as the root node. Analysis dimension nodes are set sequentially according to the order of the analysis dimensions in the target observation perspective, and corresponding aggregation level nodes are set under each analysis dimension node. For aggregation level nodes, aggregation nodes falling within the observation range are read according to the observation range, and these aggregation nodes are sequentially connected to their corresponding aggregation level nodes. If the target observation perspective simultaneously includes three analysis dimensions—spatial region, trajectory segment, and data cluster—three levels of analysis branches are established sequentially according to the dimension order specified in the query instruction, so that each final-level node corresponds to a defined combination of observation dimensions. The perspective parse tree is composed of the root node, analysis dimension nodes, aggregation level nodes, and the parent-child relationships between aggregation nodes.
[0213] Furthermore, after the perspective parse tree is built, the filtering conditions in the query command are reorganized.
[0214] Specifically, the cloud reads the filter field corresponding to each filter condition and associates the filter condition with the analysis dimension node, aggregation node, or summary item in the view parsing tree according to the data type of the filter field. When there are more than two filter conditions for the same filter field, the range is first organized according to the comparison relationship. When there are more than two lower limit conditions, the lower limit values are compared and the lower limit with the largest value is adopted. When there are more than two upper limit conditions, the upper limit values are compared and the upper limit with the smallest value is adopted. When the obtained lower limit is not greater than the obtained upper limit, the two are combined to form the valid value range of the filter field. When the obtained lower limit is greater than the obtained upper limit, it is determined that there is no data that meets the filter conditions in this query, and a query response set without data records is directly formed.
[0215] For equality filtering conditions, the specified value is directly used as the retained value of the corresponding filter field; for exclusion conditions, the corresponding specified value is deleted from the filter range.
[0216] When more than two different filtering fields are involved, the judgment conditions of each filtering field are connected according to the logical relationship recorded in the query instruction. After the above processing, the filtering fields, comparison relations, limitation ranges and their logical connection relations are arranged in the node order of the perspective parse tree to form the condition predicate. The condition predicate is used to characterize the specific filtering conditions that the current query can directly affect the pre-calculated result matrix.
[0217] Furthermore, after the conditional predicate is formed, it is matched with the row and column indices of the pre-computed result matrix.
[0218] Specifically, firstly, the analysis dimension in the conditional predicate is read, and the same analysis dimension number is searched in the row index of the pre-computed result matrix. After finding the corresponding analysis dimension, it is further checked whether the aggregation level specified by the conditional predicate exists in the hierarchy index corresponding to the analysis dimension. After the aggregation level is matched, it is checked whether the corresponding row index has been established for each aggregation node involved in the observation range. For the number of measurement data, the average value of calibration measurement values, the average value of prediction residuals, the maximum value of absolute residuals, and the average value of spatial neighborhood error gradients involved in the filtering conditions, the corresponding statistical items are searched in the column index of the pre-computed result matrix.
[0219] Specifically, when all analysis dimensions involved in the conditional predicate have corresponding row indexes, all aggregation levels have corresponding level indexes, all aggregation nodes have definite row positions, and all filter fields can be directly obtained from the existing column indexes of the pre-calculated result matrix, the conditional predicate is determined to match the pre-calculated result matrix.
[0220] If any one of the analysis dimensions, aggregation levels, aggregation nodes, or filter fields cannot be directly obtained from the existing row and column indexes, the condition predicate will not match the pre-computed result matrix, and the corresponding data block index will not be extracted from the pre-computed result matrix.
[0221] Additionally, if the conditional predicate matches the pre-computed result matrix, the data block index is extracted based on the corresponding row and column positions.
[0222] When the pre-calculated result matrix is established, the data is divided into blocks according to continuous row intervals and continuous column intervals, and the starting row number, ending row number, starting column number, ending column number and storage address are saved for each data block. In this query, the row numbers of all target aggregation nodes are obtained first according to the view parsing tree, and then the corresponding column numbers are obtained according to the summary items involved in the condition predicate.
[0223] Specifically, when the row numbers of the target aggregation node are consecutive, the row number with the smallest value is taken as the starting row of the query, and the row number with the largest value is taken as the ending row of the query. When the row numbers of the target aggregation node are not consecutive, the query row range is established according to each consecutive row interval. Column numbers form the query column range in the same way.
[0224] Subsequently, each query row range and query column range is compared with the row and column boundaries of the data block record one by one; when the row range of a certain data block overlaps with the query row range, and the column range of the data block also overlaps with the query column range, the storage address and row and column boundaries corresponding to the data block are written into the data block index set.
[0225] In this embodiment, the cloud reads the corresponding data fragments based on the data block index set.
[0226] Specifically, after reading one data block, the target row in the data block is extracted according to the query row range, and the target column is extracted according to the query column range. The resulting data forms the data segment corresponding to the current data block. For cases where the same query result is distributed in more than two data blocks, each data segment retains the row number and column number in the original pre-calculated result matrix so that its position in the target observation view can be restored later.
[0227] In addition, a matching mapping table is established after the data fragments are read.
[0228] Specifically, each final-level aggregation node in the perspective parsing tree is treated as a mapping object. The cloud searches for the data segment that stores the row number corresponding to the aggregation node, and then determines the specific data location in the data segment based on the column number corresponding to the summary item to be queried. The aggregation node number, data block index, row position inside the data segment, and column position inside the data segment are established to form a correspondence and written into the matching mapping table.
[0229] Therefore, each target observation node corresponds to a specific data reading position, eliminating the need to traverse the complete pre-calculated result matrix again.
[0230] When assembling the query response set by matching the mapping table, the corresponding data fragments are read sequentially according to the arrangement order of the last-level nodes in the perspective parse tree.
[0231] For each last-level node, first obtain the corresponding aggregate node data according to the matching mapping table, and then perform the numerical judgment in the conditional predicate; if it belongs to the lower limit condition, compare the value to be judged with the lower limit value, and only keep the data that is not less than the lower limit value; if it belongs to the upper limit condition, only keep the data that is not greater than the upper limit value; if it belongs to the equality condition, only keep the data that is the same as the specified value; if there are more than two filtering conditions, merge the judgment results according to the logical relationship determined in the conditional predicate.
[0232] Furthermore, after completing the data reading and condition judgment of all last-level nodes, the retained data is arranged in the order of analysis dimension, aggregation level, and aggregation node number, and written into the query response set; the query response set also records the analysis dimension, aggregation level, and aggregation node corresponding to this query, so that subsequent steps can directly locate the query results based on the target observation perspective.
[0233] Example 7:
[0234] S6 includes obtaining a query command, extracting the target observation perspective and aggregation level from the query command, wherein the target observation perspective is used to compare the analysis dimensions of the pre-calculated result matrix to obtain a matching status; if the matching status is a complete match, then determining the target block index according to the aggregation level; addressing and locating the target block in the pre-calculated result matrix according to the target block index to obtain the target matrix block corresponding to the target block index; reading data for the target matrix block and extracting a first data subset from the pre-calculated result matrix.
[0235] In this embodiment, after receiving the query command, the cloud sequentially reads the target observation perspective and the aggregation level. The target observation perspective includes the analysis dimension corresponding to this query, the combination order of each analysis dimension, and the observation range. The aggregation level is used to determine the data aggregation granularity required for the current query. The cloud converts each analysis dimension in the query command into the corresponding dimension number according to the analysis dimension index table saved when building the pre-calculated result matrix in Embodiment 5, and determines the aggregation node number involved under the analysis dimension according to the observation range, thereby forming the dimension combination and node range corresponding to the current query.
[0236] When determining the matching status, the number of analysis dimensions included in the target observation perspective is first counted, and then the corresponding dimension number is searched in the dimension index table of the pre-calculated result matrix item by item.
[0237] Specifically, for each analysis dimension with the same number found, a dimension matching result is recorded. After all analysis dimensions are queried, the number of matched analysis dimensions is compared with the number of analysis dimensions included in the target observation perspective. If the two numbers are equal, the combination order of each analysis dimension in the pre-calculated result matrix is checked. If the combination order is consistent, the aggregation level in the query instruction is read, and it is checked whether the aggregation level has formed a pre-calculated result under the current dimension combination.
[0238] Furthermore, after the aggregation level check is completed, the aggregation nodes involved in this query are obtained according to the observation range corresponding to the target observation perspective, and the number of each aggregation node is compared with the row index of the pre-calculated result matrix one by one.
[0239] Specifically, the matching status is determined to be a complete match when all analysis dimensions in the target observation perspective have corresponding dimension indices, the dimension combination order is consistent, the specified aggregation level has a corresponding pre-calculated level, and all target aggregation nodes have corresponding row indices; if any of the above conditions are not met, the matching status is not a complete match, and the process of re-extraction and recalculation is initiated.
[0240] Furthermore, once the matching status is a complete match, the target block index is determined based on the aggregation level.
[0241] Specifically, when the pre-calculated result matrix is established, consecutively arranged aggregation nodes under the same analysis dimension and the same aggregation level are grouped into the same matrix block, and each matrix block stores the analysis dimension number, aggregation level number, block number, starting row number, ending row number, starting column number, ending column number, and corresponding storage address.
[0242] When determining the target block index, the matrix block records are first retrieved using the analysis dimension number corresponding to the target observation perspective and the aggregation level number in the query command to obtain candidate blocks that meet the two numbering conditions.
[0243] Then, the aggregation node numbers involved in the target observation perspective are read, and the matrix row numbers corresponding to each aggregation node are obtained according to the row index table. Each matrix row number is compared with the starting row number and the ending row number of the candidate block. When the matrix row number is not less than the starting row number and not greater than the ending row number, it is determined that the matrix row is located in the corresponding candidate block, and the corresponding block number is included in the target block index.
[0244] In addition, when all target aggregation nodes are located in the same matrix block, the target block index only records that matrix block; when the target aggregation nodes are distributed across more than two matrix blocks, the matrix blocks involved are recorded separately and arranged in ascending order of the starting row number of each matrix block; the target block index is composed of the analysis dimension number, aggregation level number, block number, target row range, and storage address, enabling the target block index to directly point to the location of the pre-computed data required by the current query.
[0245] In this embodiment, the cloud performs addressing in the pre-calculated result matrix based on the target block index.
[0246] First, read the storage address in the target block index to locate the starting storage location of the matrix block; then, based on the starting row number, ending row number, starting column number, and ending column number in the block record, determine the row and column boundaries of the block in the pre-calculated result matrix; subsequently, perform intersection processing between the aggregation node row numbers involved in the query and the block row boundaries, retaining only the matrix rows located within the target block and belonging to this query.
[0247] For column positions, the cloud reads the column index established in Example 5 based on the summary items that need to be returned in the query response.
[0248] For example, when a query command requests the return of the number of measurement data, the average value of calibration measurement values, and the average value of spatial neighborhood error gradient, the column numbers corresponding to the three summary items are obtained respectively, and only the above column positions are retained in the already located target matrix block; by combining the row position and column position, the target matrix block corresponding to this query is obtained.
[0249] As a preferred implementation, data reading is performed after the target matrix block is determined.
[0250] For each target aggregation node, read the corresponding matrix row according to its row number, then read the corresponding cell data according to the column number of the item to be summarized, and combine the aggregation node number, aggregation level number and the summarized value read into one data record; when the target matrix block contains more than two target aggregation nodes, read them in order from smallest to largest according to the matrix row number.
[0251] When the query corresponds to more than two target matrix blocks, the data is read according to the target block index, and then the reading results of each block are merged according to the aggregation node number.
[0252] During the merging process, the analysis dimension number, aggregation level number, and aggregation node number are used as the data identification criteria. When data records with completely identical identification criteria are found, only one record is retained to avoid data at the intersection of matrix blocks from being repeatedly included in the query results.
[0253] After reading all the data from the target matrix blocks, the data records are rearranged according to the analysis dimension order and aggregation node order specified by the target observation perspective. The rearranged aggregation node information and the corresponding summary values form the first data subset.
[0254] Example 8:
[0255] S7 includes obtaining the query command to extract the target observation perspective, comparing the target observation perspective with the analysis dimensions of the pre-calculated result matrix to obtain the matching status; if the matching status is not completely matched, extracting the difference features to obtain the dimension difference identifier; addressing and determining multiple data clusters in the pre-calculated result matrix according to the dimension difference identifier, re-extracting the underlying detailed data for multiple data clusters to obtain the basic detailed dataset; recalculating the basic detailed dataset according to the target observation perspective to obtain the first data subset.
[0256] In this embodiment, after receiving the query command, the cloud reads the target observation perspective and extracts the analysis dimensions, dimension arrangement order, aggregation level and observation range.
[0257] Then, the dimension index table corresponding to the pre-calculated result matrix is read, and the analysis dimensions in the target observation perspective are compared with the dimension index table one by one. For each analysis dimension, it is first determined whether there is a dimension number with the same value in the pre-calculated result matrix, then it is determined whether there is an aggregation level specified by the query command under that dimension number, and finally the corresponding aggregation node is obtained according to the observation range, and it is checked whether the aggregation node has been indexed.
[0258] Furthermore, after completing the item-by-item comparison, the number of analysis dimensions that have been matched in the target observation perspective is counted and compared with the total number of analysis dimensions included in the target observation perspective.
[0259] When two quantities are equal, and the order of each analysis dimension, the aggregation level, and the aggregation node corresponding to the observation range are all consistent with the existing indexes in the pre-calculated result matrix, the matching status is determined to be a complete match; when there is one analysis dimension that has not established a corresponding index, the aggregation level does not exist, the dimension order is inconsistent, or the observation range cannot be directly represented by the existing aggregation node, the matching status is determined to be a partial match.
[0260] When the matching status is incomplete, the cloud extracts the difference features between the target observation perspective and the pre-calculated result matrix. The difference extraction is performed sequentially according to the analysis dimension, aggregation level, dimension combination, and observation range.
[0261] For analysis dimensions that exist in the target observation perspective but not in the pre-calculated result matrix, record the number of the analysis dimension; when the analysis dimensions are the same but the aggregation levels are inconsistent, record the target aggregation level number and the existing aggregation level number in the pre-calculated result matrix; when the dimension combination order is inconsistent, record the dimension number whose order has changed and the target's arrangement position; when the observation range exceeds the coverage of the existing aggregation nodes, record the spatial boundary or trajectory boundary corresponding to the excess part.
[0262] The above differences are combined according to difference type, analysis dimension number, target aggregation level, target arrangement position, and target observation range to generate dimension difference identifiers.
[0263] Dimensional difference indicators are used to determine which analyses can continue to utilize existing indexes in the pre-computed results matrix and which analyses need to be recalculated from the underlying data.
[0264] In addition, when addressing data clusters based on dimensional difference identifiers, the analysis dimensions and aggregation levels that are consistent with the pre-calculated result matrix in the target observation perspective are first retained, and the corresponding row index in the pre-calculated result matrix is found using the retained dimension number, aggregation level number, and observation range. The aggregation node number that intersects with the current observation range is obtained through the row index, and then the correspondence between the aggregation node and the source data cluster saved in the pre-calculation stage is read to obtain the data cluster number related to this recalculation.
[0265] When the target observation range involves more than two aggregation nodes, the data cluster number corresponding to each aggregation node is read and sorted in ascending order according to the data cluster number.
[0266] Specifically, during the sorting process, data clusters with the same number are retained only once to obtain a set of target data clusters after deduplication. If the target observation perspective adds an analysis dimension that does not exist in the pre-calculated result matrix, the aggregation node is still determined based on the other matched analysis dimensions, and then the corresponding data cluster is obtained from the aggregation node in reverse, so that the newly added analysis dimension can be re-established in the original detail layer.
[0267] Furthermore, after identifying the target data cluster, the cloud reads the data index corresponding to each data cluster according to the data cluster number, and uses the data index to extract the underlying detailed data from the cloud data set.
[0268] Specifically, the extracted underlying detailed data includes the target spatial location, calibration measurement values, prediction residuals, spatial neighborhood error gradients, trajectory segments, and data cluster numbers; for cases where the same data index appears in different data clusters, duplicates are removed according to the data index, and only one detailed record is retained.
[0269] Furthermore, after completing the detailed reading of the data clusters, a range verification is performed according to the observation range in the target observation perspective.
[0270] Specifically, the spatial observation range is determined by the boundary values in three spatial coordinate directions, and data records are retained when the coordinates in all three spatial coordinate directions are within the corresponding boundary range; the trajectory observation range is determined according to the trajectory start position and end position, and the trajectory position is retained when it is within the range; all detailed data after range verification constitute the basic detailed dataset.
[0271] Furthermore, after the basic detailed dataset is formed, the aggregation groups are re-established according to the target observation perspective.
[0272] Specifically, when the target observation perspective includes a spatial region dimension, the basic detailed data is assigned to the corresponding spatial nodes according to the specified spatial boundaries; when it includes a trajectory segment dimension, trajectory nodes are assigned according to the start and end positions of the trajectory; when it includes a data cluster dimension, data cluster nodes are assigned according to the data cluster number; when the target observation perspective includes two or more analysis dimensions, the data is grouped level by level according to the dimension order in the query command. After the first analysis dimension is grouped, it is further divided according to the second analysis dimension within each group until all target analysis dimensions are processed.
[0273] As a preferred implementation, a summary calculation is performed for each re-formed group.
[0274] Specifically, the number of measurement data is obtained by counting the number of data records after deduplication within the group; the average value of calibration measurement values is obtained by adding all calibration measurement values within the group and then dividing by the number of data records; the average value of prediction residuals is obtained by adding all prediction residuals and then dividing by the number of data records; the maximum absolute value of residuals is obtained by taking the absolute value of each prediction residual and selecting the largest value from the obtained absolute values; and the average value of spatial neighborhood error gradients is obtained by adding all spatial neighborhood error gradients within the group and then dividing by the number of data records.
[0275] Furthermore, after all groups have completed their calculations, the summary results are arranged according to the order of analysis dimensions, aggregation levels, and aggregation nodes in the target observation perspective, and each summary result is associated with its corresponding analysis dimension number, aggregation level number, and aggregation node number; the recalculated summary results of each group constitute the first data subset.
[0276] Through the above processing, when the target observation perspective and the pre-calculated result matrix do not completely match, it is possible to identify and locate related data clusters based on dimensional differences, and reconstruct data results that conform to the target observation perspective from the underlying detailed data.
[0277] Example 9:
[0278] S8 includes obtaining a first data subset and a query command; parsing the query command to extract multi-dimensional filtering conditions; constructing multi-dimensional filtering rules based on the filtering conditions; mapping attributes between the multi-dimensional filtering rules and the first data subset to determine the target data slice range; performing multi-dimensional filtering processing within the target data slice range; calculating the matching metric value for each detailed data item; and if the matching metric value reaches a preset threshold, extracting the corresponding detailed data and summarizing it to obtain a second data subset.
[0279] In this embodiment, after obtaining the first data subset and query instructions in the cloud, the filtering conditions in the query instructions are first parsed.
[0280] Specifically, each data record in the first data subset retains its corresponding data index, spatial coordinates, aggregation level, data cluster number, calibration measurement value, prediction residual, and spatial neighborhood error gradient. During parsing, the filtering fields, comparison relationships, and limit values are read according to the order of the filtering conditions in the query instruction, and the corresponding attribute fields in the first data subset are found based on the filtering fields. The filtering conditions belonging to spatial location are split into three spatial coordinate directions, the filtering conditions belonging to measurement results and error results correspond to calibration measurement values, prediction residuals, and spatial neighborhood error gradients, respectively, and the filtering conditions belonging to discrete attributes correspond to the aggregation level and data cluster number, thus obtaining multi-dimensional filtering conditions that act on different data attributes.
[0281] When there are more than two filtering conditions for the same attribute, the limited ranges are merged first during the condition parsing stage; when there are two lower limit values, the two lower limit values are compared and the lower limit with the larger value is retained; when there are more than two lower limit values, they are compared one by one in the same way until the maximum lower limit is obtained; the upper limit value is compared in the opposite way until the minimum upper limit among all the upper limits is obtained; when the obtained maximum lower limit is not greater than the minimum upper limit, the range from the maximum lower limit to the minimum upper limit is determined as the effective filtering range of the attribute; when the maximum lower limit is greater than the minimum upper limit, it indicates that the corresponding filtering conditions do not have a common data range, and the second data subset corresponding to the current query is determined to be an empty set.
[0282] Furthermore, after the conditions are parsed, multi-dimensional filtering rules are constructed based on each filtering condition.
[0283] Specifically, for numerical attributes, range rules are established based on valid lower and upper limits. A filtering rule is valid when a data value simultaneously meets both the lower and upper limit conditions. When only a single-sided limit value is set, the judgment is made according to the corresponding upper or lower limit condition. Consistency rules are established for data cluster numbers and aggregation levels based on limit numbers. A rule is valid when the number of the data to be filtered matches the limit number. When the query command includes exclusion conditions, the corresponding rule is considered valid if the value of the attribute to be filtered does not match the exclusion value.
[0284] The multidimensional filtering rules are then mapped to the attributes of the first data subset.
[0285] Specifically, for each filtering rule, its filtering field number is read, and the data attribute with the same number is found in the field index of the first data subset. The data column where the attribute is located and the corresponding index position are recorded. After completing the mapping of all rules, the target data slice range is determined first using the filtering conditions with index positioning capabilities. For data cluster numbers and aggregation levels, the start and end positions of data records that meet the limited number are obtained according to the corresponding index. For 3D spatial coordinates, the limited range of each coordinate direction is obtained, and the data records that fall within the corresponding range are obtained through the spatial index.
[0286] When two or more filtering conditions result in data ranges, the intersection of each data range is performed.
[0287] Specifically, for two consecutive data ranges, their start and end positions are compared. The largest value among the two start positions is taken as the intersection start position, and the smallest value among the two end positions is taken as the intersection end position. If the intersection start position is not greater than the intersection end position, the intersection range is retained; if the intersection start position is greater than the intersection end position, the range is deleted. The same processing is performed on the remaining filtering conditions in sequence, and the data ranges that are finally retained constitute the target data slice range. For data ranges consisting of two or more non-contiguous intervals, the intersection operation is performed on each interval, and each valid interval is saved in ascending order of data index.
[0288] In addition, within the target data slice range, multi-dimensional filtering is performed on each detailed data item.
[0289] Specifically, all attributes to be filtered corresponding to the current detailed data are read and judged according to the order of the multi-dimensional filtering rules; for numerical range rules, the attribute value is compared with the effective lower limit and the effective upper limit respectively. If the attribute value is not less than the effective lower limit and not greater than the effective upper limit, the rule is marked as satisfied; for one-sided range rules, only the numerical comparison in the corresponding direction is performed; for number consistency rules, the attribute number of the detailed data is compared with the limit number. If the two are consistent, it is marked as satisfied; for exclusion rules, if the attribute value is inconsistent with the exclusion value, it is marked as satisfied.
[0290] Furthermore, after all the filtering rules are judged for each piece of detailed data, the corresponding matching metric is calculated.
[0291] In this embodiment, each filtering condition is treated as an equal weight condition. First, the total number of valid filtering rules formed after parsing the query command is counted. Then, the number of filtering rules that are determined to be satisfied by the current detailed data is counted. The number of satisfied rules is divided by the total number of valid filtering rules, and the result is used as the matching metric value of the detailed data. Thus, when all filtering rules are satisfied, the matching metric value is 1; when more than one filtering rule is not satisfied, the matching metric value is less than 1.
[0292] The preset threshold is determined based on the logical relationship between the various filtering conditions in the query command.
[0293] In this embodiment, the query command requires all filtering conditions to be met simultaneously. Therefore, after the condition parsing is completed, the number of filtering rules that must be met is determined as the total number of valid filtering rules. The preset threshold 1 is obtained by dividing the number of filtering rules that must be met by the total number of valid filtering rules. The preset threshold is determined before the current query starts filtering and does not change during the current query processing.
[0294] As a preferred implementation, the cloud compares the matching metric of each detail data with a preset threshold.
[0295] Specifically, when the matching metric reaches the preset threshold of 1, it indicates that the detailed data meets all the filtering conditions in the query command, and the detailed data is extracted into the data set to be summarized; when the matching metric is less than 1, the detailed data is not extracted; all detailed data within the target data slice range are processed in the same way, and the detailed data that meets the filtering conditions form the data set to be summarized.
[0296] Furthermore, after extracting the detailed data, the dataset to be summarized is grouped according to the analytical dimensions specified by the target observation perspective.
[0297] For each set of data, the number of detailed data entries within the set is counted to obtain the corresponding number of data records; the average value of the calibration measurements is obtained by summing all calibration measurement values and dividing by the number of data records; the average value of the prediction residuals is obtained by summing all prediction residuals and dividing by the number of data records; the absolute value of each prediction residual is taken, and the maximum value is selected from all absolute values to obtain the maximum absolute value of the residuals; the average value of the spatial neighborhood error gradients is obtained by summing all spatial neighborhood error gradients and dividing by the number of data records.
[0298] The detailed data after each group's filtering, the corresponding summary results, and the relationships between analysis dimensions, aggregation levels, and aggregation nodes are saved, thus forming the second data subset.
[0299] The data in the second data subset all meet the filtering conditions specified by the current query command, and retain the spatial location, measurement results, and error attributes required for subsequent reconstruction of the spatial neighborhood error field.
[0300] Example 10:
[0301] S9 includes acquiring a second data subset and the target observation viewpoint; processing the second data subset according to the target observation viewpoint to obtain viewpoint alignment data; calculating the spatial neighborhood error field based on the viewpoint alignment data; determining three-dimensional error distribution data for the spatial neighborhood error field; generating a three-dimensional error distribution chromatogram using the three-dimensional error distribution data; and sending the three-dimensional error distribution chromatogram to the control terminal if the rendering frame rate of the three-dimensional error distribution chromatogram is greater than a preset frame rate threshold, thereby achieving real-time output from multiple perspectives.
[0302] In this embodiment, after obtaining the second data subset and the target observation viewpoint in the cloud, the 3D spatial coordinates, prediction residuals and data indexes of each detailed data in the second data subset are read, and the observation center, azimuth angle, pitch angle and display space range in the target observation viewpoint are read.
[0303] In this embodiment, the predicted residual is used as the error value of the corresponding measurement position. A new view coordinate system is established from the target observation perspective, and the spatial positions in the second data subset are uniformly transformed to this view coordinate system to form view alignment data.
[0304] In addition, when aligning the viewpoints, the coordinates of the observation center in the corresponding direction are subtracted from the coordinates of each detailed data point in the three spatial coordinate directions to obtain the translation coordinates with the observation center as the origin.
[0305] Then, the first coordinate rotation is performed according to the azimuth angle: the translation coordinates of the first coordinate direction are multiplied by the cosine and sine values of the azimuth angle, and the translation coordinates of the second coordinate direction are multiplied by the sine and cosine values of the azimuth angle. The corresponding products are then added or subtracted according to the rotation direction to obtain two coordinate values after horizontal rotation, while the coordinate values of the third coordinate direction remain unchanged. Then, the same sine and cosine rotation operations are performed on the horizontally rotated second and third coordinate directions according to the pitch angle to make the rotated third coordinate direction consistent with the target observation direction. After completing the two rotations, it is determined whether the three coordinate values are within the display space range specified by the target observation viewpoint, and only the data that simultaneously meets the boundary conditions of the three directions is retained. The view coordinates, prediction residuals, and data indexes of the retained data together constitute the viewpoint alignment data.
[0306] Furthermore, after the viewpoint alignment data is formed, a 3D regular grid is established in the display space corresponding to the target observation viewpoint.
[0307] In this embodiment, 128 sampling positions are set in the first coordinate direction, 128 sampling positions are set in the second coordinate direction, and 64 sampling positions are set in the third coordinate direction. The display range length in each coordinate direction is divided by the number of sampling positions in the corresponding direction minus 1, and the result is used as the distance between adjacent grid nodes in that coordinate direction. Starting from the starting point of the range in each coordinate direction, grid nodes are generated sequentially according to the obtained distances, so that all grid nodes cover the current display space.
[0308] For each grid node, the error value is calculated. First, the spatial distance between the grid node and all view alignment data is calculated. During the calculation, the coordinate difference in the three coordinate directions is obtained. The three coordinate differences are squared, and the square root is calculated after summing the squared results. The obtained spatial distances are arranged in ascending order of value, and the top 6 view alignment data are selected as the spatial neighborhood data of the grid node.
[0309] Specifically, when the spatial distance between a grid node and one of the view alignment data is 0, the prediction residual of that view alignment data is directly used as the error value of the grid node, and no further interpolation is performed; when all spatial distances are not 0, the reciprocals of the six spatial distances are taken respectively, and the resulting reciprocals are used as the distance weights of the corresponding neighboring data; the prediction residual of each neighboring data is multiplied by the corresponding distance weight, and the six products are added together, while the six distance weights are also added together. The result of the product sum is divided by the result of the distance weight sum, and the result is determined as the error value of the current grid node.
[0310] After processing all grid nodes according to this process, each grid node has definite spatial coordinates and error values, thus forming a spatial neighborhood error field.
[0311] Furthermore, after the spatial neighborhood error field is formed, the absolute values of all grid node error values are read, and the result with the largest value is taken as the upper limit of the error amplitude for this chromatographic mapping. The negative value of the upper limit of the error amplitude is taken as the lower limit of the error amplitude. The continuous interval between the lower limit of the error amplitude and the upper limit of the error amplitude is divided into 16 error intervals.
[0312] Specifically, the upper limit of the error amplitude is subtracted from the lower limit of the error amplitude, and the difference is divided by 16 to obtain the width of a single error interval. The interval width is continuously added 16 times starting from the lower limit of the error amplitude to obtain the boundaries of 16 error intervals. When the error values of all grid nodes are 0, all grid nodes are assigned the same color code representing zero error, and interval division is not performed.
[0313] In this embodiment, the 16 error intervals are configured with 16 specific color codes in order from negative error to positive error.
[0314] Specifically, for each grid node, its error value is compared with the upper and lower boundaries of 16 error intervals to determine the interval in which the error value is located, and the color code corresponding to the interval is read. The 3D view coordinates, error value and color code of the grid node are combined into a 3D error distribution data. After performing the same processing on all grid nodes, the 3D error distribution data is obtained.
[0315] When generating the 3D error distribution chromatogram, the 3D error distribution data is projected onto the display plane according to the target observation view. For each grid node, the projection position is calculated based on its view coordinates and observation distance, and the corresponding color code is written into the projection position. When two or more grid nodes are mapped to the same display position, the distances of each grid node along the observation direction are compared, and the color corresponding to the grid node with the smallest distance from the observation position is retained. After completing the projection and occlusion processing of all grid nodes, a 3D error distribution chromatogram under the current target observation view is formed.
[0316] As a preferred embodiment, the frame rate threshold is determined by the maximum display interval per frame allowed by the control terminal.
[0317] Specifically, when establishing a query session, the control terminal writes the maximum display interval of a single frame into the query parameters.
[0318] In this embodiment, the maximum display interval of a single frame is set to 50 milliseconds. 1000 milliseconds divided by 50 milliseconds yields 20 frames per second, and 20 frames per second is determined as the frame rate threshold corresponding to this query. This frame rate threshold remains unchanged until the current query session ends.
[0319] Furthermore, after the 3D error distribution chromatogram is rendered, 30 frames of rendering are executed continuously and the total time taken from the start of rendering from frame 1 to the completion of rendering from frame 30 is recorded. The total time is divided by 30 to obtain the average rendering time per frame, and then 1000 milliseconds is divided by the average rendering time per frame. The result is used as the rendering frame rate of the current 3D error distribution chromatogram.
[0320] Additionally, the rendering frame rate is compared to a frame rate threshold of 20 frames per second.
[0321] When the rendering frame rate is greater than 20 frames per second, the current 3D error distribution chromatogram and the corresponding target viewing angle identifier are sent to the control terminal; when the rendering frame rate is not greater than 20 frames per second, the sampling positions of the 3D regular grid in the three coordinate directions are downsampled by keeping one grid node at a time interval, and then the 3D error distribution chromatogram is regenerated based on the retained grid nodes and the rendering frame rate is recalculated until the obtained rendering frame rate is greater than 20 frames per second before sending.
[0322] In this embodiment, when the control terminal changes the observation direction, observation center, azimuth angle, pitch angle, or display space range, the changed target observation perspective is resent to the cloud.
[0323] The cloud platform re-executes coordinate transformation, spatial neighborhood error field calculation, 3D error distribution data generation, chromatogram rendering, and frame rate determination based on the new target observation perspective. It then sends the 3D error distribution chromatogram that meets the frame rate condition to the control terminal, thereby completing the output of error distribution results under different target observation perspectives.
[0324] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for precision measurement data processing and analysis based on edge-cloud collaboration, characterized in that, include: S1. Obtain the original measurement values uploaded to the cloud by the end device, restore the spatial position corresponding to each original measurement value according to the end measurement trajectory, and build a cloud data set containing multi-dimensional spatial coordinates in the cloud. S2. Based on the cloud dataset, a decision tree ensemble algorithm with spatial neighborhood error gradient as the splitting constraint is used to extract multidimensional feature vectors and obtain a feature set. S3. By using a spatial partitioning clustering algorithm to spatially partition the feature set, multiple data clusters with error distribution characteristics are obtained; S4. Perform multi-level aggregation operations on multiple data clusters according to preset analysis dimensions to determine the pre-calculated result matrix; S5. Receive the query command sent from the control terminal to the cloud, which includes the target observation angle and filtering conditions, in response to the pre-calculated result matrix. S6. If the target observation perspective in the query command completely matches the analysis dimension corresponding to the pre-calculated result matrix, then locate the target matrix block according to the aggregation level corresponding to the target observation perspective, and extract the first data subset from the pre-calculated result matrix. S7. If the target observation perspective in the query command does not completely match the analysis dimension corresponding to the pre-calculated result matrix, then multiple data clusters are re-extracted and recalculated to obtain the first data subset. S8. Perform multi-dimensional filtering on the first data subset according to the filtering conditions in the query instruction to obtain the second data subset; S9. Using the second data subset, the spatial neighborhood error field is reconstructed according to the target observation perspective, a three-dimensional error distribution chromatogram is generated, and the three-dimensional error distribution chromatogram is sent to the control terminal to realize real-time output from multiple perspectives.
2. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S1 includes: Acquire the raw measurement values and end-side measurement trajectory uploaded by the end-side device; Based on the end-side measurement trajectory, the interpolation fitting function is obtained to determine the initial spatial position corresponding to the original measurement values; If the initial spatial position offset is greater than the preset offset threshold, the target spatial position is obtained by correction. Based on the target spatial location, the original measurement values are converted to obtain the calibrated measurement values; Multidimensional spatial coordinates are generated based on calibration measurement values and target spatial location. A cloud data set containing multidimensional spatial coordinates is then constructed in the cloud.
3. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S2 includes: Obtain the cloud dataset, calculate the prediction residuals based on the cloud dataset to obtain the initial residual sequence, calculate the residual change rate based on the initial residual sequence, and obtain the spatial neighborhood error gradient; Determine whether the spatial neighborhood error gradient is greater than a preset threshold. If the spatial neighborhood error gradient is greater than the preset threshold, then determine the splitting constraint condition. Perform node partitioning on the decision tree based on the splitting constraint condition to obtain the decision tree ensemble algorithm. The input samples are traversed using the decision tree ensemble algorithm to extract multi-dimensional feature vectors and obtain a feature set.
4. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S3 includes: Obtain the feature set, construct a distance matrix based on the feature set, and if the distance matrix meets the density threshold, obtain the core object set; A spatial partitioning clustering algorithm is used to determine the core object set to obtain connected regions. Boundary attribution is then determined for each connected region to obtain the initial data clusters. Error distribution features are extracted from the initial data clusters, and the data clusters with error distribution features are labeled to obtain multiple data clusters.
5. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S4 includes: Multiple data clusters are partitioned to obtain a multi-dimensional hierarchical node set; Construct an aggregated path network from a multi-dimensional set of nodes, and assign weights to the aggregated path network to determine the target aggregated path; If the target aggregation path meets the conditions, then the operation is performed on multiple data clusters along the target aggregation path to obtain a multidimensional summary value; Row and column indices are generated based on the multidimensional aggregated values, and the pre-computed result matrix is constructed using these indices.
6. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S5 includes: Receive a query instruction, which includes the target viewing angle and filtering conditions; A perspective parse tree is obtained based on the target observation perspective. The filtering conditions are then reorganized using the perspective parse tree to obtain the conditional predicate. If the conditional predicate matches the pre-computed result matrix, then extract the data block index; Based on the data block index, data fragments are read to construct a matching mapping table. Data fragments are then assembled using the matching mapping table to obtain a query response set. Based on the pre-calculated result matrix, the query command containing the target observation perspective and filtering conditions sent from the control terminal to the cloud is completed.
7. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S6 includes: Obtain the query command, extract the target observation perspective and aggregation level from the query command, and use the target observation perspective to compare the analysis dimensions of the pre-calculated result matrix to obtain the matching status; If the matching status is a complete match, the target block index is determined based on the aggregation level; The target block is located in the pre-calculated result matrix based on the target block index, and the target matrix block corresponding to the target block index is obtained. Data is read from the target matrix block, and the first data subset is extracted from the pre-calculated result matrix.
8. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S7 includes: Obtain the query command to extract the target observation perspective, compare the target observation perspective with the analysis dimensions of the pre-calculated result matrix to obtain the matching status; If the matching status is not a complete match, extract the difference features to obtain the dimensional difference identifier; Based on the dimensional difference identifier, multiple data clusters are identified by addressing in the pre-calculated result matrix. The underlying detailed data is then re-extracted for the multiple data clusters to obtain the basic detailed dataset. The basic detailed dataset is recalculated according to the target observation perspective to obtain the first data subset.
9. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S8 includes: Obtain the first subset of data and the query command, and perform condition parsing on the query command to extract multi-dimensional filtering conditions; Construct multidimensional filtering rules based on filtering conditions, perform attribute mapping between multidimensional filtering rules and the first data subset, and determine the target data slice range. Perform multidimensional filtering within the target data slice and calculate the matching metric value for each detailed data point. If the matching metric reaches the preset threshold, the corresponding detailed data is extracted and summarized to obtain the second data subset.
10. The precision measurement data processing and analysis method based on edge-cloud collaboration according to claim 1, characterized in that: S9 includes: Obtain the second data subset and the target observation viewpoint; process the second data subset according to the target observation viewpoint to obtain the viewpoint alignment data. The spatial neighborhood error field is calculated based on the viewpoint alignment data. Three-dimensional error distribution data are determined for the spatial neighborhood error field, and a three-dimensional error distribution chromatogram is generated using the three-dimensional error distribution data. If the rendering frame rate of the 3D error distribution chromatogram is greater than the preset frame rate threshold, the 3D error distribution chromatogram is sent to the control terminal to achieve real-time output from multiple perspectives.
